ramips: add support for Wavlink WL-WN530HG4
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / mt7620a_wavlink_wl-wn530hg4.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "wavlink,wl-wn530hg4", "ralink,mt7620a-soc";
10 model = "Wavlink WL-WN530HG4";
11
12 aliases {
13 led-boot = &led_status_blue;
14 led-failsafe = &led_status_blue;
15 led-running = &led_status_blue;
16 led-upgrade = &led_status_blue;
17 serial0 = &uartlite;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_status_blue: status_blue {
24 label = "blue:status";
25 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
26 };
27
28 status_yellow {
29 label = "yellow:status";
30 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
31 };
32
33 status_red {
34 label = "red:status";
35 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
36 };
37 };
38
39 keys {
40 compatible = "gpio-keys";
41
42 reset {
43 label = "reset";
44 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
45 linux,code = <KEY_RESTART>;
46 };
47 };
48 };
49
50 &spi0 {
51 status = "okay";
52
53 flash@0 {
54 compatible = "jedec,spi-nor";
55 reg = <0>;
56 spi-max-frequency = <24000000>;
57
58 partitions {
59 compatible = "fixed-partitions";
60 #address-cells = <1>;
61 #size-cells = <1>;
62
63 partition@0 {
64 label = "u-boot";
65 reg = <0x0 0x30000>;
66 read-only;
67 };
68
69 partition@30000 {
70 label = "config";
71 reg = <0x30000 0x10000>;
72 read-only;
73 };
74
75 factory: partition@40000 {
76 label = "factory";
77 reg = <0x40000 0x10000>;
78 read-only;
79 };
80
81 partition@50000 {
82 compatible = "denx,uimage";
83 label = "firmware";
84 reg = <0x50000 0x7b0000>;
85 };
86 };
87 };
88 };
89
90 &state_default {
91 gpio {
92 groups = "i2c", "uartf";
93 function = "gpio";
94 };
95 };
96
97 &ethernet {
98 pinctrl-names = "default";
99 pinctrl-0 = <&rgmii2_pins &mdio_pins>;
100
101 mtd-mac-address = <&factory 0x28>;
102
103 mediatek,portmap = "llllw";
104
105 port@5 {
106 status = "okay";
107 phy-handle = <&phy5>;
108 phy-mode = "rgmii";
109 };
110
111 mdio-bus {
112 status = "okay";
113
114 phy5: ethernet-phy@5 {
115 reg = <5>;
116 phy-mode = "rgmii";
117 };
118 };
119 };
120
121 &pcie {
122 status = "okay";
123 };
124
125 &pcie0 {
126 mt76@0,0 {
127 reg = <0x0000 0 0 0 0>;
128 mediatek,mtd-eeprom = <&factory 0x8000>;
129 ieee80211-freq-limit = <5000000 6000000>;
130 };
131 };
132
133 &wmac {
134 pinctrl-names = "default";
135 pinctrl-0 = <&pa_pins>;
136
137 ralink,mtd-eeprom = <&factory 0x0>;
138 };