mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: like@awinic.com
To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Cc: liweilei@awinic.com, liangdong@awinic.com, like@awinic.com,
	yijiangtao@awinic.com
Subject: [PATCH V1 1/1] regulator: Add awinic,aw3750x.yaml
Date: Wed,  5 Jul 2023 08:19:41 +0000	[thread overview]
Message-ID: <20230705081942.2608531-2-like@awinic.com> (raw)
In-Reply-To: <20230705081942.2608531-1-like@awinic.com>

From: Ke Li <like@awinic.com>

Signed-off-by: Ke Li <like@awinic.com>
---
 .../bindings/regulator/awinic,aw3750x.yaml    | 151 ++++++++++++++++++
 1 file changed, 151 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/awinic,aw3750x.yaml

diff --git a/Documentation/devicetree/bindings/regulator/awinic,aw3750x.yaml b/Documentation/devicetree/bindings/regulator/awinic,aw3750x.yaml
new file mode 100644
index 000000000000..cdb3d9dbf88f
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/awinic,aw3750x.yaml
@@ -0,0 +1,151 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/awinic,aw3750x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Awinic AW3750X Power Management IC
+
+maintainers:
+  - Weidong Wang <wangweidong.a@awinic.com>
+  - Ke Li <like@awinic.com>
+
+description: |
+  AW3750X is designed to generate both positive and negative bias voltages for.
+  TFT-LCD panels or other general dual-supply applications. It consists a highly
+  integrated synchronous boost converter with input voltage from 2.7V to 5.5V.
+
+properties:
+  compatible:
+    const: awinic,aw3750x_led
+
+  enp:
+    type: object
+    $ref: regulator.yaml#
+    description:
+      Properties for single LDO regulator.
+
+    properties:
+      regulator-name: true
+
+    required:
+      - regulator-name
+
+    unevaluatedProperties: false
+
+  enn:
+    type: object
+    $ref: regulator.yaml#
+    description:
+      Properties for single BOOST regulator.
+
+    properties:
+      regulator-name: true
+
+    required:
+      - regulator-name
+
+    unevaluatedProperties: false
+
+required:
+  - compatible
+  - enp
+  - enn
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/pinctrl/mt8186-pinfunc.h>
+    #include <dt-bindings/gpio/gpio.h>
+
+    pio: pinctrl@10005000 {
+      aw_enn_default: aw_enn_default {
+        pins_cmd_dat {
+          pinmux = <PINMUX_GPIO7__FUNC_GPIO7>;
+          slew-rate = <1>;
+          output-low;
+        };
+      };
+
+      aw_enn_output_high: aw_enn_output_high {
+        pins_cmd_dat {
+          pinmux = <PINMUX_GPIO7__FUNC_GPIO7>;
+          slew-rate = <1>;
+          output-high;
+        };
+      };
+
+      aw_enn_output_low: aw_enn_output_low {
+        pins_cmd_dat {
+          pinmux = <PINMUX_GPIO7__FUNC_GPIO7>;
+          slew-rate = <1>;
+          output-low;
+        };
+      };
+
+      aw_enp_default: aw_enp_default {
+        pins_cmd_dat {
+          pinmux = <PINMUX_GPIO1__FUNC_GPIO1>;
+          slew-rate = <1>;
+          output-low;
+        };
+      };
+
+      aw_enp_output_high: aw_enp_output_high {
+        pins_cmd_dat {
+          pinmux = <PINMUX_GPIO1__FUNC_GPIO1>;
+          slew-rate = <1>;
+          output-high;
+        };
+      };
+
+      aw_enp_output_low: aw_enp_output_low {
+        pins_cmd_dat {
+          pinmux = <PINMUX_GPIO1__FUNC_GPIO1>;
+          slew-rate = <1>;
+          output-low;
+        };
+      };
+
+    };
+
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        aw3750x@3e {
+            compatible = "awinic,aw3750x_led";
+            aw3750x_gpio_ctrl = <0>;
+            reg = <0x3e>;
+            outp = <0x0E>;
+            outn = <0x0E>;
+            enn-gpio = <&pio 7 0>;
+            enp-gpio = <&pio 1 0>;
+            pinctrl-names = "aw_enn_default", "aw_enn_output_high",
+                            "aw_enn_output_low", "aw_enp_default",
+                            "aw_enp_output_high", "aw_enp_output_low";
+            pinctrl-0 = <&aw_enn_default>;
+            pinctrl-1 = <&aw_enn_output_high>;
+            pinctrl-2 = <&aw_enn_output_low>;
+            pinctrl-3 = <&aw_enp_default>;
+            pinctrl-4 = <&aw_enp_output_high>;
+            pinctrl-5 = <&aw_enp_output_low>;
+
+            aw_lcdb_outp_vreg: enp {
+              label = "outp";
+              regulator-name = "outp";
+              regulator-min-microvolt = <4000000>;
+              regulator-max-microvolt = <6000000>;
+            };
+            aw_lcdb_outn_vreg: enn {
+              label = "outn";
+              regulator-name = "outn";
+              regulator-min-microvolt = <4000000>;
+              regulator-max-microvolt = <6000000>;
+            };
+        };
+    };
-- 
2.41.0


  reply	other threads:[~2023-07-05  8:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-05  8:19 [PATH V2 0/2] regulator: aw3750x: AW3750X regulator driver like
2023-07-05  8:19 ` like [this message]
2023-07-05  9:20   ` [PATCH V1 1/1] regulator: Add awinic,aw3750x.yaml Krzysztof Kozlowski
2023-07-05 11:52     ` Mark Brown
2023-07-05 17:20       ` Krzysztof Kozlowski
2023-07-05  9:36   ` Rob Herring

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=20230705081942.2608531-2-like@awinic.com \
    --to=like@awinic.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=liangdong@awinic.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liweilei@awinic.com \
    --cc=robh+dt@kernel.org \
    --cc=yijiangtao@awinic.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 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®