diff mbox series

[1/3] dt-bindings: spmi: Add Apple SPMI controller

Message ID 20250305-spmi-v1-1-c98f561fa99f@gmail.com (mailing list archive)
State New
Headers show
Series Driver for Apple SPMI controller | expand

Commit Message

Sasha Finkelstein via B4 Relay March 5, 2025, 8:26 p.m. UTC
From: Sasha Finkelstein <fnkl.kernel@gmail.com>

Add bindings for the SPMI controller present on most Apple SoCs

Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
---
 .../devicetree/bindings/spmi/apple,spmi.yaml       | 56 ++++++++++++++++++++++
 MAINTAINERS                                        |  1 +
 2 files changed, 57 insertions(+)

Comments

Rob Herring March 5, 2025, 10:03 p.m. UTC | #1
On Wed, Mar 5, 2025 at 2:26 PM Sasha Finkelstein via B4 Relay
<devnull+fnkl.kernel.gmail.com@kernel.org> wrote:
>
> From: Sasha Finkelstein <fnkl.kernel@gmail.com>
>
> Add bindings for the SPMI controller present on most Apple SoCs
>
> Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
> ---
>  .../devicetree/bindings/spmi/apple,spmi.yaml       | 56 ++++++++++++++++++++++
>  MAINTAINERS                                        |  1 +
>  2 files changed, 57 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/spmi/apple,spmi.yaml b/Documentation/devicetree/bindings/spmi/apple,spmi.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..6404af8adec52f4631200c48956f4c1695e88a39
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spmi/apple,spmi.yaml
> @@ -0,0 +1,56 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/spmi/apple,spmi.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Apple SPMI controller
> +
> +maintainers:
> +  - Sasha Finkelstein <fnkl.kernel@gmail.com>
> +
> +description: A SPMI controller present on most Apple SoCs
> +
> +allOf:
> +  - $ref: spmi.yaml#
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - apple,t8103-spmi
> +          - apple,t6000-spmi
> +          - apple,t8112-spmi
> +      - const: apple,spmi
> +
> +  reg:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +patternProperties:
> +  "pmu@[0-9a-f]$":

Typically 'pmic' is the name used here. However, you should just drop
this because spmi.yaml already defines child node structure.

With that,

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>

> +    type: object
> +
> +    description:
> +      PMIC properties, which are specific to the used SPMI PMIC device(s).
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/spmi/spmi.h>
> +
> +    spmi@920a1300 {
> +        compatible = "apple,t6000-spmi", "apple,spmi";
> +        reg = <0x920a1300 0x100>;
> +        #address-cells = <2>;
> +        #size-cells = <0>;
> +
> +        pmu@f {
> +            reg = <0xf SPMI_USID>;
> +            /* PMIC-specific properties */
> +        };
> +    };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 8e0736dc2ee0e33544fa373a4978b7dae18c040c..271ff8110df83c2d4fe7fbbfffc0a72259460bc5 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2236,6 +2236,7 @@ F:        Documentation/devicetree/bindings/pci/apple,pcie.yaml
>  F:     Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
>  F:     Documentation/devicetree/bindings/power/apple*
>  F:     Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml
> +F:     Documentation/devicetree/bindings/spmi/apple,spmi.yaml
>  F:     Documentation/devicetree/bindings/watchdog/apple,wdt.yaml
>  F:     arch/arm64/boot/dts/apple/
>  F:     drivers/bluetooth/hci_bcm4377.c
>
> --
> 2.48.1
>
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/spmi/apple,spmi.yaml b/Documentation/devicetree/bindings/spmi/apple,spmi.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..6404af8adec52f4631200c48956f4c1695e88a39
--- /dev/null
+++ b/Documentation/devicetree/bindings/spmi/apple,spmi.yaml
@@ -0,0 +1,56 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spmi/apple,spmi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Apple SPMI controller
+
+maintainers:
+  - Sasha Finkelstein <fnkl.kernel@gmail.com>
+
+description: A SPMI controller present on most Apple SoCs
+
+allOf:
+  - $ref: spmi.yaml#
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - apple,t8103-spmi
+          - apple,t6000-spmi
+          - apple,t8112-spmi
+      - const: apple,spmi
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+patternProperties:
+  "pmu@[0-9a-f]$":
+    type: object
+
+    description:
+      PMIC properties, which are specific to the used SPMI PMIC device(s).
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/spmi/spmi.h>
+
+    spmi@920a1300 {
+        compatible = "apple,t6000-spmi", "apple,spmi";
+        reg = <0x920a1300 0x100>;
+        #address-cells = <2>;
+        #size-cells = <0>;
+
+        pmu@f {
+            reg = <0xf SPMI_USID>;
+            /* PMIC-specific properties */
+        };
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index 8e0736dc2ee0e33544fa373a4978b7dae18c040c..271ff8110df83c2d4fe7fbbfffc0a72259460bc5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2236,6 +2236,7 @@  F:	Documentation/devicetree/bindings/pci/apple,pcie.yaml
 F:	Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
 F:	Documentation/devicetree/bindings/power/apple*
 F:	Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml
+F:	Documentation/devicetree/bindings/spmi/apple,spmi.yaml
 F:	Documentation/devicetree/bindings/watchdog/apple,wdt.yaml
 F:	arch/arm64/boot/dts/apple/
 F:	drivers/bluetooth/hci_bcm4377.c