ramips: add support for ALFA Network Quad-E4G
[oweals/openwrt.git] / target / linux / ramips / dts / mt7620a_dlink_dir-510l.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7620a.dtsi"
5
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/gpio/gpio.h>
8
9 / {
10         compatible = "dlink,dir-510l", "ralink,mt7620a-soc";
11         model = "D-Link DIR-510L";
12
13         aliases {
14                 led-boot = &led_status;
15                 led-failsafe = &led_status;
16                 led-running = &led_status;
17                 led-upgrade = &led_status;
18         };
19
20         chosen {
21                 bootargs = "console=ttyS1,57600";
22         };
23
24         keys {
25                 compatible = "gpio-keys";
26
27                 reset {
28                         label = "reset";
29                         gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
30                         linux,code = <KEY_RESTART>;
31                 };
32
33                 wps {
34                         label = "wps";
35                         gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
36                         linux,code = <KEY_WPS_BUTTON>;
37                 };
38         };
39
40         leds {
41                 compatible = "gpio-leds";
42
43                 led_status: status {
44                         label = "dir-510l:green:status";
45                         gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
46                 };
47
48                 status-red {
49                         label = "dir-510l:red:status";
50                         gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
51                 };
52         };
53 };
54
55 &ethernet {
56         mediatek,portmap = "llllw";
57 };
58
59 &uart {
60         status = "okay";
61 };
62
63 &gpio0 {
64         status = "okay";
65 };
66
67 &spi0 {
68         status = "okay";
69
70         flash@0 {
71                 compatible = "jedec,spi-nor";
72                 reg = <0>;
73                 spi-max-frequency = <50000000>;
74
75                 partitions {
76                         compatible = "fixed-partitions";
77                         #address-cells = <1>;
78                         #size-cells = <1>;
79
80                         partition@0 {
81                                 label = "jboot";
82                                 reg = <0x0 0x10000>;
83                                 read-only;
84                         };
85
86                         partition@10000 {
87                                 label = "recovery";
88                                 reg = <0x10000 0x200000>;
89                                 read-only;
90                         };
91
92                         partition@210000 {
93                                 compatible = "amit,jimage";
94                                 label = "firmware";
95                                 reg = <0x210000 0xde0000>;
96                         };
97
98                         config: partition@ff0000 {
99                                 label = "config";
100                                 reg = <0xff0000 0x10000>;
101                                 read-only;
102                         };
103                 };
104         };
105 };
106
107 &ehci {
108         status = "okay";
109 };
110
111 &ohci {
112         status = "okay";
113 };
114
115 &pcie {
116         status = "okay";
117 };
118
119 &pcie0 {
120         mt76x0e@0,0 {
121                 reg = <0x0000 0 0 0 0>;
122                 mtd-mac-address = <&config 0xe490>;
123                 mtd-mac-address-increment = <(2)>;
124                 mediatek,mtd-eeprom = <&config 0xe05d>;
125         };
126 };
127
128 &gsw {
129         mediatek,port4 = "ephy";
130 };
131
132 &pinctrl {
133         state_default: pinctrl0 {
134                 default {
135                         ralink,group = "i2c", "uartf";
136                         ralink,function = "gpio";
137                 };
138         };
139 };