All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Masney <bmasney@redhat.com>
To: Jia Wang <wangjia@ultrarisc.com>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: clock: ultrarisc: Add DP1000 Clock Controller
Date: Tue, 7 Jul 2026 15:44:30 -0400	[thread overview]
Message-ID: <ak1XHlCwsrj7FjFB@redhat.com> (raw)
In-Reply-To: <20260617-ultrarisc-clock-v2-1-9cb16083e15e@ultrarisc.com>

Hi Krzysztof / Conor,

On Wed, Jun 17, 2026 at 02:02:54PM +0800, Jia Wang wrote:
> diff --git a/include/dt-bindings/clock/ultrarisc,dp1000-clk.h b/include/dt-bindings/clock/ultrarisc,dp1000-clk.h
> new file mode 100644
> index 000000000000..751125f99965
> --- /dev/null
> +++ b/include/dt-bindings/clock/ultrarisc,dp1000-clk.h
> @@ -0,0 +1,27 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
> +#ifndef _DT_BINDINGS_CLOCK_ULTRARISC_DP1000_CLK_H
> +#define _DT_BINDINGS_CLOCK_ULTRARISC_DP1000_CLK_H
> +
> +#define DP1000_CLK_SYSPLL		0
> +#define DP1000_CLK_SYSPLL_DIV2		1
> +#define DP1000_CLK_SUBSYS		2
> +#define DP1000_CLK_GMAC			3
> +#define DP1000_CLK_UART_ROOT		4
> +#define DP1000_CLK_I2C_ROOT		5
> +#define DP1000_CLK_SPI_ROOT		6
> +#define DP1000_CLK_PCIE_DBI		7
> +#define DP1000_CLK_PCIEX4_CORE		8
> +#define DP1000_CLK_PCIEX16_CORE		9
> +#define DP1000_CLK_PCIE_AUX		10
> +#define DP1000_CLK_UART0		11
> +#define DP1000_CLK_UART1		12
> +#define DP1000_CLK_UART2		13
> +#define DP1000_CLK_UART3		14
> +#define DP1000_CLK_I2C0			15
> +#define DP1000_CLK_I2C1			16
> +#define DP1000_CLK_I2C2			17
> +#define DP1000_CLK_I2C3			18
> +#define DP1000_CLK_SPI0			19
> +#define DP1000_CLK_SPI1			20

A common scenario for the driver side is that it needs to know how many
clocks are present. For example, the driver in this series has the
following in drivers/clk/ultrarisc/clk-dp1000.c:

    #define DP1000_CLK_NUM                       21

Which seems a bit fragile to me having it in a separate file.

I've seen where some dt-bindings will have the define right below the
last clock, so DP1000_CLK_SPI1 in this particular case.

There are a few clock dt-bindings that have it this way. For example,
see include/dt-bindings/clock/nuvoton,npcm7xx-clock.h. Personally, I
prefer it this way, however I can see where the argument could be made
that this doesn't belong in the dt-bindings.

Do you have guidance for what you'd like to see?

Brian


  parent reply	other threads:[~2026-07-07 19:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17  6:02 [PATCH v2 0/2] clk: ultrarisc: add DP1000 clock support Jia Wang
2026-06-17  6:02 ` Jia Wang via B4 Relay
2026-06-17  6:02 ` [PATCH v2 1/2] dt-bindings: clock: ultrarisc: Add DP1000 Clock Controller Jia Wang
2026-06-17  6:02   ` Jia Wang via B4 Relay
2026-06-17 15:56   ` Conor Dooley
2026-07-07 19:44   ` Brian Masney [this message]
2026-06-17  6:02 ` [PATCH v2 2/2] clk: ultrarisc: add DP1000 clock driver Jia Wang
2026-06-17  6:02   ` Jia Wang via B4 Relay
2026-06-25  1:04   ` Jia Wang
2026-07-07 19:54   ` Brian Masney
2026-07-08  7:53     ` Jia Wang
2026-07-08 14:30       ` Brian Masney
2026-07-13  9:13         ` Jia Wang

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=ak1XHlCwsrj7FjFB@redhat.com \
    --to=bmasney@redhat.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=wangjia@ultrarisc.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.