ramips: mt7621: convert to nvmem-layout
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_h3c_tx180x.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 led-boot = &led_status_amber;
12 led-failsafe = &led_status_green;
13 led-running = &led_status_green;
14 led-upgrade = &led_status_amber;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200";
19 bootargs-override = "console=ttyS0,115200";
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
28 linux,code = <KEY_RESTART>;
29 };
30
31 wps {
32 label = "wps";
33 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_WPS_BUTTON>;
35 };
36 };
37
38 leds {
39 compatible = "gpio-leds";
40
41 led_status_amber: led-0 {
42 label = "amber:status";
43 color = <LED_COLOR_ID_AMBER>;
44 function = LED_FUNCTION_STATUS;
45 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
46 };
47
48 led_status_green: led-1 {
49 label = "green:status";
50 color = <LED_COLOR_ID_GREEN>;
51 function = LED_FUNCTION_STATUS;
52 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
53 };
54 };
55 };
56
57 &gmac1 {
58 status = "okay";
59 label = "wan";
60 phy-handle = <&ethphy4>;
61 };
62
63 &mdio {
64 ethphy4: ethernet-phy@4 {
65 reg = <4>;
66 };
67 };
68
69 &nand {
70 status = "okay";
71
72 mediatek,nmbm;
73 mediatek,bmt-max-ratio = <1>;
74 mediatek,bmt-max-reserved-blocks = <64>;
75 mediatek,bmt-remap-range = <0x0000000 0x0a00000>;
76
77 partitions {
78 compatible = "fixed-partitions";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 partition@0 {
83 label = "u-boot";
84 reg = <0x0000000 0x0080000>;
85 read-only;
86 };
87
88 partition@80000 {
89 label = "u-boot-env";
90 reg = <0x0080000 0x0080000>;
91 };
92
93 partition@100000 {
94 label = "exp";
95 reg = <0x0100000 0x0080000>;
96 read-only;
97 };
98
99 factory: partition@180000 {
100 label = "factory";
101 reg = <0x0180000 0x0080000>;
102 read-only;
103
104 nvmem-layout {
105 compatible = "fixed-layout";
106 #address-cells = <1>;
107 #size-cells = <1>;
108
109 eeprom_factory_0: eeprom@0 {
110 reg = <0x0 0xe00>;
111 };
112 };
113 };
114
115 partition@200000 {
116 label = "firmware";
117 reg = <0x0200000 0x7600000>;
118
119 compatible = "fixed-partitions";
120 #address-cells = <1>;
121 #size-cells = <1>;
122
123 partition@0 {
124 label = "kernel";
125 reg = <0x0000000 0x0800000>;
126 };
127
128 partition@800000 {
129 label = "ubi";
130 reg = <0x0800000 0x6e00000>;
131 };
132 };
133
134 /* last 8 MiB is reserved for NMBM bad block table */
135 };
136 };
137
138 &pcie {
139 status = "okay";
140 };
141
142 &pcie1 {
143 wifi@0,0 {
144 compatible = "mediatek,mt76";
145 reg = <0x0000 0 0 0 0>;
146 nvmem-cells = <&eeprom_factory_0>;
147 nvmem-cell-names = "eeprom";
148 mediatek,disable-radar-background;
149 };
150 };
151
152 &state_default {
153 gpio {
154 groups = "jtag";
155 function = "gpio";
156 };
157 };
158
159 &switch0 {
160 ports {
161 port@1 {
162 status = "okay";
163 label = "lan1";
164 };
165
166 port@2 {
167 status = "okay";
168 label = "lan2";
169 };
170
171 port@3 {
172 status = "okay";
173 label = "lan3";
174 };
175 };
176 };
177
178 &xhci {
179 status = "disabled";
180 };