From patchwork Fri Oct 21 11:09:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 6644 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp635637wrr; Fri, 21 Oct 2022 04:12:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5KvEhCl392kPRTis2gehA9sG5HTxecUUKqGQqyIH5F0ICu6TvFjIJruXSC71/pnzSb+eel X-Received: by 2002:a17:906:4bd3:b0:731:3bdf:b95c with SMTP id x19-20020a1709064bd300b007313bdfb95cmr15072296ejv.677.1666350776131; Fri, 21 Oct 2022 04:12:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666350776; cv=none; d=google.com; s=arc-20160816; b=ACFn9W2MQoU1pM/YCfVWnXLXHMzu/bmrFEIZik6xk+fFANZ23wrDcChXjseWmcpIXG X+Diovly7MDK7XD2P8LmghD2vPwfZ1u+SVf6STlu0p2kRojEXTjy6Ry9xGdluKxe2zwr YEIzVzZbU2Fhd5ov6VE8nVa1gEsmWgR68x8ELBAQ9vJCevB/4m9V0HNtpyBQ6x0WjUbu OqYbsojbo16dHTRDUVqHv9hDWjw13jONhajfkK8eepNCA8YU7Nm1D2hpjN5TyWAnqcjG BlUImdsf1bQiYVcO1qSbl/jV3Rjj8poDAq5+dBgd4cda/aDMu9O7keXV9o1rRkEdtdrV FIQA== 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=7obINjSQm0JNiLyQYhOupM7ARrAGUDW0/OUAPEHt4Ec=; b=t2t4mGvp9RqYgmzDIArZWfhUK6KuLee82jlYJQOCykPMWUbyqldKvsRUyS+Lkf/D5A y/MUXHvlx1c2bGrA9Vq3J6BvTnyXiDpg79OrCD2Hc2p8iwXRo2uE0NI7lUZLGRwXjkE1 ewBWeR1J2f3V5djFvn01ePixvoadIUGVlKsBQYasrUSK3ePPXZnjChS7+rn2oVobCQF1 dXTouKnttX8d0ihAowUfB84fsXHnPECHt+OHtw8dia4rqk1i0kfgwQLjhjEquEEfqGNZ r7RSOSWQf4MAYRgQ1nFXxDVq+0d1KCLAOr2koNSMrZSLM/5yhz+uImwzM6buraC87N11 0RTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="PDorZ/oT"; 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 qa43-20020a17090786ab00b007826e727aeasi20455667ejc.44.2022.10.21.04.12.30; Fri, 21 Oct 2022 04:12:56 -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="PDorZ/oT"; 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 S230230AbiJULLD (ORCPT + 99 others); Fri, 21 Oct 2022 07:11:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229756AbiJULKr (ORCPT ); Fri, 21 Oct 2022 07:10:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 309BF181963; Fri, 21 Oct 2022 04:10:45 -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 AF94961E65; Fri, 21 Oct 2022 11:10:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CFDC8C43166; Fri, 21 Oct 2022 11:10:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666350643; bh=mYIbphH61ygAshc0/AeTkkmyeoct/Novzft8mwHEBDU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PDorZ/oTEC1dfYP/FtxnkNK5XRZs+3N0PGBicmvzG35LBP2YwuM7sxk0sOXVJbwER ooS2JTcc9c9dNOw74UPEEfT9QFO/dBDyQdHL5/3vWgaOeRcukV0gNbj8CQ6ei6hPIH gI0qqJDCugL8OkkbNr0NldvtYCsyoI4yZ/W3QnM2U3Yh8TjMkRvVFsK3kST2iqjU6G 3hUL8cbZ5jmWF2Sa7sat7rPCaviuQ4mweBvx6NYk18fYA0UD2Ux3HlYZECIHp8/eid UoywIjCaokQVVAWQCpkDYpxEpvM5RttbN7Nxtd5T0feoVklAnZREXrEEApIV+pGYcm u10RFzJZhN+Ng== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1olpv5-0007Kt-5l; Fri, 21 Oct 2022 13:10:31 +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 , Krzysztof Kozlowski Subject: [PATCH v3 10/15] dt-bindings: phy: qcom,qmp-pcie: add sc8280xp bindings Date: Fri, 21 Oct 2022 13:09:42 +0200 Message-Id: <20221021110947.28103-11-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221021110947.28103-1-johan+linaro@kernel.org> References: <20221021110947.28103-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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,URIBL_BLOCKED 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?1747295431245996148?= X-GMAIL-MSGID: =?utf-8?q?1747295431245996148?= Add bindings for the PCIe QMP PHYs found on SC8280XP. The PCIe2 and PCIe3 controllers and PHYs on SC8280XP can be used in 4-lane mode or as separate controllers and PHYs in 2-lane mode (e.g. as PCIe2A and PCIe2B). The configuration for a specific system can be read from a TCSR register. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Johan Hovold --- .../phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml new file mode 100644 index 000000000000..80aa8d2507fb --- /dev/null +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml @@ -0,0 +1,165 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/qcom,sc8280xp-qmp-pcie-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm QMP PHY controller (PCIe, 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-gen3x1-pcie-phy + - qcom,sc8280xp-qmp-gen3x2-pcie-phy + - qcom,sc8280xp-qmp-gen3x4-pcie-phy + + reg: + minItems: 1 + maxItems: 2 + + clocks: + maxItems: 6 + + clock-names: + items: + - const: aux + - const: cfg_ahb + - const: ref + - const: rchng + - const: pipe + - const: pipediv2 + + power-domains: + maxItems: 1 + + resets: + maxItems: 1 + + reset-names: + items: + - const: phy + + vdda-phy-supply: true + + vdda-pll-supply: true + + qcom,4ln-config-sel: + description: PCIe 4-lane configuration + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: phandle of TCSR syscon + - description: offset of PCIe 4-lane configuration register + - description: offset of configuration bit for this PHY + + "#clock-cells": + const: 0 + + clock-output-names: + maxItems: 1 + + "#phy-cells": + const: 0 + +required: + - compatible + - reg + - clocks + - clock-names + - power-domains + - resets + - reset-names + - vdda-phy-supply + - vdda-pll-supply + - "#clock-cells" + - clock-output-names + - "#phy-cells" + +additionalProperties: false + +allOf: + - if: + properties: + compatible: + contains: + enum: + - qcom,sc8280xp-qmp-gen3x4-pcie-phy + then: + properties: + reg: + items: + - description: port a + - description: port b + required: + - qcom,4ln-config-sel + else: + properties: + reg: + maxItems: 1 + +examples: + - | + #include + + pcie2b_phy: phy@1c18000 { + compatible = "qcom,sc8280xp-qmp-gen3x2-pcie-phy"; + reg = <0x01c18000 0x2000>; + + clocks = <&gcc GCC_PCIE_2B_AUX_CLK>, + <&gcc GCC_PCIE_2B_CFG_AHB_CLK>, + <&gcc GCC_PCIE_2A2B_CLKREF_CLK>, + <&gcc GCC_PCIE2B_PHY_RCHNG_CLK>, + <&gcc GCC_PCIE_2B_PIPE_CLK>, + <&gcc GCC_PCIE_2B_PIPEDIV2_CLK>; + clock-names = "aux", "cfg_ahb", "ref", "rchng", + "pipe", "pipediv2"; + + power-domains = <&gcc PCIE_2B_GDSC>; + + resets = <&gcc GCC_PCIE_2B_PHY_BCR>; + reset-names = "phy"; + + vdda-phy-supply = <&vreg_l6d>; + vdda-pll-supply = <&vreg_l4d>; + + #clock-cells = <0>; + clock-output-names = "pcie_2b_pipe_clk"; + + #phy-cells = <0>; + }; + + pcie2a_phy: phy@1c24000 { + compatible = "qcom,sc8280xp-qmp-gen3x4-pcie-phy"; + reg = <0x01c24000 0x2000>, <0x01c26000 0x2000>; + + clocks = <&gcc GCC_PCIE_2A_AUX_CLK>, + <&gcc GCC_PCIE_2A_CFG_AHB_CLK>, + <&gcc GCC_PCIE_2A2B_CLKREF_CLK>, + <&gcc GCC_PCIE2A_PHY_RCHNG_CLK>, + <&gcc GCC_PCIE_2A_PIPE_CLK>, + <&gcc GCC_PCIE_2A_PIPEDIV2_CLK>; + clock-names = "aux", "cfg_ahb", "ref", "rchng", + "pipe", "pipediv2"; + + power-domains = <&gcc PCIE_2A_GDSC>; + + resets = <&gcc GCC_PCIE_2A_PHY_BCR>; + reset-names = "phy"; + + vdda-phy-supply = <&vreg_l6d>; + vdda-pll-supply = <&vreg_l4d>; + + qcom,4ln-config-sel = <&tcsr 0xa044 0>; + + #clock-cells = <0>; + clock-output-names = "pcie_2a_pipe_clk"; + + #phy-cells = <0>; + };