# \[PATCH 1/2\] dt-bindings: video: fbdev: add devicetree bindings for pxa3xx-gcu

- Subsystems: DRM DRIVERS, DRM DRIVERS AND MISC GPU PATCHES, OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, THE REST
- Maintainers: David Airlie, Simona Vetter, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Torvalds
- List: linux-fbdev
- 3 messages, 2 authors
- Page: https://ratatoskr.run/linux-fbdev/2018/06/8156065/t

## \[PATCH 1/2\] dt-bindings: video: fbdev: add devicetree bindings for pxa3xx-gcu

- From: Daniel Mack \<daniel@zonque.org\>
- Date: 2018-06-23 19:11:24 
- Message: https://ratatoskr.run/linux-fbdev/2018/06/8156065.md

```text
This patch adds the binding documentation for the pxa3xx gcu.

Signed-off-by: Daniel Mack <daniel@zonque.org>
---
 .../bindings/display/marvell,pxa3xx-gcu.txt    | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt

diff --git a/Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt b/Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt
new file mode 100644
index 000000000000..d1b2302d0fd8
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt
@@ -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>;
+	};
+
-- 
2.17.1

```

## \[PATCH 2/2\] video: fbdev: pxa3xx\_gcu: add devicetree bindings

- From: Daniel Mack \<daniel@zonque.org\>
- Date: 2018-06-23 19:11:25 
- Message: https://ratatoskr.run/linux-fbdev/2018/06/8156172.md

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

Signed-off-by: Daniel Mack <daniel@zonque.org>
---
 drivers/video/fbdev/pxa3xx-gcu.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/video/fbdev/pxa3xx-gcu.c b/drivers/video/fbdev/pxa3xx-gcu.c
index 0955622a1227..3d987f4c06ad 100644
--- a/drivers/video/fbdev/pxa3xx-gcu.c
+++ b/drivers/video/fbdev/pxa3xx-gcu.c
@@ -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),
 	},
 };
 
-- 
2.17.1

```

## Re: \[PATCH 1/2\] dt-bindings: video: fbdev: add devicetree bindings for pxa3xx-gcu

- From: Rob Herring \<robh@kernel.org\>
- Date: 2018-07-03 20:14:42 
- Message: https://ratatoskr.run/linux-fbdev/2018/07/8157661.md

```text
On Sat, Jun 23, 2018 at 09:11:24PM +0200, Daniel Mack wrote:
> 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.

> 
> Signed-off-by: Daniel Mack <daniel@zonque.org>
> ---
>  .../bindings/display/marvell,pxa3xx-gcu.txt    | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt
> 
> diff --git a/Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt b/Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt
> new file mode 100644
> index 000000000000..d1b2302d0fd8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/marvell,pxa3xx-gcu.txt
> @@ -0,0 +1,18 @@
> +PXA3xx GCU Controller
> +---------------------
> +
> +Required properties:
> + - compatible : "marvell,pxa3xx-gcu"

Don't use wildcards in compatible strings.

> + - reg : should contain the register range (address and length).
> + - interrupts : GCU interrupt.
> + - clocks: phandle to input clocks

Be specific as to how many.

> +
> +Example for PXA3xx:
> +
> +	gcu@54000000 {

display-controller@...

> +		compatible = "marvell,pxa3xx-gcu";
> +		reg = <0x54000000 0x1000>;
> +		interrupts = <39>;
> +		clocks = <&clks CLK_PXA300_GCU>;
> +	};
> +
> -- 
> 2.17.1
> 
```
