mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Svyatoslav Ryhel <clamor95@gmail.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Svyatoslav Ryhel <clamor95@gmail.com>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Luca Ceresoli <luca.ceresoli@bootlin.com>,
	Jean Delvare <jdelvare@suse.de>,
	Sebastian Reichel <sebastian.reichel@collabora.com>,
	Daniel Jeong <gshark.jeong@gmail.com>,
	Ldd-Mlp <ldd-mlp@list.ti.com>
Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v1 1/2] dt-bindings: media: i2c: add lm3560 binding
Date: Wed,  8 Mar 2023 11:52:08 +0200	[thread overview]
Message-ID: <20230308095209.14700-2-clamor95@gmail.com> (raw)
In-Reply-To: <20230308095209.14700-1-clamor95@gmail.com>

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 .../bindings/media/i2c/ti,lm3560.yaml         | 130 ++++++++++++++++++
 1 file changed, 130 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/ti,lm3560.yaml

diff --git a/Documentation/devicetree/bindings/media/i2c/ti,lm3560.yaml b/Documentation/devicetree/bindings/media/i2c/ti,lm3560.yaml
new file mode 100644
index 000000000000..b3c2ccb83a30
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/ti,lm3560.yaml
@@ -0,0 +1,130 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/ti,lm3560.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI LM3560 Synchronous Boost Flash Driver
+
+maintainers:
+  - Daniel Jeong <gshark.jeong@gmail.com>
+  - Ldd-Mlp <ldd-mlp@list.ti.com>
+
+description: |
+  The LM3560 is a 2-MHz fixed frequency synchronous boost
+  converter with two 1000-mA constant current drivers for
+  high-current white LEDs. The dual highside current sources
+  allow for grounded cathode LED operation and can be tied
+  together for providing flash currents at up to 2 A through
+  a single LED. An adaptive regulation method ensures the
+  current for each LED remains in regulation and maximizes
+  efficiency.
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - ti,lm3559
+          - ti,lm3560
+
+  reg:
+    maxItems: 1
+
+  enable-gpios:
+    maxItems: 1
+
+  ti,peak-current:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [0, 0x20, 0x40, 0x60]
+    default: 0x60
+    description: |
+      Peak current can be set to 4 values 1.6A (0x00),
+      2.3A (0x20), 3.0A (0x40) and 3.6A (0x60).
+
+  ti,max-flash-timeout:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 32
+    maximum: 1024
+    default: 1024
+    description: |
+      Maximum flash timeout in ms with step 32ms.
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - '#address-cells'
+  - '#size-cells'
+
+patternProperties:
+  "^led@[01]$":
+    type: object
+    description: |
+      Properties for a connected LEDs.
+    properties:
+      reg:
+        minimum: 0
+        maximum: 1
+
+      ti,max-flash-current:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        minimum: 62500
+        maximum: 1000000
+        default: 1000000
+        description: |
+          Maximum current in flash mode in uA with step 62500uA.
+
+      ti,max-torch-current:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        minimum: 31250
+        maximum: 250000
+        default: 250000
+        description: |
+          Maximum current in tourch mode in uA with step 31250uA.
+
+    required:
+      - reg
+
+    additionalProperties: false
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        flash-led@53 {
+            compatible = "ti,lm3559";
+            reg = <0x53>;
+
+            enable-gpios = <&gpio 219 GPIO_ACTIVE_HIGH>;
+
+            ti,peak-current = <0>;
+            ti,max-flash-timeout = <1024>;
+
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            led@0 {
+                reg = <0>;
+
+                ti,max-flash-current = <562500>;
+                ti,max-torch-current = <156250>;
+            };
+
+            led@1 {
+                reg = <1>;
+
+                ti,max-flash-current = <562500>;
+                ti,max-torch-current = <156250>;
+            };
+        };
+    };
+...
-- 
2.37.2


  reply	other threads:[~2023-03-08  9:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08  9:52 [PATCH v1 0/2] Add OF support for LM3560 Svyatoslav Ryhel
2023-03-08  9:52 ` Svyatoslav Ryhel [this message]
2023-03-08 14:06   ` [PATCH v1 1/2] dt-bindings: media: i2c: add lm3560 binding Rob Herring
2023-03-08 18:21   ` Rob Herring
2023-03-08  9:52 ` [PATCH v1 2/2] media: lm3560: convent to OF Svyatoslav Ryhel
2023-03-14 11:00   ` Sakari Ailus

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=20230308095209.14700-2-clamor95@gmail.com \
    --to=clamor95@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gshark.jeong@gmail.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jdelvare@suse.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=ldd-mlp@list.ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=mchehab@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.reichel@collabora.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®