summaryrefslogtreecommitdiffstats
path: root/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg503.dts
blob: 3dc01549a5b45a6d08e48243aa15a1312ddf941a (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
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)

/dts-v1/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include "rk3566-anbernic-rgxx3.dtsi"

/ {
	model = "RG503";
	compatible = "anbernic,rg503", "rockchip,rk3566";

	aliases {
		mmc0 = &sdmmc0;
		mmc1 = &sdmmc1;
		mmc2 = &sdmmc2;
	};

	gpio_spi: spi {
		compatible = "spi-gpio";
		pinctrl-names = "default";
		pinctrl-0 = <&spi_pins>;
		#address-cells = <1>;
		#size-cells = <0>;

		sck-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
		mosi-gpios = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
		cs-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
		num-chipselects = <0>;
	};
};

&gpio_keys_control {
	button-a {
		gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>;
		label = "EAST";
		linux,code = <BTN_EAST>;
	};

	button-left {
		gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>;
		label = "DPAD-LEFT";
		linux,code = <BTN_DPAD_LEFT>;
	};

	button-right {
		gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>;
		label = "DPAD-RIGHT";
		linux,code = <BTN_DPAD_RIGHT>;
	};

	button-r1 {
		gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
		label = "TR";
		linux,code = <BTN_TR>;
	};

	button-r2 {
		gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
		label = "TR2";
		linux,code = <BTN_TR2>;
	};

	button-right {
		gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>;
		label = "DPAD-RIGHT";
		linux,code = <BTN_DPAD_RIGHT>;
	};

	button-y {
		gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
		label = "WEST";
		linux,code = <BTN_WEST>;
	};
};

&pinctrl {
	gpio-spi {
		spi_pins: spi-pins {
			rockchip,pins =
				<4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>,
				<4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
				<4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};
};