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