52e22541faf3419eab0546f3eec35dff560d52bf
[openwrt/staging/hauke.git] / target / linux / mediatek / dts / mt7629-tplink_eap225-v5.dts
1 // SPDX-License-Identifier: GPL-2.0
2
3 /dts-v1/;
4 #include <dt-bindings/input/input.h>
5 #include "mt7629.dtsi"
6
7 / {
8 model = "TP-Link EAP225 v5";
9 compatible = "tplink,eap225-v5", "mediatek,mt7629";
10
11 aliases {
12 led-boot = &led_status_green;
13 led-failsafe = &led_status_amber;
14 led-running = &led_status_green;
15 led-upgrade = &led_status_amber;
16 serial0 = &uart0;
17 };
18
19 chosen {
20 stdout-path = "serial0:115200n8";
21 bootargs-override = "console=ttyS0,115200n8";
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 gpios = <&pio 21 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32 };
33
34 leds {
35 compatible = "gpio-leds";
36
37 led_status_green: status_green {
38 label = "green:status";
39 gpios = <&pio 55 GPIO_ACTIVE_HIGH>;
40 default-state = "on";
41 };
42
43 led_status_amber: status_amber {
44 label = "amber:status";
45 gpios = <&pio 56 GPIO_ACTIVE_HIGH>;
46 };
47 };
48 };
49
50 &eth {
51 pinctrl-names = "default";
52 pinctrl-0 = <&eth_pins>;
53 pinctrl-1 = <&ephy_leds_pins>;
54 status = "okay";
55
56 mac@1 {
57 compatible = "mediatek,eth-mac";
58 reg = <1>;
59 phy-mode = "gmii";
60 phy-handle = <&phy0>;
61 nvmem-cells = <&macaddr_factory_8>;
62 nvmem-cell-names = "mac-address";
63 };
64
65 mdio-bus {
66 #address-cells = <1>;
67 #size-cells = <0>;
68
69 phy0: ethernet-phy@0 {
70 reg = <0>;
71 };
72 };
73 };
74
75 &qspi {
76 status = "okay";
77
78 pinctrl-names = "default";
79 pinctrl-0 = <&qspi_pins>;
80
81 flash@0 {
82 compatible = "jedec,spi-nor";
83 reg = <0>;
84
85 partitions {
86 compatible = "fixed-partitions";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 partition@0 {
91 label = "Bootloader";
92 reg = <0x0 0x00080000>;
93 read-only;
94 };
95
96 partition@80000 {
97 label = "Partition";
98 reg = <0x00080000 0x00010000>;
99 read-only;
100 };
101
102 partition@90000 {
103 label = "Factory";
104 reg = <0x00090000 0x00010000>;
105 compatible = "nvmem-cells";
106 read-only;
107
108 macaddr_factory_8: macaddr@8 {
109 reg = <0x8 0x6>;
110 };
111 };
112
113 partition@A0000 {
114 label = "Radio";
115 reg = <0x000A0000 0x00010000>;
116 read-only;
117 };
118
119 partition@B0000 {
120 label = "Extra";
121 reg = <0x000B0000 0x00010000>;
122 read-only;
123 };
124
125 /* Vendor layout: kernel (0x000C0000 0x001A0000) - rootfs (0x00260000 0x00BE0000) */
126 /* OpenWrt flash layout: combine kernel and rootfs from OEM layout */
127 partition@C0000 {
128 label = "firmware";
129 reg = <0x000C0000 0x00D80000>;
130 };
131
132 partition@E40000 {
133 label = "Config";
134 reg = <0x00E40000 0x0001B0000>;
135 read-only;
136 };
137 };
138 };
139 };
140
141 &pio {
142 eth_pins: eth-pins {
143 mux {
144 function = "eth";
145 groups = "mdc_mdio";
146 };
147 };
148
149 ephy_leds_pins: ephy-leds-pins {
150 mux {
151 function = "led";
152 groups = "ephy_leds";
153 };
154 };
155
156 qspi_pins: qspi-pins {
157 mux {
158 function = "flash";
159 groups = "spi_nor";
160 };
161 };
162
163 uart0_pins: uart0-pins {
164 mux {
165 function = "uart";
166 groups = "uart0_txd_rxd" ;
167 };
168 };
169
170 watchdog_pins: watchdog-pins {
171 mux {
172 function = "watchdog";
173 groups = "watchdog";
174 };
175 };
176 };
177
178 &uart0 {
179 pinctrl-names = "default";
180 pinctrl-0 = <&uart0_pins>;
181 status = "okay";
182 };
183
184 &watchdog {
185 pinctrl-names = "default";
186 pinctrl-0 = <&watchdog_pins>;
187 status = "okay";
188 };