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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87B6CC7EE43 for ; Mon, 12 Jun 2023 20:43:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=ttSiUFnJeq9GR8yk2QDSbJXhDJeUCxopMyvKpTENOV4=; b=iLR7bVmKh0NiHe BN25V+iF9VkpqcmWUdV6BrhUFDRh/IQgVaG+wTgIPL6DvkTn6F8t9sBacoK4KTJVyFcefE5OL7ZkA VhPpIB01LoPHZ5YzSIEu4ZN9sDXRR48rPLqrySl6/B4i8BO4Qgq4uG3hrA+hIc5PjsbBZRObEApNG jyvczMIUjmGlWUo3pSso46cRoiZOeOhqz1oPk70f+AHeNSj7wCjGM19XDFBxljNakJhTvHGWaqu+x H0thMD5DdMVSGiqmo3f27pzWUUFOZ5y6RVg8n1HVo4hgv4FLX0yPlF0CCdXZkmZ3BYVJBiJAGSR8k dU4aaQjLY9jlMmPKQ8WQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q8oNQ-005JVl-1H; Mon, 12 Jun 2023 20:43:00 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q8oNN-005JV2-1k for linux-arm-kernel@lists.infradead.org; Mon, 12 Jun 2023 20:42:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686602576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=a+9OvtK97veHl6+HegxVNiurUYmzQbeChvO9xmQ5r5g=; b=I0R+X/uZrLtGtzAyQYDm9VNqRRCGuGZZ6pawqilQTJyOrTv/2dbXcM8eBri/7jGELwHtkw ZKFJ72U/FaKu6P+VGZuRhrez1f22al6IBxVTPqgfV5l0nExYXCpoQSMpt2FBLfSt9ZVWxA lfqHIjRPiDtj6KEtI0fioEnWwlKRoI4= Received: from mail-yw1-f199.google.com (mail-yw1-f199.google.com [209.85.128.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-78-hfljMn4OM1-WPeo0ITztqg-1; Mon, 12 Jun 2023 16:42:55 -0400 X-MC-Unique: hfljMn4OM1-WPeo0ITztqg-1 Received: by mail-yw1-f199.google.com with SMTP id 00721157ae682-56942442eb0so69848087b3.1 for ; Mon, 12 Jun 2023 13:42:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686602575; x=1689194575; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=a+9OvtK97veHl6+HegxVNiurUYmzQbeChvO9xmQ5r5g=; b=b1Zj62M8LDjbeeBrzJJ5AO0rIeDcgh0XlLZjfBPsGuhu4aWe1KzVhOIcxdh/ze+C9y FBuXE6kN6tCC4HV0XJGIaPvSeHjnaNJcQiodcX5j7tN5Pi+C1vEbBP+gPk+RqaSez2dc CUUd7jLgnHF8MU8bCRVbtdXaKNd6/IjbyKwZ99PoevDxxdnl3zVd6MtRIQ3J6Cx+SV6H kNr46+kglv2js6SKRg2KiNzdzb0OiFBN9uzvlGpPUHNMy6NtmP7N+16VmMixkDiKUsRk JM2QRLbnbP8J97F1wpvk5uTIrIok07GhvHuGHdLhw4KXk9B7Ve2ssmNCHlWbDPtdXD5w oWgA== X-Gm-Message-State: AC+VfDzW1F8AzQH/X9Yzx8ItkM2vltOyjs2Q67nOVPiMm7W6A9kmMasf vbcSN4BKDgpk/ymqI2R35vOTBimBUVVRgcBv12XA+s8srLFMw1pedG8RI8eX8sfhZq7a2HyNK+j YUwAEiOAv6HVNbH+YIcU9Y1ObgLLxdIyuPGs= X-Received: by 2002:a81:7bc6:0:b0:56d:3372:71c7 with SMTP id w189-20020a817bc6000000b0056d337271c7mr2596032ywc.23.1686602575043; Mon, 12 Jun 2023 13:42:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5xUUOwVWCsyVOTXZeMW6GB/UM/A5jZuRMVvmYBzle/O+VHgBsWxsSIEBgDZ0wTd7/cMwI9Mg== X-Received: by 2002:a81:7bc6:0:b0:56d:3372:71c7 with SMTP id w189-20020a817bc6000000b0056d337271c7mr2596001ywc.23.1686602574825; Mon, 12 Jun 2023 13:42:54 -0700 (PDT) Received: from halaney-x13s ([2600:1700:1ff0:d0e0::45]) by smtp.gmail.com with ESMTPSA id x186-20020a817cc3000000b00568cbb028c6sm2769484ywc.85.2023.06.12.13.42.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 13:42:54 -0700 (PDT) Date: Mon, 12 Jun 2023 15:42:52 -0500 From: Andrew Halaney To: Bartosz Golaszewski 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 Subject: Re: [PATCH 14/26] net: stmmac: dwmac-qcom-ethqos: add optional phyaux clock Message-ID: <20230612204252.kb57m72ehazt4bco@halaney-x13s> References: <20230612092355.87937-1-brgl@bgdev.pl> <20230612092355.87937-15-brgl@bgdev.pl> MIME-Version: 1.0 In-Reply-To: <20230612092355.87937-15-brgl@bgdev.pl> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230612_134257_655391_8070D5BA X-CRM114-Status: GOOD ( 25.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 Mon, Jun 12, 2023 at 11:23:43AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > On sa8775p we don't use the RGMII clock but have an additional PHYAUX > clock so add support for it to the driver. > > Signed-off-by: Bartosz Golaszewski > --- > .../ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > index 252dca400071..2f6b9b419601 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > @@ -94,6 +94,7 @@ struct qcom_ethqos { > > unsigned int rgmii_clk_rate; > struct clk *rgmii_clk; > + struct clk *phyaux_clk; > struct phy *serdes_phy; > unsigned int speed; > > @@ -604,6 +605,13 @@ static int ethqos_clks_config(void *priv, bool enabled) > return ret; > } > > + ret = clk_prepare_enable(ethqos->phyaux_clk); > + if (ret) { > + clk_disable_unprepare(ethqos->rgmii_clk); > + dev_err(ðqos->pdev->dev, "phyaux enable failed\n"); > + return ret; > + } > + > /* Enable functional clock to prevent DMA reset to timeout due > * to lacking PHY clock after the hardware block has been power > * cycled. The actual configuration will be adjusted once > @@ -611,6 +619,7 @@ static int ethqos_clks_config(void *priv, bool enabled) > */ > ethqos_set_func_clk_en(ethqos); > } else { > + clk_disable_unprepare(ethqos->phyaux_clk); > clk_disable_unprepare(ethqos->rgmii_clk); > } > > @@ -669,6 +678,12 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > goto out_config_dt; > } > > + ethqos->phyaux_clk = devm_clk_get_optional(dev, "phyaux"); > + if (IS_ERR(ethqos->phyaux_clk)) { > + ret = PTR_ERR(ethqos->phyaux_clk); > + goto out_config_dt; > + } > + Similar comment to the prior patch about whether or not this should be optional (or selected via platform compatible and required), otherwise looks good. > ret = ethqos_clks_config(ethqos, true); > if (ret) > goto out_config_dt; > -- > 2.39.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel