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

dt-bindings: arm: keystone: Convert ti,sci to json schema

Convert the ti,sci to json schema for better checks and documentation.

NOTE: This change does introduce a stricter naming convention for
TI-SCI controller nodes.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tero Kristo <kristo@kernel.org>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20210426155457.21221-5-nm@ti.com
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Nishanth Menon and committed by
Rob Herring
5a9652f6 fda55c72

+129 -86
-86
Documentation/devicetree/bindings/arm/keystone/ti,sci.txt
··· 1 - Texas Instruments System Control Interface (TI-SCI) Message Protocol 2 - -------------------------------------------------------------------- 3 - 4 - Texas Instrument's processors including those belonging to Keystone generation 5 - of processors have separate hardware entity which is now responsible for the 6 - management of the System on Chip (SoC) system. These include various system 7 - level functions as well. 8 - 9 - An example of such an SoC is K2G, which contains the system control hardware 10 - block called Power Management Micro Controller (PMMC). This hardware block is 11 - initialized early into boot process and provides services to Operating Systems 12 - on multiple processors including ones running Linux. 13 - 14 - See http://processors.wiki.ti.com/index.php/TISCI for protocol definition. 15 - 16 - TI-SCI controller Device Node: 17 - ============================= 18 - 19 - The TI-SCI node describes the Texas Instrument's System Controller entity node. 20 - This parent node may optionally have additional children nodes which describe 21 - specific functionality such as clocks, power domain, reset or additional 22 - functionality as may be required for the SoC. This hierarchy also describes the 23 - relationship between the TI-SCI parent node to the child node. 24 - 25 - Required properties: 26 - ------------------- 27 - - compatible: should be "ti,k2g-sci" for TI 66AK2G SoC 28 - should be "ti,am654-sci" for for TI AM654 SoC 29 - - mbox-names: 30 - "rx" - Mailbox corresponding to receive path 31 - "tx" - Mailbox corresponding to transmit path 32 - 33 - - mboxes: Mailboxes corresponding to the mbox-names. Each value of the mboxes 34 - property should contain a phandle to the mailbox controller device 35 - node and an args specifier that will be the phandle to the intended 36 - sub-mailbox child node to be used for communication. 37 - 38 - See Documentation/devicetree/bindings/mailbox/mailbox.txt for more details 39 - about the generic mailbox controller and client driver bindings. Also see 40 - Documentation/devicetree/bindings/mailbox/ti,message-manager.txt for typical 41 - controller that is used to communicate with this System controllers. 42 - 43 - Optional Properties: 44 - ------------------- 45 - - reg-names: 46 - debug_messages - Map the Debug message region 47 - - reg: register space corresponding to the debug_messages 48 - - ti,system-reboot-controller: If system reboot can be triggered by SoC reboot 49 - - ti,host-id: Integer value corresponding to the host ID assigned by Firmware 50 - for identification of host processing entities such as virtual 51 - machines 52 - 53 - Example (K2G): 54 - ------------- 55 - pmmc: pmmc { 56 - compatible = "ti,k2g-sci"; 57 - ti,host-id = <2>; 58 - mbox-names = "rx", "tx"; 59 - mboxes= <&msgmgr &msgmgr_proxy_pmmc_rx>, 60 - <&msgmgr &msgmgr_proxy_pmmc_tx>; 61 - reg-names = "debug_messages"; 62 - reg = <0x02921800 0x800>; 63 - }; 64 - 65 - 66 - TI-SCI Client Device Node: 67 - ========================= 68 - 69 - Client nodes are maintained as children of the relevant TI-SCI device node. 70 - 71 - Example (K2G): 72 - ------------- 73 - pmmc: pmmc { 74 - compatible = "ti,k2g-sci"; 75 - ... 76 - 77 - my_clk_node: clk_node { 78 - ... 79 - ... 80 - }; 81 - 82 - my_pd_node: pd_node { 83 - ... 84 - ... 85 - }; 86 - };
+129
Documentation/devicetree/bindings/arm/keystone/ti,sci.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/arm/keystone/ti,sci.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: TI-SCI controller device node bindings 8 + 9 + maintainers: 10 + - Nishanth Menon <nm@ti.com> 11 + 12 + description: | 13 + Texas Instrument's processors including those belonging to Keystone generation 14 + of processors have separate hardware entity which is now responsible for the 15 + management of the System on Chip (SoC) system. These include various system 16 + level functions as well. 17 + 18 + An example of such an SoC is K2G, which contains the system control hardware 19 + block called Power Management Micro Controller (PMMC). This hardware block is 20 + initialized early into boot process and provides services to Operating Systems 21 + on multiple processors including ones running Linux. 22 + 23 + See http://processors.wiki.ti.com/index.php/TISCI for protocol definition. 24 + 25 + The TI-SCI node describes the Texas Instrument's System Controller entity node. 26 + This parent node may optionally have additional children nodes which describe 27 + specific functionality such as clocks, power domain, reset or additional 28 + functionality as may be required for the SoC. This hierarchy also describes the 29 + relationship between the TI-SCI parent node to the child node. 30 + 31 + properties: 32 + $nodename: 33 + pattern: "^system-controller@[0-9a-f]+$" 34 + 35 + compatible: 36 + oneOf: 37 + - description: System controller on TI 66AK2G SoC and other K3 SoCs 38 + items: 39 + - const: ti,k2g-sci 40 + - description: System controller on TI AM654 SoC 41 + items: 42 + - const: ti,am654-sci 43 + 44 + reg-names: 45 + description: | 46 + Specifies the debug messages memory mapped region that is optionally 47 + made available from TI-SCI controller. 48 + const: debug_messages 49 + 50 + reg: 51 + minItems: 1 52 + 53 + mbox-names: 54 + description: | 55 + Specifies the mailboxes used to communicate with TI-SCI Controller 56 + made available from TI-SCI controller. 57 + items: 58 + - const: rx 59 + - const: tx 60 + 61 + mboxes: 62 + minItems: 2 63 + 64 + ti,system-reboot-controller: 65 + description: Determines If system reboot can be triggered by SoC reboot 66 + type: boolean 67 + 68 + ti,host-id: 69 + $ref: /schemas/types.yaml#/definitions/uint32 70 + description: | 71 + Value corresponding to the host ID assigned by Firmware 72 + for identification of host processing entities such as virtual machines. 73 + 74 + power-controller: 75 + type: object 76 + $ref: /schemas/soc/ti/sci-pm-domain.yaml# 77 + 78 + clock-controller: 79 + type: object 80 + $ref: /schemas/clock/ti,sci-clk.yaml# 81 + 82 + reset-controller: 83 + type: object 84 + $ref: /schemas/reset/ti,sci-reset.yaml# 85 + 86 + required: 87 + - compatible 88 + - mbox-names 89 + - mboxes 90 + 91 + additionalProperties: false 92 + 93 + examples: 94 + - | 95 + pmmc: system-controller@2921800 { 96 + compatible = "ti,k2g-sci"; 97 + ti,system-reboot-controller; 98 + mbox-names = "rx", "tx"; 99 + mboxes= <&msgmgr 5 2>, 100 + <&msgmgr 0 0>; 101 + reg-names = "debug_messages"; 102 + reg = <0x02921800 0x800>; 103 + }; 104 + 105 + - | 106 + dmsc: system-controller@44083000 { 107 + compatible = "ti,k2g-sci"; 108 + ti,host-id = <12>; 109 + mbox-names = "rx", "tx"; 110 + mboxes= <&secure_proxy_main 11>, 111 + <&secure_proxy_main 13>; 112 + reg-names = "debug_messages"; 113 + reg = <0x44083000 0x1000>; 114 + 115 + k3_pds: power-controller { 116 + compatible = "ti,sci-pm-domain"; 117 + #power-domain-cells = <2>; 118 + }; 119 + 120 + k3_clks: clock-controller { 121 + compatible = "ti,k2g-sci-clk"; 122 + #clock-cells = <2>; 123 + }; 124 + 125 + k3_reset: reset-controller { 126 + compatible = "ti,sci-reset"; 127 + #reset-cells = <2>; 128 + }; 129 + };