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