ramips: mt7620a: use mac-base
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_hiwifi_hc5x61a.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "hiwifi,hc5x61a", "mediatek,mt7628an-soc";
10
11 aliases {
12 led-boot = &led_system;
13 led-failsafe = &led_system;
14 led-running = &led_system;
15 led-upgrade = &led_system;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
28 linux,code = <KEY_RESTART>;
29 };
30 };
31 };
32
33 &spi0 {
34 status = "okay";
35
36 flash@0 {
37 compatible = "jedec,spi-nor";
38 reg = <0>;
39 spi-max-frequency = <80000000>;
40 m25p,fast-read;
41
42 partitions {
43 compatible = "fixed-partitions";
44 #address-cells = <1>;
45 #size-cells = <1>;
46
47 partition@0 {
48 label = "u-boot";
49 reg = <0x0 0x30000>;
50 read-only;
51 };
52
53 partition@30000 {
54 label = "hw_panic";
55 reg = <0x30000 0x10000>;
56 read-only;
57 };
58
59 factory: partition@40000 {
60 label = "factory";
61 reg = <0x40000 0x10000>;
62 read-only;
63
64 nvmem-layout {
65 compatible = "fixed-layout";
66 #address-cells = <1>;
67 #size-cells = <1>;
68
69 eeprom_factory_0: eeprom@0 {
70 reg = <0x0 0x400>;
71 };
72
73 eeprom_factory_8000: eeprom@8000 {
74 reg = <0x8000 0x200>;
75 };
76
77 macaddr_factory_4: macaddr@4 {
78 reg = <0x4 0x6>;
79 };
80
81 macaddr_factory_2e: macaddr@2e {
82 reg = <0x2e 0x6>;
83 };
84 };
85 };
86
87 partition@50000 {
88 compatible = "denx,uimage";
89 label = "firmware";
90 reg = <0x50000 0xf70000>;
91 };
92
93 partition@fc0000 {
94 label = "oem";
95 reg = <0xfc0000 0x20000>;
96 read-only;
97 };
98
99 bdinfo: partition@fe0000 {
100 label = "bdinfo";
101 reg = <0xfe0000 0x10000>;
102 read-only;
103 };
104
105 partition@ff0000 {
106 label = "backup";
107 reg = <0xff0000 0x10000>;
108 read-only;
109 };
110 };
111 };
112 };
113
114 &ethernet {
115 nvmem-cells = <&macaddr_factory_4>;
116 nvmem-cell-names = "mac-address";
117 };
118
119 &wmac {
120 status = "okay";
121
122 nvmem-cells = <&eeprom_factory_0>;
123 nvmem-cell-names = "eeprom";
124 };