5b8d883dd591c330d6ecd805644960a2c60043a3
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / mt7620a_dlink_dir-510l.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/gpio/gpio.h>
7
8 / {
9 compatible = "dlink,dir-510l", "ralink,mt7620a-soc";
10 model = "D-Link DIR-510L";
11
12 aliases {
13 led-boot = &led_status;
14 led-failsafe = &led_status;
15 led-running = &led_status;
16 led-upgrade = &led_status;
17 };
18
19 chosen {
20 bootargs = "console=ttyS1,57600";
21 };
22
23 keys {
24 compatible = "gpio-keys";
25
26 reset {
27 label = "reset";
28 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_RESTART>;
30 };
31
32 wps {
33 label = "wps";
34 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_WPS_BUTTON>;
36 };
37 };
38
39 leds {
40 compatible = "gpio-leds";
41
42 led_status: status {
43 label = "green:status";
44 gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
45 };
46
47 status-red {
48 label = "red:status";
49 gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
50 };
51 };
52 };
53
54 &ethernet {
55 mediatek,portmap = "llllw";
56 };
57
58 &uart {
59 status = "okay";
60 };
61
62 &spi0 {
63 status = "okay";
64
65 flash@0 {
66 compatible = "jedec,spi-nor";
67 reg = <0>;
68 spi-max-frequency = <50000000>;
69
70 partitions {
71 compatible = "fixed-partitions";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 partition@0 {
76 label = "jboot";
77 reg = <0x0 0x10000>;
78 read-only;
79 };
80
81 partition@10000 {
82 label = "recovery";
83 reg = <0x10000 0x200000>;
84 read-only;
85 };
86
87 partition@210000 {
88 compatible = "amit,jimage";
89 label = "firmware";
90 reg = <0x210000 0xde0000>;
91 };
92
93 config: partition@ff0000 {
94 label = "config";
95 reg = <0xff0000 0x10000>;
96 read-only;
97 };
98 };
99 };
100 };
101
102 &ehci {
103 status = "okay";
104 };
105
106 &ohci {
107 status = "okay";
108 };
109
110 &pcie {
111 status = "okay";
112 };
113
114 &pcie0 {
115 mt76x0e@0,0 {
116 reg = <0x0000 0 0 0 0>;
117 mtd-mac-address = <&config 0xe490>;
118 mac-address-increment = <(2)>;
119 mediatek,mtd-eeprom = <&config 0xe05d>;
120 };
121 };
122
123 &state_default {
124 default {
125 groups = "i2c", "uartf";
126 function = "gpio";
127 };
128 };