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