ramips: convert mtd-mac-address to nvmem implementation
[openwrt/staging/stintel.git] / target / linux / ramips / dts / mt7628an_hilink_hlk-7688a.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-7688a", "mediatek,mt7628an-soc";
10 model = "Hi-Link HLK-7688A";
11
12 aliases {
13 led-boot = &led_wlan;
14 led-failsafe = &led_wlan;
15 led-upgrade = &led_wlan;
16 };
17
18 keys {
19 compatible = "gpio-keys";
20
21 reset {
22 label = "reset";
23 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
24 linux,code = <KEY_RESTART>;
25 };
26 };
27
28 leds {
29 compatible = "gpio-leds";
30
31 led_wlan: wlan {
32 label = "green:wlan";
33 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
34 linux,default-trigger = "phy0tpt";
35 };
36 };
37 };
38
39 &state_default {
40 gpio {
41 groups = "wdt", "wled_an";
42 function = "gpio";
43 };
44 };
45
46 &uart1 {
47 status = "okay";
48 };
49
50 &i2c {
51 status = "okay";
52 };
53
54 &spi0 {
55 status = "okay";
56
57 pinctrl-names = "default";
58 pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
59
60 flash@0 {
61 compatible = "jedec,spi-nor";
62 reg = <0>;
63 spi-max-frequency = <40000000>;
64
65 partitions {
66 compatible = "fixed-partitions";
67 #address-cells = <1>;
68 #size-cells = <1>;
69
70 partition@0 {
71 label = "u-boot";
72 reg = <0x0 0x30000>;
73 read-only;
74 };
75
76 partition@30000 {
77 label = "u-boot-env";
78 reg = <0x30000 0x10000>;
79 read-only;
80 };
81
82 factory: partition@40000 {
83 label = "factory";
84 reg = <0x40000 0x10000>;
85 read-only;
86 };
87
88 partition@50000 {
89 compatible = "denx,uimage";
90 label = "firmware";
91 reg = <0x50000 0x1fb0000>;
92 };
93 };
94 };
95
96 spidev@1 {
97 #address-cells = <1>;
98 #size-cells = <1>;
99 compatible = "linux,spidev";
100 reg = <1>;
101 spi-max-frequency = <40000000>;
102 };
103 };
104
105 &ethernet {
106 nvmem-cells = <&macaddr_factory_28>;
107 nvmem-cell-names = "mac-address";
108 };
109
110 &esw {
111 mediatek,portmap = <0x3e>;
112 };
113
114 &wmac {
115 status = "okay";
116 };
117
118 &factory {
119 compatible = "nvmem-cells";
120 #address-cells = <1>;
121 #size-cells = <1>;
122
123 macaddr_factory_28: macaddr@28 {
124 reg = <0x28 0x6>;
125 };
126 };