From: sashiko-bot@kernel.org
To: "Ali Rouhi" <arouhi@sitime.com>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH net-next v16 04/13] dpll: add basic SiTime SiT9531x support
Date: Fri, 20 Nov 2026 22:58:27 +0000 [thread overview]
Message-ID: <sashiko-outbox-226320@kernel.org> (raw)
In-Reply-To: <20261119225752.41846-5-arouhi@sitime.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] dpll: sit9531x: missing regulator enable in
sit9531x_dev_probe()
--
commit 7413ebc82cba0bf0979b71e1af2d94d59391bd01
Author: Oleg Zadorozhnyi <Oleg.Zadorozhnyi@devoxsoftware.com>
dpll: add basic SiTime SiT9531x support
This commit adds the core I2C driver, probe handling, and paged register
accessors for the SiTime SiT9531x DPLL family.
> diff --git a/drivers/dpll/sit9531x/core.c b/drivers/dpll/sit9531x/core.c
> new file mode 100644
> index 0000000000000..99dd5e70dc5e6
> --- /dev/null
> +++ b/drivers/dpll/sit9531x/core.c
[ ... ]
> +static int sit9531x_dev_probe(struct sit9531x_dev *sitdev)
> +{
> + struct clk *xtal_clk;
> + u8 variant_id;
> + int rc;
> +
> + /*
> + * Request before enabling the XO: a probe deferral would gate the XO
> + * and remove the reference of a running part.
> + */
> + sitdev->reset_gpio = devm_gpiod_get_optional(sitdev->dev, "reset",
> + GPIOD_ASIS);
> + if (IS_ERR(sitdev->reset_gpio))
> + return dev_err_probe(sitdev->dev, PTR_ERR(sitdev->reset_gpio),
> + "Failed to request reset gpio\n");
> +
> + /*
> + * Fvco = Fref * (DIVN + frac/2^32); Fref is the rate of the XO feeding
> + * XIN/XO_CLK.
> + */
> + xtal_clk = devm_clk_get_optional_enabled(sitdev->dev, "xtal");
> + if (IS_ERR(xtal_clk))
> + return dev_err_probe(sitdev->dev, PTR_ERR(xtal_clk),
> + "Failed to get xtal clock\n");
> + sitdev->xtal_freq = clk_get_rate(xtal_clk);
> + if (!sitdev->xtal_freq) {
> + u32 freq;
> +
> + if (!device_property_read_u32(sitdev->dev, "clock-frequency",
> + &freq))
> + sitdev->xtal_freq = freq;
> + }
> + if (!sitdev->xtal_freq)
> + return dev_err_probe(sitdev->dev, -EINVAL,
> + "no xtal rate: provide clocks=<&xo> + clock-names=\"xtal\", or a clock-frequency property\n");
> +
> + /*
> + * Keep reset deasserted, never pulse it: a reset discards the
> + * configuration from efuse or a pre-probe NVM blob. Release it before
> + * the first I2C access.
> + */
> + if (sitdev->reset_gpio) {
> + rc = gpiod_direction_output(sitdev->reset_gpio, 0);
> + if (rc)
> + return dev_err_probe(sitdev->dev, rc,
> + "Failed to release the reset line\n");
> + fsleep(10000); /* internal boot after release */
> + }
> +
> + rc = sit9531x_read_variant_id(sitdev, &variant_id);
[Severity: Medium]
As reported by Jakub Kicinski on v15 [1], should sit9531x_dev_probe() request
and enable the device power supplies before releasing reset_gpio and performing
the first I2C read?
The sitime,sit95316.yaml DT binding defines vdd-supply, vddin-supply,
vdds-supply, and the vddoN-supply rails, but the driver never claims or
enables any regulators. On boards with switchable rails that are off at boot,
sit9531x_read_variant_id() will fail against an unpowered chip; if the
bootloader left a non-always-on regulator enabled, regulator_late_cleanup()
will turn it off at late_initcall time while the driver is bound, powering
down the device and losing its configuration.
[1] https://lore.kernel.org/r/20261117021809.2220080-1-kuba@kernel.org
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261119225752.41846-1-arouhi@sitime.com?part=4
next prev parent reply other threads:[~2026-11-20 22:58 UTC|newest]
Thread overview: 21+ 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 01/13] dpll: omit pin phase attributes the driver has no value for 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 04/13] dpll: add basic SiTime SiT9531x support Ali Rouhi
2026-11-20 22:58 ` sashiko-bot [this message]
2026-11-19 22:57 ` [PATCH net-next v16 03/13] dt-bindings: dpll: add SiTime SiT95316 clock generator 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-19 22:57 ` [PATCH net-next v16 06/13] dpll: sit9531x: register DPLL devices and pins Ali Rouhi
2026-11-20 22:58 ` sashiko-bot
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-19 22:57 ` [PATCH net-next v16 07/13] dpll: sit9531x: implement input pin state on a DPLL Ali Rouhi
2026-11-20 22:58 ` sashiko-bot
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-20 22:58 ` sashiko-bot
2026-11-19 22:57 ` [PATCH net-next v16 10/13] dpll: sit9531x: implement output pin state on a DPLL Ali Rouhi
2026-11-20 22:58 ` sashiko-bot
2026-11-19 22:58 ` [PATCH net-next v16 11/13] dpll: sit9531x: add support to adjust output phase Ali Rouhi
2026-11-20 22:58 ` sashiko-bot
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-20 22:58 ` sashiko-bot
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
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=sashiko-outbox-226320@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=arouhi@sitime.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.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