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