ramips: add support for ALFA Network Quad-E4G
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620a_zbtlink_zbt-we1026.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "zbtlink,zbt-we1026", "ralink,mt7620a-soc";
10
11         chosen {
12                 bootargs = "console=ttyS0,115200";
13         };
14
15         keys {
16                 compatible = "gpio-keys";
17
18                 reset {
19                         label = "reset";
20                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
21                         linux,code = <KEY_RESTART>;
22                 };
23         };
24
25         aliases {
26                 label-mac-device = &wmac;
27         };
28 };
29
30 &spi0 {
31         status = "okay";
32
33         flash@0 {
34                 compatible = "jedec,spi-nor";
35                 reg = <0>;
36                 spi-max-frequency = <10000000>;
37
38                 partitions {
39                         compatible = "fixed-partitions";
40                         #address-cells = <1>;
41                         #size-cells = <1>;
42
43                         partition@0 {
44                                 label = "u-boot";
45                                 reg = <0x0 0x30000>;
46                                 read-only;
47                         };
48
49                         partition@30000 {
50                                 label = "u-boot-env";
51                                 reg = <0x30000 0x10000>;
52                                 read-only;
53                         };
54
55                         factory: partition@40000 {
56                                 label = "factory";
57                                 reg = <0x40000 0x10000>;
58                                 read-only;
59                         };
60
61                         firmware: partition@50000 {
62                                 compatible = "denx,uimage";
63                                 label = "firmware";
64                         };
65                 };
66         };
67 };
68
69 &gpio2 {
70         status = "okay";
71 };
72
73 &gpio3 {
74         status = "okay";
75 };
76
77 &sdhci {
78         status = "okay";
79 };
80
81 &ehci {
82         status = "okay";
83 };
84
85 &ohci {
86         status = "okay";
87 };
88
89 &ethernet {
90         mtd-mac-address = <&factory 0x28>;
91 };
92
93 &wmac {
94         ralink,mtd-eeprom = <&factory 0x0>;
95 };
96
97 &pinctrl {
98         state_default: pinctrl0 {
99                 default {
100                         ralink,group = "i2c", "uartf", "spi refclk", "ephy", "wled";
101                         ralink,function = "gpio";
102                 };
103         };
104 };