641844ccc0d8643dcd4881394075794e24e026e5
[openwrt/staging/hauke.git] / target / linux / ramips / dts / mt7628an_alfa-network_awusfree1.dts
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3 * Copyright (C) 2018 Piotr Dymacz <pepe2k@gmail.com>
4 * All rights reserved.
5 */
6
7 #include "mt7628an.dtsi"
8
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/input/input.h>
11
12 / {
13 compatible = "alfa-network,awusfree1", "mediatek,mt7628an-soc";
14 model = "ALFA Network AWUSFREE1";
15
16 aliases {
17 led-boot = &led_system;
18 led-failsafe = &led_system;
19 led-running = &led_system;
20 led-upgrade = &led_system;
21 };
22
23 chosen {
24 bootargs = "console=ttyS0,115200";
25 };
26
27 keys {
28 compatible = "gpio-keys";
29
30 reset {
31 label = "reset";
32 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
33 linux,code = <KEY_RESTART>;
34 };
35 };
36
37 leds {
38 compatible = "gpio-leds";
39
40 led_system: system {
41 label = "orange:system";
42 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
43 };
44
45 wlan {
46 label = "blue:wlan";
47 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
48 };
49 };
50 };
51
52 &ehci {
53 status = "disabled";
54 };
55
56 &esw {
57 mediatek,portdisable = <0x1e>;
58 };
59
60 &ethernet {
61 nvmem-cells = <&macaddr_factory_2e>;
62 nvmem-cell-names = "mac-address";
63 };
64
65 &ohci {
66 status = "disabled";
67 };
68
69 &state_default {
70 gpio {
71 groups = "p0led_an", "wdt", "wled_an";
72 function = "gpio";
73 };
74
75 ext_lna {
76 groups = "uart1";
77 function = "sw_r";
78 };
79
80 ext_pa {
81 groups = "i2s";
82 function = "antenna";
83 };
84 };
85
86 &spi0 {
87 status = "okay";
88
89 flash@0 {
90 compatible = "jedec,spi-nor";
91 reg = <0>;
92 spi-max-frequency = <10000000>;
93
94 partitions {
95 compatible = "fixed-partitions";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 partition@0 {
100 label = "u-boot";
101 reg = <0x0 0x30000>;
102 read-only;
103 };
104
105 partition@30000 {
106 label = "u-boot-env";
107 reg = <0x30000 0x1000>;
108 };
109
110 partition@31000 {
111 label = "config";
112 reg = <0x31000 0xf000>;
113 read-only;
114 };
115
116 factory: partition@40000 {
117 label = "factory";
118 reg = <0x40000 0x10000>;
119 read-only;
120
121 nvmem-layout {
122 compatible = "fixed-layout";
123 #address-cells = <1>;
124 #size-cells = <1>;
125
126 eeprom_factory_0: eeprom@0 {
127 reg = <0x0 0x400>;
128 };
129
130 macaddr_factory_2e: macaddr@2e {
131 reg = <0x2e 0x6>;
132 };
133 };
134 };
135
136 partition@50000 {
137 compatible = "denx,uimage";
138 label = "firmware";
139 reg = <0x50000 0x7b0000>;
140 };
141 };
142 };
143 };
144
145 &wmac {
146 status = "okay";
147
148 nvmem-cells = <&eeprom_factory_0>;
149 nvmem-cell-names = "eeprom";
150 };