mbox series

[0/2] Airoha UART support

Message ID 20250105131147.2290237-1-benjamin.larsson@genexis.eu
Headers show
Series Airoha UART support | expand

Message

Benjamin Larsson Jan. 5, 2025, 1:11 p.m. UTC
The Airoha familty of SoCs have a UART hardware that is 16550-compatible
with the exception of the baud rate settings.

This patch implements code for calculating the baud rate for the Airoha
UART and HSUART.

Benjamin Larsson (2):
  dt-bindings: serial: 8250: Add Airoha compatibles
  serial: Airoha SoC UART and HSUART support

 devicetree/bindings/serial/8250.yaml          |  2 +
 drivers/tty/serial/8250/8250_airoha.c         | 85 +++++++++++++++++++
 drivers/tty/serial/8250/8250_of.c             |  2 +
 drivers/tty/serial/8250/8250_port.c           | 26 ++++++
 drivers/tty/serial/8250/Kconfig               | 10 +++
 drivers/tty/serial/8250/Makefile              |  1 +
 include/linux/serial_8250.h                   |  1 +
 include/uapi/linux/serial_core.h              |  6 ++
 include/uapi/linux/serial_reg.h               |  9 ++
 9 files changed, 142 insertions(+)
 create mode 100644 drivers/tty/serial/8250/8250_airoha.c


Signed-off-by: Benjamin Larsson <benjamin.larsson@genexis.eu>

Comments

Krzysztof Kozlowski Jan. 6, 2025, 7:16 a.m. UTC | #1
On Sun, Jan 05, 2025 at 02:11:46PM +0100, Benjamin Larsson wrote:
> The Airoha SoC family have a mostly 16550-compatible UART
> hardware with the exception of custom baud rate settings
> register. Specifying one of the following compatibles
> will enable routines for calculating the baud rate.
> 
> For the regular UART use:
> compatible = "airoha,airoha-uart";
> 
> For the high speed HSUART use:
> compatible = "airoha,airoha-hsuart";

Drop the compatibles explanation, obvious. Rather say:
"... a mostly 16550-compatible UART and High-Speed UART hardware ..."
or whatever HS is shortcut of.

> 
> Signed-off-by: Benjamin Larsson <benjamin.larsson@genexis.eu>
> ---
>  Documentation/devicetree/bindings/serial/8250.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/serial/8250.yaml b/Documentation/devicetree/bindings/serial/8250.yaml
> index 692aa05500fd..2fbb972e5460 100644
> --- a/Documentation/devicetree/bindings/serial/8250.yaml
> +++ b/Documentation/devicetree/bindings/serial/8250.yaml
> @@ -63,6 +63,8 @@ properties:
>        - const: mrvl,pxa-uart
>        - const: nuvoton,wpcm450-uart
>        - const: nuvoton,npcm750-uart
> +      - const: airoha,airoha-uart
> +      - const: airoha,airoha-hsuart

Devices are not compatible?

Best regards,
Krzysztof