ramips: add support for ALFA Network Quad-E4G
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620a_ohyeah_oy-0001.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "ohyeah,oy-0001", "ralink,mt7620a-soc";
10         model = "OY-0001";
11
12         aliases {
13                 led-boot = &led_power;
14                 led-failsafe = &led_power;
15                 led-running = &led_power;
16                 led-upgrade = &led_power;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS0,115200";
21         };
22
23         leds {
24                 compatible = "gpio-leds";
25
26                 led_power: powerled {
27                         label = "oy-0001:green:power";
28                         gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
29                 };
30
31                 wifiled {
32                         label = "oy-0001:green:wifi";
33                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
34                 };
35         };
36
37         keys {
38                 compatible = "gpio-keys";
39
40                 s1 {
41                         label = "reset";
42                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
43                         linux,code = <KEY_RESTART>;
44                 };
45         };
46 };
47
48 &gpio2 {
49         status = "okay";
50 };
51
52 &gpio3 {
53         status = "okay";
54 };
55
56 &spi0 {
57         status = "okay";
58
59         m25p80@0 {
60                 compatible = "jedec,spi-nor";
61                 reg = <0>;
62                 spi-max-frequency = <10000000>;
63
64                 partitions {
65                         compatible = "fixed-partitions";
66                         #address-cells = <1>;
67                         #size-cells = <1>;
68
69                         partition@0 {
70                                 label = "u-boot";
71                                 reg = <0x0 0x30000>;
72                                 read-only;
73                         };
74
75                         partition@30000 {
76                                 label = "u-boot-env";
77                                 reg = <0x30000 0x10000>;
78                                 read-only;
79                         };
80
81                         factory: partition@40000 {
82                                 label = "factory";
83                                 reg = <0x40000 0x10000>;
84                                 read-only;
85                         };
86
87                         partition@50000 {
88                                 compatible = "denx,uimage";
89                                 label = "firmware";
90                                 reg = <0x50000 0xfb0000>;
91                         };
92                 };
93         };
94 };
95
96 &pinctrl {
97         state_default: pinctrl0 {
98                 gpio {
99                         ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled";
100                         ralink,function = "gpio";
101                 };
102         };
103 };
104
105 &ethernet {
106         pinctrl-names = "default";
107         pinctrl-0 = <&ephy_pins>;
108         mtd-mac-address = <&factory 0x28>;
109         mediatek,portmap = "llllw";
110 };
111
112 &gsw {
113         mediatek,port4 = "ephy";
114 };
115
116 &wmac {
117         ralink,mtd-eeprom = <&factory 0>;
118 };
119
120 &sdhci {
121         status = "okay";
122 };
123
124 &ehci {
125         status = "okay";
126 };
127
128 &ohci {
129         status = "okay";
130 };