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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98F31C433FE for ; Tue, 29 Nov 2022 18:32:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235960AbiK2ScI (ORCPT ); Tue, 29 Nov 2022 13:32:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235940AbiK2ScI (ORCPT ); Tue, 29 Nov 2022 13:32:08 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66C93654C1; Tue, 29 Nov 2022 10:32:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=wIKgYoD0U9V/FJ0sV3et6MEEkcpyezkYMDQv2JE1xug=; b=QEtv03LPOokn2byHbhnSg53HbY jTltuRc+dW47YOXRIu3rvks9tzGAyN+CjLvauNziwoYD6sEM+WMhsvjIV3DCdQddyvdQIk7h/LWFz zhUhSAdRizMqxiSK7l3mPkf5FnxJnjQus7VCsy3JX/80XH5UCML0fHKcCDMRuHeMGGDs=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1p05O7-003tzW-NM; Tue, 29 Nov 2022 19:31:23 +0100 Date: Tue, 29 Nov 2022 19:31:23 +0100 From: Andrew Lunn To: Krzysztof Kozlowski Cc: Chukun Pan , "David S . Miller" , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Eric Dumazet , Jakub Kicinski , Paolo Abeni , David Wu , Rob Herring , Heiko Stuebner , Krzysztof Kozlowski , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/2] ethernet: stmicro: stmmac: Add SGMII/QSGMII support for RK3568 Message-ID: References: <20221129072714.22880-1-amadeus@jmu.edu.cn> <20221129072714.22880-2-amadeus@jmu.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org > > -static int phy_power_on(struct rk_priv_data *bsp_priv, bool enable) > > +static int rk_gmac_phy_power_on(struct rk_priv_data *bsp_priv, bool enable) > > { > > struct regulator *ldo = bsp_priv->regulator; > > int ret; > > @@ -1728,6 +1909,18 @@ static struct rk_priv_data *rk_gmac_setup(struct platform_device *pdev, > > "rockchip,grf"); > > bsp_priv->php_grf = syscon_regmap_lookup_by_phandle(dev->of_node, > > "rockchip,php-grf"); > > + bsp_priv->xpcs = syscon_regmap_lookup_by_phandle(dev->of_node, > > + "rockchip,xpcs"); > > + if (!IS_ERR(bsp_priv->xpcs)) { > > + struct phy *comphy; > > + > > + comphy = devm_of_phy_get(&pdev->dev, dev->of_node, NULL); > > So instead of having PHY driver, you added a syscon and implemented PHY > driver here. No. Make a proper PHY driver. I'm also thinking there should be a proper pcs driver in drivers/net/pcs. Andrew