2897f42f1dc6c3a41f516706f163f3ae30ea0c72
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / mt7621_winstars_ws-wn583a6.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "winstars,ws-wn583a6", "mediatek,mt7621-soc";
11 model = "Winstars WS-WN583A6";
12
13 aliases {
14 led-boot = &led_status_red;
15 led-failsafe = &led_status_red;
16 led-running = &led_status_blue;
17 led-upgrade = &led_status_red;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 night_light_white {
24 label = "ws-wn583a6:white:night_light";
25 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
26 };
27
28 led_status_blue: status_blue {
29 label = "ws-wn583a6:blue:status";
30 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
31 };
32
33 status_amber {
34 label = "ws-wn583a6:amber:status";
35 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
36 };
37
38 led_status_red: status_red {
39 label = "ws-wn583a6:red:status";
40 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 reset {
48 label = "reset";
49 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 };
52
53 wps {
54 label = "wps";
55 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
56 linux,code = <KEY_WPS_BUTTON>;
57 };
58 };
59 };
60
61 &spi0 {
62 status = "okay";
63
64 flash@0 {
65 compatible = "jedec,spi-nor";
66 reg = <0>;
67 spi-max-frequency = <104000000>;
68 m25p,fast-read;
69
70 partitions {
71 compatible = "fixed-partitions";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 partition@0 {
76 label = "bootloader";
77 reg = <0x0 0x30000>;
78 read-only;
79 };
80
81 partition@30000 {
82 label = "config";
83 reg = <0x30000 0x10000>;
84 read-only;
85 };
86
87 factory: partition@40000 {
88 label = "factory";
89 reg = <0x40000 0x10000>;
90 read-only;
91 };
92
93 partition@50000 {
94 compatible = "denx,uimage";
95 label = "firmware";
96 reg = <0x50000 0x7b0000>;
97 };
98 };
99 };
100 };
101
102 &pcie {
103 status = "okay";
104 };
105
106 &pcie0 {
107 wifi@0,0 {
108 compatible = "mediatek,mt76";
109 reg = <0x0000 0 0 0 0>;
110 mediatek,mtd-eeprom = <&factory 0x0000>;
111 };
112 };
113
114 &pcie1 {
115 wifi@0,0 {
116 compatible = "mediatek,mt76";
117 reg = <0x0000 0 0 0 0>;
118 mediatek,mtd-eeprom = <&factory 0x8000>;
119 };
120 };
121
122 &gmac0 {
123 mtd-mac-address = <&factory 0xe000>;
124 };
125
126 &switch0 {
127 ports {
128 port@0 {
129 status = "okay";
130 label = "wan";
131 mtd-mac-address = <&factory 0xe006>;
132 };
133
134 port@1 {
135 status = "okay";
136 label = "lan";
137 };
138 };
139 };
140
141 &state_default {
142 gpio {
143 groups = "jtag", "wdt", "rgmii2";
144 function = "gpio";
145 };
146 };
147
148 &xhci {
149 status = "disabled";
150 };