Skip to contentSkip to conversation

Adding DT support to video/da8xx-fb.c

RFC Superseded Darren Etheridge 2 participants 3 messages Aug 22, 2013 – Aug 23, 2013

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Adding DT support to video/da8xx-fb.c

This is part of a larger series of patches to upgrade the da8xx-fb.c driver to support the Texas Instruments AM335x device. As part of this upgrade we also want to add devicetree support for both the original da8xx and the am335x. Tomi Valkeinen has reviewed the fbdev changes but he suggested that it was prudent to extract the dt pieces and run it through the devicetree mailing list for review.

v2: incorporates -
* review comment changes from Prabhakar Lad
* changes the .compatible naming to match that of the exiting drm driver for am335x devices.
* Renames the devicetree bindings documentation file to match the actual driver filename

Thanks,
Darren

Darren Etheridge (1):
video: da8xx-fb: adding dt support

 .../devicetree/bindings/video/da8xx-fb.txt         |   42 ++++++++++++
 drivers/video/da8xx-fb.c                           |   66 +++++++++++++++++++-
 2 files changed, 105 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/video/da8xx-fb.txt
#1 lore raw

PATCH 1/1 video: da8xx-fb: adding dt support

Enhancing driver to enable probe triggered by a corresponding dt entry.

Add da8xx-fb.txt documentation to devicetree section.

Obtain fb_videomode details for the connected lcd panel using the display timing details present in DT.

Ensure that platform data is present before checking whether platform callback is present (the one used to control backlight). So far this was not an issue as driver was purely non-DT triggered, but now DT support has been added this check must be performed.

v2: squashing multiple commits from Afzal Mohammed ([email protected])
v3: remove superfluous cast
v4: expose both ti,am3352-lcdc and ti,da830-lcdc for .compatible
as driver can use enhanced features of all version of the silicon block.
v5: addressed review comments from Prabhakar Lad
v6: Changed the .compatible naming to match the existing drm bindings
for am33xx devices

---
 .../devicetree/bindings/video/da8xx-fb.txt         |   42 ++++++++++++
 drivers/video/da8xx-fb.c                           |   66 +++++++++++++++++++-
 2 files changed, 105 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/video/da8xx-fb.txt
Documentation/devicetree/bindings/video/da8xx-fb.txt new file +42 -0
new file mode 100644
index 0000000..575bb4b
@@ -0,0 +1,42 @@
+TI LCD Controller on DA830/DA850/AM335x SoC's
+
+Required properties:
+- compatible:
+	DA830 - "ti,da8xx-tilcdc"
+	AM335x SoC's - "ti,am33xx-tilcdc"
+- reg: Address range of lcdc register set
+- interrupts: lcdc interrupt
+- display-timings: typical videomode of lcd panel, represented as child.
+  Refer Documentation/devicetree/bindings/video/display-timing.txt for
+  display timing binding details. If multiple videomodes are mentioned
+  in display timings node, typical videomode has to be mentioned as the
+  native mode or it has to be first child (driver cares only for native
+  videomode).
+
+Recommended properties:
+- ti,hwmods: Name of the hwmod associated to the LCDC
+
+Example:
+
+lcdc@4830e000 {
+	compatible = "ti,am33xx-tilcdc";
+	reg =  <0x4830e000 0x1000>;
+	interrupts = <36>;
+	ti,hwmods = "lcdc";
+	status = "okay";
+	display-timings {
+		800x480p62 {
+			clock-frequency = <30000000>;
+			hactive = <800>;
+			vactive = <480>;
+			hfront-porch = <39>;
+			hback-porch = <39>;
+			hsync-len = <47>;
+			vback-porch = <29>;
+			vfront-porch = <13>;
+			vsync-len = <2>;
+			hsync-active = <1>;
+			vsync-active = <1>;
+		};
+	};
+};
drivers/video/da8xx-fb.c +63 -3

114 lines not on this page · raw message

Signature · 1 line
1.7.0.4
Acked-by on v1 1/1
#2 lore raw

Re: [PATCH] video: da8xx-fb: adding dt support

Hi Darren,

Thanks for the patch.

Quoted 34 lines · Darren Etheridge

Enhancing driver to enable probe triggered by a corresponding dt entry.

Add da8xx-fb.txt documentation to devicetree section.

Obtain fb_videomode details for the connected lcd panel using the display timing details present in DT.

Ensure that platform data is present before checking whether platform callback is present (the one used to control backlight). So far this was not an issue as driver was purely non-DT triggered, but now DT support has been added this check must be performed.

v2: squashing multiple commits from Afzal Mohammed ([email protected])
v3: remove superfluous cast
v4: expose both ti,am3352-lcdc and ti,da830-lcdc for .compatible
as driver can use enhanced features of all version of the silicon block.
v5: addressed review comments from Prabhakar Lad
v6: Changed the .compatible naming to match the existing drm bindings
for am33xx devices

---
 .../devicetree/bindings/video/da8xx-fb.txt         |   42 ++++++++++++
 drivers/video/da8xx-fb.c                           |   66 +++++++++++++++++++-
 2 files changed, 105 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/video/da8xx-fb.txt
Documentation/devicetree/bindings/video/da8xx-fb.txt new file +0 -0
new file mode 100644
index 0000000..575bb4b

Documentation/devicetree/bindings/video/da8xx-fb.txt line 6

Quoted 6 lines
Documentation/devicetree/bindings/video/da8xx-fb.txt new file +6 -0
@@ -0,0 +1,42 @@
+TI LCD Controller on DA830/DA850/AM335x SoC's
+
+Required properties:
+- compatible:
+       DA830 - "ti,da8xx-tilcdc"
+       AM335x SoC's - "ti,am33xx-tilcdc"

what about DA850 ?

Rest of the patch looks good, with that change you can add my,

Regards,
--Prabhakar Lad