2c7299af72fa13936314549f555e86c0b3b7ffae
[openwrt/staging/jow.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 broken-flash-reset;
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 compatible = "denx,uimage";
91 label = "firmware";
92 reg = <0x50000 0x1fb0000>;
93 };
94 };
95 };
96
97 spidev@1 {
98 #address-cells = <1>;
99 #size-cells = <1>;
100 compatible = "linux,spidev";
101 reg = <1>;
102 spi-max-frequency = <40000000>;
103 };
104 };
105
106 &ethernet {
107 nvmem-cells = <&macaddr_factory_28>;
108 nvmem-cell-names = "mac-address";
109 };
110
111 &esw {
112 mediatek,portmap = <0x3e>;
113 };
114
115 &wmac {
116 status = "okay";
117
118 mediatek,mtd-eeprom = <&factory 0x0>;
119 };
120
121 &factory {
122 compatible = "nvmem-cells";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 macaddr_factory_28: macaddr@28 {
127 reg = <0x28 0x6>;
128 };
129 };