aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/dts/ar9344_wd_mynet-n600.dts
blob: 81788fb348ebe1314a5d952954c2702a8196391e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

#include "ar9344_wd_mynet-nxxx.dtsi"
#include <dt-bindings/leds/common.h>

/ {
	model = "Western Digital My Net N600";
	compatible = "wd,mynet-n600", "qca,ar9344";

	aliases {
		led-boot = &led_power;
		led-failsafe = &led_power;
		led-running = &led_power;
		led-upgrade = &led_power;
	};

	leds {
		compatible = "gpio-leds";

		led-0 {
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_WLAN;
			gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
		};

		led_power: led-1 {
			label = "blue:power";
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_POWER;
			gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
		};

		led-2 {
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_WAN;
			gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
		};

		led-3 {
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_WPS;
			gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
		};
	};

	keys {
		compatible = "gpio-keys";

		reset {
			linux,code = <KEY_RESTART>;
			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
		};

		wps {
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
		};
	};
};

&gpio {
	gpio_ext_lna0 {
		gpio-hog;
		gpios = <14 0>;
		output-high;
		line-name = "ext:lna0";
	};

	gpio_ext_lna1 {
		gpio-hog;
		gpios = <15 0>;
		output-high;
		line-name = "ext:lna1";
	};
};

&pinmux {
	pmx_led_switch: pinmux_led_switch {
		pinctrl-single,bits =
			<0x0 0x2c2b2a00 0xffffff00>, /* GPIO1-3 default to PHY2-4 */
			<0x4 0x00000029 0x000000ff>; /* GPIO4 default to PHY1 */
	};
};

&builtin_switch {
	pinctrl-names = "default";
	pinctrl-0 = <&pmx_led_switch>;
};

&usb {
	status = "okay";
};

&eth0 {
	status = "okay";

	phy-handle = <&swphy0>;

	gmac-config {
		device = <&gmac>;
		switch-phy-swap = <1>;
		switch-only-mode = <1>;
	};
};

&eth1 {
	status = "okay";
};