aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts
blob: 01e14bb0b138c93c64d85118145cdccfb82677b1 (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
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

#include "qca9531_alfa-network_r36a.dtsi"

/ {
	model = "ALFA Network R36A";
	compatible = "alfa-network,r36a", "qca,qca9531";

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

	leds {
		compatible = "gpio-leds";

		pinctrl-names = "default";
		pinctrl-0 = <&enable_gpio4 &enable_gpio16>;

		lan {
			label = "blue:lan";
			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
		};

		led_status: status {
			label = "blue:status";
			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
		};

		usb {
			label = "blue:usb";
			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
			trigger-sources = <&hub_port0>;
			linux,default-trigger = "usbport";
		};

		wan {
			label = "blue:wan";
			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
		};

		wlan {
			label = "blue:wlan";
			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "phy0tpt";
		};
	};
};

&eth0 {
	nvmem-cells = <&macaddr_art_1002>;
	nvmem-cell-names = "mac-address";
	mac-address-increment = <(-2)>;
};

&eth1 {
	/* Workaround: keep the Ethernet interfaces order/mapping correct
	 * (GMAC0 -> eth0, GMAC1 -> eth1, same as in old ar71xx target) */
	compatible = "qca,qca9530-eth", "syscon", "simple-mfd";

	nvmem-cells = <&macaddr_art_1002>;
	nvmem-cell-names = "mac-address";
	mac-address-increment = <(-1)>;
};

&gpio_export {
	usb-power {
		gpio-export,name = "usb-power";
		gpio-export,output = <1>;
		gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
	};
};

&keys {
	rfkill {
		label = "rfkill";
		linux,code = <KEY_RFKILL>;
		gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
		debounce-interval = <60>;
	};
};

&art {
	compatible = "nvmem-cells";
	#address-cells = <1>;
	#size-cells = <1>;

	macaddr_art_1002: macaddr@1002 {
		reg = <0x1002 0x6>;
	};
};