From patchwork Wed Oct 19 08:50:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 13011745 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90DEEC433FE for ; Wed, 19 Oct 2022 13:21:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232541AbiJSNVt (ORCPT ); Wed, 19 Oct 2022 09:21:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232108AbiJSNVQ (ORCPT ); Wed, 19 Oct 2022 09:21:16 -0400 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E231F114DCD; Wed, 19 Oct 2022 06:06:35 -0700 (PDT) X-IronPort-AV: E=Sophos;i="5.95,195,1661785200"; d="scan'208";a="137159771" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 19 Oct 2022 17:51:10 +0900 Received: from localhost.localdomain (unknown [10.166.15.32]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 5FEB3400BC0E; Wed, 19 Oct 2022 17:51:10 +0900 (JST) From: Yoshihiro Shimoda To: linux@armlinux.org.uk, kabel@kernel.org, andrew@lunn.ch, hkallweit1@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH RFC 0/3] net: phy: marvell10g: Add host speed setting by an ethernet driver Date: Wed, 19 Oct 2022 17:50:49 +0900 Message-Id: <20221019085052.933385-1-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-State: RFC R-Car S4-8 environment board requires to change the host interface as SGMII and the host speed as 1000 Mbps because the strap pin was other mode, but the SoC/board cannot work on that mode. Also, after the SoC initialized the SERDES once, we cannot re-initialized it because the initialized procedure seems all black magic... To communicate between R-Car S4-8 (host MAC) and marvell PHY, this patch series adds a new function of_phy_connect_with_host_param() to set host parameters (host_interfaces and host_speed), and rswitch driver sets the paramter. After that, the marvell10g can check the paramters and set specific registers for it. This patch series is based on next-20221017 and the following patches which are not upstreamed yet: https://lore.kernel.org/all/20221019083518.933070-1-yoshihiro.shimoda.uh@renesas.com/T/#m1c3de735de018b5cb90cb3720056ac1497112b36 I'm not sure whether this is a correct way or not. So, I marked this patch series as RFC. Yoshihiro Shimoda (3): net: mdio: Add of_phy_connect_with_host_param() net: phy: marvell10g: Add host interface speed configuration net: renesas: rswitch: Pass host parameters to phydev drivers/net/ethernet/renesas/rswitch.c | 13 ++++++-- drivers/net/mdio/of_mdio.c | 42 ++++++++++++++++++++++++++ drivers/net/phy/marvell10g.c | 23 ++++++++++++++ include/linux/of_mdio.h | 7 +++++ include/linux/phy.h | 8 +++++ 5 files changed, 91 insertions(+), 2 deletions(-)