All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 10/10] Documentation: Add device tree bindings for TI LMU devices
@ 2014-02-14  6:32 ` Milo Kim
  0 siblings, 0 replies; 11+ messages in thread
From: Milo Kim @ 2014-02-14  6:32 UTC (permalink / raw)
  To: Lee Jones, Jingoo Han, Bryan Wu, Mark Brown
  Cc: linux-kernel, devicetree, Samuel Ortiz, Milo Kim

Bindings for TI LMU, backlight, LM3631 regulator and LM3633 LED are added.

Cc: devicetree@vger.kernel.org
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Milo Kim <milo.kim@ti.com>
---
 .../devicetree/bindings/leds/leds-lm3633.txt       |   39 +++++
 Documentation/devicetree/bindings/mfd/ti-lmu.txt   |  182 ++++++++++++++++++++
 .../bindings/regulator/lm3631-regulator.txt        |   49 ++++++
 .../bindings/video/backlight/ti-lmu-backlight.txt  |  127 ++++++++++++++
 4 files changed, 397 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3633.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/ti-lmu.txt
 create mode 100644 Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
 create mode 100644 Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt

diff --git a/Documentation/devicetree/bindings/leds/leds-lm3633.txt b/Documentation/devicetree/bindings/leds/leds-lm3633.txt
new file mode 100644
index 0000000..4adeb62
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-lm3633.txt
@@ -0,0 +1,39 @@
+TI LMU LM3633 LED device tree bindings
+
+Required properties:
+  - compatible: "ti,lm3633-leds"
+  - lvled1-used, lvled2-used, lvled3-used, lvled4-used, lvled5-used, lvled6-used
+    : LED string configuration. Each child node should include this information
+      about which LED string is used.
+
+Optional properties:
+  - chan-name: LED channel name
+  - max-current-milliamp: Max current setting. Unit is mA.
+
+Example:
+
+lm3633@36 {
+	compatible = "ti,lm3633";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	leds {
+		compatible = "ti,lm3633-leds";
+
+		chan2 {
+			chan-name = "status";
+			lvled2-used;
+			max-current-milliamp = /bits/ 8 <6>;
+		};
+
+		chan456 {
+			chan-name = "rgb";
+			lvled4-used;
+			lvled5-used;
+			lvled6-used;
+
+			max-current-milliamp = /bits/ 8 <5>;
+		};
+	};
+};
diff --git a/Documentation/devicetree/bindings/mfd/ti-lmu.txt b/Documentation/devicetree/bindings/mfd/ti-lmu.txt
new file mode 100644
index 0000000..2b3ecca
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/ti-lmu.txt
@@ -0,0 +1,182 @@
+TI LMU(Lighting Management Unit) device tree bindings
+
+TI LMU driver supports lighting devices belows.
+
+   Name        Device tree properties
+  ------      ------------------------
+  LM3532       Backlight
+  LM3631       Backlight and regulator
+  LM3633       Backlight and LED
+  LM3695       Backlight
+  LM3697       Backlight
+
+Those have shared device tree properties.
+
+Required properties:
+  - compatible: "ti,lm3532", "ti,lm3631", "ti,lm3633", "ti,lm3695", "ti,lm3697"
+  - reg: I2C slave address.
+    0x38 is LM3532
+    0x29 is LM3631
+    0x36 is LM3633, LM3697
+    0x63 is LM3695
+  - ti,enable-gpio: GPIO number of hardware enable pin
+
+For the TI LMU backlight properties, please refer to:
+Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
+
+For the LM3631 regulator properties, please refer to:
+Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
+
+For the LM3633 LED properties, please refer to:
+Documentation/devicetree/bindings/leds/leds-lm3633.txt
+
+Examples:
+
+lm3532@38 {
+	compatible = "ti,lm3532";
+	reg = <0x38>;
+
+	/* GPIO134 for HWEN pin */
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3532-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+			hvled3-used;
+
+			max-current-milliamp = /bits/ 8 <20>;
+			ramp-up = <1>;
+			ramp-down = <1>;
+		};
+	};
+};
+
+lm3631@29 {
+	compatible = "ti,lm3631";
+	reg = <0x29>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	/* Only Vpos and Vneg are used with LCD boost */
+	regulators {
+		compatible = "ti,lm3631-regulator";
+
+		vboost {
+			regulator-name = "lcd_boost";
+			regulator-min-microvolt = <4500000>;
+			regulator-max-microvolt = <6350000>;
+			regulator-always-on;
+		};
+
+		vpos {
+			regulator-name = "lcd_vpos";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+			regulator-boot-on;
+		};
+
+		vneg {
+			regulator-name = "lcd_vneg";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+			regulator-boot-on;
+		};
+	};
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3631-backlight";
+
+		lcd_bl {
+			bl-name = "lcd";
+			hvled1-used;
+			hvled2-used;
+			ramp-up = <100>;
+		};
+	};
+};
+
+lm3633@36 {
+	compatible = "ti,lm3633";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3633-backlight";
+
+		main {
+			bl-name = "main_lcd";
+			hvled2-used;
+			hvled3-used;
+			max-current-milliamp = /bits/ 8 <20>;
+		};
+
+		front {
+			bl-name = "front_lcd";
+			hvled1-used;
+			max-current-milliamp = /bits/ 8 <10>;
+		};
+	};
+
+	leds {
+		compatible = "ti,lm3633-leds";
+
+		chan2 {
+			chan-name = "status";
+			lvled2-used;
+			max-current-milliamp = /bits/ 8 <6>;
+		};
+
+		chan456 {
+			chan-name = "rgb";
+			lvled4-used;
+			lvled5-used;
+			lvled6-used;
+
+			max-current-milliamp = /bits/ 8 <5>;
+		};
+	};
+};
+
+lm3695@63 {
+	compatible = "ti,lm3695";
+	reg = <0x63>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3695-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+		};
+	};
+};
+
+lm3697@36 {
+	compatible = "ti,lm3697";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3697-backlight";
+
+		lcd_bl {
+			bl-name = "lcd";
+			hvled1-used;
+			hvled2-used;
+			hvled3-used;
+
+			max-current-milliamp = /bits/ 8 <20>;
+			initial-brightness = /bits/ 8 <10>;
+
+			ramp-up = <500>;
+			ramp-down = <500>;
+		};
+	};
+};
diff --git a/Documentation/devicetree/bindings/regulator/lm3631-regulator.txt b/Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
new file mode 100644
index 0000000..e090076
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
@@ -0,0 +1,49 @@
+TI LMU LM3631 regulator device tree bindings
+
+Required properties:
+  - compatible: "ti,lm3631-regulator"
+
+Optional properties:
+  - regulator-name
+  - regulator-min-microvolt
+  - regulator-max-microvolt
+  - regulator-always-on
+  - regulator-boot-on
+
+  For those properties, please refer to:
+  Documentation/devicetree/bindings/regulator/regulator.txt
+
+Example:
+
+lm3631@29 {
+	compatible = "ti,lm3631";
+	reg = <0x29>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	/* Only VPOS and VNEG are used with LCD boost */
+	regulators {
+		compatible = "ti,lm3631-regulator";
+
+		vboost {
+			regulator-name = "lcd_boost";
+			regulator-min-microvolt = <4500000>;
+			regulator-max-microvolt = <6350000>;
+			regulator-always-on;
+		};
+
+		vpos {
+			regulator-name = "lcd_vpos";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+			regulator-boot-on;
+		};
+
+		vneg {
+			regulator-name = "lcd_vneg";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+			regulator-boot-on;
+		};
+	};
+};
diff --git a/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt b/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
new file mode 100644
index 0000000..554ddca
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
@@ -0,0 +1,127 @@
+TI LMU backlight device tree bindings
+
+Required properties:
+  - compatible: One of lists below with "ti,lmu-backlight" should be set.
+    "ti,lm3532-backlight"
+    "ti,lm3631-backlight"
+    "ti,lm3633-backlight"
+    "ti,lm3695-backlight"
+    "ti,lm3697-backlight"
+  - hvled1-used, hvled2-used, hvled3-used: Backlight string configuration.
+    Each backlight child node should include this information about
+    which backlight string is used.
+
+Optional properties
+  - bl-name: Backlight device name
+  - max-current-milliamp: Max current setting. Unit is mA.
+  - initial-brightness: Backlight initial brightness
+  - ramp-up: Light effect for ramp up rate. Unit is msec.
+  - ramp-down: Light effect for ramp down rate. Unit is msec.
+  - pwm-period: PWM period. Only valid for PWM brightness control mode.
+  - pwms, pwm-names: For the PWM user nodes, please refer to
+    Documentation/devicetree/bindings/pwm/pwm.txt
+
+Examples:
+
+lm3532@38 {
+	compatible = "ti,lm3532";
+	reg = <0x38>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3532-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+			hvled3-used;
+
+			max-current-milliamp = /bits/ 8 <20>;
+		};
+	};
+};
+
+lm3631@29 {
+	compatible = "ti,lm3631";
+	reg = <0x29>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3631-backlight";
+
+		lcd_bl {
+			bl-name = "lcd";
+			hvled1-used;
+			hvled2-used;
+			ramp-up = <100>;
+		};
+	};
+};
+
+lm3633@36 {
+	compatible = "ti,lm3633";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3633-backlight";
+
+		main {
+			bl-name = "main_lcd";
+			hvled2-used;
+			hvled3-used;
+			max-current-milliamp = /bits/ 8 <20>;
+		};
+
+		front {
+			bl-name = "front_lcd";
+			hvled1-used;
+			max-current-milliamp = /bits/ 8 <10>;
+		};
+	};
+};
+
+lm3695@63 {
+	compatible = "ti,lm3695";
+	reg = <0x63>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3695-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+		};
+	};
+};
+
+lm3697@36 {
+	compatible = "ti,lm3697";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	pwms = <&pwm3943 1 10000>;
+	pwm-names = "lmu-backlight";
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3697-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+			hvled3-used;
+
+			max-current-milliamp = /bits/ 8 <20>;
+			initial-brightness = /bits/ 8 <10>;
+
+			ramp-up = <500>;
+			ramp-down = <500>;
+			pwm-period = <10000>;
+		};
+	};
+};
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 10/10] Documentation: Add device tree bindings for TI LMU devices
@ 2014-02-14  6:32 ` Milo Kim
  0 siblings, 0 replies; 11+ messages in thread
From: Milo Kim @ 2014-02-14  6:32 UTC (permalink / raw)
  To: Lee Jones, Jingoo Han, Bryan Wu, Mark Brown
  Cc: linux-kernel, devicetree, Samuel Ortiz, Milo Kim

Bindings for TI LMU, backlight, LM3631 regulator and LM3633 LED are added.

Cc: devicetree@vger.kernel.org
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Milo Kim <milo.kim@ti.com>
---
 .../devicetree/bindings/leds/leds-lm3633.txt       |   39 +++++
 Documentation/devicetree/bindings/mfd/ti-lmu.txt   |  182 ++++++++++++++++++++
 .../bindings/regulator/lm3631-regulator.txt        |   49 ++++++
 .../bindings/video/backlight/ti-lmu-backlight.txt  |  127 ++++++++++++++
 4 files changed, 397 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3633.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/ti-lmu.txt
 create mode 100644 Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
 create mode 100644 Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt

diff --git a/Documentation/devicetree/bindings/leds/leds-lm3633.txt b/Documentation/devicetree/bindings/leds/leds-lm3633.txt
new file mode 100644
index 0000000..4adeb62
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-lm3633.txt
@@ -0,0 +1,39 @@
+TI LMU LM3633 LED device tree bindings
+
+Required properties:
+  - compatible: "ti,lm3633-leds"
+  - lvled1-used, lvled2-used, lvled3-used, lvled4-used, lvled5-used, lvled6-used
+    : LED string configuration. Each child node should include this information
+      about which LED string is used.
+
+Optional properties:
+  - chan-name: LED channel name
+  - max-current-milliamp: Max current setting. Unit is mA.
+
+Example:
+
+lm3633@36 {
+	compatible = "ti,lm3633";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	leds {
+		compatible = "ti,lm3633-leds";
+
+		chan2 {
+			chan-name = "status";
+			lvled2-used;
+			max-current-milliamp = /bits/ 8 <6>;
+		};
+
+		chan456 {
+			chan-name = "rgb";
+			lvled4-used;
+			lvled5-used;
+			lvled6-used;
+
+			max-current-milliamp = /bits/ 8 <5>;
+		};
+	};
+};
diff --git a/Documentation/devicetree/bindings/mfd/ti-lmu.txt b/Documentation/devicetree/bindings/mfd/ti-lmu.txt
new file mode 100644
index 0000000..2b3ecca
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/ti-lmu.txt
@@ -0,0 +1,182 @@
+TI LMU(Lighting Management Unit) device tree bindings
+
+TI LMU driver supports lighting devices belows.
+
+   Name        Device tree properties
+  ------      ------------------------
+  LM3532       Backlight
+  LM3631       Backlight and regulator
+  LM3633       Backlight and LED
+  LM3695       Backlight
+  LM3697       Backlight
+
+Those have shared device tree properties.
+
+Required properties:
+  - compatible: "ti,lm3532", "ti,lm3631", "ti,lm3633", "ti,lm3695", "ti,lm3697"
+  - reg: I2C slave address.
+    0x38 is LM3532
+    0x29 is LM3631
+    0x36 is LM3633, LM3697
+    0x63 is LM3695
+  - ti,enable-gpio: GPIO number of hardware enable pin
+
+For the TI LMU backlight properties, please refer to:
+Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
+
+For the LM3631 regulator properties, please refer to:
+Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
+
+For the LM3633 LED properties, please refer to:
+Documentation/devicetree/bindings/leds/leds-lm3633.txt
+
+Examples:
+
+lm3532@38 {
+	compatible = "ti,lm3532";
+	reg = <0x38>;
+
+	/* GPIO134 for HWEN pin */
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3532-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+			hvled3-used;
+
+			max-current-milliamp = /bits/ 8 <20>;
+			ramp-up = <1>;
+			ramp-down = <1>;
+		};
+	};
+};
+
+lm3631@29 {
+	compatible = "ti,lm3631";
+	reg = <0x29>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	/* Only Vpos and Vneg are used with LCD boost */
+	regulators {
+		compatible = "ti,lm3631-regulator";
+
+		vboost {
+			regulator-name = "lcd_boost";
+			regulator-min-microvolt = <4500000>;
+			regulator-max-microvolt = <6350000>;
+			regulator-always-on;
+		};
+
+		vpos {
+			regulator-name = "lcd_vpos";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+			regulator-boot-on;
+		};
+
+		vneg {
+			regulator-name = "lcd_vneg";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+			regulator-boot-on;
+		};
+	};
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3631-backlight";
+
+		lcd_bl {
+			bl-name = "lcd";
+			hvled1-used;
+			hvled2-used;
+			ramp-up = <100>;
+		};
+	};
+};
+
+lm3633@36 {
+	compatible = "ti,lm3633";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3633-backlight";
+
+		main {
+			bl-name = "main_lcd";
+			hvled2-used;
+			hvled3-used;
+			max-current-milliamp = /bits/ 8 <20>;
+		};
+
+		front {
+			bl-name = "front_lcd";
+			hvled1-used;
+			max-current-milliamp = /bits/ 8 <10>;
+		};
+	};
+
+	leds {
+		compatible = "ti,lm3633-leds";
+
+		chan2 {
+			chan-name = "status";
+			lvled2-used;
+			max-current-milliamp = /bits/ 8 <6>;
+		};
+
+		chan456 {
+			chan-name = "rgb";
+			lvled4-used;
+			lvled5-used;
+			lvled6-used;
+
+			max-current-milliamp = /bits/ 8 <5>;
+		};
+	};
+};
+
+lm3695@63 {
+	compatible = "ti,lm3695";
+	reg = <0x63>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3695-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+		};
+	};
+};
+
+lm3697@36 {
+	compatible = "ti,lm3697";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3697-backlight";
+
+		lcd_bl {
+			bl-name = "lcd";
+			hvled1-used;
+			hvled2-used;
+			hvled3-used;
+
+			max-current-milliamp = /bits/ 8 <20>;
+			initial-brightness = /bits/ 8 <10>;
+
+			ramp-up = <500>;
+			ramp-down = <500>;
+		};
+	};
+};
diff --git a/Documentation/devicetree/bindings/regulator/lm3631-regulator.txt b/Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
new file mode 100644
index 0000000..e090076
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
@@ -0,0 +1,49 @@
+TI LMU LM3631 regulator device tree bindings
+
+Required properties:
+  - compatible: "ti,lm3631-regulator"
+
+Optional properties:
+  - regulator-name
+  - regulator-min-microvolt
+  - regulator-max-microvolt
+  - regulator-always-on
+  - regulator-boot-on
+
+  For those properties, please refer to:
+  Documentation/devicetree/bindings/regulator/regulator.txt
+
+Example:
+
+lm3631@29 {
+	compatible = "ti,lm3631";
+	reg = <0x29>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	/* Only VPOS and VNEG are used with LCD boost */
+	regulators {
+		compatible = "ti,lm3631-regulator";
+
+		vboost {
+			regulator-name = "lcd_boost";
+			regulator-min-microvolt = <4500000>;
+			regulator-max-microvolt = <6350000>;
+			regulator-always-on;
+		};
+
+		vpos {
+			regulator-name = "lcd_vpos";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+			regulator-boot-on;
+		};
+
+		vneg {
+			regulator-name = "lcd_vneg";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+			regulator-boot-on;
+		};
+	};
+};
diff --git a/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt b/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
new file mode 100644
index 0000000..554ddca
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
@@ -0,0 +1,127 @@
+TI LMU backlight device tree bindings
+
+Required properties:
+  - compatible: One of lists below with "ti,lmu-backlight" should be set.
+    "ti,lm3532-backlight"
+    "ti,lm3631-backlight"
+    "ti,lm3633-backlight"
+    "ti,lm3695-backlight"
+    "ti,lm3697-backlight"
+  - hvled1-used, hvled2-used, hvled3-used: Backlight string configuration.
+    Each backlight child node should include this information about
+    which backlight string is used.
+
+Optional properties
+  - bl-name: Backlight device name
+  - max-current-milliamp: Max current setting. Unit is mA.
+  - initial-brightness: Backlight initial brightness
+  - ramp-up: Light effect for ramp up rate. Unit is msec.
+  - ramp-down: Light effect for ramp down rate. Unit is msec.
+  - pwm-period: PWM period. Only valid for PWM brightness control mode.
+  - pwms, pwm-names: For the PWM user nodes, please refer to
+    Documentation/devicetree/bindings/pwm/pwm.txt
+
+Examples:
+
+lm3532@38 {
+	compatible = "ti,lm3532";
+	reg = <0x38>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3532-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+			hvled3-used;
+
+			max-current-milliamp = /bits/ 8 <20>;
+		};
+	};
+};
+
+lm3631@29 {
+	compatible = "ti,lm3631";
+	reg = <0x29>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3631-backlight";
+
+		lcd_bl {
+			bl-name = "lcd";
+			hvled1-used;
+			hvled2-used;
+			ramp-up = <100>;
+		};
+	};
+};
+
+lm3633@36 {
+	compatible = "ti,lm3633";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3633-backlight";
+
+		main {
+			bl-name = "main_lcd";
+			hvled2-used;
+			hvled3-used;
+			max-current-milliamp = /bits/ 8 <20>;
+		};
+
+		front {
+			bl-name = "front_lcd";
+			hvled1-used;
+			max-current-milliamp = /bits/ 8 <10>;
+		};
+	};
+};
+
+lm3695@63 {
+	compatible = "ti,lm3695";
+	reg = <0x63>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3695-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+		};
+	};
+};
+
+lm3697@36 {
+	compatible = "ti,lm3697";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	pwms = <&pwm3943 1 10000>;
+	pwm-names = "lmu-backlight";
+	backlight {
+		compatible = "ti,lmu-backlight", "ti,lm3697-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+			hvled3-used;
+
+			max-current-milliamp = /bits/ 8 <20>;
+			initial-brightness = /bits/ 8 <10>;
+
+			ramp-up = <500>;
+			ramp-down = <500>;
+			pwm-period = <10000>;
+		};
+	};
+};
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 10/10] Documentation: Add device tree bindings for TI LMU devices
@ 2014-02-14 10:06   ` Mark Rutland
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Rutland @ 2014-02-14 10:06 UTC (permalink / raw)
  To: Milo Kim
  Cc: Lee Jones, Jingoo Han, Bryan Wu, Mark Brown, linux-kernel,
	devicetree, Samuel Ortiz

On Fri, Feb 14, 2014 at 06:32:44AM +0000, Milo Kim wrote:
> Bindings for TI LMU, backlight, LM3631 regulator and LM3633 LED are added.
> 
> Cc: devicetree@vger.kernel.org
> Cc: Bryan Wu <cooloney@gmail.com>
> Cc: Jingoo Han <jg1.han@samsung.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Signed-off-by: Milo Kim <milo.kim@ti.com>
> ---
>  .../devicetree/bindings/leds/leds-lm3633.txt       |   39 +++++
>  Documentation/devicetree/bindings/mfd/ti-lmu.txt   |  182 ++++++++++++++++++++
>  .../bindings/regulator/lm3631-regulator.txt        |   49 ++++++
>  .../bindings/video/backlight/ti-lmu-backlight.txt  |  127 ++++++++++++++
>  4 files changed, 397 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3633.txt
>  create mode 100644 Documentation/devicetree/bindings/mfd/ti-lmu.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
>  create mode 100644 Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
> 
> diff --git a/Documentation/devicetree/bindings/leds/leds-lm3633.txt b/Documentation/devicetree/bindings/leds/leds-lm3633.txt
> new file mode 100644
> index 0000000..4adeb62
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/leds-lm3633.txt
> @@ -0,0 +1,39 @@
> +TI LMU LM3633 LED device tree bindings
> +
> +Required properties:
> +  - compatible: "ti,lm3633-leds"
> +  - lvled1-used, lvled2-used, lvled3-used, lvled4-used, lvled5-used, lvled6-used
> +    : LED string configuration. Each child node should include this information
> +      about which LED string is used.

Which child nodes? They weren't mentioned until this point.

If properties need to be in a child node, mention the child node first,
and make it clear where the properties are expected to be.

> +
> +Optional properties:
> +  - chan-name: LED channel name

Any reason to abbreviate "channel" to "chan"?

What's this for?

> +  - max-current-milliamp: Max current setting. Unit is mA.

The code and examples treat this as an 8-bit value, but this fact isn't
mentioned here.

> +
> +Example:
> +
> +lm3633@36 {
> +	compatible = "ti,lm3633";

It wasn't mentioned that this had to be a sub-node of a "ti,lm3633"
node. Please describe above and refer to the document for the
"ti,lm3633" binding.

[...]

> diff --git a/Documentation/devicetree/bindings/mfd/ti-lmu.txt b/Documentation/devicetree/bindings/mfd/ti-lmu.txt
> new file mode 100644
> index 0000000..2b3ecca
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/ti-lmu.txt
> @@ -0,0 +1,182 @@
> +TI LMU(Lighting Management Unit) device tree bindings
> +
> +TI LMU driver supports lighting devices belows.
> +
> +   Name        Device tree properties
> +  ------      ------------------------
> +  LM3532       Backlight
> +  LM3631       Backlight and regulator
> +  LM3633       Backlight and LED
> +  LM3695       Backlight
> +  LM3697       Backlight
> +
> +Those have shared device tree properties.
> +
> +Required properties:
> +  - compatible: "ti,lm3532", "ti,lm3631", "ti,lm3633", "ti,lm3695", "ti,lm3697"

Should be one of, rather than all at once?

> +  - reg: I2C slave address.
> +    0x38 is LM3532
> +    0x29 is LM3631
> +    0x36 is LM3633, LM3697
> +    0x63 is LM3695
> +  - ti,enable-gpio: GPIO number of hardware enable pin

We refer to GPIOs with more than a number...

> +
> +For the TI LMU backlight properties, please refer to:
> +Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
> +
> +For the LM3631 regulator properties, please refer to:
> +Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
> +
> +For the LM3633 LED properties, please refer to:
> +Documentation/devicetree/bindings/leds/leds-lm3633.txt

Are these expected as subnodes?

> +
> +Examples:
> +
> +lm3532@38 {
> +	compatible = "ti,lm3532";
> +	reg = <0x38>;
> +
> +	/* GPIO134 for HWEN pin */
> +	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
> +
> +	backlight {
> +		compatible = "ti,lmu-backlight", "ti,lm3532-backlight";

This looks backwards. The most general string should be later in the
list. This applies elsewhere too.

[...]

> diff --git a/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt b/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
> new file mode 100644
> index 0000000..554ddca
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
> @@ -0,0 +1,127 @@
> +TI LMU backlight device tree bindings
> +
> +Required properties:
> +  - compatible: One of lists below with "ti,lmu-backlight" should be set.
> +    "ti,lm3532-backlight"
> +    "ti,lm3631-backlight"
> +    "ti,lm3633-backlight"
> +    "ti,lm3695-backlight"
> +    "ti,lm3697-backlight"

Do you mean that "ti,lmu-backlight" should be a fallback entry in the
compatible list?

> +  - hvled1-used, hvled2-used, hvled3-used: Backlight string configuration.
> +    Each backlight child node should include this information about
> +    which backlight string is used.
> +
> +Optional properties
> +  - bl-name: Backlight device name

Why bother abbreviating backlight to bl?

What's this for anyway? Surely something else has to link to the
backlight node, and a meaningful name should be implied.

> +  - max-current-milliamp: Max current setting. Unit is mA.

Type?

> +  - initial-brightness: Backlight initial brightness

Type? Units?

> +  - ramp-up: Light effect for ramp up rate. Unit is msec.
> +  - ramp-down: Light effect for ramp down rate. Unit is msec.
> +  - pwm-period: PWM period. Only valid for PWM brightness control mode.

Type? Units?

> +  - pwms, pwm-names: For the PWM user nodes, please refer to

How many do you expect?

What are each of them for?

What are they named?

Thanks,
Mark.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 10/10] Documentation: Add device tree bindings for TI LMU devices
@ 2014-02-14 10:06   ` Mark Rutland
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Rutland @ 2014-02-14 10:06 UTC (permalink / raw)
  To: Milo Kim
  Cc: Lee Jones, Jingoo Han, Bryan Wu, Mark Brown,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Samuel Ortiz

On Fri, Feb 14, 2014 at 06:32:44AM +0000, Milo Kim wrote:
> Bindings for TI LMU, backlight, LM3631 regulator and LM3633 LED are added.
> 
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: Bryan Wu <cooloney-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Cc: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> Signed-off-by: Milo Kim <milo.kim-l0cyMroinI0@public.gmane.org>
> ---
>  .../devicetree/bindings/leds/leds-lm3633.txt       |   39 +++++
>  Documentation/devicetree/bindings/mfd/ti-lmu.txt   |  182 ++++++++++++++++++++
>  .../bindings/regulator/lm3631-regulator.txt        |   49 ++++++
>  .../bindings/video/backlight/ti-lmu-backlight.txt  |  127 ++++++++++++++
>  4 files changed, 397 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3633.txt
>  create mode 100644 Documentation/devicetree/bindings/mfd/ti-lmu.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
>  create mode 100644 Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
> 
> diff --git a/Documentation/devicetree/bindings/leds/leds-lm3633.txt b/Documentation/devicetree/bindings/leds/leds-lm3633.txt
> new file mode 100644
> index 0000000..4adeb62
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/leds-lm3633.txt
> @@ -0,0 +1,39 @@
> +TI LMU LM3633 LED device tree bindings
> +
> +Required properties:
> +  - compatible: "ti,lm3633-leds"
> +  - lvled1-used, lvled2-used, lvled3-used, lvled4-used, lvled5-used, lvled6-used
> +    : LED string configuration. Each child node should include this information
> +      about which LED string is used.

Which child nodes? They weren't mentioned until this point.

If properties need to be in a child node, mention the child node first,
and make it clear where the properties are expected to be.

> +
> +Optional properties:
> +  - chan-name: LED channel name

Any reason to abbreviate "channel" to "chan"?

What's this for?

> +  - max-current-milliamp: Max current setting. Unit is mA.

The code and examples treat this as an 8-bit value, but this fact isn't
mentioned here.

> +
> +Example:
> +
> +lm3633@36 {
> +	compatible = "ti,lm3633";

It wasn't mentioned that this had to be a sub-node of a "ti,lm3633"
node. Please describe above and refer to the document for the
"ti,lm3633" binding.

[...]

> diff --git a/Documentation/devicetree/bindings/mfd/ti-lmu.txt b/Documentation/devicetree/bindings/mfd/ti-lmu.txt
> new file mode 100644
> index 0000000..2b3ecca
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/ti-lmu.txt
> @@ -0,0 +1,182 @@
> +TI LMU(Lighting Management Unit) device tree bindings
> +
> +TI LMU driver supports lighting devices belows.
> +
> +   Name        Device tree properties
> +  ------      ------------------------
> +  LM3532       Backlight
> +  LM3631       Backlight and regulator
> +  LM3633       Backlight and LED
> +  LM3695       Backlight
> +  LM3697       Backlight
> +
> +Those have shared device tree properties.
> +
> +Required properties:
> +  - compatible: "ti,lm3532", "ti,lm3631", "ti,lm3633", "ti,lm3695", "ti,lm3697"

Should be one of, rather than all at once?

> +  - reg: I2C slave address.
> +    0x38 is LM3532
> +    0x29 is LM3631
> +    0x36 is LM3633, LM3697
> +    0x63 is LM3695
> +  - ti,enable-gpio: GPIO number of hardware enable pin

We refer to GPIOs with more than a number...

> +
> +For the TI LMU backlight properties, please refer to:
> +Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
> +
> +For the LM3631 regulator properties, please refer to:
> +Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
> +
> +For the LM3633 LED properties, please refer to:
> +Documentation/devicetree/bindings/leds/leds-lm3633.txt

Are these expected as subnodes?

> +
> +Examples:
> +
> +lm3532@38 {
> +	compatible = "ti,lm3532";
> +	reg = <0x38>;
> +
> +	/* GPIO134 for HWEN pin */
> +	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
> +
> +	backlight {
> +		compatible = "ti,lmu-backlight", "ti,lm3532-backlight";

This looks backwards. The most general string should be later in the
list. This applies elsewhere too.

[...]

> diff --git a/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt b/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
> new file mode 100644
> index 0000000..554ddca
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
> @@ -0,0 +1,127 @@
> +TI LMU backlight device tree bindings
> +
> +Required properties:
> +  - compatible: One of lists below with "ti,lmu-backlight" should be set.
> +    "ti,lm3532-backlight"
> +    "ti,lm3631-backlight"
> +    "ti,lm3633-backlight"
> +    "ti,lm3695-backlight"
> +    "ti,lm3697-backlight"

Do you mean that "ti,lmu-backlight" should be a fallback entry in the
compatible list?

> +  - hvled1-used, hvled2-used, hvled3-used: Backlight string configuration.
> +    Each backlight child node should include this information about
> +    which backlight string is used.
> +
> +Optional properties
> +  - bl-name: Backlight device name

Why bother abbreviating backlight to bl?

What's this for anyway? Surely something else has to link to the
backlight node, and a meaningful name should be implied.

> +  - max-current-milliamp: Max current setting. Unit is mA.

Type?

> +  - initial-brightness: Backlight initial brightness

Type? Units?

> +  - ramp-up: Light effect for ramp up rate. Unit is msec.
> +  - ramp-down: Light effect for ramp down rate. Unit is msec.
> +  - pwm-period: PWM period. Only valid for PWM brightness control mode.

Type? Units?

> +  - pwms, pwm-names: For the PWM user nodes, please refer to

How many do you expect?

What are each of them for?

What are they named?

Thanks,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 10/10] Documentation: Add device tree bindings for TI LMU devices
  2014-02-14  6:32 ` Milo Kim
  (?)
  (?)
@ 2014-02-14 20:44 ` Mark Brown
  -1 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2014-02-14 20:44 UTC (permalink / raw)
  To: Milo Kim
  Cc: Lee Jones, Jingoo Han, Bryan Wu, linux-kernel, devicetree, Samuel Ortiz

[-- Attachment #1: Type: text/plain, Size: 257 bytes --]

On Fri, Feb 14, 2014 at 03:32:44PM +0900, Milo Kim wrote:
> Bindings for TI LMU, backlight, LM3631 regulator and LM3633 LED are added.

I don't see actual documentation for the regulators here?  They're there
in the examples but not in the binding section.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 10/10] Documentation: Add device tree bindings for TI LMU devices
  2014-02-14  6:32 ` Milo Kim
                   ` (2 preceding siblings ...)
  (?)
@ 2014-02-14 20:50 ` Mark Brown
  2014-02-17  7:15     ` Milo Kim
  -1 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2014-02-14 20:50 UTC (permalink / raw)
  To: Milo Kim
  Cc: Lee Jones, Jingoo Han, Bryan Wu, linux-kernel, devicetree, Samuel Ortiz

[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]

On Fri, Feb 14, 2014 at 03:32:44PM +0900, Milo Kim wrote:
> Bindings for TI LMU, backlight, LM3631 regulator and LM3633 LED are added.

Ah, sorry - I didn't notice that there were several different binding
documents in the patch.

> @@ -0,0 +1,49 @@
> +TI LMU LM3631 regulator device tree bindings
> +
> +Required properties:
> +  - compatible: "ti,lm3631-regulator"
> +
> +Optional properties:
> +  - regulator-name
> +  - regulator-min-microvolt
> +  - regulator-max-microvolt
> +  - regulator-always-on
> +  - regulator-boot-on
> +
> +  For those properties, please refer to:
> +  Documentation/devicetree/bindings/regulator/regulator.txt

This doesn't correspond to the example which says that there is an
optional property "regulators" which can contain regualators lcd_boost,
lcd_vpos and lcd_vneg.  It's also better to not enumerate all the
standard properties but just refer to the generic document (as you do).
That avoids confusion if new properties are added to the generic
regulator bindings.

The actual binding is fine, it's just the way it's documented.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 10/10] Documentation: Add device tree bindings for TI LMU devices
@ 2014-02-17  7:15     ` Milo Kim
  0 siblings, 0 replies; 11+ messages in thread
From: Milo Kim @ 2014-02-17  7:15 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Lee Jones, Jingoo Han, Bryan Wu, Mark Brown, linux-kernel,
	devicetree, Samuel Ortiz

Hello Mark,

Thanks for your detailed comments.
I've fixed the structure and description.
I'd like to have your feedback before submitting new patch-set.


 From 33faeeed69fa064cd476b252c5a7326a541e12b3 Mon Sep 17 00:00:00 2001
From: Milo Kim <milo.kim@ti.com>
Date: Mon, 17 Feb 2014 14:32:39 +0900
Subject: [PATCH 1/2] Documentation: TI LMU DT fix based on Maintainer's
  feedback


Signed-off-by: Milo Kim <milo.kim@ti.com>
---
  .../devicetree/bindings/leds/leds-lm3633.txt       |   47 +++++
  Documentation/devicetree/bindings/mfd/ti-lmu.txt   |  200 
++++++++++++++++++++
  .../bindings/video/backlight/ti-lmu-backlight.txt  |  153 +++++++++++++++
  3 files changed, 400 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3633.txt
  create mode 100644 Documentation/devicetree/bindings/mfd/ti-lmu.txt
  create mode 100644 
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt

diff --git a/Documentation/devicetree/bindings/leds/leds-lm3633.txt 
b/Documentation/devicetree/bindings/leds/leds-lm3633.txt
new file mode 100644
index 0000000..10546cc
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-lm3633.txt
@@ -0,0 +1,47 @@
+TI LMU LM3633 LED device tree bindings
+
+Required properties:
+  - compatible: "ti,lm3633-leds"
+
+Sub-nodes:
+  Maximum 6 LED channels can be configured in each sub-node.
+
+  Required properties of sub-node:
+  - lvled1-used, lvled2-used, lvled3-used, lvled4-used, lvled5-used, 
lvled6-used
+    : LED string configuration about which LED string is used.
+
+  Optional properties of sub-node:
+  - channel-name: Name string for LED channel identification
+  - max-current-milliamp: Max current setting. Type is <u8>. Unit is mA.
+                          Range is from 5 to 30 mA.
+
+LM3633 LED is represented as a sub-node of the "ti,lm3633" device.
+Please refer to "ti,lm3633" in 
Documentation/devicetree/bindings/mfd/ti-lmu.txt
+
+Example:
+
+lm3633@36 {
+	compatible = "ti,lm3633";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	leds {
+		compatible = "ti,lm3633-leds";
+
+		chan2 {
+			channel-name = "status";
+			lvled2-used;
+			max-current-milliamp = /bits/ 8 <6>;
+		};
+
+		chan456 {
+			channel-name = "rgb";
+			lvled4-used;
+			lvled5-used;
+			lvled6-used;
+
+			max-current-milliamp = /bits/ 8 <5>;
+		};
+	};
+};
diff --git a/Documentation/devicetree/bindings/mfd/ti-lmu.txt 
b/Documentation/devicetree/bindings/mfd/ti-lmu.txt
new file mode 100644
index 0000000..5e21ce9
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/ti-lmu.txt
@@ -0,0 +1,200 @@
+TI LMU(Lighting Management Unit) device tree bindings
+
+TI LMU driver supports lighting devices belows.
+
+   Name        Device tree properties
+  ------      ------------------------
+  LM3532       Backlight
+  LM3631       Backlight and regulator
+  LM3633       Backlight and LED
+  LM3695       Backlight
+  LM3697       Backlight
+
+Those have shared device tree properties.
+
+Required properties:
+  - compatible: Should be one of lists below.
+                "ti,lm3532"
+                "ti,lm3631"
+                "ti,lm3633"
+                "ti,lm3695"
+                "ti,lm3697"
+  - reg: I2C slave address.
+         0x38 is LM3532
+         0x29 is LM3631
+         0x36 is LM3633, LM3697
+         0x63 is LM3695
+  - ti,enable-gpio: GPIOs about hardware enable pin
+
+Sub-nodes:
+  Required sub-node:
+    - backlight: Every TI LMU device has backlight sub-nodes. Please 
refer to
+ 
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
+
+  Optional sub-node:
+    - regulators: Only for LM3631. Please refer to
+ 
Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
+    - leds: Only for LM3633. Please refer to
+            Documentation/devicetree/bindings/leds/leds-lm3633.txt
+
+Examples:
+
+lm3532@38 {
+	compatible = "ti,lm3532";
+	reg = <0x38>;
+
+	/* GPIO134 for HWEN pin */
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lm3532-backlight", "ti,lmu-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+			hvled3-used;
+
+			max-current-milliamp = /bits/ 8 <20>;
+		};
+	};
+};
+
+lm3631@29 {
+	compatible = "ti,lm3631";
+	reg = <0x29>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	regulators {
+		compatible = "ti,lm3631-regulator";
+
+		vboost {
+			regulator-name = "lcd_boost";
+			regulator-min-microvolt = <4500000>;
+			regulator-max-microvolt = <6350000>;
+			regulator-always-on;
+		};
+
+		vcont {
+			regulator-name = "lcd_vcont";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <3300000>;
+		};
+
+		voref {
+			regulator-name = "lcd_voref";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+		};
+
+		vpos {
+			regulator-name = "lcd_vpos";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+			regulator-boot-on;
+		};
+
+		vneg {
+			regulator-name = "lcd_vneg";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+			regulator-boot-on;
+		};
+	};
+
+	backlight {
+		compatible = "ti,lm3631-backlight", "ti,lmu-backlight";
+
+		lcd_bl {
+			hvled1-used;
+			hvled2-used;
+			ramp-up = <100>;
+		};
+	};
+};
+
+lm3633@36 {
+	compatible = "ti,lm3633";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lm3633-backlight", "ti,lmu-backlight";
+
+		main {
+			bl-name = "main_lcd";
+			hvled2-used;
+			hvled3-used;
+			max-current-milliamp = /bits/ 8 <20>;
+		};
+
+		front {
+			bl-name = "front_lcd";
+			hvled1-used;
+			max-current-milliamp = /bits/ 8 <10>;
+		};
+	};
+
+	leds {
+		compatible = "ti,lm3633-leds";
+
+		chan2 {
+			chan-name = "status";
+			lvled2-used;
+			max-current-milliamp = /bits/ 8 <6>;
+		};
+
+		chan456 {
+			chan-name = "rgb";
+			lvled4-used;
+			lvled5-used;
+			lvled6-used;
+
+			max-current-milliamp = /bits/ 8 <5>;
+		};
+	};
+};
+
+lm3695@63 {
+	compatible = "ti,lm3695";
+	reg = <0x63>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lm3695-backlight", "ti,lmu-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+		};
+	};
+};
+
+lm3697@36 {
+	compatible = "ti,lm3697";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	pwms = <&pwm3943 1 10000>;
+	pwm-names = "lmu-backlight";
+
+	backlight {
+		compatible = "ti,lm3697-backlight", "ti,lmu-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+			hvled3-used;
+
+			max-current-milliamp = /bits/ 8 <20>;
+			initial-brightness = /bits/ 8 <10>;
+
+			ramp-up = <500>;
+			ramp-down = <500>;
+			pwm-period = <10000>;
+		};
+	};
+};
diff --git 
a/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt 
b/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
new file mode 100644
index 0000000..b06c4ee
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
@@ -0,0 +1,153 @@
+TI LMU backlight device tree bindings
+
+Required properties:
+  - compatible: Should be one of lists below.
+                "ti,lm3532-backlight"
+                "ti,lm3631-backlight"
+                "ti,lm3633-backlight"
+                "ti,lm3695-backlight"
+                "ti,lm3697-backlight"
+                And "ti,lmu-backlight" should be defined as a fallback 
entry.
+
+Optional properties: Only specified in PWM brightness control mode
+  - pwms: OF device-tree PWM specification.
+  - pwm-names: a list of names for the PWM devices specified in the "pwms"
+               property.
+  For the PWM user nodes, please refer to
+  Documentation/devicetree/bindings/pwm/pwm.txt.
+
+Sub-nodes:
+  LMU backlight should have backlight device specifiers in each sub-node.
+  Each sub-node exactly matches with backlight control bank configuration.
+  Maximum numbers of sub-nodes depend on the device.
+  1 = LM3631, LM3695
+  2 = LM3633, LM3697
+  3 = LM3532
+
+  Required properties of sub-node:
+  - hvled1-used, hvled2-used, hvled3-used: Backlight string 
configuration about
+                                           which backlight string is used.
+
+  Optional properties of sub-node:
+  - backlight-name: Name string for backlight device identification
+  - max-current-milliamp: Max current setting. Type is <u8>. Unit is mA.
+                          Range is from 5 to 30mA.
+  - initial-brightness: Backlight initial brightness. Type is <u32>.
+                        0 ~ 2047 = LM3631, LM3633, LM3695 and LM3697
+                        0 ~ 255  = LM3532
+  - ramp-up: Light effect for ramp up rate. Type is <u32>. Unit is msec.
+  - ramp-down: Light effect for ramp down rate. Type is <u32>. Unit is 
msec.
+               Range of ramp up and down for each device.
+               0 ~ 65 msec    = LM3532
+               0 ~ 4000 msec  = LM3631
+               0 ~ 16000 msec = LM3633 and LM3697
+  - pwm-period: PWM period. Only valid in PWM brightness mode. Type is 
<u32>.
+
+LMU backlight is represented as a sub-node of the TI LMU device.
+Please refer to 
"ti,lm3532"/"ti,lm3631"/"ti,lm3633"/"ti,lm3695"/"ti,lm3697" in
+Documentation/devicetree/bindings/mfd/ti-lmu.txt
+
+Examples:
+
+lm3532@38 {
+	compatible = "ti,lm3532";
+	reg = <0x38>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lm3532-backlight", "ti,lmu-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+			hvled3-used;
+
+			max-current-milliamp = /bits/ 8 <20>;
+		};
+	};
+};
+
+lm3631@29 {
+	compatible = "ti,lm3631";
+	reg = <0x29>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lm3631-backlight", "ti,lmu-backlight";
+
+		lcd_bl {
+			hvled1-used;
+			hvled2-used;
+			ramp-up = <100>;
+		};
+	};
+};
+
+lm3633@36 {
+	compatible = "ti,lm3633";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lm3633-backlight", "ti,lmu-backlight";
+
+		main {
+			backlight-name = "main_lcd";
+			hvled2-used;
+			hvled3-used;
+			max-current-milliamp = /bits/ 8 <20>;
+		};
+
+		front {
+			backlight-name = "front_lcd";
+			hvled1-used;
+			max-current-milliamp = /bits/ 8 <10>;
+		};
+	};
+};
+
+lm3695@63 {
+	compatible = "ti,lm3695";
+	reg = <0x63>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lm3695-backlight", "ti,lmu-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+		};
+	};
+};
+
+lm3697@36 {
+	compatible = "ti,lm3697";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	pwms = <&pwm3943 1 10000>;
+	pwm-names = "lmu-backlight";
+
+	backlight {
+		compatible = "ti,lm3697-backlight", "ti,lmu-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+			hvled3-used;
+
+			max-current-milliamp = /bits/ 8 <20>;
+			initial-brightness = /bits/ 8 <10>;
+
+			ramp-up = <500>;
+			ramp-down = <500>;
+			pwm-period = <10000>;
+		};
+	};
+};
-- 
1.7.9.5

Best regards,
Milo



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 10/10] Documentation: Add device tree bindings for TI LMU devices
@ 2014-02-17  7:15     ` Milo Kim
  0 siblings, 0 replies; 11+ messages in thread
From: Milo Kim @ 2014-02-17  7:15 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Lee Jones, Jingoo Han, Bryan Wu, Mark Brown,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Samuel Ortiz

Hello Mark,

Thanks for your detailed comments.
I've fixed the structure and description.
I'd like to have your feedback before submitting new patch-set.


 From 33faeeed69fa064cd476b252c5a7326a541e12b3 Mon Sep 17 00:00:00 2001
From: Milo Kim <milo.kim-l0cyMroinI0@public.gmane.org>
Date: Mon, 17 Feb 2014 14:32:39 +0900
Subject: [PATCH 1/2] Documentation: TI LMU DT fix based on Maintainer's
  feedback


Signed-off-by: Milo Kim <milo.kim-l0cyMroinI0@public.gmane.org>
---
  .../devicetree/bindings/leds/leds-lm3633.txt       |   47 +++++
  Documentation/devicetree/bindings/mfd/ti-lmu.txt   |  200 
++++++++++++++++++++
  .../bindings/video/backlight/ti-lmu-backlight.txt  |  153 +++++++++++++++
  3 files changed, 400 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/leds/leds-lm3633.txt
  create mode 100644 Documentation/devicetree/bindings/mfd/ti-lmu.txt
  create mode 100644 
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt

diff --git a/Documentation/devicetree/bindings/leds/leds-lm3633.txt 
b/Documentation/devicetree/bindings/leds/leds-lm3633.txt
new file mode 100644
index 0000000..10546cc
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-lm3633.txt
@@ -0,0 +1,47 @@
+TI LMU LM3633 LED device tree bindings
+
+Required properties:
+  - compatible: "ti,lm3633-leds"
+
+Sub-nodes:
+  Maximum 6 LED channels can be configured in each sub-node.
+
+  Required properties of sub-node:
+  - lvled1-used, lvled2-used, lvled3-used, lvled4-used, lvled5-used, 
lvled6-used
+    : LED string configuration about which LED string is used.
+
+  Optional properties of sub-node:
+  - channel-name: Name string for LED channel identification
+  - max-current-milliamp: Max current setting. Type is <u8>. Unit is mA.
+                          Range is from 5 to 30 mA.
+
+LM3633 LED is represented as a sub-node of the "ti,lm3633" device.
+Please refer to "ti,lm3633" in 
Documentation/devicetree/bindings/mfd/ti-lmu.txt
+
+Example:
+
+lm3633@36 {
+	compatible = "ti,lm3633";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	leds {
+		compatible = "ti,lm3633-leds";
+
+		chan2 {
+			channel-name = "status";
+			lvled2-used;
+			max-current-milliamp = /bits/ 8 <6>;
+		};
+
+		chan456 {
+			channel-name = "rgb";
+			lvled4-used;
+			lvled5-used;
+			lvled6-used;
+
+			max-current-milliamp = /bits/ 8 <5>;
+		};
+	};
+};
diff --git a/Documentation/devicetree/bindings/mfd/ti-lmu.txt 
b/Documentation/devicetree/bindings/mfd/ti-lmu.txt
new file mode 100644
index 0000000..5e21ce9
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/ti-lmu.txt
@@ -0,0 +1,200 @@
+TI LMU(Lighting Management Unit) device tree bindings
+
+TI LMU driver supports lighting devices belows.
+
+   Name        Device tree properties
+  ------      ------------------------
+  LM3532       Backlight
+  LM3631       Backlight and regulator
+  LM3633       Backlight and LED
+  LM3695       Backlight
+  LM3697       Backlight
+
+Those have shared device tree properties.
+
+Required properties:
+  - compatible: Should be one of lists below.
+                "ti,lm3532"
+                "ti,lm3631"
+                "ti,lm3633"
+                "ti,lm3695"
+                "ti,lm3697"
+  - reg: I2C slave address.
+         0x38 is LM3532
+         0x29 is LM3631
+         0x36 is LM3633, LM3697
+         0x63 is LM3695
+  - ti,enable-gpio: GPIOs about hardware enable pin
+
+Sub-nodes:
+  Required sub-node:
+    - backlight: Every TI LMU device has backlight sub-nodes. Please 
refer to
+ 
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
+
+  Optional sub-node:
+    - regulators: Only for LM3631. Please refer to
+ 
Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
+    - leds: Only for LM3633. Please refer to
+            Documentation/devicetree/bindings/leds/leds-lm3633.txt
+
+Examples:
+
+lm3532@38 {
+	compatible = "ti,lm3532";
+	reg = <0x38>;
+
+	/* GPIO134 for HWEN pin */
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lm3532-backlight", "ti,lmu-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+			hvled3-used;
+
+			max-current-milliamp = /bits/ 8 <20>;
+		};
+	};
+};
+
+lm3631@29 {
+	compatible = "ti,lm3631";
+	reg = <0x29>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	regulators {
+		compatible = "ti,lm3631-regulator";
+
+		vboost {
+			regulator-name = "lcd_boost";
+			regulator-min-microvolt = <4500000>;
+			regulator-max-microvolt = <6350000>;
+			regulator-always-on;
+		};
+
+		vcont {
+			regulator-name = "lcd_vcont";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <3300000>;
+		};
+
+		voref {
+			regulator-name = "lcd_voref";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+		};
+
+		vpos {
+			regulator-name = "lcd_vpos";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+			regulator-boot-on;
+		};
+
+		vneg {
+			regulator-name = "lcd_vneg";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+			regulator-boot-on;
+		};
+	};
+
+	backlight {
+		compatible = "ti,lm3631-backlight", "ti,lmu-backlight";
+
+		lcd_bl {
+			hvled1-used;
+			hvled2-used;
+			ramp-up = <100>;
+		};
+	};
+};
+
+lm3633@36 {
+	compatible = "ti,lm3633";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lm3633-backlight", "ti,lmu-backlight";
+
+		main {
+			bl-name = "main_lcd";
+			hvled2-used;
+			hvled3-used;
+			max-current-milliamp = /bits/ 8 <20>;
+		};
+
+		front {
+			bl-name = "front_lcd";
+			hvled1-used;
+			max-current-milliamp = /bits/ 8 <10>;
+		};
+	};
+
+	leds {
+		compatible = "ti,lm3633-leds";
+
+		chan2 {
+			chan-name = "status";
+			lvled2-used;
+			max-current-milliamp = /bits/ 8 <6>;
+		};
+
+		chan456 {
+			chan-name = "rgb";
+			lvled4-used;
+			lvled5-used;
+			lvled6-used;
+
+			max-current-milliamp = /bits/ 8 <5>;
+		};
+	};
+};
+
+lm3695@63 {
+	compatible = "ti,lm3695";
+	reg = <0x63>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lm3695-backlight", "ti,lmu-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+		};
+	};
+};
+
+lm3697@36 {
+	compatible = "ti,lm3697";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	pwms = <&pwm3943 1 10000>;
+	pwm-names = "lmu-backlight";
+
+	backlight {
+		compatible = "ti,lm3697-backlight", "ti,lmu-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+			hvled3-used;
+
+			max-current-milliamp = /bits/ 8 <20>;
+			initial-brightness = /bits/ 8 <10>;
+
+			ramp-up = <500>;
+			ramp-down = <500>;
+			pwm-period = <10000>;
+		};
+	};
+};
diff --git 
a/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt 
b/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
new file mode 100644
index 0000000..b06c4ee
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt
@@ -0,0 +1,153 @@
+TI LMU backlight device tree bindings
+
+Required properties:
+  - compatible: Should be one of lists below.
+                "ti,lm3532-backlight"
+                "ti,lm3631-backlight"
+                "ti,lm3633-backlight"
+                "ti,lm3695-backlight"
+                "ti,lm3697-backlight"
+                And "ti,lmu-backlight" should be defined as a fallback 
entry.
+
+Optional properties: Only specified in PWM brightness control mode
+  - pwms: OF device-tree PWM specification.
+  - pwm-names: a list of names for the PWM devices specified in the "pwms"
+               property.
+  For the PWM user nodes, please refer to
+  Documentation/devicetree/bindings/pwm/pwm.txt.
+
+Sub-nodes:
+  LMU backlight should have backlight device specifiers in each sub-node.
+  Each sub-node exactly matches with backlight control bank configuration.
+  Maximum numbers of sub-nodes depend on the device.
+  1 = LM3631, LM3695
+  2 = LM3633, LM3697
+  3 = LM3532
+
+  Required properties of sub-node:
+  - hvled1-used, hvled2-used, hvled3-used: Backlight string 
configuration about
+                                           which backlight string is used.
+
+  Optional properties of sub-node:
+  - backlight-name: Name string for backlight device identification
+  - max-current-milliamp: Max current setting. Type is <u8>. Unit is mA.
+                          Range is from 5 to 30mA.
+  - initial-brightness: Backlight initial brightness. Type is <u32>.
+                        0 ~ 2047 = LM3631, LM3633, LM3695 and LM3697
+                        0 ~ 255  = LM3532
+  - ramp-up: Light effect for ramp up rate. Type is <u32>. Unit is msec.
+  - ramp-down: Light effect for ramp down rate. Type is <u32>. Unit is 
msec.
+               Range of ramp up and down for each device.
+               0 ~ 65 msec    = LM3532
+               0 ~ 4000 msec  = LM3631
+               0 ~ 16000 msec = LM3633 and LM3697
+  - pwm-period: PWM period. Only valid in PWM brightness mode. Type is 
<u32>.
+
+LMU backlight is represented as a sub-node of the TI LMU device.
+Please refer to 
"ti,lm3532"/"ti,lm3631"/"ti,lm3633"/"ti,lm3695"/"ti,lm3697" in
+Documentation/devicetree/bindings/mfd/ti-lmu.txt
+
+Examples:
+
+lm3532@38 {
+	compatible = "ti,lm3532";
+	reg = <0x38>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lm3532-backlight", "ti,lmu-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+			hvled3-used;
+
+			max-current-milliamp = /bits/ 8 <20>;
+		};
+	};
+};
+
+lm3631@29 {
+	compatible = "ti,lm3631";
+	reg = <0x29>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lm3631-backlight", "ti,lmu-backlight";
+
+		lcd_bl {
+			hvled1-used;
+			hvled2-used;
+			ramp-up = <100>;
+		};
+	};
+};
+
+lm3633@36 {
+	compatible = "ti,lm3633";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lm3633-backlight", "ti,lmu-backlight";
+
+		main {
+			backlight-name = "main_lcd";
+			hvled2-used;
+			hvled3-used;
+			max-current-milliamp = /bits/ 8 <20>;
+		};
+
+		front {
+			backlight-name = "front_lcd";
+			hvled1-used;
+			max-current-milliamp = /bits/ 8 <10>;
+		};
+	};
+};
+
+lm3695@63 {
+	compatible = "ti,lm3695";
+	reg = <0x63>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	backlight {
+		compatible = "ti,lm3695-backlight", "ti,lmu-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+		};
+	};
+};
+
+lm3697@36 {
+	compatible = "ti,lm3697";
+	reg = <0x36>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	pwms = <&pwm3943 1 10000>;
+	pwm-names = "lmu-backlight";
+
+	backlight {
+		compatible = "ti,lm3697-backlight", "ti,lmu-backlight";
+
+		lcd {
+			hvled1-used;
+			hvled2-used;
+			hvled3-used;
+
+			max-current-milliamp = /bits/ 8 <20>;
+			initial-brightness = /bits/ 8 <10>;
+
+			ramp-up = <500>;
+			ramp-down = <500>;
+			pwm-period = <10000>;
+		};
+	};
+};
-- 
1.7.9.5

Best regards,
Milo


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 10/10] Documentation: Add device tree bindings for TI LMU devices
  2014-02-14 20:50 ` Mark Brown
@ 2014-02-17  7:15     ` Milo Kim
  0 siblings, 0 replies; 11+ messages in thread
From: Milo Kim @ 2014-02-17  7:15 UTC (permalink / raw)
  To: Mark Brown
  Cc: Lee Jones, Jingoo Han, Bryan Wu, linux-kernel, devicetree, Samuel Ortiz

Hi Mark,

On 02/15/2014 05:50 AM, Mark Brown wrote:
> On Fri, Feb 14, 2014 at 03:32:44PM +0900, Milo Kim wrote:
>> Bindings for TI LMU, backlight, LM3631 regulator and LM3633 LED are added.
>
> Ah, sorry - I didn't notice that there were several different binding
> documents in the patch.
>
>> @@ -0,0 +1,49 @@
>> +TI LMU LM3631 regulator device tree bindings
>> +
>> +Required properties:
>> +  - compatible: "ti,lm3631-regulator"
>> +
>> +Optional properties:
>> +  - regulator-name
>> +  - regulator-min-microvolt
>> +  - regulator-max-microvolt
>> +  - regulator-always-on
>> +  - regulator-boot-on
>> +
>> +  For those properties, please refer to:
>> +  Documentation/devicetree/bindings/regulator/regulator.txt
>
> This doesn't correspond to the example which says that there is an
> optional property "regulators" which can contain regualators lcd_boost,
> lcd_vpos and lcd_vneg.  It's also better to not enumerate all the
> standard properties but just refer to the generic document (as you do).
> That avoids confusion if new properties are added to the generic
> regulator bindings.
>
> The actual binding is fine, it's just the way it's documented.

Thank you. I've fixed things based on your comments.
Could you check the description below?
I'd like to get your feedback before sending patch-set v2.


 From f0dcb9d8b21d38a6764c2e43cde4b41da3078c23 Mon Sep 17 00:00:00 2001
From: Milo Kim <milo.kim@ti.com>
Date: Mon, 17 Feb 2014 14:33:15 +0900
Subject: [PATCH 2/2] Documentation: fix LM3631 regulator DT based on
  maintainer's feedback

Signed-off-by: Milo Kim <milo.kim@ti.com>
---
  .../bindings/regulator/lm3631-regulator.txt        |   63 
++++++++++++++++++++
  1 file changed, 63 insertions(+)
  create mode 100644 
Documentation/devicetree/bindings/regulator/lm3631-regulator.txt

diff --git 
a/Documentation/devicetree/bindings/regulator/lm3631-regulator.txt 
b/Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
new file mode 100644
index 0000000..272cdc1
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
@@ -0,0 +1,63 @@
+TI LMU LM3631 regulator device tree bindings
+
+Required properties:
+  - compatible: "ti,lm3631-regulator"
+
+Sub-nodes:
+  - vboost
+  - vcont
+  - voref
+  - vpos
+  - vneg
+
+  Optional properties of each node:
+  Please refer to Documentation/devicetree/bindings/regulator/regulator.txt
+
+LM3631 regulator is represented as a sub-node of the "ti,lm3631" device.
+Please refer to "ti,lm3631" in 
Documentation/devicetree/bindings/mfd/ti-lmu.txt
+
+Example:
+
+lm3631@29 {
+	compatible = "ti,lm3631";
+	reg = <0x29>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	regulators {
+		compatible = "ti,lm3631-regulator";
+
+		vboost {
+			regulator-name = "lcd_boost";
+			regulator-min-microvolt = <4500000>;
+			regulator-max-microvolt = <6350000>;
+			regulator-always-on;
+		};
+
+		vcont {
+			regulator-name = "lcd_vcont";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <3300000>;
+		};
+
+		voref {
+			regulator-name = "lcd_voref";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+		};
+
+		vpos {
+			regulator-name = "lcd_vpos";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+			regulator-boot-on;
+		};
+
+		vneg {
+			regulator-name = "lcd_vneg";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+			regulator-boot-on;
+		};
+	};
+};
-- 
1.7.9.5


Best regards,
Milo



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 10/10] Documentation: Add device tree bindings for TI LMU devices
@ 2014-02-17  7:15     ` Milo Kim
  0 siblings, 0 replies; 11+ messages in thread
From: Milo Kim @ 2014-02-17  7:15 UTC (permalink / raw)
  To: Mark Brown
  Cc: Lee Jones, Jingoo Han, Bryan Wu, linux-kernel, devicetree, Samuel Ortiz

Hi Mark,

On 02/15/2014 05:50 AM, Mark Brown wrote:
> On Fri, Feb 14, 2014 at 03:32:44PM +0900, Milo Kim wrote:
>> Bindings for TI LMU, backlight, LM3631 regulator and LM3633 LED are added.
>
> Ah, sorry - I didn't notice that there were several different binding
> documents in the patch.
>
>> @@ -0,0 +1,49 @@
>> +TI LMU LM3631 regulator device tree bindings
>> +
>> +Required properties:
>> +  - compatible: "ti,lm3631-regulator"
>> +
>> +Optional properties:
>> +  - regulator-name
>> +  - regulator-min-microvolt
>> +  - regulator-max-microvolt
>> +  - regulator-always-on
>> +  - regulator-boot-on
>> +
>> +  For those properties, please refer to:
>> +  Documentation/devicetree/bindings/regulator/regulator.txt
>
> This doesn't correspond to the example which says that there is an
> optional property "regulators" which can contain regualators lcd_boost,
> lcd_vpos and lcd_vneg.  It's also better to not enumerate all the
> standard properties but just refer to the generic document (as you do).
> That avoids confusion if new properties are added to the generic
> regulator bindings.
>
> The actual binding is fine, it's just the way it's documented.

Thank you. I've fixed things based on your comments.
Could you check the description below?
I'd like to get your feedback before sending patch-set v2.


 From f0dcb9d8b21d38a6764c2e43cde4b41da3078c23 Mon Sep 17 00:00:00 2001
From: Milo Kim <milo.kim@ti.com>
Date: Mon, 17 Feb 2014 14:33:15 +0900
Subject: [PATCH 2/2] Documentation: fix LM3631 regulator DT based on
  maintainer's feedback

Signed-off-by: Milo Kim <milo.kim@ti.com>
---
  .../bindings/regulator/lm3631-regulator.txt        |   63 
++++++++++++++++++++
  1 file changed, 63 insertions(+)
  create mode 100644 
Documentation/devicetree/bindings/regulator/lm3631-regulator.txt

diff --git 
a/Documentation/devicetree/bindings/regulator/lm3631-regulator.txt 
b/Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
new file mode 100644
index 0000000..272cdc1
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
@@ -0,0 +1,63 @@
+TI LMU LM3631 regulator device tree bindings
+
+Required properties:
+  - compatible: "ti,lm3631-regulator"
+
+Sub-nodes:
+  - vboost
+  - vcont
+  - voref
+  - vpos
+  - vneg
+
+  Optional properties of each node:
+  Please refer to Documentation/devicetree/bindings/regulator/regulator.txt
+
+LM3631 regulator is represented as a sub-node of the "ti,lm3631" device.
+Please refer to "ti,lm3631" in 
Documentation/devicetree/bindings/mfd/ti-lmu.txt
+
+Example:
+
+lm3631@29 {
+	compatible = "ti,lm3631";
+	reg = <0x29>;
+
+	ti,enable-gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
+
+	regulators {
+		compatible = "ti,lm3631-regulator";
+
+		vboost {
+			regulator-name = "lcd_boost";
+			regulator-min-microvolt = <4500000>;
+			regulator-max-microvolt = <6350000>;
+			regulator-always-on;
+		};
+
+		vcont {
+			regulator-name = "lcd_vcont";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <3300000>;
+		};
+
+		voref {
+			regulator-name = "lcd_voref";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+		};
+
+		vpos {
+			regulator-name = "lcd_vpos";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+			regulator-boot-on;
+		};
+
+		vneg {
+			regulator-name = "lcd_vneg";
+			regulator-min-microvolt = <4000000>;
+			regulator-max-microvolt = <6000000>;
+			regulator-boot-on;
+		};
+	};
+};
-- 
1.7.9.5


Best regards,
Milo

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 10/10] Documentation: Add device tree bindings for TI LMU devices
  2014-02-17  7:15     ` Milo Kim
  (?)
@ 2014-02-18  1:50     ` Mark Brown
  -1 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2014-02-18  1:50 UTC (permalink / raw)
  To: Milo Kim
  Cc: Lee Jones, Jingoo Han, Bryan Wu, linux-kernel, devicetree, Samuel Ortiz

[-- Attachment #1: Type: text/plain, Size: 237 bytes --]

On Mon, Feb 17, 2014 at 04:15:41PM +0900, Milo Kim wrote:

> Thank you. I've fixed things based on your comments.
> Could you check the description below?
> I'd like to get your feedback before sending patch-set v2.

Yes, this looks OK.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-02-18  2:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-14  6:32 [PATCH 10/10] Documentation: Add device tree bindings for TI LMU devices Milo Kim
2014-02-14  6:32 ` Milo Kim
2014-02-14 10:06 ` Mark Rutland
2014-02-14 10:06   ` Mark Rutland
2014-02-17  7:15   ` Milo Kim
2014-02-17  7:15     ` Milo Kim
2014-02-14 20:44 ` Mark Brown
2014-02-14 20:50 ` Mark Brown
2014-02-17  7:15   ` Milo Kim
2014-02-17  7:15     ` Milo Kim
2014-02-18  1:50     ` Mark Brown

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.