ramips: mt7621: create DTSI for ELECOM WRC GS devices with 2 PCI
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_elecom_wrc-gs.dtsi
1 // SPDX-License-Identifier: GPL-2.0-only
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 aliases {
10 led-boot = &led_power_green;
11 led-failsafe = &led_power_green;
12 led-running = &led_power_green;
13 led-upgrade = &led_power_green;
14 label-mac-device = &wan;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 led_power_green: power_green {
21 label = "green:power";
22 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
23 };
24
25 power_blue {
26 label = "blue:power";
27 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
28 };
29
30 wps {
31 label = "red:wps";
32 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
33 };
34
35 power_red {
36 label = "red:power";
37 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
38 };
39 };
40
41 keys {
42 compatible = "gpio-keys";
43
44 reset {
45 label = "reset";
46 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
47 linux,code = <KEY_RESTART>;
48 };
49
50 wps {
51 label = "wps";
52 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_WPS_BUTTON>;
54 };
55
56 client {
57 label = "client";
58 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
59 linux,code = <BTN_0>;
60 linux,input-type = <EV_SW>;
61 };
62
63 ap {
64 label = "ap";
65 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
66 linux,code = <BTN_0>;
67 linux,input-type = <EV_SW>;
68 };
69
70 extender {
71 label = "extender";
72 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
73 linux,code = <BTN_0>;
74 linux,input-type = <EV_SW>;
75 };
76
77 router {
78 label = "router";
79 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
80 linux,code = <BTN_0>;
81 linux,input-type = <EV_SW>;
82 };
83 };
84 };
85
86 &switch0 {
87 ports {
88 wan: port@0 {
89 status = "okay";
90 label = "wan";
91 };
92
93 port@1 {
94 status = "okay";
95 label = "lan4";
96 };
97
98 port@2 {
99 status = "okay";
100 label = "lan3";
101 };
102
103 port@3 {
104 status = "okay";
105 label = "lan2";
106 };
107
108 port@4 {
109 status = "okay";
110 label = "lan1";
111 };
112 };
113 };
114
115 &spi0 {
116 status = "okay";
117
118 flash@0 {
119 compatible = "jedec,spi-nor";
120 reg = <0>;
121 spi-max-frequency = <40000000>;
122
123 partitions: partitions {
124 compatible = "fixed-partitions";
125 #address-cells = <1>;
126 #size-cells = <1>;
127
128 partition@0 {
129 label = "u-boot";
130 reg = <0x0 0x30000>;
131 read-only;
132 };
133
134 partition@30000 {
135 label = "u-boot-env";
136 reg = <0x30000 0x10000>;
137 read-only;
138 };
139
140 factory: partition@40000 {
141 label = "factory";
142 reg = <0x40000 0x10000>;
143 read-only;
144 };
145 };
146 };
147 };
148
149 &pcie {
150 status = "okay";
151 };
152
153 &xhci {
154 status = "disabled";
155 };