From patchwork Mon Nov 8 05:03:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dang Huynh X-Patchwork-Id: 12607833 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 78153C43217 for ; Mon, 8 Nov 2021 05:06:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 613D36162E for ; Mon, 8 Nov 2021 05:06:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237631AbhKHFJW (ORCPT ); Mon, 8 Nov 2021 00:09:22 -0500 Received: from mx1.riseup.net ([198.252.153.129]:55570 "EHLO mx1.riseup.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237638AbhKHFJO (ORCPT ); Mon, 8 Nov 2021 00:09:14 -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 4HnfGW4rQwzF3K9; Sun, 7 Nov 2021 21:06:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1636347987; bh=F2q5E8Qn4Ne5vZ3VtvcvBFAEC8rtQNkSMlH8Ci6joyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OZubvlMTmL5F8AcRGdwTNv76eKaCA8W6OQqdvOTb3rpr38ij63KbcT/8SO2j9dIk0 rDyivIjMj6n4pIxRWMwKooL226OpNx4Z0EMCY7OQK7bI0vPq+pZ3hMEVjYgW/VBzVy EqSGCefpX4I+QPaRkN9BjD4q42zktTZw8pIMuF1U= X-Riseup-User-ID: 8E9E742E70D9B4256ACE2F1FB7293BF8B30C92B3D3217CDF4250889B2F989CBA Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4HnfGS2ytkz5vj2; Sun, 7 Nov 2021 21:06:24 -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, martin.botka@somainline.org, marijn.suijten@somainline.org, paul.bouchara@somainline.org, angelogioacchino.delregno@somainline.org, Caleb Connolly Subject: [PATCH v2 7/7] arm64: dts: qcom: sdm660-xiaomi-lavender: Add USB Date: Mon, 8 Nov 2021 12:03:36 +0700 Message-Id: <20211108050336.3404559-8-danct12@riseup.net> In-Reply-To: <20211108050336.3404559-1-danct12@riseup.net> References: <20211108050336.3404559-1-danct12@riseup.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Enable and configure DWC3 and QUSB2 PHY to enable USB functionality on the Redmi Note 7. Signed-off-by: Dang Huynh --- .../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 122b487f197b..a34812e91160 100644 --- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts +++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts @@ -82,6 +82,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 { @@ -98,6 +107,13 @@ voldown { }; }; +&qusb2phy { + status = "okay"; + + vdd-supply = <&vreg_l1b_0p925>; + vdda-phy-dpdm-supply = <&vreg_l7b_3p125>; +}; + &rpm_requests { pm660l-regulators { compatible = "qcom,rpm-pm660l-regulators"; @@ -403,3 +419,12 @@ &sdhc_2 { &tlmm { gpio-reserved-ranges = <8 4>; }; + +&usb3 { + status = "okay"; +}; + +&usb3_dwc3 { + dr_mode = "peripheral"; + extcon = <&extcon_usb>; +};