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