ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/staging/wigyori.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 compatible = "nvmem-cells";
98 label = "factory";
99 reg = <0x40000 0x10000>;
100 #address-cells = <1>;
101 #size-cells = <1>;
102 read-only;
103
104 eeprom_factory_0: eeprom@0 {
105 reg = <0x0 0x200>;
106 };
107
108 macaddr_factory_4: macaddr@4 {
109 reg = <0x4 0x6>;
110 };
111 };
112
113 partition@50000 {
114 compatible = "denx,uimage";
115 label = "firmware";
116 reg = <0x50000 0x7b0000>;
117 };
118 };
119 };
120 };
121
122 &state_default {
123 gpio {
124 groups = "i2c", "jtag", "uartf";
125 function = "gpio";
126 };
127 };
128
129 &ethernet {
130 nvmem-cells = <&macaddr_factory_4>;
131 nvmem-cell-names = "mac-address";
132 };
133
134 &esw {
135 mediatek,portmap = <0x2f>;
136 mediatek,led_polarity = <0x17>;
137 };
138
139 &wmac {
140 nvmem-cells = <&eeprom_factory_0>;
141 nvmem-cell-names = "eeprom";
142 };