From patchwork Thu Nov 11 03:16:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dang Huynh X-Patchwork-Id: 12613991 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEAFEC4332F for ; Thu, 11 Nov 2021 03:17:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C5C8E619BB for ; Thu, 11 Nov 2021 03:17:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233451AbhKKDUo (ORCPT ); Wed, 10 Nov 2021 22:20:44 -0500 Received: from mx1.riseup.net ([198.252.153.129]:38564 "EHLO mx1.riseup.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233488AbhKKDUk (ORCPT ); Wed, 10 Nov 2021 22:20:40 -0500 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4HqRjp6K0nzF4mX; Wed, 10 Nov 2021 19:17:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1636600670; bh=rJOs4g7bozgwSUa7JZjdMB+XtSwhjDCNlVWpVg72aWc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=paaB4IG4j/C7kHdtFEBYm+xHxe+BBUGWloQk876gC/0fWd9OYJolI1tQ2x2BqZC8c fbRFCB4d4N2yqx2Smv3Vbfnt/e5b62ZRlOoZKKWcpVGajRxO4i40KMCBLz8qF50Q3M H6mbnSShAX8e0r5/FiZVJQlj3gqtzbewM+JRgcTA= X-Riseup-User-ID: 0B43D6D9C3711605E8FEDC38747C0B88BEA6669E54E02F47FA8820D4F5B9F74C Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4HqRjl5TtBz5vVT; Wed, 10 Nov 2021 19:17:47 -0800 (PST) From: Dang Huynh To: Dang Huynh Cc: Andy Gross , Bjorn Andersson , Rob Herring , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Alexey Min , Caleb Connolly , Martin Botka , Konrad Dybcio Subject: [PATCH v3 8/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add USB Date: Thu, 11 Nov 2021 10:16:35 +0700 Message-Id: <20211111031635.3839947-9-danct12@riseup.net> In-Reply-To: <20211111031635.3839947-1-danct12@riseup.net> References: <20211111031635.3839947-1-danct12@riseup.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Alexey Min Enable and configure DWC3 and QUSB2 PHY to enable USB functionality on the Redmi Note 7. Signed-off-by: Alexey Min Co-developed-by: Dang Huynh Signed-off-by: Dang Huynh Reviewed-by: Konrad Dybcio --- .../boot/dts/qcom/sdm660-xiaomi-lavender.dts | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts index 712392545c2e..bf7f334b0b5c 100644 --- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts +++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts @@ -80,6 +80,15 @@ framebuffer_mem: memory@9d400000 { no-map; }; }; + + /* + * Until we hook up type-c detection, we + * have to stick with this. But it works. + */ + extcon_usb: extcon-usb { + compatible = "linux,extcon-usb-gpio"; + id-gpio = <&tlmm 58 GPIO_ACTIVE_HIGH>; + }; }; &blsp1_uart2 { @@ -96,6 +105,13 @@ &pon_resin { linux,code = ; }; +&qusb2phy { + status = "okay"; + + vdd-supply = <&vreg_l1b_0p925>; + vdda-phy-dpdm-supply = <&vreg_l7b_3p125>; +}; + &rpm_requests { pm660l-regulators { compatible = "qcom,rpm-pm660l-regulators"; @@ -401,3 +417,12 @@ &sdhc_2 { &tlmm { gpio-reserved-ranges = <8 4>; }; + +&usb3 { + status = "okay"; +}; + +&usb3_dwc3 { + dr_mode = "peripheral"; + extcon = <&extcon_usb>; +};