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