41634c60028322d4c6f7c17b9874194904bdb47f
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_wiznet_wizfi630s.dts
1 //SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7628an.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "wiznet,wizfi630s", "mediatek,mt7628an-soc";
11 model = "WIZnet WizFi630S";
12
13 chosen {
14 bootargs = "console=ttyS1,115200";
15 };
16
17 aliases {
18 led-boot = &led_run;
19 led-failsafe = &led_run;
20 led-running = &led_run;
21 led-upgrade = &led_run;
22 serial0 = &uart1;
23 serial1 = &uartlite;
24 };
25
26 leds {
27 compatible = "gpio-leds";
28
29 led_run: run {
30 label = "wizfi630s:green:run";
31 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
32 };
33
34 ledwps {
35 label = "wizfi630s:green:wps";
36 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
37 };
38
39 leduart1 {
40 label = "wizfi630s:green:uart1";
41 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
42 };
43
44 leduart2 {
45 label = "wizfi630s:green:uart2";
46 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
47 };
48 };
49
50 keys {
51 compatible = "gpio-keys";
52
53 #address-cells = <1>;
54 #size-cells = <0>;
55
56 reset {
57 label = "reset";
58 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_RESTART>;
60 };
61
62 wps {
63 label = "wps";
64 gpios = <&gpio 32 GPIO_ACTIVE_HIGH>;
65 linux,code = <KEY_WPS_BUTTON>;
66 };
67
68 scm1 {
69 label = "SCM1";
70 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
71 linux,code = <BTN_1>;
72 };
73
74 scm2 {
75 label = "SCM2";
76 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
77 linux,code = <BTN_2>;
78 };
79 };
80 };
81
82 &state_default {
83 gpio {
84 groups = "gpio";
85 function = "gpio";
86 };
87
88 i2s {
89 groups = "i2s";
90 function = "gpio";
91 };
92
93 wdt {
94 groups = "wdt";
95 function = "gpio";
96 };
97
98 i2c {
99 groups = "i2c";
100 function = "gpio";
101 };
102
103 refclk {
104 groups = "refclk";
105 function = "gpio";
106 };
107 };
108
109 &spi0 {
110 status = "okay";
111
112 pinctrl-names = "default";
113 pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
114
115 flash@0 {
116 compatible = "jedec,spi-nor";
117 reg = <0>;
118 spi-max-frequency = <40000000>;
119 m25p,chunked-io = <31>;
120
121 partitions {
122 compatible = "fixed-partitions";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 partition@0 {
127 label = "u-boot";
128 reg = <0x0 0x30000>;
129 read-only;
130 };
131
132 partition@30000 {
133 label = "u-boot-env";
134 reg = <0x30000 0x10000>;
135 read-only;
136 };
137
138 factory: partition@40000 {
139 label = "factory";
140 reg = <0x40000 0x10000>;
141 read-only;
142 };
143
144 partition@50000 {
145 compatible = "denx,uimage";
146 label = "firmware";
147 reg = <0x50000 0x1fb0000>;
148 };
149 };
150 };
151 };
152
153 &i2c {
154 status = "okay";
155 };
156
157 &uart1 {
158 status = "okay";
159 };
160
161 &pwm {
162 status = "okay";
163 };
164
165 &ethernet {
166 mtd-mac-address = <&factory 0x28>;
167 };
168
169 &esw {
170 mediatek,portmap = <0x3e>;
171 mediatek,portdisable = <0x26>;
172 };
173
174 &sdhci {
175 status = "okay";
176 mediatek,cd-high;
177 };
178
179 &wmac {
180 status = "okay";
181 };