Documentation: Add device tree bindings for TI LMU devices
Subsystems (4)
PATCH 10/10 Documentation: Add device tree bindings for TI LMU devices
Bindings for TI LMU, backlight, LM3631 regulator and LM3633 LED are added.
--- .../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
Documentation/devicetree/bindings/leds/leds-lm3633.txt new file +39 -0
@@ -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>; + }; + }; +};
Documentation/devicetree/bindings/mfd/ti-lmu.txt new file +182 -0
182 lines not on this page · raw message
Documentation/devicetree/bindings/regulator/lm3631-regulator.txt new file +49 -0
49 lines not on this page · raw message
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt new file +127 -0
127 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Quoted 26 lines · Milo Kim
Bindings for TI LMU, backlight, LM3631 regulator and LM3633 LED are added.
Cc Bryan Wu <[email protected]>Cc Jingoo Han <[email protected]>Cc Lee Jones <[email protected]>Cc Mark Brown <[email protected]>Cc Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/[email protected]>Signed-off-by Milo Kim <[email protected]>--- .../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.txtDocumentation/devicetree/bindings/leds/leds-lm3633.txt new file +0
-0
Documentation/devicetree/bindings/leds/leds-lm3633.txt line 7
Quoted 7 lines
Documentation/devicetree/bindings/leds/leds-lm3633.txt new file +7
-0@@ -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.
Documentation/devicetree/bindings/leds/leds-lm3633.txt line 10
Quoted 3 lines
Documentation/devicetree/bindings/leds/leds-lm3633.txt new file +3
-0+ +Optional properties: + - chan-name: LED channel name
Any reason to abbreviate "channel" to "chan"?
What's this for?
Documentation/devicetree/bindings/leds/leds-lm3633.txt line 11
Quoted 1 line
Documentation/devicetree/bindings/leds/leds-lm3633.txt new file +1
-0+ - 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.
Documentation/devicetree/bindings/leds/leds-lm3633.txt line 16
Quoted 5 lines
Documentation/devicetree/bindings/leds/leds-lm3633.txt new file +5
-0+ +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.
[...]
Quoted 12 lines
Documentation/devicetree/bindings/mfd/ti-lmu.txt new file +6
-0@@ -0,0 +1,182 @@ +TI LMU(Lighting Management Unit) device tree bindings + +TI LMU driver supports lighting devices belows. + + Name Device tree properties + ------ ------------------------
Documentation/devicetree/bindings/mfd/ti-lmu.txt line 16
Quoted 10 lines
Documentation/devicetree/bindings/mfd/ti-lmu.txt new file +10
-0+ 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?
Documentation/devicetree/bindings/mfd/ti-lmu.txt line 22
Quoted 6 lines
Documentation/devicetree/bindings/mfd/ti-lmu.txt new file +6
-0+ - 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...
Documentation/devicetree/bindings/mfd/ti-lmu.txt line 31
Quoted 9 lines
Documentation/devicetree/bindings/mfd/ti-lmu.txt new file +9
-0+ +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?
Documentation/devicetree/bindings/mfd/ti-lmu.txt line 43
Quoted 12 lines
Documentation/devicetree/bindings/mfd/ti-lmu.txt new file +12
-0+ +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.
[...]
Quoted 6 lines
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt new file +0
-0
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt line 9
Quoted 9 lines
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt new file +9
-0@@ -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?
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt line 15
Quoted 6 lines
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt new file +6
-0+ - 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.
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt line 16
Quoted 1 line
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt new file +1
-0+ - max-current-milliamp: Max current setting. Unit is mA.
Type?
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt line 17
Quoted 1 line
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt new file +1
-0+ - initial-brightness: Backlight initial brightness
Type? Units?
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt line 20
Quoted 3 lines
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt new file +3
-0+ - 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?
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt line 21
Quoted 1 line
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt new file +1
-0+ - 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Mark Brown
maintainerQuoted 1 line · Milo Kim
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.
Mark Brown
maintainerQuoted 1 line · Milo Kim
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.
Quoted 5 lines
Documentation/devicetree/bindings/regulator/lm3631-regulator.txt new file +4
-0@@ -0,0 +1,49 @@ +TI LMU LM3631 regulator device tree bindings + +Required properties: + - compatible: "ti,lm3631-regulator"
Documentation/devicetree/bindings/regulator/lm3631-regulator.txt line 14
Quoted 10 lines
Documentation/devicetree/bindings/regulator/lm3631-regulator.txt new file +10
-0+ +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.
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 <[email protected]>
Date: Mon, 17 Feb 2014 14:32:39 +0900
Subject: [PATCH 1/2] Documentation: TI LMU DT fix based on Maintainer's
feedback
--- .../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
Documentation/devicetree/bindings/leds/leds-lm3633.txt new file +47 -0
@@ -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>; + }; + }; +};
Documentation/devicetree/bindings/mfd/ti-lmu.txt new file +200 -0
200 lines not on this page · raw message
Documentation/devicetree/bindings/video/backlight/ti-lmu-backlight.txt new file +153 -0
153 lines not on this page · raw message
Signature · 10 lines
1.7.9.5 Best regards, Milo -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Mark,
Quoted 29 lines · Mark Brown
Quoted 1 line · Milo Kim
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.
Quoted 5 lines
(quoted diff) +4
-0@@ -0,0 +1,49 @@ +TI LMU LM3631 regulator device tree bindings + +Required properties: + - compatible: "ti,lm3631-regulator"Review line 14
Quoted 10 lines
(quoted diff) +10
-0+ +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.txtThis doesn't correspond to the example which says that there is an optional property "regulators" which can contain regualators
lcd_boost,lcd_vposandlcd_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.
Quoted 1 line
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 <[email protected]>
Date: Mon, 17 Feb 2014 14:33:15 +0900
Subject: [PATCH 2/2] Documentation: fix LM3631 regulator DT based on
maintainer's feedback
--- .../bindings/regulator/lm3631-regulator.txt | 63 ++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644
Documentation/devicetree/bindings/regulator/lm3631-regulator.txt
Documentation/devicetree/bindings/regulator/lm3631-regulator.txt new file +63 -0
@@ -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; + }; + }; +};
Signature · 5 lines
1.7.9.5 Best regards, Milo
Mark Brown
maintainerQuoted 3 lines · Milo Kim
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.