* DT checker RS485 unevaluated property, 8250 OMAP UART
@ 2023-05-19 16:09 Francesco Dolcini
2023-05-27 6:19 ` Vignesh Raghavendra
0 siblings, 1 reply; 5+ messages in thread
From: Francesco Dolcini @ 2023-05-19 16:09 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Vignesh Raghavendra
Cc: linux-serial, devicetree, Greg Kroah-Hartman, Lukas Wunner
Hello,
while writing a new DT file I stumbled across this warning
.../arch/arm64/boot/dts/ti/k3-am625-verdin-wifi-dev.dtb: serial@2810000: Unevaluated properties are not allowed ('rs485-rts-active-high' was unexpected)
From schema: .../Documentation/devicetree/bindings/serial/8250_omap.yaml
The property is currently used in the OMAP serial driver
drivers/tty/serial/omap-serial.c
1511: if (of_property_read_bool(np, "rs485-rts-active-high")) {
and a few DT files.
I do require it, despite being wrong, because of some legacy reasons [1].
Before commit 767d3467eb60 ("dt-bindings: serial: 8250_omap: drop rs485
properties") this property was allowed.
What should I do?
- ignore the warning
- send a patch to reintroduce `rs485-rts-active-high: true` in 8250_omap.yaml
- something else?
I would be inclined to send the following patch, do you agree?
diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml
index eb3488d8f9ee..e634e98aa994 100644
--- a/Documentation/devicetree/bindings/serial/8250_omap.yaml
+++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml
@@ -70,6 +70,7 @@ properties:
dsr-gpios: true
rng-gpios: true
dcd-gpios: true
+ rs485-rts-active-low: true
rts-gpio: true
power-domains: true
clock-frequency: true
[1] https://lore.kernel.org/all/ZBItlBhzo+YETcJO@francesco-nb.int.toradex.com/
Francesco
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: DT checker RS485 unevaluated property, 8250 OMAP UART
2023-05-19 16:09 DT checker RS485 unevaluated property, 8250 OMAP UART Francesco Dolcini
@ 2023-05-27 6:19 ` Vignesh Raghavendra
2023-05-30 10:13 ` Francesco Dolcini
0 siblings, 1 reply; 5+ messages in thread
From: Vignesh Raghavendra @ 2023-05-27 6:19 UTC (permalink / raw)
To: Francesco Dolcini, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-serial, devicetree, Greg Kroah-Hartman, Lukas Wunner
On 19/05/23 9:39 pm, Francesco Dolcini wrote:
> Hello,
> while writing a new DT file I stumbled across this warning
>
> .../arch/arm64/boot/dts/ti/k3-am625-verdin-wifi-dev.dtb: serial@2810000: Unevaluated properties are not allowed ('rs485-rts-active-high' was unexpected)
> From schema: .../Documentation/devicetree/bindings/serial/8250_omap.yaml
>
> The property is currently used in the OMAP serial driver
>
> drivers/tty/serial/omap-serial.c
> 1511: if (of_property_read_bool(np, "rs485-rts-active-high")) {
>
Would be it possible to update driver to imply rs485-rts-active-high"
this by lack of rs485-rts-active-low property in DT instead?
> and a few DT files.
>
> I do require it, despite being wrong, because of some legacy reasons [1].
>
> Before commit 767d3467eb60 ("dt-bindings: serial: 8250_omap: drop rs485
> properties") this property was allowed.
>
> What should I do?
> - ignore the warning
> - send a patch to reintroduce `rs485-rts-active-high: true` in 8250_omap.yaml
> - something else?
>
> I would be inclined to send the following patch, do you agree?
>
> diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml
> index eb3488d8f9ee..e634e98aa994 100644
> --- a/Documentation/devicetree/bindings/serial/8250_omap.yaml
> +++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml
> @@ -70,6 +70,7 @@ properties:
> dsr-gpios: true
> rng-gpios: true
> dcd-gpios: true
> + rs485-rts-active-low: true
I believe you mean rs485-rts-active-high here
> rts-gpio: true
> power-domains: true
> clock-frequency: true
>
> [1] https://lore.kernel.org/all/ZBItlBhzo+YETcJO@francesco-nb.int.toradex.com/
>
Also, I hope you are using 8250_ompa.c and not omap-serial.c for newer
designs. omap-serial.c is mostly there to support legacy SoCs and not to
be used with K3 SoCs.
Regards
Vignesh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: DT checker RS485 unevaluated property, 8250 OMAP UART
2023-05-27 6:19 ` Vignesh Raghavendra
@ 2023-05-30 10:13 ` Francesco Dolcini
2023-05-30 11:38 ` Krzysztof Kozlowski
0 siblings, 1 reply; 5+ messages in thread
From: Francesco Dolcini @ 2023-05-30 10:13 UTC (permalink / raw)
To: Vignesh Raghavendra
Cc: Francesco Dolcini, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, linux-serial, devicetree, Greg Kroah-Hartman,
Lukas Wunner
On Sat, May 27, 2023 at 11:49:17AM +0530, Vignesh Raghavendra wrote:
> On 19/05/23 9:39 pm, Francesco Dolcini wrote:
> > Hello,
> > while writing a new DT file I stumbled across this warning
> >
> > .../arch/arm64/boot/dts/ti/k3-am625-verdin-wifi-dev.dtb: serial@2810000: Unevaluated properties are not allowed ('rs485-rts-active-high' was unexpected)
> > From schema: .../Documentation/devicetree/bindings/serial/8250_omap.yaml
> >
> > The property is currently used in the OMAP serial driver
> >
> > drivers/tty/serial/omap-serial.c
> > 1511: if (of_property_read_bool(np, "rs485-rts-active-high")) {
> >
>
> Would be it possible to update driver to imply rs485-rts-active-high"
> this by lack of rs485-rts-active-low property in DT instead?
What about backward compatibility? This is what is done in all drivers
apart omap-serial if I'm not wrong.
> > I would be inclined to send the following patch, do you agree?
> >
> > diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml
> > index eb3488d8f9ee..e634e98aa994 100644
> > --- a/Documentation/devicetree/bindings/serial/8250_omap.yaml
> > +++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml
> > @@ -70,6 +70,7 @@ properties:
> > dsr-gpios: true
> > rng-gpios: true
> > dcd-gpios: true
> > + rs485-rts-active-low: true
>
> I believe you mean rs485-rts-active-high here
whoops, yes of course.
>
> > rts-gpio: true
> > power-domains: true
> > clock-frequency: true
> >
> > [1] https://lore.kernel.org/all/ZBItlBhzo+YETcJO@francesco-nb.int.toradex.com/
> >
>
> Also, I hope you are using 8250_ompa.c and not omap-serial.c for newer
> designs. omap-serial.c is mostly there to support legacy SoCs and not to
> be used with K3 SoCs.
Thanks for this head-up. This confused myself, while the issue I
reported here is real, it does affect only omap-serial.c. In my case I
am using 8250_omap.c and I can just omit the property from the DTS as
generally expected!
Francesco
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: DT checker RS485 unevaluated property, 8250 OMAP UART
2023-05-30 10:13 ` Francesco Dolcini
@ 2023-05-30 11:38 ` Krzysztof Kozlowski
2023-05-30 13:24 ` Francesco Dolcini
0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-30 11:38 UTC (permalink / raw)
To: Francesco Dolcini, Vignesh Raghavendra
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-serial,
devicetree, Greg Kroah-Hartman, Lukas Wunner
On 30/05/2023 12:13, Francesco Dolcini wrote:
> On Sat, May 27, 2023 at 11:49:17AM +0530, Vignesh Raghavendra wrote:
>> On 19/05/23 9:39 pm, Francesco Dolcini wrote:
>>> Hello,
>>> while writing a new DT file I stumbled across this warning
>>>
>>> .../arch/arm64/boot/dts/ti/k3-am625-verdin-wifi-dev.dtb: serial@2810000: Unevaluated properties are not allowed ('rs485-rts-active-high' was unexpected)
>>> From schema: .../Documentation/devicetree/bindings/serial/8250_omap.yaml
>>>
>>> The property is currently used in the OMAP serial driver
>>>
>>> drivers/tty/serial/omap-serial.c
>>> 1511: if (of_property_read_bool(np, "rs485-rts-active-high")) {
>>>
>>
>> Would be it possible to update driver to imply rs485-rts-active-high"
>> this by lack of rs485-rts-active-low property in DT instead?
>
> What about backward compatibility? This is what is done in all drivers
> apart omap-serial if I'm not wrong.
Uh, I removed too much in that commit. We need to keep backwards
compatibility because driver used default (missing property) as active low.
>
>>> I would be inclined to send the following patch, do you agree?
>>>
>>> diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml
>>> index eb3488d8f9ee..e634e98aa994 100644
>>> --- a/Documentation/devicetree/bindings/serial/8250_omap.yaml
>>> +++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml
>>> @@ -70,6 +70,7 @@ properties:
>>> dsr-gpios: true
>>> rng-gpios: true
>>> dcd-gpios: true
>>> + rs485-rts-active-low: true
>>
>> I believe you mean rs485-rts-active-high here
> whoops, yes of course.
Yes, with a Fixes tag.
>
>>
>>> rts-gpio: true
>>> power-domains: true
>>> clock-frequency: true
>>>
>>> [1] https://lore.kernel.org/all/ZBItlBhzo+YETcJO@francesco-nb.int.toradex.com/
>>>
>>
>> Also, I hope you are using 8250_ompa.c and not omap-serial.c for newer
>> designs. omap-serial.c is mostly there to support legacy SoCs and not to
>> be used with K3 SoCs.
>
> Thanks for this head-up. This confused myself, while the issue I
> reported here is real, it does affect only omap-serial.c. In my case I
> am using 8250_omap.c and I can just omit the property from the DTS as
> generally expected!
OK. Are you going send a fix for original issue?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: DT checker RS485 unevaluated property, 8250 OMAP UART
2023-05-30 11:38 ` Krzysztof Kozlowski
@ 2023-05-30 13:24 ` Francesco Dolcini
0 siblings, 0 replies; 5+ messages in thread
From: Francesco Dolcini @ 2023-05-30 13:24 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Francesco Dolcini, Vignesh Raghavendra, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-serial, devicetree,
Greg Kroah-Hartman, Lukas Wunner
On Tue, May 30, 2023 at 01:38:42PM +0200, Krzysztof Kozlowski wrote:
> On 30/05/2023 12:13, Francesco Dolcini wrote:
> > On Sat, May 27, 2023 at 11:49:17AM +0530, Vignesh Raghavendra wrote:
> >> On 19/05/23 9:39 pm, Francesco Dolcini wrote:
> >>> I would be inclined to send the following patch, do you agree?
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml
> >>> index eb3488d8f9ee..e634e98aa994 100644
> >>> --- a/Documentation/devicetree/bindings/serial/8250_omap.yaml
> >>> +++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml
> >>> @@ -70,6 +70,7 @@ properties:
> >>> dsr-gpios: true
> >>> rng-gpios: true
> >>> dcd-gpios: true
> >>> + rs485-rts-active-low: true
> >>
> >> I believe you mean rs485-rts-active-high here
> > whoops, yes of course.
>
> Yes, with a Fixes tag.
Ack
> >>> rts-gpio: true
> >>> power-domains: true
> >>> clock-frequency: true
> >>>
> >>> [1] https://lore.kernel.org/all/ZBItlBhzo+YETcJO@francesco-nb.int.toradex.com/
> >>>
> >>
> >> Also, I hope you are using 8250_ompa.c and not omap-serial.c for newer
> >> designs. omap-serial.c is mostly there to support legacy SoCs and not to
> >> be used with K3 SoCs.
> >
> > Thanks for this head-up. This confused myself, while the issue I
> > reported here is real, it does affect only omap-serial.c. In my case I
> > am using 8250_omap.c and I can just omit the property from the DTS as
> > generally expected!
>
> OK. Are you going send a fix for original issue?
I'll do it, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-30 13:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-19 16:09 DT checker RS485 unevaluated property, 8250 OMAP UART Francesco Dolcini
2023-05-27 6:19 ` Vignesh Raghavendra
2023-05-30 10:13 ` Francesco Dolcini
2023-05-30 11:38 ` Krzysztof Kozlowski
2023-05-30 13:24 ` Francesco Dolcini
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.