rockchip: add Radxa CM3 IO board support
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7628an_zbtlink_zbt-we1226.dts
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/input/input.h>
4 #include <dt-bindings/leds/common.h>
5 #include <dt-bindings/gpio/gpio.h>
6
7 / {
8 compatible = "zbtlink,zbt-we1226", "mediatek,mt7628an-soc";
9 model = "Zbtlink ZBT-WE1226";
10
11 aliases {
12 led-boot = &led_wlan;
13 led-failsafe = &led_wlan;
14 led-running = &led_wlan;
15 led-upgrade = &led_wlan;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
28 linux,code = <KEY_RESTART>;
29 };
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 wan {
36 function = LED_FUNCTION_WAN;
37 color = <LED_COLOR_ID_GREEN>;
38 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
39 };
40
41 lan1 {
42 label = "green:lan1";
43 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
44 };
45
46 lan2 {
47 label = "green:lan2";
48 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
49 };
50
51 led_wlan: wlan {
52 function = LED_FUNCTION_WLAN;
53 color = <LED_COLOR_ID_GREEN>;
54 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
55 };
56 };
57 };
58
59 &state_default {
60 gpio {
61 groups = "p0led_an", "p1led_an", "p4led_an", "wdt", "wled_an";
62 function = "gpio";
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 label = "factory";
93 reg = <0x40000 0x10000>;
94 read-only;
95
96 nvmem-layout {
97 compatible = "fixed-layout";
98 #address-cells = <1>;
99 #size-cells = <1>;
100
101 eeprom_factory_0: eeprom@0 {
102 reg = <0x0 0x400>;
103 };
104
105 macaddr_factory_2e: macaddr@2e {
106 reg = <0x2e 0x6>;
107 };
108 };
109 };
110
111 partition@50000 {
112 compatible = "denx,uimage";
113 label = "firmware";
114 reg = <0x50000 0x7b0000>;
115 };
116 };
117 };
118 };
119
120 &wmac {
121 status = "okay";
122
123 nvmem-cells = <&eeprom_factory_0>;
124 nvmem-cell-names = "eeprom";
125 };
126
127 &ethernet {
128 nvmem-cells = <&macaddr_factory_2e>;
129 nvmem-cell-names = "mac-address";
130 };
131
132 &esw {
133 mediatek,portmap = <0x2f>;
134 };