Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp569535rwb; Tue, 29 Nov 2022 02:27:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf5J6YcB4CG4OQAgomJlgpduyAFBCFesCTrwBbjx6ZkNdWK3xtWsCDTk5v1RZAPDfCbrPaU9 X-Received: by 2002:a63:694:0:b0:477:f9fa:9403 with SMTP id 142-20020a630694000000b00477f9fa9403mr13644242pgg.320.1669717666582; Tue, 29 Nov 2022 02:27:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669717666; cv=none; d=google.com; s=arc-20160816; b=qWQhJ0VGfcuBQ1vCC9/LnZAerTbRWWzkCkIlKsfR/Tkffx0oFulPsgxywOETtz2aV/ YjjLXssxegfxC2Tog5rlJYNXqgi1Eut4BduzmZ1vRhaX4Pc8ctETc17l6ZkXqjKrHv5p GpWO4/g/XzXkXwZiqt7y3w+1hI8rVpN3HwsQVRpAAmDPQpAuXxg+qSMGbPOWStV/lfyE 8YVT2W5EYAWnlubwU5d7W1kmSFRVsP7Jqguhg3w49zlx1lb/0ZhBhsd/2aCDUvWRUw/5 awbXN1z4wcoZkKX+3LEL78+d263Dv1AcWmAiG6DAzBMQ/qjELmnjqbWxreNwA6SrnXi3 LbJg== 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; bh=8VSxaUIEEnY0a7ptSzsu9bSOhkQ9wYOww3CcfxgnzPo=; b=BNDMAOf4b8VOOtERqscOWR19f7q6n79edHe8BS8j3GcVuJ3eA2QmMSQx5ltGYRGKD5 9GU2z23zeXzau40VBgDAyQMAAHUhrs4qAxTLFLLwbwwDpqJnK8SjcgcrFK3em/UhB/0+ KmFPqTAKDsmdZ8no/K54PZjucPgjLum7qht0Nbql48mAzZCLgXBW6sUUjgQPogJzk2BP pW68XKfo4vn/DjvTpBMUc1Bs5C3XrQYQI7PzLQBpNzUUxFq4s7lDEIjC0BXVxaKVECaG EM7+SU3s4HdaMlJXswGURvgbEWlR4O5jphhCvvtFGp+qH66w+WTngW7qw/kleycdYNct K1ow== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b36-20020a630c24000000b0046154b597cfsi14524964pgl.565.2022.11.29.02.27.34; Tue, 29 Nov 2022 02:27:46 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=sntech.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232152AbiK2KWx convert rfc822-to-8bit (ORCPT + 83 others); Tue, 29 Nov 2022 05:22:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229989AbiK2KWp (ORCPT ); Tue, 29 Nov 2022 05:22:45 -0500 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20F2325FB; Tue, 29 Nov 2022 02:22:40 -0800 (PST) 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 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS, T_SPF_HELO_TEMPERROR 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 Am Dienstag, 29. November 2022, 10:59:34 CET schrieb Krzysztof Kozlowski: > On 29/11/2022 10:56, Heiko St?bner wrote: > > Am Dienstag, 29. November 2022, 09:49:08 CET schrieb Krzysztof Kozlowski: > >> 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.yaml 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 register file. > >>> $ref: /schemas/types.yaml#/definitions/phandle > >>> > >>> + rockchip,xpcs: > >>> + description: > >>> + The phandle of the syscon node for the peripheral general register 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 handling. Heiko