ramips: convert rt2x00 EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3352_dlink_dir-615-h1.dts
1 #include "rt3352.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "dlink,dir-615-h1", "ralink,rt3352-soc";
8 model = "D-Link DIR-615 H1";
9
10 aliases {
11 led-boot = &led_status_green;
12 led-failsafe = &led_status_green;
13 led-running = &led_status_green;
14 led-upgrade = &led_status_green;
15 label-mac-device = &wmac;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 status {
22 label = "amber:status";
23 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
24 };
25
26 led_status_green: status2 {
27 label = "green:status";
28 gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
29 default-state = "on";
30 };
31
32 wan {
33 label = "amber:wan";
34 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
35 };
36
37 wan2 {
38 label = "green:wan";
39 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
40 };
41
42 wps {
43 label = "blue:wps";
44 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
45 };
46 };
47
48 keys {
49 compatible = "gpio-keys-polled";
50 poll-interval = <20>;
51
52 reset {
53 label = "reset";
54 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
55 linux,code = <KEY_RESTART>;
56 };
57
58 wps {
59 label = "wps";
60 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
61 linux,code = <KEY_WPS_BUTTON>;
62 };
63 };
64 };
65
66 &spi0 {
67 status = "okay";
68
69 flash@0 {
70 compatible = "jedec,spi-nor";
71 reg = <0>;
72 spi-max-frequency = <10000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "u-boot";
81 reg = <0x0 0x30000>;
82 read-only;
83 };
84
85 partition@30000 {
86 label = "u-boot-env";
87 reg = <0x30000 0x10000>;
88 read-only;
89 };
90
91 factory: partition@40000 {
92 compatible = "nvmem-cells";
93 label = "factory";
94 reg = <0x40000 0x10000>;
95 #address-cells = <1>;
96 #size-cells = <1>;
97 read-only;
98
99 eeprom_factory_0: eeprom@0 {
100 reg = <0x0 0x200>;
101 };
102
103 macaddr_factory_28: macaddr@28 {
104 reg = <0x28 0x6>;
105 };
106 };
107
108 partition@50000 {
109 compatible = "denx,uimage";
110 label = "firmware";
111 reg = <0x50000 0x3b0000>;
112 };
113 };
114 };
115 };
116
117 &state_default {
118 gpio {
119 groups = "i2c", "jtag", "uartf";
120 function = "gpio";
121 };
122 };
123
124 &ethernet {
125 nvmem-cells = <&macaddr_factory_28>;
126 nvmem-cell-names = "mac-address";
127 pinctrl-names = "default";
128 pinctrl-0 = <&rgmii_pins &mdio_pins>;
129 };
130
131 &esw {
132 mediatek,portmap = <0x2f>;
133 };
134
135 &wmac {
136 nvmem-cells = <&eeprom_factory_0>;
137 nvmem-cell-names = "eeprom";
138 };