Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: mailbox: ti,secure-proxy: Convert to json schema

Convert the ti,secure-proxy to yaml for better checks and documentation.
Differences being mostly in the examples:
- Dropped the example usage of mailbox client, it is better done in
tisci node definition.
- Switched reg usage for address-cells and size-cells 1 - aligned with
schema checks as well.
- included header in example for a buildable example.

While at this, lets make sure to support upto 100 rx threads even though
typically upto 1 threads is practically in use.

NOTE: The following checkpatch warning is generated since we do include the header
in the example, but this is a false positive warning.
WARNING: DT binding docs and includes should be a separate patch. See:
Documentation/devicetree/bindings/submitting-patches.rst

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>

authored by

Nishanth Menon and committed by
Jassi Brar
93fb0c8d a683246a

+79 -50
-50
Documentation/devicetree/bindings/mailbox/ti,secure-proxy.txt
··· 1 - Texas Instruments' Secure Proxy 2 - ======================================== 3 - 4 - The Texas Instruments' secure proxy is a mailbox controller that has 5 - configurable queues selectable at SoC(System on Chip) integration. The 6 - Message manager is broken up into different address regions that are 7 - called "threads" or "proxies" - each instance is unidirectional and is 8 - instantiated at SoC integration level by system controller to indicate 9 - receive or transmit path. 10 - 11 - Message Manager Device Node: 12 - =========================== 13 - Required properties: 14 - -------------------- 15 - - compatible: Shall be "ti,am654-secure-proxy" 16 - - reg-names target_data - Map the proxy data region 17 - rt - Map the realtime status region 18 - scfg - Map the configuration region 19 - - reg: Contains the register map per reg-names. 20 - - #mbox-cells Shall be 1 and shall refer to the transfer path 21 - called thread. 22 - - interrupt-names: Contains interrupt names matching the rx transfer path 23 - for a given SoC. Receive interrupts shall be of the 24 - format: "rx_<PID>". 25 - - interrupts: Contains the interrupt information corresponding to 26 - interrupt-names property. 27 - 28 - Example(AM654): 29 - ------------ 30 - 31 - secure_proxy: mailbox@32c00000 { 32 - compatible = "ti,am654-secure-proxy"; 33 - #mbox-cells = <1>; 34 - reg-names = "target_data", "rt", "scfg"; 35 - reg = <0x0 0x32c00000 0x0 0x100000>, 36 - <0x0 0x32400000 0x0 0x100000>, 37 - <0x0 0x32800000 0x0 0x100000>; 38 - interrupt-names = "rx_011"; 39 - interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; 40 - }; 41 - 42 - dmsc: dmsc { 43 - [...] 44 - mbox-names = "rx", "tx"; 45 - # RX Thread ID is 11 46 - # TX Thread ID is 13 47 - mboxes= <&secure_proxy 11>, 48 - <&secure_proxy 13>; 49 - [...] 50 - };
+79
Documentation/devicetree/bindings/mailbox/ti,secure-proxy.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mailbox/ti,secure-proxy.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Texas Instruments' Secure Proxy 8 + 9 + maintainers: 10 + - Nishanth Menon <nm@ti.com> 11 + 12 + description: | 13 + The Texas Instruments' secure proxy is a mailbox controller that has 14 + configurable queues selectable at SoC(System on Chip) integration. The 15 + Message manager is broken up into different address regions that are 16 + called "threads" or "proxies" - each instance is unidirectional and is 17 + instantiated at SoC integration level by system controller to indicate 18 + receive or transmit path. 19 + 20 + properties: 21 + $nodename: 22 + pattern: "^mailbox@[0-9a-f]+$" 23 + 24 + compatible: 25 + const: ti,am654-secure-proxy 26 + 27 + "#mbox-cells": 28 + const: 1 29 + description: 30 + Contains the secure proxy thread ID used for the specific transfer path. 31 + 32 + reg-names: 33 + items: 34 + - const: target_data 35 + - const: rt 36 + - const: scfg 37 + 38 + reg: 39 + minItems: 3 40 + 41 + interrupt-names: 42 + minItems: 1 43 + maxItems: 100 44 + items: 45 + pattern: "^rx_[0-9]{3}$" 46 + description: 47 + Contains the interrupt name information for the Rx interrupt path for 48 + secure proxy thread in the form 'rx_<PID>'. 49 + 50 + interrupts: 51 + minItems: 1 52 + maxItems: 100 53 + description: 54 + Contains the interrupt information for the Rx interrupt path for secure 55 + proxy. 56 + 57 + required: 58 + - compatible 59 + - reg-names 60 + - reg 61 + - interrupt-names 62 + - interrupts 63 + - "#mbox-cells" 64 + 65 + additionalProperties: false 66 + 67 + examples: 68 + - | 69 + #include <dt-bindings/interrupt-controller/arm-gic.h> 70 + secure_proxy: mailbox@32c00000 { 71 + compatible = "ti,am654-secure-proxy"; 72 + #mbox-cells = <1>; 73 + reg-names = "target_data", "rt", "scfg"; 74 + reg = <0x32c00000 0x100000>, 75 + <0x32400000 0x100000>, 76 + <0x32800000 0x100000>; 77 + interrupt-names = "rx_011"; 78 + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; 79 + };