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 DAD26C433EF for ; Mon, 25 Jul 2022 17:11:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236693AbiGYRLf (ORCPT ); Mon, 25 Jul 2022 13:11:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236617AbiGYRLd (ORCPT ); Mon, 25 Jul 2022 13:11:33 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F88A13E16; Mon, 25 Jul 2022 10:11:31 -0700 (PDT) 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=78+Si4CrQJYqdkHLgNgJiy3BwTK1hLdFACt1eMH2OMc=; b=39N8BAKLfnMzEyu9rVXYquss5e 7qFUPwAYK4D85h3KSJzPgQV3s85oE+dDt3A4kqJ8Y4ZdzRbeZQFvb6OXQiL03RfTPLrG57+XMDY90 aR08DVm67HX05jgauO2VjOJLUz+RTVwJwvuiYch4RFqEBbN4ToTu/aek+8YUooiBGMy8=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oG1bl-00BTu5-8N; Mon, 25 Jul 2022 19:11:05 +0200 Date: Mon, 25 Jul 2022 19:11:05 +0200 From: Andrew Lunn To: "Pandey, Radhey Shyam" Cc: "michal.simek@xilinx.com" , "nicolas.ferre@microchip.com" , "claudiu.beznea@microchip.com" , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "gregkh@linuxfoundation.org" , "ronak.jain@xilinx.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "git@xilinx.com" , "git (AMD-Xilinx)" Subject: Re: [PATCH net-next 2/2] net: macb: Add zynqmp SGMII dynamic configuration support Message-ID: References: <1658477520-13551-1-git-send-email-radhey.shyam.pandey@amd.com> <1658477520-13551-3-git-send-email-radhey.shyam.pandey@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 25, 2022 at 02:34:51PM +0000, Pandey, Radhey Shyam wrote: > > -----Original Message----- > > From: Andrew Lunn > > Sent: Sunday, July 24, 2022 10:24 PM > > To: Pandey, Radhey Shyam > > Cc: michal.simek@xilinx.com; nicolas.ferre@microchip.com; > > claudiu.beznea@microchip.com; davem@davemloft.net; > > edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; > > gregkh@linuxfoundation.org; ronak.jain@xilinx.com; linux-arm- > > kernel@lists.infradead.org; linux-kernel@vger.kernel.org; > > netdev@vger.kernel.org; git@xilinx.com; git (AMD-Xilinx) > > Subject: Re: [PATCH net-next 2/2] net: macb: Add zynqmp SGMII dynamic > > configuration support > > > > > + ret = of_property_read_u32_array(pdev->dev.of_node, > > "power-domains", > > > + pm_info, > > ARRAY_SIZE(pm_info)); > > > + if (ret < 0) { > > > + dev_err(&pdev->dev, "Failed to read power > > management information\n"); > > > + return ret; > > > + } > > > + ret = zynqmp_pm_set_gem_config(pm_info[1], > > GEM_CONFIG_FIXED, 0); > > > + if (ret < 0) > > > + return ret; > > > + > > > > Documentation/devicetree/bindings/net/cdns,macb.yaml says: > > > > power-domains: > > maxItems: 1 > > > > Yet you are using pm_info[1]? > > >From power-domain description - It's a phandle and PM domain > specifier as defined by bindings of the power controller specified > by phandle. > > I assume the numbers of cells is specified by "#power-domain-cells": > Power-domain-cell is set to 1 in this case. > > arch/arm64/boot/dts/xilinx/zynqmp.dtsi > #power-domain-cells = <1>; > power-domains = <&zynqmp_firmware PD_ETH_0>; > > Please let me know your thoughts. Ah, so you ignore the phandle value, and just use the PD_ETH_0? How robust is this? What if somebody specified a different power domain? Andrew