From: Svyatoslav Ryhel <clamor95@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>,
"Jonathan Cameron" <jic23@kernel.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Pavel Machek" <pavel@ucw.cz>,
"Daniel Thompson" <danielt@kernel.org>,
"Jingoo Han" <jingoohan1@gmail.com>,
"Helge Deller" <deller@gmx.de>,
"Svyatoslav Ryhel" <clamor95@gmail.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org, linux-leds@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org
Subject: [PATCH v1 1/2] dt-bindings: mfd: Document TI LM3533 MFD
Date: Wed, 12 Feb 2025 09:58:41 +0200 [thread overview]
Message-ID: <20250212075845.11338-2-clamor95@gmail.com> (raw)
In-Reply-To: <20250212075845.11338-1-clamor95@gmail.com>
Add bindings for the LM3533 - a complete power source for
backlight, keypad, and indicator LEDs in smartphone handsets.
The high-voltage inductive boost converter provides the
power for two series LED strings display backlight and keypad
functions.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
.../devicetree/bindings/mfd/ti,lm3533.yaml | 221 ++++++++++++++++++
include/dt-bindings/mfd/lm3533.h | 19 ++
2 files changed, 240 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mfd/ti,lm3533.yaml
create mode 100644 include/dt-bindings/mfd/lm3533.h
diff --git a/Documentation/devicetree/bindings/mfd/ti,lm3533.yaml b/Documentation/devicetree/bindings/mfd/ti,lm3533.yaml
new file mode 100644
index 000000000000..d0307e5894f8
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/ti,lm3533.yaml
@@ -0,0 +1,221 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/ti,lm3533.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI LM3533 Complete Lighting Power Solution
+
+description: |
+ The LM3533 is a complete power source for backlight,
+ keypad, and indicator LEDs in smartphone handsets. The
+ high-voltage inductive boost converter provides the
+ power for two series LED strings display backlight and
+ keypad functions.
+ https://www.ti.com/product/LM3533
+
+maintainers:
+ - Johan Hovold <jhovold@gmail.com>
+
+properties:
+ compatible:
+ const: ti,lm3533
+
+ reg:
+ maxItems: 1
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+ enable-gpios:
+ description: GPIO to use to enable/disable the backlight (HWEN pin).
+ maxItems: 1
+
+ ti,boost-ovp:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Boost OVP select (16V, 24V, 32V, 40V)
+ enum: [ 0, 1, 2, 3 ]
+ default: 0
+
+ ti,boost-freq:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Boost frequency select (500KHz or 1MHz)
+ enum: [ 0, 1 ]
+ default: 0
+
+required:
+ - compatible
+ - reg
+ - '#address-cells'
+ - '#size-cells'
+ - enable-gpios
+
+patternProperties:
+ "^backlight@[01]$":
+ type: object
+ description:
+ Properties for a backlight device.
+
+ properties:
+ compatible:
+ const: lm3533-backlight
+
+ reg:
+ description: |
+ The control bank that is used to program the two current sinks. The
+ LM3533 has two control banks (A and B) and are represented as 0 or 1
+ in this property. The two current sinks can be controlled
+ independently with both banks, or bank A can be configured to control
+ both sinks with the led-sources property.
+ minimum: 0
+ maximum: 1
+
+ max-current-microamp:
+ description:
+ Maximum current in µA with a 800 µA step.
+ enum: [ 5000, 5800, 6600, 7400, 8200, 9000, 9800,
+ 10600, 11400, 12200, 13000, 13800, 14600,
+ 15400, 16200, 17000, 17800, 18600, 19400,
+ 20200, 21000, 21800, 22600, 23400, 24200,
+ 25000, 25800, 26600, 27400, 28200, 29000,
+ 29800 ]
+ default: 5000
+
+ default-brightness:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Default brightness level on boot.
+ minimum: 0
+ maximum: 255
+ default: 255
+
+ pwm:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Default pwm level on boot.
+ minimum: 0
+ maximum: 63
+ default: 0
+
+ required:
+ - compatible
+ - reg
+
+ additionalProperties: false
+
+ "^led@[0-3]$":
+ type: object
+ description:
+ Properties for a led device.
+
+ properties:
+ compatible:
+ const: lm3533-leds
+
+ reg:
+ description:
+ 4 led banks
+ minimum: 0
+ maximum: 3
+
+ max-current-microamp:
+ description:
+ Maximum current in µA with a 800 µA step.
+ enum: [ 5000, 5800, 6600, 7400, 8200, 9000, 9800,
+ 10600, 11400, 12200, 13000, 13800, 14600,
+ 15400, 16200, 17000, 17800, 18600, 19400,
+ 20200, 21000, 21800, 22600, 23400, 24200,
+ 25000, 25800, 26600, 27400, 28200, 29000,
+ 29800 ]
+ default: 5000
+
+ default-trigger:
+ $ref: /schemas/types.yaml#/definitions/string
+ description: |
+ This parameter, if present, is a string defining
+ the trigger assigned to the LED. Check linux,default-trigger.
+
+ pwm:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Default pwm level on boot.
+ minimum: 0
+ maximum: 63
+ default: 0
+
+ required:
+ - compatible
+ - reg
+
+ additionalProperties: false
+
+ "^light-sensor@[0]$":
+ type: object
+ description:
+ Properties for an illumination sensor.
+
+ properties:
+ compatible:
+ const: lm3533-als
+
+ reg:
+ const: 0
+
+ resistor-value:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ PWM resistor value a linear step in currents
+ of 10 µA per code based upon 2V/R_ALS.
+ minimum: 1
+ maximum: 127
+ default: 1
+
+ pwm-mode:
+ type: boolean
+ description: Mode in which ALS is running
+
+ required:
+ - compatible
+ - reg
+
+ additionalProperties: false
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/mfd/lm3533.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led-controller@36 {
+ compatible = "ti,lm3533";
+ reg = <0x36>;
+
+ enable-gpios = <&gpio 110 GPIO_ACTIVE_HIGH>;
+
+ ti,boost-ovp = <LM3533_BOOST_OVP_24V>;
+ ti,boost-freq = <LM3533_BOOST_FREQ_500KHZ>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ backlight@0 {
+ compatible = "lm3533-backlight";
+ reg = <0>;
+
+ max-current-microamp = <23400>;
+ default-brightness = <113>;
+ pwm = <0x00>;
+ };
+ };
+ };
+...
diff --git a/include/dt-bindings/mfd/lm3533.h b/include/dt-bindings/mfd/lm3533.h
new file mode 100644
index 000000000000..929988190c52
--- /dev/null
+++ b/include/dt-bindings/mfd/lm3533.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * This header provides macros for TI LM3533 device bindings.
+ */
+
+#ifndef _DT_BINDINGS_MFD_LM3533_H
+#define _DT_BINDINGS_MFD_LM3533_H
+
+/* LM3533 boost freq */
+#define LM3533_BOOST_FREQ_500KHZ 0
+#define LM3533_BOOST_FREQ_1000KHZ 1
+
+/* LM3533 boost ovp */
+#define LM3533_BOOST_OVP_16V 0
+#define LM3533_BOOST_OVP_24V 1
+#define LM3533_BOOST_OVP_32V 2
+#define LM3533_BOOST_OVP_40V 3
+
+#endif
--
2.43.0
next prev parent reply other threads:[~2025-02-12 7:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-12 7:58 [PATCH v1 0/2] mfd: lm3533: convert to use OF Svyatoslav Ryhel
2025-02-12 7:58 ` Svyatoslav Ryhel [this message]
2025-02-12 19:49 ` [PATCH v1 1/2] dt-bindings: mfd: Document TI LM3533 MFD Conor Dooley
2025-02-13 6:27 ` Svyatoslav Ryhel
2025-02-13 21:32 ` Daniel Thompson
2025-02-14 6:15 ` Svyatoslav Ryhel
2025-02-12 7:58 ` [PATCH v1 2/2] mfd: lm3533: convert to use OF Svyatoslav Ryhel
2025-02-13 14:57 ` Andy Shevchenko
2025-02-13 15:03 ` Svyatoslav Ryhel
2025-02-16 14:40 ` Jonathan Cameron
2025-02-12 11:02 ` [PATCH v1 0/2] " Andy Shevchenko
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=20250212075845.11338-2-clamor95@gmail.com \
--to=clamor95@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=conor+dt@kernel.org \
--cc=danielt@kernel.org \
--cc=deller@gmx.de \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jic23@kernel.org \
--cc=jingoohan1@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=lee@kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=robh@kernel.org \
--cc=u.kleine-koenig@baylibre.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