1c7e1782cba79bcaac9d8c42ca09ec16c44ff85a
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7620a_zbtlink_zbt-we1026.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "zbtlink,zbt-we1026", "ralink,mt7620a-soc";
10
11 chosen {
12 bootargs = "console=ttyS0,115200";
13 };
14
15 keys {
16 compatible = "gpio-keys";
17
18 reset {
19 label = "reset";
20 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
21 linux,code = <KEY_RESTART>;
22 };
23 };
24
25 aliases {
26 label-mac-device = &wmac;
27 };
28 };
29
30 &spi0 {
31 status = "okay";
32
33 flash0: flash@0 {
34 compatible = "jedec,spi-nor";
35 reg = <0>;
36 spi-max-frequency = <10000000>;
37
38 partitions {
39 compatible = "fixed-partitions";
40 #address-cells = <1>;
41 #size-cells = <1>;
42
43 partition@0 {
44 label = "u-boot";
45 reg = <0x0 0x30000>;
46 read-only;
47 };
48
49 partition@30000 {
50 label = "u-boot-env";
51 reg = <0x30000 0x10000>;
52 read-only;
53 };
54
55 factory: partition@40000 {
56 compatible = "nvmem-cells";
57 label = "factory";
58 reg = <0x40000 0x10000>;
59 #address-cells = <1>;
60 #size-cells = <1>;
61 read-only;
62
63 eeprom_factory_0: eeprom@0 {
64 reg = <0x0 0x200>;
65 };
66
67 eeprom_factory_8000: eeprom@8000 {
68 reg = <0x8000 0x200>;
69 };
70
71 macaddr_factory_28: macaddr@28 {
72 reg = <0x28 0x6>;
73 };
74 };
75
76 firmware: partition@50000 {
77 compatible = "denx,uimage";
78 label = "firmware";
79 };
80 };
81 };
82 };
83
84 &gpio2 {
85 status = "okay";
86 };
87
88 &gpio3 {
89 status = "okay";
90 };
91
92 &sdhci {
93 status = "okay";
94 };
95
96 &ehci {
97 status = "okay";
98 };
99
100 &ohci {
101 status = "okay";
102 };
103
104 &ethernet {
105 nvmem-cells = <&macaddr_factory_28>;
106 nvmem-cell-names = "mac-address";
107 };
108
109 &wmac {
110 nvmem-cells = <&eeprom_factory_0>;
111 nvmem-cell-names = "eeprom";
112 };
113
114 &state_default {
115 default {
116 groups = "i2c", "uartf", "spi refclk", "ephy", "wled";
117 function = "gpio";
118 };
119 };