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