xref: /linux/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2-v11.dts (revision 9f2c9170934eace462499ba0bfe042cc72900173)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2019 Hardkernel Co., Ltd
4 * Copyright (c) 2020 Theobroma Systems Design und Consulting GmbH
5 * Copyright (c) 2022 Maya Matuszczyk <maccraft123mc@gmail.com>
6 */
7
8/dts-v1/;
9#include "rk3326-odroid-go.dtsi"
10
11/ {
12	model = "ODROID-GO Advance Black Edition";
13	compatible = "hardkernel,rk3326-odroid-go2-v11", "rockchip,rk3326";
14
15	aliases {
16		mmc1 = &sdio;
17	};
18
19	analog_sticks: adc-joystick {
20		compatible = "adc-joystick";
21		io-channels = <&saradc 1>,
22			      <&saradc 2>;
23		poll-interval = <60>;
24		#address-cells = <1>;
25		#size-cells = <0>;
26
27		axis@0 {
28			reg = <0>;
29			abs-flat = <10>;
30			abs-fuzz = <10>;
31			abs-range = <172 772>;
32			linux,code = <ABS_X>;
33			};
34
35		axis@1 {
36			reg = <1>;
37			abs-flat = <10>;
38			abs-fuzz = <10>;
39			abs-range = <278 815>;
40			linux,code = <ABS_Y>;
41		};
42	};
43
44	battery: battery {
45		compatible = "simple-battery";
46		charge-full-design-microamp-hours = <3000000>;
47		charge-term-current-microamp = <300000>;
48		constant-charge-current-max-microamp = <2000000>;
49		constant-charge-voltage-max-microvolt = <4200000>;
50		factory-internal-resistance-micro-ohms = <180000>;
51		voltage-max-design-microvolt = <4100000>;
52		voltage-min-design-microvolt = <3500000>;
53
54		ocv-capacity-celsius = <20>;
55		ocv-capacity-table-0 =  <4046950 100>, <4001920 95>, <3967900 90>, <3919950 85>,
56					<3888450 80>, <3861850 75>, <3831540 70>, <3799130 65>,
57					<3768190 60>, <3745650 55>, <3726610 50>, <3711630 45>,
58					<3696720 40>, <3685660 35>, <3674950 30>, <3663050 25>,
59					<3649470 20>, <3635260 15>, <3616920 10>, <3592440 5>,
60					<3574170 0>;
61	};
62
63	wifi_pwrseq: wifi-pwrseq {
64		compatible = "mmc-pwrseq-simple";
65		pinctrl-names = "default";
66		pinctrl-0 = <&wifi_pwrseq_pins>;
67		reset-gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;
68	};
69};
70
71&builtin_gamepad {
72	button-sw20 {
73		gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
74		label = "TOP-LEFT 2";
75		linux,code = <BTN_TL2>;
76	};
77	button-sw21 {
78		gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
79		label = "TOP-RIGHT 2";
80		linux,code = <BTN_TR2>;
81	};
82};
83
84&internal_display {
85	compatible = "elida,kd35t133";
86};
87
88&rk817 {
89	regulators {
90		vcc_wifi: LDO_REG9 {
91			regulator-name = "vcc_wifi";
92			regulator-min-microvolt = <3300000>;
93			regulator-max-microvolt = <3300000>;
94
95			regulator-state-mem {
96				regulator-on-in-suspend;
97				regulator-suspend-microvolt = <3300000>;
98			};
99		};
100	};
101};
102
103&rk817_charger {
104	monitored-battery = <&battery>;
105};
106
107&sdio {
108	bus-width = <4>;
109	cap-sd-highspeed;
110	cap-sdio-irq;
111	disable-wp;
112	keep-power-in-suspend;
113	mmc-pwrseq = <&wifi_pwrseq>;
114	non-removable;
115	vmmc-supply = <&vcc_wifi>;
116	#address-cells = <1>;
117	#size-cells = <0>;
118	status = "okay";
119
120	esp8089: wifi@1 {
121		compatible = "esp,esp8089";
122		reg = <1>;
123	};
124};
125
126&pinctrl {
127	btns {
128		btn_pins: btn-pins {
129			rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
130					<1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
131					<1 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
132					<1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
133					<1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>,
134					<1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>,
135					<1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>,
136					<1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>,
137					<2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>,
138					<2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>,
139					<2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
140					<2 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>,
141					<2 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
142					<2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
143					<2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
144					<2 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
145					<3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
146					<3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
147		};
148	};
149
150	wifi {
151		wifi_pwrseq_pins: wifi-pwrseq-pins {
152			rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>,
153					<3 RK_PB6 RK_FUNC_GPIO &pcfg_output_high>;
154		};
155	};
156};
157