diff mbox series

[1/7] dt-bindings: soc: add bindings for i.MX93 SRC

Message ID 20220523113029.842753-2-peng.fan@oss.nxp.com (mailing list archive)
State New, archived
Headers show
Series imx: support i.MX93 SRC and mediamix blk ctrl | expand

Commit Message

Peng Fan (OSS) May 23, 2022, 11:30 a.m. UTC
From: Peng Fan <peng.fan@nxp.com>

Add bindings for i.MX93 System Reset Controller(SRC). SRC supports
resets and power gating for mixes.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 .../bindings/soc/imx/fsl,imx93-src.yaml       | 88 +++++++++++++++++++
 include/dt-bindings/power/imx93-power.h       | 11 +++
 2 files changed, 99 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
 create mode 100644 include/dt-bindings/power/imx93-power.h

Comments

Krzysztof Kozlowski May 24, 2022, 10:07 a.m. UTC | #1
On 23/05/2022 13:30, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Add bindings for i.MX93 System Reset Controller(SRC). SRC supports
> resets and power gating for mixes.
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  .../bindings/soc/imx/fsl,imx93-src.yaml       | 88 +++++++++++++++++++
>  include/dt-bindings/power/imx93-power.h       | 11 +++
>  2 files changed, 99 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml

File should be in respective subsystem, so probably power/reset?

>  create mode 100644 include/dt-bindings/power/imx93-power.h
> 
> diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
> new file mode 100644
> index 000000000000..d45c1458b9c1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
> @@ -0,0 +1,88 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/soc/imx/fsl,imx93-src.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP i.MX9 System Reset Controller
> +
> +maintainers:
> +  - Peng Fan <peng.fan@nxp.com>
> +
> +description: |
> +  The System Reset Controller (SRC) is responsible for the generation of
> +  all the system reset signals and boot argument latching.
> +
> +  Its main functions are as follows,
> +  - Deals with all global system reset sources from other modules,
> +    and generates global system reset.
> +  - Responsible for power gating of MIXs (Slices) and their memory
> +    low power control.
> +
> +properties:
> +  compatible:
> +    items:
> +      - const: fsl,imx93-src
> +      - const: syscon
> +
> +  reg:
> +    maxItems: 1
> +
> +  slice:

Why do you need this subnode, instead of listing domains here?

> +    type: object
> +    description: list of power domains provided by this controller.
> +

Hm, what about address/size cells? Is syscon schema bringing these?

> +    patternProperties:
> +      "power-domain@[0-9]$":
> +        type: object

Missing ref to power-domain.yaml

> +        properties:
> +
> +          '#power-domain-cells':
> +            const: 0
> +
> +          reg:
> +            description: |
> +              Power domain index. Valid values are defined in
> +              include/dt-bindings/power/imx93-power.h for fsl,imx93-src
> +            maxItems: 1
> +
> +          clocks:
> +            description: |
> +              A number of phandles to clocks that need to be enabled
> +              during domain power-up sequencing to ensure reset
> +              propagation into devices located inside this power domain.
> +            minItems: 1
> +            maxItems: 5
> +
> +        required:
> +          - '#power-domain-cells'
> +          - reg
> +
> +required:
> +  - compatible
> +  - reg
> +  - slice
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/imx93-clock.h>
> +    #include <dt-bindings/power/imx93-power.h>
> +
> +    src@44460000 {

reset-controller
or some other generic node name.

> +        compatible = "fsl,imx93-src", "syscon";
> +        reg = <0x44460000 0x10000>;
> +
> +        slice {
> +                #address-cells = <1>;
> +                #size-cells = <0>;
> +
> +                mediamix: power-domain@0 {

Best regards,
Krzysztof
Peng Fan May 24, 2022, 10:37 a.m. UTC | #2
> Subject: Re: [PATCH 1/7] dt-bindings: soc: add bindings for i.MX93 SRC
> 
> On 23/05/2022 13:30, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > Add bindings for i.MX93 System Reset Controller(SRC). SRC supports
> > resets and power gating for mixes.
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >  .../bindings/soc/imx/fsl,imx93-src.yaml       | 88
> +++++++++++++++++++
> >  include/dt-bindings/power/imx93-power.h       | 11 +++
> >  2 files changed, 99 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
> 
> File should be in respective subsystem, so probably power/reset?

ok, will put under power.

> 
> >  create mode 100644 include/dt-bindings/power/imx93-power.h
> >
> > diff --git
> > a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
> > b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
> > new file mode 100644
> > index 000000000000..d45c1458b9c1
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
> > @@ -0,0 +1,88 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
> > +---
> > +$id:
> > +> > +title: NXP i.MX9 System Reset Controller
> > +
> > +maintainers:
> > +  - Peng Fan <peng.fan@nxp.com>
> > +
> > +description: |
> > +  The System Reset Controller (SRC) is responsible for the generation
> > +of
> > +  all the system reset signals and boot argument latching.
> > +
> > +  Its main functions are as follows,
> > +  - Deals with all global system reset sources from other modules,
> > +    and generates global system reset.
> > +  - Responsible for power gating of MIXs (Slices) and their memory
> > +    low power control.
> > +
> > +properties:
> > +  compatible:
> > +    items:
> > +      - const: fsl,imx93-src
> > +      - const: syscon
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  slice:
> 
> Why do you need this subnode, instead of listing domains here?

I follow
Documentation/devicetree/bindings/power/fsl,imx-gpcv2.yaml

There are several slices in SRC, just like there are many pgcs in gpcv2.


> 
> > +    type: object
> > +    description: list of power domains provided by this controller.
> > +
> 
> Hm, what about address/size cells? Is syscon schema bringing these?

The slice submode should have address/size cells, but I not
meet yaml/dtbs check error. Will add it.

Not sure syscon bringing or not.

> 
> > +    patternProperties:
> > +      "power-domain@[0-9]$":
> > +        type: object
> 
> Missing ref to power-domain.yaml

Ok.

> 
> > +        properties:
> > +
> > +          '#power-domain-cells':
> > +            const: 0
> > +
> > +          reg:
> > +            description: |
> > +              Power domain index. Valid values are defined in
> > +              include/dt-bindings/power/imx93-power.h for fsl,imx93-src
> > +            maxItems: 1
> > +
> > +          clocks:
> > +            description: |
> > +              A number of phandles to clocks that need to be enabled
> > +              during domain power-up sequencing to ensure reset
> > +              propagation into devices located inside this power domain.
> > +            minItems: 1
> > +            maxItems: 5
> > +
> > +        required:
> > +          - '#power-domain-cells'
> > +          - reg
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - slice
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/clock/imx93-clock.h>
> > +    #include <dt-bindings/power/imx93-power.h>
> > +
> > +    src@44460000 {
> 
> reset-controller
> or some other generic node name.

It is not a single reset or power domain controller,
Currently linux driver just use it as a power domain
controller.

Thanks,
Peng.

> 
> > +        compatible = "fsl,imx93-src", "syscon";
> > +        reg = <0x44460000 0x10000>;
> > +
> > +        slice {
> > +                #address-cells = <1>;
> > +                #size-cells = <0>;
> > +
> > +                mediamix: power-domain@0 {
> 
> Best regards,
> Krzysztof
Krzysztof Kozlowski May 24, 2022, 11:16 a.m. UTC | #3
On 23/05/2022 13:30, Peng Fan (OSS) wrote:

One more comment.

> diff --git a/include/dt-bindings/power/imx93-power.h b/include/dt-bindings/power/imx93-power.h
> new file mode 100644
> index 000000000000..27fb7df80f93
> --- /dev/null
> +++ b/include/dt-bindings/power/imx93-power.h

File name with vendor, so "fsl,imx93-power.h"

> @@ -0,0 +1,11 @@
> +/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
> +/*
> + *  Copyright 2022 NXP
> + */
> +
> +#ifndef __DT_BINDINGS_IMX93_POWER_H__
> +#define __DT_BINDINGS_IMX93_POWER_H__
> +
> +#define IMX93_POWER_DOMAIN_MEDIAMIX		0
> +
> +#endif


Best regards,
Krzysztof
Krzysztof Kozlowski May 24, 2022, 11:34 a.m. UTC | #4
On 24/05/2022 12:37, Peng Fan wrote:
>> Subject: Re: [PATCH 1/7] dt-bindings: soc: add bindings for i.MX93 SRC
>>
>> On 23/05/2022 13:30, Peng Fan (OSS) wrote:
>>> From: Peng Fan <peng.fan@nxp.com>
>>>
>>> Add bindings for i.MX93 System Reset Controller(SRC). SRC supports
>>> resets and power gating for mixes.
>>>
>>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>>> ---
>>>  .../bindings/soc/imx/fsl,imx93-src.yaml       | 88
>> +++++++++++++++++++
>>>  include/dt-bindings/power/imx93-power.h       | 11 +++
>>>  2 files changed, 99 insertions(+)
>>>  create mode 100644
>>> Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
>>
>> File should be in respective subsystem, so probably power/reset?
> 
> ok, will put under power.
> 
>>
>>>  create mode 100644 include/dt-bindings/power/imx93-power.h
>>>
>>> diff --git
>>> a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
>>> b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
>>> new file mode 100644
>>> index 000000000000..d45c1458b9c1
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
>>> @@ -0,0 +1,88 @@
>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
>>> +---
>>> +$id:
>>> +> > +title: NXP i.MX9 System Reset Controller
>>> +
>>> +maintainers:
>>> +  - Peng Fan <peng.fan@nxp.com>
>>> +
>>> +description: |
>>> +  The System Reset Controller (SRC) is responsible for the generation
>>> +of
>>> +  all the system reset signals and boot argument latching.
>>> +
>>> +  Its main functions are as follows,
>>> +  - Deals with all global system reset sources from other modules,
>>> +    and generates global system reset.
>>> +  - Responsible for power gating of MIXs (Slices) and their memory
>>> +    low power control.
>>> +
>>> +properties:
>>> +  compatible:
>>> +    items:
>>> +      - const: fsl,imx93-src
>>> +      - const: syscon
>>> +
>>> +  reg:
>>> +    maxItems: 1
>>> +
>>> +  slice:
>>
>> Why do you need this subnode, instead of listing domains here?
> 
> I follow
> Documentation/devicetree/bindings/power/fsl,imx-gpcv2.yaml
> 
> There are several slices in SRC, just like there are many pgcs in gpcv2.

Wait, but you have only one slice and you do no allow more of them. The
same as for gpcv2 - there is only one pgc. What's the point of that node?

> 
> 
>>
>>> +    type: object
>>> +    description: list of power domains provided by this controller.
>>> +
>>
>> Hm, what about address/size cells? Is syscon schema bringing these?
> 
> The slice submode should have address/size cells, but I not
> meet yaml/dtbs check error. Will add it.
> 
> Not sure syscon bringing or not.
> 
>>
>>> +    patternProperties:
>>> +      "power-domain@[0-9]$":
>>> +        type: object
>>
>> Missing ref to power-domain.yaml
> 
> Ok.
> 
>>
>>> +        properties:
>>> +
>>> +          '#power-domain-cells':
>>> +            const: 0
>>> +
>>> +          reg:
>>> +            description: |
>>> +              Power domain index. Valid values are defined in
>>> +              include/dt-bindings/power/imx93-power.h for fsl,imx93-src
>>> +            maxItems: 1
>>> +
>>> +          clocks:
>>> +            description: |
>>> +              A number of phandles to clocks that need to be enabled
>>> +              during domain power-up sequencing to ensure reset
>>> +              propagation into devices located inside this power domain.
>>> +            minItems: 1
>>> +            maxItems: 5
>>> +
>>> +        required:
>>> +          - '#power-domain-cells'
>>> +          - reg
>>> +
>>> +required:
>>> +  - compatible
>>> +  - reg
>>> +  - slice
>>> +
>>> +additionalProperties: false
>>> +
>>> +examples:
>>> +  - |
>>> +    #include <dt-bindings/clock/imx93-clock.h>
>>> +    #include <dt-bindings/power/imx93-power.h>
>>> +
>>> +    src@44460000 {
>>
>> reset-controller
>> or some other generic node name.
> 
> It is not a single reset or power domain controller,
> Currently linux driver just use it as a power domain
> controller.

Then maybe system-controller.

> 
> Thanks,
> Peng.
> 
>>
>>> +        compatible = "fsl,imx93-src", "syscon";
>>> +        reg = <0x44460000 0x10000>;
>>> +
>>> +        slice {
>>> +                #address-cells = <1>;
>>> +                #size-cells = <0>;
>>> +
>>> +                mediamix: power-domain@0 {
>>
>> Best regards,
>> Krzysztof


Best regards,
Krzysztof
Peng Fan May 24, 2022, 12:07 p.m. UTC | #5
> Subject: Re: [PATCH 1/7] dt-bindings: soc: add bindings for i.MX93 SRC
> 
> On 24/05/2022 12:37, Peng Fan wrote:
> >> Subject: Re: [PATCH 1/7] dt-bindings: soc: add bindings for i.MX93
> >> SRC
> >>
> >> On 23/05/2022 13:30, Peng Fan (OSS) wrote:
> >>> From: Peng Fan <peng.fan@nxp.com>
> >>>
> >>> Add bindings for i.MX93 System Reset Controller(SRC). SRC supports
> >>> resets and power gating for mixes.
> >>>
> >>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> >>> ---
> >>>  .../bindings/soc/imx/fsl,imx93-src.yaml       | 88
> >> +++++++++++++++++++
> >>>  include/dt-bindings/power/imx93-power.h       | 11 +++
> >>>  2 files changed, 99 insertions(+)
> >>>  create mode 100644
> >>> Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
> >>
> >> File should be in respective subsystem, so probably power/reset?
> >
> > ok, will put under power.
> >
> >>
> >>>  create mode 100644 include/dt-bindings/power/imx93-power.h
> >>>
> >>> diff --git
> >>> a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
> >>> b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
> >>> new file mode 100644
> >>> index 000000000000..d45c1458b9c1
> >>> --- /dev/null
> >>> +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
> >>> @@ -0,0 +1,88 @@
> >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
> >>> +---
> >>> +$id:
> >>> +> > +title: NXP i.MX9 System Reset Controller
> >>> +
> >>> +maintainers:
> >>> +  - Peng Fan <peng.fan@nxp.com>
> >>> +
> >>> +description: |
> >>> +  The System Reset Controller (SRC) is responsible for the
> >>> +generation of
> >>> +  all the system reset signals and boot argument latching.
> >>> +
> >>> +  Its main functions are as follows,
> >>> +  - Deals with all global system reset sources from other modules,
> >>> +    and generates global system reset.
> >>> +  - Responsible for power gating of MIXs (Slices) and their memory
> >>> +    low power control.
> >>> +
> >>> +properties:
> >>> +  compatible:
> >>> +    items:
> >>> +      - const: fsl,imx93-src
> >>> +      - const: syscon
> >>> +
> >>> +  reg:
> >>> +    maxItems: 1
> >>> +
> >>> +  slice:
> >>
> >> Why do you need this subnode, instead of listing domains here?
> >
> > I follow
> > Documentation/devicetree/bindings/power/fsl,imx-gpcv2.yaml
> >
> > There are several slices in SRC, just like there are many pgcs in gpcv2.
> 
> Wait, but you have only one slice and you do no allow more of them. 

Slice is just a group node that could include many child nodes,
such as 
slice {
  mediamix {
  };
  mlmix {
  };
}

The same
> as for gpcv2 - there is only one pgc. What's the point of that node?

There are many pgcs, pgc is just a group node there,
See arch/arm64/boot/dts/freescale/imx8mp.dtsi.

> 
> >
> >
> >>
> >>> +    type: object
> >>> +    description: list of power domains provided by this controller.
> >>> +
> >>
> >> Hm, what about address/size cells? Is syscon schema bringing these?
> >
> > The slice submode should have address/size cells, but I not meet
> > yaml/dtbs check error. Will add it.
> >
> > Not sure syscon bringing or not.
> >
> >>
> >>> +    patternProperties:
> >>> +      "power-domain@[0-9]$":
> >>> +        type: object
> >>
> >> Missing ref to power-domain.yaml
> >
> > Ok.
> >
> >>
> >>> +        properties:
> >>> +
> >>> +          '#power-domain-cells':
> >>> +            const: 0
> >>> +
> >>> +          reg:
> >>> +            description: |
> >>> +              Power domain index. Valid values are defined in
> >>> +              include/dt-bindings/power/imx93-power.h for
> fsl,imx93-src
> >>> +            maxItems: 1
> >>> +
> >>> +          clocks:
> >>> +            description: |
> >>> +              A number of phandles to clocks that need to be enabled
> >>> +              during domain power-up sequencing to ensure reset
> >>> +              propagation into devices located inside this power
> domain.
> >>> +            minItems: 1
> >>> +            maxItems: 5
> >>> +
> >>> +        required:
> >>> +          - '#power-domain-cells'
> >>> +          - reg
> >>> +
> >>> +required:
> >>> +  - compatible
> >>> +  - reg
> >>> +  - slice
> >>> +
> >>> +additionalProperties: false
> >>> +
> >>> +examples:
> >>> +  - |
> >>> +    #include <dt-bindings/clock/imx93-clock.h>
> >>> +    #include <dt-bindings/power/imx93-power.h>
> >>> +
> >>> +    src@44460000 {
> >>
> >> reset-controller
> >> or some other generic node name.
> >
> > It is not a single reset or power domain controller, Currently linux
> > driver just use it as a power domain controller.
> 
> Then maybe system-controller.

Ok.

Thanks,
Peng.

> 
> >
> > Thanks,
> > Peng.
> >
> >>
> >>> +        compatible = "fsl,imx93-src", "syscon";
> >>> +        reg = <0x44460000 0x10000>;
> >>> +
> >>> +        slice {
> >>> +                #address-cells = <1>;
> >>> +                #size-cells = <0>;
> >>> +
> >>> +                mediamix: power-domain@0 {
> >>
> >> Best regards,
> >> Krzysztof
> 
> 
> Best regards,
> Krzysztof
Krzysztof Kozlowski May 26, 2022, 12:08 p.m. UTC | #6
On 24/05/2022 14:07, Peng Fan wrote:
>> Subject: Re: [PATCH 1/7] dt-bindings: soc: add bindings for i.MX93 SRC
>>
>> On 24/05/2022 12:37, Peng Fan wrote:
>>>> Subject: Re: [PATCH 1/7] dt-bindings: soc: add bindings for i.MX93
>>>> SRC
>>>>
>>>> On 23/05/2022 13:30, Peng Fan (OSS) wrote:
>>>>> From: Peng Fan <peng.fan@nxp.com>
>>>>>
>>>>> Add bindings for i.MX93 System Reset Controller(SRC). SRC supports
>>>>> resets and power gating for mixes.
>>>>>
>>>>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>>>>> ---
>>>>>  .../bindings/soc/imx/fsl,imx93-src.yaml       | 88
>>>> +++++++++++++++++++
>>>>>  include/dt-bindings/power/imx93-power.h       | 11 +++
>>>>>  2 files changed, 99 insertions(+)
>>>>>  create mode 100644
>>>>> Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
>>>>
>>>> File should be in respective subsystem, so probably power/reset?
>>>
>>> ok, will put under power.
>>>
>>>>
>>>>>  create mode 100644 include/dt-bindings/power/imx93-power.h
>>>>>
>>>>> diff --git
>>>>> a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
>>>>> b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
>>>>> new file mode 100644
>>>>> index 000000000000..d45c1458b9c1
>>>>> --- /dev/null
>>>>> +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
>>>>> @@ -0,0 +1,88 @@
>>>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
>>>>> +---
>>>>> +$id:
>>>>> +> > +title: NXP i.MX9 System Reset Controller
>>>>> +
>>>>> +maintainers:
>>>>> +  - Peng Fan <peng.fan@nxp.com>
>>>>> +
>>>>> +description: |
>>>>> +  The System Reset Controller (SRC) is responsible for the
>>>>> +generation of
>>>>> +  all the system reset signals and boot argument latching.
>>>>> +
>>>>> +  Its main functions are as follows,
>>>>> +  - Deals with all global system reset sources from other modules,
>>>>> +    and generates global system reset.
>>>>> +  - Responsible for power gating of MIXs (Slices) and their memory
>>>>> +    low power control.
>>>>> +
>>>>> +properties:
>>>>> +  compatible:
>>>>> +    items:
>>>>> +      - const: fsl,imx93-src
>>>>> +      - const: syscon
>>>>> +
>>>>> +  reg:
>>>>> +    maxItems: 1
>>>>> +
>>>>> +  slice:
>>>>
>>>> Why do you need this subnode, instead of listing domains here?
>>>
>>> I follow
>>> Documentation/devicetree/bindings/power/fsl,imx-gpcv2.yaml
>>>
>>> There are several slices in SRC, just like there are many pgcs in gpcv2.
>>
>> Wait, but you have only one slice and you do no allow more of them. 
> 
> Slice is just a group node that could include many child nodes,
> such as 
> slice {
>   mediamix {
>   };
>   mlmix {
>   };
> }
> 
> The same
>> as for gpcv2 - there is only one pgc. What's the point of that node?
> 
> There are many pgcs, pgc is just a group node there,
> See arch/arm64/boot/dts/freescale/imx8mp.dtsi.

So this does not explain my question at all. Why do you need "slice" (or
pgc) node? You have only one slice in this device, so this is some
indirect layer without meaning...


Best regards,
Krzysztof
Peng Fan May 27, 2022, 1:47 a.m. UTC | #7
> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: 2022年5月26日 20:08
> To: Peng Fan <peng.fan@nxp.com>; Peng Fan (OSS) <peng.fan@oss.nxp.com>;
> robh+dt@kernel.org; krzysztof.kozlowski+dt@linaro.org; sboyd@kernel.org;
> mturquette@baylibre.com; shawnguo@kernel.org; s.hauer@pengutronix.de
> Cc: Aisheng Dong <aisheng.dong@nxp.com>; l.stach@pengutronix.de;
> kernel@pengutronix.de; festevam@gmail.com; dl-linux-imx
> <linux-imx@nxp.com>; devicetree@vger.kernel.org;
> linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org
> Subject: Re: [PATCH 1/7] dt-bindings: soc: add bindings for i.MX93 SRC
> 
> On 24/05/2022 14:07, Peng Fan wrote:
> >> Subject: Re: [PATCH 1/7] dt-bindings: soc: add bindings for i.MX93
> >> SRC
> >>
> >> On 24/05/2022 12:37, Peng Fan wrote:
> >>>> Subject: Re: [PATCH 1/7] dt-bindings: soc: add bindings for i.MX93
> >>>> SRC
> >>>>
> >>>> On 23/05/2022 13:30, Peng Fan (OSS) wrote:
> >>>>> From: Peng Fan <peng.fan@nxp.com>
> >>>>>
> >>>>> Add bindings for i.MX93 System Reset Controller(SRC). SRC supports
> >>>>> resets and power gating for mixes.
> >>>>>
> >>>>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> >>>>> ---
> >>>>>  .../bindings/soc/imx/fsl,imx93-src.yaml       | 88
> >>>> +++++++++++++++++++
> >>>>>  include/dt-bindings/power/imx93-power.h       | 11 +++
> >>>>>  2 files changed, 99 insertions(+)  create mode 100644
> >>>>> Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
> >>>>
> >>>> File should be in respective subsystem, so probably power/reset?
> >>>
> >>> ok, will put under power.
> >>>
> >>>>
> >>>>>  create mode 100644 include/dt-bindings/power/imx93-power.h
> >>>>>
> >>>>> diff --git
> >>>>> a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
> >>>>> b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
> >>>>> new file mode 100644
> >>>>> index 000000000000..d45c1458b9c1
> >>>>> --- /dev/null
> >>>>> +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
> >>>>> @@ -0,0 +1,88 @@
> >>>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML
> >>>>> +1.2
> >>>>> +---
> >>>>> +$id:
> >>>>> +> > +title: NXP i.MX9 System Reset Controller
> >>>>> +
> >>>>> +maintainers:
> >>>>> +  - Peng Fan <peng.fan@nxp.com>
> >>>>> +
> >>>>> +description: |
> >>>>> +  The System Reset Controller (SRC) is responsible for the
> >>>>> +generation of
> >>>>> +  all the system reset signals and boot argument latching.
> >>>>> +
> >>>>> +  Its main functions are as follows,
> >>>>> +  - Deals with all global system reset sources from other modules,
> >>>>> +    and generates global system reset.
> >>>>> +  - Responsible for power gating of MIXs (Slices) and their memory
> >>>>> +    low power control.
> >>>>> +
> >>>>> +properties:
> >>>>> +  compatible:
> >>>>> +    items:
> >>>>> +      - const: fsl,imx93-src
> >>>>> +      - const: syscon
> >>>>> +
> >>>>> +  reg:
> >>>>> +    maxItems: 1
> >>>>> +
> >>>>> +  slice:
> >>>>
> >>>> Why do you need this subnode, instead of listing domains here?
> >>>
> >>> I follow
> >>> Documentation/devicetree/bindings/power/fsl,imx-gpcv2.yaml
> >>>
> >>> There are several slices in SRC, just like there are many pgcs in gpcv2.
> >>
> >> Wait, but you have only one slice and you do no allow more of them.
> >
> > Slice is just a group node that could include many child nodes, such
> > as slice {
> >   mediamix {
> >   };
> >   mlmix {
> >   };
> > }
> >
> > The same
> >> as for gpcv2 - there is only one pgc. What's the point of that node?
> >
> > There are many pgcs, pgc is just a group node there, See
> > arch/arm64/boot/dts/freescale/imx8mp.dtsi.
> 
> So this does not explain my question at all. Why do you need "slice" (or
> pgc) node? You have only one slice in this device, so this is some indirect layer
> without meaning...

There is not only one slice, there are many slices. I use a slice node to group
all the slices, as below:
src: system-controller@xxx {
  xxxxx
  slice {
     media: slice@0 {
     }
     ml: slice@1 {
     }
     ddr: slice@2 {
     }
  }
  xxxxx
}

With a slice node there, it will be also be easy for specific driver to know
specific node.

Thanks,
Peng.

> 
> 
> Best regards,
> Krzysztof
Krzysztof Kozlowski May 29, 2022, 7:56 a.m. UTC | #8
On 27/05/2022 03:47, Peng Fan wrote:
> 
> 
>> -----Original Message-----
>> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> Sent: 2022年5月26日 20:08
>> To: Peng Fan <peng.fan@nxp.com>; Peng Fan (OSS) <peng.fan@oss.nxp.com>;
>> robh+dt@kernel.org; krzysztof.kozlowski+dt@linaro.org; sboyd@kernel.org;
>> mturquette@baylibre.com; shawnguo@kernel.org; s.hauer@pengutronix.de
>> Cc: Aisheng Dong <aisheng.dong@nxp.com>; l.stach@pengutronix.de;
>> kernel@pengutronix.de; festevam@gmail.com; dl-linux-imx
>> <linux-imx@nxp.com>; devicetree@vger.kernel.org;
>> linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org
>> Subject: Re: [PATCH 1/7] dt-bindings: soc: add bindings for i.MX93 SRC
>>
>> On 24/05/2022 14:07, Peng Fan wrote:
>>>> Subject: Re: [PATCH 1/7] dt-bindings: soc: add bindings for i.MX93
>>>> SRC
>>>>
>>>> On 24/05/2022 12:37, Peng Fan wrote:
>>>>>> Subject: Re: [PATCH 1/7] dt-bindings: soc: add bindings for i.MX93
>>>>>> SRC
>>>>>>
>>>>>> On 23/05/2022 13:30, Peng Fan (OSS) wrote:
>>>>>>> From: Peng Fan <peng.fan@nxp.com>
>>>>>>>
>>>>>>> Add bindings for i.MX93 System Reset Controller(SRC). SRC supports
>>>>>>> resets and power gating for mixes.
>>>>>>>
>>>>>>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>>>>>>> ---
>>>>>>>  .../bindings/soc/imx/fsl,imx93-src.yaml       | 88
>>>>>> +++++++++++++++++++
>>>>>>>  include/dt-bindings/power/imx93-power.h       | 11 +++
>>>>>>>  2 files changed, 99 insertions(+)  create mode 100644
>>>>>>> Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
>>>>>>
>>>>>> File should be in respective subsystem, so probably power/reset?
>>>>>
>>>>> ok, will put under power.
>>>>>
>>>>>>
>>>>>>>  create mode 100644 include/dt-bindings/power/imx93-power.h
>>>>>>>
>>>>>>> diff --git
>>>>>>> a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
>>>>>>> b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
>>>>>>> new file mode 100644
>>>>>>> index 000000000000..d45c1458b9c1
>>>>>>> --- /dev/null
>>>>>>> +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
>>>>>>> @@ -0,0 +1,88 @@
>>>>>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML
>>>>>>> +1.2
>>>>>>> +---
>>>>>>> +$id:
>>>>>>> +> > +title: NXP i.MX9 System Reset Controller
>>>>>>> +
>>>>>>> +maintainers:
>>>>>>> +  - Peng Fan <peng.fan@nxp.com>
>>>>>>> +
>>>>>>> +description: |
>>>>>>> +  The System Reset Controller (SRC) is responsible for the
>>>>>>> +generation of
>>>>>>> +  all the system reset signals and boot argument latching.
>>>>>>> +
>>>>>>> +  Its main functions are as follows,
>>>>>>> +  - Deals with all global system reset sources from other modules,
>>>>>>> +    and generates global system reset.
>>>>>>> +  - Responsible for power gating of MIXs (Slices) and their memory
>>>>>>> +    low power control.
>>>>>>> +
>>>>>>> +properties:
>>>>>>> +  compatible:
>>>>>>> +    items:
>>>>>>> +      - const: fsl,imx93-src
>>>>>>> +      - const: syscon
>>>>>>> +
>>>>>>> +  reg:
>>>>>>> +    maxItems: 1
>>>>>>> +
>>>>>>> +  slice:
>>>>>>
>>>>>> Why do you need this subnode, instead of listing domains here?
>>>>>
>>>>> I follow
>>>>> Documentation/devicetree/bindings/power/fsl,imx-gpcv2.yaml
>>>>>
>>>>> There are several slices in SRC, just like there are many pgcs in gpcv2.
>>>>
>>>> Wait, but you have only one slice and you do no allow more of them.
>>>
>>> Slice is just a group node that could include many child nodes, such
>>> as slice {
>>>   mediamix {
>>>   };
>>>   mlmix {
>>>   };
>>> }
>>>
>>> The same
>>>> as for gpcv2 - there is only one pgc. What's the point of that node?
>>>
>>> There are many pgcs, pgc is just a group node there, See
>>> arch/arm64/boot/dts/freescale/imx8mp.dtsi.
>>
>> So this does not explain my question at all. Why do you need "slice" (or
>> pgc) node? You have only one slice in this device, so this is some indirect layer
>> without meaning...
> 
> There is not only one slice, there are many slices. I use a slice node to group
> all the slices, as below:
> src: system-controller@xxx {
>   xxxxx
>   slice {
>      media: slice@0 {
>      }
>      ml: slice@1 {
>      }
>      ddr: slice@2 {
>      }
>   }
>   xxxxx
> }
> 
> With a slice node there, it will be also be easy for specific driver to know
> specific node.

I understand that, you repeat and repeat the same description of what
you are doing, but that still does not explain my first question - why
do you need superficial slice property containing all the slices?


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
new file mode 100644
index 000000000000..d45c1458b9c1
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-src.yaml
@@ -0,0 +1,88 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/imx/fsl,imx93-src.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP i.MX9 System Reset Controller
+
+maintainers:
+  - Peng Fan <peng.fan@nxp.com>
+
+description: |
+  The System Reset Controller (SRC) is responsible for the generation of
+  all the system reset signals and boot argument latching.
+
+  Its main functions are as follows,
+  - Deals with all global system reset sources from other modules,
+    and generates global system reset.
+  - Responsible for power gating of MIXs (Slices) and their memory
+    low power control.
+
+properties:
+  compatible:
+    items:
+      - const: fsl,imx93-src
+      - const: syscon
+
+  reg:
+    maxItems: 1
+
+  slice:
+    type: object
+    description: list of power domains provided by this controller.
+
+    patternProperties:
+      "power-domain@[0-9]$":
+        type: object
+        properties:
+
+          '#power-domain-cells':
+            const: 0
+
+          reg:
+            description: |
+              Power domain index. Valid values are defined in
+              include/dt-bindings/power/imx93-power.h for fsl,imx93-src
+            maxItems: 1
+
+          clocks:
+            description: |
+              A number of phandles to clocks that need to be enabled
+              during domain power-up sequencing to ensure reset
+              propagation into devices located inside this power domain.
+            minItems: 1
+            maxItems: 5
+
+        required:
+          - '#power-domain-cells'
+          - reg
+
+required:
+  - compatible
+  - reg
+  - slice
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/imx93-clock.h>
+    #include <dt-bindings/power/imx93-power.h>
+
+    src@44460000 {
+        compatible = "fsl,imx93-src", "syscon";
+        reg = <0x44460000 0x10000>;
+
+        slice {
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                mediamix: power-domain@0 {
+                        reg = <IMX93_POWER_DOMAIN_MEDIAMIX>;
+                        #power-domain-cells = <0>;
+                        clocks = <&clk IMX93_CLK_MEDIA_AXI>,
+                                 <&clk IMX93_CLK_MEDIA_APB>;
+                };
+        };
+    };
diff --git a/include/dt-bindings/power/imx93-power.h b/include/dt-bindings/power/imx93-power.h
new file mode 100644
index 000000000000..27fb7df80f93
--- /dev/null
+++ b/include/dt-bindings/power/imx93-power.h
@@ -0,0 +1,11 @@ 
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
+/*
+ *  Copyright 2022 NXP
+ */
+
+#ifndef __DT_BINDINGS_IMX93_POWER_H__
+#define __DT_BINDINGS_IMX93_POWER_H__
+
+#define IMX93_POWER_DOMAIN_MEDIAMIX		0
+
+#endif