Message ID | 20221213123823.455731-4-bhupesh.sharma@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp95168wrn; Tue, 13 Dec 2022 04:45:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf7GFGUG+M3fkYEFcknhi4hqys2ZSYapDyNq/JIr3mF+LVfucIBW7Yxe9yacrS3uTJiREor9 X-Received: by 2002:a17:902:d717:b0:188:fc68:d366 with SMTP id w23-20020a170902d71700b00188fc68d366mr20818718ply.40.1670935510413; Tue, 13 Dec 2022 04:45:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670935510; cv=none; d=google.com; s=arc-20160816; b=PvqbPD0VKI856m+Ti3YQvlp2qkaTOiNXaojB4zZ02LrsmfbpYc0GvFiobtYeUMqqyZ mQeVjU7VmgLVGluN236q2l24rtjIZ1O865Tqw6cnR210Gw0bIFOcaBCXtA22QQ+6teGp hZOd/NSrEM+MMMN1xdEXP02B5lIOVIy2LgGruY1pyl8L7LxuqxljJtiiCx/y7zibGgWL jp6TWf6XHpcmvtsZwDDChthvjU2/LObBRWoPl0sOV3aRfzbJnT3ALiLQL4WmB+5Q5lym a0t63mAw8+nLgX1EDex5NRb9llDSzbjODGNqS6tNT1iduJcWcRuVorCy56LsLJB+BPg8 jnJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YePhAvYUlwABIizeZpsWNnCslmbzuPktDGT0aWh+WCg=; b=f0/5oi+kAwSu2TDIZ4f/0msoob3TsDrJDcr7S7wUVWb8mzxXSxFZTWXMe9JGpr2woi WcSEXD+xVBqJraTs4uwr1OtGBHCIETa0XIFgBRxbPDNk3kS449PSuYZbUDuWzw8gl6bo qz82ZWo3oTzFfko8b1zg77efuwWGWNmoUtKhoamYlml3XYmIP27LqgjhUihYLodc2rmm 9iN1qq54xlcGmbNS181gPnY5KoioDgQgoaSkWdrDbB7QXOvMEyFl6pSYGhLhhYAfilhk DDcpMyNCVrDkINcLOFCvA2NOLjKmQh4HLiFdPH7jEPohXqsfp2dO13XSks//5XV6Pebo Olcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="wv/khjKA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z17-20020a170902d55100b0017f75654a27si12321992plf.510.2022.12.13.04.44.54; Tue, 13 Dec 2022 04:45:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="wv/khjKA"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235703AbiLMMlU (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Tue, 13 Dec 2022 07:41:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235691AbiLMMk0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 13 Dec 2022 07:40:26 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 895C01FF88 for <linux-kernel@vger.kernel.org>; Tue, 13 Dec 2022 04:38:46 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id gt4so3263722pjb.1 for <linux-kernel@vger.kernel.org>; Tue, 13 Dec 2022 04:38:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YePhAvYUlwABIizeZpsWNnCslmbzuPktDGT0aWh+WCg=; b=wv/khjKASLevaKX2RJcymDxwDpHNeoxY2XZUcYsF+4DMkZIR6kzHyWjRoTxhxczneR EWMsMfMZk0zWvLbKdv5PZ83Oggfy4nd5VWWR2ghyKqIFxUjhaQxkjUvRzGqdX28Q3gI/ xb2m92RWtb4jDUJhiNilm04L+BlZAq/J2HMUAC478z3BrOudaD2+kwoT4GRYRATr4CVC 60QBlrGkS6GxVrTWd67MXhMoSdQKn6/nWkx5JZYrQSJxUYWVGhWHRe5Oc9cmmtimh57M nSZYflCcfncJN0nwJPtrBolVCYn2fFHBhj6Qx36xFEhDPIg5ifJ6Qthqr4U1Axqj9lWh yufQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YePhAvYUlwABIizeZpsWNnCslmbzuPktDGT0aWh+WCg=; b=1jczGCeLmZ5X30GNDdpLW5tv0l7Bs0+wZ8t/XBr8pRkevgHnXNz4syXtojP0K2m20W 0KGjiS2ooVXPfyPen9CpqiCMYHQtHyyQjGiBQKSXL7wZhS+3toG7rTVAQvUx41C2PVho 6dR1Mz5jhDNTTcmTzLafEcybOiyXNZ3NSsR82R47oYOYQHG0zoekY1M7S3ZL27lRinvO nFu3R5p8nbUua/uBqKKZsuqwYrJlZUd2I+h6Q+7OP/g3zYZ3J0Yg/JMfGs/S50L7o12B EhhnkXmGM91lF4VgtCOT15jWylhva7OSj6Od4pW0oH2aifGeQEH5DQsCsG7K9bEAHy0N twYw== X-Gm-Message-State: ANoB5pk6r2IEeAUAu7e4zH+ioELY9aDlR0KzTz74xOb+nXWLLyxjKCB5 hM5imQYz1vy386Bxuf/pwxCgTA== X-Received: by 2002:a17:902:e851:b0:189:a6b4:91ed with SMTP id t17-20020a170902e85100b00189a6b491edmr28013735plg.17.1670935125702; Tue, 13 Dec 2022 04:38:45 -0800 (PST) Received: from localhost.localdomain ([2401:4900:1c60:4bad:5c3:ab51:3d81:6264]) by smtp.gmail.com with ESMTPSA id m12-20020a170902c44c00b001889e58d520sm8297011plm.184.2022.12.13.04.38.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 04:38:45 -0800 (PST) From: Bhupesh Sharma <bhupesh.sharma@linaro.org> To: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: agross@kernel.org, bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, krzysztof.kozlowski@linaro.org, konrad.dybcio@linaro.org, andersson@kernel.org Subject: [PATCH 3/3] arm64: dts: qcom: sm6115: Add USB SS qmp phy node Date: Tue, 13 Dec 2022 18:08:23 +0530 Message-Id: <20221213123823.455731-4-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221213123823.455731-1-bhupesh.sharma@linaro.org> References: <20221213123823.455731-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752102873736719714?= X-GMAIL-MSGID: =?utf-8?q?1752102873736719714?= |
Series |
arm64: dts: sm6115: Add USB SS qmp phy node and perform some cleanups
|
|
Commit Message
Bhupesh Sharma
Dec. 13, 2022, 12:38 p.m. UTC
Add USB superspeed qmp phy node to dtsi.
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
---
arch/arm64/boot/dts/qcom/sm6115.dtsi | 38 ++++++++++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
Comments
On 13.12.2022 13:38, Bhupesh Sharma wrote: > Add USB superspeed qmp phy node to dtsi. > > Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> > --- Please run make dtbs_check before sending dt patches, this one introduces new errors. > arch/arm64/boot/dts/qcom/sm6115.dtsi | 38 ++++++++++++++++++++++++++-- > 1 file changed, 36 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi > index e4ce135264f3d..9c5c024919f92 100644 > --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi > +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi > @@ -579,6 +579,40 @@ usb_hsphy: phy@1613000 { > status = "disabled"; > }; > > + usb_qmpphy: phy@1615000 { > + compatible = "qcom,sm6115-qmp-usb3-phy"; > + reg = <0x01615000 0x200>; > + #clock-cells = <1>; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges; These -cells and ranges properties could go after status=disabled Konrad > + clocks = <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, > + <&gcc GCC_USB3_PRIM_CLKREF_CLK>, > + <&gcc GCC_AHB2PHY_USB_CLK>; > + clock-names = "com_aux", > + "ref", > + "cfg_ahb"; > + resets = <&gcc GCC_USB3_PHY_PRIM_SP0_BCR>, > + <&gcc GCC_USB3PHY_PHY_PRIM_SP0_BCR>; > + reset-names = "phy", "phy_phy"; > + status = "disabled"; > + > + usb_ssphy: phy@1615200 { > + reg = <0x01615200 0x200>, > + <0x01615400 0x200>, > + <0x01615c00 0x400>, > + <0x01615600 0x200>, > + <0x01615800 0x200>, > + <0x01615a00 0x100>; > + #phy-cells = <0>; > + #clock-cells = <1>; > + clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; > + clock-names = "pipe0"; > + clock-output-names = "usb3_phy_pipe_clk_src"; > + }; > + }; > + > + > qfprom@1b40000 { > compatible = "qcom,sm6115-qfprom", "qcom,qfprom"; > reg = <0x01b40000 0x7000>; > @@ -1023,8 +1057,8 @@ usb_dwc3: usb@4e00000 { > compatible = "snps,dwc3"; > reg = <0x04e00000 0xcd00>; > interrupts = <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>; > - phys = <&usb_hsphy>; > - phy-names = "usb2-phy"; > + phys = <&usb_hsphy>, <&usb_ssphy>; > + phy-names = "usb2-phy", "usb3-phy"; > iommus = <&apps_smmu 0x120 0x0>; > snps,dis_u2_susphy_quirk; > snps,dis_enblslpm_quirk;
On 13/12/2022 13:38, Bhupesh Sharma wrote: > Add USB superspeed qmp phy node to dtsi. > > Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> > --- > arch/arm64/boot/dts/qcom/sm6115.dtsi | 38 ++++++++++++++++++++++++++-- > 1 file changed, 36 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi > index e4ce135264f3d..9c5c024919f92 100644 > --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi > +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi > @@ -579,6 +579,40 @@ usb_hsphy: phy@1613000 { > status = "disabled"; > }; > > + usb_qmpphy: phy@1615000 { > + compatible = "qcom,sm6115-qmp-usb3-phy"; > + reg = <0x01615000 0x200>; > + #clock-cells = <1>; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges; > + clocks = <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, > + <&gcc GCC_USB3_PRIM_CLKREF_CLK>, > + <&gcc GCC_AHB2PHY_USB_CLK>; > + clock-names = "com_aux", > + "ref", > + "cfg_ahb"; > + resets = <&gcc GCC_USB3_PHY_PRIM_SP0_BCR>, > + <&gcc GCC_USB3PHY_PHY_PRIM_SP0_BCR>; > + reset-names = "phy", "phy_phy"; > + status = "disabled"; Hm, you add a disabled PHY which is used by existing controller. The controller is enabled in board DTS, but new PHY node isn't. Aren't you now breaking it? > + > + usb_ssphy: phy@1615200 { > + reg = <0x01615200 0x200>, > + <0x01615400 0x200>, > + <0x01615c00 0x400>, > + <0x01615600 0x200>, > + <0x01615800 0x200>, > + <0x01615a00 0x100>; > + #phy-cells = <0>; > + #clock-cells = <1>; > + clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; > + clock-names = "pipe0"; > + clock-output-names = "usb3_phy_pipe_clk_src"; > + }; > + }; > + > + Just one blank line. > qfprom@1b40000 { > compatible = "qcom,sm6115-qfprom", "qcom,qfprom"; > reg = <0x01b40000 0x7000>; > @@ -1023,8 +1057,8 @@ usb_dwc3: usb@4e00000 { > compatible = "snps,dwc3"; > reg = <0x04e00000 0xcd00>; > interrupts = <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>; > - phys = <&usb_hsphy>; > - phy-names = "usb2-phy"; > + phys = <&usb_hsphy>, <&usb_ssphy>; > + phy-names = "usb2-phy", "usb3-phy"; > iommus = <&apps_smmu 0x120 0x0>; > snps,dis_u2_susphy_quirk; > snps,dis_enblslpm_quirk; Best regards, Krzysztof
Hi Krzysztof, On Tue, 13 Dec 2022 at 18:26, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 13/12/2022 13:38, Bhupesh Sharma wrote: > > Add USB superspeed qmp phy node to dtsi. > > > > Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> > > --- > > arch/arm64/boot/dts/qcom/sm6115.dtsi | 38 ++++++++++++++++++++++++++-- > > 1 file changed, 36 insertions(+), 2 deletions(-) > > > > diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi > > index e4ce135264f3d..9c5c024919f92 100644 > > --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi > > +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi > > @@ -579,6 +579,40 @@ usb_hsphy: phy@1613000 { > > status = "disabled"; > > }; > > > > + usb_qmpphy: phy@1615000 { > > + compatible = "qcom,sm6115-qmp-usb3-phy"; > > + reg = <0x01615000 0x200>; > > + #clock-cells = <1>; > > + #address-cells = <1>; > > + #size-cells = <1>; > > + ranges; > > + clocks = <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, > > + <&gcc GCC_USB3_PRIM_CLKREF_CLK>, > > + <&gcc GCC_AHB2PHY_USB_CLK>; > > + clock-names = "com_aux", > > + "ref", > > + "cfg_ahb"; > > + resets = <&gcc GCC_USB3_PHY_PRIM_SP0_BCR>, > > + <&gcc GCC_USB3PHY_PHY_PRIM_SP0_BCR>; > > + reset-names = "phy", "phy_phy"; > > + status = "disabled"; > > Hm, you add a disabled PHY which is used by existing controller. The > controller is enabled in board DTS, but new PHY node isn't. Aren't you > now breaking it? The USB controller is connected to two PHYs - one is HS PHY and the other is SS QMP Phy. So while the exiting board dts describes and uses only the HS PHY, newer board dts files (which will soon be sent out as a separate patch), will use both the HS and SS USB PHYs. So, this will not break the existing board dts files. > > + > > + usb_ssphy: phy@1615200 { > > + reg = <0x01615200 0x200>, > > + <0x01615400 0x200>, > > + <0x01615c00 0x400>, > > + <0x01615600 0x200>, > > + <0x01615800 0x200>, > > + <0x01615a00 0x100>; > > + #phy-cells = <0>; > > + #clock-cells = <1>; > > + clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; > > + clock-names = "pipe0"; > > + clock-output-names = "usb3_phy_pipe_clk_src"; > > + }; > > + }; > > + > > + > > Just one blank line. Ok, Will fix it in v2. > > qfprom@1b40000 { > > compatible = "qcom,sm6115-qfprom", "qcom,qfprom"; > > reg = <0x01b40000 0x7000>; > > @@ -1023,8 +1057,8 @@ usb_dwc3: usb@4e00000 { > > compatible = "snps,dwc3"; > > reg = <0x04e00000 0xcd00>; > > interrupts = <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>; > > - phys = <&usb_hsphy>; > > - phy-names = "usb2-phy"; > > + phys = <&usb_hsphy>, <&usb_ssphy>; > > + phy-names = "usb2-phy", "usb3-phy"; > > iommus = <&apps_smmu 0x120 0x0>; > > snps,dis_u2_susphy_quirk; > > snps,dis_enblslpm_quirk; > Thanks, Bhupesh
On 13.12.2022 19:52, Bhupesh Sharma wrote: > Hi Krzysztof, > > On Tue, 13 Dec 2022 at 18:26, Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: >> >> On 13/12/2022 13:38, Bhupesh Sharma wrote: >>> Add USB superspeed qmp phy node to dtsi. >>> >>> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> >>> --- >>> arch/arm64/boot/dts/qcom/sm6115.dtsi | 38 ++++++++++++++++++++++++++-- >>> 1 file changed, 36 insertions(+), 2 deletions(-) >>> >>> diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi >>> index e4ce135264f3d..9c5c024919f92 100644 >>> --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi >>> +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi >>> @@ -579,6 +579,40 @@ usb_hsphy: phy@1613000 { >>> status = "disabled"; >>> }; >>> >>> + usb_qmpphy: phy@1615000 { >>> + compatible = "qcom,sm6115-qmp-usb3-phy"; >>> + reg = <0x01615000 0x200>; >>> + #clock-cells = <1>; >>> + #address-cells = <1>; >>> + #size-cells = <1>; >>> + ranges; >>> + clocks = <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, >>> + <&gcc GCC_USB3_PRIM_CLKREF_CLK>, >>> + <&gcc GCC_AHB2PHY_USB_CLK>; >>> + clock-names = "com_aux", >>> + "ref", >>> + "cfg_ahb"; >>> + resets = <&gcc GCC_USB3_PHY_PRIM_SP0_BCR>, >>> + <&gcc GCC_USB3PHY_PHY_PRIM_SP0_BCR>; >>> + reset-names = "phy", "phy_phy"; >>> + status = "disabled"; >> >> Hm, you add a disabled PHY which is used by existing controller. The >> controller is enabled in board DTS, but new PHY node isn't. Aren't you >> now breaking it? > > The USB controller is connected to two PHYs - one is HS PHY and the other is SS > QMP Phy. So while the exiting board dts describes and uses only the HS > PHY, newer > board dts files (which will soon be sent out as a separate patch), > will use both the HS and SS > USB PHYs. It will break Oneplus billie2, you need to specify just the usb2 phy (and phy-names with just usb2-phy) there. Otherwise it's gonna end up waiting infinitely for the usb3 one to probe (but it won't because it's disabled) Konrad > > So, this will not break the existing board dts files. > >>> + >>> + usb_ssphy: phy@1615200 { >>> + reg = <0x01615200 0x200>, >>> + <0x01615400 0x200>, >>> + <0x01615c00 0x400>, >>> + <0x01615600 0x200>, >>> + <0x01615800 0x200>, >>> + <0x01615a00 0x100>; >>> + #phy-cells = <0>; >>> + #clock-cells = <1>; >>> + clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; >>> + clock-names = "pipe0"; >>> + clock-output-names = "usb3_phy_pipe_clk_src"; >>> + }; >>> + }; >>> + >>> + >> >> Just one blank line. > > Ok, Will fix it in v2. > >>> qfprom@1b40000 { >>> compatible = "qcom,sm6115-qfprom", "qcom,qfprom"; >>> reg = <0x01b40000 0x7000>; >>> @@ -1023,8 +1057,8 @@ usb_dwc3: usb@4e00000 { >>> compatible = "snps,dwc3"; >>> reg = <0x04e00000 0xcd00>; >>> interrupts = <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>; >>> - phys = <&usb_hsphy>; >>> - phy-names = "usb2-phy"; >>> + phys = <&usb_hsphy>, <&usb_ssphy>; >>> + phy-names = "usb2-phy", "usb3-phy"; >>> iommus = <&apps_smmu 0x120 0x0>; >>> snps,dis_u2_susphy_quirk; >>> snps,dis_enblslpm_quirk; >> > > Thanks, > Bhupesh
On 13/12/2022 19:52, Bhupesh Sharma wrote: > Hi Krzysztof, > > On Tue, 13 Dec 2022 at 18:26, Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: >> >> On 13/12/2022 13:38, Bhupesh Sharma wrote: >>> Add USB superspeed qmp phy node to dtsi. >>> >>> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> >>> --- >>> arch/arm64/boot/dts/qcom/sm6115.dtsi | 38 ++++++++++++++++++++++++++-- >>> 1 file changed, 36 insertions(+), 2 deletions(-) >>> >>> diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi >>> index e4ce135264f3d..9c5c024919f92 100644 >>> --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi >>> +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi >>> @@ -579,6 +579,40 @@ usb_hsphy: phy@1613000 { >>> status = "disabled"; >>> }; >>> >>> + usb_qmpphy: phy@1615000 { >>> + compatible = "qcom,sm6115-qmp-usb3-phy"; >>> + reg = <0x01615000 0x200>; >>> + #clock-cells = <1>; >>> + #address-cells = <1>; >>> + #size-cells = <1>; >>> + ranges; >>> + clocks = <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, >>> + <&gcc GCC_USB3_PRIM_CLKREF_CLK>, >>> + <&gcc GCC_AHB2PHY_USB_CLK>; >>> + clock-names = "com_aux", >>> + "ref", >>> + "cfg_ahb"; >>> + resets = <&gcc GCC_USB3_PHY_PRIM_SP0_BCR>, >>> + <&gcc GCC_USB3PHY_PHY_PRIM_SP0_BCR>; >>> + reset-names = "phy", "phy_phy"; >>> + status = "disabled"; >> >> Hm, you add a disabled PHY which is used by existing controller. The >> controller is enabled in board DTS, but new PHY node isn't. Aren't you >> now breaking it? > > The USB controller is connected to two PHYs - one is HS PHY and the other is SS > QMP Phy. So while the exiting board dts describes and uses only the HS > PHY, newer > board dts files (which will soon be sent out as a separate patch), Then I miss how do you narrow the existing DTS to use only one PHY. I don't see anything in this patchset. > will use both the HS and SS > USB PHYs. > > So, this will not break the existing board dts files. I still think it will be. The board boots with USB with one phy enabled and one disabled. The driver gets phys unconditionally and one of them is disabled. Even if Linux implementation will work (devm_usb_get_phy_by_phandle will return -ENXIO or -ENODEV for disabled node), it is still a bit confusing and I wonder how other users of such DTS should behave. Although it will affect only one board, so maybe there are no other users? Best regards, Krzysztof
On 13 December 2022 14:49:05 EET, Konrad Dybcio <konrad.dybcio@linaro.org> wrote: > > >On 13.12.2022 13:38, Bhupesh Sharma wrote: >> Add USB superspeed qmp phy node to dtsi. >> >> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> >> --- >Please run make dtbs_check before sending dt patches, this one >introduces new errors. > > >> arch/arm64/boot/dts/qcom/sm6115.dtsi | 38 ++++++++++++++++++++++++++-- >> 1 file changed, 36 insertions(+), 2 deletions(-) >> >> diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi >> index e4ce135264f3d..9c5c024919f92 100644 >> --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi >> +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi >> @@ -579,6 +579,40 @@ usb_hsphy: phy@1613000 { >> status = "disabled"; >> }; >> >> + usb_qmpphy: phy@1615000 { >> + compatible = "qcom,sm6115-qmp-usb3-phy"; >> + reg = <0x01615000 0x200>; >> + #clock-cells = <1>; >> + #address-cells = <1>; >> + #size-cells = <1>; >> + ranges; >These -cells and ranges properties could go after status=disabled > >Konrad >> + clocks = <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, >> + <&gcc GCC_USB3_PRIM_CLKREF_CLK>, >> + <&gcc GCC_AHB2PHY_USB_CLK>; >> + clock-names = "com_aux", >> + "ref", >> + "cfg_ahb"; >> + resets = <&gcc GCC_USB3_PHY_PRIM_SP0_BCR>, >> + <&gcc GCC_USB3PHY_PHY_PRIM_SP0_BCR>; >> + reset-names = "phy", "phy_phy"; >> + status = "disabled"; >> + >> + usb_ssphy: phy@1615200 { We should not introduce additional qmp-with-child PHY nodes. >> + reg = <0x01615200 0x200>, >> + <0x01615400 0x200>, >> + <0x01615c00 0x400>, >> + <0x01615600 0x200>, >> + <0x01615800 0x200>, >> + <0x01615a00 0x100>; >> + #phy-cells = <0>; >> + #clock-cells = <1>; >> + clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; >> + clock-names = "pipe0"; >> + clock-output-names = "usb3_phy_pipe_clk_src"; >> + }; >> + }; >> + >> + >> qfprom@1b40000 { >> compatible = "qcom,sm6115-qfprom", "qcom,qfprom"; >> reg = <0x01b40000 0x7000>; >> @@ -1023,8 +1057,8 @@ usb_dwc3: usb@4e00000 { >> compatible = "snps,dwc3"; >> reg = <0x04e00000 0xcd00>; >> interrupts = <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>; >> - phys = <&usb_hsphy>; >> - phy-names = "usb2-phy"; >> + phys = <&usb_hsphy>, <&usb_ssphy>; >> + phy-names = "usb2-phy", "usb3-phy"; >> iommus = <&apps_smmu 0x120 0x0>; >> snps,dis_u2_susphy_quirk; >> snps,dis_enblslpm_quirk;
On Wed, 14 Dec 2022 at 03:48, Dmitry Baryshkov <dmitry.baryshkov@linaro.org> wrote: > > > > On 13 December 2022 14:49:05 EET, Konrad Dybcio <konrad.dybcio@linaro.org> wrote: > > > > > >On 13.12.2022 13:38, Bhupesh Sharma wrote: > >> Add USB superspeed qmp phy node to dtsi. > >> > >> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> > >> --- > >Please run make dtbs_check before sending dt patches, this one > >introduces new errors. > > > > > >> arch/arm64/boot/dts/qcom/sm6115.dtsi | 38 ++++++++++++++++++++++++++-- > >> 1 file changed, 36 insertions(+), 2 deletions(-) > >> > >> diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi > >> index e4ce135264f3d..9c5c024919f92 100644 > >> --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi > >> +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi > >> @@ -579,6 +579,40 @@ usb_hsphy: phy@1613000 { > >> status = "disabled"; > >> }; > >> > >> + usb_qmpphy: phy@1615000 { > >> + compatible = "qcom,sm6115-qmp-usb3-phy"; > >> + reg = <0x01615000 0x200>; > >> + #clock-cells = <1>; > >> + #address-cells = <1>; > >> + #size-cells = <1>; > >> + ranges; > >These -cells and ranges properties could go after status=disabled > > > >Konrad > >> + clocks = <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, > >> + <&gcc GCC_USB3_PRIM_CLKREF_CLK>, > >> + <&gcc GCC_AHB2PHY_USB_CLK>; > >> + clock-names = "com_aux", > >> + "ref", > >> + "cfg_ahb"; > >> + resets = <&gcc GCC_USB3_PHY_PRIM_SP0_BCR>, > >> + <&gcc GCC_USB3PHY_PHY_PRIM_SP0_BCR>; > >> + reset-names = "phy", "phy_phy"; > >> + status = "disabled"; > >> + > >> + usb_ssphy: phy@1615200 { > > We should not introduce additional qmp-with-child PHY nodes. Not sure I understand your point. Is there some recent change (being discussed) regarding the same? Thanks, Bhupesh > > >> + reg = <0x01615200 0x200>, > >> + <0x01615400 0x200>, > >> + <0x01615c00 0x400>, > >> + <0x01615600 0x200>, > >> + <0x01615800 0x200>, > >> + <0x01615a00 0x100>; > >> + #phy-cells = <0>; > >> + #clock-cells = <1>; > >> + clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; > >> + clock-names = "pipe0"; > >> + clock-output-names = "usb3_phy_pipe_clk_src"; > >> + }; > >> + }; > >> + > >> + > >> qfprom@1b40000 { > >> compatible = "qcom,sm6115-qfprom", "qcom,qfprom"; > >> reg = <0x01b40000 0x7000>; > >> @@ -1023,8 +1057,8 @@ usb_dwc3: usb@4e00000 { > >> compatible = "snps,dwc3"; > >> reg = <0x04e00000 0xcd00>; > >> interrupts = <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>; > >> - phys = <&usb_hsphy>; > >> - phy-names = "usb2-phy"; > >> + phys = <&usb_hsphy>, <&usb_ssphy>; > >> + phy-names = "usb2-phy", "usb3-phy"; > >> iommus = <&apps_smmu 0x120 0x0>; > >> snps,dis_u2_susphy_quirk; > >> snps,dis_enblslpm_quirk; > > -- > With best wishes > Dmitry
On Wed, 14 Dec 2022 at 00:29, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 13/12/2022 19:52, Bhupesh Sharma wrote: > > Hi Krzysztof, > > > > On Tue, 13 Dec 2022 at 18:26, Krzysztof Kozlowski > > <krzysztof.kozlowski@linaro.org> wrote: > >> > >> On 13/12/2022 13:38, Bhupesh Sharma wrote: > >>> Add USB superspeed qmp phy node to dtsi. > >>> > >>> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> > >>> --- > >>> arch/arm64/boot/dts/qcom/sm6115.dtsi | 38 ++++++++++++++++++++++++++-- > >>> 1 file changed, 36 insertions(+), 2 deletions(-) > >>> > >>> diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi > >>> index e4ce135264f3d..9c5c024919f92 100644 > >>> --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi > >>> +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi > >>> @@ -579,6 +579,40 @@ usb_hsphy: phy@1613000 { > >>> status = "disabled"; > >>> }; > >>> > >>> + usb_qmpphy: phy@1615000 { > >>> + compatible = "qcom,sm6115-qmp-usb3-phy"; > >>> + reg = <0x01615000 0x200>; > >>> + #clock-cells = <1>; > >>> + #address-cells = <1>; > >>> + #size-cells = <1>; > >>> + ranges; > >>> + clocks = <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, > >>> + <&gcc GCC_USB3_PRIM_CLKREF_CLK>, > >>> + <&gcc GCC_AHB2PHY_USB_CLK>; > >>> + clock-names = "com_aux", > >>> + "ref", > >>> + "cfg_ahb"; > >>> + resets = <&gcc GCC_USB3_PHY_PRIM_SP0_BCR>, > >>> + <&gcc GCC_USB3PHY_PHY_PRIM_SP0_BCR>; > >>> + reset-names = "phy", "phy_phy"; > >>> + status = "disabled"; > >> > >> Hm, you add a disabled PHY which is used by existing controller. The > >> controller is enabled in board DTS, but new PHY node isn't. Aren't you > >> now breaking it? > > > > The USB controller is connected to two PHYs - one is HS PHY and the other is SS > > QMP Phy. So while the exiting board dts describes and uses only the HS > > PHY, newer > > board dts files (which will soon be sent out as a separate patch), > > Then I miss how do you narrow the existing DTS to use only one PHY. I > don't see anything in this patchset. > > > will use both the HS and SS > > USB PHYs. > > > > So, this will not break the existing board dts files. > > I still think it will be. The board boots with USB with one phy enabled > and one disabled. The driver gets phys unconditionally and one of them > is disabled. > > Even if Linux implementation will work (devm_usb_get_phy_by_phandle will > return -ENXIO or -ENODEV for disabled node), it is still a bit confusing > and I wonder how other users of such DTS should behave. Although it will > affect only one board, so maybe there are no other users? Ah, now I get your point. So how does the following fix in sm4250-oneplus-billie2.dts look like. It allows the base dtsi to carry the usb nodes as exposed by the SoC and allows other board dts files to use both the USB2 and UBS3 PHYs. Please let me know. --- a/arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts +++ b/arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts @@ -232,6 +232,9 @@ &usb { &usb_dwc3 { maximum-speed = "high-speed"; dr_mode = "peripheral"; + + phys = <&usb_hsphy>; + phy-names = "usb2-phy"; }; Thanks.
On 14.12.2022 06:20, Bhupesh Sharma wrote: > On Wed, 14 Dec 2022 at 00:29, Krzysztof Kozlowski > <krzysztof.kozlowski@linaro.org> wrote: >> >> On 13/12/2022 19:52, Bhupesh Sharma wrote: >>> Hi Krzysztof, >>> >>> On Tue, 13 Dec 2022 at 18:26, Krzysztof Kozlowski >>> <krzysztof.kozlowski@linaro.org> wrote: >>>> >>>> On 13/12/2022 13:38, Bhupesh Sharma wrote: >>>>> Add USB superspeed qmp phy node to dtsi. >>>>> >>>>> Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> >>>>> --- >>>>> arch/arm64/boot/dts/qcom/sm6115.dtsi | 38 ++++++++++++++++++++++++++-- >>>>> 1 file changed, 36 insertions(+), 2 deletions(-) >>>>> >>>>> diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi >>>>> index e4ce135264f3d..9c5c024919f92 100644 >>>>> --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi >>>>> +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi >>>>> @@ -579,6 +579,40 @@ usb_hsphy: phy@1613000 { >>>>> status = "disabled"; >>>>> }; >>>>> >>>>> + usb_qmpphy: phy@1615000 { >>>>> + compatible = "qcom,sm6115-qmp-usb3-phy"; >>>>> + reg = <0x01615000 0x200>; >>>>> + #clock-cells = <1>; >>>>> + #address-cells = <1>; >>>>> + #size-cells = <1>; >>>>> + ranges; >>>>> + clocks = <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, >>>>> + <&gcc GCC_USB3_PRIM_CLKREF_CLK>, >>>>> + <&gcc GCC_AHB2PHY_USB_CLK>; >>>>> + clock-names = "com_aux", >>>>> + "ref", >>>>> + "cfg_ahb"; >>>>> + resets = <&gcc GCC_USB3_PHY_PRIM_SP0_BCR>, >>>>> + <&gcc GCC_USB3PHY_PHY_PRIM_SP0_BCR>; >>>>> + reset-names = "phy", "phy_phy"; >>>>> + status = "disabled"; >>>> >>>> Hm, you add a disabled PHY which is used by existing controller. The >>>> controller is enabled in board DTS, but new PHY node isn't. Aren't you >>>> now breaking it? >>> >>> The USB controller is connected to two PHYs - one is HS PHY and the other is SS >>> QMP Phy. So while the exiting board dts describes and uses only the HS >>> PHY, newer >>> board dts files (which will soon be sent out as a separate patch), >> >> Then I miss how do you narrow the existing DTS to use only one PHY. I >> don't see anything in this patchset. >> >>> will use both the HS and SS >>> USB PHYs. >>> >>> So, this will not break the existing board dts files. >> >> I still think it will be. The board boots with USB with one phy enabled >> and one disabled. The driver gets phys unconditionally and one of them >> is disabled. >> >> Even if Linux implementation will work (devm_usb_get_phy_by_phandle will >> return -ENXIO or -ENODEV for disabled node), it is still a bit confusing >> and I wonder how other users of such DTS should behave. Although it will >> affect only one board, so maybe there are no other users? > > Ah, now I get your point. So how does the following fix in > sm4250-oneplus-billie2.dts look like. It allows the base dtsi to carry > the usb nodes as exposed by the SoC and allows other board dts files > to use both the USB2 and UBS3 PHYs. > > Please let me know. > > --- a/arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts > +++ b/arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts > @@ -232,6 +232,9 @@ &usb { > &usb_dwc3 { > maximum-speed = "high-speed"; > dr_mode = "peripheral"; > + > + phys = <&usb_hsphy>; > + phy-names = "usb2-phy"; > }; Looks good now! Konrad > > Thanks.
diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi index e4ce135264f3d..9c5c024919f92 100644 --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi @@ -579,6 +579,40 @@ usb_hsphy: phy@1613000 { status = "disabled"; }; + usb_qmpphy: phy@1615000 { + compatible = "qcom,sm6115-qmp-usb3-phy"; + reg = <0x01615000 0x200>; + #clock-cells = <1>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + clocks = <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, + <&gcc GCC_USB3_PRIM_CLKREF_CLK>, + <&gcc GCC_AHB2PHY_USB_CLK>; + clock-names = "com_aux", + "ref", + "cfg_ahb"; + resets = <&gcc GCC_USB3_PHY_PRIM_SP0_BCR>, + <&gcc GCC_USB3PHY_PHY_PRIM_SP0_BCR>; + reset-names = "phy", "phy_phy"; + status = "disabled"; + + usb_ssphy: phy@1615200 { + reg = <0x01615200 0x200>, + <0x01615400 0x200>, + <0x01615c00 0x400>, + <0x01615600 0x200>, + <0x01615800 0x200>, + <0x01615a00 0x100>; + #phy-cells = <0>; + #clock-cells = <1>; + clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; + clock-names = "pipe0"; + clock-output-names = "usb3_phy_pipe_clk_src"; + }; + }; + + qfprom@1b40000 { compatible = "qcom,sm6115-qfprom", "qcom,qfprom"; reg = <0x01b40000 0x7000>; @@ -1023,8 +1057,8 @@ usb_dwc3: usb@4e00000 { compatible = "snps,dwc3"; reg = <0x04e00000 0xcd00>; interrupts = <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>; - phys = <&usb_hsphy>; - phy-names = "usb2-phy"; + phys = <&usb_hsphy>, <&usb_ssphy>; + phy-names = "usb2-phy", "usb3-phy"; iommus = <&apps_smmu 0x120 0x0>; snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk;