From patchwork Sun Mar 26 00:57:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13187966 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AD781C761AF for ; Sun, 26 Mar 2023 02:01:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rucMerKasmfwAwWjqpMOOWciJf/3Za3kBDuEYHsQD2Q=; b=BTFhGkdXrrPNj/ xN0U3NIcVQjVh9WkcDyxhrNeZree99yB5rs1IbMkBl3NEXR8HJFo93bzHxhg7t0y+tDkH47OTXX/9 Fq1AkUT4e+YsL4brXzW7DVsf8uC0bBh8oQ92a+0cRmC450brLsTo4L2mKVAT8g0K4GS7pFEB2qR6o GEt0anQ/c5z5Dl5el9pC3DBF68aKIjmcS0Ph8OcvDHmRmNT7pgKaNUYOQhAlChaDd4RQTuhB1ozOb F7B8xxDPvhEdxZECnQpOL9rFJOCIN11XhoJzMlXr4NUmbnDZnBg5doFgWSsP0U5MkkWHHwP2SLPVz w4I+AoV3yHeXMntrtt2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgFhj-007pY9-0Q; Sun, 26 Mar 2023 02:01:55 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgEhX-007jpU-0R for linux-phy@lists.infradead.org; Sun, 26 Mar 2023 00:57:41 +0000 Received: by mail-lf1-x12b.google.com with SMTP id y20so6960378lfj.2 for ; Sat, 25 Mar 2023 17:57:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679792255; 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=GBv1pWYR15qOvcAYz4zjAq269yr5hF0uWbugrVtKVm4=; b=W8dx0WC1Q/36S20wdXE+4B6TTxsmkeoPegGYirlmc6ePSehHhGHnnKbzNOMGbXP9i2 +cqCRSkoYkuSMSyzwB60t8cb0DaA1nOK+VFk0oAVGepOn7CBDkLSCJsqwlUG3K0gAl// P9XlHjygOPf63/B29U63IuvRBW1tuZeYJwpjMjGbynLK3fZ2qCoVn13qqF1i83TKcLhN D780oc9QaRM68QVe5gzrZEm0dZM7avcuXVE90Y6W9WmaCmJkvKPd8Y/B24iVZ/dzPol5 m3kM26idxlpR4SIIiyN+WySHzUetDwHrJXi0n9FvdZDXFBaSwpfttwLqaUv9W6Co0R/m qPEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679792255; 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=GBv1pWYR15qOvcAYz4zjAq269yr5hF0uWbugrVtKVm4=; b=43FYQjBGgxT/ke/fmMGPwWnw5WHfRMMedizpxpFl4JG65nxp+mNNUpwGSKKMs7QQGe BZVnxX3fGQOeyi8PKG0YUP8kPoUMt5i2CbuhTCxBkf8yHFBJUMQKAPOcfkWzxO3iTM1V qFXvQVQZu78NMA4vFe04LCAQPqHL7pVWEriEweWHIA9c/fp0MdNPfru3hyrgZPfn0pno 1shlXWk/t71x5tms3LOuW1yDlZQ4SkOx4yJ5OeTN/yF/Kln33HYUM4DvjjI6tHEjlgcP bQxWXqwPnF2A0U09txE7WzD5K8qW8Ryn4fKbhzTA7bKtf+UO59D0qj2TDxONOnH6vBqZ MbJQ== X-Gm-Message-State: AAQBX9c2tJD7angtw7BkKBuD6dEUAta67dBI6lclZ7OkmoNYTFXt6v3a L9PyvpTids3g6sA3hnqRW2NjuA== X-Google-Smtp-Source: AKy350YIEUYfsbuGCudfcH+H2jClJUfhXY9E08yBAaiu7I2GiCFALFkWuzbz4dSuD5xuSxAISz9DHg== X-Received: by 2002:ac2:5239:0:b0:4dd:afad:8afe with SMTP id i25-20020ac25239000000b004ddafad8afemr1973845lfl.27.1679792254798; Sat, 25 Mar 2023 17:57:34 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id n13-20020ac242cd000000b004e7fa99f3f4sm3996858lfl.265.2023.03.25.17.57.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 17:57:34 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold , devicetree@vger.kernel.org Subject: [PATCH v2 1/9] dt-bindings: phy: migrate combo QMP PHY bindings to qcom,sc8280xp-qmp-usb43dp-phy.yaml Date: Sun, 26 Mar 2023 03:57:25 +0300 Message-Id: <20230326005733.2166354-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> References: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230325_175739_178301_107ACFA9 X-CRM114-Status: GOOD ( 12.00 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Migrate legacy bindings (described in qcom,sc7180-qmp-usb3-dp-phy.yaml) to qcom,sc8280xp-qmp-usb43dp-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,sc7180-qmp-usb3-dp-phy.yaml | 278 ------------------ .../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 45 ++- 2 files changed, 43 insertions(+), 280 deletions(-) delete mode 100644 Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml diff --git a/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml deleted file mode 100644 index a2ddf718ba76..000000000000 --- a/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml +++ /dev/null @@ -1,278 +0,0 @@ -# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) - -%YAML 1.2 ---- -$id: http://devicetree.org/schemas/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml# -$schema: http://devicetree.org/meta-schemas/core.yaml# - -title: Qualcomm QMP USB3 DP PHY controller (SC7180) - -description: - The 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-usb43dp-phy.yaml. - -maintainers: - - Wesley Cheng - -properties: - compatible: - oneOf: - - enum: - - qcom,sc7180-qmp-usb3-dp-phy - - qcom,sc8180x-qmp-usb3-dp-phy - - qcom,sdm845-qmp-usb3-dp-phy - - qcom,sm8150-qmp-usb3-dp-phy - - qcom,sm8250-qmp-usb3-dp-phy - - items: - - enum: - - qcom,sc7280-qmp-usb3-dp-phy - - const: qcom,sm8250-qmp-usb3-dp-phy - - reg: - items: - - description: Address and length of PHY's USB serdes block. - - description: Address and length of the DP_COM control block. - - description: Address and length of PHY's DP serdes block. - - reg-names: - items: - - const: usb - - const: dp_com - - const: dp - - "#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: - items: - - description: reset of phy block. - - description: phy common block reset. - - reset-names: - items: - - const: phy - - const: common - - vdda-phy-supply: - description: - Phandle to a regulator supply to PHY core block. - - vdda-pll-supply: - description: - Phandle to 1.8V regulator supply to PHY refclk pll block. - - vddp-ref-clk-supply: - description: - Phandle to a regulator supply to any specific refclk pll block. - -# Required nodes: -patternProperties: - "^usb3-phy@[0-9a-f]+$": - type: object - additionalProperties: false - description: - The USB3 PHY. - - properties: - reg: - items: - - description: Address and length of TX. - - description: Address and length of RX. - - description: Address and length of PCS. - - description: Address and length of TX2. - - description: Address and length of RX2. - - description: Address and length of pcs_misc. - - clocks: - items: - - description: pipe clock - - clock-names: - deprecated: true - items: - - const: pipe0 - - clock-output-names: - items: - - const: usb3_phy_pipe_clk_src - - '#clock-cells': - const: 0 - - '#phy-cells': - const: 0 - - required: - - reg - - clocks - - '#clock-cells' - - '#phy-cells' - - "^dp-phy@[0-9a-f]+$": - type: object - additionalProperties: false - description: - The DP PHY. - - properties: - reg: - items: - - description: Address and length of TX. - - description: Address and length of RX. - - description: Address and length of PCS. - - description: Address and length of TX2. - - description: Address and length of RX2. - - '#clock-cells': - const: 1 - - '#phy-cells': - const: 0 - - required: - - reg - - '#clock-cells' - - '#phy-cells' - -required: - - compatible - - reg - - "#address-cells" - - "#size-cells" - - ranges - - clocks - - clock-names - - resets - - reset-names - - vdda-phy-supply - - vdda-pll-supply - -allOf: - - if: - properties: - compatible: - enum: - - qcom,sc7180-qmp-usb3-dp-phy - - qcom,sdm845-qmp-usb3-dp-phy - then: - properties: - clocks: - items: - - description: Phy aux clock - - description: Phy config clock - - description: 19.2 MHz ref clk - - description: Phy common block aux clock - clock-names: - items: - - const: aux - - const: cfg_ahb - - const: ref - - const: com_aux - - - if: - properties: - compatible: - enum: - - qcom,sc8180x-qmp-usb3-dp-phy - - qcom,sm8150-qmp-usb3-dp-phy - then: - properties: - clocks: - items: - - description: Phy aux clock - - description: 19.2 MHz ref clk - - description: Phy common block aux clock - clock-names: - items: - - const: aux - - const: ref - - const: com_aux - - - if: - properties: - compatible: - enum: - - qcom,sm8250-qmp-usb3-dp-phy - then: - properties: - clocks: - items: - - description: Phy aux clock - - description: Board XO source - - description: Phy common block aux clock - clock-names: - items: - - const: aux - - const: ref_clk_src - - const: com_aux - -additionalProperties: false - -examples: - - | - #include - usb_1_qmpphy: phy-wrapper@88e9000 { - compatible = "qcom,sdm845-qmp-usb3-dp-phy"; - reg = <0x088e9000 0x18c>, - <0x088e8000 0x10>, - <0x088ea000 0x40>; - reg-names = "usb", "dp_com", "dp"; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0x0 0x088e9000 0x2000>; - - clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>, - <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>, - <&gcc GCC_USB3_PRIM_CLKREF_CLK>, - <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>; - clock-names = "aux", "cfg_ahb", "ref", "com_aux"; - - resets = <&gcc GCC_USB3_PHY_PRIM_BCR>, - <&gcc GCC_USB3_DP_PHY_PRIM_BCR>; - reset-names = "phy", "common"; - - vdda-phy-supply = <&vdda_usb2_ss_1p2>; - vdda-pll-supply = <&vdda_usb2_ss_core>; - - usb3-phy@200 { - reg = <0x200 0x128>, - <0x400 0x200>, - <0xc00 0x218>, - <0x600 0x128>, - <0x800 0x200>, - <0xa00 0x100>; - #clock-cells = <0>; - #phy-cells = <0>; - clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; - clock-output-names = "usb3_phy_pipe_clk_src"; - }; - - dp-phy@88ea200 { - reg = <0xa200 0x200>, - <0xa400 0x200>, - <0xaa00 0x200>, - <0xa600 0x200>, - <0xa800 0x200>; - #clock-cells = <1>; - #phy-cells = <0>; - }; - }; diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml index 3cd5fc3e8fab..93444e96b512 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml @@ -16,8 +16,14 @@ description: properties: compatible: enum: + - qcom,sc7180-qmp-usb3-dp-phy + - qcom,sc7280-qmp-usb3-dp-phy + - qcom,sc8180x-qmp-usb3-dp-phy - qcom,sc8280xp-qmp-usb43dp-phy + - qcom,sdm845-qmp-usb3-dp-phy - qcom,sm6350-qmp-usb3-dp-phy + - qcom,sm8150-qmp-usb3-dp-phy + - qcom,sm8250-qmp-usb3-dp-phy - qcom,sm8350-qmp-usb3-dp-phy - qcom,sm8450-qmp-usb3-dp-phy - qcom,sm8550-qmp-usb3-dp-phy @@ -26,14 +32,17 @@ properties: maxItems: 1 clocks: - maxItems: 4 + minItems: 4 + maxItems: 5 clock-names: + minItems: 4 items: - const: aux - const: ref - const: com_aux - const: usb3_pipe + - const: cfg_ahb power-domains: maxItems: 1 @@ -65,7 +74,6 @@ required: - reg - clocks - clock-names - - power-domains - resets - reset-names - vdda-phy-supply @@ -73,6 +81,39 @@ required: - "#clock-cells" - "#phy-cells" +allOf: + - if: + properties: + compatible: + enum: + - qcom,sc7180-qmp-usb3-dp-phy + - qcom,sdm845-qmp-usb3-dp-phy + then: + properties: + clocks: + maxItems: 5 + clock-names: + maxItems: 5 + else: + properties: + clocks: + maxItems: 4 + clock-names: + maxItems: 4 + - if: + properties: + compatible: + enum: + - qcom,sc8280xp-qmp-usb43dp-phy + - qcom,sm6350-qmp-usb3-dp-phy + - qcom,sm8550-qmp-usb3-dp-phy + then: + required: + - power-domains + else: + properties: + power-domains: false + additionalProperties: false examples: From patchwork Sun Mar 26 00:57:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13187961 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1E116C6FD1C for ; Sun, 26 Mar 2023 02:01:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=x+i0B66M90659sMbvledsLPm/Nv+vgYTJ26mqTBXhgo=; b=LqroE1n+/tbty1 IWCulzWcJOOO0TX9TfJ4kjw81FbsMeSeR15VoXGP4rNvYn1i1R1m0OdmZNF0vHRzmzdG6C4aPiRT9 UcOZfngffVOBRPSatjSgNc0kKcUVgnQnv//TzDuBvK1+j2PD6wYZSllw3V7IiPVvnH318K+IMprcv OvfjA2hEetDwLomy+euBtzkjvhA+yL1levNgxybKi70bzUvyLQgSZg4xJ14Dnr68geL3W5bo8w2Y0 nSTYxPUI/wZIwqeEU+97xIvrKwY68pghuSpOLdsUOlPqaY7hFXhpU+X07nF0BU6ZdwLlPhFmshOXf HXCVGI4ivXM4+8PvKsVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgFhi-007pXr-20; Sun, 26 Mar 2023 02:01:54 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgEhX-007jpf-0S for linux-phy@lists.infradead.org; Sun, 26 Mar 2023 00:57:41 +0000 Received: by mail-lf1-x12f.google.com with SMTP id i13so6922422lfe.9 for ; Sat, 25 Mar 2023 17:57:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679792255; 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=5B5p67y65ESS4CL8epSYsp4FkekQxX3QZ+z+dOdDv/w=; b=UFGWF/a8V10uMhsDxlEHLKDWbGAbpEmm4+wgDdUu66M58ZE0RI4dUGBMB9splX0zi0 tsMx6/1dXuFijp64UTcrEBMeF0pYpqOQmZe44OfFtbmA07+ceYbmnIHp2CeXDYVxR7II kMN31CDnGleNSq4uk/8zNJkc0D4fJ9fnqAGNT49IWMR6vkCg9vLb8NrbV4GjcZvJvJCz C4BS8EKSHDtLk3+XYLB+DuJCnvmVcbfFML7R+vL8fVRD/N1BsjYGmENNgVrmuMmE/521 K0baO1tD0RILT2Z2kp083UT7SrA9yGLCS2YWCPFcnEuyoWidnft4UDGhR4QCOLPZGVdV tkPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679792255; 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=5B5p67y65ESS4CL8epSYsp4FkekQxX3QZ+z+dOdDv/w=; b=BWOdreFcGi53u5jhM1J7llrSHLq+EZMh5bp6vfzdWob+bVUGlqwYixgsjBqXUm0Bxu LuDsRuDVvfay+KAtbiu80bEks9A8jpJM29o0q1xYgafVEeH8Vv7v/itvyNHecMIGbn2q CWrn9tDBy2JdvcuGa1K7J9/7uvIXs4f6kzzwy7WdAhlgI6gHu+SwmhfTUXNRuB9D1p27 2cNDIWufbc/YWBLrH5xqidaEhK+BlcxfRzmcuDQuoTy+DLBqWR0DeQwscjfUzBbCcc4z O4yzYLMh2FUJMdFaCYQx/5kx2iOpzWCIh0flfXfEOiSTRw1XPWjQxkliR8euSUaKgwQR Is7A== X-Gm-Message-State: AAQBX9eA6Y151sksp6OMN3tmsLUtyDmZXI3ycREy90z3LoOWbu89SEaF LMkxR0Cm+7faowvD/P2XEQfmxA== X-Google-Smtp-Source: AKy350agoMi6ZJubBmXXPZj7qS2kcxhe+rQWgpQQr7df8yAxsD+6WzeSRF5Zhxj4i/s2VYMbRBNfVw== X-Received: by 2002:ac2:568f:0:b0:4cc:73ff:579a with SMTP id 15-20020ac2568f000000b004cc73ff579amr2028911lfr.38.1679792255507; Sat, 25 Mar 2023 17:57:35 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id n13-20020ac242cd000000b004e7fa99f3f4sm3996858lfl.265.2023.03.25.17.57.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 17:57:35 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold , devicetree@vger.kernel.org Subject: [PATCH v2 2/9] phy: qcom-qmp-combo: simplify clock handling Date: Sun, 26 Mar 2023 03:57:26 +0300 Message-Id: <20230326005733.2166354-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> References: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230325_175739_185824_FCA65D54 X-CRM114-Status: GOOD ( 17.89 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org 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-combo.c | 67 ++++++++--------------- 1 file changed, 23 insertions(+), 44 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index 6850e04c329b..d35d80f2a4f4 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -1263,9 +1263,6 @@ struct qmp_phy_cfg { int (*calibrate_dp_phy)(struct qmp_combo *qmp); void (*dp_aux_init)(struct qmp_combo *qmp); - /* 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; @@ -1307,6 +1304,7 @@ struct qmp_combo { struct clk *pipe_clk; struct clk_bulk_data *clks; + int num_clks; struct reset_control_bulk_data *resets; struct regulator_bulk_data *vregs; @@ -1365,19 +1363,10 @@ static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val) } /* list of clocks required by phy */ -static const char * const qmp_v3_phy_clk_l[] = { +static const char * const qmp_combo_phy_clk_l[] = { "aux", "cfg_ahb", "ref", "com_aux", }; -static const char * const qmp_v4_phy_clk_l[] = { - "aux", "ref", "com_aux", -}; - -/* the primary usb3 phy on sm8250 doesn't have a ref clock */ -static const char * const qmp_v4_sm8250_usbphy_clk_l[] = { - "aux", "ref_clk_src", "com_aux" -}; - /* list of resets */ static const char * const msm8996_usb3phy_reset_l[] = { "phy", "common", @@ -1451,8 +1440,6 @@ static const struct qmp_phy_cfg sc7180_usb3dpphy_cfg = { .configure_dp_phy = qmp_v3_configure_dp_phy, .calibrate_dp_phy = qmp_v3_calibrate_dp_phy, - .clk_list = qmp_v3_phy_clk_l, - .num_clks = ARRAY_SIZE(qmp_v3_phy_clk_l), .reset_list = sc7180_usb3phy_reset_l, .num_resets = ARRAY_SIZE(sc7180_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1496,8 +1483,6 @@ static const struct qmp_phy_cfg sdm845_usb3dpphy_cfg = { .configure_dp_phy = qmp_v3_configure_dp_phy, .calibrate_dp_phy = qmp_v3_calibrate_dp_phy, - .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, @@ -1543,8 +1528,6 @@ static const struct qmp_phy_cfg sc8180x_usb3dpphy_cfg = { .configure_dp_phy = qmp_v4_configure_dp_phy, .calibrate_dp_phy = qmp_v4_calibrate_dp_phy, - .clk_list = qmp_v4_phy_clk_l, - .num_clks = ARRAY_SIZE(qmp_v4_phy_clk_l), .reset_list = msm8996_usb3phy_reset_l, .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1591,8 +1574,6 @@ static const struct qmp_phy_cfg sc8280xp_usb43dpphy_cfg = { .configure_dp_phy = qmp_v5_configure_dp_phy, .calibrate_dp_phy = qmp_v4_calibrate_dp_phy, - .clk_list = qmp_v4_phy_clk_l, - .num_clks = ARRAY_SIZE(qmp_v4_phy_clk_l), .reset_list = msm8996_usb3phy_reset_l, .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1636,8 +1617,6 @@ static const struct qmp_phy_cfg sm6350_usb3dpphy_cfg = { .configure_dp_phy = qmp_v3_configure_dp_phy, .calibrate_dp_phy = qmp_v3_calibrate_dp_phy, - .clk_list = qmp_v4_phy_clk_l, - .num_clks = ARRAY_SIZE(qmp_v4_phy_clk_l), .reset_list = msm8996_usb3phy_reset_l, .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1681,8 +1660,6 @@ static const struct qmp_phy_cfg sm8250_usb3dpphy_cfg = { .configure_dp_phy = qmp_v4_configure_dp_phy, .calibrate_dp_phy = qmp_v4_calibrate_dp_phy, - .clk_list = qmp_v4_sm8250_usbphy_clk_l, - .num_clks = ARRAY_SIZE(qmp_v4_sm8250_usbphy_clk_l), .reset_list = msm8996_usb3phy_reset_l, .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1731,8 +1708,6 @@ static const struct qmp_phy_cfg sm8350_usb3dpphy_cfg = { .configure_dp_phy = qmp_v4_configure_dp_phy, .calibrate_dp_phy = qmp_v4_calibrate_dp_phy, - .clk_list = qmp_v4_phy_clk_l, - .num_clks = ARRAY_SIZE(qmp_v4_phy_clk_l), .reset_list = msm8996_usb3phy_reset_l, .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -1781,8 +1756,6 @@ static const struct qmp_phy_cfg sm8550_usb3dpphy_cfg = { .calibrate_dp_phy = qmp_v4_calibrate_dp_phy, .regs = qmp_v4_usb3phy_regs_layout, - .clk_list = qmp_v4_phy_clk_l, - .num_clks = ARRAY_SIZE(qmp_v4_phy_clk_l), .reset_list = msm8996_usb3phy_reset_l, .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), .vreg_list = qmp_phy_vreg_l, @@ -2487,7 +2460,7 @@ static int qmp_combo_com_init(struct qmp_combo *qmp) 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; @@ -2540,7 +2513,7 @@ static int qmp_combo_com_exit(struct qmp_combo *qmp) 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); @@ -2785,7 +2758,6 @@ static void qmp_combo_disable_autonomous_mode(struct qmp_combo *qmp) static int __maybe_unused qmp_combo_runtime_suspend(struct device *dev) { struct qmp_combo *qmp = dev_get_drvdata(dev); - const struct qmp_phy_cfg *cfg = qmp->cfg; dev_vdbg(dev, "Suspending QMP phy, mode:%d\n", qmp->mode); @@ -2797,7 +2769,7 @@ static int __maybe_unused qmp_combo_runtime_suspend(struct device *dev) qmp_combo_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; } @@ -2805,7 +2777,6 @@ static int __maybe_unused qmp_combo_runtime_suspend(struct device *dev) static int __maybe_unused qmp_combo_runtime_resume(struct device *dev) { struct qmp_combo *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); @@ -2815,14 +2786,14 @@ static int __maybe_unused qmp_combo_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; } @@ -2893,9 +2864,8 @@ static int qmp_combo_reset_init(struct qmp_combo *qmp) static int qmp_combo_clk_init(struct qmp_combo *qmp) { - const struct qmp_phy_cfg *cfg = qmp->cfg; struct device *dev = qmp->dev; - int num = cfg->num_clks; + int num = ARRAY_SIZE(qmp_combo_phy_clk_l); int i; qmp->clks = devm_kcalloc(dev, num, sizeof(*qmp->clks), GFP_KERNEL); @@ -2903,9 +2873,11 @@ static int qmp_combo_clk_init(struct qmp_combo *qmp) return -ENOMEM; for (i = 0; i < num; i++) - qmp->clks[i].id = cfg->clk_list[i]; + qmp->clks[i].id = qmp_combo_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) @@ -3273,6 +3245,12 @@ static int qmp_combo_parse_dt_legacy(struct qmp_combo *qmp, struct device_node * if (ret) return ret; + ret = devm_clk_bulk_get_all(qmp->dev, &qmp->clks); + if (ret < 0) + return ret; + + qmp->num_clks = ret; + return 0; } @@ -3283,6 +3261,7 @@ static int qmp_combo_parse_dt(struct qmp_combo *qmp) const struct qmp_combo_offsets *offs = cfg->offsets; struct device *dev = qmp->dev; void __iomem *base; + int ret; if (!offs) return -EINVAL; @@ -3312,6 +3291,10 @@ static int qmp_combo_parse_dt(struct qmp_combo *qmp) } qmp->dp_dp_phy = base + offs->dp_dp_phy; + ret = qmp_combo_clk_init(qmp); + if (ret) + return ret; + qmp->pipe_clk = devm_clk_get(dev, "usb3_pipe"); if (IS_ERR(qmp->pipe_clk)) { return dev_err_probe(dev, PTR_ERR(qmp->pipe_clk), @@ -3358,10 +3341,6 @@ static int qmp_combo_probe(struct platform_device *pdev) mutex_init(&qmp->phy_mutex); - ret = qmp_combo_clk_init(qmp); - if (ret) - return ret; - ret = qmp_combo_reset_init(qmp); if (ret) return ret; From patchwork Sun Mar 26 00:57:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13187933 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 32538C77B6D for ; Sun, 26 Mar 2023 00:57:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vK9MVrMHJ351wIar9zFUZJfLyHWlX5yN6QUhs0F8DSw=; b=fd9kkuOsTSQyEZ oUJYgIB9TvDBuSggWD9L5novau8O+SbV8MYD6rgS1ug+TIPsNjKDKZDY/mOQMQW98N+WmOPwPrugw RnGU6MlYaAXnpXMn+eMrskCL9nacSshozwzlyxn5ZB2jG3uSjXC3eZ7Msw2pGt2WFFo9NL3ELFouK OSDX6WQSz/iG7ob8vSk93Mqpj/Tp97qJCkfudf/ayY+mrQPNWlIob2MtIUa6koz0JHdApLAkafOTS YkU9Wu3fHU1t7zQ1ZnahqZXEzqxz75Q4bHuUnmhYV3PAtbbUvOtThJPM99q8YgfUCiC9kGYk5i4dM v0xM7gOpPG1yW1fdRmSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgEhZ-007jsx-2E; Sun, 26 Mar 2023 00:57:41 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgEhX-007jpm-0S for linux-phy@lists.infradead.org; Sun, 26 Mar 2023 00:57:40 +0000 Received: by mail-lf1-x12f.google.com with SMTP id k37so6991185lfv.0 for ; Sat, 25 Mar 2023 17:57:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679792256; 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=1cviUGkrb0ncjbVEvBlggYrFLKN/luXhn7XONBztpvU=; b=qvpf6tljN5y0PTflN4ZQCX9S+YOEguJ3rbx3jCIhihHFXbpkHFciUIPisVLcxxsk7n Dznc1qvIFeitl5w2DNwMqv49aTyEbXD/9JE3nL5t4SJV52ncktIu5nXlqwpR7ifCW9zV BekLgSNAqdYgYkl92VizXcRLBr3XfHjcTkvhaIdfpQ7z8jqxgZlSeNToBnmIpilwniGy YqLtcq4qsLiEQCPNlOQ9v1DGcepGk6XbkA1R+zCjUxk5hYXepPepuG0i6Q5PXPklDzlt 1rbS108BzXr5jxrhDe3IA9s7ovlyQNbA2qPSXaTQulQQiTApAkyoTOd6OTmc2wMHWy1/ tFcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679792256; 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=1cviUGkrb0ncjbVEvBlggYrFLKN/luXhn7XONBztpvU=; b=6uM+2KVJB86XSO7A0VNuv7Y/jTSEU3pAEBiItVYCvR58DWdsfC9fJU27Bokfn+2fU0 KBTnyn0cfpkkV3e37N7kqZqjYfkIwOcQ1N0qpWt06a0tLO55SoqtQJZTgSKymsh8FVNO dRUcRbEijtcw1RNzsenuOQ/+Oc6e6WPKMYD2PEnvqo1z1ulxqDdEo2ZlIbNq4FCTwc6n VjRHHrn8EscMeWiM07GK6da0h/bshYZYsJqVTbZsTbefx/jKcJgYdSjsSgDUFUx9/G3Q yuWkz3g4gKvlWlkzy9zHYpG1bcBGI+ekkvj6IjPtDvZSyGjlaP1AgPsL1HxYy2dhHgG5 /mTQ== X-Gm-Message-State: AO0yUKWd2O8DOuVvBV3AsxX4wYR1Yox7Cra7hdEW/L95k6xCDv1okFji K23C8tEpaRG0S1fDBW0q3P3KiA== X-Google-Smtp-Source: AK7set94A+4cm1/sHNxs0qdPCnF6youNs1/OhwBvzTBNVM7jWrCMXn7C4XBJtK8M7Ca+34Xkvn05VA== X-Received: by 2002:a05:6512:33c2:b0:4e8:3d0:84b4 with SMTP id d2-20020a05651233c200b004e803d084b4mr4573092lfg.24.1679792256323; Sat, 25 Mar 2023 17:57:36 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id n13-20020ac242cd000000b004e7fa99f3f4sm3996858lfl.265.2023.03.25.17.57.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 17:57:35 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold , devicetree@vger.kernel.org Subject: [PATCH v2 3/9] phy: qcom-qmp-combo: populate offsets for all combo PHYs Date: Sun, 26 Mar 2023 03:57:27 +0300 Message-Id: <20230326005733.2166354-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> References: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230325_175739_181398_94BEE8CC X-CRM114-Status: UNSURE ( 7.98 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org In order to support newer style bindings for combo PHYs, populate offsets for all Combo QMP PHY configurations. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index d35d80f2a4f4..5ce68d211998 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -1407,6 +1407,8 @@ static const struct qmp_combo_offsets qmp_combo_offsets_v5 = { }; static const struct qmp_phy_cfg sc7180_usb3dpphy_cfg = { + .offsets = &qmp_combo_offsets_v3, + .serdes_tbl = qmp_v3_usb3_serdes_tbl, .serdes_tbl_num = ARRAY_SIZE(qmp_v3_usb3_serdes_tbl), .tx_tbl = qmp_v3_usb3_tx_tbl, @@ -1450,6 +1452,8 @@ static const struct qmp_phy_cfg sc7180_usb3dpphy_cfg = { }; static const struct qmp_phy_cfg sdm845_usb3dpphy_cfg = { + .offsets = &qmp_combo_offsets_v3, + .serdes_tbl = qmp_v3_usb3_serdes_tbl, .serdes_tbl_num = ARRAY_SIZE(qmp_v3_usb3_serdes_tbl), .tx_tbl = qmp_v3_usb3_tx_tbl, @@ -1493,6 +1497,8 @@ static const struct qmp_phy_cfg sdm845_usb3dpphy_cfg = { }; static const struct qmp_phy_cfg sc8180x_usb3dpphy_cfg = { + .offsets = &qmp_combo_offsets_v3, + .serdes_tbl = sm8150_usb3_serdes_tbl, .serdes_tbl_num = ARRAY_SIZE(sm8150_usb3_serdes_tbl), .tx_tbl = sm8150_usb3_tx_tbl, @@ -1625,6 +1631,8 @@ static const struct qmp_phy_cfg sm6350_usb3dpphy_cfg = { }; static const struct qmp_phy_cfg sm8250_usb3dpphy_cfg = { + .offsets = &qmp_combo_offsets_v3, + .serdes_tbl = sm8150_usb3_serdes_tbl, .serdes_tbl_num = ARRAY_SIZE(sm8150_usb3_serdes_tbl), .tx_tbl = sm8250_usb3_tx_tbl, From patchwork Sun Mar 26 00:57:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13187960 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 487C6C76196 for ; Sun, 26 Mar 2023 02:01:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=10fX12epJEFs1+nr8MinRjJ6/RC5CiuM/pbTyL/pBj0=; b=Xf+RzPcySgaZcH O4GpniPHD1WHor925++oiI2wz9yp079p8mbDdnRVYNlosHn5DXQKVM+uLj6NwAxTcinaLBlPpR9h3 yMCuwAABwNF+U+/H2Uj6rdz1lRP2nxow9Ou7rEVM/iy1jhHSfCITierkeVDpxk6/daOuM6W76E3Yv qPu0jTJMQ4DY9GKKeth/an4CF2Zbo1BS6Z5sIMxBKvIRnp182E6y681wW83ayQE2aW0bcyPq6oZ40 7TtUHCulW1yWou41hnuFWrEPKeY+7LdvsXBtFSDKHIMsnOWyeNKo0QJlBbekqqvqffw+gMsiDSQGb akedPsXFvtIr4yRSzVyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgFhi-007pY1-2p; Sun, 26 Mar 2023 02:01:54 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgEhX-007jq5-2G for linux-phy@lists.infradead.org; Sun, 26 Mar 2023 00:57:41 +0000 Received: by mail-lf1-x132.google.com with SMTP id h25so6936218lfv.6 for ; Sat, 25 Mar 2023 17:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679792257; 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=/jiwlN12y/3lXv9SjJsbLHWnt36d7YrELH3I9tTCd7I=; b=vTGFavBy2aHVjppySsM5ApbeUeN8qjB6OsWDUtgU1FXhFSsCY5Gt1iYuHrxd+1Uoop 3twqKocLw/GZaYUMPR43vCRgdHUdWz/AQB3Hvgr7ZsmUR8FhjBvDSFCu15gEiQAIAwM/ mlUf6f8ve6Kda53iPy2puV3ev6Yi7OktRtGKUZfGqHsJ+6x6vI3x9Z7lWWyRMwSBCvJD g+LSmTyhZnt4046FNTIAKfzfFveYmSeKhUWXFTzjlppEBQKot8ulmGNHK0ixGSrvIygB M8jQiAxMXG5furrFaD/vZvBA9JaT+li5hDJB1rR2BQL8I9QCtvXX8icXzePz3iN4UPGO ahCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679792257; 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=/jiwlN12y/3lXv9SjJsbLHWnt36d7YrELH3I9tTCd7I=; b=ampOMwzQJ/K7JiSsQnA80xq5STCKsKv9ATgeslImY6nDJhmO6KQKM92OJWNBMAHj7m pr8eALPj4L5EeHeTgBKDhMJWbStxqskG5LuW08v88/l8DfUBtd5gx5xCeJcahp+cvhdd rH5FBFc0ENOZsk2rok0pWYhigoAzvITAqc6/Cy+f2+fFbg77OEP6zD057M93gFPKe0eZ AkZob6LuSNulKF+tN5M9aapTN+rNsAFh0fWhwY0CaAE1SDRHbfQjgM98wqgSfOq6l3xW 1KE8N4Z49SQb33WHRJhLFuGhjYvpUFoN7IKuIANONqhYLbreODSugKqCZw1bmSg2lwF4 rBCA== X-Gm-Message-State: AAQBX9eIXwPnt35Ag+kpZocF6lmA5D9YJx5y95X25ilptVNgwMKXp4Mi Mh2RiMGhzza2ubN0yqymCcsn2w== X-Google-Smtp-Source: AKy350bxkn7X48K305kMP5x677EFfaBENdJPfVvDWXKQZ2VJfebcbY838+mJTkwrmSxZJY9r0ENwVg== X-Received: by 2002:ac2:5476:0:b0:4eb:c30:2777 with SMTP id e22-20020ac25476000000b004eb0c302777mr528023lfn.54.1679792256988; Sat, 25 Mar 2023 17:57:36 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id n13-20020ac242cd000000b004e7fa99f3f4sm3996858lfl.265.2023.03.25.17.57.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 17:57:36 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold , devicetree@vger.kernel.org Subject: [PATCH v2 4/9] phy: qcom-qmp-combo: add qcom,sc7280-qmp-usb3-dp-phy compat entry Date: Sun, 26 Mar 2023 03:57:28 +0300 Message-Id: <20230326005733.2166354-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> References: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230325_175739_745578_E630E751 X-CRM114-Status: UNSURE ( 8.71 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Add separate device entry for Combo USB+DP QMP PHY on sc7280 platform. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index 5ce68d211998..8fadf92095c5 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -3431,6 +3431,10 @@ static const struct of_device_id qmp_combo_of_match_table[] = { .compatible = "qcom,sc7180-qmp-usb3-dp-phy", .data = &sc7180_usb3dpphy_cfg, }, + { + .compatible = "qcom,sc7280-qmp-usb3-dp-phy", + .data = &sm8250_usb3dpphy_cfg, + }, { .compatible = "qcom,sc8180x-qmp-usb3-dp-phy", .data = &sc8180x_usb3dpphy_cfg, From patchwork Sun Mar 26 00:57:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13187962 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09672C77B62 for ; Sun, 26 Mar 2023 02:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=h+Ix6TyD0e6kEqnr9AL8JIVCDo7hH8myK9ONQenle+0=; b=v1shYFOn5rdcnG tHOmqY55bhEcC2hRiH8705NLQa3JVaLQ2i5rqC8EAN3fyS/s/TVjOjP1hP1hnxgbdjvQ+11BMj9ZX DEKz7E+vl/DXzUsse9kIh4jJgyaImFzHv1tDJYBJMDcrJ86nF+AVgOn4PUA8WgPSmBoGUIugfkToR eH+WXo4BpEiitKBc9m5wwM577ChHbQHe001QxWaZ9XbhpjdhixLWX5/1T181a5KzNXtdx7RdV0Pn6 5+ayqhcR3ap+kA5+ZIGegg5jj6WhL99ya8whA3tI7y6TyEA3vEcw+EIg7OpeSxL7bNP8rg5Ev7gV7 faZIudWmkwi9ONhKyszQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgFhj-007pYV-25; Sun, 26 Mar 2023 02:01:55 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgEhY-007jqQ-1H for linux-phy@lists.infradead.org; Sun, 26 Mar 2023 00:57:42 +0000 Received: by mail-lf1-x12e.google.com with SMTP id t11so6963114lfr.1 for ; Sat, 25 Mar 2023 17:57:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679792257; 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=w5lv9rvldIcBn3hrWH1OHqukYC00puDZn0vJWU5aRYM=; b=Z8pTUa8P/LyKEdjkVniXLG273sV4TinjBx90fY9oqgbtkCSca/97jnbDysCEMH+JxS zTHiDhbotiDUKqE4TppKoGLzlmPUZEYjiqmsoI+roHw3Zn5pSOo1W06rDS9Q4eAFgLMm s3Wwji+AguBGIVqeyZiPXLr3/flRvLu/2o8bolCDBk4J06LyLB3+lFk+Wac2AGo25GVb H+5CvQq47x6SQ6hLHdQcprIx2mHFvyIgqcAYsx/o33Y0etA0pKMok/nVY87/U7DB4EjT 4NbFDuYLNHOJlEGc5Q+ouL//7ePZJAW3ISJh4OgH7Qkib/AvdOZwsDnraLyBNABP0qO3 vjUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679792257; 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=w5lv9rvldIcBn3hrWH1OHqukYC00puDZn0vJWU5aRYM=; b=eeXSPX1NPqQIsICaxoY/2D555Ay6+ji2m3+IIeO6A8BGq2yrtO8a+i8oZt9GllbvXC WBeaJcbHYseu93+VlzqbOXLAxFGve03fpT4gSINiRDHoMtEFQz+C5dZbEdHEFE5XNAAy 0zyjVpn70WmHiCzUXfLV2kaAHecPKlsjBXhmqUkt8c2RYIWFhCAbNEtjTJmZbGzlmQaW N7KNu6nLTFKlVMiOWAZ/RE9m9MrKRBW99KRikzcKuLlh191ig9hT253x3lMTd1ZfZUuy 3rQL9PA5oFnPXXrOik2bhvD/1dmgcixo13IAfnYjOs6SSbAm3fZmw4QQGF/bN8fQWlJP p5XA== X-Gm-Message-State: AAQBX9chtl0tyBe8uKYDV13HLlzdFulj9KGrbn4hACVqfd4YUUO5ahnr PKmej7JeQGDRY2f57lmgS9BkaQ== X-Google-Smtp-Source: AKy350ZiRMRdNM5g0WCfHohIa9yilXTvDl3jLK2QcZJa0djS/5jH+NhF1FgEBFV0De7uUERbRx2ZqQ== X-Received: by 2002:ac2:4318:0:b0:4d4:fcdb:6454 with SMTP id l24-20020ac24318000000b004d4fcdb6454mr1909765lfh.17.1679792257704; Sat, 25 Mar 2023 17:57:37 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id n13-20020ac242cd000000b004e7fa99f3f4sm3996858lfl.265.2023.03.25.17.57.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 17:57:37 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold , devicetree@vger.kernel.org Subject: [PATCH v2 5/9] arm64: dts: qcom: sc7180: switch USB+DP QMP PHY to new style of bindings Date: Sun, 26 Mar 2023 03:57:29 +0300 Message-Id: <20230326005733.2166354-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> References: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230325_175740_436951_3A94AB49 X-CRM114-Status: GOOD ( 10.00 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.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 Reviewed-by: Neil Armstrong --- arch/arm64/boot/dts/qcom/sc7180.dtsi | 57 ++++++++++------------------ 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi index 3c799b564b64..98004b02b762 100644 --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -2713,49 +2714,28 @@ usb_1_hsphy: phy@88e3000 { nvmem-cells = <&qusb2p_hstx_trim>; }; - usb_1_qmpphy: phy-wrapper@88e9000 { + usb_1_qmpphy: phy@88e8000 { compatible = "qcom,sc7180-qmp-usb3-dp-phy"; - reg = <0 0x088e9000 0 0x18c>, - <0 0x088e8000 0 0x3c>, - <0 0x088ea000 0 0x18c>; + reg = <0 0x088e8000 0 0x3000>; status = "disabled"; - #address-cells = <2>; - #size-cells = <2>; - ranges; clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>, - <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>, <&gcc GCC_USB3_PRIM_CLKREF_CLK>, - <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>; - clock-names = "aux", "cfg_ahb", "ref", "com_aux"; + <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, + <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>, + <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>; + clock-names = "aux", + "ref", + "com_aux", + "usb3_pipe", + "cfg_ahb"; resets = <&gcc GCC_USB3_PHY_PRIM_BCR>, <&gcc GCC_USB3_DP_PHY_PRIM_BCR>; reset-names = "phy", "common"; - usb_1_ssphy: usb3-phy@88e9200 { - reg = <0 0x088e9200 0 0x128>, - <0 0x088e9400 0 0x200>, - <0 0x088e9c00 0 0x218>, - <0 0x088e9600 0 0x128>, - <0 0x088e9800 0 0x200>, - <0 0x088e9a00 0 0x18>; - #clock-cells = <0>; - #phy-cells = <0>; - clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; - clock-names = "pipe0"; - clock-output-names = "usb3_phy_pipe_clk_src"; - }; - - dp_phy: dp-phy@88ea200 { - reg = <0 0x088ea200 0 0x200>, - <0 0x088ea400 0 0x200>, - <0 0x088eaa00 0 0x200>, - <0 0x088ea600 0 0x200>, - <0 0x088ea800 0 0x200>; - #clock-cells = <1>; - #phy-cells = <0>; - }; + #clock-cells = <1>; + #phy-cells = <1>; }; dc_noc: interconnect@9160000 { @@ -2835,7 +2815,7 @@ usb_1_dwc3: usb@a600000 { iommus = <&apps_smmu 0x540 0>; snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; - phys = <&usb_1_hsphy>, <&usb_1_ssphy>; + phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; phy-names = "usb2-phy", "usb3-phy"; maximum-speed = "super-speed"; }; @@ -3143,8 +3123,9 @@ mdss_dp: displayport-controller@ae90000 { "ctrl_link_iface", "stream_pixel"; assigned-clocks = <&dispcc DISP_CC_MDSS_DP_LINK_CLK_SRC>, <&dispcc DISP_CC_MDSS_DP_PIXEL_CLK_SRC>; - assigned-clock-parents = <&dp_phy 0>, <&dp_phy 1>; - phys = <&dp_phy>; + assigned-clock-parents = <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>, + <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>; + phys = <&usb_1_qmpphy QMP_USB43DP_DP_PHY>; phy-names = "dp"; operating-points-v2 = <&dp_opp_table>; @@ -3201,8 +3182,8 @@ dispcc: clock-controller@af00000 { <&gcc GCC_DISP_GPLL0_CLK_SRC>, <&dsi_phy 0>, <&dsi_phy 1>, - <&dp_phy 0>, - <&dp_phy 1>; + <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>, + <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>; clock-names = "bi_tcxo", "gcc_disp_gpll0_clk_src", "dsi0_phy_pll_out_byteclk", From patchwork Sun Mar 26 00:57:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13187963 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C7762C77B61 for ; Sun, 26 Mar 2023 02:01:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XIegeeSkn3jmCYanXonwh88cMzr0XM8l6230097uGNg=; b=FeKGiutk4C3HE4 HYi9jUHTc/mPpV7KsN41B63BjgvuqJsOgNAaLUe5SHq770sH7ePl9GKcmP0jCrHpckYBkcktqSHt5 0g+c+daft//oyo52J1O3HokdD2tpYPyqf2mSvjLdCNKEK7U+eWr+qgS6e/fbGIXCS8H6EAwof7Upr 0BWpKo8bypmyy0A9j6bt23vgtz6l8k2nGEbuzaRAgx3I6eU8akrXl+m39abr+NSuiFDttd8zMUsR7 iGGqvmo0Zr74VvNrV4TN54klivNANUIxUbnk10P9icjVE+jc2w70N81NMfWY0QGkmmchcbks+f7hQ 0kevw2XeSJrdvP766WZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgFhj-007pYJ-1F; Sun, 26 Mar 2023 02:01:55 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgEhX-007jqa-2W for linux-phy@lists.infradead.org; Sun, 26 Mar 2023 00:57:42 +0000 Received: by mail-lf1-x12c.google.com with SMTP id q16so6920476lfe.10 for ; Sat, 25 Mar 2023 17:57:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679792258; 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=h8JCTWGMw0PlOMatGYHxKtoTg52+/4h/VOYV53NarVI=; b=OJ9heNWWzAPIO6wmuYnTEZsUfXvcmirMCfS8EOPTioP9xUuVjmNj1nLmBMilzkpwly 2lekGi6fzFkZPitH7hpVcY7I8JbnINVDZ9vygHMH7OKcqxXPu809Rni0u0tObxbjtirQ yBsoMZ7O1AovfSGj0HDu3wRUTYG44Weaq9xjr24X1Y/uxdYKnw6RjGGLIi/1PrJwTZzq FMPCM9NBXOWbndSCG/npNwkJwOKR5qFYiaIU9pLn4OLroyc1azWNan+iy9uP/lLVFn2X g3SNQ32MXbflQwf14T5A3dq8Z0FZB1yvMOZ18Are9cMZwuq/Uogi13LEba6RqqCbfZmt c33w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679792258; 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=h8JCTWGMw0PlOMatGYHxKtoTg52+/4h/VOYV53NarVI=; b=tHWXE3B/FDz0wy4nXz1jq02mCQlS8sjHjQyi0YZNAssgFFJTDkDrRQwU821RgiGmtM pfp7wj5CwZ4V+mdVivpz5R//DiDWgICHq8CppmoytkPa8myITXWjNa8t/8ZfFFSkTk8m BREuPLGhFE5PkAVidEZFzoLLmljWLl6nkvkRErhGBcjnnIoojehoq44P/SMIWJrun3x4 em07hsmnlUvvFrqqAp2ZK205IkDFnTp4jT6r7BaH6l/Rl5Tv8KFGm9vX/3ylgcskpfiI /Vj156CJvcqkbMgj/cWKEwB5PMdOtNJI+u81ZWp9Zt24yfq6PfDh8Up1oxgGSOSLUugW CXjQ== X-Gm-Message-State: AAQBX9cumX7f6c3zJisTtlGRiwvQ1uMXBJGWliet0s8TymMMrl4XvNXY pZdeaZjcVG5RkR5IHa0OmwRtfw== X-Google-Smtp-Source: AKy350YPFY/DGJdgXLMtOi6+OGcP4prO5hTd33i193IiX+V5HXs7gLh/4XedMSHyAb03IygggXjXhw== X-Received: by 2002:ac2:46e4:0:b0:4dd:995b:feaa with SMTP id q4-20020ac246e4000000b004dd995bfeaamr2280449lfo.24.1679792258501; Sat, 25 Mar 2023 17:57:38 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id n13-20020ac242cd000000b004e7fa99f3f4sm3996858lfl.265.2023.03.25.17.57.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 17:57:37 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold , devicetree@vger.kernel.org Subject: [PATCH v2 6/9] arm64: dts: qcom: sc7280: switch USB+DP QMP PHY to new style of bindings Date: Sun, 26 Mar 2023 03:57:30 +0300 Message-Id: <20230326005733.2166354-7-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> References: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230325_175739_831338_2EF957F9 X-CRM114-Status: UNSURE ( 9.59 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.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/sc7280.dtsi | 57 +++++++++------------------- 1 file changed, 18 insertions(+), 39 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi index 5e6f9f441f1a..887c490bdd14 100644 --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -3327,49 +3328,26 @@ usb_2_hsphy: phy@88e4000 { resets = <&gcc GCC_QUSB2PHY_SEC_BCR>; }; - usb_1_qmpphy: phy-wrapper@88e9000 { - compatible = "qcom,sc7280-qmp-usb3-dp-phy", - "qcom,sm8250-qmp-usb3-dp-phy"; - reg = <0 0x088e9000 0 0x200>, - <0 0x088e8000 0 0x40>, - <0 0x088ea000 0 0x200>; + usb_1_qmpphy: phy@88e8000 { + compatible = "qcom,sc7280-qmp-usb3-dp-phy"; + reg = <0 0x088e8000 0 0x3000>; status = "disabled"; - #address-cells = <2>; - #size-cells = <2>; - ranges; clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>, <&rpmhcc RPMH_CXO_CLK>, - <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>; - clock-names = "aux", "ref_clk_src", "com_aux"; + <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, + <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; + clock-names = "aux", + "ref", + "com_aux", + "usb3_pipe"; resets = <&gcc GCC_USB3_DP_PHY_PRIM_BCR>, <&gcc GCC_USB3_PHY_PRIM_BCR>; reset-names = "phy", "common"; - usb_1_ssphy: usb3-phy@88e9200 { - reg = <0 0x088e9200 0 0x200>, - <0 0x088e9400 0 0x200>, - <0 0x088e9c00 0 0x400>, - <0 0x088e9600 0 0x200>, - <0 0x088e9800 0 0x200>, - <0 0x088e9a00 0 0x100>; - #clock-cells = <0>; - #phy-cells = <0>; - clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; - clock-names = "pipe0"; - clock-output-names = "usb3_phy_pipe_clk_src"; - }; - - dp_phy: dp-phy@88ea200 { - reg = <0 0x088ea200 0 0x200>, - <0 0x088ea400 0 0x200>, - <0 0x088eaa00 0 0x200>, - <0 0x088ea600 0 0x200>, - <0 0x088ea800 0 0x200>; - #phy-cells = <0>; - #clock-cells = <1>; - }; + #clock-cells = <1>; + #phy-cells = <1>; }; usb_2: usb@8cf8800 { @@ -3694,7 +3672,7 @@ usb_1_dwc3: usb@a600000 { iommus = <&apps_smmu 0xe0 0x0>; snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; - phys = <&usb_1_hsphy>, <&usb_1_ssphy>; + phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; phy-names = "usb2-phy", "usb3-phy"; maximum-speed = "super-speed"; }; @@ -3799,8 +3777,8 @@ dispcc: clock-controller@af00000 { <&gcc GCC_DISP_GPLL0_CLK_SRC>, <&mdss_dsi_phy 0>, <&mdss_dsi_phy 1>, - <&dp_phy 0>, - <&dp_phy 1>, + <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>, + <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>, <&mdss_edp_phy 0>, <&mdss_edp_phy 1>; clock-names = "bi_tcxo", @@ -4138,8 +4116,9 @@ mdss_dp: displayport-controller@ae90000 { "stream_pixel"; assigned-clocks = <&dispcc DISP_CC_MDSS_DP_LINK_CLK_SRC>, <&dispcc DISP_CC_MDSS_DP_PIXEL_CLK_SRC>; - assigned-clock-parents = <&dp_phy 0>, <&dp_phy 1>; - phys = <&dp_phy>; + assigned-clock-parents = <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>, + <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>; + phys = <&usb_1_qmpphy QMP_USB43DP_DP_PHY>; phy-names = "dp"; operating-points-v2 = <&dp_opp_table>; From patchwork Sun Mar 26 00:57:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13187965 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 820B2C77B6C for ; Sun, 26 Mar 2023 02:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VZbimqCakOSo/iN8gbw9h2wdSgN9dRLWwgmewBm0z+o=; b=UsFoQPOWcPjILl 7CelhJ0ktopajubp43B9obkwR5/UTznjf2d5UU/G/mgUw7G3mx3uggq5AgCDVNIemvI748TPSE6eM yb1cHNVc2ZlHnSaJNff1oHDptknM/5Cefq+TlhB6/nA/oxdV3bXKhuv8hKg8p1I/WhXCTImnZKQIO Q0kJnbw7OZVo+wmyJ1uOvDC0I6/85d9a2aKnSgAbe9z3X49LNl2sSpzWfFyA89rmoU8LR96A3wi7Q b6TyehrryeZk7LEt+1S7QzrA3n5Y4vkpXqmQpdIxzAKkSkNnDIQocuqzJm0R66qeQxyAPOU0h8+qL 1meYahpNF8DfkOIyVFwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgFhk-007pZ4-0Z; Sun, 26 Mar 2023 02:01:56 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgEhZ-007jrR-2O for linux-phy@lists.infradead.org; Sun, 26 Mar 2023 00:57:43 +0000 Received: by mail-lf1-x12d.google.com with SMTP id q16so6920491lfe.10 for ; Sat, 25 Mar 2023 17:57:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679792259; 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=3GNa0fcHH21wLDXSWROL6xeDtSdFaQfshGobUBLyMtc=; b=QUwM30JBcc5pW4IOz+PLBM9kK8q0GVPI9IcqbPVu9u2CSed3wir+0ZkEoY4WSrVnp1 mFnGOxoPs0zRxS2XMQ21tnx2E16LkpcCCTjQvVrZHLknRIfSd3nW309awUVwCW6jLP4J h0wThxqf4njuXXuBwR9lCG2wbGgutjFBrUltAHNj2miNy4YlxVudEp8xPuOFsHqo1oJ5 NPVhQHAnRjH4Q7DShffiL8pIPytwJOT3hUjSDlN9SZxoTX09SebEXfdsR6xrjcl0TmrL 5mC7bj1zwjA7OOKU8qwSJjoTmTeKwsb7CwVjmJdTbZotyRBg5jbMJb5RhJ7gxMmQsZbq jcwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679792259; 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=3GNa0fcHH21wLDXSWROL6xeDtSdFaQfshGobUBLyMtc=; b=KRnQBNlbuk7OEFwIfGlZhA3Q1WWGIytjbhKpDWfGozpfnc2W859SSG753OLlDvsoUR x5AZWCvvURrHRCGV/eqXYLECkk0HVR5fVFOpYCB7SgpYkvCm9hqrgW8pSDEcCDF19zSp 0qav9rBVfwbNizjKFM3Gg2tygcseAOx8VLG8c8EehpqMzkLEvKb2bRZzftalSPfxdPz0 OfZDlFxgYcY0hdxevW6yyz0tDcqaEkmpA6iHotNceSHKUeGFCF+NdNpAWP0BgI9Y7Xir YrhVRnkUxifhmP4jHL3dngGb0M8lE4ADfuGKIn8LWQHkkg7QYINg+YEWZCVSvcOE5rKL yUuw== X-Gm-Message-State: AAQBX9ebJOrw3j4y2waxyv4wZR1O9eV3plf1JEcua0pfWWxjipZ0Xg0O hl29hdA4dTDBi0TzH17o0I7cgw== X-Google-Smtp-Source: AKy350Ymvv9QkBl1oesrawowvBnsZ7VkRbV3AMlhUmWeOOF072kxFsJ0dkr3eALJBSCGJTSfi6e1pQ== X-Received: by 2002:ac2:55a8:0:b0:4d5:c96f:f7c7 with SMTP id y8-20020ac255a8000000b004d5c96ff7c7mr2199891lfg.23.1679792259195; Sat, 25 Mar 2023 17:57:39 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id n13-20020ac242cd000000b004e7fa99f3f4sm3996858lfl.265.2023.03.25.17.57.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 17:57:38 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold , devicetree@vger.kernel.org Subject: [PATCH v2 7/9] arm64: dts: qcom: sdm845: switch USB+DP QMP PHY to new style of bindings Date: Sun, 26 Mar 2023 03:57:31 +0300 Message-Id: <20230326005733.2166354-8-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> References: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230325_175741_793503_B847059D X-CRM114-Status: GOOD ( 10.00 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.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 Reviewed-by: Neil Armstrong --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 57 ++++++++++------------------ 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 2f32179c7d1b..aff8b9278914 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -3909,49 +3910,28 @@ usb_2_hsphy: phy@88e3000 { nvmem-cells = <&qusb2s_hstx_trim>; }; - usb_1_qmpphy: phy@88e9000 { + usb_1_qmpphy: phy@88e8000 { compatible = "qcom,sdm845-qmp-usb3-dp-phy"; - reg = <0 0x088e9000 0 0x18c>, - <0 0x088e8000 0 0x38>, - <0 0x088ea000 0 0x40>; + reg = <0 0x088e8000 0 0x3000>; status = "disabled"; - #address-cells = <2>; - #size-cells = <2>; - ranges; clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>, - <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>, <&gcc GCC_USB3_PRIM_CLKREF_CLK>, - <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>; - clock-names = "aux", "cfg_ahb", "ref", "com_aux"; + <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, + <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>, + <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>; + clock-names = "aux", + "ref", + "com_aux", + "usb3_pipe", + "cfg_ahb"; resets = <&gcc GCC_USB3_PHY_PRIM_BCR>, <&gcc GCC_USB3_DP_PHY_PRIM_BCR>; reset-names = "phy", "common"; - usb_1_ssphy: usb3-phy@88e9200 { - reg = <0 0x088e9200 0 0x128>, - <0 0x088e9400 0 0x200>, - <0 0x088e9c00 0 0x218>, - <0 0x088e9600 0 0x128>, - <0 0x088e9800 0 0x200>, - <0 0x088e9a00 0 0x100>; - #clock-cells = <0>; - #phy-cells = <0>; - clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; - clock-names = "pipe0"; - clock-output-names = "usb3_phy_pipe_clk_src"; - }; - - dp_phy: dp-phy@88ea200 { - reg = <0 0x088ea200 0 0x200>, - <0 0x088ea400 0 0x200>, - <0 0x088eaa00 0 0x200>, - <0 0x088ea600 0 0x200>, - <0 0x088ea800 0 0x200>; - #clock-cells = <1>; - #phy-cells = <0>; - }; + #clock-cells = <1>; + #phy-cells = <1>; }; usb_2_qmpphy: phy@88eb000 { @@ -4031,7 +4011,7 @@ usb_1_dwc3: usb@a600000 { iommus = <&apps_smmu 0x740 0>; snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; - phys = <&usb_1_hsphy>, <&usb_1_ssphy>; + phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; phy-names = "usb2-phy", "usb3-phy"; }; }; @@ -4499,8 +4479,9 @@ mdss_dp: displayport-controller@ae90000 { "ctrl_link_iface", "stream_pixel"; assigned-clocks = <&dispcc DISP_CC_MDSS_DP_LINK_CLK_SRC>, <&dispcc DISP_CC_MDSS_DP_PIXEL_CLK_SRC>; - assigned-clock-parents = <&dp_phy 0>, <&dp_phy 1>; - phys = <&dp_phy>; + assigned-clock-parents = <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>, + <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>; + phys = <&usb_1_qmpphy QMP_USB43DP_DP_PHY>; phy-names = "dp"; operating-points-v2 = <&dp_opp_table>; @@ -4838,8 +4819,8 @@ dispcc: clock-controller@af00000 { <&dsi0_phy 1>, <&dsi1_phy 0>, <&dsi1_phy 1>, - <&dp_phy 0>, - <&dp_phy 1>; + <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>, + <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>; clock-names = "bi_tcxo", "gcc_disp_gpll0_clk_src", "gcc_disp_gpll0_div_clk_src", From patchwork Sun Mar 26 00:57:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13187964 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4C1C7C77B6D for ; Sun, 26 Mar 2023 02:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wr8GXLvse0OEKMYa3DhP+v9mBWJMz/pnC2oo9ABea84=; b=XQQ1BDCG3DNcT6 MRYYoOauGdWKRrzHJebhZPjAC7pzZ1JVc40KOr5DP3tqVQBxPfKoMAzq7Ku+Q2SQIqvS/EvhesDp+ Ko3cG7drUQb9ayXrjfObJDlq/jO84ZwmjVULrI85QIXFLqLY2TOU1xgUtoeOw/IS2Lb/4LzKMm2+I cQFeBs0UnRVUyqFZsHpKoZQ/VOCdca8RER0Igv2zeUoCiAP3N0e2nOxELffktox9pxwKLKNRQXeUq KNNUclB3TfLELgF8h1Rsi1UA1HpqNwYVAL5ZTtgE4Sh6F36LmB5kf7tpphwf74Xyh6360CGvteD/D WjeiF8lQkWuXRLie9ibg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgFhj-007pYq-2w; Sun, 26 Mar 2023 02:01:55 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgEhZ-007jrx-0e for linux-phy@lists.infradead.org; Sun, 26 Mar 2023 00:57:42 +0000 Received: by mail-lf1-x12e.google.com with SMTP id q16so6920512lfe.10 for ; Sat, 25 Mar 2023 17:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679792260; 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=mKE6AqsiXcNq8j3VeprRnII8ABKzIYAh1YOtnfRKOPs=; b=jV6e5Jc5Wd9tb4VrMzKLDOjP0X62Nm3Y4ywNFdOcDVcUE7qLwQabXZ66U/egil2dgc +mk4XOJ6S4erSPsuzxazxmoU8YmV40LIosyfYxiDh0MYN1lXXaSaVElTT0yBIdVQeh/p desEt3pk4fTO2IChmKzMJAtQaJEQwmHj/Cnwi57nWQp1XpuazYpMk9YCuKPSZ5dlyQ4N 2KwBM9Tc812mgDwzHnNDbmJERHxkzHMNxHSzStF6MKd4Aq2uNbfg4Ov1eTNA+3aLR7na xGcoNBqvL3B40/kQXMgimvR7nehQRvvJvRv/pux/imeWr/mRkcsHZgLLkPg8DET239I5 CH/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679792260; 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=mKE6AqsiXcNq8j3VeprRnII8ABKzIYAh1YOtnfRKOPs=; b=Znj6nY+Y7oM114BN5tM1Xx0WUJgTpyqTpxNCsbyoZjnykS7/5CX9C1ssXg4k7/Amad ++3Qf7FQ6RtTbcQws2+oBmd7wxXh1S//oR6zovrEtdKOuexxXBCnhfWf35ZDL4BCf6c5 YjrVHuxLA1AJiebHbUoUoDJ/Q7KkkNEG0LyTgk2zbDyNCTwUAcKaUUl8DMgcMFvROStQ 3ywNmBFhTwq/A9m4ZLA0C//iOp0W7ogfBu03kcK59ets8DbZmip9YkYPbAcMqRLeitOH q37BoQvGEI71ZopRZqdSAOsUhobFJcnGhHcnwFWQH8jof0jr5gV/dR2kIQQFGBSPAeWD 22sg== X-Gm-Message-State: AO0yUKX7ExiDZno9ap5nqOAOLf9R3nr1O2ENLC/hNX2wv8cdwo68/0ek Uh9/B7CHkObfnJaZpCbmJR82Kw== X-Google-Smtp-Source: AK7set9Od5srLapBVGJ2pqZhcxf2uBK39G9L1sJ85gIAJdCDqCF8BvBqddgSXzG1gKvk3Djf5QBlsw== X-Received: by 2002:a05:6512:1316:b0:4ea:f63b:3b36 with SMTP id x22-20020a056512131600b004eaf63b3b36mr4209094lfu.10.1679792259917; Sat, 25 Mar 2023 17:57:39 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id n13-20020ac242cd000000b004e7fa99f3f4sm3996858lfl.265.2023.03.25.17.57.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 17:57:39 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold , devicetree@vger.kernel.org Subject: [PATCH v2 8/9] arm64: dts: qcom: sm8150: switch USB+DP QMP PHY to new style of bindings Date: Sun, 26 Mar 2023 03:57:32 +0300 Message-Id: <20230326005733.2166354-9-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> References: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230325_175741_273780_45938EBF X-CRM114-Status: UNSURE ( 9.48 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.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 Reviewed-by: Neil Armstrong --- arch/arm64/boot/dts/qcom/sm8150.dtsi | 48 ++++++++-------------------- 1 file changed, 14 insertions(+), 34 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi index a618218f7b68..4df9fef5c7b0 100644 --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -3391,47 +3392,26 @@ usb_2_hsphy: phy@88e3000 { resets = <&gcc GCC_QUSB2PHY_SEC_BCR>; }; - usb_1_qmpphy: phy@88e9000 { + usb_1_qmpphy: phy@88e8000 { compatible = "qcom,sm8150-qmp-usb3-dp-phy"; - reg = <0 0x088e9000 0 0x18c>, - <0 0x088e8000 0 0x38>, - <0 0x088ea000 0 0x40>; - status = "disabled"; - #address-cells = <2>; - #size-cells = <2>; - ranges; + reg = <0 0x088e8000 0 0x3000>; + clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>, - <&rpmhcc RPMH_CXO_CLK>, <&gcc GCC_USB3_PRIM_CLKREF_CLK>, - <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>; - clock-names = "aux", "ref_clk_src", "ref", "com_aux"; + <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, + <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; + clock-names = "aux", + "ref", + "com_aux", + "usb3_pipe"; resets = <&gcc GCC_USB3_DP_PHY_PRIM_BCR>, <&gcc GCC_USB3_PHY_PRIM_BCR>; reset-names = "phy", "common"; - usb_1_ssphy: phy@88e9200 { - reg = <0 0x088e9200 0 0x200>, - <0 0x088e9400 0 0x200>, - <0 0x088e9c00 0 0x218>, - <0 0x088e9600 0 0x200>, - <0 0x088e9800 0 0x200>, - <0 0x088e9a00 0 0x100>; - #clock-cells = <0>; - #phy-cells = <0>; - clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; - clock-names = "pipe0"; - clock-output-names = "usb3_phy_pipe_clk_src"; - }; + #clock-cells = <1>; + #phy-cells = <1>; - usb_1_dpphy: phy@88ea200 { - reg = <0 0x088ea200 0 0x200>, - <0 0x088ea400 0 0x200>, - <0 0x088eaa00 0 0x200>, - <0 0x088ea600 0 0x200>, - <0 0x088ea800 0 0x200>; - #clock-cells = <1>; - #phy-cells = <0>; - }; + status = "disabled"; }; usb_2_qmpphy: phy@88eb000 { @@ -3568,7 +3548,7 @@ usb_1_dwc3: usb@a600000 { iommus = <&apps_smmu 0x140 0>; snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; - phys = <&usb_1_hsphy>, <&usb_1_ssphy>; + phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; phy-names = "usb2-phy", "usb3-phy"; }; }; From patchwork Sun Mar 26 00:57:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13187935 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BEB0DC76196 for ; Sun, 26 Mar 2023 00:57:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lXlomPYRSTGBgjOfOTYhjOjVw4PnA7czGoIKD1s1VnY=; b=zUrDt0kcbCG9yB 6OxyRSkGcKML96/T7X55SNbyJQoBfEzLoCLdnQE4f/QgxGtDNGujYYwVpX9g4O5rMIe95XwLRMFXK 9IQqR1H/CIt3ulXTCCa3RNqNxWV9jQ/Fe2lwrw4/+KTWWyuzwmJnP/BDbfVzgOfP0NGJNEKKst/6r cEk17Pt9a2F2GmNFpc6Xo1xOh2kTegaOJiGBcXG61RokFEEObqtzfKsN96XwDCOeobVLpTmjN31yo CPleq4DGS39X7tpdwZ5QHeqf0NJElcw6D38ylJmVkmQUYr74/R+G3PV7zc+6IDPfKR23texZrioYz rpqtyGgWnnjHckuCMHyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pgEhh-007jvC-1A; Sun, 26 Mar 2023 00:57:49 +0000 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pgEhb-007jsZ-0n for linux-phy@lists.infradead.org; Sun, 26 Mar 2023 00:57:44 +0000 Received: by mail-lf1-x133.google.com with SMTP id t11so6963192lfr.1 for ; Sat, 25 Mar 2023 17:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679792260; 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=gMntj6TuHar/tK/rMvH+oM0+d4fFWN/I+xIIuk8XA7E=; b=mNcKLxzbKkeyfypKW0XK6C4kF4J9BkE6MLDnk1m+toQ7PUONstIk4Dn+MrjZMyEfMB hQ/7tktjXa/ikNDu1P/U0kAhUK7/uQ2QkI6YF2idy568mIInGh8QW8q6/RbFqEwg2hGV g2MiI5vLmKR6QXZNHsycu8MJmGQ9NmJYWcFOGdO069pRINl/4qN2Qzudu22KWBE2Qi98 HkBEOrf2XlMSdy8RHSZ3TzbtKLRCAdhKwvf21R7ns4u2gjp0bfdbtOZl0oWHP65IUzHI eyABq+z1dmLtwwnRV1QbeWJktJwD0M5cB+NpCZIfFK98u8+eskibQ2g3eU/SSFgFEzDM jw1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679792260; 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=gMntj6TuHar/tK/rMvH+oM0+d4fFWN/I+xIIuk8XA7E=; b=vPEHMrZwVpjg6fV8oGA/82ysLPwjnq8S43AG+sAzqtK8fmcA9ZhQgpwMSFUPGzogC4 bBdKbmADbj35eB0V4RMd8mrllBXq04Uxq+4W6Hwl4dyEi8bg/N+Ia8fhS8q/lM2xRqkJ ytHBBbQTXHnP8bT9GyLJGN7WHulfdzJQf7D7YrB6Zmj2Egq2rrJz/7ghJjl7IWqpQ3kM KocxT/GrgfOWSb7dLS4e1QkCmcL33BXlvy8cZUd6952whrQ2Ph/2B/PVyhOonDy+8G9K nwv0dzY9zum6yJTMBvUMZtareID4uNSrDHGUeWVKhmiyr/npPrpl4kv+19sHw8CwbDU0 pFIg== X-Gm-Message-State: AO0yUKVUsfIEOOVozRZpic6oYlppG0V4FM0iu2RiR+MVMEYuZ3UN/2Qh SJ2NQUthp1+JzNNx3/L4pAQtlg== X-Google-Smtp-Source: AK7set+tXss/KQPkKKa8TUVsWQSFAMl0QiO3RUK7Huie8FamxrGCoi/vvd6Fkma9W4J8XVOLlE2LOg== X-Received: by 2002:a05:6512:b83:b0:4da:ffa0:3f21 with SMTP id b3-20020a0565120b8300b004daffa03f21mr4710412lfv.14.1679792260725; Sat, 25 Mar 2023 17:57:40 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id n13-20020ac242cd000000b004e7fa99f3f4sm3996858lfl.265.2023.03.25.17.57.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Mar 2023 17:57:40 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold , devicetree@vger.kernel.org Subject: [PATCH v2 9/9] arm64: dts: qcom: sm8250: switch USB+DP QMP PHY to new style of bindings Date: Sun, 26 Mar 2023 03:57:33 +0300 Message-Id: <20230326005733.2166354-10-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> References: <20230326005733.2166354-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230325_175743_281944_27CA66F1 X-CRM114-Status: UNSURE ( 9.55 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.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 Reviewed-by: Neil Armstrong --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 49 ++++++++-------------------- 1 file changed, 14 insertions(+), 35 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 7b78761f2041..24b51fb373b4 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -3527,48 +3528,26 @@ usb_2_hsphy: phy@88e4000 { resets = <&gcc GCC_QUSB2PHY_SEC_BCR>; }; - usb_1_qmpphy: phy@88e9000 { + usb_1_qmpphy: phy@88e8000 { compatible = "qcom,sm8250-qmp-usb3-dp-phy"; - reg = <0 0x088e9000 0 0x200>, - <0 0x088e8000 0 0x40>, - <0 0x088ea000 0 0x200>; + reg = <0 0x088e8000 0 0x3000>; status = "disabled"; - #address-cells = <2>; - #size-cells = <2>; - ranges; clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>, <&rpmhcc RPMH_CXO_CLK>, - <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>; - clock-names = "aux", "ref_clk_src", "com_aux"; + <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, + <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; + clock-names = "aux", + "ref", + "com_aux", + "usb3_pipe"; resets = <&gcc GCC_USB3_DP_PHY_PRIM_BCR>, <&gcc GCC_USB3_PHY_PRIM_BCR>; reset-names = "phy", "common"; - usb_1_ssphy: usb3-phy@88e9200 { - reg = <0 0x088e9200 0 0x200>, - <0 0x088e9400 0 0x200>, - <0 0x088e9c00 0 0x400>, - <0 0x088e9600 0 0x200>, - <0 0x088e9800 0 0x200>, - <0 0x088e9a00 0 0x100>; - #clock-cells = <0>; - #phy-cells = <0>; - clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; - clock-names = "pipe0"; - clock-output-names = "usb3_phy_pipe_clk_src"; - }; - - dp_phy: dp-phy@88ea200 { - reg = <0 0x088ea200 0 0x200>, - <0 0x088ea400 0 0x200>, - <0 0x088eaa00 0 0x200>, - <0 0x088ea600 0 0x200>, - <0 0x088ea800 0 0x200>; - #phy-cells = <0>; - #clock-cells = <1>; - }; + #clock-cells = <1>; + #phy-cells = <1>; }; usb_2_qmpphy: phy@88eb000 { @@ -3713,7 +3692,7 @@ usb_1_dwc3: usb@a600000 { iommus = <&apps_smmu 0x0 0x0>; snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; - phys = <&usb_1_hsphy>, <&usb_1_ssphy>; + phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; phy-names = "usb2-phy", "usb3-phy"; }; }; @@ -4403,8 +4382,8 @@ dispcc: clock-controller@af00000 { <&dsi0_phy 1>, <&dsi1_phy 0>, <&dsi1_phy 1>, - <&dp_phy 0>, - <&dp_phy 1>; + <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>, + <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>; clock-names = "bi_tcxo", "dsi0_phy_pll_out_byteclk", "dsi0_phy_pll_out_dsiclk",