public inbox for linux-amlogic@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] meson-uart: Use "divide XTAL by 2" bit on G12A
@ 2023-03-07 22:26 Martin Blumenstingl
  2023-03-07 22:26 ` [PATCH v3 1/3] dt-bindings: serial: amlogic,meson-uart: Add compatible string for G12A Martin Blumenstingl
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Martin Blumenstingl @ 2023-03-07 22:26 UTC (permalink / raw)
  To: linux-amlogic, devicetree
  Cc: neil.armstrong, Martin Blumenstingl, gregkh, linux-kernel,
	robh+dt, krzysztof.kozlowski+dt, jirislaby, linux-arm-kernel

This series improves support for UART attached Bluetooth modules on
Amlogic Meson G12A and newer SoCs. These SoCs also support the "divide
XTAL by 2" bit which (greatly) reduces jitter when generating baud
rates such as 1500000 (which is used by the Bluetooth part of the
RTL8822CS SDIO WiFi and UART Bluetooth combo chip).

Without this the baud rate calculation is based on the XTAL clock
(running at 24MHz) divided by 3 (meaning: 8MHz). 8MHz cannot be divided
with integer division to a 1500000 baud rate. Using the "divide XTAL
by 2" bit however means that we can achieve 1500000 cleanly, without any
jitter.

In future we should allow dynamic switching of these UART controller
internal dividers to pick the best divider automatically for the
requested baud rate. This however still requires the new compatible
string - which is added by this series - to enable the "divide XTAL
by 2" logic on SoCs that support it (G12A and newer).

Changes since v1 at [1]:
- make meson-gx-uart a valid fallback compatible string for the newer
  meson-g12a-uart
- rebased on top of v6.3-rc1

Changes since v2 at [2]:
- simplify the dt-bindings patch as suggested by Krzysztof Kozlowski
  (thank you!) which actually uncovers an unwanted change


[0] https://lore.kernel.org/linux-bluetooth/3B9D4DB2-D2CD-44FE-817A-F6EA8A0AD734@gmail.com/
[1] https://lore.kernel.org/lkml/20230222210425.626474-1-martin.blumenstingl@googlemail.com/
[2] https://lore.kernel.org/lkml/20230306194223.1869814-1-martin.blumenstingl@googlemail.com/


Martin Blumenstingl (3):
  dt-bindings: serial: amlogic,meson-uart: Add compatible string for
    G12A
  tty: serial: meson: Add a new compatible string for the G12A SoC
  arm64: dts: meson-g12-common: Use the G12A UART compatible string

 .../bindings/serial/amlogic,meson-uart.yaml       |  9 +++++++++
 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 15 ++++++++++-----
 drivers/tty/serial/meson_uart.c                   |  8 ++++++--
 3 files changed, 25 insertions(+), 7 deletions(-)

-- 
2.39.2


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-03-09 11:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-07 22:26 [PATCH v3 0/3] meson-uart: Use "divide XTAL by 2" bit on G12A Martin Blumenstingl
2023-03-07 22:26 ` [PATCH v3 1/3] dt-bindings: serial: amlogic,meson-uart: Add compatible string for G12A Martin Blumenstingl
2023-03-08 11:02   ` Krzysztof Kozlowski
2023-03-07 22:26 ` [PATCH v3 2/3] tty: serial: meson: Add a new compatible string for the G12A SoC Martin Blumenstingl
2023-03-08 12:19   ` neil.armstrong
2023-03-07 22:26 ` [PATCH v3 3/3] arm64: dts: meson-g12-common: Use the G12A UART compatible string Martin Blumenstingl
2023-03-08 12:19   ` neil.armstrong
2023-03-08 12:21   ` neil.armstrong
2023-03-09 11:00     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox