8b3baa9f8473cbda0dccc2c655d18dfa9cf83486
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_cudy_x6.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
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_internet_blue;
11 led-failsafe = &led_internet_red;
12 led-running = &led_internet_blue;
13 led-upgrade = &led_internet_red;
14 label-mac-device = &gmac0;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 reset {
25 label = "reset";
26 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
27 linux,code = <KEY_RESTART>;
28 };
29
30 wps {
31 label = "wps";
32 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
33 linux,code = <KEY_WPS_BUTTON>;
34 };
35 };
36
37 leds {
38 compatible = "gpio-leds";
39
40 led_internet_blue: internet_blue {
41 label = "blue:internet";
42 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
43 };
44
45 led_internet_red: internet_red {
46 label = "red:internet";
47 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
48 };
49 };
50
51 };
52
53 &spi0 {
54 status = "okay";
55
56 flash@0 {
57 compatible = "jedec,spi-nor";
58 reg = <0>;
59 spi-max-frequency = <50000000>;
60
61 partitions: partitions {
62 compatible = "fixed-partitions";
63 #address-cells = <1>;
64 #size-cells = <1>;
65
66 partition@0 {
67 label = "u-boot";
68 reg = <0x0 0x30000>;
69 read-only;
70 };
71
72 partition@30000 {
73 label = "u-boot-env";
74 reg = <0x30000 0x10000>;
75 read-only;
76 };
77
78 factory: partition@40000 {
79 label = "factory";
80 reg = <0x40000 0x10000>;
81 read-only;
82
83 nvmem-layout {
84 compatible = "fixed-layout";
85 #address-cells = <1>;
86 #size-cells = <1>;
87
88 eeprom_factory_0: eeprom@0 {
89 reg = <0x0 0xe00>;
90 };
91 };
92 };
93
94 /* additional partitions in DTS */
95 };
96 };
97 };
98
99 &pcie {
100 status = "okay";
101 };
102
103 &pcie1 {
104 wifi:wifi@0,0 {
105 compatible = "mediatek,mt76";
106 reg = <0x0000 0 0 0 0>;
107 nvmem-cells = <&eeprom_factory_0>;
108 nvmem-cell-names = "eeprom";
109 mediatek,disable-radar-background;
110 };
111 };
112
113 &gmac1 {
114 status = "okay";
115 label = "wan";
116 phy-handle = <&ethphy4>;
117 };
118
119 &mdio {
120 ethphy4: ethernet-phy@4 {
121 reg = <4>;
122 };
123 };
124
125 &switch0 {
126 ports {
127 port@0 {
128 status = "okay";
129 label = "lan1";
130 };
131
132 port@1 {
133 status = "okay";
134 label = "lan2";
135 };
136
137 port@2 {
138 status = "okay";
139 label = "lan3";
140 };
141
142 port@3 {
143 status = "okay";
144 label = "lan4";
145 };
146 };
147 };
148
149 &state_default {
150 gpio {
151 groups = "uart3", "jtag";
152 function = "gpio";
153 };
154 };