Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1900164iog; Sun, 19 Jun 2022 01:42:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t0PpGKzDHvTlg/ZZZ0iqCZVAVa8IREbQJiqx87Ru31zM+kJc4sNswZSuOgOOF8c/yVk2Zl X-Received: by 2002:a17:902:d4cf:b0:167:735a:e7a1 with SMTP id o15-20020a170902d4cf00b00167735ae7a1mr17745921plg.161.1655628130446; Sun, 19 Jun 2022 01:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655628130; cv=none; d=google.com; s=arc-20160816; b=NhXRg7lJQZIRaCKKXqrnma0JXYg14/JPBaQFQsfMXRulkg2OBXxuRFS9OhJEfVGSmL RmixPPLkWva3oKMH//BqYUPAMEW/tNra67uDygb1Zpfuyzec2rLtTNG1n7MNwuyZv62t SOrMwf2wDhYkzIVoTBkLxqOAYQU2y2ILC7zMc+LDT2EfyZODsAOtwhkvlo4Vpb9YSVLp ds050Xx+llsPiDsSx+5D+zskffEKvLreZhQaLTslL0wRZ8EHn8X3pn18O5llVrutkN/K Vmo7GM0aYxXkMkicB7gBLSdMlM8xvfzAT9vkFbSx+f+kfniE6IM8eX+xw8XJAupsUE+l HZzA== 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=bITi9lO2I76P8aD+0Omkl/P9r5wyPjywtsDJ5kt5xZA=; b=ZEsjClFtenrlP3lkZUH3ZggnYhkE9wZaiu8xRU1b2eZeebTByRL5udTuNn9dTV/CBX 04HMVT652Xt947+EEO8N354/qnxHUI3gCyOGzZyNnAx3NOqWZ7raWZ+So2QTiwQyrrx0 jT2JhywEEy98P/Nbxy7NFTTiDN25qxVF7qyDx4VPZwjsII9sGLqLIGlvf+lIAzH5Mh9J FhGTfQt6QvRAuugi7fUFM5nnuZk+L8FmxP2S36nq3I0iRESxQyx6oLIkrDjMXnrq06pS PnusBoEzevCH9VVMu2aojEchiurTtMJGI3j9ytADRpk0U2fakugPhCEeUgM/5VL2Ekqy Umnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=PhGLOabj; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n9-20020a170902d2c900b001570e00e0cesi11851816plc.536.2022.06.19.01.41.48; Sun, 19 Jun 2022 01:42:10 -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=@mailerdienst.de header.s=20200217 header.b=PhGLOabj; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232927AbiFSI0W (ORCPT + 99 others); Sun, 19 Jun 2022 04:26:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231989AbiFSI0V (ORCPT ); Sun, 19 Jun 2022 04:26:21 -0400 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 418D1EE0C; Sun, 19 Jun 2022 01:26:19 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout2.routing.net (Postfix) with ESMTP id 184715FBE6; Sun, 19 Jun 2022 08:26:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1655627177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bITi9lO2I76P8aD+0Omkl/P9r5wyPjywtsDJ5kt5xZA=; b=PhGLOabjV0ze4eCfyS/knC6pMaqd6iTu8WfKXiUaMYTG/Jhoz4W7X+PebI/oCobwE8QCvs ljdflOPQQEXFAezzpSxlFgqPioCS5mAQtzvzFc9cvCBmEy211DJ7ku5PKGKn4Y8oSyKKYz ksIyNjrXafUHG7ONpszOfSWsHZpRF1Y= Received: from frank-G5.. (fttx-pool-157.180.227.195.bambit.de [157.180.227.195]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 09E61100622; Sun, 19 Jun 2022 08:26:15 +0000 (UTC) From: Frank Wunderlich To: linux-rockchip@lists.infradead.org Cc: Frank Wunderlich , Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Philipp Zabel , Johan Jonker , Yifeng Zhao , Peter Geis , Michael Riesch , Liang Chen , Simon Xue , Shawn Lin , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski Subject: [PATCH v4 1/5] dt-bindings: phy: rockchip: add PCIe v3 phy Date: Sun, 19 Jun 2022 10:26:01 +0200 Message-Id: <20220619082605.7935-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220619082605.7935-1-linux@fw-web.de> References: <20220619082605.7935-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mail-ID: 8b016db9-c276-4929-9a3e-e234bd04d11c X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 From: Frank Wunderlich Add a new binding file for Rockchip PCIe v3 phy driver. Signed-off-by: Frank Wunderlich Reviewed-by: Krzysztof Kozlowski --- v4: - add reviewed-by - remove minitems for clock-names as i have static list to fix error - fix reg error by using 32-bit adressing in binding example - change lane-map to u32 data-lanes - tried to move data-lanes to phy-provider https://github.com/frank-w/dt-schema/blob/main/dtschema/schemas/phy/phy-provider.yaml#L17 cloned and installed via pip install -e verified with pip show, but phy-privider seems not to be applied v3: - drop quotes - drop rk3588 - make clockcount fixed to 3 - full path for binding header file - drop phy-mode and its header and add lane-map v2: dt-bindings: rename yaml for PCIe v3 rockchip-pcie3-phy.yaml => rockchip,pcie3-phy.yaml changes in pcie3 phy yaml - change clock names to ordered const list - extend pcie30-phymode description - add phy-cells to required properties - drop unevaluatedProperties - example with 1 clock each line - use default property instead of text describing it - update license --- .../bindings/phy/rockchip,pcie3-phy.yaml | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/rockchip,pcie3-phy.yaml diff --git a/Documentation/devicetree/bindings/phy/rockchip,pcie3-phy.yaml b/Documentation/devicetree/bindings/phy/rockchip,pcie3-phy.yaml new file mode 100644 index 000000000000..9f2d8d2cc7a5 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/rockchip,pcie3-phy.yaml @@ -0,0 +1,80 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/rockchip,pcie3-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip PCIe v3 phy + +maintainers: + - Heiko Stuebner + +properties: + compatible: + enum: + - rockchip,rk3568-pcie3-phy + + reg: + maxItems: 1 + + clocks: + minItems: 3 + maxItems: 3 + + clock-names: + items: + - const: refclk_m + - const: refclk_n + - const: pclk + + data-lanes: + description: which lanes (by position) should be mapped to which + controller (value). 0 means lane disabled, higher value means used. + (controller-number +1 ) + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 2 + maxItems: 16 + items: + minimum: 0 + maximum: 16 + + "#phy-cells": + const: 0 + + resets: + maxItems: 1 + + reset-names: + const: phy + + rockchip,phy-grf: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle to the syscon managing the phy "general register files" + + rockchip,pipe-grf: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle to the syscon managing the pipe "general register files" + +required: + - compatible + - reg + - rockchip,phy-grf + - "#phy-cells" + +additionalProperties: false + +examples: + - | + #include + pcie30phy: phy@fe8c0000 { + compatible = "rockchip,rk3568-pcie3-phy"; + reg = <0xfe8c0000 0x20000>; + #phy-cells = <0>; + clocks = <&pmucru CLK_PCIE30PHY_REF_M>, + <&pmucru CLK_PCIE30PHY_REF_N>, + <&cru PCLK_PCIE30PHY>; + clock-names = "refclk_m", "refclk_n", "pclk"; + resets = <&cru SRST_PCIE30PHY>; + reset-names = "phy"; + rockchip,phy-grf = <&pcie30_phy_grf>; + }; -- 2.34.1