mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dzmitry Sankouski <dsankouski@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Dzmitry Sankouski <dsankouski@gmail.com>
Subject: [PATCH 1/6] dt-bindings: regulator: add Samsung s2dos05 pmic
Date: Wed, 18 Oct 2023 15:30:28 +0300	[thread overview]
Message-ID: <20231018123033.301005-2-dsankouski@gmail.com> (raw)
In-Reply-To: <20231018123033.301005-1-dsankouski@gmail.com>

Add binding for the s2dos05 pmic found in the Samsung S9.

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
---

 .../bindings/regulator/samsung,s2dos05.yaml   | 89 +++++++++++++++++++
 1 file changed, 89 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2dos05.yaml

diff --git a/Documentation/devicetree/bindings/regulator/samsung,s2dos05.yaml b/Documentation/devicetree/bindings/regulator/samsung,s2dos05.yaml
new file mode 100644
index 000000000000..b53d9f5a7d38
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/samsung,s2dos05.yaml
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/samsung,s2dos05.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung s2dos05 regulator
+
+maintainers:
+  - Dzmitry Sankouski <dsankouski@gmail.com>
+
+description: |
+  The S2DOS05 is a companion power management IC for the smart phones.
+  Has 4 LDO and 1 BUCK regulators, and has capability to measure
+  current and power. Can detect short circuit on outputs.
+
+properties:
+  compatible:
+    const: samsung,s2dos05pmic
+  reg:
+    maxItems: 1
+
+  regulators:
+    type: object
+    description: List of regulators and its properties
+
+    patternProperties:
+      "^s2dos05-buck1|s2dos05-ldo[1-4]$":
+        type: object
+        $ref: "regulator.yaml#"
+        unevaluatedProperties: false
+
+    additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - regulators
+
+additionalProperties: false
+
+examples:
+  - |
+    regulator@60 {
+    	compatible = "samsung,s2dos05pmic";
+    	reg = <0x60>;
+    	pinctrl-names = "default";
+    	pinctrl-0 = <&s2dos05_irq>;
+    	s2dos05,s2dos05_int = <&tlmm 0x31 0x0>;
+
+    	regulators {
+    		s2dos05_ldo1: s2dos05-ldo1 {
+    			regulator-name = "s2dos05-ldo1";
+    			regulator-min-microvolt = <0x16e360>;
+    			regulator-max-microvolt = <0x1e8480>;
+    			regulator-active-discharge = <0x1>;
+    		};
+
+    		s2dos05_ldo2: s2dos05-ldo2 {
+    			regulator-name = "s2dos05-ldo2";
+    			regulator-min-microvolt = <0x1b7740>;
+    			regulator-max-microvolt = <0x1b7740>;
+    			regulator-active-discharge = <0x1>;
+    			regulator-boot-on;
+    		};
+
+    		s2dos05_ldo3: s2dos05-ldo3 {
+    			regulator-name = "s2dos05-ldo3";
+    			regulator-min-microvolt = <0x2dc6c0>;
+    			regulator-max-microvolt = <0x2dc6c0>;
+    			regulator-active-discharge = <0x1>;
+    			regulator-boot-on;
+    		};
+
+    		s2dos05_ldo4: s2dos05-ldo4 {
+    			regulator-name = "s2dos05-ldo4";
+    			regulator-min-microvolt = <0x2932e0>;
+    			regulator-max-microvolt = <0x399a18>;
+    			regulator-active-discharge = <0x1>;
+    		};
+
+    		s2dos05_buck1: s2dos05-buck1 {
+    			regulator-name = "s2dos05-buck1";
+    			regulator-min-microvolt = <0xcf850>;
+    			regulator-max-microvolt = <0x200b20>;
+    			regulator-active-discharge = <0x1>;
+    		};
+    	};
+    };
-- 
2.39.2


  reply	other threads:[~2023-10-18 12:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18 12:30 [PATCH 0/6] This is continued work on Samsung S9(SM-9600) starqltechn Dzmitry Sankouski
2023-10-18 12:30 ` Dzmitry Sankouski [this message]
2023-10-18 14:22   ` [PATCH 1/6] dt-bindings: regulator: add Samsung s2dos05 pmic Krzysztof Kozlowski
2023-10-18 12:30 ` [PATCH 2/6] regulator: s2dos05: add Samsung s2dos05 driver Dzmitry Sankouski
2023-10-18 12:30 ` [PATCH 3/6] arm64: dts: qcom: starqltechn: remove wifi Dzmitry Sankouski
2023-10-18 12:30 ` [PATCH 4/6] arm64: dts: qcom: starqltechn: enable more features Dzmitry Sankouski
2023-10-18 14:23   ` Krzysztof Kozlowski
2023-10-18 12:30 ` [PATCH 5/6] arm64: dts: qcom: starqltechn: disable crypto Dzmitry Sankouski
2023-10-18 12:30 ` [PATCH 6/6] arm64: dts: qcom: starqltechn: add supply to framebuffer Dzmitry Sankouski
2023-10-29  7:20 ` [PATCH 0/6] This is continued work on Samsung S9(SM-9600) starqltechn Pavel Machek

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=20231018123033.301005-2-dsankouski@gmail.com \
    --to=dsankouski@gmail.com \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®