Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp144651rdb; Fri, 5 Jan 2024 05:37:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFuyA3ABwnPgDLgVZ5i2h7oC0WKcMkz8TGK1XXPNR86yJw3mFZYAFSiNcf8iDMnaIthZ/yw X-Received: by 2002:a17:90a:fe97:b0:28c:bced:5e65 with SMTP id co23-20020a17090afe9700b0028cbced5e65mr1741087pjb.96.1704461876222; Fri, 05 Jan 2024 05:37:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704461876; cv=none; d=google.com; s=arc-20160816; b=MNF7r37ee7vtSKDD0yJ0SMam8piE6C4xrYZ6OhRuwUs5BrD768RQmlwkHAhggteMGy cpmDrBmBjUIaOsxX0t3R4Cy5zhz9HegjqOqNwI0TUkPFW8tNKsrsa6J9+3mwIgkwyxMd JMs/wRaFQljUaBTqW4YOMuaIIAlmymDyzZSy/5JX6aGLe0xRI5XU2H/OMrVOSci2CP9u 5jdsu9aK0iAFchDTulX5+JueXrHrSLZC6pmw7nqy87IYQ5rGbNgEKlcF0OJ5hp4q7EuL o6JoQ2g+FlHHksUXdJiJrbdhR+NeIHOvWNZsd04NDbydmOMnXEcVTzAD/0hEOFauSba7 kObA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xsZkrjSLGS2hapVRqmxgnJelDcefZub/b13sHJ7frcI=; fh=o9QBbrqfGTaibYOFKJyE4SEYs1ipDwfTUhqtcOUwjYU=; b=s972AZnALxP3xZ7/pSfz/Va2J7cvPczB5PhO/faXdYBCHr5X0m+Bldgz9vNFBPeVul mqfd185z8xsupUq7r4aRLr2N7RSyssuXFuxfDcm3wFwKBuT7q1ph2TYoAbxGRwPWQDZ8 JVfXvfqHQ3MsaZsVKOvh5mZCbpzEiziA1WTPXZCKVFsdp5GglQeteHtFxRUVR2fuIsBX bYBVEspKX+KX4fzKj5ENe/2fgZ524Zr+zAPyenuxUsUtYmlDq9EIVFmcsPhFgMsrB2fY UFl1lPY3rZGm0qXjOKvgzd3t2wfRXDTanVA7qiAsHIyaa/mt+kJOHZOLCScu0uzDJ+Zg Rw7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Hb6pTDsO; spf=pass (google.com: domain of linux-kernel+bounces-17881-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17881-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id pd2-20020a17090b1dc200b0028b99fe9962si873921pjb.51.2024.01.05.05.37.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 05:37:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17881-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Hb6pTDsO; spf=pass (google.com: domain of linux-kernel+bounces-17881-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17881-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id DEFD0285307 for ; Fri, 5 Jan 2024 13:37:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 31BED2DF65; Fri, 5 Jan 2024 13:37:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="Hb6pTDsO" X-Original-To: linux-kernel@vger.kernel.org Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE2492D7AD; Fri, 5 Jan 2024 13:37:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch 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=xsZkrjSLGS2hapVRqmxgnJelDcefZub/b13sHJ7frcI=; b=Hb6pTDsOIy4wBDb+tkE2theanc ayw7Yf1xwJa4EJsBWXpQ1yiHD/bPva0LkBH2klxeJLo7H/RpAPtnaUjznLE9sz/yIviOB3541TuYi X+/quRAzrkvzTF+4oc4yzu2NmWG6KvYNcvJohq8mCyf93t6QbNpbxWlBEh6DOfHaKndc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rLkNw-004SM2-Dx; Fri, 05 Jan 2024 14:37:16 +0100 Date: Fri, 5 Jan 2024 14:37:16 +0100 From: Andrew Lunn To: Jie Luo Cc: Christian Marangi , "Russell King (Oracle)" , davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, hkallweit1@gmail.com, corbet@lwn.net, p.zabel@pengutronix.de, f.fainelli@gmail.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v8 14/14] dt-bindings: net: ar803x: add qca8084 PHY properties Message-ID: <864b0867-06c0-4c6d-ae71-9b5025c8d93a@lunn.ch> References: <6abe5d6f-9d00-445f-8c81-9c89b9da3e0a@quicinc.com> <1bddd434-024c-45ff-9866-92951a3f555f@quicinc.com> <6593e0a3.050a0220.5c543.8e12@mx.google.com> <85590a5b-9d5a-40cb-8a0e-a3a3a1c3720a@lunn.ch> <50252a5a-e4fb-42d3-b838-9ef04faf4c5c@lunn.ch> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: > > O.K. Since we are getting nowhere at the moment, lets take just the > > pure PHY chip, and ignore the rest for the moment. > > > > For any pure PHY, there is generally one clock input, which might be a > > crystal, or an actual clock. If you look at other DT bindings for > > PHYs, it is only listed if the clock is expected to come from > > somewhere else, like a SoC, and it needs to be turned on before the > > PHY will work. And generally, a pure PHY has one defined clock > > frequency input. If that is true, there is no need to specify the > > clock. If multiple clock input frequencies are supported, then you do > > need to specify the clock, so its possible to work out what frequency > > it is using. How that clock input is then used internally in the PHY > > is not described in DT, but the driver can set any dividers, PLLs > > needed etc. > > Yes, Andrew, there is only one clock input to qca8084(same as qca8386), > this input clock rate is 50MHZ, which is from the output clock of CMN > PLL block that is configured by the MDIO bus driver patch under review. Lets concentrate on the pure PHY. All it sees is a clock. It does not care where it come from. All you need in the device tree for the pure PHY is a clock consumer. There is one clock input, so its shared by all four instances in the pure PHY package. So you need to use Christians code which extends the PHY DT bindings to allow DT properties for a package of PHYs. What about resets. Is there one reset pin for the pure PHY package, or one per PHY? Go find Christians code, understand it, and propose a DT binding for the pure PHY. Include the clock provider and the reset provider. Forget about the MDIO controller, and the PHY integrated into the switch, etc. Baby steps... > In qca8084(same as qca8386), there is a clock controller, let's call it > as NSSCC, the logic of NSSCC is same as qualcomm GCC(located in SoC), > the NSSCC provides the clocks to the quad PHYs, the initial clocks for > quad PHYs need to be configured before PHY to work. You said above, there is one clock input to the qca8084. Here you use the word clocks, plural. Is there one clock, or multiple clocks? Andrew