Skip to contentSkip to conversation

dt-bindings: video: fbdev: add devicetree bindings for pxa3xx-gcu

PATCH In review Daniel Mack 3 participants 4 messages Jun 23, 2018 – Jul 3, 2018

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dt-bindings: video: fbdev: add devicetree bindings for pxa3xx-gcu

This patch adds the binding documentation for the pxa3xx gcu.

---
 .../bindings/display/marvell,pxa3xx-gcu.txt    | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt
Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt new file +18 -0
new file mode 100644
index 000000000000..d1b2302d0fd8
@@ -0,0 +1,18 @@
+PXA3xx GCU Controller
+---------------------
+
+Required properties:
+ - compatible : "marvell,pxa3xx-gcu"
+ - reg : should contain the register range (address and length).
+ - interrupts : GCU interrupt.
+ - clocks: phandle to input clocks
+
+Example for PXA3xx:
+
+	gcu@54000000 {
+		compatible = "marvell,pxa3xx-gcu";
+		reg = <0x54000000 0x1000>;
+		interrupts = <39>;
+		clocks = <&clks CLK_PXA300_GCU>;
+	};
+
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 video: fbdev: pxa3xx_gcu: add devicetree bindings

Add a device tree match table for this hardware graphics acceleration driver so it can be used by pxa3xx boards booted with a devicetree.

---
 drivers/video/fbdev/pxa3xx-gcu.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/video/fbdev/pxa3xx-gcu.c +10 -0
index 0955622a1227..3d987f4c06ad 100644
@@ -44,6 +44,7 @@
 #include <linux/clk.h>
 #include <linux/fs.h>
 #include <linux/io.h>
+#include <linux/of.h>
 
 #include "pxa3xx-gcu.h"
 
@@ -703,11 +704,20 @@ static int pxa3xx_gcu_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static const struct of_device_id pxa3xx_gcu_of_match[] = {
+	{ .compatible = "marvell,pxa3xx-gcu", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, pxa3xx_gcu_of_match);
+#endif
+
 static struct platform_driver pxa3xx_gcu_driver = {
 	.probe	  = pxa3xx_gcu_probe,
 	.remove	 = pxa3xx_gcu_remove,
 	.driver	 = {
 		.name   = DRV_NAME,
+		.of_match_table = of_match_ptr(pxa3xx_gcu_of_match),
 	},
 };
 
Signature · 1 line
2.17.1
maintainer
#3 lore raw
In reply to Daniel Mack
Quoted 1 line · Daniel Mack

This patch adds the binding documentation for the pxa3xx gcu.

The subject should match the bindings hierarchy, not what driver subsystem you are currently using.

Quoted 13 lines
---
 .../bindings/display/marvell,pxa3xx-gcu.txt    | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt
Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt new file +0 -0
new file mode 100644
index 000000000000..d1b2302d0fd8

Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt line 5

Quoted 5 lines
Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt new file +5 -0
@@ -0,0 +1,18 @@
+PXA3xx GCU Controller
+---------------------
+
+Required properties:
+ - compatible : "marvell,pxa3xx-gcu"

Don't use wildcards in compatible strings.

Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt line 8

Quoted 3 lines
Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt new file +3 -0
+ - reg : should contain the register range (address and length).
+ - interrupts : GCU interrupt.
+ - clocks: phandle to input clocks

Be specific as to how many.

Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt line 12

Quoted 4 lines
Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt new file +4 -0
+
+Example for PXA3xx:
+
+	gcu@54000000 {

display-controller@...

Quoted 9 lines
Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt new file +6 -0
+		compatible = "marvell,pxa3xx-gcu";
+		reg = <0x54000000 0x1000>;
+		interrupts = <39>;
+		clocks = <&clks CLK_PXA300_GCU>;
+	};
+
Signature · 1 line
2.17.1