4bdb53a0ec8d42e1e06c11d0595545052019f64f
[oweals/openwrt.git] / target / linux / ramips / dts / mt7628an_hilink_hlk-7628n.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7628an.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10         compatible = "hilink,hlk-7628n", "mediatek,mt7628an-soc";
11         model = "HILINK HLK-7628N";
12
13         chosen {
14                 bootargs = "console=ttyS0,57600";
15         };
16
17         keys {
18                 compatible = "gpio-keys";
19
20                 reset {
21                         label = "reset";
22                         gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
23                         linux,code = <KEY_RESTART>;
24                 };
25         };
26
27         leds {
28                 compatible = "gpio-leds";
29
30                 wlan {
31                         label = "hlk-7628n:green:wlan";
32                         gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
33                 };
34         };
35 };
36
37 &state_default {
38         gpio {
39                 ralink,group = "i2c";
40                 ralink,function = "gpio";
41         };
42 };
43
44 &uart1 {
45         status = "okay";
46 };
47
48 &spi0 {
49         status = "okay";
50
51         flash@0 {
52                 compatible = "jedec,spi-nor";
53                 reg = <0>;
54                 spi-max-frequency = <10000000>;
55
56                 partitions {
57                         compatible = "fixed-partitions";
58                         #address-cells = <1>;
59                         #size-cells = <1>;
60
61                         partition@0 {
62                                 label = "u-boot";
63                                 reg = <0x0 0x30000>;
64                                 read-only;
65                         };
66
67                         partition@30000 {
68                                 label = "u-boot-env";
69                                 reg = <0x30000 0x10000>;
70                                 read-only;
71                         };
72
73                         factory: partition@40000 {
74                                 label = "factory";
75                                 reg = <0x40000 0x10000>;
76                                 read-only;
77                         };
78
79                         partition@50000 {
80                                 compatible = "denx,uimage";
81                                 label = "firmware";
82                                 reg = <0x50000 0x1fb0000>;
83                         };
84                 };
85         };
86 };
87
88 &wmac {
89         status = "okay";
90 };