ramips: improve support for STORYLiNK SAP-G3200U3
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_hilink_hlk-7621a-evb.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "hilink,hlk-7621a-evb", "mediatek,mt7621-soc";
10 model = "HiLink HLK-7621A evaluation board";
11
12 keys {
13 compatible = "gpio-keys";
14
15 reset {
16 label = "reset";
17 gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
18 linux,code = <KEY_RESTART>;
19 };
20 };
21 };
22
23 &spi0 {
24 status = "okay";
25
26 flash@0 {
27 compatible = "jedec,spi-nor";
28 reg = <0>;
29 spi-max-frequency = <44000000>;
30 broken-flash-reset;
31
32 partitions {
33 compatible = "fixed-partitions";
34 #address-cells = <1>;
35 #size-cells = <1>;
36
37 partition@0 {
38 label = "u-boot";
39 reg = <0x0 0x30000>;
40 read-only;
41 };
42
43 partition@30000 {
44 label = "u-boot-env";
45 reg = <0x30000 0x10000>;
46 read-only;
47 };
48
49 partition@40000 {
50 label = "factory";
51 reg = <0x40000 0x10000>;
52 read-only;
53
54 nvmem-layout {
55 compatible = "fixed-layout";
56 #address-cells = <1>;
57 #size-cells = <1>;
58
59 eeprom_factory_8000: eeprom@8000 {
60 reg = <0x8000 0x200>;
61 };
62 };
63 };
64
65 partition@50000 {
66 compatible = "denx,uimage";
67 label = "firmware";
68 reg = <0x50000 0x1fb0000>;
69 };
70 };
71 };
72 };
73
74 &gmac1 {
75 status = "okay";
76 label = "wan";
77 phy-handle = <&ethphy4>;
78 };
79
80 &mdio {
81 ethphy4: ethernet-phy@4 {
82 reg = <4>;
83 };
84 };
85
86 &switch0 {
87 ports {
88 port@0 {
89 status = "okay";
90 label = "lan1";
91 };
92
93 port@1 {
94 status = "okay";
95 label = "lan2";
96 };
97
98 port@2 {
99 status = "okay";
100 label = "lan3";
101 };
102
103 port@3 {
104 status = "okay";
105 label = "lan4";
106 };
107 };
108 };
109
110 &pcie {
111 status = "okay";
112 };
113
114 &pcie2 {
115 wifi@0,0 {
116 compatible = "mediatek,mt76";
117 reg = <0x0000 0 0 0 0>;
118 nvmem-cells = <&eeprom_factory_8000>;
119 nvmem-cell-names = "eeprom";
120 };
121 };
122
123 &state_default {
124 gpio {
125 groups = "wdt";
126 function = "gpio";
127 };
128 };