Commit 8461fe3e authored by Thierry Reding's avatar Thierry Reding
Browse files

dt-bindings: serial: tegra-tcu: Convert to json-schema



Convert the Tegra TCU device tree bindings to json-schema.

Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent a12e1b78
Loading
Loading
Loading
Loading
+0 −35
Original line number Diff line number Diff line
NVIDIA Tegra Combined UART (TCU)

The TCU is a system for sharing a hardware UART instance among multiple
systems within the Tegra SoC. It is implemented through a mailbox-
based protocol where each "virtual UART" has a pair of mailboxes, one
for transmitting and one for receiving, that is used to communicate
with the hardware implementing the TCU.

Required properties:
- name : Should be tcu
- compatible
    Array of strings
    One of:
    - "nvidia,tegra194-tcu"
- mbox-names:
    "rx" - Mailbox for receiving data from hardware UART
    "tx" - Mailbox for transmitting data to hardware UART
- mboxes: Mailboxes corresponding to the mbox-names.

This node is a mailbox consumer. See the following files for details of
the mailbox subsystem, and the specifiers implemented by the relevant
provider(s):

- .../mailbox/mailbox.txt
- .../mailbox/nvidia,tegra186-hsp.txt

Example bindings:
-----------------

tcu: tcu {
	compatible = "nvidia,tegra194-tcu";
	mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_SM 0>,
	         <&hsp_aon TEGRA_HSP_MBOX_TYPE_SM 1>;
	mbox-names = "rx", "tx";
};
+56 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/serial/nvidia,tegra194-tcu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NVIDIA Tegra Combined UART (TCU)

maintainers:
  - Thierry Reding <thierry.reding@gmail.com>
  - Jonathan Hunter <jonathanh@nvidia.com>

description:
  The TCU is a system for sharing a hardware UART instance among multiple
  systems within the Tegra SoC. It is implemented through a mailbox-
  based protocol where each "virtual UART" has a pair of mailboxes, one
  for transmitting and one for receiving, that is used to communicate
  with the hardware implementing the TCU.

properties:
  $nodename:
    pattern: "^serial(@.*)?$"

  compatible:
    const: nvidia,tegra194-tcu

  mbox-names:
    items:
      - const: rx
      - const: tx

  mboxes:
    description: |
      List of phandles to mailbox channels used for receiving and
      transmitting data from and to the hardware UART.
    items:
      - description: mailbox for receiving data from hardware UART
      - description: mailbox for transmitting data to hardware UART

required:
  - compatible
  - mbox-names
  - mboxes

additionalProperties: false

examples:
  - |
    #include <dt-bindings/mailbox/tegra186-hsp.h>

    tcu: serial {
        compatible = "nvidia,tegra194-tcu";
        mboxes = <&hsp_top0 TEGRA_HSP_MBOX_TYPE_SM 0>,
                 <&hsp_aon TEGRA_HSP_MBOX_TYPE_SM 1>;
        mbox-names = "rx", "tx";
    };