ramips: mt7621-wdt: use phandle to access system controller registers
[openwrt/openwrt.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
84 /* additional partitions in DTS */
85 };
86 };
87 };
88
89 &pcie {
90 status = "okay";
91 };
92
93 &pcie1 {
94 wifi:wifi@0,0 {
95 compatible = "mediatek,mt76";
96 reg = <0x0000 0 0 0 0>;
97 mediatek,mtd-eeprom = <&factory 0x0000>;
98 mediatek,disable-radar-background;
99 };
100 };
101
102 &gmac1 {
103 status = "okay";
104 label = "wan";
105 phy-handle = <&ethphy4>;
106 };
107
108 &mdio {
109 ethphy4: ethernet-phy@4 {
110 reg = <4>;
111 };
112 };
113
114 &switch0 {
115 ports {
116 port@0 {
117 status = "okay";
118 label = "lan1";
119 };
120
121 port@1 {
122 status = "okay";
123 label = "lan2";
124 };
125
126 port@2 {
127 status = "okay";
128 label = "lan3";
129 };
130
131 port@3 {
132 status = "okay";
133 label = "lan4";
134 };
135 };
136 };
137
138 &state_default {
139 gpio {
140 groups = "uart3", "jtag";
141 function = "gpio";
142 };
143 };