e6f083482f28d8489b087c768176050949ae7d8b
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_hak5_lan-turtle.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9331.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "Hak5 LAN Turtle";
10 compatible = "hak5,lan-turtle", "qca,ar9331";
11
12 aliases {
13 led-boot = &led_system;
14 led-failsafe = &led_system;
15 led-upgrade = &led_system;
16 serial0 = &uart;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 pinctrl-names = "default";
23 pinctrl-0 = <&enable_gpio11>;
24
25 reset {
26 label = "reset";
27 linux,code = <KEY_RESTART>;
28 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
29 debounce-interval = <60>;
30 };
31 };
32
33 leds {
34 compatible = "gpio-leds";
35
36 pinctrl-names = "default";
37 pinctrl-0 = <&switch_led_disable_pins>;
38
39 led_system: system {
40 label = "lan-turtle:orange:system";
41 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
42 };
43 };
44 };
45
46 &eth0 {
47 status = "okay";
48
49 mtd-mac-address = <&uboot 0x1fc00>;
50 mtd-mac-address-increment = <(-1)>;
51
52 gmac-config {
53 device = <&gmac>;
54
55 switch-phy-addr-swap = <1>;
56 switch-phy-swap = <1>;
57 };
58 };
59
60 &eth1 {
61 status = "okay";
62
63 mtd-mac-address = <&uboot 0x1fc00>;
64 mtd-mac-address-increment = <1>;
65 };
66
67 &pinmux {
68 enable_gpio11: pinmux_enable_gpio11 {
69 pinctrl-single,bits = <0x0 0x0 0x4>;
70 };
71 };
72
73 &spi {
74 status = "okay";
75
76 num-cs = <1>;
77
78 flash@0 {
79 compatible = "jedec,spi-nor";
80 reg = <0>;
81 spi-max-frequency = <50000000>;
82 m25p,fast-read;
83
84 partitions {
85 compatible = "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 uboot: partition@0 {
90 label = "u-boot";
91 reg = <0x000000 0x020000>;
92 read-only;
93 };
94
95 partition@20000 {
96 label = "firmware";
97 reg = <0x020000 0xfd0000>;
98 compatible = "tplink,firmware";
99 };
100
101 partition@ff0000 {
102 label = "art";
103 reg = <0xff0000 0x010000>;
104 read-only;
105 };
106 };
107 };
108 };
109
110 &uart {
111 status = "okay";
112 };
113
114 &usb {
115 status = "okay";
116 };
117
118 &usb_phy {
119 status = "okay";
120 };