Re: [U-Boot] [PATCH 08/25] dt-bindings: remoteproc: Add bindings for R5F subsystem on TI K3 SoCs

2019-09-04 Thread Lokesh Vutla
Hi Fabien,

On 29/08/19 2:51 PM, Fabien DESSENNE wrote:
> Hi Lokes, Suman
> 
> 
> On 28/08/2019 2:55 PM, Lokesh Vutla wrote:
>> From: Suman Anna 
>>
>> The Texas Instruments K3 family of SoCs have one of more dual-core
>> Arm Cortex R5F processor subsystems/clusters (R5FSS). Add the device
>> tree bindings document for these R5F subsystem devices. These R5F
>> processors do not have an MMU, and so require fixed memory carveout
>> regions matching the firmware image addresses. The nodes require more
>> than one memory region, with the first memory region used for DMA
>> allocations at runtime. The remaining memory regions are reserved
>> and are used for the loading and running of the R5F remote processors.
>>
>> The added example illustrates the DT nodes for the single R5FSS device
>> present on K3 AM65x family of SoCs.
>>
>> Signed-off-by: Suman Anna 
>> Signed-off-by: Lokesh Vutla 
>> ---
>>   .../remoteproc/ti,k3-r5f-rproc.txt| 164 ++
>>   1 file changed, 164 insertions(+)
>>   create mode 100644 doc/device-tree-bindings/remoteproc/ti,k3-r5f-rproc.txt
>>
>> diff --git a/doc/device-tree-bindings/remoteproc/ti,k3-r5f-rproc.txt 
>> b/doc/device-tree-bindings/remoteproc/ti,k3-r5f-rproc.txt
>> new file mode 100644
>> index 00..c2fa6e8344
>> --- /dev/null
>> +++ b/doc/device-tree-bindings/remoteproc/ti,k3-r5f-rproc.txt
>> @@ -0,0 +1,164 @@
>> +TI K3 R5F processor subsystems
>> +==
>> +
>> +The TI K3 family of SoCs usually have one or more dual-core Arm Cortex
>> +R5F processor subsystems/clusters (R5FSS). The dual core cluster can be
>> +used either in a LockStep mode providing safety/fault tolerance features
>> +or in a Split mode providing two individual compute cores for doubling
>> +the compute capacity. These are used together with other processors
>> +present on the SoC to achieve various system level goals.
>> +
>> +R5F Sub-System Device Node:
>> +===
>> +Each Dual-Core R5F sub-system is represented as a single DTS node 
>> representing
>> +the cluster, with a pair of child DT nodes representing the individual R5F
>> +cores. Each node has a number of required or optional properties that enable
>> +the OS running on the host processor to perform the device management of the
>> +remote processor and to communicate with the remote processor.
>> +
>> +Required properties:
>> +
>> +The following are the mandatory properties:
>> +
>> +- compatible:   Should be one of the following,
>> +"ti,am654-r5fss" for R5F clusters/subsystems on
>> +   K3 AM65x SoCs
>> +"ti,j721e-r5fss" for R5F clusters/subsystems on
>> +   K3 J721E SoCs
>> +- power-domains:Should contain a phandle to a PM domain provider node
>> +and an args specifier containing the R5FSS device id
>> +value. This property is as per the binding,
>> +
>> Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>> +- #address-cells:   Should be 1
>> +- #size-cells:  Should be 1
>> +- ranges:   Standard ranges definition providing translations for
>> +R5F TCM address spaces
> 
> 
> Maybe dma-ranges is more appropriated here : you can find more details 
> here: https://lkml.org/lkml/2019/4/3/1261


These are still the bus address and the translation is from bus address to Host
CPU view. I feel ranges is right.

Thanks and regards,
Lokesh

> 
> BR
> 
> Fabien
> 
> 
>> +
>> +Optional properties:
>> +
>> +- lockstep-mode:Configuration Mode for the Dual R5F cores within the R5F
>> +cluster. Should be either a value of 1 (LockStep mode) 
>> or
>> +0 (Split mode), default is LockStep mode if omitted.
>> +
>> +
>> +R5F Processor Child Nodes:
>> +==
>> +The R5F Sub-System device node should define two R5F child nodes, each node
>> +representing a TI instantiation of the Arm Cortex R5F core. There are some
>> +specific integration differences for the IP like the usage of a Region 
>> Address
>> +Translator (RAT) for translating the larger SoC bus addresses into a 32-bit
>> +address space for the processor.
>> +
>> +Required properties:
>> +
>> +The following are the mandatory properties:
>> +
>> +- compatible:   Should be one of the following,
>> +"ti,am654-r5f" for the R5F cores in K3 AM65x SoCs
>> +"ti,j721e-r5f" for the R5F cores in K3 J721E SOCs
>> +- reg:  Should contain an entry for each value in 
>> 'reg-names'.
>> +Each entry should have the memory region's start address
>> +and the size of the region, the representation matching
>> +the parent node's 

Re: [U-Boot] [PATCH 08/25] dt-bindings: remoteproc: Add bindings for R5F subsystem on TI K3 SoCs

2019-08-29 Thread Fabien DESSENNE
Hi Lokes, Suman


On 28/08/2019 2:55 PM, Lokesh Vutla wrote:
> From: Suman Anna 
>
> The Texas Instruments K3 family of SoCs have one of more dual-core
> Arm Cortex R5F processor subsystems/clusters (R5FSS). Add the device
> tree bindings document for these R5F subsystem devices. These R5F
> processors do not have an MMU, and so require fixed memory carveout
> regions matching the firmware image addresses. The nodes require more
> than one memory region, with the first memory region used for DMA
> allocations at runtime. The remaining memory regions are reserved
> and are used for the loading and running of the R5F remote processors.
>
> The added example illustrates the DT nodes for the single R5FSS device
> present on K3 AM65x family of SoCs.
>
> Signed-off-by: Suman Anna 
> Signed-off-by: Lokesh Vutla 
> ---
>   .../remoteproc/ti,k3-r5f-rproc.txt| 164 ++
>   1 file changed, 164 insertions(+)
>   create mode 100644 doc/device-tree-bindings/remoteproc/ti,k3-r5f-rproc.txt
>
> diff --git a/doc/device-tree-bindings/remoteproc/ti,k3-r5f-rproc.txt 
> b/doc/device-tree-bindings/remoteproc/ti,k3-r5f-rproc.txt
> new file mode 100644
> index 00..c2fa6e8344
> --- /dev/null
> +++ b/doc/device-tree-bindings/remoteproc/ti,k3-r5f-rproc.txt
> @@ -0,0 +1,164 @@
> +TI K3 R5F processor subsystems
> +==
> +
> +The TI K3 family of SoCs usually have one or more dual-core Arm Cortex
> +R5F processor subsystems/clusters (R5FSS). The dual core cluster can be
> +used either in a LockStep mode providing safety/fault tolerance features
> +or in a Split mode providing two individual compute cores for doubling
> +the compute capacity. These are used together with other processors
> +present on the SoC to achieve various system level goals.
> +
> +R5F Sub-System Device Node:
> +===
> +Each Dual-Core R5F sub-system is represented as a single DTS node 
> representing
> +the cluster, with a pair of child DT nodes representing the individual R5F
> +cores. Each node has a number of required or optional properties that enable
> +the OS running on the host processor to perform the device management of the
> +remote processor and to communicate with the remote processor.
> +
> +Required properties:
> +
> +The following are the mandatory properties:
> +
> +- compatible:Should be one of the following,
> + "ti,am654-r5fss" for R5F clusters/subsystems on
> +K3 AM65x SoCs
> + "ti,j721e-r5fss" for R5F clusters/subsystems on
> +K3 J721E SoCs
> +- power-domains: Should contain a phandle to a PM domain provider node
> + and an args specifier containing the R5FSS device id
> + value. This property is as per the binding,
> + 
> Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
> +- #address-cells:Should be 1
> +- #size-cells:   Should be 1
> +- ranges:Standard ranges definition providing translations for
> + R5F TCM address spaces


Maybe dma-ranges is more appropriated here : you can find more details 
here: https://lkml.org/lkml/2019/4/3/1261

BR

Fabien


> +
> +Optional properties:
> +
> +- lockstep-mode: Configuration Mode for the Dual R5F cores within the R5F
> + cluster. Should be either a value of 1 (LockStep mode) 
> or
> + 0 (Split mode), default is LockStep mode if omitted.
> +
> +
> +R5F Processor Child Nodes:
> +==
> +The R5F Sub-System device node should define two R5F child nodes, each node
> +representing a TI instantiation of the Arm Cortex R5F core. There are some
> +specific integration differences for the IP like the usage of a Region 
> Address
> +Translator (RAT) for translating the larger SoC bus addresses into a 32-bit
> +address space for the processor.
> +
> +Required properties:
> +
> +The following are the mandatory properties:
> +
> +- compatible:Should be one of the following,
> + "ti,am654-r5f" for the R5F cores in K3 AM65x SoCs
> + "ti,j721e-r5f" for the R5F cores in K3 J721E SOCs
> +- reg:   Should contain an entry for each value in 
> 'reg-names'.
> + Each entry should have the memory region's start address
> + and the size of the region, the representation matching
> + the parent node's '#address-cells' and '#size-cells' 
> values.
> +- reg-names: Should contain strings with the following names, each
> + representing a specific internal memory region, and
> + should be defined in this order,
> +  "atcm", "btcm"
> +- ti,sci:

[U-Boot] [PATCH 08/25] dt-bindings: remoteproc: Add bindings for R5F subsystem on TI K3 SoCs

2019-08-28 Thread Lokesh Vutla
From: Suman Anna 

The Texas Instruments K3 family of SoCs have one of more dual-core
Arm Cortex R5F processor subsystems/clusters (R5FSS). Add the device
tree bindings document for these R5F subsystem devices. These R5F
processors do not have an MMU, and so require fixed memory carveout
regions matching the firmware image addresses. The nodes require more
than one memory region, with the first memory region used for DMA
allocations at runtime. The remaining memory regions are reserved
and are used for the loading and running of the R5F remote processors.

The added example illustrates the DT nodes for the single R5FSS device
present on K3 AM65x family of SoCs.

Signed-off-by: Suman Anna 
Signed-off-by: Lokesh Vutla 
---
 .../remoteproc/ti,k3-r5f-rproc.txt| 164 ++
 1 file changed, 164 insertions(+)
 create mode 100644 doc/device-tree-bindings/remoteproc/ti,k3-r5f-rproc.txt

diff --git a/doc/device-tree-bindings/remoteproc/ti,k3-r5f-rproc.txt 
b/doc/device-tree-bindings/remoteproc/ti,k3-r5f-rproc.txt
new file mode 100644
index 00..c2fa6e8344
--- /dev/null
+++ b/doc/device-tree-bindings/remoteproc/ti,k3-r5f-rproc.txt
@@ -0,0 +1,164 @@
+TI K3 R5F processor subsystems
+==
+
+The TI K3 family of SoCs usually have one or more dual-core Arm Cortex
+R5F processor subsystems/clusters (R5FSS). The dual core cluster can be
+used either in a LockStep mode providing safety/fault tolerance features
+or in a Split mode providing two individual compute cores for doubling
+the compute capacity. These are used together with other processors
+present on the SoC to achieve various system level goals.
+
+R5F Sub-System Device Node:
+===
+Each Dual-Core R5F sub-system is represented as a single DTS node representing
+the cluster, with a pair of child DT nodes representing the individual R5F
+cores. Each node has a number of required or optional properties that enable
+the OS running on the host processor to perform the device management of the
+remote processor and to communicate with the remote processor.
+
+Required properties:
+
+The following are the mandatory properties:
+
+- compatible:  Should be one of the following,
+   "ti,am654-r5fss" for R5F clusters/subsystems on
+  K3 AM65x SoCs
+   "ti,j721e-r5fss" for R5F clusters/subsystems on
+  K3 J721E SoCs
+- power-domains:   Should contain a phandle to a PM domain provider node
+   and an args specifier containing the R5FSS device id
+   value. This property is as per the binding,
+   
Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
+- #address-cells:  Should be 1
+- #size-cells: Should be 1
+- ranges:  Standard ranges definition providing translations for
+   R5F TCM address spaces
+
+Optional properties:
+
+- lockstep-mode:   Configuration Mode for the Dual R5F cores within the R5F
+   cluster. Should be either a value of 1 (LockStep mode) 
or
+   0 (Split mode), default is LockStep mode if omitted.
+
+
+R5F Processor Child Nodes:
+==
+The R5F Sub-System device node should define two R5F child nodes, each node
+representing a TI instantiation of the Arm Cortex R5F core. There are some
+specific integration differences for the IP like the usage of a Region Address
+Translator (RAT) for translating the larger SoC bus addresses into a 32-bit
+address space for the processor.
+
+Required properties:
+
+The following are the mandatory properties:
+
+- compatible:  Should be one of the following,
+   "ti,am654-r5f" for the R5F cores in K3 AM65x SoCs
+   "ti,j721e-r5f" for the R5F cores in K3 J721E SOCs
+- reg: Should contain an entry for each value in 'reg-names'.
+   Each entry should have the memory region's start address
+   and the size of the region, the representation matching
+   the parent node's '#address-cells' and '#size-cells' 
values.
+- reg-names:   Should contain strings with the following names, each
+   representing a specific internal memory region, and
+   should be defined in this order,
+"atcm", "btcm"
+- ti,sci:  Should be a phandle to the TI-SCI System Controller node
+- ti,sci-dev-id:   Should contain the TI-SCI device id corresponding to the
+   R5F Core. Please refer to the corresponding System
+   Controller documentation for valid values for the R5F
+   cores.
+- ti,sci-proc-ids: Should contain 2