Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2972717pxb; Mon, 17 Jan 2022 09:14:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJyl63XTf5Zq4entFHx3tMuR6oSbIVyQXwgEXGIKTzahYGjhiq8bm+MGRqQW3SrF7ZOHS6w/ X-Received: by 2002:a17:90a:c698:: with SMTP id n24mr18056431pjt.188.1642439666035; Mon, 17 Jan 2022 09:14:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642439666; cv=none; d=google.com; s=arc-20160816; b=GJozUjLAFBh7CjFWc5uAJzaDJt0EpF8dlKz8PxJN1GbxfJr6CTdLoiErdNHwEJkgHa gCVgDm2+6o5VT8sz85yFOcN+KWxQhy3rn853G935IyUPyp2ZBswNudFG4lfq5UHRBfWn IkZYf1CgDy4d94Ou9RLLppUh0tNTZnz3x5fz3OFp9apRaljaAJ/cKTIl0bG1L00yVeEM xvpohvokDiTaDMYjJNNDkPe12ExzGeOpik/HxHGhncCTtLA1Xbi4ewb8G+clN2FZdGsI ibI+ViqEN3t170AOW3dqL4y7jFOUAXSgKBVboZEZe5scnAOGs0dlmcsEK+Z4vLp2VXYT ZOBg== 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=Skrhb4mNPOuzlwiOPL8gdU+DaTRamFYvl7UwdRNjBN0=; b=AM9CxXrggQvzTZvafyg4WaMxQV95aDaZgz7ZOq6H6BEeywXW1Gtly2LJC/Y+mBJQlh HNbDGafWgFwFhUbFHBlXG3HOB97ex+Zh3XUPWyr/s4f/pUpAH7/dqGJOphwmzhByN63B EyCkuN9IRg+wy/4tij5/HZ6EoiqUwUZZeVmekplv5PpPvJkewnKROWTuWw/F4RX8Tfyr RvQV8bo/s+DLoz8rD4iORqOJkc+ezHan3S1i+kQiqwfIwpzbNBJRg4ZJUXydPWHL7oW2 Q517FV65+wLrdmww2KzECLX4NN19POQ3V6EHoNSdHzJRXPPjyPQ8qnJ+rTANsQn2au7S C12w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t64si14759913pgd.512.2022.01.17.09.14.13; Mon, 17 Jan 2022 09:14:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236512AbiAQLwG (ORCPT + 99 others); Mon, 17 Jan 2022 06:52:06 -0500 Received: from gloria.sntech.de ([185.11.138.130]:59718 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233818AbiAQLwF (ORCPT ); Mon, 17 Jan 2022 06:52:05 -0500 Received: from ip5b412258.dynamic.kabel-deutschland.de ([91.65.34.88] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n9QYI-0007Kl-RZ; Mon, 17 Jan 2022 12:51:58 +0100 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Frank Wunderlich , linux-rockchip@lists.infradead.org, Johan Jonker Cc: Frank Wunderlich , Rob Herring , Peter Geis , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/3] dts64: rk3568: drop pclk_xpcs from gmac0 Date: Mon, 17 Jan 2022 12:51:57 +0100 Message-ID: <7013096.8LbZJEEdqx@diego> In-Reply-To: <8285bea7-559c-5834-78c7-5a062b7d8269@gmail.com> References: <20220116124911.65203-1-linux@fw-web.de> <20220116124911.65203-2-linux@fw-web.de> <8285bea7-559c-5834-78c7-5a062b7d8269@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Montag, 17. Januar 2022, 11:47:16 CET schrieb Johan Jonker: > Hi Frank, > > Despite that the DT is hosted in the kernel tree > DT and mainline kernel driver support are 2 separate things. > PCLK_XPCS might be in use elsewhere. I've just looked through the rk3568 TRM and I guess the pclk_xpcs belongs to the QSGMII_PCS block living at the 0xfda00000 address in the memory map. From glancing at the documentation that PCS thingy can sit in between the dmac and the phy to "optimize" things like power consumption. Looking at the PIPE_GRF_XPCS_CON0, we can see that bit1 decides which mac is to be selected to use the sgmii interface to that PCS block. As the QSGMII_PCS block should have its own driver due to also its own config registers (see above), the pclk_xpcs also will belong to it and should be modeled there. Also I guess boards currently in production will use regular gmii network interfaces? > Given the link below pclk_xpcs is only needed for rk3568. > Maybe gmac1 should have a PCLK_XPCS too, because one can select between > them. > > ethernet: stmicro: stmmac: Add SGMII/QSGMII support for RK3568 > https://github.com/rockchip-linux/kernel/commit/1fc7cbfe9e227c700c692f1de3137914b3ea6ca6 > > The original dtsi did have PCLK_XPCS in both nodes. > https://github.com/rockchip-linux/kernel/blob/develop-4.19/arch/arm64/boot/dts/rockchip/rk3568.dtsi#L2121 > https://github.com/rockchip-linux/kernel/blob/develop-4.19/arch/arm64/boot/dts/rockchip/rk3568.dtsi#L1492 > > Maybe fix the document or leave it as it is for now as long the driver > isn't updated and someone has tested it. > That's up to the DT maintainer. > > Johan > > === > > XPCS is also part of PD_PIPE. > See Rockchip RK3568 TRM Part1 V1.0-20210111.pdf page 475. > Please advise if the power-domain@RK3568_PD_PIPE does need a PCLK_XPCS > fix or is PCLK_PIPE enough in combination with a PHY driver? > > PD_PIPE: > > BIU_PIPE > USB3OTG > PCIE20 > PCIE30 > SATA > XPCS > > > power-domain@RK3568_PD_PIPE { > reg = ; > clocks = <&cru PCLK_PIPE>; > pm_qos = <&qos_pcie2x1>, > <&qos_pcie3x1>, > <&qos_pcie3x2>, > <&qos_sata0>, > <&qos_sata1>, > <&qos_sata2>, > <&qos_usb3_0>, > <&qos_usb3_1>; > #power-domain-cells = <0>; > }; > > > > On 1/16/22 1:49 PM, Frank Wunderlich wrote: > > From: Frank Wunderlich > > > > pclk_xpcs is not supported and breaks dtbs_check, so remove it > > > > following warnings occour, and many more > > > > rk3568-evb1-v10.dt.yaml: ethernet@fe2a0000: clocks: > > [[15, 386], [15, 389], [15, 389], [15, 184], [15, 180], [15, 181], > > [15, 389], [15, 185], [15, 172]] is too long > > From schema: Documentation/devicetree/bindings/net/snps,dwmac.yaml > > rk3568-evb1-v10.dt.yaml: ethernet@fe2a0000: clock-names: > > ['stmmaceth', 'mac_clk_rx', 'mac_clk_tx', 'clk_mac_refout', 'aclk_mac', > > 'pclk_mac', 'clk_mac_speed', 'ptp_ref', 'pclk_xpcs'] is too long > > From schema: Documentation/devicetree/bindings/net/snps,dwmac.yaml > > > > after removing the clock the other warnings are also gone. > > > > Co-developed-by: Peter Geis > > Signed-off-by: Peter Geis > > Signed-off-by: Frank Wunderlich > > --- > > arch/arm64/boot/dts/rockchip/rk3568.dtsi | 6 ++---- > > 1 file changed, 2 insertions(+), 4 deletions(-) > > > > diff --git a/arch/arm64/boot/dts/rockchip/rk3568.dtsi b/arch/arm64/boot/dts/rockchip/rk3568.dtsi > > index 2fd313a295f8..d91df1cde736 100644 > > --- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi > > +++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi > > @@ -32,13 +32,11 @@ gmac0: ethernet@fe2a0000 { > > clocks = <&cru SCLK_GMAC0>, <&cru SCLK_GMAC0_RX_TX>, > > <&cru SCLK_GMAC0_RX_TX>, <&cru CLK_MAC0_REFOUT>, > > <&cru ACLK_GMAC0>, <&cru PCLK_GMAC0>, > > - <&cru SCLK_GMAC0_RX_TX>, <&cru CLK_GMAC0_PTP_REF>, > > - <&cru PCLK_XPCS>; > > + <&cru SCLK_GMAC0_RX_TX>, <&cru CLK_GMAC0_PTP_REF>; > > clock-names = "stmmaceth", "mac_clk_rx", > > "mac_clk_tx", "clk_mac_refout", > > "aclk_mac", "pclk_mac", > > - "clk_mac_speed", "ptp_ref", > > - "pclk_xpcs"; > > + "clk_mac_speed", "ptp_ref"; > > resets = <&cru SRST_A_GMAC0>; > > reset-names = "stmmaceth"; > > rockchip,grf = <&grf>; > > >