e3266ebbcb3b05c5867b49c830ec9a2ce5735121
[openwrt/openwrt.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 };
19
20 chosen {
21 bootargs = "console=ttyS0,57600";
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 usb3 {
28 label = "jhr-ac876m:blue:usb3";
29 gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
30 trigger-sources = <&xhci_ehci_port1>;
31 linux,default-trigger = "usbport";
32 };
33
34 usb2 {
35 label = "jhr-ac876m:blue:usb2";
36 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
37 trigger-sources = <&ehci_port2>;
38 linux,default-trigger = "usbport";
39 };
40
41 led_wps: wps {
42 label = "jhr-ac876m:blue:wps";
43 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
44 };
45 };
46
47 keys {
48 compatible = "gpio-keys";
49
50 reset {
51 label = "reset";
52 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_RESTART>;
54 };
55
56 wps {
57 label = "wps";
58 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_WPS_BUTTON>;
60 };
61 };
62 };
63
64 &spi0 {
65 status = "okay";
66
67 flash@0 {
68 compatible = "jedec,spi-nor";
69 reg = <0>;
70 spi-max-frequency = <80000000>;
71 m25p,fast-read;
72
73 partitions {
74 compatible = "fixed-partitions";
75 #address-cells = <1>;
76 #size-cells = <1>;
77
78 partition@0 {
79 label = "u-boot";
80 reg = <0x0 0x30000>;
81 read-only;
82 };
83
84 partition@30000 {
85 label = "u-boot-env";
86 reg = <0x30000 0x10000>;
87 read-only;
88 };
89
90 factory: partition@40000 {
91 label = "factory";
92 reg = <0x40000 0x10000>;
93 read-only;
94 };
95
96 partition@50000 {
97 compatible = "denx,uimage";
98 label = "firmware";
99 reg = <0x50000 0xfb0000>;
100 };
101 };
102 };
103 };
104
105 &pcie {
106 status = "okay";
107 };
108
109 &pcie0 {
110 wifi@0,0 {
111 compatible = "mediatek,mt76";
112 reg = <0x0000 0 0 0 0>;
113 mediatek,mtd-eeprom = <&factory 0x0>;
114 ieee80211-freq-limit = <2400000 2500000>;
115
116 led {
117 led-active-low;
118 };
119 };
120 };
121
122 &pcie1 {
123 wifi@0,0 {
124 compatible = "mediatek,mt76";
125 reg = <0x0000 0 0 0 0>;
126 mediatek,mtd-eeprom = <&factory 0x8000>;
127 ieee80211-freq-limit = <5000000 6000000>;
128
129 led {
130 led-active-low;
131 };
132 };
133 };
134
135 &ethernet {
136 mtd-mac-address = <&factory 0xe000>;
137 };
138
139 &state_default {
140 gpio {
141 ralink,group = "i2c", "uart3", "jtag", "wdt";
142 ralink,function = "gpio";
143 };
144 };