rockchip: add Radxa CM3 IO board support
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_iptime_ax2004m.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "iptime,ax2004m", "mediatek,mt7621-soc";
11 model = "ipTIME AX2004M";
12
13 aliases {
14 led-boot = &led_cpu;
15 led-failsafe = &led_cpu;
16 led-running = &led_cpu;
17 led-upgrade = &led_cpu;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_cpu: cpu {
28 function = LED_FUNCTION_CPU;
29 color = <LED_COLOR_ID_AMBER>;
30 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
31 };
32
33 wlan2g {
34 label = "amber:wlan2g";
35 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
36 linux,default-trigger = "phy0radio";
37 };
38
39 wlan5g {
40 label = "amber:wlan5g";
41 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
42 linux,default-trigger = "phy1radio";
43 };
44 };
45
46 keys {
47 compatible = "gpio-keys";
48
49 reset {
50 label = "reset";
51 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_RESTART>;
53 };
54 };
55 };
56
57 &nand {
58 status = "okay";
59
60 partitions {
61 compatible = "fixed-partitions";
62 #address-cells = <1>;
63 #size-cells = <1>;
64
65 partition@0 {
66 label = "u-boot";
67 reg = <0x0 0x80000>;
68 read-only;
69 };
70
71 partition@80000 {
72 label = "config";
73 reg = <0x80000 0x80000>;
74 read-only;
75 };
76
77 factory: partition@100000 {
78 label = "factory";
79 reg = <0x100000 0x80000>;
80 read-only;
81
82 nvmem-layout {
83 compatible = "fixed-layout";
84 #address-cells = <1>;
85 #size-cells = <1>;
86
87 eeprom_factory_0: eeprom@0 {
88 reg = <0x0 0xe00>;
89 };
90
91 macaddr_factory_4: macaddr@4 {
92 compatible = "mac-base";
93 reg = <0x4 0x6>;
94 #nvmem-cell-cells = <1>;
95 };
96
97 precal_factory_e10: precal@e10 {
98 reg = <0xe10 0x19c10>;
99 };
100 };
101 };
102
103 partition@180000 {
104 label = "firmware";
105 reg = <0x180000 0x7680000>;
106
107 compatible = "fixed-partitions";
108 #address-cells = <1>;
109 #size-cells = <1>;
110
111 partition@0 {
112 label = "kernel";
113 reg = <0x0 0x400000>;
114 };
115
116 partition@400000 {
117 label = "ubi";
118 reg = <0x400000 0x7280000>;
119 };
120 };
121 };
122 };
123
124 &state_default {
125 gpio {
126 groups = "i2c", "jtag", "wdt";
127 function = "gpio";
128 };
129 };
130
131 &gmac0 {
132 nvmem-cells = <&macaddr_factory_4 3>;
133 nvmem-cell-names = "mac-address";
134 };
135
136 &gmac1 {
137 status = "okay";
138 label = "wan";
139 phy-handle = <&ethphy0>;
140
141 nvmem-cells = <&macaddr_factory_4 1>;
142 nvmem-cell-names = "mac-address";
143 };
144
145 &mdio {
146 ethphy0: ethernet-phy@0 {
147 reg = <0>;
148 };
149 };
150
151 &switch0 {
152 ports {
153 port@1 {
154 status = "okay";
155 label = "lan4";
156 };
157
158 port@2 {
159 status = "okay";
160 label = "lan3";
161 };
162
163 port@3 {
164 status = "okay";
165 label = "lan2";
166 };
167
168 port@4 {
169 status = "okay";
170 label = "lan1";
171 };
172 };
173 };
174
175 &pcie {
176 status = "okay";
177 };
178
179 &pcie1 {
180 wifi@0,0 {
181 compatible = "mediatek,mt76";
182 reg = <0x0000 0 0 0 0>;
183 nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>;
184 nvmem-cell-names = "eeprom", "precal";
185 };
186 };