ramips: rtxxxx: convert to nvmem-layout
[openwrt/staging/hauke.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 label = "factory";
126 reg = <0x40000 0x10000>;
127 read-only;
128
129 nvmem-layout {
130 compatible = "fixed-layout";
131 #address-cells = <1>;
132 #size-cells = <1>;
133
134 eeprom_factory_0: eeprom@0 {
135 reg = <0x0 0x200>;
136 };
137
138 eeprom_factory_8000: eeprom@8000 {
139 reg = <0x8000 0x200>;
140 };
141
142 macaddr_factory_8004: macaddr@8004 {
143 reg = <0x8004 0x6>;
144 };
145 };
146 };
147
148 partition@50000 {
149 compatible = "denx,uimage";
150 label = "firmware";
151 reg = <0x50000 0x713000>;
152 };
153
154 partition@763000 {
155 label = "manufacture";
156 reg = <0x763000 0x7D000>;
157 read-only;
158 };
159
160 partition@7E0000 {
161 label = "backup";
162 reg = <0x7E0000 0x10000>;
163 read-only;
164 };
165
166 partition@7F0000 {
167 label = "storage";
168 reg = <0x7F0000 0x10000>;
169 read-only;
170 };
171 };
172 };
173 };
174
175 &pci {
176 status = "okay";
177 };
178
179 &pci1 {
180 status = "okay";
181
182 wifi@0,0 {
183 compatible = "pci1814,3091";
184 reg = <0x10000 0 0 0 0>;
185 nvmem-cells = <&eeprom_factory_8000>;
186 nvmem-cell-names = "eeprom";
187 };
188 };
189
190 &wmac {
191 ralink,2ghz = <0>;
192 nvmem-cells = <&eeprom_factory_0>;
193 nvmem-cell-names = "eeprom";
194 };
195
196 &ehci {
197 status = "okay";
198 };
199
200 &ohci {
201 status = "okay";
202 };