diff mbox series

[v3,2/5] dt-bindings: ti_sci_pm_domains: Add support for exclusive and shared access

Message ID 20190410053728.17374-3-lokeshvutla@ti.com (mailing list archive)
State New, archived
Headers show
Series soc: ti: k3-am654: Allow for exclusive and shared device requests | expand

Commit Message

Lokesh Vutla April 10, 2019, 5:37 a.m. UTC
TISCI protocol supports for enabling the device either with exclusive
permissions for the requesting host or with sharing across the hosts.
There are certain devices which are exclusive to Linux context and
there are certain devices that are shared across different host contexts.
So add support for getting this information from DT by increasing
the power-domain cells to 2.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 .../devicetree/bindings/soc/ti/sci-pm-domain.txt      | 11 +++++++++--
 MAINTAINERS                                           |  1 +
 include/dt-bindings/soc/ti,sci_pm_domain.h            |  9 +++++++++
 3 files changed, 19 insertions(+), 2 deletions(-)
 create mode 100644 include/dt-bindings/soc/ti,sci_pm_domain.h

Comments

Tero Kristo April 10, 2019, 8:04 a.m. UTC | #1
On 10/04/2019 08:37, Lokesh Vutla wrote:
> TISCI protocol supports for enabling the device either with exclusive
> permissions for the requesting host or with sharing across the hosts.
> There are certain devices which are exclusive to Linux context and
> there are certain devices that are shared across different host contexts.
> So add support for getting this information from DT by increasing
> the power-domain cells to 2.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
>   .../devicetree/bindings/soc/ti/sci-pm-domain.txt      | 11 +++++++++--
>   MAINTAINERS                                           |  1 +
>   include/dt-bindings/soc/ti,sci_pm_domain.h            |  9 +++++++++
>   3 files changed, 19 insertions(+), 2 deletions(-)
>   create mode 100644 include/dt-bindings/soc/ti,sci_pm_domain.h
> 
> diff --git a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
> index f7b00a7c0f68..f541d1f776a2 100644
> --- a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
> +++ b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
> @@ -19,8 +19,15 @@ child of the pmmc node.
>   Required Properties:
>   --------------------
>   - compatible: should be "ti,sci-pm-domain"
> -- #power-domain-cells: Must be 1 so that an id can be provided in each
> -		       device node.
> +- #power-domain-cells: Can be one of the following:
> +			1: Containing the device id of each node
> +			2: First entry should be device id
> +			   Second entry should be one of the floowing:
> +			   TI_SCI_PD_EXCLUSIVE: To allow device to be
> +						exclusively controlled by
> +						the requesting hosts.
> +			   TI_SCI_PD_SHARED: To allow device to be shared
> +					     by multiple hosts.

One thing should be noted on this, the added flag is purely for software 
configuration, and is not telling us anything about the HW / firmware. 
Software can decide to have the flag either way and it will work. I just 
wonder if DT is the correct location to have something like this... 
Expect to have plenty of churn on this by people swapping the 
permissions around according to their use-case needs.

-Tero


>   
>   Example (K2G):
>   -------------
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 2359e12e4c41..dc7a19cc1831 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -15345,6 +15345,7 @@ F:	drivers/firmware/ti_sci*
>   F:	include/linux/soc/ti/ti_sci_protocol.h
>   F:	Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>   F:	drivers/soc/ti/ti_sci_pm_domains.c
> +F:	include/dt-bindings/soc/ti,sci_pm_domain.h
>   F:	Documentation/devicetree/bindings/reset/ti,sci-reset.txt
>   F:	Documentation/devicetree/bindings/clock/ti,sci-clk.txt
>   F:	drivers/clk/keystone/sci-clk.c
> diff --git a/include/dt-bindings/soc/ti,sci_pm_domain.h b/include/dt-bindings/soc/ti,sci_pm_domain.h
> new file mode 100644
> index 000000000000..8f2a7360b65e
> --- /dev/null
> +++ b/include/dt-bindings/soc/ti,sci_pm_domain.h
> @@ -0,0 +1,9 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +
> +#ifndef __DT_BINDINGS_TI_SCI_PM_DOMAIN_H
> +#define __DT_BINDINGS_TI_SCI_PM_DOMAIN_H
> +
> +#define TI_SCI_PD_EXCLUSIVE	1
> +#define TI_SCI_PD_SHARED	0
> +
> +#endif /* __DT_BINDINGS_TI_SCI_PM_DOMAIN_H */
> 

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Lokesh Vutla April 10, 2019, 12:37 p.m. UTC | #2
Hi Tero,

On 10/04/19 1:34 PM, Tero Kristo wrote:
> On 10/04/2019 08:37, Lokesh Vutla wrote:
>> TISCI protocol supports for enabling the device either with exclusive
>> permissions for the requesting host or with sharing across the hosts.
>> There are certain devices which are exclusive to Linux context and
>> there are certain devices that are shared across different host contexts.
>> So add support for getting this information from DT by increasing
>> the power-domain cells to 2.
>>
>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>> ---
>>   .../devicetree/bindings/soc/ti/sci-pm-domain.txt      | 11 +++++++++--
>>   MAINTAINERS                                           |  1 +
>>   include/dt-bindings/soc/ti,sci_pm_domain.h            |  9 +++++++++
>>   3 files changed, 19 insertions(+), 2 deletions(-)
>>   create mode 100644 include/dt-bindings/soc/ti,sci_pm_domain.h
>>
>> diff --git a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>> b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>> index f7b00a7c0f68..f541d1f776a2 100644
>> --- a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>> +++ b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>> @@ -19,8 +19,15 @@ child of the pmmc node.
>>   Required Properties:
>>   --------------------
>>   - compatible: should be "ti,sci-pm-domain"
>> -- #power-domain-cells: Must be 1 so that an id can be provided in each
>> -               device node.
>> +- #power-domain-cells: Can be one of the following:
>> +            1: Containing the device id of each node
>> +            2: First entry should be device id
>> +               Second entry should be one of the floowing:
>> +               TI_SCI_PD_EXCLUSIVE: To allow device to be
>> +                        exclusively controlled by
>> +                        the requesting hosts.
>> +               TI_SCI_PD_SHARED: To allow device to be shared
>> +                         by multiple hosts.
> 
> One thing should be noted on this, the added flag is purely for software
> configuration, and is not telling us anything about the HW / firmware. Software

I does say about how firmware handles the requested device.

> can decide to have the flag either way and it will work. I just wonder if DT is
> the correct location to have something like this... Expect to have plenty of
> churn on this by people swapping the permissions around according to their
> use-case needs.

Do you have any other suggestion to handle shared devices across VMs?

Thanks and regards,
Lokesh
Tero Kristo April 10, 2019, 12:49 p.m. UTC | #3
On 10/04/2019 15:37, Lokesh Vutla wrote:
> Hi Tero,
> 
> On 10/04/19 1:34 PM, Tero Kristo wrote:
>> On 10/04/2019 08:37, Lokesh Vutla wrote:
>>> TISCI protocol supports for enabling the device either with exclusive
>>> permissions for the requesting host or with sharing across the hosts.
>>> There are certain devices which are exclusive to Linux context and
>>> there are certain devices that are shared across different host contexts.
>>> So add support for getting this information from DT by increasing
>>> the power-domain cells to 2.
>>>
>>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>>> ---
>>>    .../devicetree/bindings/soc/ti/sci-pm-domain.txt      | 11 +++++++++--
>>>    MAINTAINERS                                           |  1 +
>>>    include/dt-bindings/soc/ti,sci_pm_domain.h            |  9 +++++++++
>>>    3 files changed, 19 insertions(+), 2 deletions(-)
>>>    create mode 100644 include/dt-bindings/soc/ti,sci_pm_domain.h
>>>
>>> diff --git a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>>> b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>>> index f7b00a7c0f68..f541d1f776a2 100644
>>> --- a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>>> +++ b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>>> @@ -19,8 +19,15 @@ child of the pmmc node.
>>>    Required Properties:
>>>    --------------------
>>>    - compatible: should be "ti,sci-pm-domain"
>>> -- #power-domain-cells: Must be 1 so that an id can be provided in each
>>> -               device node.
>>> +- #power-domain-cells: Can be one of the following:
>>> +            1: Containing the device id of each node
>>> +            2: First entry should be device id
>>> +               Second entry should be one of the floowing:
>>> +               TI_SCI_PD_EXCLUSIVE: To allow device to be
>>> +                        exclusively controlled by
>>> +                        the requesting hosts.
>>> +               TI_SCI_PD_SHARED: To allow device to be shared
>>> +                         by multiple hosts.
>>
>> One thing should be noted on this, the added flag is purely for software
>> configuration, and is not telling us anything about the HW / firmware. Software
> 
> I does say about how firmware handles the requested device.

There is a slight nuance in the wording here. It tells the firmware how 
to handle the device, and you can basically use either flag and it will 
work... until someone else attempts to use the same device. I recall DT 
was supposed to describe the hardware, not to tell us how to use it.

> 
>> can decide to have the flag either way and it will work. I just wonder if DT is
>> the correct location to have something like this... Expect to have plenty of
>> churn on this by people swapping the permissions around according to their
>> use-case needs.
> 
> Do you have any other suggestion to handle shared devices across VMs?

Well, we should have configuration data available somewhere, but it 
sounds like DT might be wrong location for this. Maybe a whitelist of 
devices that can be shared somewhere. Maybe under the PD driver itself. 
Do we have any examples for something similar available in the kernel today?

-Tero
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Lokesh Vutla April 10, 2019, 1:15 p.m. UTC | #4
On 10/04/19 6:19 PM, Tero Kristo wrote:
> On 10/04/2019 15:37, Lokesh Vutla wrote:
>> Hi Tero,
>>
>> On 10/04/19 1:34 PM, Tero Kristo wrote:
>>> On 10/04/2019 08:37, Lokesh Vutla wrote:
>>>> TISCI protocol supports for enabling the device either with exclusive
>>>> permissions for the requesting host or with sharing across the hosts.
>>>> There are certain devices which are exclusive to Linux context and
>>>> there are certain devices that are shared across different host contexts.
>>>> So add support for getting this information from DT by increasing
>>>> the power-domain cells to 2.
>>>>
>>>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>>>> ---
>>>>    .../devicetree/bindings/soc/ti/sci-pm-domain.txt      | 11 +++++++++--
>>>>    MAINTAINERS                                           |  1 +
>>>>    include/dt-bindings/soc/ti,sci_pm_domain.h            |  9 +++++++++
>>>>    3 files changed, 19 insertions(+), 2 deletions(-)
>>>>    create mode 100644 include/dt-bindings/soc/ti,sci_pm_domain.h
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>>>> b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>>>> index f7b00a7c0f68..f541d1f776a2 100644
>>>> --- a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>>>> +++ b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>>>> @@ -19,8 +19,15 @@ child of the pmmc node.
>>>>    Required Properties:
>>>>    --------------------
>>>>    - compatible: should be "ti,sci-pm-domain"
>>>> -- #power-domain-cells: Must be 1 so that an id can be provided in each
>>>> -               device node.
>>>> +- #power-domain-cells: Can be one of the following:
>>>> +            1: Containing the device id of each node
>>>> +            2: First entry should be device id
>>>> +               Second entry should be one of the floowing:
>>>> +               TI_SCI_PD_EXCLUSIVE: To allow device to be
>>>> +                        exclusively controlled by
>>>> +                        the requesting hosts.
>>>> +               TI_SCI_PD_SHARED: To allow device to be shared
>>>> +                         by multiple hosts.
>>>
>>> One thing should be noted on this, the added flag is purely for software
>>> configuration, and is not telling us anything about the HW / firmware. Software
>>
>> I does say about how firmware handles the requested device.
> 
> There is a slight nuance in the wording here. It tells the firmware how to
> handle the device, and you can basically use either flag and it will work...
> until someone else attempts to use the same device. I recall DT was supposed to
> describe the hardware, not to tell us how to use it.

Well Ill put it this way. This flag describes that the requested device is a
shared device across multiple hosts :)

> 
>>
>>> can decide to have the flag either way and it will work. I just wonder if DT is
>>> the correct location to have something like this... Expect to have plenty of
>>> churn on this by people swapping the permissions around according to their
>>> use-case needs.
>>
>> Do you have any other suggestion to handle shared devices across VMs?
> 
> Well, we should have configuration data available somewhere, but it sounds like
> DT might be wrong location for this. Maybe a whitelist of devices that can be
> shared somewhere. Maybe under the PD driver itself. Do we have any examples for

We will end up creating a separate list for each SoC and it might change per use
case. I would not like to go down that road.

Thanks and regards,
Lokesh

> something similar available in the kernel today?
> 
> -Tero
> -- 
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Tero Kristo April 10, 2019, 3:38 p.m. UTC | #5
On 10/04/2019 16:15, Lokesh Vutla wrote:
> 
> 
> On 10/04/19 6:19 PM, Tero Kristo wrote:
>> On 10/04/2019 15:37, Lokesh Vutla wrote:
>>> Hi Tero,
>>>
>>> On 10/04/19 1:34 PM, Tero Kristo wrote:
>>>> On 10/04/2019 08:37, Lokesh Vutla wrote:
>>>>> TISCI protocol supports for enabling the device either with exclusive
>>>>> permissions for the requesting host or with sharing across the hosts.
>>>>> There are certain devices which are exclusive to Linux context and
>>>>> there are certain devices that are shared across different host contexts.
>>>>> So add support for getting this information from DT by increasing
>>>>> the power-domain cells to 2.
>>>>>
>>>>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>>>>> ---
>>>>>     .../devicetree/bindings/soc/ti/sci-pm-domain.txt      | 11 +++++++++--
>>>>>     MAINTAINERS                                           |  1 +
>>>>>     include/dt-bindings/soc/ti,sci_pm_domain.h            |  9 +++++++++
>>>>>     3 files changed, 19 insertions(+), 2 deletions(-)
>>>>>     create mode 100644 include/dt-bindings/soc/ti,sci_pm_domain.h
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>>>>> b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>>>>> index f7b00a7c0f68..f541d1f776a2 100644
>>>>> --- a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>>>>> +++ b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>>>>> @@ -19,8 +19,15 @@ child of the pmmc node.
>>>>>     Required Properties:
>>>>>     --------------------
>>>>>     - compatible: should be "ti,sci-pm-domain"
>>>>> -- #power-domain-cells: Must be 1 so that an id can be provided in each
>>>>> -               device node.
>>>>> +- #power-domain-cells: Can be one of the following:
>>>>> +            1: Containing the device id of each node
>>>>> +            2: First entry should be device id
>>>>> +               Second entry should be one of the floowing:
>>>>> +               TI_SCI_PD_EXCLUSIVE: To allow device to be
>>>>> +                        exclusively controlled by
>>>>> +                        the requesting hosts.
>>>>> +               TI_SCI_PD_SHARED: To allow device to be shared
>>>>> +                         by multiple hosts.
>>>>
>>>> One thing should be noted on this, the added flag is purely for software
>>>> configuration, and is not telling us anything about the HW / firmware. Software
>>>
>>> I does say about how firmware handles the requested device.
>>
>> There is a slight nuance in the wording here. It tells the firmware how to
>> handle the device, and you can basically use either flag and it will work...
>> until someone else attempts to use the same device. I recall DT was supposed to
>> describe the hardware, not to tell us how to use it.
> 
> Well Ill put it this way. This flag describes that the requested device is a
> shared device across multiple hosts :)

But that is pure software config, right? Depends on the software design 
choices made, which host is going to use which resource. Personally I 
don't think this justifies a DT binding, but I might be wrong. I'll let 
Rob comment on this.

-Tero

> 
>>
>>>
>>>> can decide to have the flag either way and it will work. I just wonder if DT is
>>>> the correct location to have something like this... Expect to have plenty of
>>>> churn on this by people swapping the permissions around according to their
>>>> use-case needs.
>>>
>>> Do you have any other suggestion to handle shared devices across VMs?
>>
>> Well, we should have configuration data available somewhere, but it sounds like
>> DT might be wrong location for this. Maybe a whitelist of devices that can be
>> shared somewhere. Maybe under the PD driver itself. Do we have any examples for
> 
> We will end up creating a separate list for each SoC and it might change per use
> case. I would not like to go down that road.
> 
> Thanks and regards,
> Lokesh
> 
>> something similar available in the kernel today?
>>
>> -Tero
>> -- 

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Tony Lindgren April 11, 2019, 2:34 p.m. UTC | #6
* Tero Kristo <t-kristo@ti.com> [190410 15:39]:
> On 10/04/2019 16:15, Lokesh Vutla wrote:
> > Well Ill put it this way. This flag describes that the requested device is a
> > shared device across multiple hosts :)
> 
> But that is pure software config, right? Depends on the software design
> choices made, which host is going to use which resource. Personally I don't
> think this justifies a DT binding, but I might be wrong. I'll let Rob
> comment on this.

I agree. It's best to stick to basics with the device tree bindings
and not put any software flags there.

You can configure things on init in the device driver based on
compatible and soc_device_match().

Regards,

Tony
Tero Kristo May 2, 2019, 9:24 a.m. UTC | #7
On 10/04/2019 08:37, Lokesh Vutla wrote:
> TISCI protocol supports for enabling the device either with exclusive
> permissions for the requesting host or with sharing across the hosts.
> There are certain devices which are exclusive to Linux context and
> there are certain devices that are shared across different host contexts.
> So add support for getting this information from DT by increasing
> the power-domain cells to 2.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

Based on some offline discussions with Rob, I am withdrawing my concerns 
on this patch, thus:

Acked-by: Tero Kristo <t-kristo@ti.com>

We would still need ack from Rob though.

-Tero

> ---
>   .../devicetree/bindings/soc/ti/sci-pm-domain.txt      | 11 +++++++++--
>   MAINTAINERS                                           |  1 +
>   include/dt-bindings/soc/ti,sci_pm_domain.h            |  9 +++++++++
>   3 files changed, 19 insertions(+), 2 deletions(-)
>   create mode 100644 include/dt-bindings/soc/ti,sci_pm_domain.h
> 
> diff --git a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
> index f7b00a7c0f68..f541d1f776a2 100644
> --- a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
> +++ b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
> @@ -19,8 +19,15 @@ child of the pmmc node.
>   Required Properties:
>   --------------------
>   - compatible: should be "ti,sci-pm-domain"
> -- #power-domain-cells: Must be 1 so that an id can be provided in each
> -		       device node.
> +- #power-domain-cells: Can be one of the following:
> +			1: Containing the device id of each node
> +			2: First entry should be device id
> +			   Second entry should be one of the floowing:
> +			   TI_SCI_PD_EXCLUSIVE: To allow device to be
> +						exclusively controlled by
> +						the requesting hosts.
> +			   TI_SCI_PD_SHARED: To allow device to be shared
> +					     by multiple hosts.
>   
>   Example (K2G):
>   -------------
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 2359e12e4c41..dc7a19cc1831 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -15345,6 +15345,7 @@ F:	drivers/firmware/ti_sci*
>   F:	include/linux/soc/ti/ti_sci_protocol.h
>   F:	Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>   F:	drivers/soc/ti/ti_sci_pm_domains.c
> +F:	include/dt-bindings/soc/ti,sci_pm_domain.h
>   F:	Documentation/devicetree/bindings/reset/ti,sci-reset.txt
>   F:	Documentation/devicetree/bindings/clock/ti,sci-clk.txt
>   F:	drivers/clk/keystone/sci-clk.c
> diff --git a/include/dt-bindings/soc/ti,sci_pm_domain.h b/include/dt-bindings/soc/ti,sci_pm_domain.h
> new file mode 100644
> index 000000000000..8f2a7360b65e
> --- /dev/null
> +++ b/include/dt-bindings/soc/ti,sci_pm_domain.h
> @@ -0,0 +1,9 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +
> +#ifndef __DT_BINDINGS_TI_SCI_PM_DOMAIN_H
> +#define __DT_BINDINGS_TI_SCI_PM_DOMAIN_H
> +
> +#define TI_SCI_PD_EXCLUSIVE	1
> +#define TI_SCI_PD_SHARED	0
> +
> +#endif /* __DT_BINDINGS_TI_SCI_PM_DOMAIN_H */
> 

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Tero Kristo June 11, 2019, 12:34 p.m. UTC | #8
On 02/05/2019 12:24, Tero Kristo wrote:
> On 10/04/2019 08:37, Lokesh Vutla wrote:
>> TISCI protocol supports for enabling the device either with exclusive
>> permissions for the requesting host or with sharing across the hosts.
>> There are certain devices which are exclusive to Linux context and
>> there are certain devices that are shared across different host contexts.
>> So add support for getting this information from DT by increasing
>> the power-domain cells to 2.
>>
>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> 
> Based on some offline discussions with Rob, I am withdrawing my concerns 
> on this patch, thus:
> 
> Acked-by: Tero Kristo <t-kristo@ti.com>
> 
> We would still need ack from Rob though.

Rob? Any chance to get ack on this?

-Tero

> 
>> ---
>>   .../devicetree/bindings/soc/ti/sci-pm-domain.txt      | 11 +++++++++--
>>   MAINTAINERS                                           |  1 +
>>   include/dt-bindings/soc/ti,sci_pm_domain.h            |  9 +++++++++
>>   3 files changed, 19 insertions(+), 2 deletions(-)
>>   create mode 100644 include/dt-bindings/soc/ti,sci_pm_domain.h
>>
>> diff --git 
>> a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt 
>> b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>> index f7b00a7c0f68..f541d1f776a2 100644
>> --- a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>> +++ b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>> @@ -19,8 +19,15 @@ child of the pmmc node.
>>   Required Properties:
>>   --------------------
>>   - compatible: should be "ti,sci-pm-domain"
>> -- #power-domain-cells: Must be 1 so that an id can be provided in each
>> -               device node.
>> +- #power-domain-cells: Can be one of the following:
>> +            1: Containing the device id of each node
>> +            2: First entry should be device id
>> +               Second entry should be one of the floowing:
>> +               TI_SCI_PD_EXCLUSIVE: To allow device to be
>> +                        exclusively controlled by
>> +                        the requesting hosts.
>> +               TI_SCI_PD_SHARED: To allow device to be shared
>> +                         by multiple hosts.
>>   Example (K2G):
>>   -------------
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 2359e12e4c41..dc7a19cc1831 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -15345,6 +15345,7 @@ F:    drivers/firmware/ti_sci*
>>   F:    include/linux/soc/ti/ti_sci_protocol.h
>>   F:    Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
>>   F:    drivers/soc/ti/ti_sci_pm_domains.c
>> +F:    include/dt-bindings/soc/ti,sci_pm_domain.h
>>   F:    Documentation/devicetree/bindings/reset/ti,sci-reset.txt
>>   F:    Documentation/devicetree/bindings/clock/ti,sci-clk.txt
>>   F:    drivers/clk/keystone/sci-clk.c
>> diff --git a/include/dt-bindings/soc/ti,sci_pm_domain.h 
>> b/include/dt-bindings/soc/ti,sci_pm_domain.h
>> new file mode 100644
>> index 000000000000..8f2a7360b65e
>> --- /dev/null
>> +++ b/include/dt-bindings/soc/ti,sci_pm_domain.h
>> @@ -0,0 +1,9 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +
>> +#ifndef __DT_BINDINGS_TI_SCI_PM_DOMAIN_H
>> +#define __DT_BINDINGS_TI_SCI_PM_DOMAIN_H
>> +
>> +#define TI_SCI_PD_EXCLUSIVE    1
>> +#define TI_SCI_PD_SHARED    0
>> +
>> +#endif /* __DT_BINDINGS_TI_SCI_PM_DOMAIN_H */
>>
> 

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Rob Herring June 13, 2019, 10:22 p.m. UTC | #9
On Tue, Jun 11, 2019 at 6:35 AM Tero Kristo <t-kristo@ti.com> wrote:
>
> On 02/05/2019 12:24, Tero Kristo wrote:
> > On 10/04/2019 08:37, Lokesh Vutla wrote:
> >> TISCI protocol supports for enabling the device either with exclusive
> >> permissions for the requesting host or with sharing across the hosts.
> >> There are certain devices which are exclusive to Linux context and
> >> there are certain devices that are shared across different host contexts.
> >> So add support for getting this information from DT by increasing
> >> the power-domain cells to 2.
> >>
> >> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> >
> > Based on some offline discussions with Rob, I am withdrawing my concerns
> > on this patch, thus:
> >
> > Acked-by: Tero Kristo <t-kristo@ti.com>
> >
> > We would still need ack from Rob though.
>
> Rob? Any chance to get ack on this?

Acked-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
index f7b00a7c0f68..f541d1f776a2 100644
--- a/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
+++ b/Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
@@ -19,8 +19,15 @@  child of the pmmc node.
 Required Properties:
 --------------------
 - compatible: should be "ti,sci-pm-domain"
-- #power-domain-cells: Must be 1 so that an id can be provided in each
-		       device node.
+- #power-domain-cells: Can be one of the following:
+			1: Containing the device id of each node
+			2: First entry should be device id
+			   Second entry should be one of the floowing:
+			   TI_SCI_PD_EXCLUSIVE: To allow device to be
+						exclusively controlled by
+						the requesting hosts.
+			   TI_SCI_PD_SHARED: To allow device to be shared
+					     by multiple hosts.
 
 Example (K2G):
 -------------
diff --git a/MAINTAINERS b/MAINTAINERS
index 2359e12e4c41..dc7a19cc1831 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15345,6 +15345,7 @@  F:	drivers/firmware/ti_sci*
 F:	include/linux/soc/ti/ti_sci_protocol.h
 F:	Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
 F:	drivers/soc/ti/ti_sci_pm_domains.c
+F:	include/dt-bindings/soc/ti,sci_pm_domain.h
 F:	Documentation/devicetree/bindings/reset/ti,sci-reset.txt
 F:	Documentation/devicetree/bindings/clock/ti,sci-clk.txt
 F:	drivers/clk/keystone/sci-clk.c
diff --git a/include/dt-bindings/soc/ti,sci_pm_domain.h b/include/dt-bindings/soc/ti,sci_pm_domain.h
new file mode 100644
index 000000000000..8f2a7360b65e
--- /dev/null
+++ b/include/dt-bindings/soc/ti,sci_pm_domain.h
@@ -0,0 +1,9 @@ 
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef __DT_BINDINGS_TI_SCI_PM_DOMAIN_H
+#define __DT_BINDINGS_TI_SCI_PM_DOMAIN_H
+
+#define TI_SCI_PD_EXCLUSIVE	1
+#define TI_SCI_PD_SHARED	0
+
+#endif /* __DT_BINDINGS_TI_SCI_PM_DOMAIN_H */