ramips: convert to new LED color/function format where possible
[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 nvmem-layout {
70 compatible = "fixed-layout";
71 #address-cells = <1>;
72 #size-cells = <1>;
73
74 eeprom_factory_0: eeprom@0 {
75 reg = <0x0 0x4da8>;
76 };
77
78 macaddr_factory_e000: macaddr@e000 {
79 reg = <0xe000 0x6>;
80 };
81
82 macaddr_factory_e006: macaddr@e006 {
83 reg = <0xe006 0x6>;
84 };
85 };
86 };
87
88 partition@50000 {
89 compatible = "denx,uimage";
90 label = "firmware";
91 reg = <0x50000 0xfb0000>;
92 };
93 };
94 };
95 };
96
97 &pcie {
98 status = "okay";
99 };
100
101 &pcie0 {
102 wifi@0,0 {
103 compatible = "mediatek,mt76";
104 reg = <0x0000 0 0 0 0>;
105 nvmem-cells = <&eeprom_factory_0>;
106 nvmem-cell-names = "eeprom";
107 };
108 };
109
110 &gmac0 {
111 nvmem-cells = <&macaddr_factory_e000>;
112 nvmem-cell-names = "mac-address";
113 };
114
115 &gmac1 {
116 status = "okay";
117 label = "wan";
118 phy-handle = <&ethphy4>;
119
120 nvmem-cells = <&macaddr_factory_e006>;
121 nvmem-cell-names = "mac-address";
122 };
123
124 &mdio {
125 ethphy4: ethernet-phy@4 {
126 reg = <4>;
127 };
128 };
129
130 &switch0 {
131 ports {
132 port@0 {
133 status = "okay";
134 label = "lan4";
135 };
136
137 port@1 {
138 status = "okay";
139 label = "lan3";
140 };
141
142 port@2 {
143 status = "okay";
144 label = "lan2";
145 };
146
147 port@3 {
148 status = "okay";
149 label = "lan1";
150 };
151 };
152 };
153
154 &state_default {
155 gpio {
156 groups = "jtag", "wdt";
157 function = "gpio";
158 };
159 };