ramips: TP-link archer A6/C6 device tree updates
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_iptime.dtsi
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 aliases {
10 label-mac-device = &ethernet;
11 };
12
13 keys {
14 compatible = "gpio-keys";
15
16 reset {
17 label = "reset";
18 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
19 linux,code = <KEY_RESTART>;
20 debounce-interval = <60>;
21 };
22
23 wps {
24 label = "wps";
25 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_WPS_BUTTON>;
27 debounce-interval = <60>;
28 };
29 };
30 };
31
32 &spi0 {
33 status = "okay";
34
35 flash@0 {
36 compatible = "jedec,spi-nor";
37 reg = <0>;
38 spi-max-frequency = <40000000>;
39
40 partitions {
41 compatible = "fixed-partitions";
42 #address-cells = <1>;
43 #size-cells = <1>;
44
45 uboot: partition@0 {
46 compatible = "nvmem-cells";
47 label = "u-boot";
48 reg = <0x0 0x20000>;
49 #address-cells = <1>;
50 #size-cells = <1>;
51 read-only;
52
53 macaddr_uboot_1fc20: macaddr@1fc20 {
54 reg = <0x1fc20 0x6>;
55 };
56 };
57
58 partition@20000 {
59 label = "config";
60 reg = <0x20000 0x10000>;
61 read-only;
62 };
63
64 factory: partition@30000 {
65 compatible = "nvmem-cells";
66 label = "factory";
67 reg = <0x30000 0x10000>;
68 #address-cells = <1>;
69 #size-cells = <1>;
70 read-only;
71
72 eeprom_factory_0: eeprom@0 {
73 reg = <0x0 0x400>;
74 };
75
76 eeprom_factory_8000: eeprom@8000 {
77 reg = <0x8000 0x200>;
78 };
79 };
80
81 partition@40000 {
82 compatible = "denx,uimage";
83 label = "firmware";
84 reg = <0x40000 0x7c0000>;
85 };
86 };
87 };
88 };
89
90 &state_default {
91 gpio {
92 groups = "uart1", "wdt";
93 function = "gpio";
94 };
95 };
96
97 &ehci {
98 status = "disabled";
99 };
100
101 &ohci {
102 status = "disabled";
103 };
104
105 &ethernet {
106 nvmem-cells = <&macaddr_uboot_1fc20>;
107 nvmem-cell-names = "mac-address";
108 };
109
110 &pcie {
111 status = "okay";
112 };
113
114 &pcie0 {
115 wifi@0,0 {
116 compatible = "mediatek,mt76";
117 reg = <0x0000 0 0 0 0>;
118 nvmem-cells = <&eeprom_factory_8000>;
119 nvmem-cell-names = "eeprom";
120 ieee80211-freq-limit = <5000000 6000000>;
121 };
122 };
123
124 &wmac {
125 status = "okay";
126
127 nvmem-cells = <&eeprom_factory_0>;
128 nvmem-cell-names = "eeprom";
129 };