Skip to content

arm64: tegra: Add earlycon support on Tegra194

Thierry Reding linux-devicetree linux-tegra 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dt-bindings: serial: tegra-tcu: Convert to json-schemaDocumentation/devicetree/bindings/serial/nvidia,tegra194-tcu.txt Documentation/devicetree/bindings/serial/nvidia,tegra194-tcu.yaml+56 -351 reply
2/3dt-bindings: serial: tegra-tcu: Document "reg" propertyDocumentation/devicetree/bindings/serial/nvidia,tegra194-tcu.yaml+5 -13 replies
3/3arm64: tegra: Add "reg" property for TCU on Tegra194arch/arm64/boot/dts/nvidia/tegra194.dtsi+3 -10 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchRob Herring
1/3R-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] arm64: tegra: Add earlycon support on Tegra194

From: Thierry Reding <[email protected]>

Hi Rob,

I've been looking at adding support for earlycon on Tegra194 which uses the "combined UART" as console. This isn't a real device but rather is composed of two mailboxes that are used to communicate with a processor that multiplexes multiple data streams before they are sent over the HW UART.

It's possible to make this work by passing earlycon with extra options that select the TCU and pass a TX mailbox address, but I'd prefer if we could also make this work without any options and instead infer the TX mailbox address to use from /chosen/stdout-path. I can make that work with the regular OF_EARLYCON_DECLARE and just a bit of additional code to write data to the TX mailbox if I change the device tree node to take a "reg" property. This set of patches implements those changes (there's a separate patch to the tegra-tcu driver that adds OF_EARLYCON_DECLARE and a bit of code, but it's not directly relevant to this discussion).

Given that this isn't a real device and the address in the "reg" property is also a subset of the mailbox device that will take over for the real console later on, I'm wondering if this is acceptable, even if it is bending the rules a tiny bit.

The only other alternative I could think of would be to obtain the node offset to the TCU node (either by passing it to the earlycon ->setup() callback, or looking it up manually) and then parsing the mboxes property and find the TX mailbox provider and then compute the TX mailbox address. But that all seems very involved for something that we can make work out of the box by simply adding this "reg" property, even if it may not be strictly correct.

What do you think?

Thierry

Thierry Reding (3):
dt-bindings: serial: tegra-tcu: Convert to json-schema
dt-bindings: serial: tegra-tcu: Document "reg" property
arm64: tegra: Add "reg" property for TCU on Tegra194

 .../bindings/serial/nvidia,tegra194-tcu.txt   | 35 -----------
 .../bindings/serial/nvidia,tegra194-tcu.yaml  | 60 +++++++++++++++++++
 arch/arm64/boot/dts/nvidia/tegra194.dtsi      |  4 +-
 3 files changed, 63 insertions(+), 36 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/serial/nvidia,tegra194-tcu.txt
 create mode 100644 Documentation/devicetree/bindings/serial/nvidia,tegra194-tcu.yaml
Signature · 1 line
2.30.2