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