ramips: rtxxxx: convert to nvmem-layout
[openwrt/staging/hauke.git] / target / linux / ramips / dts / rt5350_dlink_dir-320-b1.dts
1 #include "rt5350.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "dlink,dir-320-b1", "ralink,rt5350-soc";
8 model = "D-Link DIR-320 B1";
9
10 aliases {
11 led-boot = &led_status;
12 led-failsafe = &led_status;
13 led-running = &led_status;
14 led-upgrade = &led_status;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 led_status: status {
21 label = "green:status";
22 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
23 };
24
25 usb {
26 label = "green:usb";
27 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
28 };
29
30 wps {
31 label = "green:wps";
32 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys-polled";
38 poll-interval = <20>;
39
40 reset {
41 label = "reset";
42 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_RESTART>;
44 };
45
46 wps {
47 label = "wps";
48 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
49 linux,code = <KEY_WPS_BUTTON>;
50 };
51 };
52
53 gpio_export {
54 compatible = "gpio-export";
55 #size-cells = <0>;
56
57 usb {
58 gpio-export,name = "usb";
59 gpio-export,output = <1>;
60 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
61 };
62
63 root_hub {
64 gpio-export,name = "root_hub";
65 gpio-export,output = <1>;
66 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
67 };
68 };
69 };
70
71 &spi0 {
72 status = "okay";
73
74 flash@0 {
75 compatible = "jedec,spi-nor";
76 reg = <0>;
77 spi-max-frequency = <10000000>;
78
79 partitions {
80 compatible = "fixed-partitions";
81 #address-cells = <1>;
82 #size-cells = <1>;
83
84 partition@0 {
85 label = "u-boot";
86 reg = <0x0 0x30000>;
87 read-only;
88 };
89
90 partition@30000 {
91 label = "u-boot-env";
92 reg = <0x30000 0x10000>;
93 read-only;
94 };
95
96 factory: partition@40000 {
97 label = "factory";
98 reg = <0x40000 0x10000>;
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@50000 {
117 compatible = "denx,uimage";
118 label = "firmware";
119 reg = <0x50000 0x7b0000>;
120 };
121 };
122 };
123 };
124
125 &state_default {
126 gpio {
127 groups = "i2c", "jtag", "uartf";
128 function = "gpio";
129 };
130 };
131
132 &ethernet {
133 nvmem-cells = <&macaddr_factory_4>;
134 nvmem-cell-names = "mac-address";
135 };
136
137 &esw {
138 mediatek,portmap = <0x2f>;
139 mediatek,led_polarity = <0x17>;
140 };
141
142 &wmac {
143 nvmem-cells = <&eeprom_factory_0>;
144 nvmem-cell-names = "eeprom";
145 };