From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3173FC4332F for ; Tue, 29 Nov 2022 10:23:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OJFK6rzm84hzh13EQRQDv1/FNDWPU+ct78qHLHSQooI=; b=1oeZzS0XreO4v/ EMJzRoJ/CU/iF9MbQ6on8YLtnml+GEc8pwDl4r7O6pieEq/XEE+q+gDMlRuxXqcqkXtRoM9aCDajU HGxYu2bhacH2OQ2Ax3cBmdChxLwg41HyUXveP9GNp9WOhqEddmLmCRU7Bz0rsO9fkRRq45SB8X/LN fneOdFEO2feEAPTQxmfeOCBvi9DC46Ia2tPFiywvo92WPZbFiyUR/UilCMmdulyL/9RVel6aFH7If 1PEq+wIVXITFhoIncu5/rvpHI/1OamvIkIFvKQlK2MbkH9+gXSaO09M0IIqciPi422xcK7N5ms34g LujY4SiIwmi/oi2PJKHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozxlH-008C7t-3T; Tue, 29 Nov 2022 10:22:47 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozxlE-008C5x-CX for linux-arm-kernel@lists.infradead.org; Tue, 29 Nov 2022 10:22:46 +0000 Received: from ip5b412258.dynamic.kabel-deutschland.de ([91.65.34.88] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ozxkz-0002zv-3A; Tue, 29 Nov 2022 11:22:29 +0100 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Chukun Pan , "David S . Miller" , Krzysztof Kozlowski Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Eric Dumazet , Jakub Kicinski , Paolo Abeni , David Wu , Rob Herring , Krzysztof Kozlowski , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/2] dt-bindings: net: rockchip-dwmac: add rk3568 xpcs compatible Date: Tue, 29 Nov 2022 11:22:28 +0100 Message-ID: <3689593.Mh6RI2rZIc@diego> In-Reply-To: <8eb78282-08c2-24bf-4049-5c610dd781fc@linaro.org> References: <20221129072714.22880-1-amadeus@jmu.edu.cn> <4692527.5fSG56mABF@diego> <8eb78282-08c2-24bf-4049-5c610dd781fc@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221129_022244_449751_8048DDFA X-CRM114-Status: GOOD ( 22.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Am Dienstag, 29. November 2022, 10:59:34 CET schrieb Krzysztof Kozlowski: > On 29/11/2022 10:56, Heiko St=FCbner wrote: > > Am Dienstag, 29. November 2022, 09:49:08 CET schrieb Krzysztof Kozlowsk= i: > >> On 29/11/2022 08:27, Chukun Pan wrote: > >>> The gmac of RK3568 supports RGMII/SGMII/QSGMII interface. > >>> This patch adds a compatible string for the required clock. > >>> > >>> Signed-off-by: Chukun Pan > >>> --- > >>> Documentation/devicetree/bindings/net/rockchip-dwmac.yaml | 6 ++++++ > >>> 1 file changed, 6 insertions(+) > >>> > >>> diff --git a/Documentation/devicetree/bindings/net/rockchip-dwmac.yam= l b/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml > >>> index 42fb72b6909d..36b1e82212e7 100644 > >>> --- a/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml > >>> +++ b/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml > >>> @@ -68,6 +68,7 @@ properties: > >>> - mac_clk_rx > >>> - aclk_mac > >>> - pclk_mac > >>> + - pclk_xpcs > >>> - clk_mac_ref > >>> - clk_mac_refout > >>> - clk_mac_speed > >>> @@ -90,6 +91,11 @@ properties: > >>> The phandle of the syscon node for the peripheral general regi= ster file. > >>> $ref: /schemas/types.yaml#/definitions/phandle > >>> = > >>> + rockchip,xpcs: > >>> + description: > >>> + The phandle of the syscon node for the peripheral general regi= ster file. > >> > >> You used the same description as above, so no, you cannot have two > >> properties which are the same. syscons for GRF are called > >> "rockchip,grf", aren't they? > > = > > Not necessarily :-) . > = > OK, then description should have something like "...GRF for foo bar". Actually looking deeper in the TRM, having these registers "just" written to from the dwmac-glue-layer feels quite a bit like a hack. The "pcs" thingy referenced in patch2 actually looks more like a real device with its own section in the TRM and own iomem area. This pcs device then itself has some more settings stored in said pipe-grf. So this looks more like it wants to be an actual phy-driver. @Chukun Pan: plase take a look at something like https://elixir.bootlin.com/linux/latest/source/drivers/phy/mscc/phy-ocelot-= serdes.c#L398 on how phy-drivers for ethernets could look like. Aquiring such a phy from the dwmac-glue and calling phy_set_mode after moving the xpcs_setup to a phy-driver shouldn't be too hard I think. The qsgmii/sgmii_pcs list of registers in the TRM alone already takes up 4 A4 pages, so while using the PCS as syscon and just writing some values into it might work now, this doesn't feel at all like a future-save handlin= g. Heiko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel