ramips: add support for HooToo HT-TM05
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7620n_hootoo_ht-tm05.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7620n.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "hootoo,ht-tm05", "ralink,mt7620n-soc";
11 model = "HooToo HT-TM05";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 label-mac-device = &ethernet;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_power: power {
25 label = "ht-tm05:blue:power";
26 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
27 default-state = "on";
28 };
29
30 wifi {
31 label = "ht-tm05:green:wifi";
32 gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
33 linux,default-trigger = "phy0tpt";
34 };
35 };
36
37 keys {
38 compatible = "gpio-keys";
39
40 reset {
41 label = "reset";
42 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_RESTART>;
44 };
45 };
46
47 virtual_flash {
48 compatible = "mtd-concat";
49
50 devices = <&firmware1 &firmware2 &firmware3>;
51
52 partitions {
53 compatible = "fixed-partitions";
54 #address-cells = <1>;
55 #size-cells = <1>;
56
57 partition@0 {
58 compatible = "openwrt,okli";
59 label = "firmware";
60 reg = <0x0 0x0>;
61 };
62 };
63 };
64 };
65
66 &gpio2 {
67 status = "okay";
68 };
69
70 &gpio3 {
71 status = "okay";
72 };
73
74 &i2c {
75 status = "okay";
76 };
77
78 &spi0 {
79 status = "okay";
80
81 flash@0 {
82 compatible = "jedec,spi-nor";
83 reg = <0>;
84 spi-max-frequency = <50000000>;
85 m25p,fast-read;
86
87 partitions {
88 compatible = "fixed-partitions";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 partition@0 {
93 label = "u-boot";
94 reg = <0x0 0x30000>;
95 read-only;
96 };
97
98 partition@30000 {
99 label = "config";
100 reg = <0x30000 0x10000>;
101 read-only;
102 };
103
104 factory: partition@40000 {
105 label = "factory";
106 reg = <0x40000 0x10000>;
107 read-only;
108 };
109
110 partition@50000 {
111 label = "loader";
112 reg = <0x50000 0x10000>;
113 read-only;
114 };
115
116 firmware2: partition@60000 {
117 label = "firmware2";
118 reg = <0x60000 0x170000>;
119 };
120
121 partition@1d0000 {
122 label = "u-boot-env";
123 reg = <0x1d0000 0x10000>;
124 };
125
126 firmware3: partition@1e0000 {
127 label = "firmware3";
128 reg = <0x1e0000 0x20000>;
129 };
130
131 firmware1: partition@200000 {
132 label = "firmware1";
133 reg = <0x200000 0x600000>;
134 };
135 };
136 };
137 };
138
139 &ehci {
140 status = "okay";
141 };
142
143 &ohci {
144 status = "okay";
145 };
146
147 &ethernet {
148 mtd-mac-address = <&factory 0x28>;
149 };
150
151 &wmac {
152 ralink,mtd-eeprom = <&factory 0x0>;
153 };
154
155 &state_default {
156 gpio {
157 groups = "wled", "ephy";
158 function = "gpio";
159 };
160 };