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