[PATCH 1/3] dt-bindings: serial: 8250_omap: Update wakeup-source type property

Kendall Willis posted 3 patches 4 weeks ago
There is a newer version of this series
[PATCH 1/3] dt-bindings: serial: 8250_omap: Update wakeup-source type property
Posted by Kendall Willis 4 weeks ago
Allow the wakeup-source property to be either of type boolean or of a
phandle array. The phandle array points to the system idle states that the
UART can wakeup the system from.

Signed-off-by: Kendall Willis <k-willis@ti.com>
---
 Documentation/devicetree/bindings/serial/8250_omap.yaml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml
index 1859f71297ff2..851a5291b4be4 100644
--- a/Documentation/devicetree/bindings/serial/8250_omap.yaml
+++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml
@@ -69,7 +69,13 @@ properties:
   clock-frequency: true
   current-speed: true
   overrun-throttle-ms: true
-  wakeup-source: true
+
+  wakeup-source:
+    oneOf:
+      - type: boolean
+      - $ref: /schemas/types.yaml#/definitions/phandle-array
+        description:
+          List of phandles to system idle states in which UARTs can wakeup the system.
 
 required:
   - compatible
-- 
2.34.1
Re: [PATCH 1/3] dt-bindings: serial: 8250_omap: Update wakeup-source type property
Posted by Rob Herring 3 weeks, 6 days ago
On Thu, Sep 04, 2025 at 04:24:53PM -0500, Kendall Willis wrote:
> Allow the wakeup-source property to be either of type boolean or of a
> phandle array. The phandle array points to the system idle states that the
> UART can wakeup the system from.
> 
> Signed-off-by: Kendall Willis <k-willis@ti.com>
> ---
>  Documentation/devicetree/bindings/serial/8250_omap.yaml | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml
> index 1859f71297ff2..851a5291b4be4 100644
> --- a/Documentation/devicetree/bindings/serial/8250_omap.yaml
> +++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml
> @@ -69,7 +69,13 @@ properties:
>    clock-frequency: true
>    current-speed: true
>    overrun-throttle-ms: true
> -  wakeup-source: true
> +
> +  wakeup-source:
> +    oneOf:
> +      - type: boolean
> +      - $ref: /schemas/types.yaml#/definitions/phandle-array
> +        description:
> +          List of phandles to system idle states in which UARTs can wakeup the system.

You don't need to be defining the type here. Did you find either type 
didn't work?
Re: [PATCH 1/3] dt-bindings: serial: 8250_omap: Update wakeup-source type property
Posted by Kendall Willis 3 weeks, 2 days ago
On 9/5/25 15:38, Rob Herring wrote:
> On Thu, Sep 04, 2025 at 04:24:53PM -0500, Kendall Willis wrote:
>> Allow the wakeup-source property to be either of type boolean or of a
>> phandle array. The phandle array points to the system idle states that the
>> UART can wakeup the system from.
>>
>> Signed-off-by: Kendall Willis <k-willis@ti.com>
>> ---
>>   Documentation/devicetree/bindings/serial/8250_omap.yaml | 8 +++++++-
>>   1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml
>> index 1859f71297ff2..851a5291b4be4 100644
>> --- a/Documentation/devicetree/bindings/serial/8250_omap.yaml
>> +++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml
>> @@ -69,7 +69,13 @@ properties:
>>     clock-frequency: true
>>     current-speed: true
>>     overrun-throttle-ms: true
>> -  wakeup-source: true
>> +
>> +  wakeup-source:
>> +    oneOf:
>> +      - type: boolean
>> +      - $ref: /schemas/types.yaml#/definitions/phandle-array
>> +        description:
>> +          List of phandles to system idle states in which UARTs can wakeup the system.
> 
> You don't need to be defining the type here. Did you find either type
> didn't work?

You're right, this should not be redefined. I'll be dropping this patch 
in the next version. Thanks for reviewing :)

Best,
Kendall
Re: [PATCH 1/3] dt-bindings: serial: 8250_omap: Update wakeup-source type property
Posted by Conor Dooley 3 weeks, 6 days ago
On Thu, Sep 04, 2025 at 04:24:53PM -0500, Kendall Willis wrote:
> Allow the wakeup-source property to be either of type boolean or of a
> phandle array. The phandle array points to the system idle states that the
> UART can wakeup the system from.
> 
> Signed-off-by: Kendall Willis <k-willis@ti.com>
> ---
>  Documentation/devicetree/bindings/serial/8250_omap.yaml | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml
> index 1859f71297ff2..851a5291b4be4 100644
> --- a/Documentation/devicetree/bindings/serial/8250_omap.yaml
> +++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml
> @@ -69,7 +69,13 @@ properties:
>    clock-frequency: true
>    current-speed: true
>    overrun-throttle-ms: true
> -  wakeup-source: true
> +
> +  wakeup-source:
> +    oneOf:
> +      - type: boolean
> +      - $ref: /schemas/types.yaml#/definitions/phandle-array
> +        description:
> +          List of phandles to system idle states in which UARTs can wakeup the system.

Is there a single other instance of the wakeup-source property being
used like this?

>  
>  required:
>    - compatible
> -- 
> 2.34.1
> 
Re: [PATCH 1/3] dt-bindings: serial: 8250_omap: Update wakeup-source type property
Posted by Markus Schneider-Pargmann 3 weeks, 2 days ago
On Fri Sep 5, 2025 at 8:38 PM CEST, Conor Dooley wrote:
> On Thu, Sep 04, 2025 at 04:24:53PM -0500, Kendall Willis wrote:
>> Allow the wakeup-source property to be either of type boolean or of a
>> phandle array. The phandle array points to the system idle states that the
>> UART can wakeup the system from.
>> 
>> Signed-off-by: Kendall Willis <k-willis@ti.com>
>> ---
>>  Documentation/devicetree/bindings/serial/8250_omap.yaml | 8 +++++++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
>> 
>> diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml
>> index 1859f71297ff2..851a5291b4be4 100644
>> --- a/Documentation/devicetree/bindings/serial/8250_omap.yaml
>> +++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml
>> @@ -69,7 +69,13 @@ properties:
>>    clock-frequency: true
>>    current-speed: true
>>    overrun-throttle-ms: true
>> -  wakeup-source: true
>> +
>> +  wakeup-source:
>> +    oneOf:
>> +      - type: boolean
>> +      - $ref: /schemas/types.yaml#/definitions/phandle-array
>> +        description:
>> +          List of phandles to system idle states in which UARTs can wakeup the system.
>
> Is there a single other instance of the wakeup-source property being
> used like this?

This was added to the dt-schema repository:
  https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/wakeup-source.yaml

I don't think this needs to be repeated in every binding, so I think you
can just drop this unless there are specifics for this device.

Best
Markus
Re: [PATCH 1/3] dt-bindings: serial: 8250_omap: Update wakeup-source type property
Posted by Kendall Willis 3 weeks, 2 days ago
On 9/9/25 04:05, Markus Schneider-Pargmann wrote:
> On Fri Sep 5, 2025 at 8:38 PM CEST, Conor Dooley wrote:
>> On Thu, Sep 04, 2025 at 04:24:53PM -0500, Kendall Willis wrote:
>>> Allow the wakeup-source property to be either of type boolean or of a
>>> phandle array. The phandle array points to the system idle states that the
>>> UART can wakeup the system from.
>>>
>>> Signed-off-by: Kendall Willis <k-willis@ti.com>
>>> ---
>>>   Documentation/devicetree/bindings/serial/8250_omap.yaml | 8 +++++++-
>>>   1 file changed, 7 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml
>>> index 1859f71297ff2..851a5291b4be4 100644
>>> --- a/Documentation/devicetree/bindings/serial/8250_omap.yaml
>>> +++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml
>>> @@ -69,7 +69,13 @@ properties:
>>>     clock-frequency: true
>>>     current-speed: true
>>>     overrun-throttle-ms: true
>>> -  wakeup-source: true
>>> +
>>> +  wakeup-source:
>>> +    oneOf:
>>> +      - type: boolean
>>> +      - $ref: /schemas/types.yaml#/definitions/phandle-array
>>> +        description:
>>> +          List of phandles to system idle states in which UARTs can wakeup the system.
>>
>> Is there a single other instance of the wakeup-source property being
>> used like this?
> 
> This was added to the dt-schema repository:
>    https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/wakeup-source.yaml
> 
> I don't think this needs to be repeated in every binding, so I think you
> can just drop this unless there are specifics for this device.
> 
> Best
> Markus

Okay, I will likely drop this patch in the next version. Thanks for 
reviewing :)

Best,
Kendall
Re: [PATCH 1/3] dt-bindings: serial: 8250_omap: Update wakeup-source type property
Posted by Dhruva Gole 3 weeks, 6 days ago
On Sep 05, 2025 at 19:38:00 +0100, Conor Dooley wrote:
> On Thu, Sep 04, 2025 at 04:24:53PM -0500, Kendall Willis wrote:
> > Allow the wakeup-source property to be either of type boolean or of a
> > phandle array. The phandle array points to the system idle states that the
> > UART can wakeup the system from.
> > 
> > Signed-off-by: Kendall Willis <k-willis@ti.com>
> > ---
> >  Documentation/devicetree/bindings/serial/8250_omap.yaml | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml
> > index 1859f71297ff2..851a5291b4be4 100644
> > --- a/Documentation/devicetree/bindings/serial/8250_omap.yaml
> > +++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml
> > @@ -69,7 +69,13 @@ properties:
> >    clock-frequency: true
> >    current-speed: true
> >    overrun-throttle-ms: true
> > -  wakeup-source: true
> > +
> > +  wakeup-source:
> > +    oneOf:
> > +      - type: boolean
> > +      - $ref: /schemas/types.yaml#/definitions/phandle-array
> > +        description:
> > +          List of phandles to system idle states in which UARTs can wakeup the system.
> 
> Is there a single other instance of the wakeup-source property being
> used like this?

I think there's an ongoing thread here [1],
[1] https://lore.kernel.org/all/20250820-topic-mcan-wakeup-source-v6-12-v9-1-0ac13f2ddd67@baylibre.com/


-- 
Best regards,
Dhruva Gole
Texas Instruments Incorporated