ramips: mt7620n: convert to nvmem-layout
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_hilink_hlk-7628n.dts
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 = "hilink,hlk-7628n", "mediatek,mt7628an-soc";
10 model = "HILINK HLK-7628N";
11
12 keys {
13 compatible = "gpio-keys";
14
15 reset {
16 label = "reset";
17 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
18 linux,code = <KEY_RESTART>;
19 };
20 };
21
22 leds {
23 compatible = "gpio-leds";
24
25 wlan {
26 label = "green:wlan";
27 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
28 };
29 };
30 };
31
32 &state_default {
33 gpio {
34 groups = "i2c";
35 function = "gpio";
36 };
37 };
38
39 &uart1 {
40 status = "okay";
41 };
42
43 &spi0 {
44 status = "okay";
45
46 flash@0 {
47 compatible = "jedec,spi-nor";
48 reg = <0>;
49 spi-max-frequency = <10000000>;
50 broken-flash-reset;
51
52 partitions {
53 compatible = "fixed-partitions";
54 #address-cells = <1>;
55 #size-cells = <1>;
56
57 partition@0 {
58 label = "u-boot";
59 reg = <0x0 0x30000>;
60 read-only;
61 };
62
63 partition@30000 {
64 label = "u-boot-env";
65 reg = <0x30000 0x10000>;
66 read-only;
67 };
68
69 factory: partition@40000 {
70 label = "factory";
71 reg = <0x40000 0x10000>;
72 read-only;
73
74 nvmem-layout {
75 compatible = "fixed-layout";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 eeprom_factory_0: eeprom@0 {
80 reg = <0x0 0x400>;
81 };
82
83 macaddr_factory_28: macaddr@28 {
84 reg = <0x28 0x6>;
85 };
86 };
87 };
88
89 partition@50000 {
90 compatible = "denx,uimage";
91 label = "firmware";
92 reg = <0x50000 0x1fb0000>;
93 };
94 };
95 };
96 };
97
98 &ethernet {
99 nvmem-cells = <&macaddr_factory_28>;
100 nvmem-cell-names = "mac-address";
101 };
102
103 &wmac {
104 status = "okay";
105
106 nvmem-cells = <&eeprom_factory_0>;
107 nvmem-cell-names = "eeprom";
108 };