diff mbox series

[2/3] dt-bindings: mfd: add schema for 8ulp AVD-SIM

Message ID 20240418203720.8492-3-laurentiumihalcea111@gmail.com (mailing list archive)
State New, archived
Headers show
Series Add DSP node for imx8ulp | expand

Commit Message

Laurentiu Mihalcea April 18, 2024, 8:37 p.m. UTC
From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>

Add schema for i.MX8ULP's AVD-SIM module.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
---
 .../bindings/mfd/fsl,imx8ulp-avd-sim.yaml     | 42 +++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/fsl,imx8ulp-avd-sim.yaml

Comments

Frank Li April 18, 2024, 9:10 p.m. UTC | #1
On Thu, Apr 18, 2024 at 11:37:19PM +0300, Laurentiu Mihalcea wrote:
> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> 
> Add schema for i.MX8ULP's AVD-SIM module.
> 
> Signed-off-by: Liu Ying <victor.liu@nxp.com>
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> ---
>  .../bindings/mfd/fsl,imx8ulp-avd-sim.yaml     | 42 +++++++++++++++++++
>  1 file changed, 42 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mfd/fsl,imx8ulp-avd-sim.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mfd/fsl,imx8ulp-avd-sim.yaml b/Documentation/devicetree/bindings/mfd/fsl,imx8ulp-avd-sim.yaml
> new file mode 100644
> index 000000000000..4020c6e37f80
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/fsl,imx8ulp-avd-sim.yaml
> @@ -0,0 +1,42 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/fsl,imx8ulp-avd-sim.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP i.MX8ULP Audio-Video Domain System Integration Module
> +
> +maintainers:
> +  - Liu Ying <victor.liu@nxp.com>
> +
> +description: |
> +  The AVD-SIM module provides configuration options for components of AVD.

Needn't "|"

> +
> +properties:
> +  compatible:
> +    items:
> +      - const: fsl,imx8ulp-avd-sim
> +      - const: syscon
> +      - const: simple-mfd
> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/imx8ulp-clock.h>
> +    avd_sim: syscon@2da50000 {

Needn't label 'avd_sim'

> +        compatible = "fsl,imx8ulp-avd-sim", "syscon", "simple-mfd";
> +        reg = <0x2da50000 0x38>;
> +        clocks = <&pcc5 IMX8ULP_CLK_AVD_SIM>;
> +    };
> -- 
> 2.34.1
>
Rob Herring (Arm) April 22, 2024, 2:29 p.m. UTC | #2
On Thu, Apr 18, 2024 at 11:37:19PM +0300, Laurentiu Mihalcea wrote:
> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> 
> Add schema for i.MX8ULP's AVD-SIM module.
> 
> Signed-off-by: Liu Ying <victor.liu@nxp.com>
> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
> ---
>  .../bindings/mfd/fsl,imx8ulp-avd-sim.yaml     | 42 +++++++++++++++++++
>  1 file changed, 42 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mfd/fsl,imx8ulp-avd-sim.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mfd/fsl,imx8ulp-avd-sim.yaml b/Documentation/devicetree/bindings/mfd/fsl,imx8ulp-avd-sim.yaml
> new file mode 100644
> index 000000000000..4020c6e37f80
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/fsl,imx8ulp-avd-sim.yaml
> @@ -0,0 +1,42 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/fsl,imx8ulp-avd-sim.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP i.MX8ULP Audio-Video Domain System Integration Module
> +
> +maintainers:
> +  - Liu Ying <victor.liu@nxp.com>
> +
> +description: |
> +  The AVD-SIM module provides configuration options for components of AVD.
> +
> +properties:
> +  compatible:
> +    items:
> +      - const: fsl,imx8ulp-avd-sim
> +      - const: syscon
> +      - const: simple-mfd

'simple-mfd' means you have child nodes, but you have none defined.

> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1

If you do add child nodes, 'simple-mfd' also means there is not any 
dependency on the parent node such as needing this clock to be enabled 
for the child nodes.

Rob
Laurentiu Mihalcea May 9, 2024, 6:48 p.m. UTC | #3
On 4/22/2024 5:29 PM, Rob Herring wrote:
> On Thu, Apr 18, 2024 at 11:37:19PM +0300, Laurentiu Mihalcea wrote:
>> From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>>
>> Add schema for i.MX8ULP's AVD-SIM module.
>>
>> Signed-off-by: Liu Ying <victor.liu@nxp.com>
>> Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
>> ---
>>  .../bindings/mfd/fsl,imx8ulp-avd-sim.yaml     | 42 +++++++++++++++++++
>>  1 file changed, 42 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/mfd/fsl,imx8ulp-avd-sim.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/mfd/fsl,imx8ulp-avd-sim.yaml b/Documentation/devicetree/bindings/mfd/fsl,imx8ulp-avd-sim.yaml
>> new file mode 100644
>> index 000000000000..4020c6e37f80
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/mfd/fsl,imx8ulp-avd-sim.yaml
>> @@ -0,0 +1,42 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/mfd/fsl,imx8ulp-avd-sim.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: NXP i.MX8ULP Audio-Video Domain System Integration Module
>> +
>> +maintainers:
>> +  - Liu Ying <victor.liu@nxp.com>
>> +
>> +description: |
>> +  The AVD-SIM module provides configuration options for components of AVD.
>> +
>> +properties:
>> +  compatible:
>> +    items:
>> +      - const: fsl,imx8ulp-avd-sim
>> +      - const: syscon
>> +      - const: simple-mfd
> 'simple-mfd' means you have child nodes, but you have none defined.

Thanks for the clarification! These were intentionally omitted since they're
not needed for the DSP.

>
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +  clocks:
>> +    maxItems: 1
> If you do add child nodes, 'simple-mfd' also means there is not any 
> dependency on the parent node such as needing this clock to be enabled 
> for the child nodes.
>
> Rob

The plan was to add the children later on as required.
Given the children would in fact depend on the parent's clock being
enabled, I wonder if just removing 'simple-mfd' from the compatible
list would do the trick?
Krzysztof Kozlowski May 13, 2024, 9:02 a.m. UTC | #4
On 09/05/2024 20:48, Laurentiu Mihalcea wrote:
>>> +
>>> +  reg:
>>> +    maxItems: 1
>>> +
>>> +  clocks:
>>> +    maxItems: 1
>> If you do add child nodes, 'simple-mfd' also means there is not any 
>> dependency on the parent node such as needing this clock to be enabled 
>> for the child nodes.
>>
>> Rob
> 
> The plan was to add the children later on as required.
> Given the children would in fact depend on the parent's clock being
> enabled, I wonder if just removing 'simple-mfd' from the compatible
> list would do the trick?

Dropping simple-mfd would be a requirement in such case, but not
sufficient. Please send complete bindings, so with the children.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mfd/fsl,imx8ulp-avd-sim.yaml b/Documentation/devicetree/bindings/mfd/fsl,imx8ulp-avd-sim.yaml
new file mode 100644
index 000000000000..4020c6e37f80
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/fsl,imx8ulp-avd-sim.yaml
@@ -0,0 +1,42 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/fsl,imx8ulp-avd-sim.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP i.MX8ULP Audio-Video Domain System Integration Module
+
+maintainers:
+  - Liu Ying <victor.liu@nxp.com>
+
+description: |
+  The AVD-SIM module provides configuration options for components of AVD.
+
+properties:
+  compatible:
+    items:
+      - const: fsl,imx8ulp-avd-sim
+      - const: syscon
+      - const: simple-mfd
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/imx8ulp-clock.h>
+    avd_sim: syscon@2da50000 {
+        compatible = "fsl,imx8ulp-avd-sim", "syscon", "simple-mfd";
+        reg = <0x2da50000 0x38>;
+        clocks = <&pcc5 IMX8ULP_CLK_AVD_SIM>;
+    };