ramips: add support for the Hak5 WiFi Pineapple Mark 7
[openwrt/openwrt.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 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 / {
8 compatible = "hak5,wifi-pineapple-mk7", "mediatek,mt7628an-soc";
9 model = "Hak5 WiFi Pineapple Mark 7";
10
11 aliases {
12 led-boot = &led_system_blue;
13 led-failsafe = &led_system_blue;
14 led-upgrade = &led_system_blue;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 system_red {
21 label = "red:system";
22 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
23 };
24
25 system_green {
26 label = "green:system";
27 gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
28 };
29
30 led_system_blue: system_blue {
31 label = "blue:system";
32 gpios = <&gpio 3 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 = <&gpio 11 GPIO_ACTIVE_LOW>;
43 linux,code = <KEY_RESTART>;
44 };
45 };
46
47 gpio-export {
48 compatible = "gpio-export";
49 #size-cells = <0>;
50
51 usb-power {
52 gpio-export,name = "usb-power";
53 gpio-export,output = <1>;
54 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
55 };
56 };
57
58 sdhci@10130000 {
59 compatible = "ralink,mt7620-sdhci";
60 reg = <0x10130000 4000>;
61
62 interrupt-parent = <&intc>;
63 interrupts = <14>;
64
65 status = "okay";
66 };
67 };
68
69 &state_default {
70 gpio {
71 groups = "gpio", "i2c", "i2s";
72 function = "gpio";
73 };
74 };
75
76 &spi0 {
77 status = "okay";
78
79 flash@0 {
80 compatible = "jedec,spi-nor";
81 reg = <0>;
82 spi-max-frequency = <50000000>;
83
84 partitions {
85 compatible = "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 partition@0 {
90 label = "u-boot";
91 reg = <0x0 0x30000>;
92 read-only;
93 };
94
95 partition@30000 {
96 label = "u-boot-env";
97 reg = <0x30000 0x10000>;
98 read-only;
99 };
100
101 factory: partition@40000 {
102 label = "factory";
103 reg = <0x40000 0x10000>;
104 read-only;
105 };
106
107 partition@50000 {
108 compatible = "denx,uimage";
109 label = "firmware";
110 reg = <0x50000 0x1fb0000>;
111 };
112 };
113 };
114 };
115
116 &ethernet {
117 status = "okay";
118
119 mtd-mac-address = <&factory 0x4>;
120 };
121
122 &wmac {
123 status = "okay";
124 };