From patchwork Mon Oct 24 09:00:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 8267 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp336805wru; Mon, 24 Oct 2022 02:07:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6d7Y2qNsnDcbECCN3eQxRw0me94Afl+kp+zGn8bWwZQLWgVdxkLYBDZ3EspxgC0Zfl+pg9 X-Received: by 2002:a17:907:2c59:b0:7a9:1134:db02 with SMTP id hf25-20020a1709072c5900b007a91134db02mr2295849ejc.508.1666602457692; Mon, 24 Oct 2022 02:07:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666602457; cv=none; d=google.com; s=arc-20160816; b=NajY/ldnFMi0pWDJGhb43s+/m0pgBX7u9AOLIYzWMS9G1+0j9RMwYx5EBAA2buReNg t7+PeA3aJ6+ZaQAisg5/IHtijUNzn8a0nNUz4XUI1lg92iQcEhZx0x0mWINw/SeHpsuK sQZEP64Mn62UmBzTboqfJjeCcms42eKJ58rt7hZieF9aH3MjbGfLtuH4Wz4IC4XuyrCK kH6U7jR8xfUQzMkTYedJxWYlDtwx0KtARcb7hDBHG4wXOm119R5j3zhwchkg+jO9K0IC OPWjbq3LrpOHlDLWRWjYKLvT0KObbt4RCTzcBSnMW9yiAefxsgSzgzY5Qa0k+avEXtJw GIuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TAh8AEk7MMZCh9VY+Swj5cWI1NTIdCJJzvWso6jvH0M=; b=jEgtmQrQH67kxxR8q9HRiUOmGU5iW82FxiuNtaEuM12/1DIRiu7NcuwVF5Rgpfdn9+ PGnRSbSv4mnf5HMxK0Hev/KnmLqsqim20gyjyqzz2+2kc0Ej5y+/rc/ZWS3WQCrS7H95 ZCaVOkt5aCcVj84NHexJR0I3zNx4DXFMRkbTx8gnvCUanj2w//2xeFkp9JHskP+cE3jI B32xK1m5nDDoV+vkTUgSWKd706lElyF7sx7iuihkCvjYQGPj0wl/7RlXAnDR12Yp/AIg ocA1BIcxJYwVjXRxDY23aRqMNWApzi+mb5LeX2O8JaWbCogT3aDmiu99lKKtIxwrXE24 /AVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JEzrhd5+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c26-20020a056402159a00b0046189831142si5196637edv.7.2022.10.24.02.07.13; Mon, 24 Oct 2022 02:07:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JEzrhd5+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230472AbiJXJCV (ORCPT + 99 others); Mon, 24 Oct 2022 05:02:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230012AbiJXJBl (ORCPT ); Mon, 24 Oct 2022 05:01:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5E064E19D; Mon, 24 Oct 2022 02:01:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 08C2C61092; Mon, 24 Oct 2022 09:01:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1145EC4FEBE; Mon, 24 Oct 2022 09:01:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666602098; bh=+WkGHWoLZtDbhsbGRmzXKHjD/rB4ftzUCrvrsjeND8Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JEzrhd5+5POIVX4OipjaIv2tUjNV+1BnXX31ZbFe+6VVJa0QvKcDsPkGPMHXTt9kG B9DmbrTIowiNObhzhPI1E2RcuXzYyzoa1j+hJ4GBDj0i3NFwgKi0qsmPgyvFOR5dyB l94LVPpYUu0WFlSkLMjrKKSClrG9YWAfgDAB5RX9zTt7YDxFU1o06bwY1Z+vPW+SjX Q5K4tJ/Wwcz/+6QYp0qKym6oKBFNEKy/vXEnOBc+hzIAuvbARCVhFV2OXIvbXuW/nh fYx+XwYf+aLevQU/fKpn+PR++WsVuvh4CNJYcZj/67RhAdUTk/snWmfE39kfWiX8bY 50kIj+CvzTkaQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1omtKj-00056g-Mj; Mon, 24 Oct 2022 11:01:21 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 08/10] dt-bindings: phy: qcom,qmp-ufs: fix sc8280xp binding Date: Mon, 24 Oct 2022 11:00:39 +0200 Message-Id: <20221024090041.19574-9-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024090041.19574-1-johan+linaro@kernel.org> References: <20221024090041.19574-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747559338706311651?= X-GMAIL-MSGID: =?utf-8?q?1747559338706311651?= The current QMP UFS PHY bindings are based on the original MSM8996 PCIe PHY binding which provided multiple PHYs per IP block and these in turn were described by child nodes. The QMP UFS PHY block only provide a single PHY and the remnant child node does not really reflect the hardware. The original MSM8996 binding also ended up describing the individual register blocks as belonging to either the wrapper node or the PHY child nodes. This is an unnecessary level of detail which has lead to problems when later IP blocks using different register layouts have been forced to fit the original mould rather than updating the binding. The bindings are arguable also incomplete as they only the describe register blocks used by the current Linux drivers. Add a new binding for the UFS QMP PHYs found on SC8280XP which further bindings can be based on. Note that the current binding is simply removed instead of being deprecated as it was only recently merged and support for SC8280XP is still under development. Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski --- .../phy/qcom,msm8996-qmp-ufs-phy.yaml | 10 +-- .../phy/qcom,sc8280xp-qmp-ufs-phy.yaml | 83 +++++++++++++++++++ 2 files changed, 87 insertions(+), 6 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-ufs-phy.yaml index 438f9606414a..be41acbd3b6c 100644 --- a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-ufs-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-ufs-phy.yaml @@ -22,7 +22,6 @@ properties: - qcom,msm8996-qmp-ufs-phy - qcom,msm8998-qmp-ufs-phy - qcom,sc8180x-qmp-ufs-phy - - qcom,sc8280xp-qmp-ufs-phy - qcom,sdm845-qmp-ufs-phy - qcom,sm6115-qmp-ufs-phy - qcom,sm6350-qmp-ufs-phy @@ -122,7 +121,6 @@ allOf: enum: - qcom,msm8998-qmp-ufs-phy - qcom,sc8180x-qmp-ufs-phy - - qcom,sc8280xp-qmp-ufs-phy - qcom,sdm845-qmp-ufs-phy - qcom,sm6115-qmp-ufs-phy - qcom,sm6350-qmp-ufs-phy @@ -159,7 +157,6 @@ allOf: contains: enum: - qcom,msm8998-qmp-ufs-phy - - qcom,sc8280xp-qmp-ufs-phy - qcom,sdm845-qmp-ufs-phy - qcom,sm6350-qmp-ufs-phy - qcom,sm8150-qmp-ufs-phy @@ -214,11 +211,12 @@ allOf: examples: - | - #include + #include #include + phy-wrapper@1d87000 { - compatible = "qcom,sc8280xp-qmp-ufs-phy"; - reg = <0x01d87000 0xe10>; + compatible = "qcom,sm8250-qmp-ufs-phy"; + reg = <0x01d87000 0x1c0>; #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x01d87000 0x1000>; diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml new file mode 100644 index 000000000000..dde86a19f792 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-ufs-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm QMP PHY controller (UFS, SC8280XP) + +maintainers: + - Vinod Koul + +description: + The QMP PHY controller supports physical layer functionality for a number of + controllers on Qualcomm chipsets, such as, PCIe, UFS, and USB. + +properties: + compatible: + enum: + - qcom,sc8280xp-qmp-ufs-phy + + reg: + maxItems: 1 + + clocks: + maxItems: 2 + + clock-names: + items: + - const: ref + - const: ref_aux + + power-domains: + maxItems: 1 + + resets: + maxItems: 1 + + reset-names: + items: + - const: ufsphy + + vdda-phy-supply: true + + vdda-pll-supply: true + + "#phy-cells": + const: 0 + +required: + - compatible + - reg + - clocks + - clock-names + - power-domains + - resets + - reset-names + - vdda-phy-supply + - vdda-pll-supply + - "#phy-cells" + +additionalProperties: false + +examples: + - | + #include + + ufs_mem_phy: phy@1d87000 { + compatible = "qcom,sc8280xp-qmp-ufs-phy"; + reg = <0x01d87000 0x1000>; + + clocks = <&gcc GCC_UFS_REF_CLKREF_CLK>, <&gcc GCC_UFS_PHY_PHY_AUX_CLK>; + clock-names = "ref", "ref_aux"; + + power-domains = <&gcc UFS_PHY_GDSC>; + + resets = <&ufs_mem_hc 0>; + reset-names = "ufsphy"; + + vdda-phy-supply = <&vreg_l6b>; + vdda-pll-supply = <&vreg_l3b>; + + #phy-cells = <0>; + };