ramips: mt7620: use OKLI loader with Jboot devices
[openwrt/openwrt.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 };
102 };
103 };
104
105 &ehci {
106 status = "okay";
107 };
108
109 &ohci {
110 status = "okay";
111 };
112
113 &pcie {
114 status = "okay";
115 };
116
117 &pcie0 {
118 mt76x0e@0,0 {
119 reg = <0x0000 0 0 0 0>;
120 nvmem-cells = <&macaddr_config_e490>;
121 nvmem-cell-names = "mac-address";
122 mac-address-increment = <(2)>;
123 mediatek,mtd-eeprom = <&config 0xe05d>;
124 };
125 };
126
127 &state_default {
128 default {
129 groups = "i2c", "uartf";
130 function = "gpio";
131 };
132 };
133
134 &config {
135 compatible = "nvmem-cells";
136 #address-cells = <1>;
137 #size-cells = <1>;
138
139 macaddr_config_e490: macaddr@e490 {
140 reg = <0xe490 0x6>;
141 };
142 };