diff mbox series

[4/8] dt-bindings: arm: mediatek: Add new document bindings for APU

Message ID 1617766086-5502-5-git-send-email-flora.fu@mediatek.com (mailing list archive)
State New
Headers show
Series Add Support for MediaTek MT8192 APU Power | expand

Commit Message

Flora Fu April 7, 2021, 3:28 a.m. UTC
Document the apusys bindings.

Signed-off-by: Flora Fu <flora.fu@mediatek.com>
---
 .../arm/mediatek/mediatek,apusys.yaml         | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml

Comments

Rob Herring April 9, 2021, 6:25 p.m. UTC | #1
On Wed, Apr 07, 2021 at 11:28:02AM +0800, Flora Fu wrote:
> Document the apusys bindings.
> 
> Signed-off-by: Flora Fu <flora.fu@mediatek.com>
> ---
>  .../arm/mediatek/mediatek,apusys.yaml         | 56 +++++++++++++++++++
>  1 file changed, 56 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml
> 
> diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml
> new file mode 100644
> index 000000000000..dc04a46f1bad
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml
> @@ -0,0 +1,56 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/arm/mediatek/mediatek,apusys.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MediaTek APUSYS Controller
> +
> +maintainers:
> +  - Flora Fu <flora.fu@mediatek.com>
> +
> +description:
> +  The Mediatek apusys controller provides functional configurations and clocks
> +  to the system.
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - mediatek,mt8192-apu_mbox
> +          - mediatek,mt8192-apu_conn
> +          - mediatek,mt8192-apu_vcore

s/_/-/

> +      - const: syscon
> +
> +  reg:
> +    maxItems: 1
> +
> +  '#clock-cells':
> +    const: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    apu_mbox: apu_mbox@19000000 {

mailbox@...? Is this a mailbox provider?

> +        compatible = "mediatek,mt8192-apu_mbox", "syscon";
> +        reg = <0x19000000 0x1000>;
> +    };
> +
> +  - |
> +    apu_conn: apu_conn@19020000 {
> +        compatible = "mediatek,mt8192-apu_conn", "syscon";
> +        reg = <0x19020000 0x1000>;
> +        #clock-cells = <1>;
> +    };
> +
> +  - |
> +    apu_vcore: apu_vcore@19029000 {
> +        compatible = "mediatek,mt8192-apu_vcore", "syscon";
> +        reg = <0x19029000 0x1000>;
> +        #clock-cells = <1>;
> +    };
> -- 
> 2.18.0
>
Flora Fu April 12, 2021, 6:44 a.m. UTC | #2
On Fri, 2021-04-09 at 13:25 -0500, Rob Herring wrote:
> On Wed, Apr 07, 2021 at 11:28:02AM +0800, Flora Fu wrote:
> > Document the apusys bindings.
> > 
> > Signed-off-by: Flora Fu <flora.fu@mediatek.com>
> > ---
> >  .../arm/mediatek/mediatek,apusys.yaml         | 56 +++++++++++++++++++
> >  1 file changed, 56 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml
> > new file mode 100644
> > index 000000000000..dc04a46f1bad
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml
> > @@ -0,0 +1,56 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: https://urldefense.com/v3/__http://devicetree.org/schemas/arm/mediatek/mediatek,apusys.yaml*__;Iw!!CTRNKA9wMg0ARbw!3ryKFTA2CvsVss4Pt2ZOG7wv4jgR-2LPxuGn30IxFmpxoxSRdzNdf8FrAYYvZWcw$ 
> > +$schema: https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!3ryKFTA2CvsVss4Pt2ZOG7wv4jgR-2LPxuGn30IxFmpxoxSRdzNdf8FrARlhCQ0w$ 
> > +
> > +title: MediaTek APUSYS Controller
> > +
> > +maintainers:
> > +  - Flora Fu <flora.fu@mediatek.com>
> > +
> > +description:
> > +  The Mediatek apusys controller provides functional configurations and clocks
> > +  to the system.
> > +
> > +properties:
> > +  compatible:
> > +    items:
> > +      - enum:
> > +          - mediatek,mt8192-apu_mbox
> > +          - mediatek,mt8192-apu_conn
> > +          - mediatek,mt8192-apu_vcore
> 
> s/_/-/
> 

OK. I will update expression strings in the next version.

> > +      - const: syscon
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  '#clock-cells':
> > +    const: 1
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    apu_mbox: apu_mbox@19000000 {
> 
> mailbox@...? Is this a mailbox provider?
> 

Yes, the apu_mbox is the for setup mailbox in the APU hardware.

> > +        compatible = "mediatek,mt8192-apu_mbox", "syscon";
> > +        reg = <0x19000000 0x1000>;
> > +    };
> > +
> > +  - |
> > +    apu_conn: apu_conn@19020000 {
> > +        compatible = "mediatek,mt8192-apu_conn", "syscon";
> > +        reg = <0x19020000 0x1000>;
> > +        #clock-cells = <1>;
> > +    };
> > +
> > +  - |
> > +    apu_vcore: apu_vcore@19029000 {
> > +        compatible = "mediatek,mt8192-apu_vcore", "syscon";
> > +        reg = <0x19029000 0x1000>;
> > +        #clock-cells = <1>;
> > +    };
> > -- 
> > 2.18.0
> >
Rob Herring April 15, 2021, 9:24 p.m. UTC | #3
On Mon, Apr 12, 2021 at 1:45 AM Flora Fu <flora.fu@mediatek.com> wrote:
>
> On Fri, 2021-04-09 at 13:25 -0500, Rob Herring wrote:
> > On Wed, Apr 07, 2021 at 11:28:02AM +0800, Flora Fu wrote:
> > > Document the apusys bindings.
> > >
> > > Signed-off-by: Flora Fu <flora.fu@mediatek.com>
> > > ---
> > >  .../arm/mediatek/mediatek,apusys.yaml         | 56 +++++++++++++++++++
> > >  1 file changed, 56 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml
> > >
> > > diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml
> > > new file mode 100644
> > > index 000000000000..dc04a46f1bad
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml
> > > @@ -0,0 +1,56 @@
> > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: https://urldefense.com/v3/__http://devicetree.org/schemas/arm/mediatek/mediatek,apusys.yaml*__;Iw!!CTRNKA9wMg0ARbw!3ryKFTA2CvsVss4Pt2ZOG7wv4jgR-2LPxuGn30IxFmpxoxSRdzNdf8FrAYYvZWcw$
> > > +$schema: https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!3ryKFTA2CvsVss4Pt2ZOG7wv4jgR-2LPxuGn30IxFmpxoxSRdzNdf8FrARlhCQ0w$
> > > +
> > > +title: MediaTek APUSYS Controller
> > > +
> > > +maintainers:
> > > +  - Flora Fu <flora.fu@mediatek.com>
> > > +
> > > +description:
> > > +  The Mediatek apusys controller provides functional configurations and clocks
> > > +  to the system.
> > > +
> > > +properties:
> > > +  compatible:
> > > +    items:
> > > +      - enum:
> > > +          - mediatek,mt8192-apu_mbox
> > > +          - mediatek,mt8192-apu_conn
> > > +          - mediatek,mt8192-apu_vcore
> >
> > s/_/-/
> >
>
> OK. I will update expression strings in the next version.
>
> > > +      - const: syscon
> > > +
> > > +  reg:
> > > +    maxItems: 1
> > > +
> > > +  '#clock-cells':
> > > +    const: 1
> > > +
> > > +required:
> > > +  - compatible
> > > +  - reg
> > > +
> > > +additionalProperties: false
> > > +
> > > +examples:
> > > +  - |
> > > +    apu_mbox: apu_mbox@19000000 {
> >
> > mailbox@...? Is this a mailbox provider?
> >
>
> Yes, the apu_mbox is the for setup mailbox in the APU hardware.

Then you need #mbox-cells here.

And in that case, what makes it a syscon?

>
> > > +        compatible = "mediatek,mt8192-apu_mbox", "syscon";
> > > +        reg = <0x19000000 0x1000>;
> > > +    };
Flora Fu April 16, 2021, 3:01 a.m. UTC | #4
On Thu, 2021-04-15 at 16:24 -0500, Rob Herring wrote:
> On Mon, Apr 12, 2021 at 1:45 AM Flora Fu <flora.fu@mediatek.com> wrote:
> >
> > On Fri, 2021-04-09 at 13:25 -0500, Rob Herring wrote:
> > > On Wed, Apr 07, 2021 at 11:28:02AM +0800, Flora Fu wrote:
> > > > Document the apusys bindings.
> > > >
> > > > Signed-off-by: Flora Fu <flora.fu@mediatek.com>
> > > > ---
> > > >  .../arm/mediatek/mediatek,apusys.yaml         | 56 +++++++++++++++++++
> > > >  1 file changed, 56 insertions(+)
> > > >  create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml
> > > > new file mode 100644
> > > > index 000000000000..dc04a46f1bad
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml
> > > > @@ -0,0 +1,56 @@
> > > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > > +%YAML 1.2
> > > > +---
> > > > +$id: https://urldefense.com/v3/__http://devicetree.org/schemas/arm/mediatek/mediatek,apusys.yaml*__;Iw!!CTRNKA9wMg0ARbw!3ryKFTA2CvsVss4Pt2ZOG7wv4jgR-2LPxuGn30IxFmpxoxSRdzNdf8FrAYYvZWcw$
> > > > +$schema: https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!3ryKFTA2CvsVss4Pt2ZOG7wv4jgR-2LPxuGn30IxFmpxoxSRdzNdf8FrARlhCQ0w$
> > > > +
> > > > +title: MediaTek APUSYS Controller
> > > > +
> > > > +maintainers:
> > > > +  - Flora Fu <flora.fu@mediatek.com>
> > > > +
> > > > +description:
> > > > +  The Mediatek apusys controller provides functional configurations and clocks
> > > > +  to the system.
> > > > +
> > > > +properties:
> > > > +  compatible:
> > > > +    items:
> > > > +      - enum:
> > > > +          - mediatek,mt8192-apu_mbox
> > > > +          - mediatek,mt8192-apu_conn
> > > > +          - mediatek,mt8192-apu_vcore
> > >
> > > s/_/-/
> > >
> >
> > OK. I will update expression strings in the next version.
> >
> > > > +      - const: syscon
> > > > +
> > > > +  reg:
> > > > +    maxItems: 1
> > > > +
> > > > +  '#clock-cells':
> > > > +    const: 1
> > > > +
> > > > +required:
> > > > +  - compatible
> > > > +  - reg
> > > > +
> > > > +additionalProperties: false
> > > > +
> > > > +examples:
> > > > +  - |
> > > > +    apu_mbox: apu_mbox@19000000 {
> > >
> > > mailbox@...? Is this a mailbox provider?
> > >
> >
> > Yes, the apu_mbox is the for setup mailbox in the APU hardware.
> 
> Then you need #mbox-cells here.
> 
> And in that case, what makes it a syscon?
> 
The apu_mbox are registers for setup mail box communications between apu
processor and the AP side kernel drivers. It also has spare registers
that reserved for keep specific information between apu and AP side.
That's why I set it as syscon to avoid ioremap from users. Do you think
it is reasonable or it is better to be kept inside the user nodes when
using it?

> >
> > > > +        compatible = "mediatek,mt8192-apu_mbox", "syscon";
> > > > +        reg = <0x19000000 0x1000>;
> > > > +    };
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml
new file mode 100644
index 000000000000..dc04a46f1bad
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apusys.yaml
@@ -0,0 +1,56 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/mediatek/mediatek,apusys.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek APUSYS Controller
+
+maintainers:
+  - Flora Fu <flora.fu@mediatek.com>
+
+description:
+  The Mediatek apusys controller provides functional configurations and clocks
+  to the system.
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - mediatek,mt8192-apu_mbox
+          - mediatek,mt8192-apu_conn
+          - mediatek,mt8192-apu_vcore
+      - const: syscon
+
+  reg:
+    maxItems: 1
+
+  '#clock-cells':
+    const: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    apu_mbox: apu_mbox@19000000 {
+        compatible = "mediatek,mt8192-apu_mbox", "syscon";
+        reg = <0x19000000 0x1000>;
+    };
+
+  - |
+    apu_conn: apu_conn@19020000 {
+        compatible = "mediatek,mt8192-apu_conn", "syscon";
+        reg = <0x19020000 0x1000>;
+        #clock-cells = <1>;
+    };
+
+  - |
+    apu_vcore: apu_vcore@19029000 {
+        compatible = "mediatek,mt8192-apu_vcore", "syscon";
+        reg = <0x19029000 0x1000>;
+        #clock-cells = <1>;
+    };