mbox series

[v7,0/6] serial: mvebu-uart: Support for higher baudrates

Message ID 20210930095838.28145-1-pali@kernel.org (mailing list archive)
Headers show
Series serial: mvebu-uart: Support for higher baudrates | expand

Message

Pali Rohár Sept. 30, 2021, 9:58 a.m. UTC
This patch series add support for baudrates higher than 230400 on
Marvell Armada 37xx boards.

Changes in v7:
* fixed lint errors in yaml binding file

Changes in v6:
* fixed yaml binding file and dts files

Changes in v5:
* fixed yaml binding file

Changes in v4:
* converted armada3700-uart-clock documentation to YAML
* split documentation changes into two commits:
  - first which adds clock documentation
  - second which updates UART documentation

Changes in v3:
v3 is rebased on top of Linus master branch and all already applied patches
were dropped. There are no changes in patches itself since v2.

Pali Rohár (6):
  math64: New DIV_U64_ROUND_CLOSEST helper
  serial: mvebu-uart: implement UART clock driver for configuring UART
    base clock
  dt-bindings: mvebu-uart: document DT bindings for
    marvell,armada-3700-uart-clock
  dt-bindings: mvebu-uart: update information about UART clock
  arm64: dts: marvell: armada-37xx: add device node for UART clock and
    use it
  serial: mvebu-uart: implement support for baudrates higher than 230400

 .../clock/marvell,armada-3700-uart-clock.yaml |  59 ++
 .../devicetree/bindings/serial/mvebu-uart.txt |   9 +-
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi  |  14 +-
 drivers/tty/serial/Kconfig                    |   1 +
 drivers/tty/serial/mvebu-uart.c               | 592 +++++++++++++++++-
 include/linux/math64.h                        |  13 +
 6 files changed, 667 insertions(+), 21 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/marvell,armada-3700-uart-clock.yaml

Comments

Pali Rohár Oct. 1, 2021, 12:11 p.m. UTC | #1
Gregory, could you please review this patch series?

On Thursday 30 September 2021 11:58:32 Pali Rohár wrote:
> This patch series add support for baudrates higher than 230400 on
> Marvell Armada 37xx boards.
> 
> Changes in v7:
> * fixed lint errors in yaml binding file
> 
> Changes in v6:
> * fixed yaml binding file and dts files
> 
> Changes in v5:
> * fixed yaml binding file
> 
> Changes in v4:
> * converted armada3700-uart-clock documentation to YAML
> * split documentation changes into two commits:
>   - first which adds clock documentation
>   - second which updates UART documentation
> 
> Changes in v3:
> v3 is rebased on top of Linus master branch and all already applied patches
> were dropped. There are no changes in patches itself since v2.
> 
> Pali Rohár (6):
>   math64: New DIV_U64_ROUND_CLOSEST helper
>   serial: mvebu-uart: implement UART clock driver for configuring UART
>     base clock
>   dt-bindings: mvebu-uart: document DT bindings for
>     marvell,armada-3700-uart-clock
>   dt-bindings: mvebu-uart: update information about UART clock
>   arm64: dts: marvell: armada-37xx: add device node for UART clock and
>     use it
>   serial: mvebu-uart: implement support for baudrates higher than 230400
> 
>  .../clock/marvell,armada-3700-uart-clock.yaml |  59 ++
>  .../devicetree/bindings/serial/mvebu-uart.txt |   9 +-
>  arch/arm64/boot/dts/marvell/armada-37xx.dtsi  |  14 +-
>  drivers/tty/serial/Kconfig                    |   1 +
>  drivers/tty/serial/mvebu-uart.c               | 592 +++++++++++++++++-
>  include/linux/math64.h                        |  13 +
>  6 files changed, 667 insertions(+), 21 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/clock/marvell,armada-3700-uart-clock.yaml
> 
> -- 
> 2.20.1
>
Pali Rohár Nov. 3, 2021, 9:42 p.m. UTC | #2
On Thursday 30 September 2021 11:58:32 Pali Rohár wrote:
> This patch series add support for baudrates higher than 230400 on
> Marvell Armada 37xx boards.

Stephen, Gregory, are there any issues with this patch series?
If not, could you take them?

> Changes in v7:
> * fixed lint errors in yaml binding file
> 
> Changes in v6:
> * fixed yaml binding file and dts files
> 
> Changes in v5:
> * fixed yaml binding file
> 
> Changes in v4:
> * converted armada3700-uart-clock documentation to YAML
> * split documentation changes into two commits:
>   - first which adds clock documentation
>   - second which updates UART documentation
> 
> Changes in v3:
> v3 is rebased on top of Linus master branch and all already applied patches
> were dropped. There are no changes in patches itself since v2.
> 
> Pali Rohár (6):
>   math64: New DIV_U64_ROUND_CLOSEST helper
>   serial: mvebu-uart: implement UART clock driver for configuring UART
>     base clock
>   dt-bindings: mvebu-uart: document DT bindings for
>     marvell,armada-3700-uart-clock
>   dt-bindings: mvebu-uart: update information about UART clock
>   arm64: dts: marvell: armada-37xx: add device node for UART clock and
>     use it
>   serial: mvebu-uart: implement support for baudrates higher than 230400
> 
>  .../clock/marvell,armada-3700-uart-clock.yaml |  59 ++
>  .../devicetree/bindings/serial/mvebu-uart.txt |   9 +-
>  arch/arm64/boot/dts/marvell/armada-37xx.dtsi  |  14 +-
>  drivers/tty/serial/Kconfig                    |   1 +
>  drivers/tty/serial/mvebu-uart.c               | 592 +++++++++++++++++-
>  include/linux/math64.h                        |  13 +
>  6 files changed, 667 insertions(+), 21 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/clock/marvell,armada-3700-uart-clock.yaml
> 
> -- 
> 2.20.1
>
Gregory CLEMENT Dec. 17, 2021, 5:23 p.m. UTC | #3
Hello Pali,

> On Thursday 30 September 2021 11:58:32 Pali Rohár wrote:
>> This patch series add support for baudrates higher than 230400 on
>> Marvell Armada 37xx boards.
>
> Stephen, Gregory, are there any issues with this patch series?

I am not found of these changes but let's apply it as I didn't take time
to do a better review.

However I can't apply the dt part if the driver is not merged.

Gregory

> If not, could you take them?
>
>> Changes in v7:
>> * fixed lint errors in yaml binding file
>> 
>> Changes in v6:
>> * fixed yaml binding file and dts files
>> 
>> Changes in v5:
>> * fixed yaml binding file
>> 
>> Changes in v4:
>> * converted armada3700-uart-clock documentation to YAML
>> * split documentation changes into two commits:
>>   - first which adds clock documentation
>>   - second which updates UART documentation
>> 
>> Changes in v3:
>> v3 is rebased on top of Linus master branch and all already applied patches
>> were dropped. There are no changes in patches itself since v2.
>> 
>> Pali Rohár (6):
>>   math64: New DIV_U64_ROUND_CLOSEST helper
>>   serial: mvebu-uart: implement UART clock driver for configuring UART
>>     base clock
>>   dt-bindings: mvebu-uart: document DT bindings for
>>     marvell,armada-3700-uart-clock
>>   dt-bindings: mvebu-uart: update information about UART clock
>>   arm64: dts: marvell: armada-37xx: add device node for UART clock and
>>     use it
>>   serial: mvebu-uart: implement support for baudrates higher than 230400
>> 
>>  .../clock/marvell,armada-3700-uart-clock.yaml |  59 ++
>>  .../devicetree/bindings/serial/mvebu-uart.txt |   9 +-
>>  arch/arm64/boot/dts/marvell/armada-37xx.dtsi  |  14 +-
>>  drivers/tty/serial/Kconfig                    |   1 +
>>  drivers/tty/serial/mvebu-uart.c               | 592 +++++++++++++++++-
>>  include/linux/math64.h                        |  13 +
>>  6 files changed, 667 insertions(+), 21 deletions(-)
>>  create mode 100644 Documentation/devicetree/bindings/clock/marvell,armada-3700-uart-clock.yaml
>> 
>> -- 
>> 2.20.1
>>
Pali Rohár Jan. 14, 2022, 10:51 a.m. UTC | #4
Hello Stephen!

On Friday 17 December 2021 18:23:00 Gregory CLEMENT wrote:
> Hello Pali,
> 
> > On Thursday 30 September 2021 11:58:32 Pali Rohár wrote:
> >> This patch series add support for baudrates higher than 230400 on
> >> Marvell Armada 37xx boards.
> >
> > Stephen, Gregory, are there any issues with this patch series?
> 
> I am not found of these changes but let's apply it as I didn't take time
> to do a better review.
> 
> However I can't apply the dt part if the driver is not merged.

Stephen, are there any issues with driver (non-DT) part changes in this
patch series? If not, could you please merge them? This patch series is
here on the list since September without any request for change...

We would really like to see support for higher baudrates for Armada 3720
platforms in mainline kernel.

> Gregory
> 
> > If not, could you take them?
> >
> >> Changes in v7:
> >> * fixed lint errors in yaml binding file
> >> 
> >> Changes in v6:
> >> * fixed yaml binding file and dts files
> >> 
> >> Changes in v5:
> >> * fixed yaml binding file
> >> 
> >> Changes in v4:
> >> * converted armada3700-uart-clock documentation to YAML
> >> * split documentation changes into two commits:
> >>   - first which adds clock documentation
> >>   - second which updates UART documentation
> >> 
> >> Changes in v3:
> >> v3 is rebased on top of Linus master branch and all already applied patches
> >> were dropped. There are no changes in patches itself since v2.
> >> 
> >> Pali Rohár (6):
> >>   math64: New DIV_U64_ROUND_CLOSEST helper
> >>   serial: mvebu-uart: implement UART clock driver for configuring UART
> >>     base clock
> >>   dt-bindings: mvebu-uart: document DT bindings for
> >>     marvell,armada-3700-uart-clock
> >>   dt-bindings: mvebu-uart: update information about UART clock
> >>   arm64: dts: marvell: armada-37xx: add device node for UART clock and
> >>     use it
> >>   serial: mvebu-uart: implement support for baudrates higher than 230400
> >> 
> >>  .../clock/marvell,armada-3700-uart-clock.yaml |  59 ++
> >>  .../devicetree/bindings/serial/mvebu-uart.txt |   9 +-
> >>  arch/arm64/boot/dts/marvell/armada-37xx.dtsi  |  14 +-
> >>  drivers/tty/serial/Kconfig                    |   1 +
> >>  drivers/tty/serial/mvebu-uart.c               | 592 +++++++++++++++++-
> >>  include/linux/math64.h                        |  13 +
> >>  6 files changed, 667 insertions(+), 21 deletions(-)
> >>  create mode 100644 Documentation/devicetree/bindings/clock/marvell,armada-3700-uart-clock.yaml
> >> 
> >> -- 
> >> 2.20.1
> >> 
> 
> -- 
> Gregory Clement, Bootlin
> Embedded Linux and Kernel engineering
> http://bootlin.com
Stephen Boyd Jan. 14, 2022, 10:56 p.m. UTC | #5
Quoting Pali Rohár (2022-01-14 02:51:00)
> Hello Stephen!
> 
> On Friday 17 December 2021 18:23:00 Gregory CLEMENT wrote:
> > Hello Pali,
> > 
> > > On Thursday 30 September 2021 11:58:32 Pali Rohár wrote:
> > >> This patch series add support for baudrates higher than 230400 on
> > >> Marvell Armada 37xx boards.
> > >
> > > Stephen, Gregory, are there any issues with this patch series?
> > 
> > I am not found of these changes but let's apply it as I didn't take time
> > to do a better review.
> > 
> > However I can't apply the dt part if the driver is not merged.
> 
> Stephen, are there any issues with driver (non-DT) part changes in this
> patch series? If not, could you please merge them? This patch series is
> here on the list since September without any request for change...

Oh I missed this thread. I thought it was going to be resent.

> 
> We would really like to see support for higher baudrates for Armada 3720
> platforms in mainline kernel.

If we're adding new support why can't we break with backwards
compatibility for the binding and do it a different way?
Pali Rohár Jan. 14, 2022, 11:05 p.m. UTC | #6
On Friday 14 January 2022 14:56:58 Stephen Boyd wrote:
> Quoting Pali Rohár (2022-01-14 02:51:00)
> > Hello Stephen!
> > 
> > On Friday 17 December 2021 18:23:00 Gregory CLEMENT wrote:
> > > Hello Pali,
> > > 
> > > > On Thursday 30 September 2021 11:58:32 Pali Rohár wrote:
> > > >> This patch series add support for baudrates higher than 230400 on
> > > >> Marvell Armada 37xx boards.
> > > >
> > > > Stephen, Gregory, are there any issues with this patch series?
> > > 
> > > I am not found of these changes but let's apply it as I didn't take time
> > > to do a better review.
> > > 
> > > However I can't apply the dt part if the driver is not merged.
> > 
> > Stephen, are there any issues with driver (non-DT) part changes in this
> > patch series? If not, could you please merge them? This patch series is
> > here on the list since September without any request for change...
> 
> Oh I missed this thread. I thought it was going to be resent.
> 
> > 
> > We would really like to see support for higher baudrates for Armada 3720
> > platforms in mainline kernel.
> 
> If we're adding new support why can't we break with backwards
> compatibility for the binding and do it a different way?

Because DTS are backwards compatible. I was told more times that kernel
drivers should work correctly with older DTS files. On some boards are
DTB files provided by bootloader and they do not use in-kernel DTS
files.
Stephen Boyd Jan. 14, 2022, 11:16 p.m. UTC | #7
Quoting Pali Rohár (2022-01-14 15:05:49)
> On Friday 14 January 2022 14:56:58 Stephen Boyd wrote:
> > 
> > If we're adding new support why can't we break with backwards
> > compatibility for the binding and do it a different way?
> 
> Because DTS are backwards compatible. I was told more times that kernel
> drivers should work correctly with older DTS files. On some boards are
> DTB files provided by bootloader and they do not use in-kernel DTS
> files.

I'm not suggesting to break the kernel driver when used with older DTBs.
New features are fair game to change the compatible string and do
something different. If the user wants the new feature they update their
DTB. We shouldn't be constrained by backwards compatibility here.
Pali Rohár Jan. 14, 2022, 11:20 p.m. UTC | #8
On Friday 14 January 2022 15:16:55 Stephen Boyd wrote:
> Quoting Pali Rohár (2022-01-14 15:05:49)
> > On Friday 14 January 2022 14:56:58 Stephen Boyd wrote:
> > > 
> > > If we're adding new support why can't we break with backwards
> > > compatibility for the binding and do it a different way?
> > 
> > Because DTS are backwards compatible. I was told more times that kernel
> > drivers should work correctly with older DTS files. On some boards are
> > DTB files provided by bootloader and they do not use in-kernel DTS
> > files.
> 
> I'm not suggesting to break the kernel driver when used with older DTBs.
> New features are fair game to change the compatible string and do
> something different. If the user wants the new feature they update their
> DTB. We shouldn't be constrained by backwards compatibility here.

And what do you suggest to do? Separate UART0 and UART1 nodes are still
needed because as Mark wrote stdin-path and stdout-patch could be
different.