Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp949060rwd; Tue, 13 Jun 2023 02:37:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4gRyuTQSg787qwdT38xq7tBaBXqbElTqmUUpbNal6lqvWHKD9ZhWrQ+29JWkokhFxcIO7j X-Received: by 2002:a05:6a21:3397:b0:10c:4a13:99e2 with SMTP id yy23-20020a056a21339700b0010c4a1399e2mr16971785pzb.9.1686649078330; Tue, 13 Jun 2023 02:37:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686649078; cv=none; d=google.com; s=arc-20160816; b=OaIVwuIoABVcLkTX2RLL/IalKQBjfTNCqNQlHhFp8IOKFzo51gfMhsTHvfcwxzhw8A epypegrx2aWIXTXtUggN6Mdj5s+RIANgCfCKQaHXLcqBDYjdjYLWu0gk7ryoMCis+zMh SF6ZyY+BtO0arwciUlahKGDcZxA/rM53P8XMyU193R1uuvxtsQ82kSVVJZ2/tut6ltO3 SLAUaQIhEG69D0I2jGFBOecdr7lGOhHkvYUe1JUvKdCgbPdjpwGv1R9t84O/7eGuvzTA Edjac5XYi4TinC4XGl31XQ8qi9vbt6vUvOVX44xEz1bN3+s6jWOUn+NCCbJt3TDLQW9C 7nBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=IwBARohfXJIkEwsEMMo8aAWiqSvLtM3z2mjs8+NCfXY=; b=VMdw4lbaBdTmp5xlV3WpBZ+QmG/jEcyOWTOwSmZ+dTR/k1i3Nkq3Fn3izx7297CUJ8 S3r9eRHQ7ZZwN95+psWvSgLfFfMuw93SgJ2iCb3TxdTWwoaNVKXZPg7S6iCSBWrA7ZSO 2KmVCPbdfkMdgBLZfZS7Lb2+M/rkcpHjldXCroltS/yTf/lvOkw2XO05RviLgt7SaQV6 GTvbS8oFnrLFRzsPLD/FdpR0d3Fk1N1Bk9J4etyLbALiGgs2uexpXOv6BUG516KpUzKy 235tuvprTTHNCcNwdeY9lHuXncXYGO3yHHBFGb3K70IIPWxvKapbRlJZ0KdwlAr1accy WIsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=jT1sJaKn; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j1-20020a636e01000000b005347d35b573si8815255pgc.580.2023.06.13.02.37.44; Tue, 13 Jun 2023 02:37:58 -0700 (PDT) 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=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=jT1sJaKn; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240635AbjFMJCl (ORCPT + 99 others); Tue, 13 Jun 2023 05:02:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241437AbjFMJCf (ORCPT ); Tue, 13 Jun 2023 05:02:35 -0400 Received: from mail-vk1-xa2d.google.com (mail-vk1-xa2d.google.com [IPv6:2607:f8b0:4864:20::a2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4369110EC for ; Tue, 13 Jun 2023 02:02:29 -0700 (PDT) Received: by mail-vk1-xa2d.google.com with SMTP id 71dfb90a1353d-466021212d0so3889985e0c.1 for ; Tue, 13 Jun 2023 02:02:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1686646948; x=1689238948; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=IwBARohfXJIkEwsEMMo8aAWiqSvLtM3z2mjs8+NCfXY=; b=jT1sJaKn2m880uxpJ5L5ArF3lDcj7fgCTwwBWF6RsaYqX7FePADgzH9Dm/QqjhTK+P DkQPUPzU0LxNoxMzS7NHCF9LCuhzZVIoDE2wJgz/RxHAjB3FwuKMnKsaB222ZRFhLIUu Ciykd3mFBTL1P7WKtcBDpCQWvECEdUtdaRqHsmBNHOaGKKf7ckFx8fnKMuWlHPX1DAFg l3FrMgVgKr1RRtnR5aQwYXQut1mIFSubWfpgQHY41fB/fjLHyTaHIBqSPhElGMgX2CHS MbpMz3ivQQDAA3XTNm+c5m5Vn8oEylxUVqdnXb74u+FwpQL9ps8VOpJtL3Q4VSJOGT4a U12Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686646948; x=1689238948; h=content-transfer-encoding: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=IwBARohfXJIkEwsEMMo8aAWiqSvLtM3z2mjs8+NCfXY=; b=cA8hPzjzY8/gGNEHAIaD0L94ssH3EEqf5jPhmRXJB9tjgYAlKZrUUm6g5FGZvO/Ac2 LDglKjIIqRIvUVznw5CF/Ybir69fbYAmyFHtNzP0DUY0snOe8CrVVvzonN3sHNuYcyGg 9mkmAJAjQE0oOlUMPJoo4t1Oy+srH0OYC7VA6no+XETKsDKef04ZZ+ZrvtgDhohxqUpW nn2Wcsffb3S1ZV3Z3yJANfkvIuiMCvjNqMtz58ucpQZeiGt/o2EpTXY5X4TqaTRMnQt8 xq2YEpH1Rk4p+ynPgkrRZ8q0Zk/6XiADxBxPvPiE23WAIwDA7jc92mb3inIxzicXT0c2 8DLw== X-Gm-Message-State: AC+VfDw7cad030wbKqiLLjZFpJWL6UZBpxzeWOC5Bz0nQc7kKhXaWFpT YhFKVdDOSh1XKiHsbJeAR5A4W10SUcw2gQkqPjeavg== X-Received: by 2002:a05:6122:d94:b0:458:8ee3:cad9 with SMTP id bc20-20020a0561220d9400b004588ee3cad9mr5032322vkb.8.1686646948353; Tue, 13 Jun 2023 02:02:28 -0700 (PDT) MIME-Version: 1.0 References: <20230612092355.87937-1-brgl@bgdev.pl> <20230612092355.87937-16-brgl@bgdev.pl> <20230612210632.agp4ybeseujblao2@halaney-x13s> In-Reply-To: <20230612210632.agp4ybeseujblao2@halaney-x13s> From: Bartosz Golaszewski Date: Tue, 13 Jun 2023 11:02:17 +0200 Message-ID: Subject: Re: [PATCH 15/26] net: stmmac: dwmac-qcom-ethqos: add support for the optional phy-supply To: Andrew Halaney Cc: Vinod Koul , Bhupesh Sharma , Andy Gross , Bjorn Andersson , Konrad Dybcio , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kishon Vijay Abraham I , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Mon, Jun 12, 2023 at 11:06=E2=80=AFPM Andrew Halaney wrote: > > On Mon, Jun 12, 2023 at 11:23:44AM +0200, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > On sa8775p-ride we need to enable the power supply for the external PHY= . > > Is this for the external phy? It doesn't seem like it from the board > schematic I have... the regulator never makes it out of the black box tha= t > is the SIP/SOM if I'm reading right. > > My (poor) understanding was this was for the serdes phy that's doing the > conversion to SGMII before hitting the board... good chance I'm wrong > though. > No, you're right. In which case I think the regulator calls should be moved into the serdes driver instead as phy-supply is defined as the supply of the external PHY in stmmac bindings. Bart > > > > Signed-off-by: Bartosz Golaszewski > > --- > > drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/= drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > > index 2f6b9b419601..21f329d2f7eb 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > > @@ -8,6 +8,7 @@ > > #include > > #include > > #include > > +#include > > > > #include "stmmac.h" > > #include "stmmac_platform.h" > > @@ -692,6 +693,10 @@ static int qcom_ethqos_probe(struct platform_devic= e *pdev) > > if (ret) > > goto out_config_dt; > > > > + ret =3D devm_regulator_get_enable_optional(dev, "phy"); > > + if (ret < 0 && ret !=3D -ENODEV) > > + goto out_config_dt; > > + > > ethqos->serdes_phy =3D devm_phy_optional_get(dev, "serdes"); > > if (IS_ERR(ethqos->serdes_phy)) { > > ret =3D PTR_ERR(ethqos->serdes_phy); > > -- > > 2.39.2 > > >