Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1001305rwe; Thu, 25 Aug 2022 13:18:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR5inhyTrmgrf335eB0j4Z4amN0WNVAHbzzHo3SPnLkzH5y5HNkR3yl/YRVa7bTGTiSjF3Os X-Received: by 2002:a05:6a00:98a:b0:536:4469:12e6 with SMTP id u10-20020a056a00098a00b00536446912e6mr738341pfg.9.1661458732479; Thu, 25 Aug 2022 13:18:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661458732; cv=none; d=google.com; s=arc-20160816; b=y1vCU3YBAtu8jHkMbBYxDKq5a/OY11xYrndxsdtfW+6nXzWanzmaxO+3/+/QNf2izX p1O7ElFliT5exXIVmjFJ2CgFl8X6cwk7IgeJxFZOCW91ZDOzIlJT1TXIXrSUJ+toSsNM RwAahSxEabMuOKUQtT3XPZ0QTtSBFg6E7Tpctj9gfuhr5JZoO9TgrKb6/TfTnNMvld4j FF0MAF+kUjBf37GF81Iyud4FgF0y49CYn6lErarD2i3r5XJn1nbRXIPDAJ1dzJ9A/si8 clksTfww2thDUNjRNLhEnnd6oCVm/982ZrWcJDwK6OnnDGByNFeG12M/boxj2DviV3k4 F9Cg== 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=L/b/cPcl+9NUOHVI2yhANmAYa/JuoFlIJtQqX7xIpkf/+D0eXjzefumjyhbGEPqZPv w2aPVnwh50ZjglH6ru2y6t/1nyJA5q/4D9MM3Uj+OWe87y/ETU5jR8typ4QazpcaUxp3 bkY9Y+bbm8dHWwB0pz3Vtew3G/XiLryrY1xSwGui0/DAQSTqngkeVEgs0cumsNyhlNqX xEAFkXumkA3fw8Hm7CCD3Dywdyjs5Ew5VSvbeKJPi2D/rZWYxZj3BX6/gKKeaGZlXWz2 w/HwRLjcBSA28CXv6INNR4rVFxa81t/VncZhpsr4Hq8ouz6fjips+OjAVw7g9nUGjWXH Hq1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailerdienst.de header.s=20200217 header.b=C6enBtk2; 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 l190-20020a6391c7000000b0041bd351f349si33544pge.173.2022.08.25.13.18.23; Thu, 25 Aug 2022 13:18:52 -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=C6enBtk2; 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 S243681AbiHYTjQ (ORCPT + 99 others); Thu, 25 Aug 2022 15:39:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243425AbiHYTjE (ORCPT ); Thu, 25 Aug 2022 15:39:04 -0400 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CFE2BD4C8; Thu, 25 Aug 2022 12:38:59 -0700 (PDT) Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout4.routing.net (Postfix) with ESMTP id 437601006F8; Thu, 25 Aug 2022 19:38:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1661456337; 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=C6enBtk2jTTUsrXZCG5nIncxahKMN4gNp9fpZSTjSrj0n7hQc6OoF2KmnkzZlP3lY9EUo5 kS7o612ev8E3/PeBogtD0mlxcVh3BEFjquu9eaZmzmPSAm0CBunxIUfiOYr/Z+L0SjsXLa ITv1zH/FcBLIE4A4CI74ptgJ475CrM0= Received: from frank-G5.. (fttx-pool-80.245.75.185.bambit.de [80.245.75.185]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 4DADA40353; Thu, 25 Aug 2022 19:38:56 +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 , Yifeng Zhao , Johan Jonker , Peter Geis , Simon Xue , Liang Chen , 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 v5 1/5] dt-bindings: phy: rockchip: add PCIe v3 phy Date: Thu, 25 Aug 2022 21:38:32 +0200 Message-Id: <20220825193836.54262-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220825193836.54262-1-linux@fw-web.de> References: <20220825193836.54262-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mail-ID: 428698de-88f0-4e9f-9155-37f1cf7a80cf 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,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 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