cdf71017cea6303f313b6310d7624b5bd98c12db
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / mt7621_jcg_jhr-ac876m.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 = "jcg,jhr-ac876m", "mediatek,mt7621-soc";
11 model = "JCG JHR-AC876M";
12
13 aliases {
14 led-boot = &led_wps;
15 led-failsafe = &led_wps;
16 led-running = &led_wps;
17 led-upgrade = &led_wps;
18 label-mac-device = &wan;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 usb3 {
25 label = "jhr-ac876m:blue:usb3";
26 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
27 trigger-sources = <&xhci_ehci_port1>;
28 linux,default-trigger = "usbport";
29 };
30
31 usb2 {
32 label = "jhr-ac876m:blue:usb2";
33 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
34 trigger-sources = <&ehci_port2>;
35 linux,default-trigger = "usbport";
36 };
37
38 led_wps: wps {
39 label = "jhr-ac876m:blue:wps";
40 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 reset {
48 label = "reset";
49 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 };
52
53 wps {
54 label = "wps";
55 gpios = <&gpio 18 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 = <80000000>;
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 = "u-boot";
77 reg = <0x0 0x30000>;
78 read-only;
79 };
80
81 partition@30000 {
82 label = "u-boot-env";
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 0xfb0000>;
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 0x0>;
111 ieee80211-freq-limit = <2400000 2500000>;
112
113 led {
114 led-active-low;
115 };
116 };
117 };
118
119 &pcie1 {
120 wifi@0,0 {
121 compatible = "mediatek,mt76";
122 reg = <0x0000 0 0 0 0>;
123 mediatek,mtd-eeprom = <&factory 0x8000>;
124 ieee80211-freq-limit = <5000000 6000000>;
125
126 led {
127 led-active-low;
128 };
129 };
130 };
131
132 &gmac0 {
133 mtd-mac-address = <&factory 0xe000>;
134 };
135
136 &switch0 {
137 ports {
138 port@0 {
139 status = "okay";
140 label = "lan1";
141 };
142
143 port@1 {
144 status = "okay";
145 label = "lan2";
146 };
147
148 port@2 {
149 status = "okay";
150 label = "lan3";
151 };
152
153 port@3 {
154 status = "okay";
155 label = "lan4";
156 };
157 wan: port@4 {
158 status = "okay";
159 label = "wan";
160 mtd-mac-address = <&factory 0x4>;
161 };
162 };
163 };
164
165 &state_default {
166 gpio {
167 groups = "i2c", "uart3", "jtag", "wdt";
168 function = "gpio";
169 };
170 };