ramips: correct WizFi630S pin mappings
[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 5 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 41 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_WPS_BUTTON>;
66 };
67
68 scm1 {
69 label = "SCM1";
70 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
71 linux,code = <BTN_1>;
72 linux,input-type = <EV_SW>;
73 };
74
75 scm2 {
76 label = "SCM2";
77 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
78 linux,code = <BTN_2>;
79 linux,input-type = <EV_SW>;
80 };
81 };
82 };
83
84 &state_default {
85 gpio {
86 groups = "gpio", "i2s", "i2c", "wdt", "refclk", "p1led_an", "p2led_an";
87 function = "gpio";
88 };
89 };
90
91 &spi0 {
92 status = "okay";
93
94 pinctrl-names = "default";
95 pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
96
97 flash@0 {
98 compatible = "jedec,spi-nor";
99 reg = <0>;
100 spi-max-frequency = <40000000>;
101 m25p,chunked-io = <31>;
102
103 partitions {
104 compatible = "fixed-partitions";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 partition@0 {
109 label = "u-boot";
110 reg = <0x0 0x30000>;
111 read-only;
112 };
113
114 partition@30000 {
115 label = "u-boot-env";
116 reg = <0x30000 0x10000>;
117 read-only;
118 };
119
120 factory: partition@40000 {
121 label = "factory";
122 reg = <0x40000 0x10000>;
123 read-only;
124 };
125
126 partition@50000 {
127 compatible = "denx,uimage";
128 label = "firmware";
129 reg = <0x50000 0x1fb0000>;
130 };
131 };
132 };
133 };
134
135 &uart1 {
136 status = "okay";
137 };
138
139 &uart2 {
140 status = "okay";
141 };
142
143 &pwm {
144 status = "okay";
145 };
146
147 &ethernet {
148 mtd-mac-address = <&factory 0x28>;
149 };
150
151 &esw {
152 mediatek,portmap = <0x3e>;
153 mediatek,portdisable = <0x26>;
154 };
155
156 &sdhci {
157 status = "okay";
158 mediatek,cd-high;
159 };
160
161 &wmac {
162 status = "okay";
163 };