/[packages]/updates/8/kernel/current/SOURCES/arm64-dts-rockchip-fix-rk3399-puma-haikou-usb-otg-mo.patch
ViewVC logotype

Contents of /updates/8/kernel/current/SOURCES/arm64-dts-rockchip-fix-rk3399-puma-haikou-usb-otg-mo.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1795002 - (show annotations) (download)
Wed Mar 16 20:40:50 2022 UTC (2 years, 1 month ago) by tmb
File size: 2310 byte(s)
add current -stable queue
1 From 8036db62c9f81b91532c75182c42edcf7d94755c Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Thu, 20 Jan 2022 13:51:56 +0100
4 Subject: arm64: dts: rockchip: fix rk3399-puma-haikou USB OTG mode
5
6 From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
7
8 [ Upstream commit ed2c66a95c0c5669880aa93d0d34c6e9694b4cbd ]
9
10 The micro USB3.0 port available on the Haikou evaluation kit for Puma
11 RK3399-Q7 SoM supports dual-role model (aka drd or OTG) but its support
12 was broken until now because of missing logic around the ID pin.
13
14 This adds proper support for USB OTG on Puma Haikou by "connecting" the
15 GPIO used for USB ID to the USB3 controller device.
16
17 Cc: Quentin Schulz <foss+kernel@0leil.net>
18 Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
19 Link: https://lore.kernel.org/r/20220120125156.16217-1-quentin.schulz@theobroma-systems.com
20 Signed-off-by: Heiko Stuebner <heiko@sntech.de>
21 Signed-off-by: Sasha Levin <sashal@kernel.org>
22 ---
23 .../arm64/boot/dts/rockchip/rk3399-puma-haikou.dts | 1 +
24 arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 14 ++++++++++++++
25 2 files changed, 15 insertions(+)
26
27 diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts
28 index 292bb7e80cf3..3ae5d727e367 100644
29 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts
30 +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma-haikou.dts
31 @@ -232,6 +232,7 @@
32
33 &usbdrd_dwc3_0 {
34 dr_mode = "otg";
35 + extcon = <&extcon_usb3>;
36 status = "okay";
37 };
38
39 diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
40 index fb67db4619ea..002ece51c3ba 100644
41 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
42 +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
43 @@ -25,6 +25,13 @@
44 };
45 };
46
47 + extcon_usb3: extcon-usb3 {
48 + compatible = "linux,extcon-usb-gpio";
49 + id-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>;
50 + pinctrl-names = "default";
51 + pinctrl-0 = <&usb3_id>;
52 + };
53 +
54 clkin_gmac: external-gmac-clock {
55 compatible = "fixed-clock";
56 clock-frequency = <125000000>;
57 @@ -422,6 +429,13 @@
58 <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
59 };
60 };
61 +
62 + usb3 {
63 + usb3_id: usb3-id {
64 + rockchip,pins =
65 + <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
66 + };
67 + };
68 };
69
70 &sdhci {
71 --
72 2.34.1
73

  ViewVC Help
Powered by ViewVC 1.1.30