mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ivan Vecera <ivecera@redhat.com>
To: Ali Rouhi <arouhi@sitime.com>, Jiri Pirko <jiri@resnulli.us>
Cc: Vadim Fedorenko <vadim.fedorenko@linux.dev>,
	Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Carolina Jubran <cjubran@nvidia.com>,
	Oleg Zadorozhnyi <Oleg.Zadorozhnyi@devoxsoftware.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 v12 05/12] dpll: sit9531x: register DPLL devices and pins
Date: Tue, 13 Oct 2026 11:35:42 +0200	[thread overview]
Message-ID: <ce4b7f56-70c6-4436-a453-91fdc13ef634@redhat.com> (raw)
In-Reply-To: <20261009183151.78497-6-arouhi@sitime.com>

On 10/9/26 20:31, Ali Rouhi wrote:
> From: Oleg Zadorozhnyi <Oleg.Zadorozhnyi@devoxsoftware.com>
> 
> Register each of the four on-chip PLLs as a DPLL device, and the crystal
> that feeds them as a pin on each.  The inputs and the outputs need a
> state callback the core insists on before it will take a pin, so they are
> registered by the patches that add theirs; what this patch builds is the
> device, the pin machinery around it, and the one pin whose state never
> changes.
> 
> The callbacks a device needs from the start come with it -- lock status
> and the operating mode -- along with the direction of each pin.  The rest
> of the pin operations follow in later patches.  The device selects its
> reference by priority, so automatic is the one mode advertised.  A
> profile that sets manual active select is still reported as automatic,
> since nothing in the driver drives a manual selection, and probe warns
> about it.
> 
> Both need somewhere to read from.  The chip reports its state across
> several pages, and a netlink call must not turn into a burst of I2C
> transactions, so a kthread worker polls the interesting registers twice a
> second into a per-input and per-PLL cache, and the callbacks answer from
> it.  Output state is not polled: it changes only through a request, and
> the getter reads the device again when one could not be confirmed.  The
> same tick compares the new state against the old and notifies the core
> only on a change; the first tick takes the baseline.  Where a board wires
> INTRB, the interrupt schedules that tick immediately rather than
> replacing it: the poll stays as the fallback, since this device gives no
> way to be sure an edge was not missed.
> 
> Which PLL drives an output is read from the PLLs' output-enable masks,
> which PLLC and PLLD keep in mirrored bit order.  An output two masks
> claim goes to the first PLL, with a warning.
> 
> The clock_id that keys a device in the DPLL core is built from the SiTime
> OUI and the part's position: sixteen bits of the I2C bus number and the
> address.  Bus numbers are not bounded by the number of adapters -- a DT
> alias or a mux child can number a bus 256 or above on a board with a
> handful of them -- so the bus gets the width; the variant needs no field,
> since one address on one bus holds one part.
> 
> Signed-off-by: Oleg Zadorozhnyi <Oleg.Zadorozhnyi@devoxsoftware.com>
> Assisted-by: LLM
> Signed-off-by: Ali Rouhi <arouhi@sitime.com>
> ---
>   drivers/dpll/sit9531x/Kconfig  |    4 +
>   drivers/dpll/sit9531x/Makefile |    2 +-
>   drivers/dpll/sit9531x/core.c   | 1763 ++++++++++++++++++++++++++++++--
>   drivers/dpll/sit9531x/core.h   |  258 ++++-
>   drivers/dpll/sit9531x/dpll.c   |  411 ++++++++
>   drivers/dpll/sit9531x/dpll.h   |   68 ++
>   drivers/dpll/sit9531x/regs.h   |  259 ++++-
>   7 files changed, 2671 insertions(+), 94 deletions(-)
>   create mode 100644 drivers/dpll/sit9531x/dpll.c
>   create mode 100644 drivers/dpll/sit9531x/dpll.h
> 
Reviewed-by: Ivan Vecera <ivecera@redhat.com>


  reply	other threads:[~2026-10-13  9:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09 18:31 [PATCH net-next v12 00/12] dpll: add SiTime SiT9531x DPLL clock driver Ali Rouhi
2026-10-09 18:31 ` [PATCH net-next v12 01/12] dt-bindings: vendor-prefixes: add SiTime Corporation Ali Rouhi
2026-10-09 18:31 ` [PATCH net-next v12 02/12] dt-bindings: dpll: add SiTime SiT95316 clock generator Ali Rouhi
2026-10-09 18:31 ` [PATCH net-next v12 03/12] dpll: add basic SiTime SiT9531x support Ali Rouhi
2026-10-13  9:11   ` Ivan Vecera
2026-10-09 18:31 ` [PATCH net-next v12 05/12] dpll: sit9531x: register DPLL devices and pins Ali Rouhi
2026-10-13  9:35   ` Ivan Vecera [this message]
2026-10-09 18:31 ` [PATCH net-next v12 04/12] dpll: sit9531x: read DPLL types and pin properties from system firmware Ali Rouhi
2026-10-13  9:14   ` Ivan Vecera
2026-10-09 18:31 ` [PATCH net-next v12 06/12] dpll: sit9531x: implement input pin state on a DPLL Ali Rouhi
2026-10-13  9:37   ` Ivan Vecera
2026-10-09 18:31 ` [PATCH net-next v12 07/12] dpll: sit9531x: add support to get and set priority on input pins Ali Rouhi
2026-10-13  9:43   ` Ivan Vecera
2026-10-09 18:31 ` [PATCH net-next v12 08/12] dpll: sit9531x: add support to get and set frequency on pins Ali Rouhi
2026-10-13  9:43   ` Ivan Vecera
2026-10-09 18:31 ` [PATCH net-next v12 10/12] dpll: sit9531x: add support to adjust output phase Ali Rouhi
2026-10-13 10:02   ` Ivan Vecera
2026-10-09 18:31 ` [PATCH net-next v12 09/12] dpll: sit9531x: implement output pin state on a DPLL Ali Rouhi
2026-10-13  9:46   ` Ivan Vecera
2026-10-09 18:31 ` [PATCH net-next v12 11/12] dpll: sit9531x: add support to get phase offset on the connected input pin Ali Rouhi
2026-10-13 10:10   ` Ivan Vecera
2026-10-09 18:32 ` [PATCH net-next v12 12/12] dpll: sit9531x: model the inter-PLL sync net as a pair of pins 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=ce4b7f56-70c6-4436-a453-91fdc13ef634@redhat.com \
    --to=ivecera@redhat.com \
    --cc=Oleg.Zadorozhnyi@devoxsoftware.com \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=arouhi@sitime.com \
    --cc=cjubran@nvidia.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --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=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

all inboxes | Powered by JetHome®