From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0BFC4151991; Wed, 23 Jul 2025 06:25:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753251930; cv=none; b=szKLwpcXH+oYL8nwAWpWJG8OlIHCx9tHWl1iVIUOFqCM1ZRwT6a+sZ7BMuGYxUYg9b4viIOimxFqGfAptjLwRdjRIjeL/OWij3153ggH4IZTnNNwvLIMWwa1BjvxnhdF74Y0r+gxNGwg2/LIXwMCS4PyOxW9cxxyJJ7CbWkpkE4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753251930; c=relaxed/simple; bh=5As5b9hDZCf2zDsqZ/ytZOfi5BQC+vAXvNGPONFtPF0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kON3TKvg+8xarTUFuzFaw7cUkUHWUqw6lEhrETIEBVWrWzjRk/IK+Wsdt/l1rIys5oFvT4UElVrtzINz5+n4MeDa75T03NJvIBJeAG49Usb5de9MvDo86aR2CDb3L+NmPnD0fPvzlud45mmWZhSU5HJrkZyp6N+6Db/P9ftBvdU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YVH+SHzz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YVH+SHzz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76A46C4CEE7; Wed, 23 Jul 2025 06:25:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753251929; bh=5As5b9hDZCf2zDsqZ/ytZOfi5BQC+vAXvNGPONFtPF0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=YVH+SHzzsT4EFqy6VtGrkUcwwcgbP9/KwOm/A/GBKrZvytCsA+G829kBI1CGWmWQn 5cxoDQkYfmFDuN/ooh9yzVHEqi62jUYeKSoecogCazaHd1OCvHlwO6Ye0OGIs7K2K2 7SAe1obrfgoRBASOrb56kUXvwiHu9YDKNHIan3NjGoUhcNkezMIDOaAhCWyBU0/eJG Tl25PNDHXjhuMW5FzPnSNEl185kAbuDEhhtAN4FHeXrxJUkOdKAfeIXkMZ7RP7vtu8 oGBHSKwPx2N9OS8tr5YQYlvX9G8NhV8Bwf8vYBbgzPZXohI7kuW2LcMzFtgIzCEWRs NxnHYYZw7pRTA== Message-ID: <9220f776-8c82-474b-93fc-ad6b84faf5cc@kernel.org> Date: Wed, 23 Jul 2025 08:25:24 +0200 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 1/2] dt-bindings: dpll: Add clock ID property To: Ivan Vecera Cc: netdev@vger.kernel.org, Vadim Fedorenko , Arkadiusz Kubalewski , Jiri Pirko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Prathosh Satish , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Schmidt , Petr Oros References: <20250717171100.2245998-1-ivecera@redhat.com> <20250717171100.2245998-2-ivecera@redhat.com> <5ff2bb3e-789e-4543-a951-e7f2c0cde80d@kernel.org> <6937b833-4f3b-46cc-84a6-d259c5dc842a@redhat.com> <20250721-lean-strong-sponge-7ab0be@kuoka> <804b4a5f-06bc-4943-8801-2582463c28ef@redhat.com> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq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qY+NaFahT0lRPjYtrTa1v3tem/ JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu 4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5 RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2 H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2 zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A= In-Reply-To: <804b4a5f-06bc-4943-8801-2582463c28ef@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 21/07/2025 14:54, Ivan Vecera wrote: > On 21. 07. 25 11:23 dop., Krzysztof Kozlowski wrote: >> On Fri, Jul 18, 2025 at 02:16:41PM +0200, Ivan Vecera wrote: >>> Hi Krzysztof, >>> >>> ... >>> >>> The clock-id property name may have been poorly chosen. This ID is used by >>> the DPLL subsystem during the registration of a DPLL channel, along with its >>> channel ID. A driver that provides DPLL functionality can compute this >>> clock-id from any unique chip information, such as a serial number. >>> >>> Currently, other drivers that implement DPLL functionality are network >>> drivers, and they generate the clock-id from one of their MAC addresses by >>> extending it to an EUI-64. >>> >>> A standalone DPLL device, like the zl3073x, could use a unique property such >>> as its serial number, but the zl3073x does not have one. This patch-set is >>> motivated by the need to support such devices by allowing the DPLL device ID >>> to be passed via the Device Tree (DT), which is similar to how NICs without >>> an assigned MAC address are handled. >> >> You use words like "unique" and MAC, thus I fail to see how one fixed >> string for all boards matches this. MACs are unique. Property value set >> in DTS for all devices is not. >>> You also need to explain who assigns this value (MACs are assigned) or >> if no one, then why you cannot use random? I also do not see how this >> property solves this... One person would set it to value "1", other to >> "2" but third decide to reuse "1"? How do you solve it for all projects >> in the upstream? > > Some background: Any DPLL driver has to use a unique number during the > DPLL device/channel registration. The number must be unique for the > device across a clock domain (e.g., a single PTP network). > > NIC drivers that expose DPLL functionality usually use their MAC address > to generate such a unique ID. A standalone DPLL driver does not have > this option, as there are no NIC ports and therefore no MAC addresses. > Such a driver can use any other source for the ID (e.g., the chip's > serial number). Unfortunately, this is not the case for zl3073x-based > hardware, as its current firmware revisions do not expose information > that could be used to generate the clock ID (this may change in the > future). > > There is no authority that assigns clock ID value ranges similarly to > MAC addresses (OUIs, etc.), but as mentioned above, uniqueness is > required across a single PTP network so duplicates outside this > single network are not a problem. You did not address main concern. You will configure the same value for all boards, so how do you solve uniqueness within PTP network? > > A randomly generated clock ID works, but the problem is that the value > is different after each reboot. Yes, there is an option to override the > clock ID using the devlink interface, but this also has to be done after > every reboot or power-up. > >> All this must be clearly explained when you add new, generic property. > > Would it be acceptable to define a hardware-specific property, since > only this hardware has this particular problem (the absence of a chip > unique attribute)? I'm referring to a property like 'microchip,id' or > 'microchip,dpll-id' defined in microchip,zl30731.yaml. It does not change anything, no problems solved. Best regards, Krzysztof