ramips: rtxxxx: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / rt3662_dlink_dir-645.dts
1 #include "rt3883.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "dlink,dir-645", "ralink,rt3662-soc", "ralink,rt3883-soc";
8 model = "D-Link DIR-645";
9
10 aliases {
11 led-boot = &led_wps;
12 led-failsafe = &led_wps;
13 led-running = &led_wps;
14 led-upgrade = &led_wps;
15 };
16
17 rtl8367b {
18 compatible = "realtek,rtl8367b";
19 gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
20 gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
21 realtek,extif1 = <1 0 1 1 1 1 1 1 2>;
22 };
23
24 keys {
25 compatible = "gpio-keys-polled";
26 poll-interval = <100>;
27
28 reset {
29 label = "reset";
30 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RESTART>;
32 };
33
34 wps {
35 label = "wps";
36 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
37 linux,code = <KEY_WPS_BUTTON>;
38 };
39 };
40
41 leds {
42 compatible = "gpio-leds";
43
44 inet {
45 label = "green:inet";
46 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
47 };
48
49 led_wps: wps {
50 label = "green:wps";
51 gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
52 };
53 };
54
55 gpio_export {
56 compatible = "gpio-export";
57 #size-cells = <0>;
58
59 usb {
60 gpio-export,name = "usb";
61 gpio-export,output = <1>;
62 gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
63 };
64 };
65 };
66
67 &gpio1 {
68 status = "okay";
69 };
70
71 &spi0 {
72 status = "okay";
73
74 flash@0 {
75 compatible = "jedec,spi-nor";
76 reg = <0>;
77 spi-max-frequency = <25000000>;
78
79 partitions {
80 compatible = "fixed-partitions";
81 #address-cells = <1>;
82 #size-cells = <1>;
83
84 partition@0 {
85 label = "uboot";
86 reg = <0x0 0x30000>;
87 read-only;
88 };
89
90 partition@30000 {
91 label = "uboot-env";
92 reg = <0x30000 0x4000>;
93 read-only;
94 };
95
96 factory: partition@34000 {
97 label = "factory";
98 reg = <0x34000 0x4000>;
99 read-only;
100
101 nvmem-layout {
102 compatible = "fixed-layout";
103 #address-cells = <1>;
104 #size-cells = <1>;
105
106 eeprom_factory_0: eeprom@0 {
107 reg = <0x0 0x200>;
108 };
109
110 macaddr_factory_4: macaddr@4 {
111 reg = <0x4 0x6>;
112 };
113 };
114 };
115
116 partition@38000 {
117 label = "nvram";
118 reg = <0x38000 0x8000>;
119 read-only;
120 };
121
122 partition@40000 {
123 label = "devdata";
124 reg = <0x40000 0x10000>;
125 };
126
127 partition@50000 {
128 compatible = "seama";
129 label = "firmware";
130 reg = <0x50000 0x7b0000>;
131 };
132 };
133 };
134 };
135
136 &state_default {
137 gpio {
138 groups = "i2c", "jtag", "uartf";
139 function = "gpio";
140 };
141 };
142
143 &ethernet {
144 nvmem-cells = <&macaddr_factory_4>;
145 nvmem-cell-names = "mac-address";
146
147 port@0 {
148 mediatek,fixed-link = <1000 1 1 0>;
149 };
150 };
151
152 &wmac {
153 ralink,5ghz = <0>;
154 nvmem-cells = <&eeprom_factory_0>;
155 nvmem-cell-names = "eeprom";
156 };
157
158 &ehci {
159 status = "okay";
160 };
161
162 &ohci {
163 status = "okay";
164 };