ramips: mt7620a: use mac-base
[openwrt/staging/hauke.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 #include <dt-bindings/mtd/partitions/uimage.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 = "green:status";
45 gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
46 };
47
48 status-red {
49 label = "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 &spi0 {
64 status = "okay";
65
66 flash@0 {
67 compatible = "jedec,spi-nor";
68 reg = <0>;
69 spi-max-frequency = <50000000>;
70
71 partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 partition@0 {
77 label = "jboot";
78 reg = <0x0 0x10000>;
79 read-only;
80 };
81
82 partition@10000 {
83 label = "recovery";
84 reg = <0x10000 0x200000>;
85 read-only;
86 };
87
88 partition@210000 {
89 compatible = "openwrt,uimage", "denx,uimage";
90 openwrt,ih-magic = <IH_MAGIC_OKLI>;
91 openwrt,offset = <0x10000>;
92 label = "firmware";
93 reg = <0x210000 0xde0000>;
94 };
95
96 config: partition@ff0000 {
97 label = "config";
98 reg = <0xff0000 0x10000>;
99 read-only;
100
101 nvmem-layout {
102 compatible = "fixed-layout";
103 #address-cells = <1>;
104 #size-cells = <1>;
105
106 eeprom_config_e05d: eeprom@e05d {
107 reg = <0xe05d 0x200>;
108 };
109
110 macaddr_config_e490: macaddr@e490 {
111 compatible = "mac-base";
112 reg = <0xe490 0x6>;
113 #nvmem-cell-cells = <1>;
114 };
115 };
116 };
117 };
118 };
119 };
120
121 &ehci {
122 status = "okay";
123 };
124
125 &ohci {
126 status = "okay";
127 };
128
129 &pcie {
130 status = "okay";
131 };
132
133 &pcie0 {
134 mt76x0e@0,0 {
135 reg = <0x0000 0 0 0 0>;
136 nvmem-cells = <&eeprom_config_e05d>, <&macaddr_config_e490 2>;
137 nvmem-cell-names = "eeprom", "mac-address";
138 };
139 };
140
141 &state_default {
142 default {
143 groups = "i2c", "uartf";
144 function = "gpio";
145 };
146 };