treewide: convert mtd-mac-address-increment* to generic implementation
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_gehua_ghl-r-001.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "gehua,ghl-r-001", "mediatek,mt7621-soc";
10 model = "GeHua GHL-R-001";
11
12 leds {
13 compatible = "gpio-leds";
14
15 internet {
16 label = "blue:internet";
17 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
18 };
19
20 usb {
21 label = "blue:usb";
22 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
23 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
24 linux,default-trigger = "usbport";
25 };
26 };
27
28 keys {
29 compatible = "gpio-keys";
30
31 reset {
32 label = "reset";
33 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_RESTART>;
35 };
36 };
37 };
38
39 &uartlite3 {
40 status = "okay";
41 };
42
43 &spi0 {
44 status = "okay";
45
46 flash@0 {
47 compatible = "jedec,spi-nor";
48 reg = <0>;
49 spi-max-frequency = <25000000>;
50 broken-flash-reset;
51 m25p,fast-read;
52
53 partitions {
54 compatible = "fixed-partitions";
55 #address-cells = <1>;
56 #size-cells = <1>;
57
58 partition@0 {
59 label = "u-boot";
60 reg = <0x0 0x30000>;
61 read-only;
62 };
63
64 partition@30000 {
65 label = "u-boot-env";
66 reg = <0x30000 0x10000>;
67 read-only;
68 };
69
70 factory: partition@40000 {
71 label = "factory";
72 reg = <0x40000 0x10000>;
73 read-only;
74 };
75
76 partition@50000 {
77 compatible = "denx,uimage";
78 label = "firmware";
79 reg = <0x50000 0x1fb0000>;
80 };
81 };
82 };
83 };
84
85 &pcie {
86 status = "okay";
87 };
88
89 &pcie0 {
90 wifi@0,0 {
91 reg = <0x0000 0 0 0 0>;
92 mediatek,mtd-eeprom = <&factory 0x0000>;
93 };
94 };
95
96 &pcie1 {
97 wifi@0,0 {
98 reg = <0x0000 0 0 0 0>;
99 mediatek,mtd-eeprom = <&factory 0x8000>;
100 ieee80211-freq-limit = <5000000 6000000>;
101
102 led {
103 led-sources = <2>;
104 led-active-low;
105 };
106 };
107 };
108
109 &gmac0 {
110 mtd-mac-address = <&factory 0xe000>;
111 };
112
113 &switch0 {
114 ports {
115 port@0 {
116 status = "okay";
117 label = "lan1";
118 };
119
120 port@1 {
121 status = "okay";
122 label = "lan2";
123 };
124
125 port@2 {
126 status = "okay";
127 label = "lan3";
128 };
129
130 port@4 {
131 status = "okay";
132 label = "wan";
133 mtd-mac-address = <&factory 0xe000>;
134 mac-address-increment = <1>;
135 };
136 };
137 };
138
139 &state_default {
140 gpio {
141 groups = "jtag", "wdt";
142 function = "gpio";
143 };
144 };