From patchwork Thu Aug 24 21:19:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 716653 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42F0DC83003 for ; Thu, 24 Aug 2023 21:20:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235649AbjHXVUX (ORCPT ); Thu, 24 Aug 2023 17:20:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240895AbjHXVUA (ORCPT ); Thu, 24 Aug 2023 17:20:00 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE1551BCC for ; Thu, 24 Aug 2023 14:19:56 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4ff88239785so383888e87.0 for ; Thu, 24 Aug 2023 14:19:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692911995; x=1693516795; 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=+IBBc3y1/HV6Ww5kyVYw2lM0lyqWK83XnbAhM+Lr5bs=; b=uw13nTeGaIsGGhs+kGFZ1pjjAB6WNvKfL78xXYanUK/hfTZqvvZhmWW5+Dc5vy1GY/ jXJrRR2KQUs2O1QrrpqL+KxlwnmU68uDCvQ0EUSxD+W6Dgi6GJ0b3id/XkZVymaoVSEu p9cf7cSPuji4mwYhBPgC+QDVT/KePvFbbiycb323nFaSfIGd2w3fwep0Yy3mzgquC+v6 UNl9Kvk5RVugNPfusNgRzMOBHc0vcjhTgdR/+g8u20ePak5eUREnuEYceg3eotdBbQrI HT09HRNoumAG/PFoYS6fjPlGQkQ3xKRDriy62NemFlU4WI/a9fLOaCOSduosy9FBB9u5 2UkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692911995; x=1693516795; 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=+IBBc3y1/HV6Ww5kyVYw2lM0lyqWK83XnbAhM+Lr5bs=; b=KQWBu7JQ/2SSeRL2Gf7LIHMWsOR6U+tYrRp3FuzqRugjcKi70OQCrM6HHhfZF6YNvg iJUCxNcCBB422ut9FUfk5x+Xp4j24rfOn3aOX09ddn13Azstsg8gwQjlcaQg3yH38tr9 Ddy48KVApQDRvbMpS82Eozfl2KhdrclbBkqr8CstWG/cISpn+vAFpN0BJZBb9fom6cpI Xi0cxlcKqG4Zj2fLavpn+dcavbpGvYzkczJKYIj4NX16ZmngwH7UqzYAqW5WtKd2k767 RJNPHIul2wUliHeQav9/C/zGWf9lEaZYf0Cwu0EQCte8X3FCIO2aT2pvAh6zq/eVbvVl rVQA== X-Gm-Message-State: AOJu0Yyy4eoQmpE8FW7Gday6cA63bG86EP8jgZ2tUoYFA42DJQffU+3P 3qh+eRiZhxF7ePf1JrvNLHG4LA== X-Google-Smtp-Source: AGHT+IGlnPI7h/x/8qO+ag5nn/1lWoUmEWMq7d+dzQbwl0m23Bqa0fNNyDDSbWd4QGd5IkYFbEtY8g== X-Received: by 2002:a05:6512:3241:b0:4fe:25bc:71f5 with SMTP id c1-20020a056512324100b004fe25bc71f5mr10292238lfr.11.1692911995068; Thu, 24 Aug 2023 14:19:55 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j29-20020a056512029d00b004fe4ab686b4sm17690lfp.167.2023.08.24.14.19.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 14:19:54 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Philipp Zabel , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 01/16] dt-bindings: phy: migrate QMP USB PHY bindings to qcom,sc8280xp-qmp-usb3-uni-phy.yaml Date: Fri, 25 Aug 2023 00:19:37 +0300 Message-Id: <20230824211952.1397699-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> References: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Migrate legacy bindings (described in qcom,msm8996-qmp-usb3-phy.yaml) to qcom,sc8280xp-qmp-usb3-uni-phy.yaml. This removes a need to declare the child PHY node or split resource regions. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski --- .../phy/qcom,msm8996-qmp-usb3-phy.yaml | 287 ------------------ .../phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml | 55 +++- 2 files changed, 53 insertions(+), 289 deletions(-) delete mode 100644 Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-usb3-phy.yaml diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-usb3-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-usb3-phy.yaml deleted file mode 100644 index 827109d37041..000000000000 --- a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-usb3-phy.yaml +++ /dev/null @@ -1,287 +0,0 @@ -# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) -%YAML 1.2 ---- -$id: http://devicetree.org/schemas/phy/qcom,msm8996-qmp-usb3-phy.yaml# -$schema: http://devicetree.org/meta-schemas/core.yaml# - -title: Qualcomm QMP PHY controller (USB, MSM8996) - -maintainers: - - Vinod Koul - -description: - QMP PHY controller supports physical layer functionality for a number of - controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB. - - Note that these bindings are for SoCs up to SC8180X. For newer SoCs, see - qcom,sc8280xp-qmp-usb3-uni-phy.yaml. - -properties: - compatible: - enum: - - qcom,ipq6018-qmp-usb3-phy - - qcom,ipq8074-qmp-usb3-phy - - qcom,msm8996-qmp-usb3-phy - - qcom,msm8998-qmp-usb3-phy - - qcom,sdm845-qmp-usb3-uni-phy - - qcom,sdx55-qmp-usb3-uni-phy - - qcom,sdx65-qmp-usb3-uni-phy - - qcom,sm8150-qmp-usb3-uni-phy - - qcom,sm8250-qmp-usb3-uni-phy - - qcom,sm8350-qmp-usb3-uni-phy - - reg: - items: - - description: serdes - - "#address-cells": - enum: [ 1, 2 ] - - "#size-cells": - enum: [ 1, 2 ] - - ranges: true - - clocks: - minItems: 3 - maxItems: 4 - - clock-names: - minItems: 3 - maxItems: 4 - - power-domains: - maxItems: 1 - - resets: - maxItems: 2 - - reset-names: - maxItems: 2 - - vdda-phy-supply: true - - vdda-pll-supply: true - - vddp-ref-clk-supply: true - -patternProperties: - "^phy@[0-9a-f]+$": - type: object - description: single PHY-provider child node - properties: - reg: - minItems: 3 - maxItems: 6 - - clocks: - items: - - description: PIPE clock - - clock-names: - deprecated: true - items: - - const: pipe0 - - "#clock-cells": - const: 0 - - clock-output-names: - maxItems: 1 - - "#phy-cells": - const: 0 - - required: - - reg - - clocks - - "#clock-cells" - - clock-output-names - - "#phy-cells" - - additionalProperties: false - -required: - - compatible - - reg - - "#address-cells" - - "#size-cells" - - ranges - - clocks - - clock-names - - resets - - reset-names - - vdda-phy-supply - - vdda-pll-supply - -additionalProperties: false - -allOf: - - if: - properties: - compatible: - contains: - enum: - - qcom,sdm845-qmp-usb3-uni-phy - then: - properties: - clocks: - maxItems: 4 - clock-names: - items: - - const: aux - - const: cfg_ahb - - const: ref - - const: com_aux - resets: - maxItems: 2 - reset-names: - items: - - const: phy - - const: common - - - if: - properties: - compatible: - contains: - enum: - - qcom,ipq8074-qmp-usb3-phy - - qcom,msm8996-qmp-usb3-phy - - qcom,msm8998-qmp-usb3-phy - - qcom,sdx55-qmp-usb3-uni-phy - - qcom,sdx65-qmp-usb3-uni-phy - then: - properties: - clocks: - maxItems: 3 - clock-names: - items: - - const: aux - - const: cfg_ahb - - const: ref - resets: - maxItems: 2 - reset-names: - items: - - const: phy - - const: common - - - if: - properties: - compatible: - contains: - enum: - - qcom,sm8150-qmp-usb3-uni-phy - - qcom,sm8250-qmp-usb3-uni-phy - - qcom,sm8350-qmp-usb3-uni-phy - then: - properties: - clocks: - maxItems: 4 - clock-names: - items: - - const: aux - - const: ref_clk_src - - const: ref - - const: com_aux - resets: - maxItems: 2 - reset-names: - items: - - const: phy - - const: common - - - if: - properties: - compatible: - contains: - enum: - - qcom,msm8998-qmp-usb3-phy - then: - patternProperties: - "^phy@[0-9a-f]+$": - properties: - reg: - items: - - description: TX lane 1 - - description: RX lane 1 - - description: PCS - - description: TX lane 2 - - description: RX lane 2 - - - if: - properties: - compatible: - contains: - enum: - - qcom,ipq6018-qmp-usb3-phy - - qcom,ipq8074-qmp-usb3-phy - - qcom,sdx55-qmp-usb3-uni-phy - - qcom,sdx65-qmp-usb3-uni-phy - - qcom,sm8150-qmp-usb3-uni-phy - then: - patternProperties: - "^phy@[0-9a-f]+$": - properties: - reg: - items: - - description: TX - - description: RX - - description: PCS - - description: PCS_MISC - - - if: - properties: - compatible: - contains: - enum: - - qcom,msm8996-qmp-usb3-phy - - qcom,sm8250-qmp-usb3-uni-phy - - qcom,sm8350-qmp-usb3-uni-phy - then: - patternProperties: - "^phy@[0-9a-f]+$": - properties: - reg: - items: - - description: TX - - description: RX - - description: PCS - -examples: - - | - #include - usb_2_qmpphy: phy-wrapper@88eb000 { - compatible = "qcom,sdm845-qmp-usb3-uni-phy"; - reg = <0x088eb000 0x18c>; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0x0 0x088eb000 0x2000>; - - clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK >, - <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>, - <&gcc GCC_USB3_SEC_CLKREF_CLK>, - <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>; - clock-names = "aux", "cfg_ahb", "ref", "com_aux"; - - resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>, - <&gcc GCC_USB3_PHY_SEC_BCR>; - reset-names = "phy", "common"; - - vdda-phy-supply = <&vdda_usb2_ss_1p2>; - vdda-pll-supply = <&vdda_usb2_ss_core>; - - usb_2_ssphy: phy@200 { - reg = <0x200 0x128>, - <0x400 0x1fc>, - <0x800 0x218>, - <0x600 0x70>; - - clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>; - - #clock-cells = <0>; - clock-output-names = "usb3_uni_phy_pipe_clk_src"; - - #phy-cells = <0>; - }; - }; diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml index f99fbbcd68fb..bbdb28cd8029 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml @@ -16,20 +16,33 @@ description: properties: compatible: enum: + - qcom,ipq6018-qmp-usb3-phy + - qcom,ipq8074-qmp-usb3-phy - qcom,ipq9574-qmp-usb3-phy + - qcom,msm8996-qmp-usb3-phy + - qcom,msm8998-qmp-usb3-phy - qcom,qcm2290-qmp-usb3-phy - qcom,sa8775p-qmp-usb3-uni-phy - qcom,sc8280xp-qmp-usb3-uni-phy + - qcom,sdm845-qmp-usb3-uni-phy + - qcom,sdx55-qmp-usb3-uni-phy + - qcom,sdx65-qmp-usb3-uni-phy - qcom,sm6115-qmp-usb3-phy + - qcom,sm8150-qmp-usb3-uni-phy + - qcom,sm8250-qmp-usb3-uni-phy + - qcom,sm8350-qmp-usb3-uni-phy + reg: maxItems: 1 clocks: - maxItems: 4 + minItems: 4 + maxItems: 5 clock-names: - maxItems: 4 + minItems: 4 + maxItems: 5 power-domains: maxItems: 1 @@ -74,9 +87,17 @@ allOf: compatible: contains: enum: + - qcom,ipq6018-qmp-usb3-phy + - qcom,ipq8074-qmp-usb3-phy - qcom,ipq9574-qmp-usb3-phy + - qcom,msm8996-qmp-usb3-phy + - qcom,msm8998-qmp-usb3-phy + - qcom,sdx55-qmp-usb3-uni-phy + - qcom,sdx65-qmp-usb3-uni-phy then: properties: + clocks: + maxItems: 4 clock-names: items: - const: aux @@ -109,6 +130,9 @@ allOf: enum: - qcom,sa8775p-qmp-usb3-uni-phy - qcom,sc8280xp-qmp-usb3-uni-phy + - qcom,sm8150-qmp-usb3-uni-phy + - qcom,sm8250-qmp-usb3-uni-phy + - qcom,sm8350-qmp-usb3-uni-phy then: properties: clocks: @@ -119,6 +143,33 @@ allOf: - const: ref - const: com_aux - const: pipe + + - if: + properties: + compatible: + contains: + enum: + - qcom,sdm845-qmp-usb3-uni-phy + then: + properties: + clocks: + maxItems: 5 + clock-names: + items: + - const: aux + - const: cfg_ahb + - const: ref + - const: com_aux + - const: pipe + + - if: + properties: + compatible: + contains: + enum: + - qcom,sa8775p-qmp-usb3-uni-phy + - qcom,sc8280xp-qmp-usb3-uni-phy + then: required: - power-domains From patchwork Thu Aug 24 21:19:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 717317 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63AC9C88CB9 for ; Thu, 24 Aug 2023 21:20:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243587AbjHXVUZ (ORCPT ); Thu, 24 Aug 2023 17:20:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243202AbjHXVUA (ORCPT ); Thu, 24 Aug 2023 17:20:00 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D9A81BD9 for ; Thu, 24 Aug 2023 14:19:57 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-4ffae5bdc9aso364215e87.1 for ; Thu, 24 Aug 2023 14:19:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692911996; x=1693516796; 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=yhZSWof/ogOerzuI8LfoagdYZ1hN/OBCAtHXM1b5puA=; b=SmoJ1cnv71wJtG6DfxH4+B+gMIkq1rpe3IKccdovL8EXAyUdL2ubnRAvoDeIUSBXuY 4WLNyT3WoM8eMOs6/EJ8jZ2g0zy+p2O0xuqwofvv6LD+ugKFcqhj4b7AG3E+p6jMtsLj /ww21PHjg+yVc/XeGJG+QqK+oAGdAVqYNhn3vUBN0elsNSQjJ4i1Y0ZHuRAPxBPEYRHP 9z0n79dbhz6N22CZ7Nd32Cf6si09cphq8Z0qTa7DxEJKsRPAw1KDgwMyrRGEisaYSa1L senA3Zg6VGzSWhrqf9teQ9VlQlw//iVkqIRTdlDLbWMGIEbzs/Tej8aP8OSz3SEgB1VM 4e0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692911996; x=1693516796; 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=yhZSWof/ogOerzuI8LfoagdYZ1hN/OBCAtHXM1b5puA=; b=ToCUByDWYH0FmOCpH6TK7B2O+WADuYG44xjhcRhQLktOdL3BpT4mxic+EGWGnsWAZ7 GdklVBF00LyH54D2A2qer+uNi85CpdJaFW0SX1JrIM5Kc50Xm5ZM/vd2uqzfy+pvBnYo 2XRpSrF9cw0oa1L0UOnmtH2J3RoTU3OHOMAI7Xpbsu07jySkahb7Iv9jZ1P0IzJTlTyb HCo8Cz0chdQd+x1XW7I9ulJdHZG08pAGHZ5Ux0Ld2qzEK6axp1+w0P4csLsGvEBjJ1/l /o/oTRPhGEoKTTOKBNA8AipJFhJb9/0pViutC+Cr8KlJQtYvsqEkvGtTCWkAmSzx4OEK 9HEA== X-Gm-Message-State: AOJu0YzFSj8M2tSZqFxzFz0gQIeBwWlIGS9G/hdHkYcmCW+LnV17of08 rj2G3bsceeY78x21wb7L5Qxpvw== X-Google-Smtp-Source: AGHT+IEl1NOBw0dHm3Z0axq6YP+ijpEpffltsS6u+nN3FWfzIGhLhvg6EUtvEutbPA40EQnz68sK3w== X-Received: by 2002:a05:6512:2395:b0:4fb:73ce:8e7d with SMTP id c21-20020a056512239500b004fb73ce8e7dmr15314048lfv.15.1692911995923; Thu, 24 Aug 2023 14:19:55 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j29-20020a056512029d00b004fe4ab686b4sm17690lfp.167.2023.08.24.14.19.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 14:19:55 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Philipp Zabel , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 02/16] phy: qcom-qmp-usb: simplify clock handling Date: Fri, 25 Aug 2023 00:19:38 +0300 Message-Id: <20230824211952.1397699-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> References: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org For the existing PHYs for new binding we are going to drop ref_clk_src clock and always use ref clock. Rather than introducing additional code to handle legacy vs current bindings (and clock names), use devm_clk_bulk_get_optional() when new bindings are used and devm_clk_bulk_get_all() when legacy bindings are in place. Signed-off-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 90 +++++++------------------ 1 file changed, 24 insertions(+), 66 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index 0130bb8e809a..626cf4bf396b 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -1172,9 +1172,6 @@ struct qmp_phy_cfg { const struct qmp_phy_init_tbl *pcs_usb_tbl; int pcs_usb_tbl_num; - /* clock ids to be requested */ - const char * const *clk_list; - int num_clks; /* resets to be requested */ const char * const *reset_list; int num_resets; @@ -1208,6 +1205,7 @@ struct qmp_usb { struct clk *pipe_clk; struct clk_bulk_data *clks; + int num_clks; struct reset_control_bulk_data *resets; struct regulator_bulk_data *vregs; @@ -1243,31 +1241,10 @@ static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val) } /* list of clocks required by phy */ -static const char * const msm8996_phy_clk_l[] = { - "aux", "cfg_ahb", "ref", -}; - -static const char * const qmp_v3_phy_clk_l[] = { +static const char * const qmp_usb_phy_clk_l[] = { "aux", "cfg_ahb", "ref", "com_aux", }; -static const char * const qmp_v4_phy_clk_l[] = { - "aux", "ref", "com_aux", -}; - -static const char * const qmp_v4_ref_phy_clk_l[] = { - "aux", "ref_clk_src", "ref", "com_aux", -}; - -/* usb3 phy on sdx55 doesn't have com_aux clock */ -static const char * const qmp_v4_sdx55_usbphy_clk_l[] = { - "aux", "cfg_ahb", "ref" -}; - -static const char * const qcm2290_usb3phy_clk_l[] = { - "cfg_ahb", "ref", "com_aux", -}; - /* list of resets */ static const char * const msm8996_usb3phy_reset_l[] = { "phy", "common", @@ -1319,8 +1296,6 @@ static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = { .rx_tbl_num = ARRAY_SIZE(ipq8074_usb3_rx_tbl), .pcs_tbl = ipq8074_usb3_pcs_tbl, .pcs_tbl_num = ARRAY_SIZE(ipq8074_usb3_pcs_tbl), - .clk_list = msm8996_phy_clk_l, - .num_clks = ARRAY_SIZE(msm8996_phy_clk_l), .reset_list = msm8996_usb3phy_reset_l, .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1341,8 +1316,6 @@ static const struct qmp_phy_cfg ipq9574_usb3phy_cfg = { .rx_tbl_num = ARRAY_SIZE(ipq9574_usb3_rx_tbl), .pcs_tbl = ipq9574_usb3_pcs_tbl, .pcs_tbl_num = ARRAY_SIZE(ipq9574_usb3_pcs_tbl), - .clk_list = msm8996_phy_clk_l, - .num_clks = ARRAY_SIZE(msm8996_phy_clk_l), .reset_list = qcm2290_usb3phy_reset_l, .num_resets = ARRAY_SIZE(qcm2290_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1361,8 +1334,6 @@ static const struct qmp_phy_cfg msm8996_usb3phy_cfg = { .rx_tbl_num = ARRAY_SIZE(msm8996_usb3_rx_tbl), .pcs_tbl = msm8996_usb3_pcs_tbl, .pcs_tbl_num = ARRAY_SIZE(msm8996_usb3_pcs_tbl), - .clk_list = msm8996_phy_clk_l, - .num_clks = ARRAY_SIZE(msm8996_phy_clk_l), .reset_list = msm8996_usb3phy_reset_l, .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1383,8 +1354,6 @@ static const struct qmp_phy_cfg sa8775p_usb3_uniphy_cfg = { .rx_tbl_num = ARRAY_SIZE(sc8280xp_usb3_uniphy_rx_tbl), .pcs_tbl = sa8775p_usb3_uniphy_pcs_tbl, .pcs_tbl_num = ARRAY_SIZE(sa8775p_usb3_uniphy_pcs_tbl), - .clk_list = qmp_v4_phy_clk_l, - .num_clks = ARRAY_SIZE(qmp_v4_phy_clk_l), .reset_list = qcm2290_usb3phy_reset_l, .num_resets = ARRAY_SIZE(qcm2290_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1405,8 +1374,6 @@ static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = { .rx_tbl_num = ARRAY_SIZE(sc8280xp_usb3_uniphy_rx_tbl), .pcs_tbl = sc8280xp_usb3_uniphy_pcs_tbl, .pcs_tbl_num = ARRAY_SIZE(sc8280xp_usb3_uniphy_pcs_tbl), - .clk_list = qmp_v4_phy_clk_l, - .num_clks = ARRAY_SIZE(qmp_v4_phy_clk_l), .reset_list = qcm2290_usb3phy_reset_l, .num_resets = ARRAY_SIZE(qcm2290_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1425,8 +1392,6 @@ static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = { .rx_tbl_num = ARRAY_SIZE(qmp_v3_usb3_uniphy_rx_tbl), .pcs_tbl = qmp_v3_usb3_uniphy_pcs_tbl, .pcs_tbl_num = ARRAY_SIZE(qmp_v3_usb3_uniphy_pcs_tbl), - .clk_list = qmp_v3_phy_clk_l, - .num_clks = ARRAY_SIZE(qmp_v3_phy_clk_l), .reset_list = msm8996_usb3phy_reset_l, .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1447,8 +1412,6 @@ static const struct qmp_phy_cfg msm8998_usb3phy_cfg = { .rx_tbl_num = ARRAY_SIZE(msm8998_usb3_rx_tbl), .pcs_tbl = msm8998_usb3_pcs_tbl, .pcs_tbl_num = ARRAY_SIZE(msm8998_usb3_pcs_tbl), - .clk_list = msm8996_phy_clk_l, - .num_clks = ARRAY_SIZE(msm8996_phy_clk_l), .reset_list = msm8996_usb3phy_reset_l, .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1469,8 +1432,6 @@ static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = { .pcs_tbl_num = ARRAY_SIZE(sm8150_usb3_uniphy_pcs_tbl), .pcs_usb_tbl = sm8150_usb3_uniphy_pcs_usb_tbl, .pcs_usb_tbl_num = ARRAY_SIZE(sm8150_usb3_uniphy_pcs_usb_tbl), - .clk_list = qmp_v4_ref_phy_clk_l, - .num_clks = ARRAY_SIZE(qmp_v4_ref_phy_clk_l), .reset_list = msm8996_usb3phy_reset_l, .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1494,8 +1455,6 @@ static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = { .pcs_tbl_num = ARRAY_SIZE(sm8250_usb3_uniphy_pcs_tbl), .pcs_usb_tbl = sm8250_usb3_uniphy_pcs_usb_tbl, .pcs_usb_tbl_num = ARRAY_SIZE(sm8250_usb3_uniphy_pcs_usb_tbl), - .clk_list = qmp_v4_ref_phy_clk_l, - .num_clks = ARRAY_SIZE(qmp_v4_ref_phy_clk_l), .reset_list = msm8996_usb3phy_reset_l, .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1519,8 +1478,6 @@ static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = { .pcs_tbl_num = ARRAY_SIZE(sm8250_usb3_uniphy_pcs_tbl), .pcs_usb_tbl = sm8250_usb3_uniphy_pcs_usb_tbl, .pcs_usb_tbl_num = ARRAY_SIZE(sm8250_usb3_uniphy_pcs_usb_tbl), - .clk_list = qmp_v4_sdx55_usbphy_clk_l, - .num_clks = ARRAY_SIZE(qmp_v4_sdx55_usbphy_clk_l), .reset_list = msm8996_usb3phy_reset_l, .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1544,8 +1501,6 @@ static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = { .pcs_tbl_num = ARRAY_SIZE(sm8350_usb3_uniphy_pcs_tbl), .pcs_usb_tbl = sm8350_usb3_uniphy_pcs_usb_tbl, .pcs_usb_tbl_num = ARRAY_SIZE(sm8350_usb3_uniphy_pcs_usb_tbl), - .clk_list = qmp_v4_sdx55_usbphy_clk_l, - .num_clks = ARRAY_SIZE(qmp_v4_sdx55_usbphy_clk_l), .reset_list = msm8996_usb3phy_reset_l, .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1569,8 +1524,6 @@ static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = { .pcs_tbl_num = ARRAY_SIZE(sm8350_usb3_uniphy_pcs_tbl), .pcs_usb_tbl = sm8350_usb3_uniphy_pcs_usb_tbl, .pcs_usb_tbl_num = ARRAY_SIZE(sm8350_usb3_uniphy_pcs_usb_tbl), - .clk_list = qmp_v4_ref_phy_clk_l, - .num_clks = ARRAY_SIZE(qmp_v4_ref_phy_clk_l), .reset_list = msm8996_usb3phy_reset_l, .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1594,8 +1547,6 @@ static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = { .rx_tbl_num = ARRAY_SIZE(qcm2290_usb3_rx_tbl), .pcs_tbl = qcm2290_usb3_pcs_tbl, .pcs_tbl_num = ARRAY_SIZE(qcm2290_usb3_pcs_tbl), - .clk_list = qcm2290_usb3phy_clk_l, - .num_clks = ARRAY_SIZE(qcm2290_usb3phy_clk_l), .reset_list = qcm2290_usb3phy_reset_l, .num_resets = ARRAY_SIZE(qcm2290_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1666,7 +1617,7 @@ static int qmp_usb_init(struct phy *phy) goto err_disable_regulators; } - ret = clk_bulk_prepare_enable(cfg->num_clks, qmp->clks); + ret = clk_bulk_prepare_enable(qmp->num_clks, qmp->clks); if (ret) goto err_assert_reset; @@ -1689,7 +1640,7 @@ static int qmp_usb_exit(struct phy *phy) reset_control_bulk_assert(cfg->num_resets, qmp->resets); - clk_bulk_disable_unprepare(cfg->num_clks, qmp->clks); + clk_bulk_disable_unprepare(qmp->num_clks, qmp->clks); regulator_bulk_disable(cfg->num_vregs, qmp->vregs); @@ -1863,7 +1814,6 @@ static void qmp_usb_disable_autonomous_mode(struct qmp_usb *qmp) static int __maybe_unused qmp_usb_runtime_suspend(struct device *dev) { struct qmp_usb *qmp = dev_get_drvdata(dev); - const struct qmp_phy_cfg *cfg = qmp->cfg; dev_vdbg(dev, "Suspending QMP phy, mode:%d\n", qmp->mode); @@ -1875,7 +1825,7 @@ static int __maybe_unused qmp_usb_runtime_suspend(struct device *dev) qmp_usb_enable_autonomous_mode(qmp); clk_disable_unprepare(qmp->pipe_clk); - clk_bulk_disable_unprepare(cfg->num_clks, qmp->clks); + clk_bulk_disable_unprepare(qmp->num_clks, qmp->clks); return 0; } @@ -1883,7 +1833,6 @@ static int __maybe_unused qmp_usb_runtime_suspend(struct device *dev) static int __maybe_unused qmp_usb_runtime_resume(struct device *dev) { struct qmp_usb *qmp = dev_get_drvdata(dev); - const struct qmp_phy_cfg *cfg = qmp->cfg; int ret = 0; dev_vdbg(dev, "Resuming QMP phy, mode:%d\n", qmp->mode); @@ -1893,14 +1842,14 @@ static int __maybe_unused qmp_usb_runtime_resume(struct device *dev) return 0; } - ret = clk_bulk_prepare_enable(cfg->num_clks, qmp->clks); + ret = clk_bulk_prepare_enable(qmp->num_clks, qmp->clks); if (ret) return ret; ret = clk_prepare_enable(qmp->pipe_clk); if (ret) { dev_err(dev, "pipe_clk enable failed, err=%d\n", ret); - clk_bulk_disable_unprepare(cfg->num_clks, qmp->clks); + clk_bulk_disable_unprepare(qmp->num_clks, qmp->clks); return ret; } @@ -1955,9 +1904,8 @@ static int qmp_usb_reset_init(struct qmp_usb *qmp) static int qmp_usb_clk_init(struct qmp_usb *qmp) { - const struct qmp_phy_cfg *cfg = qmp->cfg; struct device *dev = qmp->dev; - int num = cfg->num_clks; + int num = ARRAY_SIZE(qmp_usb_phy_clk_l); int i; qmp->clks = devm_kcalloc(dev, num, sizeof(*qmp->clks), GFP_KERNEL); @@ -1965,9 +1913,11 @@ static int qmp_usb_clk_init(struct qmp_usb *qmp) return -ENOMEM; for (i = 0; i < num; i++) - qmp->clks[i].id = cfg->clk_list[i]; + qmp->clks[i].id = qmp_usb_phy_clk_l[i]; - return devm_clk_bulk_get(dev, num, qmp->clks); + qmp->num_clks = num; + + return devm_clk_bulk_get_optional(dev, num, qmp->clks); } static void phy_clk_release_provider(void *res) @@ -2047,6 +1997,7 @@ static int qmp_usb_parse_dt_legacy(struct qmp_usb *qmp, struct device_node *np) const struct qmp_phy_cfg *cfg = qmp->cfg; struct device *dev = qmp->dev; bool exclusive = true; + int ret; qmp->serdes = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(qmp->serdes)) @@ -2107,6 +2058,12 @@ static int qmp_usb_parse_dt_legacy(struct qmp_usb *qmp, struct device_node *np) "failed to get pipe clock\n"); } + ret = devm_clk_bulk_get_all(qmp->dev, &qmp->clks); + if (ret < 0) + return ret; + + qmp->num_clks = ret; + return 0; } @@ -2117,6 +2074,7 @@ static int qmp_usb_parse_dt(struct qmp_usb *qmp) const struct qmp_usb_offsets *offs = cfg->offsets; struct device *dev = qmp->dev; void __iomem *base; + int ret; if (!offs) return -EINVAL; @@ -2137,6 +2095,10 @@ static int qmp_usb_parse_dt(struct qmp_usb *qmp) qmp->rx2 = base + offs->rx2; } + ret = qmp_usb_clk_init(qmp); + if (ret) + return ret; + qmp->pipe_clk = devm_clk_get(dev, "pipe"); if (IS_ERR(qmp->pipe_clk)) { return dev_err_probe(dev, PTR_ERR(qmp->pipe_clk), @@ -2164,10 +2126,6 @@ static int qmp_usb_probe(struct platform_device *pdev) if (!qmp->cfg) return -EINVAL; - ret = qmp_usb_clk_init(qmp); - if (ret) - return ret; - ret = qmp_usb_reset_init(qmp); if (ret) return ret; From patchwork Thu Aug 24 21:19:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 716652 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CBD1EE49A5 for ; Thu, 24 Aug 2023 21:20:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243640AbjHXVUZ (ORCPT ); Thu, 24 Aug 2023 17:20:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243587AbjHXVUB (ORCPT ); Thu, 24 Aug 2023 17:20:01 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F5921BC9 for ; Thu, 24 Aug 2023 14:19:58 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-50091b91a83so351846e87.3 for ; Thu, 24 Aug 2023 14:19:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692911997; x=1693516797; 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=U70UpewjmCnbT8KiMd545bdbi+bVcnHm968V6y9dNR4=; b=Om2m8MpS7wK1gIYT6mVBoWKV8nHWxNnyVtt+2GHs8m/3qee3tDF8WgEI6nRHJlR8+D cx8d6mXY1l9+eghcOaBrXvi5pVYJo+vAj4m8gwJs04BV1Y4fYqQ1aO9yvfq/htUfVbmD Lj6fWBcEx0Zz3LdRVl2bws8i0SzPB+xdMgqVwqihORFqO4Megs3N5NlQNNlTkrCs7VbI 62gDCpcBc+8qQhPCGjNh/l6UfyMGrj/xcoXWjbzBZ/5S0DwntVnE/JgrkzxwE7kuNAzq dxQ1T6pkC4Y9YMu419m0GU3lIl+o0wQ8aSLF26Stxb2p3F1NgF6wsxhFNkAvs+Udpch9 zboQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692911997; x=1693516797; 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=U70UpewjmCnbT8KiMd545bdbi+bVcnHm968V6y9dNR4=; b=SqMXQ4136RnTL5+VZucE2DmNs8FcY9c6D1lCy49urjSs8KA1o1iD7DyYMtGXI/F37F hIgwoAUOENeFDXp0pik6FY87TfIrIEBR7L0F2HraWA9ZhQJ3Ebi+fvauU3d5OjIyJ9Lu Yzx29niAUfTMc7NperRx2aytQ6U22yHUyjv2pXNjcvNfsGb4bXHmwL8oWoHReG6QSFuJ KVRBaJ21c1ske0s9MAP/8h3fSbVMFLwuFb5qMzJy2QvfD4xkCn34xEIfFnZUJSvP9/25 4DSiJknUP3hl1x9U6IuIdDwMbPjUx0CeXWVsPOYmGNp4pLqrgEWY52CdbLG820128Ykj ysnw== X-Gm-Message-State: AOJu0Yyrqjgk+nTeuS0KZhD+CgkFu18au9HWvTrQIlH99wTetwJLjTMq 4M9YSxkrxc4kpVPz18Jq1NMjoQ== X-Google-Smtp-Source: AGHT+IEpQ29oihcuQay8r/AKFPHgjuVL1GNvmXM4bl3oA8V3xEtzsnmjJw3L18xrJ7pgUYxRgE2E6g== X-Received: by 2002:a05:6512:2208:b0:4fd:fc3d:cce7 with SMTP id h8-20020a056512220800b004fdfc3dcce7mr15006124lfu.44.1692911996783; Thu, 24 Aug 2023 14:19:56 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j29-20020a056512029d00b004fe4ab686b4sm17690lfp.167.2023.08.24.14.19.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 14:19:56 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Philipp Zabel , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 03/16] phy: qcom-qmp-usb: rework reset handling Date: Fri, 25 Aug 2023 00:19:39 +0300 Message-Id: <20230824211952.1397699-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> References: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org All legacy bindings of USB PHYs use "phy", "common" resets, while newer style bindings use "phy", "phy_phy" resets. In preparation for converting existing legacy PHY bindings to use newer scheme, drop reset lists from configuration struture and reference reset lists directly. Signed-off-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 71 +++++++++---------------- 1 file changed, 26 insertions(+), 45 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index 626cf4bf396b..8f43de20fb8c 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -1172,9 +1172,6 @@ struct qmp_phy_cfg { const struct qmp_phy_init_tbl *pcs_usb_tbl; int pcs_usb_tbl_num; - /* resets to be requested */ - const char * const *reset_list; - int num_resets; /* regulators to be requested */ const char * const *vreg_list; int num_vregs; @@ -1206,6 +1203,7 @@ struct qmp_usb { struct clk *pipe_clk; struct clk_bulk_data *clks; int num_clks; + int num_resets; struct reset_control_bulk_data *resets; struct regulator_bulk_data *vregs; @@ -1246,11 +1244,11 @@ static const char * const qmp_usb_phy_clk_l[] = { }; /* list of resets */ -static const char * const msm8996_usb3phy_reset_l[] = { +static const char * const usb3phy_legacy_reset_l[] = { "phy", "common", }; -static const char * const qcm2290_usb3phy_reset_l[] = { +static const char * const usb3phy_reset_l[] = { "phy_phy", "phy", }; @@ -1296,8 +1294,6 @@ static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = { .rx_tbl_num = ARRAY_SIZE(ipq8074_usb3_rx_tbl), .pcs_tbl = ipq8074_usb3_pcs_tbl, .pcs_tbl_num = ARRAY_SIZE(ipq8074_usb3_pcs_tbl), - .reset_list = msm8996_usb3phy_reset_l, - .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), .regs = qmp_v3_usb3phy_regs_layout, @@ -1316,8 +1312,6 @@ static const struct qmp_phy_cfg ipq9574_usb3phy_cfg = { .rx_tbl_num = ARRAY_SIZE(ipq9574_usb3_rx_tbl), .pcs_tbl = ipq9574_usb3_pcs_tbl, .pcs_tbl_num = ARRAY_SIZE(ipq9574_usb3_pcs_tbl), - .reset_list = qcm2290_usb3phy_reset_l, - .num_resets = ARRAY_SIZE(qcm2290_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), .regs = qmp_v3_usb3phy_regs_layout, @@ -1334,8 +1328,6 @@ static const struct qmp_phy_cfg msm8996_usb3phy_cfg = { .rx_tbl_num = ARRAY_SIZE(msm8996_usb3_rx_tbl), .pcs_tbl = msm8996_usb3_pcs_tbl, .pcs_tbl_num = ARRAY_SIZE(msm8996_usb3_pcs_tbl), - .reset_list = msm8996_usb3phy_reset_l, - .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), .regs = qmp_v2_usb3phy_regs_layout, @@ -1354,8 +1346,6 @@ static const struct qmp_phy_cfg sa8775p_usb3_uniphy_cfg = { .rx_tbl_num = ARRAY_SIZE(sc8280xp_usb3_uniphy_rx_tbl), .pcs_tbl = sa8775p_usb3_uniphy_pcs_tbl, .pcs_tbl_num = ARRAY_SIZE(sa8775p_usb3_uniphy_pcs_tbl), - .reset_list = qcm2290_usb3phy_reset_l, - .num_resets = ARRAY_SIZE(qcm2290_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), .regs = qmp_v5_usb3phy_regs_layout, @@ -1374,8 +1364,6 @@ static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = { .rx_tbl_num = ARRAY_SIZE(sc8280xp_usb3_uniphy_rx_tbl), .pcs_tbl = sc8280xp_usb3_uniphy_pcs_tbl, .pcs_tbl_num = ARRAY_SIZE(sc8280xp_usb3_uniphy_pcs_tbl), - .reset_list = qcm2290_usb3phy_reset_l, - .num_resets = ARRAY_SIZE(qcm2290_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), .regs = qmp_v5_usb3phy_regs_layout, @@ -1392,8 +1380,6 @@ static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = { .rx_tbl_num = ARRAY_SIZE(qmp_v3_usb3_uniphy_rx_tbl), .pcs_tbl = qmp_v3_usb3_uniphy_pcs_tbl, .pcs_tbl_num = ARRAY_SIZE(qmp_v3_usb3_uniphy_pcs_tbl), - .reset_list = msm8996_usb3phy_reset_l, - .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), .regs = qmp_v3_usb3phy_regs_layout, @@ -1412,8 +1398,6 @@ static const struct qmp_phy_cfg msm8998_usb3phy_cfg = { .rx_tbl_num = ARRAY_SIZE(msm8998_usb3_rx_tbl), .pcs_tbl = msm8998_usb3_pcs_tbl, .pcs_tbl_num = ARRAY_SIZE(msm8998_usb3_pcs_tbl), - .reset_list = msm8996_usb3phy_reset_l, - .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), .regs = qmp_v3_usb3phy_regs_layout, @@ -1432,8 +1416,6 @@ static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = { .pcs_tbl_num = ARRAY_SIZE(sm8150_usb3_uniphy_pcs_tbl), .pcs_usb_tbl = sm8150_usb3_uniphy_pcs_usb_tbl, .pcs_usb_tbl_num = ARRAY_SIZE(sm8150_usb3_uniphy_pcs_usb_tbl), - .reset_list = msm8996_usb3phy_reset_l, - .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), .regs = qmp_v4_usb3phy_regs_layout, @@ -1455,8 +1437,6 @@ static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = { .pcs_tbl_num = ARRAY_SIZE(sm8250_usb3_uniphy_pcs_tbl), .pcs_usb_tbl = sm8250_usb3_uniphy_pcs_usb_tbl, .pcs_usb_tbl_num = ARRAY_SIZE(sm8250_usb3_uniphy_pcs_usb_tbl), - .reset_list = msm8996_usb3phy_reset_l, - .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), .regs = qmp_v4_usb3phy_regs_layout, @@ -1478,8 +1458,6 @@ static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = { .pcs_tbl_num = ARRAY_SIZE(sm8250_usb3_uniphy_pcs_tbl), .pcs_usb_tbl = sm8250_usb3_uniphy_pcs_usb_tbl, .pcs_usb_tbl_num = ARRAY_SIZE(sm8250_usb3_uniphy_pcs_usb_tbl), - .reset_list = msm8996_usb3phy_reset_l, - .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), .regs = qmp_v4_usb3phy_regs_layout, @@ -1501,8 +1479,6 @@ static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = { .pcs_tbl_num = ARRAY_SIZE(sm8350_usb3_uniphy_pcs_tbl), .pcs_usb_tbl = sm8350_usb3_uniphy_pcs_usb_tbl, .pcs_usb_tbl_num = ARRAY_SIZE(sm8350_usb3_uniphy_pcs_usb_tbl), - .reset_list = msm8996_usb3phy_reset_l, - .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), .regs = qmp_v5_usb3phy_regs_layout, @@ -1524,8 +1500,6 @@ static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = { .pcs_tbl_num = ARRAY_SIZE(sm8350_usb3_uniphy_pcs_tbl), .pcs_usb_tbl = sm8350_usb3_uniphy_pcs_usb_tbl, .pcs_usb_tbl_num = ARRAY_SIZE(sm8350_usb3_uniphy_pcs_usb_tbl), - .reset_list = msm8996_usb3phy_reset_l, - .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), .regs = qmp_v5_usb3phy_regs_layout, @@ -1547,8 +1521,6 @@ static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = { .rx_tbl_num = ARRAY_SIZE(qcm2290_usb3_rx_tbl), .pcs_tbl = qcm2290_usb3_pcs_tbl, .pcs_tbl_num = ARRAY_SIZE(qcm2290_usb3_pcs_tbl), - .reset_list = qcm2290_usb3phy_reset_l, - .num_resets = ARRAY_SIZE(qcm2290_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), .regs = qmp_v3_usb3phy_regs_layout, @@ -1605,13 +1577,13 @@ static int qmp_usb_init(struct phy *phy) return ret; } - ret = reset_control_bulk_assert(cfg->num_resets, qmp->resets); + ret = reset_control_bulk_assert(qmp->num_resets, qmp->resets); if (ret) { dev_err(qmp->dev, "reset assert failed\n"); goto err_disable_regulators; } - ret = reset_control_bulk_deassert(cfg->num_resets, qmp->resets); + ret = reset_control_bulk_deassert(qmp->num_resets, qmp->resets); if (ret) { dev_err(qmp->dev, "reset deassert failed\n"); goto err_disable_regulators; @@ -1626,7 +1598,7 @@ static int qmp_usb_init(struct phy *phy) return 0; err_assert_reset: - reset_control_bulk_assert(cfg->num_resets, qmp->resets); + reset_control_bulk_assert(qmp->num_resets, qmp->resets); err_disable_regulators: regulator_bulk_disable(cfg->num_vregs, qmp->vregs); @@ -1638,7 +1610,7 @@ static int qmp_usb_exit(struct phy *phy) struct qmp_usb *qmp = phy_get_drvdata(phy); const struct qmp_phy_cfg *cfg = qmp->cfg; - reset_control_bulk_assert(cfg->num_resets, qmp->resets); + reset_control_bulk_assert(qmp->num_resets, qmp->resets); clk_bulk_disable_unprepare(qmp->num_clks, qmp->clks); @@ -1880,22 +1852,25 @@ static int qmp_usb_vreg_init(struct qmp_usb *qmp) return devm_regulator_bulk_get(dev, num, qmp->vregs); } -static int qmp_usb_reset_init(struct qmp_usb *qmp) +static int qmp_usb_reset_init(struct qmp_usb *qmp, + const char *const *reset_list, + int num_resets) { - const struct qmp_phy_cfg *cfg = qmp->cfg; struct device *dev = qmp->dev; int i; int ret; - qmp->resets = devm_kcalloc(dev, cfg->num_resets, + qmp->resets = devm_kcalloc(dev, num_resets, sizeof(*qmp->resets), GFP_KERNEL); if (!qmp->resets) return -ENOMEM; - for (i = 0; i < cfg->num_resets; i++) - qmp->resets[i].id = cfg->reset_list[i]; + for (i = 0; i < num_resets; i++) + qmp->resets[i].id = reset_list[i]; + + qmp->num_resets = num_resets; - ret = devm_reset_control_bulk_get_exclusive(dev, cfg->num_resets, qmp->resets); + ret = devm_reset_control_bulk_get_exclusive(dev, num_resets, qmp->resets); if (ret) return dev_err_probe(dev, ret, "failed to get resets\n"); @@ -2064,6 +2039,11 @@ static int qmp_usb_parse_dt_legacy(struct qmp_usb *qmp, struct device_node *np) qmp->num_clks = ret; + ret = qmp_usb_reset_init(qmp, usb3phy_legacy_reset_l, + ARRAY_SIZE(usb3phy_legacy_reset_l)); + if (ret) + return ret; + return 0; } @@ -2105,6 +2085,11 @@ static int qmp_usb_parse_dt(struct qmp_usb *qmp) "failed to get pipe clock\n"); } + ret = qmp_usb_reset_init(qmp, usb3phy_reset_l, + ARRAY_SIZE(usb3phy_reset_l)); + if (ret) + return ret; + return 0; } @@ -2126,10 +2111,6 @@ static int qmp_usb_probe(struct platform_device *pdev) if (!qmp->cfg) return -EINVAL; - ret = qmp_usb_reset_init(qmp); - if (ret) - return ret; - ret = qmp_usb_vreg_init(qmp); if (ret) return ret; From patchwork Thu Aug 24 21:19:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 717318 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AE02C71145 for ; Thu, 24 Aug 2023 21:20:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235770AbjHXVUY (ORCPT ); Thu, 24 Aug 2023 17:20:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243550AbjHXVUB (ORCPT ); Thu, 24 Aug 2023 17:20:01 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 418E11BE5 for ; Thu, 24 Aug 2023 14:19:59 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4ffa6e25ebbso1615508e87.0 for ; Thu, 24 Aug 2023 14:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692911997; x=1693516797; 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=R7mOGTx5+h4i0NdOspjuoR2EZoV3NOPl1+DrGOJBMv8=; b=qLuIYON7kk1Wj2SPSg/jJy3l2vC3R0pj3A/nxqIjDIvoNBjyeH46lPVBsdRaDs4m/o WrnX0/udPBqVMGxX8LGTyICQT1ejoj1+9efVjwlbYUP4use1NMLN8dZ8peNwPvn3G6Fx dSX7UZZH486vUFCkca5YFgc7egAhYIm3k9svOP3H2xIyw51PLnM6l82i4Idm0oWln9sv yIOv6Eov6RTfMINCHAGJtZ5uINh0s4DiTFgRmhn4eM9KpNgylu46g15vePC4+TyaGIFm bX2Dc6w24o9cCAEt5TtwB0yA6Uh1ES9ojtP5GpAYUQoYLecJ8nEm7j97YfO6gcclA/54 EN+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692911997; x=1693516797; 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=R7mOGTx5+h4i0NdOspjuoR2EZoV3NOPl1+DrGOJBMv8=; b=ZGl7lF0BuGePWi1zTyOZW1IVUVhoRX/iM/LizeCvqSdxW3jnOnCwhLeDRuOKTXHQnz HXSYBmvtKXD/pOEljvNlmWzX9PwPzKbJs7zxVwldhfcUyGNlFwqctIaUMq+2ZjHPV0vv 3AX69HiZw+DFQBpdlq7ewfja9M3w35fdxgmcQ6e/cgKCZXDilRNZs/MJwEOSwroaeP+E iCy4qqc15L/nLSB2cAeh/+PZ1CLFZh9anApH7/LVne4SJovHn3xGrgN46Pxs/z0e/RcS dCUgnAAduVKxkhXM+DxMkaxez1ZHgORrCpiuxDv++iAMCjqeKbLvPaJDIdiI+ahpWsII 7JVg== X-Gm-Message-State: AOJu0Yx9pjyXmLVPxC2nJYL2vAcKfDMkAWS/Fhw+MhgBokLogqxKUXjs UCTIcBbZqK0VXu11WGGAgDbnWg== X-Google-Smtp-Source: AGHT+IFRuQrwJgRDifaO6K4IPZdHUqV/YZ4NaVNPEDSTQxpBSMkDUHFsqFap7AYt/6DQEPcRiWHYCA== X-Received: by 2002:a05:6512:1294:b0:4f9:6adf:3981 with SMTP id u20-20020a056512129400b004f96adf3981mr6904271lfs.33.1692911997635; Thu, 24 Aug 2023 14:19:57 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j29-20020a056512029d00b004fe4ab686b4sm17690lfp.167.2023.08.24.14.19.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 14:19:57 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Philipp Zabel , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 04/16] phy: qcom-qmp-usb: make QPHY_PCS_MISC_CLAMP_ENABLE access conditional Date: Fri, 25 Aug 2023 00:19:40 +0300 Message-Id: <20230824211952.1397699-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> References: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The register QPHY_V[34]_PCS_MISC_CLAMP_ENABLE is present only on some SoC families. Other platforms (qcm2290) can have PCS_MISC region, but do not have this register. Add it to the register layout table and check that it is defined before toggling CLAMP settings. Signed-off-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index 8f43de20fb8c..411cf0ae148d 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -94,6 +94,7 @@ enum qphy_reg_layout { QPHY_PCS_AUTONOMOUS_MODE_CTRL, QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR, QPHY_PCS_POWER_DOWN_CONTROL, + QPHY_PCS_MISC_CLAMP_ENABLE, /* Keep last to ensure regs_layout arrays are properly initialized */ QPHY_LAYOUT_SIZE }; @@ -114,6 +115,16 @@ static const unsigned int qmp_v3_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_PCS_AUTONOMOUS_MODE_CTRL] = QPHY_V3_PCS_AUTONOMOUS_MODE_CTRL, [QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = QPHY_V3_PCS_LFPS_RXTERM_IRQ_CLEAR, [QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V3_PCS_POWER_DOWN_CONTROL, + [QPHY_PCS_MISC_CLAMP_ENABLE] = QPHY_V3_PCS_MISC_CLAMP_ENABLE, +}; + +static const unsigned int qmp_v3_usb3phy_regs_layout_qcm2290[QPHY_LAYOUT_SIZE] = { + [QPHY_SW_RESET] = QPHY_V3_PCS_SW_RESET, + [QPHY_START_CTRL] = QPHY_V3_PCS_START_CONTROL, + [QPHY_PCS_STATUS] = QPHY_V3_PCS_PCS_STATUS, + [QPHY_PCS_AUTONOMOUS_MODE_CTRL] = QPHY_V3_PCS_AUTONOMOUS_MODE_CTRL, + [QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = QPHY_V3_PCS_LFPS_RXTERM_IRQ_CLEAR, + [QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V3_PCS_POWER_DOWN_CONTROL, }; static const unsigned int qmp_v4_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = { @@ -125,6 +136,7 @@ static const unsigned int qmp_v4_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = { /* In PCS_USB */ [QPHY_PCS_AUTONOMOUS_MODE_CTRL] = QPHY_V4_PCS_USB3_AUTONOMOUS_MODE_CTRL, [QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = QPHY_V4_PCS_USB3_LFPS_RXTERM_IRQ_CLEAR, + [QPHY_PCS_MISC_CLAMP_ENABLE] = QPHY_V4_PCS_MISC_CLAMP_ENABLE, }; static const unsigned int qmp_v5_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = { @@ -1523,7 +1535,7 @@ static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = { .pcs_tbl_num = ARRAY_SIZE(qcm2290_usb3_pcs_tbl), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), - .regs = qmp_v3_usb3phy_regs_layout, + .regs = qmp_v3_usb3phy_regs_layout_qcm2290, }; static void qmp_usb_configure_lane(void __iomem *base, @@ -1761,8 +1773,8 @@ static void qmp_usb_enable_autonomous_mode(struct qmp_usb *qmp) qphy_setbits(pcs_usb, cfg->regs[QPHY_PCS_AUTONOMOUS_MODE_CTRL], intr_mask); /* Enable i/o clamp_n for autonomous mode */ - if (pcs_misc) - qphy_clrbits(pcs_misc, QPHY_V3_PCS_MISC_CLAMP_ENABLE, CLAMP_EN); + if (pcs_misc && cfg->regs[QPHY_PCS_MISC_CLAMP_ENABLE]) + qphy_clrbits(pcs_misc, cfg->regs[QPHY_PCS_MISC_CLAMP_ENABLE], CLAMP_EN); } static void qmp_usb_disable_autonomous_mode(struct qmp_usb *qmp) @@ -1772,8 +1784,8 @@ static void qmp_usb_disable_autonomous_mode(struct qmp_usb *qmp) void __iomem *pcs_misc = qmp->pcs_misc; /* Disable i/o clamp_n on resume for normal mode */ - if (pcs_misc) - qphy_setbits(pcs_misc, QPHY_V3_PCS_MISC_CLAMP_ENABLE, CLAMP_EN); + if (pcs_misc && cfg->regs[QPHY_PCS_MISC_CLAMP_ENABLE]) + qphy_setbits(pcs_misc, cfg->regs[QPHY_PCS_MISC_CLAMP_ENABLE], CLAMP_EN); qphy_clrbits(pcs_usb, cfg->regs[QPHY_PCS_AUTONOMOUS_MODE_CTRL], ARCVR_DTCT_EN | ARCVR_DTCT_EVENT_SEL | ALFPS_DTCT_EN); From patchwork Thu Aug 24 21:19:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 717316 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C786EE49A0 for ; Thu, 24 Aug 2023 21:20:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243645AbjHXVUY (ORCPT ); Thu, 24 Aug 2023 17:20:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243640AbjHXVUC (ORCPT ); Thu, 24 Aug 2023 17:20:02 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 087441BE9 for ; Thu, 24 Aug 2023 14:20:00 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-4ffa94a7a47so371283e87.1 for ; Thu, 24 Aug 2023 14:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692911998; x=1693516798; 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=Mp3OxMlQ5f/3XEucj+vCtx08B1iilIkI8HF7qdGL8lY=; b=WMBR48fEAtiuOFYSaAKrg4lOQzMbcPMvh+ryvhJwfZ4uZTZdNM0rVvoS1cIA4hyEzG VdZWINIra6uL44IR7Qc2lAj5Gmkc2f9zT5CkOWzAcKyFW3WNtABjwbsf/LmGvG/JVq9w 4AvbBSXX0yMWQAn/xNUkecOLsApdGquNJ20+q/07/NXyD7OGxyw8uUCMQgHKU6AFjP8P vadmUQ4nt3s8EaKA//L/0njnc0pKYoVLSdszEU868p4rhU/2te5Z+SlWV4iw8pV0+VcW GL7Fz/UAFtojRpuGGHwiL3KEXmER7VykqJHuCPvihXmbVZ2XABICrEhxF8kOZ3p9YbSM TjKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692911998; x=1693516798; 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=Mp3OxMlQ5f/3XEucj+vCtx08B1iilIkI8HF7qdGL8lY=; b=eAdZ3n8p/Gkp2wKG2NuKu48aG2WmbGiV6SprQrdpAAiQNxCRn10HmgDJfF9+C/Qw6A kGlsM9MFWfx0rvzf2C87YJqlfPNbfD3hDBWMbgHwnRP4cx7rMLZS1Wg8H4O+uQqJKPD5 Pl3kAuJQ+xjaKIilis8AhGlQzzSU89o1fo2tn4JutyUH2hjI8fkm+HW6tKOX72d0//FG fGR3XCJ/dCoxYPAPi99+mm32ugwguyaAY1toGLg0drd6ICK+Vj5UHRYvg1RKpXlzldKh 7w3P02Ra197OoRJcX932FFxyxnOIk5zIitjzW4O1HZppIwzSbbuA5ww4zTy9ULJ27oFa LFqg== X-Gm-Message-State: AOJu0Yy+nTJLkwOYv/q+iQVKVmzKyQZxYAo3rpJNr+WXy1leFBoyJXqb /+3cyuK137uXRpMMrk3zkoAqGw== X-Google-Smtp-Source: AGHT+IHyH9FMI2+xgQbIvbU7paqUhcBUhQrFf+ntRdkpX+dNWu28gijxu2GMP5ehPe1DYBin4RC8gQ== X-Received: by 2002:ac2:4557:0:b0:4fd:fef8:7a81 with SMTP id j23-20020ac24557000000b004fdfef87a81mr10715275lfm.55.1692911998388; Thu, 24 Aug 2023 14:19:58 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j29-20020a056512029d00b004fe4ab686b4sm17690lfp.167.2023.08.24.14.19.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 14:19:57 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Philipp Zabel , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 05/16] phy: qcom-qmp: move PCS MISC V4 registers to separate header Date: Fri, 25 Aug 2023 00:19:41 +0300 Message-Id: <20230824211952.1397699-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> References: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Move PCS MISC V4 registers to the separate header. Signed-off-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-pcs-misc-v4.h | 17 +++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 1 + drivers/phy/qualcomm/phy-qcom-qmp.h | 8 -------- 3 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 drivers/phy/qualcomm/phy-qcom-qmp-pcs-misc-v4.h diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcs-misc-v4.h b/drivers/phy/qualcomm/phy-qcom-qmp-pcs-misc-v4.h new file mode 100644 index 000000000000..e256a089f228 --- /dev/null +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcs-misc-v4.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2017, The Linux Foundation. All rights reserved. + */ + +#ifndef QCOM_PHY_QMP_PCS_MISC_V4_H_ +#define QCOM_PHY_QMP_PCS_MISC_V4_H_ + +/* Only for QMP V4 PHY - PCS_MISC registers */ +#define QPHY_V4_PCS_MISC_TYPEC_CTRL 0x00 +#define QPHY_V4_PCS_MISC_TYPEC_PWRDN_CTRL 0x04 +#define QPHY_V4_PCS_MISC_PCS_MISC_CONFIG1 0x08 +#define QPHY_V4_PCS_MISC_CLAMP_ENABLE 0x0c +#define QPHY_V4_PCS_MISC_TYPEC_STATUS 0x10 +#define QPHY_V4_PCS_MISC_PLACEHOLDER_STATUS 0x14 + +#endif diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index 411cf0ae148d..42a1a3f00759 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -21,6 +21,7 @@ #include "phy-qcom-qmp.h" #include "phy-qcom-qmp-pcs-misc-v3.h" +#include "phy-qcom-qmp-pcs-misc-v4.h" #include "phy-qcom-qmp-pcs-usb-v4.h" #include "phy-qcom-qmp-pcs-usb-v5.h" diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.h b/drivers/phy/qualcomm/phy-qcom-qmp.h index 32d897684755..71f063f4a56e 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp.h +++ b/drivers/phy/qualcomm/phy-qcom-qmp.h @@ -126,14 +126,6 @@ #define QSERDES_V4_DP_PHY_AUX_INTERRUPT_STATUS 0x0d8 #define QSERDES_V4_DP_PHY_STATUS 0x0dc -/* Only for QMP V4 PHY - PCS_MISC registers */ -#define QPHY_V4_PCS_MISC_TYPEC_CTRL 0x00 -#define QPHY_V4_PCS_MISC_TYPEC_PWRDN_CTRL 0x04 -#define QPHY_V4_PCS_MISC_PCS_MISC_CONFIG1 0x08 -#define QPHY_V4_PCS_MISC_CLAMP_ENABLE 0x0c -#define QPHY_V4_PCS_MISC_TYPEC_STATUS 0x10 -#define QPHY_V4_PCS_MISC_PLACEHOLDER_STATUS 0x14 - #define QSERDES_V5_DP_PHY_STATUS 0x0dc /* Only for QMP V6 PHY - DP PHY registers */ From patchwork Thu Aug 24 21:19:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 716651 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF7CCEE49B0 for ; Thu, 24 Aug 2023 21:20:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243202AbjHXVUZ (ORCPT ); Thu, 24 Aug 2023 17:20:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243647AbjHXVUD (ORCPT ); Thu, 24 Aug 2023 17:20:03 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D34441BCC for ; Thu, 24 Aug 2023 14:20:00 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-500913779f5so366850e87.2 for ; Thu, 24 Aug 2023 14:20:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692911999; x=1693516799; 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=oeyhlBcYF6kNyxOOHtFnOfb9CYrap2bu/TWYuUuCiA8=; b=LIr+P2Qfud/QJoZPo5WWibefJc3ywVDYnMn6/WPQuItRiJdK5jLEVMmOFp8oUFtwcA pDPjjrWnuDFEPfaSR1UEl1HoREknYlVQqFv5+EstYlOiXqDevbtYuiDT2rzQlylRTKgd /OOCQWqulMYXuFTLCAjGWvj/mSQ3W601cez75LPjLMHzJs3Le7oc41Re692JiO3yyc+B 2Seql30cEY92jK9XMIEXEjd8rbdNlCyThZVf6eb/9Y6vIBTNyhXWZTRIAbXmkm4vTk8T z0DkiB+dbSn3IKIbc1QClx+G2Xq3hNn5JAPLKRFcLwNYKxMqu87rRdwJnGSOTChU8nk7 AinQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692911999; x=1693516799; 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=oeyhlBcYF6kNyxOOHtFnOfb9CYrap2bu/TWYuUuCiA8=; b=ayd7821e0nhP7fFgi4L0bnwRj9ybTt4GI1/yd7bdDdTr1haLU0byogPC0+Eh278vQv z9WkUhJG+6KXS8F+w19LzvzIgyjBoLs2YAePw4TS/ITbY+s/axnQZkLCLDKRBX3irlgQ lEQLcaSD6EnXq6Z5MeOsMsAjMhOfYOgSUNYlRTl27zO8beq0l/e3CLA/ESiOlt4fsedp L/HkP90VbL4mmBaWEqcK8Hxta+x/TcXOMz0ZwY4UTNXVjaHs8K0sZLMOaCogeQZ60iCU KPersvz7Sc7YRrD6MwsRSHmJfnCvmrAohYO7XXFMuLY44ayWYmaaxwP1OvPDmYCI9DEt MQ4g== X-Gm-Message-State: AOJu0YwxG9lTNkis0ku8kYbKlhVilucc6e5uxMDteELpYA3YJVMuL8hk CImAcz0XzpPcWprChazOyr0jM0u+y2M7jH/uuYI= X-Google-Smtp-Source: AGHT+IHZw9qQMogH4O1NpLODa4xg3NVisfCxkfeFsG4nZb7pI8xGMxKpmeC5k2th8AGz7xkyx+Rq3g== X-Received: by 2002:a05:6512:3241:b0:4fd:f889:b9d2 with SMTP id c1-20020a056512324100b004fdf889b9d2mr10728157lfr.38.1692911999257; Thu, 24 Aug 2023 14:19:59 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j29-20020a056512029d00b004fe4ab686b4sm17690lfp.167.2023.08.24.14.19.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 14:19:58 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Philipp Zabel , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 06/16] phy: qcom-qmp-usb: populate offsets configuration Date: Fri, 25 Aug 2023 00:19:42 +0300 Message-Id: <20230824211952.1397699-7-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> References: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Populate offsets configuration for the rest of USB PHYs to make it possible to switch them to the new (single-node) bindings style. Signed-off-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 41 +++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index 42a1a3f00759..2a094f2345f0 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -1280,6 +1280,13 @@ static const struct qmp_usb_offsets qmp_usb_offsets_ipq9574 = { static const struct qmp_usb_offsets qmp_usb_offsets_v3 = { .serdes = 0, + .pcs = 0x600, + .tx = 0x200, + .rx = 0x400, +}; + +static const struct qmp_usb_offsets qmp_usb_offsets_v3_qcm2290 = { + .serdes = 0x0, .pcs = 0xc00, .pcs_misc = 0xa00, .tx = 0x200, @@ -1288,6 +1295,14 @@ static const struct qmp_usb_offsets qmp_usb_offsets_v3 = { .rx2 = 0x800, }; +static const struct qmp_usb_offsets qmp_usb_offsets_v4 = { + .serdes = 0, + .pcs = 0x0800, + .pcs_usb = 0x0e00, + .tx = 0x0200, + .rx = 0x0400, +}; + static const struct qmp_usb_offsets qmp_usb_offsets_v5 = { .serdes = 0, .pcs = 0x0200, @@ -1299,6 +1314,8 @@ static const struct qmp_usb_offsets qmp_usb_offsets_v5 = { static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = { .lanes = 1, + .offsets = &qmp_usb_offsets_v3, + .serdes_tbl = ipq8074_usb3_serdes_tbl, .serdes_tbl_num = ARRAY_SIZE(ipq8074_usb3_serdes_tbl), .tx_tbl = msm8996_usb3_tx_tbl, @@ -1333,6 +1350,8 @@ static const struct qmp_phy_cfg ipq9574_usb3phy_cfg = { static const struct qmp_phy_cfg msm8996_usb3phy_cfg = { .lanes = 1, + .offsets = &qmp_usb_offsets_v3, + .serdes_tbl = msm8996_usb3_serdes_tbl, .serdes_tbl_num = ARRAY_SIZE(msm8996_usb3_serdes_tbl), .tx_tbl = msm8996_usb3_tx_tbl, @@ -1385,6 +1404,8 @@ static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = { static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = { .lanes = 1, + .offsets = &qmp_usb_offsets_v3, + .serdes_tbl = qmp_v3_usb3_uniphy_serdes_tbl, .serdes_tbl_num = ARRAY_SIZE(qmp_v3_usb3_uniphy_serdes_tbl), .tx_tbl = qmp_v3_usb3_uniphy_tx_tbl, @@ -1403,6 +1424,8 @@ static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = { static const struct qmp_phy_cfg msm8998_usb3phy_cfg = { .lanes = 2, + .offsets = &qmp_usb_offsets_v3_qcm2290, + .serdes_tbl = msm8998_usb3_serdes_tbl, .serdes_tbl_num = ARRAY_SIZE(msm8998_usb3_serdes_tbl), .tx_tbl = msm8998_usb3_tx_tbl, @@ -1419,6 +1442,8 @@ static const struct qmp_phy_cfg msm8998_usb3phy_cfg = { static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = { .lanes = 1, + .offsets = &qmp_usb_offsets_v4, + .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl, .serdes_tbl_num = ARRAY_SIZE(sm8150_usb3_uniphy_serdes_tbl), .tx_tbl = sm8150_usb3_uniphy_tx_tbl, @@ -1440,6 +1465,8 @@ static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = { static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = { .lanes = 1, + .offsets = &qmp_usb_offsets_v4, + .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl, .serdes_tbl_num = ARRAY_SIZE(sm8150_usb3_uniphy_serdes_tbl), .tx_tbl = sm8250_usb3_uniphy_tx_tbl, @@ -1461,6 +1488,8 @@ static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = { static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = { .lanes = 1, + .offsets = &qmp_usb_offsets_v4, + .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl, .serdes_tbl_num = ARRAY_SIZE(sm8150_usb3_uniphy_serdes_tbl), .tx_tbl = sdx55_usb3_uniphy_tx_tbl, @@ -1482,6 +1511,8 @@ static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = { static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = { .lanes = 1, + .offsets = &qmp_usb_offsets_v5, + .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl, .serdes_tbl_num = ARRAY_SIZE(sm8150_usb3_uniphy_serdes_tbl), .tx_tbl = sdx65_usb3_uniphy_tx_tbl, @@ -1503,6 +1534,8 @@ static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = { static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = { .lanes = 1, + .offsets = &qmp_usb_offsets_v5, + .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl, .serdes_tbl_num = ARRAY_SIZE(sm8150_usb3_uniphy_serdes_tbl), .tx_tbl = sm8350_usb3_uniphy_tx_tbl, @@ -1524,7 +1557,7 @@ static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = { static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = { .lanes = 2, - .offsets = &qmp_usb_offsets_v3, + .offsets = &qmp_usb_offsets_v3_qcm2290, .serdes_tbl = qcm2290_usb3_serdes_tbl, .serdes_tbl_num = ARRAY_SIZE(qcm2290_usb3_serdes_tbl), @@ -2078,8 +2111,10 @@ static int qmp_usb_parse_dt(struct qmp_usb *qmp) qmp->serdes = base + offs->serdes; qmp->pcs = base + offs->pcs; - qmp->pcs_misc = base + offs->pcs_misc; - qmp->pcs_usb = base + offs->pcs_usb; + if (offs->pcs_usb) + qmp->pcs_usb = base + offs->pcs_usb; + if (offs->pcs_misc) + qmp->pcs_misc = base + offs->pcs_misc; qmp->tx = base + offs->tx; qmp->rx = base + offs->rx; From patchwork Thu Aug 24 21:19:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 717314 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C565EE49B6 for ; Thu, 24 Aug 2023 21:20:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243651AbjHXVU0 (ORCPT ); Thu, 24 Aug 2023 17:20:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243649AbjHXVUE (ORCPT ); Thu, 24 Aug 2023 17:20:04 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 960CF1BD9 for ; Thu, 24 Aug 2023 14:20:01 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-4fe27849e6aso373022e87.1 for ; Thu, 24 Aug 2023 14:20:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692912000; x=1693516800; 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=hc8pSN8VZcLAgrrCg9Hdw/Sq6XrZ7CHaLJcqEMsAhS8=; b=kfyZaJCOyigH2bHO0UclDifKimrMbeJ5LHILl13/7TcrbMr3LScQ95lxOAfjaXcFIv LpOEwOBrOk33X84I6b7p82S2eo5D+eqfO5iVTZ68sF0IApxaju5MXLLihKZyZ4x9bEVo hZkLUpyn98Vvou0UUGV1X/WRybmfPsL3hEgVkJxCWEsDvY82n7r9SMV6XPREQPaTqA4O +I4rlDFgIhACMzt9Sfur5wYnFLn0wY/8ZzWiKI+IZdCDoWQIBnFz+II+RvljeJVH5v3Z +FFtSh+cjoS8Q1aMJL/8O7zsQhPnOCNA6kzwn8w3CqftC28nps96PVjlyYxN9wCrJte5 muqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692912000; x=1693516800; 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=hc8pSN8VZcLAgrrCg9Hdw/Sq6XrZ7CHaLJcqEMsAhS8=; b=Jt/lRZy/YXN0Hkr7JMXKAKtlTaswLTMGwM6Hi2ugEH7tBcnW09qOOgj9B5aDCLScnB JNgYB9AxOBgTUWvc/hPS4pHbqaMIh7RGysFP+5cipUm1i4RQxIFuZdhRH2Acpl6lMqFT arP2ruyRf+eZ/vLU+oySVJZ8qfXCJV+w0PVKagTOrIuL6aLp8wFBSJ1Ct+4TFeOr0r0o YpqRCbP3e6pwSxc1m+hufpKvPC7lzDpLWhcF5JyWRdt3CLVTRWEingHktTLy3phP/CEZ DoWBk4gTMpsfvXKcy5RaI6iHU2fDqE1oTGzFHUBXfyo5fJptVLaInfmzarHzeFkXUyR5 sfBg== X-Gm-Message-State: AOJu0YzdVzYzaTZNTDnM04tgFK78RUGr5nN+kuUQM3AkIfSPQraQT/Is Sy537Y6eIw7/Z6ognP03I/vegQ== X-Google-Smtp-Source: AGHT+IGPplUXgMOlKf/8SoZyUc4KgnLrO1Fzxwjvb1nw5lZqwzUWenteFutCv9/WWKyxJQWCKVEAuQ== X-Received: by 2002:a05:6512:2803:b0:500:8725:1351 with SMTP id cf3-20020a056512280300b0050087251351mr9808353lfb.47.1692912000003; Thu, 24 Aug 2023 14:20:00 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j29-20020a056512029d00b004fe4ab686b4sm17690lfp.167.2023.08.24.14.19.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 14:19:59 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Philipp Zabel , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 07/16] arm64: dts: qcom: ipq6018: switch USB QMP PHY to new style of bindings Date: Fri, 25 Aug 2023 00:19:43 +0300 Message-Id: <20230824211952.1397699-8-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> References: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/ipq6018.dtsi | 35 ++++++++++++--------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/ipq6018.dtsi b/arch/arm64/boot/dts/qcom/ipq6018.dtsi index 3c8a2f4e26a3..f0458de265ad 100644 --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi @@ -236,31 +236,26 @@ qusb_phy_1: qusb@59000 { ssphy_0: ssphy@78000 { compatible = "qcom,ipq6018-qmp-usb3-phy"; - reg = <0x0 0x00078000 0x0 0x1c4>; - #address-cells = <2>; - #size-cells = <2>; - ranges; + reg = <0x0 0x00078000 0x0 0x1000>; clocks = <&gcc GCC_USB0_AUX_CLK>, - <&gcc GCC_USB0_PHY_CFG_AHB_CLK>, <&xo>; - clock-names = "aux", "cfg_ahb", "ref"; + <&xo>, + <&gcc GCC_USB0_PHY_CFG_AHB_CLK>, + <&gcc GCC_USB0_PIPE_CLK>; + clock-names = "aux", + "ref", + "cfg_ahb", + "pipe"; + clock-output-names = "gcc_usb0_pipe_clk_src"; + #clock-cells = <0>; + #phy-cells = <0>; resets = <&gcc GCC_USB0_PHY_BCR>, <&gcc GCC_USB3PHY_0_PHY_BCR>; - reset-names = "phy","common"; - status = "disabled"; + reset-names = "phy", + "phy_phy"; - usb0_ssphy: phy@78200 { - reg = <0x0 0x00078200 0x0 0x130>, /* Tx */ - <0x0 0x00078400 0x0 0x200>, /* Rx */ - <0x0 0x00078800 0x0 0x1f8>, /* PCS */ - <0x0 0x00078600 0x0 0x044>; /* PCS misc */ - #phy-cells = <0>; - #clock-cells = <0>; - clocks = <&gcc GCC_USB0_PIPE_CLK>; - clock-names = "pipe0"; - clock-output-names = "gcc_usb0_pipe_clk_src"; - }; + status = "disabled"; }; qusb_phy_0: qusb@79000 { @@ -566,7 +561,7 @@ dwc_0: usb@8a00000 { compatible = "snps,dwc3"; reg = <0x0 0x08a00000 0x0 0xcd00>; interrupts = ; - phys = <&qusb_phy_0>, <&usb0_ssphy>; + phys = <&qusb_phy_0>, <&ssphy_0>; phy-names = "usb2-phy", "usb3-phy"; clocks = <&xo>; clock-names = "ref"; From patchwork Thu Aug 24 21:19:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 717315 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE131EE49A6 for ; Thu, 24 Aug 2023 21:20:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243674AbjHXVU0 (ORCPT ); Thu, 24 Aug 2023 17:20:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243655AbjHXVUE (ORCPT ); Thu, 24 Aug 2023 17:20:04 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56D08CF1 for ; Thu, 24 Aug 2023 14:20:02 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4ff933f9ca8so371376e87.1 for ; Thu, 24 Aug 2023 14:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692912000; x=1693516800; 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=o4/HaBQdmop51bI5KAdwerODTyagveuUw1HWmRGvWSw=; b=xGg3ECOhpPNdOxz+2WJe/XFKW15owi51pUWdjauluWt0m6O6If2OQzZ5TfZ3eBdtiX Ap5eVyDHZv5SLatgVnX2yAOuatH5nJbGPbHLTc0nGziP+ygkWxtM0zJZrX7VtX1IV0o2 smqVUKKqD/7tgSZfUxKdqP4lBRpv6Sv6ymEIjOwHHgVGOUDLz6OL4q8mAH9+lJBWvnKp Uye+2wFu3LsVIdYpPhNmiiI2E2SfYsFAPOTiLQ1gL3pxqO3/2yAAy2LydqF1po/ACp7O AxPs3qzK+XEd96NWPHEmA0dEUUqKvo9kiBDhBYaMybwRGUyAT9hlYDGlflpgBfRvFe2F lhBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692912000; x=1693516800; 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=o4/HaBQdmop51bI5KAdwerODTyagveuUw1HWmRGvWSw=; b=L/j/6x8NR/JBKLe6mVThSQl45cN0mADyX6gueIMMpiuh0ixeWuj5m1/plvuncDXYWW PCpGn/4JbhcaAIqQah8b9t3dNmdOGBblicnK3qEkhLFhTWIbrHpDqCGMuUEBTCcbTfJT gdf7888gCO6hFH+5/fJwEYty1rU9M2L1TdbuN9MYrCec6NbqRtL9BBOdrshdEh+8mQia QxB9NImuDfE70B9WXpmZbSF0f5GR3+ok5MnaMHQLfl1s81GtAJILYVU4UigClz8Scuf5 NYvRboHOrU6Z00G/QVJjlF0+GlGxdITj9fLd4cP/ZUt1fm4yNY+aZS3Z1mJN1bHj1hIj vWzg== X-Gm-Message-State: AOJu0YyoPCysd++bU5lsSc3suwme/TyVicBRDnTQJpW1/tZH03YR38FV Yf1lNpyRESH8vVdu/yI7d7/MRA== X-Google-Smtp-Source: AGHT+IEwIdj5aiNTBoZCRdVHgEIMB5N+PRsu2Y+JbGrKxRF8A7/Y6IEdkffhPxxvBMPSQp6+twXqWg== X-Received: by 2002:a05:6512:ad2:b0:4fe:4f8:8e75 with SMTP id n18-20020a0565120ad200b004fe04f88e75mr14330790lfu.68.1692912000739; Thu, 24 Aug 2023 14:20:00 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j29-20020a056512029d00b004fe4ab686b4sm17690lfp.167.2023.08.24.14.20.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 14:20:00 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Philipp Zabel , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 08/16] arm64: dts: qcom: ipq8074: switch USB QMP PHY to new style of bindings Date: Fri, 25 Aug 2023 00:19:44 +0300 Message-Id: <20230824211952.1397699-9-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> References: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 76 +++++++++++---------------- 1 file changed, 32 insertions(+), 44 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi index 3350804a2f62..e113f5eec8e6 100644 --- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi @@ -125,32 +125,26 @@ soc: soc@0 { ssphy_1: phy@58000 { compatible = "qcom,ipq8074-qmp-usb3-phy"; - reg = <0x00058000 0x1c4>; - #address-cells = <1>; - #size-cells = <1>; - ranges; + reg = <0x00058000 0x1000>; clocks = <&gcc GCC_USB1_AUX_CLK>, - <&gcc GCC_USB1_PHY_CFG_AHB_CLK>, - <&xo>; - clock-names = "aux", "cfg_ahb", "ref"; + <&xo>, + <&gcc GCC_USB1_PHY_CFG_AHB_CLK>, + <&gcc GCC_USB1_PIPE_CLK>; + clock-names = "aux", + "ref", + "cfg_ahb", + "pipe"; + clock-output-names = "usb3phy_1_cc_pipe_clk"; + #clock-cells = <0>; + #phy-cells = <0>; resets = <&gcc GCC_USB1_PHY_BCR>, - <&gcc GCC_USB3PHY_1_PHY_BCR>; - reset-names = "phy","common"; - status = "disabled"; + <&gcc GCC_USB3PHY_1_PHY_BCR>; + reset-names = "phy", + "phy_phy"; - usb1_ssphy: phy@58200 { - reg = <0x00058200 0x130>, /* Tx */ - <0x00058400 0x200>, /* Rx */ - <0x00058800 0x1f8>, /* PCS */ - <0x00058600 0x044>; /* PCS misc */ - #phy-cells = <0>; - #clock-cells = <0>; - clocks = <&gcc GCC_USB1_PIPE_CLK>; - clock-names = "pipe0"; - clock-output-names = "usb3phy_1_cc_pipe_clk"; - }; + status = "disabled"; }; qusb_phy_1: phy@59000 { @@ -168,32 +162,26 @@ qusb_phy_1: phy@59000 { ssphy_0: phy@78000 { compatible = "qcom,ipq8074-qmp-usb3-phy"; - reg = <0x00078000 0x1c4>; - #address-cells = <1>; - #size-cells = <1>; - ranges; + reg = <0x00078000 0x1000>; clocks = <&gcc GCC_USB0_AUX_CLK>, - <&gcc GCC_USB0_PHY_CFG_AHB_CLK>, - <&xo>; - clock-names = "aux", "cfg_ahb", "ref"; + <&xo>, + <&gcc GCC_USB0_PHY_CFG_AHB_CLK>, + <&gcc GCC_USB0_PIPE_CLK>; + clock-names = "aux", + "ref", + "cfg_ahb", + "pipe"; + clock-output-names = "usb3phy_0_cc_pipe_clk"; + #clock-cells = <0>; + #phy-cells = <0>; resets = <&gcc GCC_USB0_PHY_BCR>, - <&gcc GCC_USB3PHY_0_PHY_BCR>; - reset-names = "phy","common"; - status = "disabled"; + <&gcc GCC_USB3PHY_0_PHY_BCR>; + reset-names = "phy", + "phy_phy"; - usb0_ssphy: phy@78200 { - reg = <0x00078200 0x130>, /* Tx */ - <0x00078400 0x200>, /* Rx */ - <0x00078800 0x1f8>, /* PCS */ - <0x00078600 0x044>; /* PCS misc */ - #phy-cells = <0>; - #clock-cells = <0>; - clocks = <&gcc GCC_USB0_PIPE_CLK>; - clock-names = "pipe0"; - clock-output-names = "usb3phy_0_cc_pipe_clk"; - }; + status = "disabled"; }; qusb_phy_0: phy@79000 { @@ -628,7 +616,7 @@ dwc_0: usb@8a00000 { compatible = "snps,dwc3"; reg = <0x8a00000 0xcd00>; interrupts = ; - phys = <&qusb_phy_0>, <&usb0_ssphy>; + phys = <&qusb_phy_0>, <&ssphy_0>; phy-names = "usb2-phy", "usb3-phy"; snps,is-utmi-l1-suspend; snps,hird-threshold = /bits/ 8 <0x0>; @@ -670,7 +658,7 @@ dwc_1: usb@8c00000 { compatible = "snps,dwc3"; reg = <0x8c00000 0xcd00>; interrupts = ; - phys = <&qusb_phy_1>, <&usb1_ssphy>; + phys = <&qusb_phy_1>, <&ssphy_1>; phy-names = "usb2-phy", "usb3-phy"; snps,is-utmi-l1-suspend; snps,hird-threshold = /bits/ 8 <0x0>; From patchwork Thu Aug 24 21:19:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 716648 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCCF2EE49BB for ; Thu, 24 Aug 2023 21:20:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243658AbjHXVU1 (ORCPT ); Thu, 24 Aug 2023 17:20:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243657AbjHXVUF (ORCPT ); Thu, 24 Aug 2023 17:20:05 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 462591BCC for ; Thu, 24 Aug 2023 14:20:03 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2b95d5ee18dso3477691fa.1 for ; Thu, 24 Aug 2023 14:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692912001; x=1693516801; 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=eil83J6swtIZs9wN/isJUA8e6KGbFpAZ1S8rsr3xUpM=; b=s5I6cbnMOKFvbCWbHaXyJ02vjxi13VFaSebEMkahMMeBA295bJSf4eI8G60goOCH26 tsYt2sYYhdjlCJ4/fyWn4sYKaEtjxWxMvT2kd75fIXx7kFJEe+jFMiZTW1hW696w4gFv vt3KpDrChsnxSwMFkWzcfot3sKeDzZYqIFSd+a5zYZLF05emJCHuC1FX0dZHbfgF37ID eJvxEpsMBDnclH0G5b7lzGlH3vjEfj7JxGSJDCFPcqSaWQVeuWKNQXkMR3xND/rtWpI/ gIMmtRuFc4tTLShagDW5189o1V4jUGHPfTdBGA2QWy62KGElwDtZM/wSmRVrST6cDunc JBOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692912001; x=1693516801; 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=eil83J6swtIZs9wN/isJUA8e6KGbFpAZ1S8rsr3xUpM=; b=bVSRpnzLjJrqBvdWOW7O1iYkcUgF91Bwb0jOclczh2b3lV/ZAWU7abikrbj8emMgJW HWB8zzO1iB35/OQtGgNEzt0mjjUSN+CyId6ltW0xR4byhT/0VvF+dLMPVeDbALMnAscQ VhJdQo1xFQrGtSxBJyDb3QK70vG5D3rBn0zhTy4CyEAcgRX+PUzVe1LHPJcNxOracbxQ AeMQ+gtzrQUKgS9N0hNf5p6G3x/nyeWjWYfQC5j2Om7srIG1hTAJKCjpomsDAdDsSUmo UR8KbQXZUzsWdU/P5qlW6o0U+X0YZByfot00q/Dv5unjiYUiKuKFTnyrm1oDEuHvxlDZ rjCA== X-Gm-Message-State: AOJu0YzugFOi/YUO2eTEaY7ChYRtq3eoKFyN826Ft3GBhHtsTNRSx7Z8 rEfvvWQvu3IU4fkFOvqa+QjNKA== X-Google-Smtp-Source: AGHT+IHd0dWBQmcVzl/Sc09z8470seW2mqUteQANveV8Wyi8oC4WS7A3tRbDXqtrjVMvSavtO1/+6Q== X-Received: by 2002:a19:5f43:0:b0:4ff:70d2:4512 with SMTP id a3-20020a195f43000000b004ff70d24512mr9407798lfj.23.1692912001555; Thu, 24 Aug 2023 14:20:01 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j29-20020a056512029d00b004fe4ab686b4sm17690lfp.167.2023.08.24.14.20.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 14:20:01 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Philipp Zabel , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 09/16] arm64: dts: qcom: msm8996: switch USB QMP PHY to new style of bindings Date: Fri, 25 Aug 2023 00:19:45 +0300 Message-Id: <20230824211952.1397699-10-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> References: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 40 ++++++++++++--------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 44298912b3a3..cdf00d22c3bb 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -778,7 +778,7 @@ gcc: clock-controller@300000 { <&pciephy_0>, <&pciephy_1>, <&pciephy_2>, - <&ssusb_phy_0>, + <&usb3phy>, <&ufsphy 0>, <&ufsphy 1>, <&ufsphy 2>; @@ -3048,7 +3048,7 @@ usb3_dwc3: usb@6a00000 { compatible = "snps,dwc3"; reg = <0x06a00000 0xcc00>; interrupts = ; - phys = <&hsusb_phy1>, <&ssusb_phy_0>; + phys = <&hsusb_phy1>, <&usb3phy>; phy-names = "usb2-phy", "usb3-phy"; snps,hird-threshold = /bits/ 8 <0>; snps,dis_u2_susphy_quirk; @@ -3060,32 +3060,26 @@ usb3_dwc3: usb@6a00000 { usb3phy: phy@7410000 { compatible = "qcom,msm8996-qmp-usb3-phy"; - reg = <0x07410000 0x1c4>; - #address-cells = <1>; - #size-cells = <1>; - ranges; + reg = <0x07410000 0x1000>; clocks = <&gcc GCC_USB3_PHY_AUX_CLK>, - <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>, - <&gcc GCC_USB3_CLKREF_CLK>; - clock-names = "aux", "cfg_ahb", "ref"; + <&gcc GCC_USB3_CLKREF_CLK>, + <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>, + <&gcc GCC_USB3_PHY_PIPE_CLK>; + clock-names = "aux", + "ref", + "cfg_ahb", + "pipe"; + clock-output-names = "usb3_phy_pipe_clk_src"; + #clock-cells = <0>; + #phy-cells = <0>; resets = <&gcc GCC_USB3_PHY_BCR>, - <&gcc GCC_USB3PHY_PHY_BCR>; - reset-names = "phy", "common"; - status = "disabled"; + <&gcc GCC_USB3PHY_PHY_BCR>; + reset-names = "phy", + "phy_phy"; - ssusb_phy_0: phy@7410200 { - reg = <0x07410200 0x200>, - <0x07410400 0x130>, - <0x07410600 0x1a8>; - #phy-cells = <0>; - - #clock-cells = <0>; - clock-output-names = "usb3_phy_pipe_clk_src"; - clocks = <&gcc GCC_USB3_PHY_PIPE_CLK>; - clock-names = "pipe0"; - }; + status = "disabled"; }; hsusb_phy1: phy@7411000 { From patchwork Thu Aug 24 21:19:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 716650 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A2C3EE49B2 for ; Thu, 24 Aug 2023 21:20:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243676AbjHXVU1 (ORCPT ); Thu, 24 Aug 2023 17:20:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243658AbjHXVUG (ORCPT ); Thu, 24 Aug 2023 17:20:06 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A20D1BC9 for ; Thu, 24 Aug 2023 14:20:04 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2bccda76fb1so3463821fa.2 for ; Thu, 24 Aug 2023 14:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692912002; x=1693516802; 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=vzqcgcbIaMIUDZvRabJyNQlsi4CTBBIG6IN9KvgLsyc=; b=IkuwL7Imj55rPyJryvvOmTH1mgmJVPRT7xFcGHVIe6NzbWJey/PLLYUPsAhEL6uxqL 3KC8VR8wMmskYnrczrOUapq7LRgaYkB8zbKrF2NjPITBUxJQaXN5dyUCpdaDOmfJsDyQ Un5OeYMvrISU6va2Ma37gwiAMevnjMudylFvcW0SRbGOlRXRudRYgQWLHgEFs8auNSmf FUS5JzPcSA+rV8bqMg4iDKMKFEF34BzhcpjSwl6hSFwKhaYwbRzga/7eVpupQJ/cDXQD 8A54KIhZJF5TsftoDZJeGaDy1jgnd4GE59wkDlUtSgBsnE2yW0VnNz/GvyBgaDpMcoGh xVkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692912002; x=1693516802; 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=vzqcgcbIaMIUDZvRabJyNQlsi4CTBBIG6IN9KvgLsyc=; b=dGj25JqBAH/bO3KU/gwUMxHcx30341nTO8Vpr4xPR8vX222lgVUyx5QtUkWzkWhAoY pisJLp+TfKR1fq8VkS9+G2S9F5U9ELbPQZgtMY7q3NJiwmuOQaaW3l7Jfsx9z3tvN2mm +61Vig0MJem7xJd+RUa2ACN2lznix7xkbRlQSJ3MwshrBT6IVKR3lLWVMKpAGc+e2AFx di8PM075ZIZHttPYjzF7cXowvfUvkwanlmxEC8jjNfG/dyXzflFmMIppxeYbYciHQlVA txaA7lVZLAQ4EEj0vgvmEBTUCdHiAFudOWwCL7t0+X1L5wFvNpzosNoA97jYe0yht1I0 gVGg== X-Gm-Message-State: AOJu0YxFT2mYw7N/oZJL9z7JUtjeiNG2pt7j5EPDrLR0C6Q3fqRFaHez l8OWxSvWv/nMd9ZmCD/42t3BHA== X-Google-Smtp-Source: AGHT+IEmjUKELz71WH4BlPXR56Ns/EHmC7/jDyURzub2YR2qF9eQ/e2vAtdg4j6YqRWw1s5iFK69fw== X-Received: by 2002:a19:5044:0:b0:500:91ac:c0b5 with SMTP id z4-20020a195044000000b0050091acc0b5mr5641682lfj.30.1692912002417; Thu, 24 Aug 2023 14:20:02 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j29-20020a056512029d00b004fe4ab686b4sm17690lfp.167.2023.08.24.14.20.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 14:20:01 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Philipp Zabel , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 10/16] arm64: dts: qcom: msm8998: switch USB QMP PHY to new style of bindings Date: Fri, 25 Aug 2023 00:19:46 +0300 Message-Id: <20230824211952.1397699-11-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> References: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/msm8998.dtsi | 35 +++++++++++---------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi index 30d8730fa4de..a0c797710239 100644 --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi @@ -2138,7 +2138,7 @@ usb3_dwc3: usb@a800000 { interrupts = ; snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; - phys = <&qusb2phy>, <&usb1_ssphy>; + phys = <&qusb2phy>, <&usb3phy>; phy-names = "usb2-phy", "usb3-phy"; snps,has-lpm-erratum; snps,hird-threshold = /bits/ 8 <0x10>; @@ -2147,33 +2147,26 @@ usb3_dwc3: usb@a800000 { usb3phy: phy@c010000 { compatible = "qcom,msm8998-qmp-usb3-phy"; - reg = <0x0c010000 0x18c>; - status = "disabled"; - #address-cells = <1>; - #size-cells = <1>; - ranges; + reg = <0x0c010000 0x1000>; clocks = <&gcc GCC_USB3_PHY_AUX_CLK>, + <&gcc GCC_USB3_CLKREF_CLK>, <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>, - <&gcc GCC_USB3_CLKREF_CLK>; - clock-names = "aux", "cfg_ahb", "ref"; + <&gcc GCC_USB3_PHY_PIPE_CLK>; + clock-names = "aux", + "ref", + "cfg_ahb", + "pipe"; + clock-output-names = "usb3_phy_pipe_clk_src"; + #clock-cells = <0>; + #phy-cells = <0>; resets = <&gcc GCC_USB3_PHY_BCR>, <&gcc GCC_USB3PHY_PHY_BCR>; - reset-names = "phy", "common"; + reset-names = "phy", + "phy_phy"; - usb1_ssphy: phy@c010200 { - reg = <0xc010200 0x128>, - <0xc010400 0x200>, - <0xc010c00 0x20c>, - <0xc010600 0x128>, - <0xc010800 0x200>; - #phy-cells = <0>; - #clock-cells = <0>; - clocks = <&gcc GCC_USB3_PHY_PIPE_CLK>; - clock-names = "pipe0"; - clock-output-names = "usb3_phy_pipe_clk_src"; - }; + status = "disabled"; }; qusb2phy: phy@c012000 { From patchwork Thu Aug 24 21:19:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 716649 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA998EE49BC for ; Thu, 24 Aug 2023 21:20:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243679AbjHXVU2 (ORCPT ); Thu, 24 Aug 2023 17:20:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243660AbjHXVUH (ORCPT ); Thu, 24 Aug 2023 17:20:07 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4DD91BCA for ; Thu, 24 Aug 2023 14:20:04 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-5007c8308c3so393429e87.0 for ; Thu, 24 Aug 2023 14:20:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692912003; x=1693516803; 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=4jn+eGfxJEl37BPrury0gVQNnPShMnDn2hVA6B9OYqQ=; b=EwyQT/zT+GtA8swjPNx2kqY4eWvAG00NsEDW3zVlmhdOrSlAe7t163DAo68yJg07Yq bDyN9dOAEYDtBuPOMaNToIoIvvm+bmkp3d5YEuPCOqAjmEGpqzJCOrjwg87NMPmFsItS bqyHxiIMIxsua4wLx4ggHwwwbilD1nTXTLv1M9hH/H2xh491/DnROMI3MVwrY9AmuZH5 XNDjQymStzd+0pzO6Q+KvJiZ6SrerY4y6uHV3d+JznWCkL7gSdfQUW9hJehx6ZYKrCe8 dtgmitvz2uMfjVOvOcakvC+xcPlkjKm+DOnPRYYez6KgOmRW32G5Fznduyo5rJdrb/iV 9G8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692912003; x=1693516803; 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=4jn+eGfxJEl37BPrury0gVQNnPShMnDn2hVA6B9OYqQ=; b=Bvww/9gx/owNggmJ7NmSHW3rLl2lkETYp29llXxBjZUz2L43ZTDmULqE3DYXTcjbRx EH2v82GUbKSpqHVReUfgo6bENOUWLHDNNaIAwMdk5udA99BYXheB7o/DGre1RLryvXVI BgYX8aVxjnLUTWskhm+a7RukvmKCGm12ZxD5ICaCW57bSunlaEdAT+kWYzjcCnsh+gtg xh9Qr+zhWlsjHNzw3SJDaXQPiNNA6qCcz/+IS6CXYtr6nr9ZJpWSfcYYuN3HOVA4wArS 166J/NWXesNON1jtGrriMcbubr0XUnwSF//77T80Oo6+1feMDN5Lk7VXWlzRHe2Oy+av NZgA== X-Gm-Message-State: AOJu0Yywe8/kkhpDkCdq+UWCKKLiXtuJyY0/lEvFncX4v3oYQ4HkD7iC zn7MVknLhu77NC1hiqLhAiuAOw== X-Google-Smtp-Source: AGHT+IG/J78HFSV552Z19MZKDppGjFrbLXEPQ8wcGREFnlVH+RnIBFKk/qrz9L0BDpciMBaC1IvKwQ== X-Received: by 2002:a19:7b0e:0:b0:4fb:89e2:fc27 with SMTP id w14-20020a197b0e000000b004fb89e2fc27mr10162873lfc.54.1692912003150; Thu, 24 Aug 2023 14:20:03 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j29-20020a056512029d00b004fe4ab686b4sm17690lfp.167.2023.08.24.14.20.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 14:20:02 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Philipp Zabel , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 11/16] arm64: dts: qcom: sdm845: switch USB QMP PHY to new style of bindings Date: Fri, 25 Aug 2023 00:19:47 +0300 Message-Id: <20230824211952.1397699-12-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> References: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 39 ++++++++++++---------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index ef7b6994fdab..686d0cdfac63 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -3991,33 +3991,28 @@ usb_1_qmpphy: phy@88e8000 { usb_2_qmpphy: phy@88eb000 { compatible = "qcom,sdm845-qmp-usb3-uni-phy"; - reg = <0 0x088eb000 0 0x18c>; - status = "disabled"; - #address-cells = <2>; - #size-cells = <2>; - ranges; + reg = <0 0x088eb000 0 0x1000>; clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK>, <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>, <&gcc GCC_USB3_SEC_CLKREF_CLK>, - <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>; - clock-names = "aux", "cfg_ahb", "ref", "com_aux"; + <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>, + <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>; + clock-names = "aux", + "cfg_ahb", + "ref", + "com_aux", + "pipe"; + clock-output-names = "usb3_uni_phy_pipe_clk_src"; + #clock-cells = <0>; + #phy-cells = <0>; - resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>, - <&gcc GCC_USB3_PHY_SEC_BCR>; - reset-names = "phy", "common"; + resets = <&gcc GCC_USB3_PHY_SEC_BCR>, + <&gcc GCC_USB3PHY_PHY_SEC_BCR>; + reset-names = "phy", + "phy_phy"; - usb_2_ssphy: phy@88eb200 { - reg = <0 0x088eb200 0 0x128>, - <0 0x088eb400 0 0x1fc>, - <0 0x088eb800 0 0x218>, - <0 0x088eb600 0 0x70>; - #clock-cells = <0>; - #phy-cells = <0>; - clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>; - clock-names = "pipe0"; - clock-output-names = "usb3_uni_phy_pipe_clk_src"; - }; + status = "disabled"; }; usb_1: usb@a6f8800 { @@ -4117,7 +4112,7 @@ usb_2_dwc3: usb@a800000 { iommus = <&apps_smmu 0x760 0>; snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; - phys = <&usb_2_hsphy>, <&usb_2_ssphy>; + phys = <&usb_2_hsphy>, <&usb_2_qmpphy>; phy-names = "usb2-phy", "usb3-phy"; }; }; From patchwork Thu Aug 24 21:19:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 717313 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B9FAEE49BA for ; Thu, 24 Aug 2023 21:20:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243661AbjHXVU2 (ORCPT ); Thu, 24 Aug 2023 17:20:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243662AbjHXVUI (ORCPT ); Thu, 24 Aug 2023 17:20:08 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC347CF1 for ; Thu, 24 Aug 2023 14:20:05 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4fe8c16c1b4so361231e87.2 for ; Thu, 24 Aug 2023 14:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692912004; x=1693516804; 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=ycYgwyr/6UwKw05jbUywqAg4PjJTQ2L3FELP5qNE/wY=; b=n6yZuolq0io1VBg/XNpq3HJfNBZrkM8EX8vPxv3C7jd725afVb0zSuSrrqW/YEBIUP qXB4bJw11gZgc6uAP+dyr+GIbvrfr6MDn/VomwASyzwFFmz2zvZDmIiCkVCTWmM22Bi4 /K8GxDERyVdsU6aKjefVcjSC5HSt/RKBDCkgkUUVmY11QHo0jIk+wJekyOPhjSIin/zG u6O7d+wT9v9GaDUNGszixEdRk0hqbtkYr3zzAOmT9qhqHHFIteluw8pJxffJ2OJ6oZ+q BDXWHQ8/RBpL7j8/ztx+al4TZOvMlhhjmNGDl/xoq4GYvppaSvQ5fE1XUz2FiemcBc51 ityw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692912004; x=1693516804; 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=ycYgwyr/6UwKw05jbUywqAg4PjJTQ2L3FELP5qNE/wY=; b=g7Yn3P8/O4ZiMUPo/OUaWZgAsIO33ea9GEsrlyNWdM8woVCwg0g+bL7l9xIvUG/2Qn 8OUtAqigFK2ogbNpP86qgMPxQbqgm2lLN407Kgma410BxJLhxhHQTFn0+pgYPdT4bfng Vz5RawbhS4tvqiXhxgqbdDWqcrof0IrkhDfU9O0004Dn1QifqvNxQL0Mt49XKy4KPPjf upi6Rvw2BobNLDDHapEMWVNvuSzSSvnW0MZQa6NqiIUIOOhnCb87DSUC/eCDvglaEyLx ftSghup35fCe/Z8G5G2qIPSO1BdmgoimdB6k+fqIh0KYR97oMOBGPEomRtqLZFAsO0++ NWPQ== X-Gm-Message-State: AOJu0YyBZVrL8iexlYbUcESfFFaiJgWCJGyXZrafk6RnxUjFkKjwVstP bMMFbMnVkeUK0PewTBO76i1b19tFtrHvDFfd1ro= X-Google-Smtp-Source: AGHT+IEuoWh1oqjbNkq5s2su0pYLByrkLX7fOaAVRW11wy1GIWq2RFZPhXQEed5n/nvUKn9ELcrKiA== X-Received: by 2002:a19:6552:0:b0:500:7e70:ddf7 with SMTP id c18-20020a196552000000b005007e70ddf7mr9470617lfj.52.1692912004382; Thu, 24 Aug 2023 14:20:04 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j29-20020a056512029d00b004fe4ab686b4sm17690lfp.167.2023.08.24.14.20.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 14:20:03 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Philipp Zabel , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 12/16] arm64: dts: qcom: sm8150: switch USB QMP PHY to new style of bindings Date: Fri, 25 Aug 2023 00:19:48 +0300 Message-Id: <20230824211952.1397699-13-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> References: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8150.dtsi | 39 ++++++++++++---------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi index d9f0d7410661..380712aee977 100644 --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi @@ -3442,33 +3442,26 @@ usb_1_qmpphy: phy@88e8000 { usb_2_qmpphy: phy@88eb000 { compatible = "qcom,sm8150-qmp-usb3-uni-phy"; - reg = <0 0x088eb000 0 0x200>; - status = "disabled"; - #address-cells = <2>; - #size-cells = <2>; - ranges; + reg = <0 0x088eb000 0 0x1000>; clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK>, - <&rpmhcc RPMH_CXO_CLK>, <&gcc GCC_USB3_SEC_CLKREF_CLK>, - <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>; - clock-names = "aux", "ref_clk_src", "ref", "com_aux"; + <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>, + <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>; + clock-names = "aux", + "ref", + "com_aux", + "pipe"; + clock-output-names = "usb3_uni_phy_pipe_clk_src"; + #clock-cells = <0>; + #phy-cells = <0>; - resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>, - <&gcc GCC_USB3_PHY_SEC_BCR>; - reset-names = "phy", "common"; + resets = <&gcc GCC_USB3_PHY_SEC_BCR>, + <&gcc GCC_USB3PHY_PHY_SEC_BCR>; + reset-names = "phy", + "phy_phy"; - usb_2_ssphy: phy@88eb200 { - reg = <0 0x088eb200 0 0x200>, - <0 0x088eb400 0 0x200>, - <0 0x088eb800 0 0x800>, - <0 0x088eb600 0 0x200>; - #clock-cells = <0>; - #phy-cells = <0>; - clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>; - clock-names = "pipe0"; - clock-output-names = "usb3_uni_phy_pipe_clk_src"; - }; + status = "disabled"; }; sdhc_2: mmc@8804000 { @@ -3631,7 +3624,7 @@ usb_2_dwc3: usb@a800000 { iommus = <&apps_smmu 0x160 0>; snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; - phys = <&usb_2_hsphy>, <&usb_2_ssphy>; + phys = <&usb_2_hsphy>, <&usb_2_qmpphy>; phy-names = "usb2-phy", "usb3-phy"; }; }; From patchwork Thu Aug 24 21:19:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 716647 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FB88C727A0 for ; Thu, 24 Aug 2023 21:20:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243663AbjHXVU2 (ORCPT ); Thu, 24 Aug 2023 17:20:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243665AbjHXVUJ (ORCPT ); Thu, 24 Aug 2023 17:20:09 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C33731BCC for ; Thu, 24 Aug 2023 14:20:06 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-50087d47d4dso371184e87.1 for ; Thu, 24 Aug 2023 14:20:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692912005; x=1693516805; 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=ZpBNHpYglDb91ucrUq7ha/N1sRsDyurprg1I9sqkvpM=; b=ijpnJWvRvCpqv7sKtKdSlURCZwFQyL0/odtMMXsdbet9Y8ulyBLkjlMBYiiQNFgRVI a5S0Mv2CGeZTwT+a39vaZHmYIbD0OuxtMhWxsPh3CXtOWqhvSVlHpqI+LYbRTf4IArRQ DD1uVQ/C0ctiIrSg2lzVEBEsGIvmWVJyPcFN2GiBp+n0/cEjylCAc8KEkzubbHc587LB vU0gC7AhPkl31CGcq9XUUutd1HuTmAA9qzjpxrbrNN7qUMxIuiCL8gm7w2622ckiqw1g uUuWbtaEbg1wAjCvGw6WzvERJihoC2s8QdtUKuz7s4gjpklIQPIEsdGGKCBGh7oSK8m8 msuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692912005; x=1693516805; 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=ZpBNHpYglDb91ucrUq7ha/N1sRsDyurprg1I9sqkvpM=; b=PyZZtIIPiQDCf5SaX3CD2/eQwAUGKW5g+9+6naaCE4dgZ4Ry5glfcOetlVjAT3I33/ gbBOU4BJ3MbtRQ53FCfg+ELy6PAi9eVQfX2vL555Zy5L02t4/71WVL/GY33Fke7Zd3zL NJAM9roffoLTmJQkZ/MioHfQSFaXg4S4R7kvnxVBITQx7ADXeXhwWh1+DDvt/c+L2+3b zL9YuyydnYxEKIq2/hjF9XIIjXLbnF5VY9qDq+upRhkIYrbG51CfRhdFNP4Pw1C00fH7 feM5hx2sdoNK3kFd85wPkWkwWuvk/gPnaVxqQNKV/T/RHwRhBU1gTVTCLX2W3eUMPiH6 3uJQ== X-Gm-Message-State: AOJu0YxixXWyCembp5ytjTZ023hS4FLGf9LPJi+ZSramnwuOy+fqwzY/ 11T7d54BDRvHgQqRXPn2SZ3Exw== X-Google-Smtp-Source: AGHT+IFJLL+HnUoq2AGB/0XiOvIYH+a5RAXI9OBzyswtrCLQypr7wS+cDnxRIWbz868/ustNAs2FRw== X-Received: by 2002:a05:6512:3241:b0:4fe:94a1:da84 with SMTP id c1-20020a056512324100b004fe94a1da84mr10597379lfr.5.1692912005162; Thu, 24 Aug 2023 14:20:05 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j29-20020a056512029d00b004fe4ab686b4sm17690lfp.167.2023.08.24.14.20.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 14:20:04 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Philipp Zabel , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 13/16] arm64: dts: qcom: sm8250: switch USB QMP PHY to new style of bindings Date: Fri, 25 Aug 2023 00:19:49 +0300 Message-Id: <20230824211952.1397699-14-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> References: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 38 ++++++++++++---------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index abe39b0470da..974bdc1a9f34 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -3575,32 +3575,26 @@ usb_1_qmpphy: phy@88e8000 { usb_2_qmpphy: phy@88eb000 { compatible = "qcom,sm8250-qmp-usb3-uni-phy"; - reg = <0 0x088eb000 0 0x200>; - status = "disabled"; - #address-cells = <2>; - #size-cells = <2>; - ranges; + reg = <0 0x088eb000 0 0x1000>; clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK>, - <&rpmhcc RPMH_CXO_CLK>, <&gcc GCC_USB3_SEC_CLKREF_EN>, - <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>; - clock-names = "aux", "ref_clk_src", "ref", "com_aux"; + <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>, + <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>; + clock-names = "aux", + "ref", + "com_aux", + "pipe"; + clock-output-names = "usb3_uni_phy_pipe_clk_src"; + #clock-cells = <0>; + #phy-cells = <0>; - resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>, - <&gcc GCC_USB3_PHY_SEC_BCR>; - reset-names = "phy", "common"; + resets = <&gcc GCC_USB3_PHY_SEC_BCR>, + <&gcc GCC_USB3PHY_PHY_SEC_BCR>; + reset-names = "phy", + "phy_phy"; - usb_2_ssphy: phy@88eb200 { - reg = <0 0x088eb200 0 0x200>, - <0 0x088eb400 0 0x200>, - <0 0x088eb800 0 0x800>; - #clock-cells = <0>; - #phy-cells = <0>; - clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>; - clock-names = "pipe0"; - clock-output-names = "usb3_uni_phy_pipe_clk_src"; - }; + status = "disabled"; }; sdhc_2: mmc@8804000 { @@ -3905,7 +3899,7 @@ usb_2_dwc3: usb@a800000 { iommus = <&apps_smmu 0x20 0>; snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; - phys = <&usb_2_hsphy>, <&usb_2_ssphy>; + phys = <&usb_2_hsphy>, <&usb_2_qmpphy>; phy-names = "usb2-phy", "usb3-phy"; }; }; From patchwork Thu Aug 24 21:19:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 717312 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FC54FC6165 for ; Thu, 24 Aug 2023 21:20:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243664AbjHXVU3 (ORCPT ); Thu, 24 Aug 2023 17:20:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243667AbjHXVUJ (ORCPT ); Thu, 24 Aug 2023 17:20:09 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DE27CF1 for ; Thu, 24 Aug 2023 14:20:07 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-5007f3d3235so360488e87.2 for ; Thu, 24 Aug 2023 14:20:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692912006; x=1693516806; 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=xhz5s4p9df6iSnMVEljVBPUMS53rGAftjG7CgRxMulA=; b=jWjowwySdC2IJGQIWxGm6vENMRjYJTkw1xEpZoUYyhy0Jl1mHF0fKhaPXD10vSb1lr QoNUPBLD/EkJUiJzApKilVv5b0lUMGvdesoI5sYJPcmxSUYJNABW89DceO9KbPhg2sBj 2Q7INTAqhRaETePwC88IQcbyzCvm6PJJ0FzqQRWcsuTZkT2TsM5o5o8L3FJJrDT3ZV9u SqOiAuszyl5HSMllqfuD5K/NxLPBaSkko8UefKZ6012CS6NWL3Mnf4QOHm3nuHrkRrHm kUcc9oqF3xdVas2pZ1z65IwCOtOpefMZwEx5AZH3HZZWsDsx5HBdSTNn1I6X8fsSdg7n UaqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692912006; x=1693516806; 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=xhz5s4p9df6iSnMVEljVBPUMS53rGAftjG7CgRxMulA=; b=YT8oaOLuMsKKT1xsaynd6J7zubuJmQXkRLJ+WafDTOGILcfcggQWPXR+BFDp5wYV8x Pheq9Ibp75KXQCHEO0hluLPnli39P/wOI6ducNBq8uSzel941BnW9BThz+EabEN6GCNC M25le6vYe7LWdVTtN6SD3HBT6zk4Gg94cVwuQlF2tZP4SGbfBSAMC4Izg6DWaxz6SiYu bL7qgLySWDyGm/n5F7zF4WMFCiV+EDs36iAbL8fgrtTsTAP1FMkJU1cG4AtrVpBcAxUd 3y/qtGt/OtrS/GtjzHDd2uhyNEZ+Cgq9y7t5FpAut0kRK87B6q9AReO/hJt+uJ7NIU45 V4dQ== X-Gm-Message-State: AOJu0YxRMAe+l8d8rNZ7L0lKroECgZgSp0v1x9ju2gGnQAjxvp1dkAjW 2j3TwmRJ5ZU483ZjULsW5WcUyg== X-Google-Smtp-Source: AGHT+IEg4KeUAvq05EQSKwbdBe9ho+XeYMG+Wt0V5yPIqSqmNEAGnxqwiDkZ/p9IOvAK8cqflhzm3w== X-Received: by 2002:ac2:4ec3:0:b0:500:8fb1:7a47 with SMTP id p3-20020ac24ec3000000b005008fb17a47mr5341580lfr.30.1692912006023; Thu, 24 Aug 2023 14:20:06 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j29-20020a056512029d00b004fe4ab686b4sm17690lfp.167.2023.08.24.14.20.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 14:20:05 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Philipp Zabel , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 14/16] arm64: dts: qcom: sm8350: switch USB QMP PHY to new style of bindings Date: Fri, 25 Aug 2023 00:19:50 +0300 Message-Id: <20230824211952.1397699-15-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> References: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8350.dtsi | 39 ++++++++++++---------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi index a26dff42329c..8faf9c2e7d09 100644 --- a/arch/arm64/boot/dts/qcom/sm8350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi @@ -2229,34 +2229,27 @@ usb_1_qmpphy_dp_in: endpoint { }; }; - usb_2_qmpphy: phy-wrapper@88eb000 { + usb_2_qmpphy: phy@88eb000 { compatible = "qcom,sm8350-qmp-usb3-uni-phy"; - reg = <0 0x088eb000 0 0x200>; + reg = <0 0x088eb000 0 0x2000>; status = "disabled"; - #address-cells = <2>; - #size-cells = <2>; - ranges; clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK>, - <&rpmhcc RPMH_CXO_CLK>, <&gcc GCC_USB3_SEC_CLKREF_EN>, - <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>; - clock-names = "aux", "ref_clk_src", "ref", "com_aux"; - - resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>, - <&gcc GCC_USB3_PHY_SEC_BCR>; - reset-names = "phy", "common"; + <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>, + <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>; + clock-names = "aux", + "ref", + "com_aux", + "pipe"; + clock-output-names = "usb3_uni_phy_pipe_clk_src"; + #clock-cells = <0>; + #phy-cells = <0>; - usb_2_ssphy: phy@88ebe00 { - reg = <0 0x088ebe00 0 0x200>, - <0 0x088ec000 0 0x200>, - <0 0x088eb200 0 0x1100>; - #phy-cells = <0>; - #clock-cells = <0>; - clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>; - clock-names = "pipe0"; - clock-output-names = "usb3_uni_phy_pipe_clk_src"; - }; + resets = <&gcc GCC_USB3_PHY_SEC_BCR>, + <&gcc GCC_USB3PHY_PHY_SEC_BCR>; + reset-names = "phy", + "phy_phy"; }; dc_noc: interconnect@90c0000 { @@ -2409,7 +2402,7 @@ usb_2_dwc3: usb@a800000 { iommus = <&apps_smmu 0x20 0x0>; snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; - phys = <&usb_2_hsphy>, <&usb_2_ssphy>; + phys = <&usb_2_hsphy>, <&usb_2_qmpphy>; phy-names = "usb2-phy", "usb3-phy"; }; }; From patchwork Thu Aug 24 21:19:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 717311 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 851BCC727A1 for ; Thu, 24 Aug 2023 21:20:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243670AbjHXVU3 (ORCPT ); Thu, 24 Aug 2023 17:20:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243669AbjHXVUK (ORCPT ); Thu, 24 Aug 2023 17:20:10 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54E741BCA for ; Thu, 24 Aug 2023 14:20:08 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-4ff09632194so357792e87.2 for ; Thu, 24 Aug 2023 14:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692912006; x=1693516806; 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=nmrj4hWVWgCIAJXxquRVjvFHWWo6+y5kGPhzifypRbs=; b=SOMpE6NpYB0KiQXynGmpaaNboa1TbzYXsZ67YwO4Jr+BUu3lIGJOQ3GZ35etuTqxMN lGEdARCyXyXSmlo7RLZ6IVg0rfaNdrKiX91zA96sW0Dyj9wHgAJLWJ4Y8kdA+PzZJ+wG CbwLOZMSoidtv4HSGel2I6rDS+361afeypafYST700ZtdWwnx8p33YXXGK+URX197XJY yhfE2KU47Z3+4fyINjaKO3otNVewQnZF+DQ8EkH649pZ8WvPs5N9BjzlTcpV55V4zFhg 6msz9maP4vBFD4IDByJ1DgdrT4cS3otEwjOLlIzL2b3+bA38qSlF6MW6uFzi9Nm7gBu8 hDjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692912006; x=1693516806; 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=nmrj4hWVWgCIAJXxquRVjvFHWWo6+y5kGPhzifypRbs=; b=gmR1q3SO4oBPaLtFLAYKUDEcxPMge7NUH+mbglyQMNjJCPTOmYBo6Ds/W6Bm/fPQ/e gleZns/NrMDJuXAtu/KpDA/KDpe/Mt8ByT7xaomsHdyDBvUS5w1SDunWXp9ElITI7A19 H3ll2sfyBfOBOevDNbnlkCegzBW2HRLjZqq0B2T6YbGnMHm2I1jxdXOVPPsEIVd/VKkp +5zff2cPGLrD5wXvASVHFdY5eaDqoPf42t7nihBQ0PobDmEzKSf+Fa/DEk4mb3sx/qYQ IdlmAjKhAKXo5b2Rc4BzFibOyvJE71dSy7IK1uJprwZf8KdYi8gHbkvvK5W2GNkpfEKU BYig== X-Gm-Message-State: AOJu0YzdcMDUS1AyJaIdRcFleal/QN2z7i683qEj4bynDisoPpFXi7k6 h8Dv8ciRtFj2cXX3ZrlApmBjDA== X-Google-Smtp-Source: AGHT+IFw8/TyKKff8GA7Oa5lXZRTfWA5WrJqfutL+JLCJGLj4ey5TGqCy0b8VFfWWYyJZFwsdTd4jg== X-Received: by 2002:a19:6705:0:b0:4ff:8729:555 with SMTP id b5-20020a196705000000b004ff87290555mr10630696lfc.11.1692912006706; Thu, 24 Aug 2023 14:20:06 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j29-20020a056512029d00b004fe4ab686b4sm17690lfp.167.2023.08.24.14.20.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 14:20:06 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Philipp Zabel , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 15/16] ARM: dts: qcom-sdx55: switch USB QMP PHY to new style of bindings Date: Fri, 25 Aug 2023 00:19:51 +0300 Message-Id: <20230824211952.1397699-16-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> References: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov --- arch/arm/boot/dts/qcom/qcom-sdx55.dtsi | 41 +++++++++++--------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi b/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi index 4b0039ccd0da..89d723e4ad61 100644 --- a/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi +++ b/arch/arm/boot/dts/qcom/qcom-sdx55.dtsi @@ -228,31 +228,26 @@ usb_hsphy: phy@ff4000 { usb_qmpphy: phy@ff6000 { compatible = "qcom,sdx55-qmp-usb3-uni-phy"; - reg = <0x00ff6000 0x1c0>; - status = "disabled"; - #address-cells = <1>; - #size-cells = <1>; - ranges; + reg = <0x00ff6000 0x1000>; clocks = <&gcc GCC_USB3_PHY_AUX_CLK>, + <&gcc GCC_USB3_PRIM_CLKREF_CLK>, <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>, - <&gcc GCC_USB3_PRIM_CLKREF_CLK>; - clock-names = "aux", "cfg_ahb", "ref"; - - resets = <&gcc GCC_USB3PHY_PHY_BCR>, - <&gcc GCC_USB3_PHY_BCR>; - reset-names = "phy", "common"; - - usb_ssphy: phy@ff6200 { - reg = <0x00ff6200 0x170>, - <0x00ff6400 0x200>, - <0x00ff6800 0x800>; - #phy-cells = <0>; - #clock-cells = <0>; - clocks = <&gcc GCC_USB3_PHY_PIPE_CLK>; - clock-names = "pipe0"; - clock-output-names = "usb3_uni_phy_pipe_clk_src"; - }; + <&gcc GCC_USB3_PHY_PIPE_CLK>; + clock-names = "aux", + "ref", + "cfg_ahb", + "pipe"; + clock-output-names = "usb3_uni_phy_pipe_clk_src"; + #clock-cells = <0>; + #phy-cells = <0>; + + resets = <&gcc GCC_USB3_PHY_BCR>, + <&gcc GCC_USB3PHY_PHY_BCR>; + reset-names = "phy", + "phy_phy"; + + status = "disabled"; }; mc_virt: interconnect@1100000 { @@ -603,7 +598,7 @@ usb_dwc3: usb@a600000 { iommus = <&apps_smmu 0x1a0 0x0>; snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; - phys = <&usb_hsphy>, <&usb_ssphy>; + phys = <&usb_hsphy>, <&usb_qmpphy>; phy-names = "usb2-phy", "usb3-phy"; }; }; From patchwork Thu Aug 24 21:19:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 716646 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C771C727A3 for ; Thu, 24 Aug 2023 21:20:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243680AbjHXVU3 (ORCPT ); Thu, 24 Aug 2023 17:20:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243670AbjHXVUL (ORCPT ); Thu, 24 Aug 2023 17:20:11 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D590CF1 for ; Thu, 24 Aug 2023 14:20:09 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2bcbfb3705dso3722251fa.1 for ; Thu, 24 Aug 2023 14:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692912007; x=1693516807; 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=T2cQbFAa2dZ8daCARAy1nE0Yfl5a2H4VUsq7LUs1D2Q=; b=V2snjtbLmf4S+8yNVPkHG0ezZhmiEjEIE6sP3FJTjUyMedWm5lXKPvUiZlR7pFe0VQ /AuDAAbOfDFr5nGai9Y2VVu1XavXBKp2cAshCmpw2fLIsqragsKGc32zoazGobiniGiD UkC8mAFXG2cruDSoyX5wEKc8ryhEQn2Ep8RjaZjgJ0V5Tq+h9uKqBH/NzPdONuxHeEzy /ZGHzSCJ/6NJa/lJJCP6YTxMPM+jdeye+uXYJRxNnFUgkNELx1FDm4ne3MzkP/Y7U/Ip UkJjj80+b18MxQdZk0kBbw8jEdc3F/+l6RXna4RlPtvFGVTb8S7R+4UdhPboGZIfGXCK ucpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692912007; x=1693516807; 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=T2cQbFAa2dZ8daCARAy1nE0Yfl5a2H4VUsq7LUs1D2Q=; b=l4tJn3FYWc+GaKBsTc6ihB7WQYa2ytFYkfTMYyWP4AqXYrc0z/VtxnzlDCLrgxdNK3 C8SlfGqWwEW/IPjUOHKT1UhAcZGzKZxQkItIvG8TQ9b3EmyEeiWYfxYOstQvAr/nbwEI 8UC5EjQk9lYCxVJQ9SvBf/ZT4VJZHPtInCnTaQ5su3YaLgk/q5mHGjfWDyKCmOFZnCir 4AUvSvtB1G/TxP8oRoDNX/A76UvyL7fv1u7rJHTPETMYu5AhPtQ5vKqW3sM1/l2R3Hb/ /Dlr1+4UfDeQepx1jK4bsUZXTnM6txKWqqW2NWQqW5mpAJpC+0nosuOhd4vmyhz1sUCn SIuA== X-Gm-Message-State: AOJu0YyswWgxpo0aNrQil6qAhayJGnpqtz5t9bP/wIwDhKjk2nX6BOc+ I8otcf65knwI06+6O+yf15hlLNcGAbMftZDn3DE= X-Google-Smtp-Source: AGHT+IGOtvbHAfKUQzmXtpMF+lbgcH2+b2VWk4P465JPvUYZs+fN5kZkjSwf23XjGk/kHkN9ZQqS9Q== X-Received: by 2002:a05:6512:3da7:b0:4fb:7cea:882a with SMTP id k39-20020a0565123da700b004fb7cea882amr14760939lfv.3.1692912007470; Thu, 24 Aug 2023 14:20:07 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j29-20020a056512029d00b004fe4ab686b4sm17690lfp.167.2023.08.24.14.20.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 14:20:07 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Philipp Zabel , Johan Hovold , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v3 16/16] ARM: dts: qcom-sdx65: switch USB QMP PHY to new style of bindings Date: Fri, 25 Aug 2023 00:19:52 +0300 Message-Id: <20230824211952.1397699-17-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> References: <20230824211952.1397699-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov --- arch/arm/boot/dts/qcom/qcom-sdx65.dtsi | 35 +++++++++++--------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/arch/arm/boot/dts/qcom/qcom-sdx65.dtsi b/arch/arm/boot/dts/qcom/qcom-sdx65.dtsi index 1a3583029a64..27e2cc84c363 100644 --- a/arch/arm/boot/dts/qcom/qcom-sdx65.dtsi +++ b/arch/arm/boot/dts/qcom/qcom-sdx65.dtsi @@ -233,32 +233,27 @@ usb_hsphy: phy@ff4000 { usb_qmpphy: phy@ff6000 { compatible = "qcom,sdx65-qmp-usb3-uni-phy"; - reg = <0x00ff6000 0x1c8>; - #address-cells = <1>; - #size-cells = <1>; - ranges; + reg = <0x00ff6000 0x2000>; clocks = <&gcc GCC_USB3_PHY_AUX_CLK>, + <&gcc GCC_USB3_PRIM_CLKREF_EN>, <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>, - <&gcc GCC_USB3_PRIM_CLKREF_EN>; - clock-names = "aux", "cfg_ahb", "ref"; + <&gcc GCC_USB3_PHY_PIPE_CLK>; + clock-names = "aux", + "ref", + "cfg_ahb", + "pipe"; + clock-output-names = "usb3_uni_phy_pipe_clk_src"; + #clock-cells = <0>; + #phy-cells = <0>; - resets = <&gcc GCC_USB3PHY_PHY_BCR>, - <&gcc GCC_USB3_PHY_BCR>; - reset-names = "phy", "common"; + resets = <&gcc GCC_USB3_PHY_BCR>, + <&gcc GCC_USB3PHY_PHY_BCR>; + reset-names = "phy", + "phy_phy"; status = "disabled"; - usb_ssphy: phy@ff6200 { - reg = <0x00ff6e00 0x160>, - <0x00ff7000 0x1ec>, - <0x00ff6200 0x1e00>; - #phy-cells = <0>; - #clock-cells = <0>; - clocks = <&gcc GCC_USB3_PHY_PIPE_CLK>; - clock-names = "pipe0"; - clock-output-names = "usb3_uni_phy_pipe_clk_src"; - }; }; system_noc: interconnect@1620000 { @@ -520,7 +515,7 @@ usb_dwc3: usb@a600000 { iommus = <&apps_smmu 0x1a0 0x0>; snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; - phys = <&usb_hsphy>, <&usb_ssphy>; + phys = <&usb_hsphy>, <&usb_qmpphy>; phy-names = "usb2-phy", "usb3-phy"; }; };