rockchip: add Radxa CM3 IO board support
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7620n_elecom_wrh-300cr.dts
1 #include "mt7620n.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 compatible = "elecom,wrh-300cr", "ralink,mt7620n-soc";
9 model = "ELECOM WRH-300CR";
10
11 aliases {
12 led-boot = &led_wps;
13 led-failsafe = &led_wps;
14 led-running = &led_wps;
15 led-upgrade = &led_wps;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 led_wps: wps {
22 function = LED_FUNCTION_WPS;
23 color = <LED_COLOR_ID_GREEN>;
24 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
25 };
26
27 ethernet {
28 label = "green:ethernet";
29 gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
30 };
31
32 wlan {
33 function = LED_FUNCTION_WLAN;
34 color = <LED_COLOR_ID_GREEN>;
35 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
36 };
37 };
38
39 keys {
40 compatible = "gpio-keys";
41
42 reset {
43 label = "reset";
44 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_RESTART>;
46 };
47
48 wps {
49 label = "wps";
50 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_WPS_BUTTON>;
52 };
53 };
54 };
55
56 &gpio2 {
57 status = "okay";
58 };
59
60 &gpio3 {
61 status = "okay";
62 };
63
64 &spi0 {
65 status = "okay";
66
67 flash@0 {
68 compatible = "jedec,spi-nor";
69 reg = <0>;
70 spi-max-frequency = <10000000>;
71
72 partitions {
73 compatible = "fixed-partitions";
74 #address-cells = <1>;
75 #size-cells = <1>;
76
77 partition@0 {
78 label = "u-boot";
79 reg = <0x0 0x30000>;
80 read-only;
81 };
82
83 partition@30000 {
84 label = "u-boot-env";
85 reg = <0x30000 0x10000>;
86 };
87
88 factory: partition@40000 {
89 label = "factory";
90 reg = <0x40000 0x10000>;
91 read-only;
92
93 nvmem-layout {
94 compatible = "fixed-layout";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 eeprom_factory_0: eeprom@0 {
99 reg = <0x0 0x200>;
100 };
101
102 macaddr_factory_2e: macaddr@2e {
103 reg = <0x2e 0x6>;
104 };
105 };
106 };
107
108 partition@50000 {
109 label = "recover";
110 reg = <0x50000 0x1c0000>;
111 read-only;
112 };
113
114 partition@210000 {
115 compatible = "denx,uimage";
116 label = "firmware";
117 reg = <0x210000 0xdf0000>;
118 };
119 };
120 };
121 };
122
123 &ehci {
124 status = "okay";
125 };
126
127 &ohci {
128 status = "okay";
129 };
130
131 &ethernet {
132 nvmem-cells = <&macaddr_factory_2e>;
133 nvmem-cell-names = "mac-address";
134
135 mediatek,portmap = "llllw";
136 };
137
138 &wmac {
139 nvmem-cells = <&eeprom_factory_0>;
140 nvmem-cell-names = "eeprom";
141 };
142
143 &state_default {
144 default {
145 groups = "i2c", "ephy", "wled";
146 function = "gpio";
147 };
148 };