ramips: improve Xiaomi mi-mini indications
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_jcg_y2.dts
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 compatible = "jcg,y2", "mediatek,mt7621-soc";
10 model = "JCG Y2";
11
12 aliases {
13 led-boot = &led_internet;
14 led-failsafe = &led_internet;
15 led-upgrade = &led_internet;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 led_internet: internet {
22 label = "blue:internet";
23 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
24 };
25 };
26
27 keys {
28 compatible = "gpio-keys";
29
30 reset {
31 label = "reset";
32 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
33 linux,code = <KEY_RESTART>;
34 };
35 };
36 };
37
38 &spi0 {
39 status = "okay";
40
41 flash@0 {
42 compatible = "jedec,spi-nor";
43 reg = <0>;
44 spi-max-frequency = <80000000>;
45 m25p,fast-read;
46
47 partitions {
48 compatible = "fixed-partitions";
49 #address-cells = <1>;
50 #size-cells = <1>;
51
52 partition@0 {
53 label = "bootloader";
54 reg = <0x0 0x30000>;
55 read-only;
56 };
57
58 partition@30000 {
59 label = "config";
60 reg = <0x30000 0x10000>;
61 read-only;
62 };
63
64 factory: partition@40000 {
65 label = "factory";
66 reg = <0x40000 0x10000>;
67 read-only;
68 };
69
70 partition@50000 {
71 compatible = "denx,uimage";
72 label = "firmware";
73 reg = <0x50000 0xfb0000>;
74 };
75 };
76 };
77 };
78
79 &pcie {
80 status = "okay";
81 };
82
83 &pcie0 {
84 wifi@0,0 {
85 compatible = "mediatek,mt76";
86 reg = <0x0000 0 0 0 0>;
87 mediatek,mtd-eeprom = <&factory 0x0>;
88 };
89 };
90
91 &gmac0 {
92 nvmem-cells = <&macaddr_factory_e000>;
93 nvmem-cell-names = "mac-address";
94 };
95
96 &gmac1 {
97 status = "okay";
98 label = "wan";
99 phy-handle = <&ethphy4>;
100
101 nvmem-cells = <&macaddr_factory_e006>;
102 nvmem-cell-names = "mac-address";
103 };
104
105 &mdio {
106 ethphy4: ethernet-phy@4 {
107 reg = <4>;
108 };
109 };
110
111 &switch0 {
112 ports {
113 port@0 {
114 status = "okay";
115 label = "lan4";
116 };
117
118 port@1 {
119 status = "okay";
120 label = "lan3";
121 };
122
123 port@2 {
124 status = "okay";
125 label = "lan2";
126 };
127
128 port@3 {
129 status = "okay";
130 label = "lan1";
131 };
132 };
133 };
134
135 &state_default {
136 gpio {
137 groups = "jtag", "wdt";
138 function = "gpio";
139 };
140 };
141
142 &factory {
143 compatible = "nvmem-cells";
144 #address-cells = <1>;
145 #size-cells = <1>;
146
147 macaddr_factory_e000: macaddr@e000 {
148 reg = <0xe000 0x6>;
149 };
150
151 macaddr_factory_e006: macaddr@e006 {
152 reg = <0xe006 0x6>;
153 };
154 };