ramips: add support for ALFA Network Quad-E4G
[oweals/openwrt.git] / target / linux / ramips / dts / mt7621_gnubee_gb-pc2.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9         compatible = "gnubee,gb-pc2", "mediatek,mt7621-soc";
10         model = "GB-PC2";
11
12         aliases {
13                 led-boot = &led_status;
14                 led-failsafe = &led_status;
15                 led-running = &led_status;
16                 led-upgrade = &led_status;
17         };
18
19         chosen {
20                 bootargs = "console=ttyS0,57600";
21         };
22
23         keys {
24                 compatible = "gpio-keys";
25
26                 reset {
27                         label = "reset";
28                         gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
29                         linux,code = <KEY_RESTART>;
30                 };
31         };
32
33         leds {
34                 compatible = "gpio-leds";
35
36                 system {
37                         label = "gb-pc2:green:system";
38                         gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
39                 };
40
41                 led_status: status {
42                         label = "gb-pc2:green:status";
43                         gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
44                 };
45
46                 lan1 {
47                         label = "gb-pc2:green:lan1";
48                         gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
49                 };
50
51                 lan2 {
52                         label = "gb-pc2:green:lan2";
53                         gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
54                 };
55
56                 lan3-yellow {
57                         label = "gb-pc2:yellow:lan3";
58                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
59                 };
60
61                 lan3-green {
62                         label = "gb-pc2:green:lan3";
63                         gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
64                 };
65         };
66 };
67
68 &sdhci {
69         status = "okay";
70 };
71
72 &spi0 {
73         status = "okay";
74
75         m25p80@0 {
76                 compatible = "jedec,spi-nor";
77                 reg = <0>;
78                 spi-max-frequency = <80000000>;
79                 m25p,fast-read;
80
81                 partitions {
82                         compatible = "fixed-partitions";
83                         #address-cells = <1>;
84                         #size-cells = <1>;
85
86                         partition@0 {
87                                 label = "u-boot";
88                                 reg = <0x0 0x30000>;
89                                 read-only;
90                         };
91
92                         partition@30000 {
93                                 label = "u-boot-env";
94                                 reg = <0x30000 0x10000>;
95                                 read-only;
96                         };
97
98                         factory: partition@40000 {
99                                 label = "factory";
100                                 reg = <0x40000 0x10000>;
101                                 read-only;
102                         };
103
104                         partition@50000 {
105                                 compatible = "denx,uimage";
106                                 label = "firmware";
107                                 reg = <0x50000 0x1fb0000>;
108                         };
109                 };
110         };
111 };
112
113 &pcie {
114         status = "okay";
115 };
116
117 &ethernet {
118         mtd-mac-address = <&factory 0xe000>;
119 };
120
121 &pinctrl {
122         state_default: pinctrl0 {
123                 gpio {
124                         ralink,group = "jtag", "rgmii2", "uart3", "wdt";
125                         ralink,function = "gpio";
126                 };
127         };
128 };