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 X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53CC6C433B4 for ; Tue, 11 May 2021 12:50:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 13E6161919 for ; Tue, 11 May 2021 12:50:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231688AbhEKMvH (ORCPT ); Tue, 11 May 2021 08:51:07 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:35070 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230494AbhEKMvF (ORCPT ); Tue, 11 May 2021 08:51:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Nk2QATE/YAGmpaluCxZLB2CwY3T6g4W15h0LkcfarMQ=; b=rKrr/2Vg6EBMa0RhcSkP28/Wwv VI7/lbvFjIxMvbqbCwz+kiiBFJy0AmyrMsywKjBOA2CKKhFeknZZFYkIVTRF92W/LVVCwDOuKfy3s Egzw8mdCJNOuZIssw5sdFozzSBBdvnYw9q5Xt3RwMW0o+ISyRzOMpRc6Bgua1aMACXVg=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1lgRpk-003kBS-5O; Tue, 11 May 2021 14:49:56 +0200 Date: Tue, 11 May 2021 14:49:56 +0200 From: Andrew Lunn To: Oleksij Rempel Cc: Shawn Guo , Sascha Hauer , Florian Fainelli , Heiner Kallweit , kernel@pengutronix.de, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, Fabio Estevam , David Jander , Russell King , Philippe Schenker Subject: Re: [PATCH v3 1/7] ARM i.MX6q: remove PHY fixup for KSZ9031 Message-ID: References: <20210511043735.30557-1-o.rempel@pengutronix.de> <20210511043735.30557-2-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210511043735.30557-2-o.rempel@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 11, 2021 at 06:37:29AM +0200, Oleksij Rempel wrote: > Starting with: > > bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") > > the micrel phy driver started respecting phy-mode for the KSZ9031 PHY. > At least with kernel v5.8 configuration provided by this fixup was > overwritten by the micrel driver. > > This fixup was providing following configuration: > > RX path: 2.58ns delay > rx -0.42 (left shift) + rx_clk +0.96ns (right shift) = > 1,38 + 1,2 internal RX delay = 2.58ns > TX path: 0.96ns delay > tx (no delay) + tx_clk 0.96ns (right shift) = 0.96ns > > This configuration is outside of the recommended RGMII clock skew delays > and about in the middle of: rgmii-idrx and rgmii-id > > Since most embedded systems do not have enough place to introduce > significant clock skew, rgmii-id is the way to go. > > In case this patch breaks network functionality on your system, build > kernel with enabled MICREL_PHY. If it is still not working then try > following device tree options: > 1. Set (or change) phy-mode in DT to: > phy-mode = "rgmii-id"; > This actives internal delay for both RX and TX. > 1. Set (or change) phy-mode in DT to: > phy-mode = "rgmii-idrx"; > This actives internal delay for RX only. > 3. Use following DT properties: > phy-mode = "rgmii"; > txen-skew-psec = <0>; > rxdv-skew-psec = <0>; > rxd0-skew-psec = <0>; > rxd1-skew-psec = <0>; > rxd2-skew-psec = <0>; > rxd3-skew-psec = <0>; > rxc-skew-psec = <1860>; > txc-skew-psec = <1860>; > This activates the internal delays for RX and TX, with the value as > the fixup that is removed in this patch. > > Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Andrew 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 X-Spam-Level: X-Spam-Status: No, score=-9.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C819C433ED for ; Tue, 11 May 2021 13:38:48 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 67C9561264 for ; Tue, 11 May 2021 13:38:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67C9561264 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZvRz046SRLA6+EP1wAHMuW5n+okOfk4ATBY44f8Kg78=; b=fOyRyimb2H6646/l6EjKSjSd2 XWoJQgd5bIzF5DHWW5Iw+oIUUWxdgJ88rvPdt/1jA38gUpKZUZPG2hz+PHq7sVheux76PcKZ6eNtD 0T368ZHqzrWMiAKATbptP7OPxNAsX/iXW/gPXSZ/orTbV9AzZaUjyAWYjSOgG3YTbZw9ySCMJZCop zDgXNNkb86U26sIKgImooQgI4PL1Yi/gsua8LG2Pr79/2lRU0R6r0ERQOAdJJFyjTG+YUA4nOjvPU sZgKTnJug0KFBVl1yPXGHokoMp7hiU3SUjGpRw8xO/ZQlgKAKYwKtsscq3mfSnFu4yJp7zP+Ti0/7 A2Z20JBxQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgSZH-000B2B-9A; Tue, 11 May 2021 13:36:59 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgRpp-00HUCn-Bf for linux-arm-kernel@desiato.infradead.org; Tue, 11 May 2021 12:50:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Nk2QATE/YAGmpaluCxZLB2CwY3T6g4W15h0LkcfarMQ=; b=UtxrGaTSMUl6t+sV3j2f3tTqDP t7Tjjs0mh5uc/Wvmh9HAxMFdWwlrhAcvZsAL+8/n0j959SfyQ59jNWLlUXBWSBxGR+e78emUhyk4x 6X7bqwj0C8ft7urRnSrOtJr8HexpiiXtIrrXsfZCXBoViJvs6ZZk8r2aeLYV3EEOwLqqCShumUi4G lVYC5LyIvwIfXKRv0mpKJ2dRD3xuX0yZ21nYHO4COeIHKabXS0K3C283VKuLQwMWdTYCGpkXE76QS xc6IJ0suaZupO2dL/HjRSQqFYQFwE8CXwOANPufdHnIep/pG2c4ZmC4PEaqYVk8gYHAc7lZvX9kJA L8jrJxYg==; Received: from vps0.lunn.ch ([185.16.172.187]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgRpm-009aTa-Oj for linux-arm-kernel@lists.infradead.org; Tue, 11 May 2021 12:50:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Nk2QATE/YAGmpaluCxZLB2CwY3T6g4W15h0LkcfarMQ=; b=rKrr/2Vg6EBMa0RhcSkP28/Wwv VI7/lbvFjIxMvbqbCwz+kiiBFJy0AmyrMsywKjBOA2CKKhFeknZZFYkIVTRF92W/LVVCwDOuKfy3s Egzw8mdCJNOuZIssw5sdFozzSBBdvnYw9q5Xt3RwMW0o+ISyRzOMpRc6Bgua1aMACXVg=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1lgRpk-003kBS-5O; Tue, 11 May 2021 14:49:56 +0200 Date: Tue, 11 May 2021 14:49:56 +0200 From: Andrew Lunn To: Oleksij Rempel Cc: Shawn Guo , Sascha Hauer , Florian Fainelli , Heiner Kallweit , kernel@pengutronix.de, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, Fabio Estevam , David Jander , Russell King , Philippe Schenker Subject: Re: [PATCH v3 1/7] ARM i.MX6q: remove PHY fixup for KSZ9031 Message-ID: References: <20210511043735.30557-1-o.rempel@pengutronix.de> <20210511043735.30557-2-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210511043735.30557-2-o.rempel@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210511_054958_827404_C7E1DFC0 X-CRM114-Status: GOOD ( 15.38 ) 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="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 11, 2021 at 06:37:29AM +0200, Oleksij Rempel wrote: > Starting with: > > bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") > > the micrel phy driver started respecting phy-mode for the KSZ9031 PHY. > At least with kernel v5.8 configuration provided by this fixup was > overwritten by the micrel driver. > > This fixup was providing following configuration: > > RX path: 2.58ns delay > rx -0.42 (left shift) + rx_clk +0.96ns (right shift) = > 1,38 + 1,2 internal RX delay = 2.58ns > TX path: 0.96ns delay > tx (no delay) + tx_clk 0.96ns (right shift) = 0.96ns > > This configuration is outside of the recommended RGMII clock skew delays > and about in the middle of: rgmii-idrx and rgmii-id > > Since most embedded systems do not have enough place to introduce > significant clock skew, rgmii-id is the way to go. > > In case this patch breaks network functionality on your system, build > kernel with enabled MICREL_PHY. If it is still not working then try > following device tree options: > 1. Set (or change) phy-mode in DT to: > phy-mode = "rgmii-id"; > This actives internal delay for both RX and TX. > 1. Set (or change) phy-mode in DT to: > phy-mode = "rgmii-idrx"; > This actives internal delay for RX only. > 3. Use following DT properties: > phy-mode = "rgmii"; > txen-skew-psec = <0>; > rxdv-skew-psec = <0>; > rxd0-skew-psec = <0>; > rxd1-skew-psec = <0>; > rxd2-skew-psec = <0>; > rxd3-skew-psec = <0>; > rxc-skew-psec = <1860>; > txc-skew-psec = <1860>; > This activates the internal delays for RX and TX, with the value as > the fixup that is removed in this patch. > > Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel