29350a855657916a816e12025de84a5e630aa4f0
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620n_asus_rt-n12p.dts
1 #include "mt7620n.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "asus,rt-n12p", "ralink,mt7620n-soc";
8 model = "Asus RT-N12+";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 wan {
25 label = "green:wan";
26 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
27 };
28
29 lan {
30 label = "green:lan";
31 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
32 };
33
34 led_power: power {
35 label = "green:power";
36 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
37 };
38
39 air {
40 label = "green:air";
41 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
42 };
43 };
44
45 keys {
46 compatible = "gpio-keys";
47
48 reset {
49 label = "reset";
50 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_RESTART>;
52 };
53 };
54 };
55
56 &gpio1 {
57 status = "okay";
58 };
59
60 &gpio2 {
61 status = "okay";
62 };
63
64 &gpio3 {
65 status = "okay";
66 };
67
68 &spi0 {
69 status = "okay";
70
71 flash@0 {
72 compatible = "jedec,spi-nor";
73 reg = <0>;
74 spi-max-frequency = <10000000>;
75
76 partitions {
77 compatible = "fixed-partitions";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 partition@0 {
82 label = "u-boot";
83 reg = <0x0 0x30000>;
84 read-only;
85 };
86
87 partition@30000 {
88 label = "u-boot-env";
89 reg = <0x30000 0x10000>;
90 read-only;
91 };
92
93 factory: partition@40000 {
94 label = "factory";
95 reg = <0x40000 0x10000>;
96 read-only;
97
98 nvmem-layout {
99 compatible = "fixed-layout";
100 #address-cells = <1>;
101 #size-cells = <1>;
102
103 eeprom_factory_0: eeprom@0 {
104 reg = <0x0 0x200>;
105 };
106
107 macaddr_factory_4: macaddr@4 {
108 reg = <0x4 0x6>;
109 };
110 };
111 };
112
113 partition@50000 {
114 compatible = "denx,uimage";
115 label = "firmware";
116 reg = <0x50000 0xfb0000>;
117 };
118 };
119 };
120 };
121
122 &ethernet {
123 nvmem-cells = <&macaddr_factory_4>;
124 nvmem-cell-names = "mac-address";
125
126 mediatek,portmap = "llllw";
127 };
128
129 &wmac {
130 nvmem-cells = <&eeprom_factory_0>;
131 nvmem-cell-names = "eeprom";
132 };
133
134 &state_default {
135 default {
136 groups = "ephy", "wled", "i2c", "wdt", "pa", "spi refclk";
137 function = "gpio";
138 };
139 };