[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL_Jsq+uhgrVJuPv_R9BVKUvwU44sGa9Y2rQRWB=Z4BhLssoGA@mail.gmail.com>
Date: Wed, 9 Apr 2025 09:10:39 -0500
From: Rob Herring <robh@...nel.org>
To: Alex Elder <elder@...cstar.com>
Cc: krzk+dt@...nel.org, conor+dt@...nel.org, gregkh@...uxfoundation.org,
jirislaby@...nel.org, benjamin.larsson@...exis.eu,
bastien.curutchet@...tlin.com, andriy.shevchenko@...ux.intel.com,
u.kleine-koenig@...libre.com, lkundrak@...sk, devicetree@...r.kernel.org,
linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: serial: 8250: support an optional second clock
On Tue, Apr 8, 2025 at 12:51 PM Alex Elder <elder@...cstar.com> wrote:
>
> The SpacemiT UART driver requires a bus clock to be enabled in addition
> to the primary function clock. Add the option to specify two clocks
> for an 8250-compatible UART, named "core" and "bus".
This should be conditional on the compatible associated with 2 clocks.
>
> Signed-off-by: Alex Elder <elder@...cstar.com>
> ---
> Documentation/devicetree/bindings/serial/8250.yaml | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/serial/8250.yaml b/Documentation/devicetree/bindings/serial/8250.yaml
> index dc0d52920575f..1adf935b7f36f 100644
> --- a/Documentation/devicetree/bindings/serial/8250.yaml
> +++ b/Documentation/devicetree/bindings/serial/8250.yaml
> @@ -135,7 +135,11 @@ properties:
> clock-frequency: true
>
> clocks:
> - maxItems: 1
> + oneOf:
> + - maxItems: 1
> + - items:
> + - const: core
> + - const: bus
'clocks' does not take string values. You want:
minItems: 1
items:
- description: ...
- description: ...
Then an if/then schema with 'minItems: 2' for spacemit and 'maxItems:
1' for everyone else.
Powered by blists - more mailing lists