[1/2] dt-bindings: himax,hx8837: add HiMax HX8837 bindings

Message ID 20181008202321.128937-1-lkundrak@v3.sk
State Not Applicable
Headers show
Series
  • [1/2] dt-bindings: himax,hx8837: add HiMax HX8837 bindings
Related show

Commit Message

Lubomir Rintel Oct. 8, 2018, 8:23 p.m.
HiMax HX8837 is a display controller used on OLPC platforms.
It controlls backlight and is able to capture and freeze a frame when
the LCD controller (and the rest of the plaform) is powered off.

What is missing here is the description of connections to the LCD
controller and the panel. Maybe it would be a good idea to plug in it
betweend the two in a manner described in
<Documentation/devicetree/bindings/graph.txt>.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
Changes since v1:
- s/load-gpio/load-gpios/
- Use interrupt bindings instead of gpio for the IRQ

 .../devicetree/bindings/misc/himax,hx8837.txt  | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/himax,hx8837.txt

Comments

Rob Herring Oct. 17, 2018, 2:07 p.m. | #1
On Mon,  8 Oct 2018 22:23:21 +0200, Lubomir Rintel wrote:
> HiMax HX8837 is a display controller used on OLPC platforms. It controlls
> backlight and is able to capture and freeze a frame when the LCD controller
> (and the rest of the plaform) is powered off.
> 
> This driver is based on the same code as drivers/staging/olpc_dcon.
> I modernized it to use managed GPIO, device-tree bindings, sysfs attribtue
> groups, essentially fixing the staging driver's TODO.
> 
> Why I am not removing the staging driver now is because I've hobbled off
> some functionality too (with an intent to bring add it back eventually):
> 
> * I've removed parts that talk directly to the OLPC EC to turn off/on the
>   power. A separate patch will make the EC expose a regulator interface
>   that should be used instead.
> 
> * Some work is likely needed to make XO 1 and XO 1.5 work. Both platforms
>   are DT-based and could use the same bindings, but I haven't checked
>   whether the cs5535 and vx855 GPIO drivers are good enough.
> 
> What is there is the backlight control and the sysfs attributes to control
> the freeze/unfreeze..
> 
> I've also renamed the driver to use the actual chip name instead of the
> original name that I found too generic. This way the staging driver can be
> used on XO 1 and XO 1.5 for the time being, while my XO 1.75 can utilize
> this one.
> 
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> ---
> Changes since v1:
> - Use interrupt bindings instead of gpio for the IRQ
> - Update the statement on XO 1/1.5 support in the commit message
> 
>  drivers/misc/Kconfig  |  16 +
>  drivers/misc/Makefile |   1 +
>  drivers/misc/hx8837.c | 741 ++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 758 insertions(+)
>  create mode 100644 drivers/misc/hx8837.c
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Pavel Machek Nov. 5, 2018, 9:19 a.m. | #2
On Mon 2018-10-08 22:23:20, Lubomir Rintel wrote:
> HiMax HX8837 is a display controller used on OLPC platforms.
> It controlls backlight and is able to capture and freeze a frame when
> the LCD controller (and the rest of the plaform) is powered off.
> 
> What is missing here is the description of connections to the LCD
> controller and the panel. Maybe it would be a good idea to plug in it
> betweend the two in a manner described in

"between"

> <Documentation/devicetree/bindings/graph.txt>.

Acked-by: Pavel Machek <pavel@ucw.cz>
									Pavel

Patch

diff --git a/Documentation/devicetree/bindings/misc/himax,hx8837.txt b/Documentation/devicetree/bindings/misc/himax,hx8837.txt
new file mode 100644
index 000000000000..d0822c679ae8
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/himax,hx8837.txt
@@ -0,0 +1,18 @@ 
+HX8837 Display Controller
+
+Required properties:
+- compatible: Should be "himax,hx8837".
+- reg: I2C address, must be 0x0d
+- stat-gpios: gpio specifier of DCON_STAT0 and DCON_STAT1 pins (active high)
+- load-gpios: gpio specifier of DCON_LOAD pin (active high)
+- interrupt: interrupt specifier of DCON_IRQ pin (edge falling)
+
+Example:
+	dcon@d {
+		compatible = "himax,hx8837";
+		reg = <0x0d>;
+		stat-gpios = <&gpio 100 GPIO_ACTIVE_HIGH
+			      &gpio 101 GPIO_ACTIVE_HIGH>;
+		load-gpios = <&gpio 142 GPIO_ACTIVE_HIGH>;
+		interrupts = <&gpio 124 IRQ_TYPE_EDGE_FALLING>;
+	};