All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Stephen Boyd <sboyd@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-arm-msm@vger.kernel.org>, <srv_heupstream@mediatek.com>,
	Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
Subject: [PATCH v2 2/3] dt-bindings: regulator: document binding for MT6315 regulator
Date: Tue, 20 Oct 2020 17:56:49 +0800	[thread overview]
Message-ID: <1603187810-30481-3-git-send-email-hsin-hsiung.wang@mediatek.com> (raw)
In-Reply-To: <1603187810-30481-1-git-send-email-hsin-hsiung.wang@mediatek.com>

Add device tree binding information for MT6315 regulator driver.
Example bindings for MT6315 are added.

Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
---
 .../regulator/mtk,mt6315-regulator.yaml       | 88 +++++++++++++++++++
 include/dt-bindings/regulator/mtk,mt6315.h    | 17 ++++
 2 files changed, 105 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/mtk,mt6315-regulator.yaml
 create mode 100644 include/dt-bindings/regulator/mtk,mt6315.h

diff --git a/Documentation/devicetree/bindings/regulator/mtk,mt6315-regulator.yaml b/Documentation/devicetree/bindings/regulator/mtk,mt6315-regulator.yaml
new file mode 100644
index 000000000000..457606800d5b
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/mtk,mt6315-regulator.yaml
@@ -0,0 +1,88 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/mtk,mt6315-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek MT6315 Regulator
+
+maintainers:
+  - Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
+
+description: |
+  The MT6315 is a power management IC (PMIC) configurable with SPMI.
+  that contains 4 BUCKs output which can combine with each other
+  by different efuse settings.
+
+allOf:
+  - $ref: "regulator.yaml#"
+
+properties:
+  $nodename:
+    pattern: "mt6315@[0-9]"
+  compatible:
+    enum:
+      - mediatek,mt6315_3-regulator
+      - mediatek,mt6315_6-regulator
+      - mediatek,mt6315_7-regulator
+
+  reg:
+    maxItems: 1
+
+  regulators:
+    type: object
+    description: List of regulators and its properties
+
+    patternProperties:
+      "^vbuck[1-4]$":
+        type: object
+
+        properties:
+          regulator-name:
+            pattern: "^vbuck[1-4]$"
+            description:
+              should be "vbuck1", ..., "vbuck4"
+
+          mtk,combined-regulator:
+            $ref: "/schemas/types.yaml#/definitions/uint32-array"
+            description: |
+              defines other bucks combined with this buck, must contain the following
+              values MT6315_VBUCK1, MT6315_VBUCK2, MT6315_VBUCK3, MT6315_VBUCK4
+
+    unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - regulators
+
+additionalProperties: false
+
+examples:
+  - |
+    /* This example shows that buck2 and buck4 are combined into buck1. */
+    #include <dt-bindings/regulator/mtk,mt6315.h>
+
+    mt6315@6 {
+      compatible = "mediatek,mt6315_6-regulator";
+      reg = <0x6 0 0xb 1>;
+
+      regulators {
+        vbuck1 {
+          regulator-compatible = "vbuck1";
+          regulator-min-microvolt = <300000>;
+          regulator-max-microvolt = <1193750>;
+          regulator-enable-ramp-delay = <256>;
+          regulator-allowed-modes = <0 1 2 4>;
+          mtk,combined-regulator = <MT6315_VBUCK2 MT6315_VBUCK4>;
+        };
+
+        vbuck3 {
+          regulator-compatible = "vbuck3";
+          regulator-min-microvolt = <300000>;
+          regulator-max-microvolt = <1193750>;
+          regulator-enable-ramp-delay = <256>;
+          regulator-allowed-modes = <0 1 2 4>;
+        };
+      };
+    };
diff --git a/include/dt-bindings/regulator/mtk,mt6315.h b/include/dt-bindings/regulator/mtk,mt6315.h
new file mode 100644
index 000000000000..6ed9b2b121db
--- /dev/null
+++ b/include/dt-bindings/regulator/mtk,mt6315.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2020 MediaTek Inc.
+ * Author: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
+ */
+
+#ifndef _DT_BINDINGS_REGULATOR_MTK_MT6315_H
+#define _DT_BINDINGS_REGULATOR_MTK_MT6315_H
+
+/* Regulator ID */
+#define MT6315_VBUCK1	1
+#define MT6315_VBUCK2	2
+#define MT6315_VBUCK3	3
+#define MT6315_VBUCK4	4
+#define MT6315_VBUCK_MAX	5
+
+#endif /* _DT_BINDINGS_REGULATOR_MTK_MT6315_H */
-- 
2.18.0

WARNING: multiple messages have this Message-ID (diff)
From: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	 Stephen Boyd <sboyd@kernel.org>
Cc: devicetree@vger.kernel.org, srv_heupstream@mediatek.com,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mediatek@lists.infradead.org,
	Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/3] dt-bindings: regulator: document binding for MT6315 regulator
Date: Tue, 20 Oct 2020 17:56:49 +0800	[thread overview]
Message-ID: <1603187810-30481-3-git-send-email-hsin-hsiung.wang@mediatek.com> (raw)
In-Reply-To: <1603187810-30481-1-git-send-email-hsin-hsiung.wang@mediatek.com>

Add device tree binding information for MT6315 regulator driver.
Example bindings for MT6315 are added.

Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
---
 .../regulator/mtk,mt6315-regulator.yaml       | 88 +++++++++++++++++++
 include/dt-bindings/regulator/mtk,mt6315.h    | 17 ++++
 2 files changed, 105 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/mtk,mt6315-regulator.yaml
 create mode 100644 include/dt-bindings/regulator/mtk,mt6315.h

diff --git a/Documentation/devicetree/bindings/regulator/mtk,mt6315-regulator.yaml b/Documentation/devicetree/bindings/regulator/mtk,mt6315-regulator.yaml
new file mode 100644
index 000000000000..457606800d5b
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/mtk,mt6315-regulator.yaml
@@ -0,0 +1,88 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/mtk,mt6315-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek MT6315 Regulator
+
+maintainers:
+  - Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
+
+description: |
+  The MT6315 is a power management IC (PMIC) configurable with SPMI.
+  that contains 4 BUCKs output which can combine with each other
+  by different efuse settings.
+
+allOf:
+  - $ref: "regulator.yaml#"
+
+properties:
+  $nodename:
+    pattern: "mt6315@[0-9]"
+  compatible:
+    enum:
+      - mediatek,mt6315_3-regulator
+      - mediatek,mt6315_6-regulator
+      - mediatek,mt6315_7-regulator
+
+  reg:
+    maxItems: 1
+
+  regulators:
+    type: object
+    description: List of regulators and its properties
+
+    patternProperties:
+      "^vbuck[1-4]$":
+        type: object
+
+        properties:
+          regulator-name:
+            pattern: "^vbuck[1-4]$"
+            description:
+              should be "vbuck1", ..., "vbuck4"
+
+          mtk,combined-regulator:
+            $ref: "/schemas/types.yaml#/definitions/uint32-array"
+            description: |
+              defines other bucks combined with this buck, must contain the following
+              values MT6315_VBUCK1, MT6315_VBUCK2, MT6315_VBUCK3, MT6315_VBUCK4
+
+    unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - regulators
+
+additionalProperties: false
+
+examples:
+  - |
+    /* This example shows that buck2 and buck4 are combined into buck1. */
+    #include <dt-bindings/regulator/mtk,mt6315.h>
+
+    mt6315@6 {
+      compatible = "mediatek,mt6315_6-regulator";
+      reg = <0x6 0 0xb 1>;
+
+      regulators {
+        vbuck1 {
+          regulator-compatible = "vbuck1";
+          regulator-min-microvolt = <300000>;
+          regulator-max-microvolt = <1193750>;
+          regulator-enable-ramp-delay = <256>;
+          regulator-allowed-modes = <0 1 2 4>;
+          mtk,combined-regulator = <MT6315_VBUCK2 MT6315_VBUCK4>;
+        };
+
+        vbuck3 {
+          regulator-compatible = "vbuck3";
+          regulator-min-microvolt = <300000>;
+          regulator-max-microvolt = <1193750>;
+          regulator-enable-ramp-delay = <256>;
+          regulator-allowed-modes = <0 1 2 4>;
+        };
+      };
+    };
diff --git a/include/dt-bindings/regulator/mtk,mt6315.h b/include/dt-bindings/regulator/mtk,mt6315.h
new file mode 100644
index 000000000000..6ed9b2b121db
--- /dev/null
+++ b/include/dt-bindings/regulator/mtk,mt6315.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2020 MediaTek Inc.
+ * Author: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
+ */
+
+#ifndef _DT_BINDINGS_REGULATOR_MTK_MT6315_H
+#define _DT_BINDINGS_REGULATOR_MTK_MT6315_H
+
+/* Regulator ID */
+#define MT6315_VBUCK1	1
+#define MT6315_VBUCK2	2
+#define MT6315_VBUCK3	3
+#define MT6315_VBUCK4	4
+#define MT6315_VBUCK_MAX	5
+
+#endif /* _DT_BINDINGS_REGULATOR_MTK_MT6315_H */
-- 
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	 Stephen Boyd <sboyd@kernel.org>
Cc: devicetree@vger.kernel.org, srv_heupstream@mediatek.com,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mediatek@lists.infradead.org,
	Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/3] dt-bindings: regulator: document binding for MT6315 regulator
Date: Tue, 20 Oct 2020 17:56:49 +0800	[thread overview]
Message-ID: <1603187810-30481-3-git-send-email-hsin-hsiung.wang@mediatek.com> (raw)
In-Reply-To: <1603187810-30481-1-git-send-email-hsin-hsiung.wang@mediatek.com>

Add device tree binding information for MT6315 regulator driver.
Example bindings for MT6315 are added.

Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
---
 .../regulator/mtk,mt6315-regulator.yaml       | 88 +++++++++++++++++++
 include/dt-bindings/regulator/mtk,mt6315.h    | 17 ++++
 2 files changed, 105 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/mtk,mt6315-regulator.yaml
 create mode 100644 include/dt-bindings/regulator/mtk,mt6315.h

diff --git a/Documentation/devicetree/bindings/regulator/mtk,mt6315-regulator.yaml b/Documentation/devicetree/bindings/regulator/mtk,mt6315-regulator.yaml
new file mode 100644
index 000000000000..457606800d5b
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/mtk,mt6315-regulator.yaml
@@ -0,0 +1,88 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/mtk,mt6315-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek MT6315 Regulator
+
+maintainers:
+  - Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
+
+description: |
+  The MT6315 is a power management IC (PMIC) configurable with SPMI.
+  that contains 4 BUCKs output which can combine with each other
+  by different efuse settings.
+
+allOf:
+  - $ref: "regulator.yaml#"
+
+properties:
+  $nodename:
+    pattern: "mt6315@[0-9]"
+  compatible:
+    enum:
+      - mediatek,mt6315_3-regulator
+      - mediatek,mt6315_6-regulator
+      - mediatek,mt6315_7-regulator
+
+  reg:
+    maxItems: 1
+
+  regulators:
+    type: object
+    description: List of regulators and its properties
+
+    patternProperties:
+      "^vbuck[1-4]$":
+        type: object
+
+        properties:
+          regulator-name:
+            pattern: "^vbuck[1-4]$"
+            description:
+              should be "vbuck1", ..., "vbuck4"
+
+          mtk,combined-regulator:
+            $ref: "/schemas/types.yaml#/definitions/uint32-array"
+            description: |
+              defines other bucks combined with this buck, must contain the following
+              values MT6315_VBUCK1, MT6315_VBUCK2, MT6315_VBUCK3, MT6315_VBUCK4
+
+    unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - regulators
+
+additionalProperties: false
+
+examples:
+  - |
+    /* This example shows that buck2 and buck4 are combined into buck1. */
+    #include <dt-bindings/regulator/mtk,mt6315.h>
+
+    mt6315@6 {
+      compatible = "mediatek,mt6315_6-regulator";
+      reg = <0x6 0 0xb 1>;
+
+      regulators {
+        vbuck1 {
+          regulator-compatible = "vbuck1";
+          regulator-min-microvolt = <300000>;
+          regulator-max-microvolt = <1193750>;
+          regulator-enable-ramp-delay = <256>;
+          regulator-allowed-modes = <0 1 2 4>;
+          mtk,combined-regulator = <MT6315_VBUCK2 MT6315_VBUCK4>;
+        };
+
+        vbuck3 {
+          regulator-compatible = "vbuck3";
+          regulator-min-microvolt = <300000>;
+          regulator-max-microvolt = <1193750>;
+          regulator-enable-ramp-delay = <256>;
+          regulator-allowed-modes = <0 1 2 4>;
+        };
+      };
+    };
diff --git a/include/dt-bindings/regulator/mtk,mt6315.h b/include/dt-bindings/regulator/mtk,mt6315.h
new file mode 100644
index 000000000000..6ed9b2b121db
--- /dev/null
+++ b/include/dt-bindings/regulator/mtk,mt6315.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2020 MediaTek Inc.
+ * Author: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
+ */
+
+#ifndef _DT_BINDINGS_REGULATOR_MTK_MT6315_H
+#define _DT_BINDINGS_REGULATOR_MTK_MT6315_H
+
+/* Regulator ID */
+#define MT6315_VBUCK1	1
+#define MT6315_VBUCK2	2
+#define MT6315_VBUCK3	3
+#define MT6315_VBUCK4	4
+#define MT6315_VBUCK_MAX	5
+
+#endif /* _DT_BINDINGS_REGULATOR_MTK_MT6315_H */
-- 
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-10-20  9:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20  9:56 [PATCH v2 0/3] Add support for MT6315 regulator Hsin-Hsiung Wang
2020-10-20  9:56 ` Hsin-Hsiung Wang
2020-10-20  9:56 ` Hsin-Hsiung Wang
2020-10-20  9:56 ` [PATCH v2 1/3] spmi: Add driver shutdown support Hsin-Hsiung Wang
2020-10-20  9:56   ` Hsin-Hsiung Wang
2020-10-20  9:56   ` Hsin-Hsiung Wang
2020-12-03  8:00   ` Stephen Boyd
2020-12-03  8:00     ` Stephen Boyd
2020-12-03  8:00     ` Stephen Boyd
2020-10-20  9:56 ` Hsin-Hsiung Wang [this message]
2020-10-20  9:56   ` [PATCH v2 2/3] dt-bindings: regulator: document binding for MT6315 regulator Hsin-Hsiung Wang
2020-10-20  9:56   ` Hsin-Hsiung Wang
2020-10-20 15:31   ` Rob Herring
2020-10-20 15:31     ` Rob Herring
2020-10-20 15:31     ` Rob Herring
2020-10-20 15:37   ` Rob Herring
2020-10-20 15:37     ` Rob Herring
2020-10-20 15:37     ` Rob Herring
2020-10-20  9:56 ` [PATCH v2 3/3] regulator: mt6315: Add support " Hsin-Hsiung Wang
2020-10-20  9:56   ` Hsin-Hsiung Wang
2020-10-20  9:56   ` Hsin-Hsiung Wang
2020-11-11  4:41   ` Nicolas Boichat
2020-11-11  4:41     ` Nicolas Boichat
2020-11-11  4:41     ` Nicolas Boichat

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=1603187810-30481-3-git-send-email-hsin-hsiung.wang@mediatek.com \
    --to=hsin-hsiung.wang@mediatek.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=srv_heupstream@mediatek.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.