Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp764970pxb; Fri, 22 Apr 2022 10:39:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylnHohNdg6ICjtftqRgQcGe1MWEAqVjN5RwYdsQIeodMR+oBuyA0XU+13K/bRDsuLhhCgx X-Received: by 2002:a17:902:b213:b0:156:5a00:325f with SMTP id t19-20020a170902b21300b001565a00325fmr5607751plr.127.1650649190569; Fri, 22 Apr 2022 10:39:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650649190; cv=none; d=google.com; s=arc-20160816; b=JCMuGOZP8fkPqY/g+xdz/Lct7gR41hu59PUpsL90/VcyeFQCeQvfGeYwljFEvF/dhO 7TejsCd6YWaZPr6Wyp0zwPLsb+a4ZNmdIAqBNh+txQmD0+Dz6+gRHzgO+yKfJPZ2jkKz C3F9sE62bsQxnj1pr9SSClkP9n/0LtQQgkvTtjt87+xlN5mPdnlMJ5iOk2MPUW31CDaE X/NeyD0LQibzlcKHtT4GvJVORW2ZrYiVCfG4GRdOiZmw4IKMT+Etz2BgdN0K+9OSVNFu cQmXkSzQlqyrpiHO/w1BNDuUFME8dHwv6Fc9AU8/MYEehJZPTqJK3UyaCGy/HasJXRd5 04Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:references:in-reply-to :sensitivity:importance:date:subject:cc:to:from:message-id :mime-version:dkim-signature; bh=NTVsIT07QyvgSvYng2/CNvCHMpxfIi7n0haAAhQ8FYU=; b=iok3csVV2J1kyysVEDJJhRWI/3TJtcJLSt2mrMhznLeyFX1Wa46/rMRcxN8I47WoLL nEFaqfxx4doMfFa9sJYDOqM2eV2mnoggIhcKg36qg6x7ET586Es8PcqKt7H7PSMC9Z5n lYbqoFuMpaZnZYXfaqWgCXKDVGMAI+Cw/WeQloBWSN7YYe0y2s8/fk0T0k577knNezCX 5uBQe1BdwzVPJlT7ASUEUU7/V8UCmi0t3Q+QdrEHWvQDy0K/eIVH55Mw1XPlRjDW5Jjs uphSRn7/upwKchSD7PalUiZ3dALKGfFXHBebalcSrzQ1Fb16TGv4k7vNaJvEsaHCoCCo u0yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=TnDZzT+t; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id a11-20020a63e84b000000b003aa1ad63715si9354259pgk.667.2022.04.22.10.39.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 10:39:50 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=TnDZzT+t; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 59A7BF32A0; Fri, 22 Apr 2022 10:29:07 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356085AbiDSRws (ORCPT + 99 others); Tue, 19 Apr 2022 13:52:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356089AbiDSRwa (ORCPT ); Tue, 19 Apr 2022 13:52:30 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48E50D9; Tue, 19 Apr 2022 10:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1650390552; bh=MDs+/hTTaszs+7phQ7fP55iuGTCGnxSxNB+AmfhvHuI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=TnDZzT+t51BtIZ3ttWb8yCAiQ+bRXXd/u6G0viY+8w6Ni6c7lHcocNUuBZBnS4674 6WhQO0gk3GYZKK1EeXd9DNGPdu8vTbAeDU/gR+vtsnJYvfjdA+H3E5RicFlC3T2tAS /Cabuc5TQs7rUXlCugCortddBqGUNVZKFqbOjqCc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [217.61.157.75] ([217.61.157.75]) by web-mail.gmx.net (3c-app-gmx-bap70.server.lan [172.19.172.170]) (via HTTP); Tue, 19 Apr 2022 19:49:12 +0200 MIME-Version: 1.0 Message-ID: From: Frank Wunderlich To: Krzysztof Kozlowski Cc: Frank Wunderlich , linux-rockchip@lists.infradead.org, Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , Philipp Zabel , Johan Jonker , Peter Geis , Michael Riesch , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Aw: Re: [RFC/RFT 1/6] dt-bindings: phy: rockchip: add pcie3 phy Content-Type: text/plain; charset=UTF-8 Date: Tue, 19 Apr 2022 19:49:12 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <38e60bb2-123b-09cf-d6ef-3a07c6984108@linaro.org> References: <20220416135458.104048-1-linux@fw-web.de> <20220416135458.104048-2-linux@fw-web.de> <38e60bb2-123b-09cf-d6ef-3a07c6984108@linaro.org> X-UI-Message-Type: mail X-Priority: 3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DlzyEpH5zjL9xHGNVd2cJPFm53xFHgXE/geLu A5GmJR47U9xPnXwLPTlmwG7rjN79csWKr502balpYnJSX6BGb94rekgHxR9cQRdj5h2VI3ahs kd7tLPH Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 > Gesendet: Montag, 18. April 2022 um 17:52 Uhr > Von: "Krzysztof Kozlowski" > > 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..58a8ce175f13 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/phy/rockchip-pcie3-phy.yaml > > Filename: vendor,hardware > so for example "rockchip,pcie3-phy" although Rob proposed recently for > other bindings using compatible as a base: > https://lore.kernel.org/linux-devicetree/YlhkwvGdcf4ozTzG@robh.at.kernel= .org/ ok, i rename > > @@ -0,0 +1,77 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > +%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 > > + - rockchip,rk3588-pcie3-phy > > + > > + reg: > > + maxItems: 2 > > + > > + clocks: > > + minItems: 1 > > + maxItems: 3 > > + > > + clock-names: > > + contains: > > + anyOf: > > + - enum: [ refclk_m, refclk_n, pclk ] > > The list should be strictly ordered (defined), so: > items: > - const: ... > - const: ... > - const: ... > minItems: 1 > > However the question is - why the clocks have different amount? Is it > per different SoC implementation? i only know the rk3568, which needs the clocks defined here, don't know ab= out rk3588 yet. in rk3568 TPM i have the pcie-part seems missing (at least the specific re= gister definition), so i had used the driver as i got it from the downstre= am kernel. not yet looked if i find a rk3588 TPM and if this part is there as i canno= t test it (one of the reasons this is a rfc/rft). > > + > > + "#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 regi= ster files" > > + > > + rockchip,pipe-grf: > > + $ref: /schemas/types.yaml#/definitions/phandle > > + description: phandle to the syscon managing the pipe "general reg= ister files" > > + > > + rockchip,pcie30-phymode: > > + $ref: '/schemas/types.yaml#/definitions/uint32' > > + description: | > > + use PHY_MODE_PCIE_AGGREGATION if not defined > > I don't understand the description. Do you mean here a case when the > variable is missing? yes, if the property is not set, then value is PHY_MODE_PCIE_AGGREGATION = =3D 4 > > + minimum: 0x0 > > + maximum: 0x4 > > Please explain these values. Register values should not be part of > bindings, but instead some logical behavior of hardware or its logic. it's a bitmask, so maybe description: | bit0: bifurcation for port 0 bit1: bifurcation for port 1 bit2: aggregation use PHY_MODE_PCIE_AGGREGATION (4) as default > > + > > + > > Just one blank line. > > > +required: > > + - compatible > > + - reg > > + - rockchip,phy-grf > > phy-cells as well > > > + > > +additionalProperties: false > > + > > +unevaluatedProperties: false > > Just one please, additionalProperties. ok > > + > > +examples: > > + - | > > + #include > > + pcie30phy: phy@fe8c0000 { > > + compatible =3D "rockchip,rk3568-pcie3-phy"; > > + reg =3D <0x0 0xfe8c0000 0x0 0x20000>; > > + #phy-cells =3D <0>; > > + clocks =3D <&pmucru CLK_PCIE30PHY_REF_M>, <&pmucru CLK_PCIE30PH= Y_REF_N>, > > + <&cru PCLK_PCIE30PHY>; > > Align the entry with opening '<'. Usually the most readable is one clock > per line. ok > > + clock-names =3D "refclk_m", "refclk_n", "pclk"; > > + resets =3D <&cru SRST_PCIE30PHY>; > > + reset-names =3D "phy"; > > + rockchip,phy-grf =3D <&pcie30_phy_grf>; > > + }; regards Frank