diff mbox series

[v3,01/11] dt-bindings: remoteproc: mediatek: Give the subnode a persistent name

Message ID 20220927025606.26673-2-tinghan.shen@mediatek.com (mailing list archive)
State New, archived
Headers show
Series Add support for MT8195 SCP 2nd core | expand

Commit Message

Tinghan Shen Sept. 27, 2022, 2:55 a.m. UTC
The node name doesn't matter to add the subnode as a cros-ec rpmsg device.
Give it a clear persistent node name to simplify scp yaml.

Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
---
 .../bindings/remoteproc/mtk,scp.yaml          | 35 ++++++++++---------
 .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi |  2 +-
 2 files changed, 20 insertions(+), 17 deletions(-)

Comments

Peng Fan (OSS) Sept. 28, 2022, 6:54 a.m. UTC | #1
On 9/27/2022 10:55 AM, Tinghan Shen wrote:
> The node name doesn't matter to add the subnode as a cros-ec rpmsg device.
> Give it a clear persistent node name to simplify scp yaml.
> 
> Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
> ---
>   .../bindings/remoteproc/mtk,scp.yaml          | 35 ++++++++++---------
>   .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi |  2 +-
>   2 files changed, 20 insertions(+), 17 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> index 7e091eaffc18..786bed897916 100644
> --- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> +++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> @@ -58,6 +58,23 @@ properties:
>     memory-region:
>       maxItems: 1
>   
> +  cros-ec-rpmsg:
> +    type: object
> +    description:
> +      This subnode represents the rpmsg device. The names of the devices
> +      are not important. The properties of this node are defined by the
> +      individual bindings for the rpmsg devices.
> +
> +    properties:
> +      mediatek,rpmsg-name:
> +        $ref: /schemas/types.yaml#/definitions/string-array
> +        description:
> +          Contains the name for the rpmsg device. Used to match
> +          the subnode to rpmsg device announced by SCP.
> +
> +    required:
> +      - mediatek,rpmsg-name
> +
>   required:
>     - compatible
>     - reg
> @@ -89,21 +106,7 @@ allOf:
>           reg-names:
>             maxItems: 2
>   
> -additionalProperties:
> -  type: object
> -  description:
> -    Subnodes of the SCP represent rpmsg devices. The names of the devices
> -    are not important. The properties of these nodes are defined by the
> -    individual bindings for the rpmsg devices.
> -  properties:
> -    mediatek,rpmsg-name:
> -      $ref: /schemas/types.yaml#/definitions/string-array
> -      description:
> -        Contains the name for the rpmsg device. Used to match
> -        the subnode to rpmsg device announced by SCP.
> -
> -  required:
> -    - mediatek,rpmsg-name
> +additionalProperties: false
>   
>   examples:
>     - |
> @@ -118,7 +121,7 @@ examples:
>           clocks = <&infracfg CLK_INFRA_SCPSYS>;
>           clock-names = "main";
>   
> -        cros_ec {
> +        cros-ec-rpmsg {
>               mediatek,rpmsg-name = "cros-ec-rpmsg";
>           };
>       };
> diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
> index b4b86bb1f1a7..693ad5f2a82e 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi

DTS changes should be in separate patch.

Regards,
Peng.

> @@ -816,7 +816,7 @@
>   	pinctrl-names = "default";
>   	pinctrl-0 = <&scp_pins>;
>   
> -	cros_ec {
> +	cros-ec-rpmsg {
>   		compatible = "google,cros-ec-rpmsg";
>   		mediatek,rpmsg-name = "cros-ec-rpmsg";
>   	};
Krzysztof Kozlowski Sept. 28, 2022, 5:47 p.m. UTC | #2
On 27/09/2022 04:55, Tinghan Shen wrote:
> The node name doesn't matter to add the subnode as a cros-ec rpmsg device.
> Give it a clear persistent node name to simplify scp yaml.
> 
> Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
> ---
>  .../bindings/remoteproc/mtk,scp.yaml          | 35 ++++++++++---------
>  .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi |  2 +-
>  2 files changed, 20 insertions(+), 17 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> index 7e091eaffc18..786bed897916 100644
> --- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> +++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> @@ -58,6 +58,23 @@ properties:
>    memory-region:
>      maxItems: 1
>  
> +  cros-ec-rpmsg:
> +    type: object

additionalProperties: false on this level

> +    description:
> +      This subnode represents the rpmsg device. The names of the devices

What are the devices? You wrote that it is one device, not devices.

> +      are not important. The properties of this node are defined by the
> +      individual bindings for the rpmsg devices.

??? No, you need to define the properties of the node, e.g. by a ref.

> +
> +    properties:
> +      mediatek,rpmsg-name:
> +        $ref: /schemas/types.yaml#/definitions/string-array
> +        description:
> +          Contains the name for the rpmsg device. Used to match
> +          the subnode to rpmsg device announced by SCP.

maxItems... but is it really a string-array?

> +
> +    required:
> +      - mediatek,rpmsg-name
> +
>  required:
>    - compatible
>    - reg
> @@ -89,21 +106,7 @@ allOf:
>          reg-names:
>            maxItems: 2
>  

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
index 7e091eaffc18..786bed897916 100644
--- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
@@ -58,6 +58,23 @@  properties:
   memory-region:
     maxItems: 1
 
+  cros-ec-rpmsg:
+    type: object
+    description:
+      This subnode represents the rpmsg device. The names of the devices
+      are not important. The properties of this node are defined by the
+      individual bindings for the rpmsg devices.
+
+    properties:
+      mediatek,rpmsg-name:
+        $ref: /schemas/types.yaml#/definitions/string-array
+        description:
+          Contains the name for the rpmsg device. Used to match
+          the subnode to rpmsg device announced by SCP.
+
+    required:
+      - mediatek,rpmsg-name
+
 required:
   - compatible
   - reg
@@ -89,21 +106,7 @@  allOf:
         reg-names:
           maxItems: 2
 
-additionalProperties:
-  type: object
-  description:
-    Subnodes of the SCP represent rpmsg devices. The names of the devices
-    are not important. The properties of these nodes are defined by the
-    individual bindings for the rpmsg devices.
-  properties:
-    mediatek,rpmsg-name:
-      $ref: /schemas/types.yaml#/definitions/string-array
-      description:
-        Contains the name for the rpmsg device. Used to match
-        the subnode to rpmsg device announced by SCP.
-
-  required:
-    - mediatek,rpmsg-name
+additionalProperties: false
 
 examples:
   - |
@@ -118,7 +121,7 @@  examples:
         clocks = <&infracfg CLK_INFRA_SCPSYS>;
         clock-names = "main";
 
-        cros_ec {
+        cros-ec-rpmsg {
             mediatek,rpmsg-name = "cros-ec-rpmsg";
         };
     };
diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
index b4b86bb1f1a7..693ad5f2a82e 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi
@@ -816,7 +816,7 @@ 
 	pinctrl-names = "default";
 	pinctrl-0 = <&scp_pins>;
 
-	cros_ec {
+	cros-ec-rpmsg {
 		compatible = "google,cros-ec-rpmsg";
 		mediatek,rpmsg-name = "cros-ec-rpmsg";
 	};