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