18ff6c75afad8553dfbb28df0dc4384eb067bc71
[openwrt/staging/hauke.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 compatible = "nvmem-cells";
105 label = "factory";
106 reg = <0x40000 0x10000>;
107 #address-cells = <1>;
108 #size-cells = <1>;
109 read-only;
110
111 eeprom_factory_0: eeprom@0 {
112 reg = <0x0 0x400>;
113 };
114
115 macaddr_factory_4: macaddr@4 {
116 reg = <0x4 0x6>;
117 };
118 };
119
120 partition@50000 {
121 compatible = "denx,uimage";
122 label = "firmware";
123 reg = <0x50000 0x1fb0000>;
124 };
125 };
126 };
127 };
128
129 &ethernet {
130 status = "okay";
131
132 nvmem-cells = <&macaddr_factory_4>;
133 nvmem-cell-names = "mac-address";
134 };
135
136 &wmac {
137 status = "okay";
138
139 nvmem-cells = <&eeprom_factory_0>;
140 nvmem-cell-names = "eeprom";
141 };