ramips: mt7621-wdt: use phandle to access system controller registers
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_dlink_dap-1620-b1.dts
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 compatible = "dlink,dap-1620-b1", "mediatek,mt7621-soc";
10 model = "D-Link DAP-1620 B1";
11
12 aliases {
13 label-mac-device = &gmac0;
14
15 led-boot = &led_status_red;
16 led-failsafe = &led_status_green;
17 led-running = &led_status_green;
18 led-upgrade = &led_status_red;
19 };
20
21 keys {
22 compatible = "gpio-keys";
23
24 reset {
25 label = "reset";
26 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
27 linux,code = <KEY_RESTART>;
28 debounce-interval = <60>;
29 };
30
31 wps {
32 label = "wps";
33 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_WPS_BUTTON>;
35 };
36 };
37
38 leds {
39 compatible = "gpio-leds";
40
41 led_status_red: status_red {
42 label = "red:status";
43 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
44 };
45
46 led_status_green: status_green {
47 label = "green:status";
48 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
49 };
50
51 rssi_low_red {
52 label = "red:rssilow";
53 gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
54 };
55
56 rssi_low_green {
57 label = "green:rssilow";
58 gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
59 };
60
61 rssi_med_green {
62 label = "green:rssimed";
63 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
64 };
65
66 rssi_high_green {
67 label = "green:rssihigh";
68 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
69 };
70 };
71 };
72
73 &spi0 {
74 status = "okay";
75
76 flash@0 {
77 compatible = "jedec,spi-nor";
78 reg = <0>;
79 spi-max-frequency = <50000000>;
80
81 partitions {
82 compatible = "fixed-partitions";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 partition@0 {
87 label = "u-boot";
88 reg = <0x0 0x30000>;
89 read-only;
90 };
91
92 partition@30000 {
93 label = "u-boot-env";
94 reg = <0x30000 0x10000>;
95 read-only;
96 };
97
98 factory: partition@40000 {
99 label = "factory";
100 reg = <0x40000 0x10000>;
101 read-only;
102
103 compatible = "nvmem-cells";
104 #address-cells = <1>;
105 #size-cells = <1>;
106
107 macaddr_factory_e000: macaddr@e000 {
108 reg = <0xe000 0x6>;
109 };
110 };
111
112 partition@50000 {
113 compatible = "denx,uimage";
114 label = "firmware";
115 reg = <0x50000 0xfb0000>;
116 };
117 };
118 };
119 };
120
121 &pcie {
122 status = "okay";
123 };
124
125 &pcie0 {
126 wifi@0,0 {
127 compatible = "mediatek,mt76";
128 reg = <0x0000 0 0 0 0>;
129 mediatek,mtd-eeprom = <&factory 0x0>;
130 /* The correct MAC addresses are set in 10_fix_wifi_mac. */
131 };
132 };
133
134 &gmac0 {
135 nvmem-cells = <&macaddr_factory_e000>;
136 nvmem-cell-names = "mac-address";
137 };
138
139 &switch0 {
140 ports {
141 port@0 {
142 status = "okay";
143 label = "lan";
144 };
145 };
146 };
147
148 &ethernet {
149 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
150 };
151
152 &state_default {
153 gpio {
154 groups = "uart3", "jtag", "wdt";
155 function = "gpio";
156 };
157 };
158