ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3883_sitecom_wlr-6000.dts
1 #include "rt3883.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "sitecom,wlr-6000", "ralink,rt3883-soc";
8 model = "Sitecom WLR-6000";
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 keys {
18 compatible = "gpio-keys-polled";
19 poll-interval = <20>;
20
21 reset {
22 label = "reset";
23 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
24 linux,code = <KEY_RESTART>;
25 };
26 };
27
28 leds {
29 compatible = "gpio-leds";
30
31 led_power: power {
32 label = "red:power";
33 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
34 };
35
36 ops {
37 label = "white:ops";
38 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
39 };
40 };
41
42 gpio_export {
43 compatible = "gpio-export";
44 #size-cells = <0>;
45
46 usb {
47 gpio-export,name = "usb";
48 gpio-export,output = <1>;
49 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
50 };
51 };
52 };
53
54 &gpio1 {
55 status = "okay";
56 };
57
58 &state_default {
59 gpio {
60 groups = "i2c", "jtag", "uartf";
61 function = "gpio";
62 };
63 };
64
65 &ethernet {
66 status = "okay";
67 nvmem-cells = <&macaddr_factory_8004>;
68 nvmem-cell-names = "mac-address";
69 mac-address-increment = <1>;
70
71 port@0 {
72 phy-handle = <&phy0>;
73 phy-mode = "rgmii";
74 };
75
76 mdio-bus {
77 status = "okay";
78
79 phy0: ethernet-phy@0 {
80 reg = <0>;
81 phy-mode = "rgmii";
82
83 qca,ar8327-initvals = <
84 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
85 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
86 0x10 0x40000000 /* Power-on Strapping: 176-pin interface configuration */
87 0x50 0xc437c437 /* LED Control Register 0 */
88 0x54 0xc337c337 /* LED Control Register 1 */
89 0x58 0x00000000 /* LED Control Register 2 */
90 0x5c 0x03ffff00 /* LED Control Register 3 */
91 0x7c 0x0000007e /* PORT0_STATUS */
92 0x94 0x0000007e /* PORT6 STATUS */
93 >;
94 };
95 };
96 };
97
98 &spi0 {
99 status = "okay";
100
101 flash@0 {
102 compatible = "jedec,spi-nor";
103 reg = <0>;
104 spi-max-frequency = <8600000>;
105 m25p,fast-read;
106
107 partitions {
108 compatible = "fixed-partitions";
109 #address-cells = <1>;
110 #size-cells = <1>;
111
112 partition@0 {
113 label = "u-boot";
114 reg = <0x0 0x30000>;
115 read-only;
116 };
117
118 partition@30000 {
119 label = "u-boot-env";
120 reg = <0x30000 0x10000>;
121 read-only;
122 };
123
124 factory: partition@40000 {
125 compatible = "nvmem-cells";
126 label = "factory";
127 reg = <0x40000 0x10000>;
128 #address-cells = <1>;
129 #size-cells = <1>;
130 read-only;
131
132 eeprom_factory_0: eeprom@0 {
133 reg = <0x0 0x200>;
134 };
135
136 eeprom_factory_8000: eeprom@8000 {
137 reg = <0x8000 0x200>;
138 };
139
140 macaddr_factory_8004: macaddr@8004 {
141 reg = <0x8004 0x6>;
142 };
143 };
144
145 partition@50000 {
146 compatible = "denx,uimage";
147 label = "firmware";
148 reg = <0x50000 0x713000>;
149 };
150
151 partition@763000 {
152 label = "manufacture";
153 reg = <0x763000 0x7D000>;
154 read-only;
155 };
156
157 partition@7E0000 {
158 label = "backup";
159 reg = <0x7E0000 0x10000>;
160 read-only;
161 };
162
163 partition@7F0000 {
164 label = "storage";
165 reg = <0x7F0000 0x10000>;
166 read-only;
167 };
168 };
169 };
170 };
171
172 &pci {
173 status = "okay";
174 };
175
176 &pci1 {
177 status = "okay";
178
179 wifi@0,0 {
180 compatible = "pci1814,3091";
181 reg = <0x10000 0 0 0 0>;
182 nvmem-cells = <&eeprom_factory_8000>;
183 nvmem-cell-names = "eeprom";
184 };
185 };
186
187 &wmac {
188 status = "okay";
189 ralink,2ghz = <0>;
190 nvmem-cells = <&eeprom_factory_0>;
191 nvmem-cell-names = "eeprom";
192 };
193
194 &ehci {
195 status = "okay";
196 };
197
198 &ohci {
199 status = "okay";
200 };