Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp993427rdf; Wed, 22 Nov 2023 02:42:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IHw9BbJi3FCGDr8CiFqcZ5eBAosqomn3DKAgkOTpdFv0703FG/755Z6g3bTGQYtTFXFjLSX X-Received: by 2002:a05:6a20:e598:b0:18b:1f3c:8af9 with SMTP id ng24-20020a056a20e59800b0018b1f3c8af9mr1546326pzb.34.1700649776276; Wed, 22 Nov 2023 02:42:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700649776; cv=none; d=google.com; s=arc-20160816; b=BKqRj6zxhYdSx7SShjBEnKEbR4yzbVm5Nl1TgPjY9Rs6nemm4I3RZbCGk6nIyz2sCP qmrRLX0IU97cV8/T2nqguLyTxynxxxbtMXzntC1fCSwOMXjoKmlgSkPtavEOh+Khogy6 BNB3hZMEcTMgtGoebshs5ejKOQjKtAouRHBz/O9ccH/vOWqjMHVF1nd6srpreEMd/imO GBIDaSfoMcpOs8g5K6bXmWCAYunrRQwG7/7Qux5Xj3LvhAtoMxJckt9V6Nj49R2/x6xR twdhWti69mkp+AV1zrFMLH/j+T9e0iitLZnfU9w3lM8fvOn/C1gftpi4yAk0XgGwIylY MwEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yR95/c3w/szrDscTRCWgMPJylCJl942MhjeAefJHcnE=; fh=/DW9tk17J1/HKn5o0Raq2YQbil5IR2pTxXXFFUnzcms=; b=PMRMurwZvAWqWJsJYWeuVsaLanaKXlB3uDP8c6BZnEFm2IWhcr1n0AvMqW2wkOCG0p Sifi6+6xdkL1vQO52kqMH4cny1o8Jx7qOcdAL2+ZydR+Br+2ZI6sNQ8xSvrldtWo2OC3 7gfR5m+cCy+Awpru5fBwLozT9YtxijyGZAoEdLxTbPLNpLbds15F4bDPoA+95j9gKaMa vnsFcXtwBwKB6h9b/Zbwo4QRR+ZTd973GOQ6TvhjDND2O8GiZ80YXrQaAC6IiUeJ8Mds 5hP1fBuY+DDqvByDDsBqAXTlvQWsFWzp51Xlh0/W6BS4u5x1QmVPpVJmAEzzCL5zwExb 8Lsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pllgEhGf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id h6-20020a170902704600b001cc76bea4fesi11842840plt.163.2023.11.22.02.42.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 02:42:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pllgEhGf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 70DB4818909B; Wed, 22 Nov 2023 02:41:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233111AbjKVKlt (ORCPT + 99 others); Wed, 22 Nov 2023 05:41:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229714AbjKVKlr (ORCPT ); Wed, 22 Nov 2023 05:41:47 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC4DFD8 for ; Wed, 22 Nov 2023 02:41:43 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6AC6FC433C9; Wed, 22 Nov 2023 10:41:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700649703; bh=s/dlsgjmV9/Gjv6PkVsXWK7wZO4UsNtqC33jkUQSkdU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pllgEhGfESNKJ4y1QCO3/xtPQtzDsfLDrTZwVJb7dcjgSp04X70lfQTsdvCyTBqq2 rYZsJYXe3umDXe2CtsvCRCJ6nQXEZVx99lQ7tSu0Z4+ZZblCV7uVGdQJHLNNodeS17 cTS6UfNn/VytfQbekcqYu3wC+qsHYkWeWlY5Ydj8xyAT6v7hN7pIzAviS6jy7cyeWb aYCuvcW7rfhQxCcK3AR2rbLVLbDyQdftt2Km+Kr9XkC4NFheaSpUDSxtqAhIFNnMkn ZMR6kHVKaeGic5UxLn807ZRZheNfV1AJvB6cYoZbazYVtg1zEKxr4xMixJGHWurBwT dOFXA/tf/3Ddg== Date: Wed, 22 Nov 2023 10:41:34 +0000 From: Simon Horman To: Christian Marangi Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson , Konrad Dybcio , Andrew Lunn , Heiner Kallweit , Russell King , Florian Fainelli , Broadcom internal kernel review list , Daniel Golle , Qingfang Deng , SkyLake Huang , Matthias Brugger , AngeloGioacchino Del Regno , David Epping , Vladimir Oltean , "Russell King (Oracle)" , Harini Katakam , Robert Marko , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [net-next RFC PATCH 04/14] net: phy: add initial support for PHY package in DT Message-ID: <20231122104134.GA28959@kernel.org> References: <20231120135041.15259-1-ansuelsmth@gmail.com> <20231120135041.15259-5-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231120135041.15259-5-ansuelsmth@gmail.com> X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 22 Nov 2023 02:41:52 -0800 (PST) On Mon, Nov 20, 2023 at 02:50:31PM +0100, Christian Marangi wrote: > Add initial support for PHY package in DT. > > Make it easier to define PHY package and describe the global PHY > directly in DT by refereincing them by phandles instead of custom > functions in each PHY driver. > > Each PHY in a package needs to be defined in a dedicated node in the > mdio node. This dedicated node needs to have the compatible set to > "ethernet-phy-package" and define "global-phys" and "#global-phy-cells" > respectively to a list of phandle to the global phy to define for the > PHY package and 0 for cells as the phandle won't take any args. > > With this defined, the generic PHY probe will join each PHY in this > dedicated node to the package. > > PHY driver MUST set the required global PHY count in > .phy_package_global_phy_num to correctly verify that DT define the > correct number of phandle to the required global PHY. > > mdio_bus.c and of_mdio.c is updated to now support and parse also > PHY package subnote that have the compatible "phy-package". > > Signed-off-by: Christian Marangi ... > diff --git a/include/linux/phy.h b/include/linux/phy.h > index c2bb3f0b9dda..5bf90c49e5bd 100644 > --- a/include/linux/phy.h > +++ b/include/linux/phy.h > @@ -339,6 +339,8 @@ struct mdio_bus_stats { > * phy_package_leave(). > */ > struct phy_package_shared { > + /* With PHY package defined in DT this points to the PHY package node */ > + struct device_node *np; > /* addrs list pointer */ > /* note that this pointer is shared between different phydevs. > * It is allocated and freed automatically by phy_package_join() and Hi Christian, a minor nit from my side: please add np to the kernel doc for struct phy_package_shared. > @@ -888,6 +890,8 @@ struct phy_led { > * @flags: A bitfield defining certain other features this PHY > * supports (like interrupts) > * @driver_data: Static driver data > + * @phy_package_global_phy_num: Num of the required global phy > + * for PHY package global configuration. > * > * All functions are optional. If config_aneg or read_status > * are not implemented, the phy core uses the genphy versions. ...