Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1145648rwb; Wed, 16 Nov 2022 12:47:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf4AV+Yx84ta9mVolvP3gO+mwpLOymsHhR70phCXb5ZocOWyWxDwRERXBDUbLOl4QZH0+Juc X-Received: by 2002:a17:907:2348:b0:78d:f796:c00d with SMTP id we8-20020a170907234800b0078df796c00dmr18480335ejb.251.1668631675875; Wed, 16 Nov 2022 12:47:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668631675; cv=none; d=google.com; s=arc-20160816; b=Obo6aYu/LXyatRxOq7A0WwTFd30f39Op8Ue7JxaVEaEoGEh+u52H6/FW2gMLE4r3Cb kUNbVjFic0m0wabyyZZwND2GfUn/s0U6X4y4jyyJAw+6hdYIcbIwOaSWYdagc4v1fiKX KoGOYNIsYUTj2KD12Tgv2XB/t8nSitC7VLiiUw2RD39MSskbyF26rG+9fXD5O3GcCp4h wC7mJ2yM5vWIjriWNvx5TW5Y+5kIM2tZNerPQgQBMeHg/IWnVHMK2rjecK1F60t1WVjP AYf/zmHR836o8qMTY1Ob4RTG7gEh90pf7B2nbcN9d1gJH6Ca88kMOySKXpmVjP2Akfew 9PEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0IcH5gFiwo2T5jEqATk0ifRG4QlIgMjRCMEKXYZaC28=; b=RMhtSNq3/FLt/JKWKeK0kCCM8vAK9BOGhoBKi2E7RPO7Ax96QEegMuA8Ko9Oo6QjA9 26L7CDxkVCrBhxBcjfPAXA/ttBtp2FPc9MQ9AACfLpGRUO08RK+pb/puzCyVpGJ48E3f fnhJYzEZbkBUT8l7wJhX5Uk1E21NR3NYhwbUnUd2d5um8pqZWbvBz6muRIknFggf3lbH 0K4hp8RsOyj9MSQEQa5kPxAMvDgSD86nXqUhhn9KDS8uCGUzJYgdW2ODxuhFCC5Fulp1 7NH3+VLSxuHlhZlkdgn5m2QaGYmDZIvF1T1DtmHP+p70lU/C7xgvjTpdlW+AlNudH73v k8RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=K30djvpR; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji3-20020a170907980300b007ae7d12bef1si15582443ejc.909.2022.11.16.12.47.34; Wed, 16 Nov 2022 12:47:55 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=K30djvpR; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233756AbiKPUhJ (ORCPT + 90 others); Wed, 16 Nov 2022 15:37:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234356AbiKPUgu (ORCPT ); Wed, 16 Nov 2022 15:36:50 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 922FE65E6E; Wed, 16 Nov 2022 12:36:38 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id v1so31899051wrt.11; Wed, 16 Nov 2022 12:36:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=0IcH5gFiwo2T5jEqATk0ifRG4QlIgMjRCMEKXYZaC28=; b=K30djvpRBS+52IixL7ukZ+0jdbjNIQmzHPRzhFd/anfccasAqrR++8AAu1D2Rvo91N gUsrV56AcZQ77FR7TOGtE8tv7pstD4I8jBjpFi6104beoj8rZ9t1x1MKGKV/cARyUxdy 1b2iOkowkFU20taFzrFt4U0K2KgMceRSfCzSUFlvHY0m765sBa5HXw8vaazf90bnDqgp sInfNWcrOu9xV6306OpEx1xwn6pWa7mOff/SE+9hsNP430Zm/fzSspy8RwygAZ5qPXSt kdhj9mVLX8Pe0Hz6id9j4Gb63BP2CDOu8Lk71wKQIkVWzwfgAzQ5quGeYx+EHEuwmY6T f62g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0IcH5gFiwo2T5jEqATk0ifRG4QlIgMjRCMEKXYZaC28=; b=XbEtlIsCyliiaAcwBaAUSehvv0mlWn1EOD+X2ImoMDRGtIrjMvnVvjO+ObdoUQMQ/B m05ukYSKIDVXfF+EHe6NLwRXrpzSRphKksnTQkF1yOuasRIy47+D1jZ9QkLXyh6AXSHU DqHrb88hJ4OK0EsFeXE4XsUo1FaCIEJZqvOfDDDMPjbf1IhFq3rPi58PVXEjrn9V2KDa JNJ4bmuas1qreS3a2pFZW/X9BAxUFusQHrWa6Rk4cUvr7Bb4JtEqZiMNlUrCHz9hZArB uescDmLT9lc2SmWW3aVB+Anu8DGiL1nosr64LtZL0o9BMGbF5uITWiCwvJjRrvPI9gWH 9N+w== X-Gm-Message-State: ANoB5pmh6EN5tD16Njfar2HZM1z30+k9wA6kx0Jg6HfXs+UiwMXmGMRz N1Njd/chAvtm2fBUOeIyyu5GWsTNGrk/idYmhmrOlsIj X-Received: by 2002:adf:fec8:0:b0:228:d897:228 with SMTP id q8-20020adffec8000000b00228d8970228mr14745392wrs.539.1668630996952; Wed, 16 Nov 2022 12:36:36 -0800 (PST) MIME-Version: 1.0 References: <20221116200150.4657-1-linux.amoon@gmail.com> <20221116200150.4657-2-linux.amoon@gmail.com> In-Reply-To: <20221116200150.4657-2-linux.amoon@gmail.com> From: Peter Geis Date: Wed, 16 Nov 2022 15:36:24 -0500 Message-ID: Subject: Re: [linux-next-v2 1/5] arm64: dts: rockchip: Fix gmac phy mode to rgmii on Rock 3A SBC. To: Anand Moon Cc: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Chukun Pan , Michael Riesch , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 On Wed, Nov 16, 2022 at 3:02 PM Anand Moon wrote: > > On rk356x ethernet phy support reduced media independent interface (RMII) > and reduced gigabit media independent interface (RGMII). > So set the phy mode to rgmii to support clock delay, also > add TX and RX delay for phy-mode. Controller based clock delay, the various rgmii-id modes (rgmii-txid and rgmii-rxid are also valid) apply the delays in the phy. They are usually at a fixed amount, but some phys support variable delays. You want your commit message to accurately describe the problem, such as "In rgmii-id mode, the phy on the rock-3a is unreliable due to incorrect delays. Switch to rgmii mode in order to handle the delays in the controller." > > Fix following warning > > [ 7.365215] rk_gmac-dwmac fe010000.ethernet: Can not read property: tx_delay. > [ 7.365219] rk_gmac-dwmac fe010000.ethernet: set tx_delay to 0x30 > [ 7.365224] rk_gmac-dwmac fe010000.ethernet: Can not read property: rx_delay. > [ 7.365228] rk_gmac-dwmac fe010000.ethernet: set rx_delay to 0x10 I've been meaning to make this a dev_debug message, because in the various rgmii-id modes it is feasible for these to be non-existent in the device-tree. In rgmii-id mode these are disabled, no matter what they are set to in the dt. > > Signed-off-by: Anand Moon > --- > V2: Fix commit message and added the RX and TX clock delay. > --- > arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts > index ea74ba32fbbd..e1c75532dcee 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts > +++ b/arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts > @@ -253,13 +253,16 @@ &gmac1 { > assigned-clock-rates = <0>, <125000000>; > clock_in_out = "output"; > phy-handle = <&rgmii_phy1>; > - phy-mode = "rgmii-id"; > + phy-mode = "rgmii"; > pinctrl-names = "default"; > pinctrl-0 = <&gmac1m1_miim > &gmac1m1_tx_bus2 > &gmac1m1_rx_bus2 > &gmac1m1_rgmii_clk > &gmac1m1_rgmii_bus>; > + > + tx_delay = <0x4f>; > + rx_delay = <0x26>; These are pretty far off from the default, have you verified the upper and lower bounds for the rock-3a? These should be roughly in the middle of that range. > status = "okay"; > }; > > -- > 2.38.1 >