ramips: use NVMEM cells with mt76 EEPROM for Netgear R6220 & WNDR3700 v5
[openwrt/staging/hauke.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
105 partition@200000 {
106 label = "firmware";
107 reg = <0x0200000 0x7600000>;
108
109 compatible = "fixed-partitions";
110 #address-cells = <1>;
111 #size-cells = <1>;
112
113 partition@0 {
114 label = "kernel";
115 reg = <0x0000000 0x0800000>;
116 };
117
118 partition@800000 {
119 label = "ubi";
120 reg = <0x0800000 0x6e00000>;
121 };
122 };
123
124 /* last 8 MiB is reserved for NMBM bad block table */
125 };
126 };
127
128 &pcie {
129 status = "okay";
130 };
131
132 &pcie1 {
133 wifi@0,0 {
134 compatible = "mediatek,mt76";
135 reg = <0x0000 0 0 0 0>;
136 mediatek,mtd-eeprom = <&factory 0x0>;
137 mediatek,disable-radar-background;
138 };
139 };
140
141 &state_default {
142 gpio {
143 groups = "jtag";
144 function = "gpio";
145 };
146 };
147
148 &switch0 {
149 ports {
150 port@1 {
151 status = "okay";
152 label = "lan1";
153 };
154
155 port@2 {
156 status = "okay";
157 label = "lan2";
158 };
159
160 port@3 {
161 status = "okay";
162 label = "lan3";
163 };
164 };
165 };
166
167 &xhci {
168 status = "disabled";
169 };