From: Ali Rouhi <arouhi@sitime.com>
To: "netdev-bot+sashiko@kernel.org" <netdev-bot+sashiko@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>,
"kuba@kernel.org" <kuba@kernel.org>,
"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 v16 05/13] dpll: sit9531x: read DPLL types and pin properties from system firmware
Date: Tue, 1 Dec 2026 23:51:39 +0000 [thread overview]
Message-ID: <20261201235136.95422-4-arouhi@sitime.com> (raw)
In-Reply-To: <179548083991.3135.257746872384905150@kernel.org>
On Tue, 24 Nov 2026 00:40:39 +0000, netdev-bot+sashiko@kernel.org wrote:
> > + * probe
> > + */
> > +struct sit9531x_ref {
> > + u64 freq;
> > + enum sit9531x_signal_mode sig_mode;
> > +};
>
> [Severity: Low]
> This isn't a bug, but is this kernel-doc accurate at this point in the
> series?
>
> Nothing in this commit writes ref[].sig_mode, so it stays at
> SIT9531X_MODE_SE from the zeroed allocation. That means the differential
> branch in sit9531x_input_pin_label() can't run yet:
>
> if (sitdev->ref[id].sig_mode == SIT9531X_MODE_DE)
> snprintf(props->package_label,
> sizeof(props->package_label), "IN%u", pair);
>
> The binding's pin numbering text ("A pair the loaded configuration runs
> differential is one input, described at 2k") also has no effect until
> then.
>
> A later patch in the series fixes this. In "dpll: sit9531x: register
> DPLL devices and pins", sit9531x_input_mode_fetch() reads
> CLKINx_INPUT_MODE for every pair at probe and sets both lanes:
>
> sitdev->ref[pair * 2].sig_mode = sig_mode;
> sitdev->ref[pair * 2 + 1].sig_mode = sig_mode;
>
> So the per-lane ref[id] lookup here gets the right value. Also, nothing
> calls sit9531x_pin_props_get() at this commit, so no wrong label can be
> registered in the meantime.
>
> Would it be clearer to add this kernel-doc text in the same patch as
> sit9531x_input_mode_fetch()?
Agreed. In v17 the kernel-doc at this patch says only "signal mode of
the input pair"; the probe-time read and its description come with patch
6.
> > + if (!num_freqs && dir == DPLL_PIN_DIRECTION_OUTPUT) {
> > + ranges[j].min = 1;
> > + ranges[j].max = 1000000000ULL; /* 1 GHz */
> > + j++;
>
> [Severity: Low]
> Where does the 1 GHz upper bound in sit9531x_pin_props_get() come from?
> It isn't derived from the part's limits, and it doesn't match the
> setter added later in the series.
>
> In "dpll: sit9531x: add support to get and set frequency on pins",
> sit9531x_output_freq_set() accepts any exact Fvco/N up to U32_MAX:
>
> if (frequency > U32_MAX)
> return -EINVAL;
> ...
> if (divo > SIT9531X_DIVO_MAX)
> return -EINVAL;
>
> Fvco is at least 4.9152 GHz, so dividers from 2 to 7 give about 1.1 to
> 3.9 GHz across the VCO bands. However, dpll_pin_freq_set() in
> drivers/dpll/dpll_netlink.c checks the advertised ranges before it calls
> the driver:
>
> if (!dpll_pin_is_freq_supported(pin, freq)) {
> NL_SET_ERR_MSG_ATTR(extack, a, "frequency is not supported by the device");
> return -EINVAL;
> }
>
> On a board with no supported-frequencies-hz in DT, can a DPLL_CMD_PIN_SET
> above 1 GHz ever reach sit9531x_output_freq_set()? It looks like the
> core would always return -EINVAL for those divider values. The uAPI
> would then report a ceiling that doesn't come from the hardware. I
> couldn't confirm from the tree whether the output buffers can actually
> drive more than 1 GHz.
>
> The 1 Hz lower bound is fine. SIT9531X_DIVO_MAX is GENMASK_ULL(33, 0),
> so 1 Hz is an exact Fvco/N.
>
> Also, the comment says "as the setter checks Fvco/N", but that setter
> only arrives in the later commit mentioned above.
>
> Could the upper bound come from the VCO and divider limits, or from a
> documented output maximum, so the advertised range and the setter
> agree?
It had no source. In v17 an output without supported-frequencies-hz
advertises the datasheet rates, 1 Hz to 800 MHz and 61.44 MHz times 15,
20, 24, 30, 32, 40 and 48, and the setter in patch 9 accepts up to
2949.12 MHz.
next prev parent reply other threads:[~2026-12-01 23:52 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 22:57 [PATCH net-next v16 00/13] dpll: add SiTime SiT9531x DPLL clock driver Ali Rouhi
2026-11-19 22:57 ` [PATCH net-next v16 02/13] dt-bindings: vendor-prefixes: add SiTime Corporation Ali Rouhi
2026-11-19 22:57 ` [PATCH net-next v16 01/13] dpll: omit pin phase attributes the driver has no value for Ali Rouhi
2026-11-24 0:40 ` netdev-bot+sashiko
2026-12-01 23:51 ` Ali Rouhi
2026-11-19 22:57 ` [PATCH net-next v16 03/13] dt-bindings: dpll: add SiTime SiT95316 clock generator Ali Rouhi
2026-11-24 0:40 ` netdev-bot+sashiko
2026-12-01 23:51 ` Ali Rouhi
2026-11-19 22:57 ` [PATCH net-next v16 04/13] dpll: add basic SiTime SiT9531x support Ali Rouhi
2026-11-24 0:40 ` netdev-bot+sashiko
2026-12-01 23:51 ` Ali Rouhi
2026-11-19 22:57 ` [PATCH net-next v16 05/13] dpll: sit9531x: read DPLL types and pin properties from system firmware Ali Rouhi
2026-11-24 0:40 ` netdev-bot+sashiko
2026-12-01 23:51 ` Ali Rouhi [this message]
2026-11-19 22:57 ` [PATCH net-next v16 06/13] dpll: sit9531x: register DPLL devices and pins Ali Rouhi
2026-11-24 0:40 ` netdev-bot+sashiko
2026-12-01 23:51 ` Ali Rouhi
2026-11-19 22:57 ` [PATCH net-next v16 07/13] dpll: sit9531x: implement input pin state on a DPLL Ali Rouhi
2026-11-24 0:40 ` netdev-bot+sashiko
2026-12-01 23:51 ` Ali Rouhi
2026-11-19 22:57 ` [PATCH net-next v16 08/13] dpll: sit9531x: add support to get and set priority on input pins Ali Rouhi
2026-11-24 0:40 ` netdev-bot+sashiko
2026-12-01 23:51 ` Ali Rouhi
2026-11-19 22:57 ` [PATCH net-next v16 09/13] dpll: sit9531x: add support to get and set frequency on pins Ali Rouhi
2026-11-24 0:40 ` netdev-bot+sashiko
2026-12-01 23:51 ` Ali Rouhi
2026-11-19 22:57 ` [PATCH net-next v16 10/13] dpll: sit9531x: implement output pin state on a DPLL Ali Rouhi
2026-11-24 0:40 ` netdev-bot+sashiko
2026-12-01 23:51 ` Ali Rouhi
2026-11-19 22:58 ` [PATCH net-next v16 11/13] dpll: sit9531x: add support to adjust output phase Ali Rouhi
2026-11-24 0:40 ` netdev-bot+sashiko
2026-12-01 23:51 ` Ali Rouhi
2026-11-19 22:58 ` [PATCH net-next v16 13/13] dpll: sit9531x: model the inter-PLL sync line as a pair of pins Ali Rouhi
2026-11-24 0:40 ` netdev-bot+sashiko
2026-12-01 23:51 ` Ali Rouhi
2026-11-19 22:58 ` [PATCH net-next v16 12/13] dpll: sit9531x: add support to get phase offset on the connected input Ali Rouhi
2026-11-24 0:40 ` netdev-bot+sashiko
2026-12-01 23:51 ` Ali Rouhi
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=20261201235136.95422-4-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-bot+sashiko@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