summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
blob: c718b8dbb9c6bc0b5055aafa6286a2925efe4d1c (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
109
110
111
112
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright (c) 2022 FriendlyElec Computer Tech. Co., Ltd.
 * (http://www.friendlyelec.com)
 *
 * Copyright (c) 2023 Tianling Shen <cnsztl@gmail.com>
 */

/dts-v1/;
#include "rk3568-nanopi-r5s.dtsi"

/ {
	model = "FriendlyElec NanoPi R5C";
	compatible = "friendlyarm,nanopi-r5c", "rockchip,rk3568";

	gpio-keys {
		compatible = "gpio-keys";
		pinctrl-names = "default";
		pinctrl-0 = <&reset_button_pin>;

		button-reset {
			debounce-interval = <50>;
			gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
			label = "reset";
			linux,code = <KEY_RESTART>;
		};
	};

	gpio-leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&lan_led_pin>, <&power_led_pin>, <&wan_led_pin>, <&wlan_led_pin>;

		led-lan {
			color = <LED_COLOR_ID_GREEN>;
			function = LED_FUNCTION_LAN;
			gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>;
		};

		power_led: led-power {
			color = <LED_COLOR_ID_RED>;
			function = LED_FUNCTION_POWER;
			linux,default-trigger = "heartbeat";
			gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
		};

		led-wan {
			color = <LED_COLOR_ID_GREEN>;
			function = LED_FUNCTION_WAN;
			gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>;
		};

		led-wlan {
			color = <LED_COLOR_ID_GREEN>;
			function = LED_FUNCTION_WLAN;
			gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>;
		};
	};
};

&pcie2x1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pcie20_reset_pin>;
	reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
	status = "okay";
};

&pcie3x1 {
	num-lanes = <1>;
	reset-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
	vpcie3v3-supply = <&vcc3v3_pcie>;
	status = "okay";
};

&pcie3x2 {
	num-lanes = <1>;
	reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
	vpcie3v3-supply = <&vcc3v3_pcie>;
	status = "okay";
};

&pinctrl {
	gpio-leds {
		lan_led_pin: lan-led-pin {
			rockchip,pins = <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
		};

		power_led_pin: power-led-pin {
			rockchip,pins = <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
		};

		wan_led_pin: wan-led-pin {
			rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
		};

		wlan_led_pin: wlan-led-pin {
			rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};

	pcie {
		pcie20_reset_pin: pcie20-reset-pin {
			rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>;
		};
	};

	rockchip-key {
		reset_button_pin: reset-button-pin {
			rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
		};
	};
};