ramips: rename mtd partition of ipTIME NAND devices
[openwrt/openwrt.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 #include <dt-bindings/leds/common.h>
8
9 / {
10 aliases {
11 label-mac-device = &gmac0;
12
13 led-boot = &led_status_red;
14 led-failsafe = &led_status_green;
15 led-running = &led_status_green;
16 led-upgrade = &led_status_red;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 reset {
23 label = "reset";
24 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_RESTART>;
26 debounce-interval = <60>;
27 };
28
29 wps {
30 label = "wps";
31 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_WPS_BUTTON>;
33 };
34 };
35
36 leds {
37 compatible = "gpio-leds";
38
39 led_status_red: status_red {
40 function = LED_FUNCTION_STATUS;
41 color = <LED_COLOR_ID_RED>;
42 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
43 };
44
45 led_status_green: status_green {
46 function = LED_FUNCTION_STATUS;
47 color = <LED_COLOR_ID_GREEN>;
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 partition@40000 {
99 label = "factory";
100 reg = <0x40000 0x10000>;
101 read-only;
102
103 nvmem-layout {
104 compatible = "fixed-layout";
105 #address-cells = <1>;
106 #size-cells = <1>;
107
108 eeprom_factory_0: eeprom@0 {
109 reg = <0x0 0x4da8>;
110 };
111
112 macaddr_factory_e000: macaddr@e000 {
113 reg = <0xe000 0x6>;
114 };
115 };
116 };
117
118 partition@50000 {
119 compatible = "denx,uimage";
120 label = "firmware";
121 reg = <0x50000 0xfb0000>;
122 };
123 };
124 };
125 };
126
127 &pcie {
128 status = "okay";
129 };
130
131 &pcie0 {
132 wifi@0,0 {
133 compatible = "mediatek,mt76";
134 reg = <0x0000 0 0 0 0>;
135 nvmem-cells = <&eeprom_factory_0>;
136 nvmem-cell-names = "eeprom";
137 /* The correct MAC addresses are set in 10_fix_wifi_mac. */
138 };
139 };
140
141 &gmac0 {
142 nvmem-cells = <&macaddr_factory_e000>;
143 nvmem-cell-names = "mac-address";
144 };
145
146 &switch0 {
147 ports {
148 port@0 {
149 status = "okay";
150 label = "lan";
151 };
152 };
153 };
154
155 &ethernet {
156 pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
157 };
158
159 &state_default {
160 gpio {
161 groups = "uart3", "jtag", "wdt";
162 function = "gpio";
163 };
164 };