From: Ali Rouhi <arouhi@sitime.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "jiri@resnulli.us" <jiri@resnulli.us>,
"vadim.fedorenko@linux.dev" <vadim.fedorenko@linux.dev>,
"arkadiusz.kubalewski@intel.com" <arkadiusz.kubalewski@intel.com>,
"ivecera@redhat.com" <ivecera@redhat.com>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"robh@kernel.org" <robh@kernel.org>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"cjubran@nvidia.com" <cjubran@nvidia.com>,
"Oleg.Zadorozhnyi@devoxsoftware.com"
<Oleg.Zadorozhnyi@devoxsoftware.com>,
"prabhakar.mahadev-lad.rj@bp.renesas.com"
<prabhakar.mahadev-lad.rj@bp.renesas.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v15 05/13] dpll: sit9531x: read DPLL types and pin properties from system firmware
Date: Thu, 19 Nov 2026 21:20:16 +0000 [thread overview]
Message-ID: <20261119212014.13180-3-arouhi@sitime.com> (raw)
In-Reply-To: <20261117021811.2220116-1-kuba@kernel.org>
On Mon, 16 Nov 2026 18:18:11 -0800, Jakub Kicinski wrote:
> > Read the DPLL type and, for each pin, its label, direction, capabilities
> > and supported frequencies from the firmware node, with defaults for a
> > node that gives none.
>
> [Severity: Low]
> Does this description match what sit9531x_pin_props_get() does?
>
> The direction is not read from the firmware node. It is the dir argument
> passed in by the caller. It only selects which sub-node ("input-pins" or
> "output-pins") sit9531x_prop_pin_fwnode_get() searches.
>
> The capabilities are not read from firmware either. Each pin class gets a
> fixed value: DPLL_PIN_CAPABILITIES_STATE_CAN_CHANGE, or 0 for the XO.
>
> The message also leaves out two things the code does:
>
> - It parses the per-pin connection-type property into DPLL_PIN_TYPE_*.
>
> - The getter writes sitdev->ref[index].freq, using the first
> supported-frequencies-hz entry.
>
> Could the commit message be updated to match the code?
Agreed. The v15 message said the direction and the capabilities come
from the firmware node, and they don't; the message now says which
properties are read from the node and that the driver sets the other
two.
> > + goto err_alloc_ranges;
> > + }
> > +
> > + /* The first listed rate seeds the input's rate */
> > + if (num_freqs > 0 && dir == DPLL_PIN_DIRECTION_INPUT && !xo)
> > + curr_freq = freqs[0];
>
> [Severity: Medium]
> This reads supported-frequencies-hz as u32. Does that match the other
> driver that uses this generic property?
>
> The property is defined in the shared dpll-pin.yaml, which does not give a
> cell width. zl3073x_pin_props_get() reads the same property as u64:
>
> drivers/dpll/zl3073x/prop.c:zl3073x_pin_props_get() {
> ...
> num_freqs = fwnode_property_count_u64(props->fwnode,
> "supported-frequencies-hz");
> ...
> fwnode_property_read_u64_array(props->fwnode,
> "supported-frequencies-hz", freqs,
> num_freqs);
> ...
> }
>
> The microchip,zl30731.yaml examples also use /bits/ 64 for it.
>
> Suppose a SiT9531x board DT follows that convention:
>
> supported-frequencies-hz = /bits/ 64 <10000000>;
>
> That is one item, so it passes the sitime binding's maxItems: 1. But
> fwnode_property_count_u32() returns 2, and freqs[] becomes {0, 10000000}.
>
> curr_freq = freqs[0] is then 0, so sitdev->ref[index].freq never gets
> set. The pin also advertises a DPLL_PIN_FREQUENCY(0) entry next to the
> real rate.
>
> The reverse also breaks: zl3073x would read a 32-bit cell list as packed
> u64 values.
>
> Should the shared binding define one width that both drivers follow, or
> should the sitime binding state the 32-bit width explicitly?
dtschema already types a -hz property as 32-bit cells, which is why an
input written in 64-bit cells fails dt_binding_check. As for the binding
patch, an output written that way advertises an extra 0 Hz entry that
the driver refuses, and the rates still work. No change.
next prev parent reply other threads:[~2026-11-19 21:20 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 20:26 [PATCH net-next v15 00/13] dpll: add SiTime SiT9531x DPLL clock driver Ali Rouhi
2026-11-10 20:26 ` [PATCH net-next v15 01/13] dpll: omit pin phase attributes the driver has no value for Ali Rouhi
2026-11-11 15:35 ` Ivan Vecera
2026-11-10 20:26 ` [PATCH net-next v15 02/13] dt-bindings: vendor-prefixes: add SiTime Corporation Ali Rouhi
2026-11-10 20:26 ` [PATCH net-next v15 04/13] dpll: add basic SiTime SiT9531x support Ali Rouhi
2026-11-17 2:18 ` Jakub Kicinski
2026-11-19 21:20 ` Ali Rouhi
2026-11-10 20:26 ` [PATCH net-next v15 03/13] dt-bindings: dpll: add SiTime SiT95316 clock generator Ali Rouhi
2026-11-17 2:18 ` Jakub Kicinski
2026-11-19 21:20 ` Ali Rouhi
2026-11-10 20:26 ` [PATCH net-next v15 05/13] dpll: sit9531x: read DPLL types and pin properties from system firmware Ali Rouhi
2026-11-17 2:18 ` Jakub Kicinski
2026-11-19 21:20 ` Ali Rouhi [this message]
2026-11-10 20:26 ` [PATCH net-next v15 06/13] dpll: sit9531x: register DPLL devices and pins Ali Rouhi
2026-11-17 2:18 ` Jakub Kicinski
2026-11-19 21:20 ` Ali Rouhi
2026-11-10 20:26 ` [PATCH net-next v15 07/13] dpll: sit9531x: implement input pin state on a DPLL Ali Rouhi
2026-11-10 20:26 ` [PATCH net-next v15 09/13] dpll: sit9531x: add support to get and set frequency on pins Ali Rouhi
2026-11-17 2:18 ` Jakub Kicinski
2026-11-19 21:20 ` Ali Rouhi
2026-11-10 20:26 ` [PATCH net-next v15 08/13] dpll: sit9531x: add support to get and set priority on input pins Ali Rouhi
2026-11-17 2:18 ` Jakub Kicinski
2026-11-19 21:20 ` Ali Rouhi
2026-11-10 20:26 ` [PATCH net-next v15 10/13] dpll: sit9531x: implement output pin state on a DPLL Ali Rouhi
2026-11-17 2:18 ` Jakub Kicinski
2026-11-19 21:20 ` Ali Rouhi
2026-11-10 20:26 ` [PATCH net-next v15 11/13] dpll: sit9531x: add support to adjust output phase Ali Rouhi
2026-11-17 2:18 ` Jakub Kicinski
2026-11-19 21:20 ` Ali Rouhi
2026-11-10 20:26 ` [PATCH net-next v15 12/13] dpll: sit9531x: add support to get phase offset on the connected input pin Ali Rouhi
2026-11-17 2:18 ` Jakub Kicinski
2026-11-19 21:20 ` Ali Rouhi
2026-11-10 20:26 ` [PATCH net-next v15 13/13] dpll: sit9531x: model the inter-PLL sync line as a pair of pins Ali Rouhi
2026-11-17 2:18 ` Jakub Kicinski
2026-11-19 21:20 ` Ali Rouhi
2026-11-17 9:27 ` [PATCH net-next v15 00/13] dpll: add SiTime SiT9531x DPLL clock driver Paolo Abeni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261119212014.13180-3-arouhi@sitime.com \
--to=arouhi@sitime.com \
--cc=Oleg.Zadorozhnyi@devoxsoftware.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=cjubran@nvidia.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=ivecera@redhat.com \
--cc=jiri@resnulli.us \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=robh@kernel.org \
--cc=vadim.fedorenko@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox