From: Troy Mitchell <troymitchell988@gmail.com>
To: Lee Jones <lee@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Troy Mitchell <troymitchell988@gmail.com>
Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Troy Mitchell <TroyMitchell988@gmail.com>
Subject: [PATCH 1/2] dt-bindings: mfd: add support for P1 from SpacemiT
Date: Mon, 30 Dec 2024 18:02:05 +0800 [thread overview]
Message-ID: <20241230-k1-p1-v1-1-aa4e02b9f993@gmail.com> (raw)
In-Reply-To: <20241230-k1-p1-v1-0-aa4e02b9f993@gmail.com>
P1 PMIC contains of regulator, pinctrl, pwrkey and rtc.
P1 contains a load switch, which allows you to control
whether a device is powered on (such as a MIPI screen)
Signed-off-by: Troy Mitchell <TroyMitchell988@gmail.com>
---
.../devicetree/bindings/mfd/spacemit,p1.yaml | 153 +++++++++++++++++++++
1 file changed, 153 insertions(+)
diff --git a/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml b/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..7475d403aeb3d0e72ffa9b6fbcbb6545d5bc429f
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/spacemit,p1.yaml
@@ -0,0 +1,153 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/spacemit,p1.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: P1 Power Management Integrated Circuit
+
+maintainers:
+ - Troy Mitchell <troymitchell988@gmail.com>
+
+description:
+ PMIC chip P1 produced by SpacemiT. The device consists of I2C controlled MFD,
+ which contains regulator, pinctrl, pwrkey and rtc.
+
+properties:
+ compatible:
+ const: spacemit,p1-pmic
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ regulators:
+ type: object
+
+ properties:
+ compatible:
+ const: pmic,p1-regulator
+
+ required:
+ - compatible
+
+ patternProperties:
+ "^(dcdc-reg[1-6]|aldo-reg[1-4]|dldo-reg[1-7]|switch)$":
+ type: object
+ $ref: /schemas/regulator/regulator.yaml#
+ unevaluatedProperties: false
+
+ unevaluatedProperties: false
+
+ pinctrl:
+ type: object
+
+ properties:
+ compatible:
+ const: pmic,p1-pinctrl
+
+ "#gpio-cells":
+ const: 2
+
+ gpio-controller: true
+
+ required:
+ - compatible
+ - "#gpio-cells"
+ - gpio-controller
+
+ unevaluatedProperties: false
+
+ pwrkey:
+ type: object
+ $ref: /schemas/input/input.yaml#
+
+ properties:
+ compatible:
+ const: pmic,p1-pwrkey
+
+ required:
+ - compatible
+
+ unevaluatedProperties: false
+
+ rtc:
+ type: object
+ $ref: /schemas/rtc/rtc.yaml#
+
+ properties:
+ compatible:
+ const: pmic,p1-rtc
+
+ required:
+ - compatible
+
+ unevaluatedProperties: false
+
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pmic@41 {
+ compatible = "spacemit,p1";
+ reg = <0x41>;
+ interrupt-parent = <&intc>;
+ interrupts = <64>;
+
+ regulators {
+ compatible = "pmic,p1-regulator";
+
+ dcdc-reg1 {
+ regulator-name = "dcdc1";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <3450000>;
+ regulator-ramp-delay = <5000>;
+ regulator-always-on;
+ };
+
+ aldo-reg1 {
+ regulator-name = "aldo1";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-boot-on;
+ };
+
+ dldo-reg1 {
+ regulator-name = "dldo1";
+ regulator-min-microvolt = <500000>;
+ regulator-max-microvolt = <3400000>;
+ regulator-boot-on;
+ };
+
+ switch {
+ regulator-name = "switch";
+ };
+ };
+
+ pinctrl {
+ compatible = "pmic,p1-pinctrl";
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ pwrkey {
+ compatible = "pmic,p1-pwrkey";
+ };
+
+ rtc {
+ compatible = "pmic,p1-rtc";
+ };
+ };
+ };
--
2.34.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2024-12-30 10:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-30 10:02 [PATCH 0/2] Add support for the P1 PMIC from SpacemiT Troy Mitchell
2024-12-30 10:02 ` Troy Mitchell [this message]
2024-12-30 11:22 ` [PATCH 1/2] dt-bindings: mfd: add support for P1 " Rob Herring (Arm)
2024-12-30 11:27 ` Krzysztof Kozlowski
2024-12-30 10:02 ` [PATCH 2/2] mfd: add new driver for P1 PMIC " Troy Mitchell
2024-12-30 10:15 ` Troy Mitchell
2024-12-30 11:33 ` Krzysztof Kozlowski
2024-12-31 7:05 ` Troy Mitchell
2024-12-31 19:42 ` Jure Repinc
2025-01-06 15:43 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241230-k1-p1-v1-1-aa4e02b9f993@gmail.com \
--to=troymitchell988@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox