rockchip: add Radxa CM3 IO board support
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7628an_hak5_wifi-pineapple-mk7.dts
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 compatible = "hak5,wifi-pineapple-mk7", "mediatek,mt7628an-soc";
10 model = "Hak5 WiFi Pineapple Mark 7";
11
12 aliases {
13 led-boot = &led_system_blue;
14 led-failsafe = &led_system_blue;
15 led-upgrade = &led_system_blue;
16 };
17
18 leds {
19 compatible = "gpio-leds";
20
21 system_red {
22 label = "red:system";
23 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
24 };
25
26 system_green {
27 label = "green:system";
28 gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
29 };
30
31 led_system_blue: system_blue {
32 label = "blue:system";
33 gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
34 linux,default-trigger = "phy0tpt";
35 };
36 };
37
38 keys {
39 compatible = "gpio-keys";
40
41 reset {
42 label = "reset";
43 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46 };
47
48 gpio-export {
49 compatible = "gpio-export";
50 #size-cells = <0>;
51
52 usb-power {
53 gpio-export,name = "usb-power";
54 gpio-export,output = <1>;
55 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
56 };
57 };
58
59 sdhci@10130000 {
60 compatible = "ralink,mt7620-sdhci";
61 reg = <0x10130000 4000>;
62
63 interrupt-parent = <&intc>;
64 interrupts = <14>;
65
66 status = "okay";
67 };
68 };
69
70 &state_default {
71 gpio {
72 groups = "gpio", "i2c", "i2s";
73 function = "gpio";
74 };
75 };
76
77 &spi0 {
78 status = "okay";
79
80 flash@0 {
81 compatible = "jedec,spi-nor";
82 reg = <0>;
83 spi-max-frequency = <50000000>;
84 broken-flash-reset;
85
86 partitions {
87 compatible = "fixed-partitions";
88 #address-cells = <1>;
89 #size-cells = <1>;
90
91 partition@0 {
92 label = "u-boot";
93 reg = <0x0 0x30000>;
94 read-only;
95 };
96
97 partition@30000 {
98 label = "u-boot-env";
99 reg = <0x30000 0x10000>;
100 read-only;
101 };
102
103 factory: partition@40000 {
104 label = "factory";
105 reg = <0x40000 0x10000>;
106 read-only;
107
108 nvmem-layout {
109 compatible = "fixed-layout";
110 #address-cells = <1>;
111 #size-cells = <1>;
112
113 eeprom_factory_0: eeprom@0 {
114 reg = <0x0 0x400>;
115 };
116
117 macaddr_factory_4: macaddr@4 {
118 reg = <0x4 0x6>;
119 };
120 };
121 };
122
123 partition@50000 {
124 compatible = "denx,uimage";
125 label = "firmware";
126 reg = <0x50000 0x1fb0000>;
127 };
128 };
129 };
130 };
131
132 &ethernet {
133 status = "okay";
134
135 nvmem-cells = <&macaddr_factory_4>;
136 nvmem-cell-names = "mac-address";
137 };
138
139 &wmac {
140 status = "okay";
141
142 nvmem-cells = <&eeprom_factory_0>;
143 nvmem-cell-names = "eeprom";
144 };