[PATCH 0/8] arm64: dts: qcom: msm8916/39: Cleanup/fix UART console pinctrl

From: Stephan Gerhold
Date: Tue Apr 15 2025 - 09:53:32 EST


At the moment, msm8916/39.dtsi have two inconsistent UART pinctrl templates
that are used by all the boards:

- &blsp_uart1_default configures all 4 pins (TX, RX, CTS, RTS), some
boards then limit this to just TX and RX
- &blsp_uart2_default only configures 2 pins (TX, RX), even though UART2
also supports CTS/RTS

It's difficult to define a generic pinctrl template for all UART use cases,
since they are quite different in practice. The main use case for most of
the boards is the UART debug console. Unfortunately, the current generic
pinctrl template doesn't work well for that either:

- We need bias-pull-up for the RX pin to avoid potential garbage at
runtime when the console UART is not connected, but this may be
unneeded, unexpected or even unwanted for other UART use cases.

- U-Boot needs to know which pinctrl to apply during early boot stages, so
we should specify "bootph-all" for the console UART pinctrl. It doesn't
make sense to apply this for other UART use cases.

The solution proposed in this series is to abandon the idea that one
generic pinctrl template can fit for all the UART use cases. Instead, add a
new pinctrl specific to the very common console use case, and move the few
other UART use cases directly to the board-specific DT files. This ensures
that people are forced to consider what exactly their UART use case needs
when porting new boards.

Signed-off-by: Stephan Gerhold <stephan.gerhold@xxxxxxxxxx>
---
Stephan Gerhold (8):
arm64: dts: qcom: msm8916/39: Move UART pinctrl to board files
arm64: dts: qcom: msm8916/39: Introduce new UART console pinctrl
arm64: dts: qcom: msm8919/39: Use UART2 console pinctrl where appropriate
arm64: dts: qcom: msm8916-motorola: Use UART1 console pinctrl
arm64: dts: qcom: apq8016-sbc: Move non-console UART pinctrl to board
arm64: dts: qcom: apq8016-schneider-hmibsc: Move UART pinctrl to board
arm64: dts: qcom: apq8039-t2: Move customized pinctrl to board
arm64: dts: qcom: msm8916/39: Drop generic UART pinctrl templates

arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 21 +++++++++
.../boot/dts/qcom/apq8016-schneider-hmibsc.dts | 41 +++++++++++++++--
arch/arm64/boot/dts/qcom/apq8039-t2.dts | 28 ++++++++----
arch/arm64/boot/dts/qcom/msm8916-acer-a1-724.dts | 3 ++
.../boot/dts/qcom/msm8916-alcatel-idol347.dts | 3 ++
arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts | 3 ++
arch/arm64/boot/dts/qcom/msm8916-gplus-fl8005a.dts | 3 ++
arch/arm64/boot/dts/qcom/msm8916-huawei-g7.dts | 3 ++
arch/arm64/boot/dts/qcom/msm8916-lg-c50.dts | 3 ++
arch/arm64/boot/dts/qcom/msm8916-lg-m216.dts | 3 ++
.../boot/dts/qcom/msm8916-longcheer-l8150.dts | 3 ++
.../boot/dts/qcom/msm8916-longcheer-l8910.dts | 3 ++
.../boot/dts/qcom/msm8916-motorola-common.dtsi | 11 ++---
arch/arm64/boot/dts/qcom/msm8916-mtp.dts | 3 ++
.../dts/qcom/msm8916-samsung-a2015-common.dtsi | 3 ++
.../dts/qcom/msm8916-samsung-fortuna-common.dtsi | 3 ++
.../boot/dts/qcom/msm8916-samsung-gt5-common.dtsi | 3 ++
.../boot/dts/qcom/msm8916-samsung-j5-common.dtsi | 3 ++
.../boot/dts/qcom/msm8916-samsung-serranove.dts | 3 ++
arch/arm64/boot/dts/qcom/msm8916-ufi.dtsi | 3 ++
.../boot/dts/qcom/msm8916-wingtech-wt865x8.dtsi | 3 ++
.../boot/dts/qcom/msm8916-wingtech-wt88047.dts | 3 ++
arch/arm64/boot/dts/qcom/msm8916.dtsi | 53 ++++++++++++++--------
arch/arm64/boot/dts/qcom/msm8939-huawei-kiwi.dts | 3 ++
.../boot/dts/qcom/msm8939-longcheer-l9100.dts | 3 ++
arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts | 3 ++
.../boot/dts/qcom/msm8939-wingtech-wt82918.dtsi | 3 ++
arch/arm64/boot/dts/qcom/msm8939.dtsi | 52 +++++++++++++--------
28 files changed, 213 insertions(+), 59 deletions(-)
---
base-commit: 29f8b76c55e05821f41c3e975e6a48013d8a861f
change-id: 20250411-msm8916-console-pinctrl-069fd22abedd

Best regards,
--
Stephan Gerhold <stephan.gerhold@xxxxxxxxxx>