diff mbox series

drm: rcar-du: Add r8a77965 LVDS dts overlay

Message ID 1544771885-17023-1-git-send-email-na-hoan@jinso.co.jp (mailing list archive)
State Rejected
Delegated to: Kieran Bingham
Headers show
Series drm: rcar-du: Add r8a77965 LVDS dts overlay | expand

Commit Message

グェン・アン・ホァン Dec. 14, 2018, 7:18 a.m. UTC
From: Hoan Nguyen An <na-hoan@jinso.co.jp>

Add r8a77965 LVDS dts overlay support.

Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp>
---
 drivers/gpu/drm/rcar-du/Makefile                   |  4 +-
 drivers/gpu/drm/rcar-du/rcar_du_of.c               |  2 +
 .../gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts   | 50 ++++++++++++++++++++++
 3 files changed, 55 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts

Comments

Kieran Bingham Dec. 14, 2018, 7:48 a.m. UTC | #1
Hi Hoan-san,

Thank you for the patch,

On 14/12/2018 07:18, Nguyen An Hoan wrote:
> From: Hoan Nguyen An <na-hoan@jinso.co.jp>
> 
> Add r8a77965 LVDS dts overlay support.


There has been a recent change to the format of how these files are added.

With thanks to Geert's updates, we have a much simpler way to describe
the overlay.

Geert has supplied a patch at:
  https://patchwork.kernel.org/patch/10704417/

You can see the thread for this topic at:

https://lore.kernel.org/linux-renesas-soc/20181129105850.10953-1-geert+renesas@glider.be/


Could you convert this file in the same way (and validate the generated
output is the same), and repost please?

--
Regards

Kieran


> 
> Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp>
> ---
>  drivers/gpu/drm/rcar-du/Makefile                   |  4 +-
>  drivers/gpu/drm/rcar-du/rcar_du_of.c               |  2 +
>  .../gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts   | 50 ++++++++++++++++++++++
>  3 files changed, 55 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts
> 
> diff --git a/drivers/gpu/drm/rcar-du/Makefile b/drivers/gpu/drm/rcar-du/Makefile
> index 2a3b8d7..9e73a83 100644
> --- a/drivers/gpu/drm/rcar-du/Makefile
> +++ b/drivers/gpu/drm/rcar-du/Makefile
> @@ -11,7 +11,8 @@ rcar-du-drm-$(CONFIG_DRM_RCAR_LVDS)	+= rcar_du_of.o \
>  					   rcar_du_of_lvds_r8a7791.dtb.o \
>  					   rcar_du_of_lvds_r8a7793.dtb.o \
>  					   rcar_du_of_lvds_r8a7795.dtb.o \
> -					   rcar_du_of_lvds_r8a7796.dtb.o
> +					   rcar_du_of_lvds_r8a7796.dtb.o \
> +					   rcar_du_of_lvds_r8a77965.dtb.o
>  rcar-du-drm-$(CONFIG_DRM_RCAR_VSP)	+= rcar_du_vsp.o
>  
>  obj-$(CONFIG_DRM_RCAR_DU)		+= rcar-du-drm.o
> @@ -24,3 +25,4 @@ DTC_FLAGS_rcar_du_of_lvds_r8a7791 += -Wno-graph_endpoint
>  DTC_FLAGS_rcar_du_of_lvds_r8a7793 += -Wno-graph_endpoint
>  DTC_FLAGS_rcar_du_of_lvds_r8a7795 += -Wno-graph_endpoint
>  DTC_FLAGS_rcar_du_of_lvds_r8a7796 += -Wno-graph_endpoint
> +DTC_FLAGS_rcar_du_of_lvds_r8a77965 += -Wno-graph_endpoint
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_of.c b/drivers/gpu/drm/rcar-du/rcar_du_of.c
> index afef696..56c341c 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_of.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_of.c
> @@ -107,6 +107,7 @@ RCAR_DU_OF_DTB(lvds, r8a7791);
>  RCAR_DU_OF_DTB(lvds, r8a7793);
>  RCAR_DU_OF_DTB(lvds, r8a7795);
>  RCAR_DU_OF_DTB(lvds, r8a7796);
> +RCAR_DU_OF_DTB(lvds, r8a77965);
>  
>  static const struct rcar_du_of_overlay rcar_du_lvds_overlays[] __initconst = {
>  	RCAR_DU_OF_OVERLAY(lvds, r8a7790),
> @@ -114,6 +115,7 @@ static const struct rcar_du_of_overlay rcar_du_lvds_overlays[] __initconst = {
>  	RCAR_DU_OF_OVERLAY(lvds, r8a7793),
>  	RCAR_DU_OF_OVERLAY(lvds, r8a7795),
>  	RCAR_DU_OF_OVERLAY(lvds, r8a7796),
> +	RCAR_DU_OF_OVERLAY(lvds, r8a77965),
>  	{ /* Sentinel */ },
>  };
>  
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts b/drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts
> new file mode 100644
> index 0000000..34aea91
> --- /dev/null
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts
> @@ -0,0 +1,50 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * rcar_du_of_lvds_r8a77965.dts - Legacy LVDS DT bindings conversion for R8A77965
> + *
> + * Copyright (C) 2018 Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> + */
> +
> +/dts-v1/;
> +/plugin/;
> +/ {
> +	fragment@0 {
> +		target-path = "/soc";
> +		__overlay__ {
> +			#address-cells = <2>;
> +			#size-cells = <2>;
> +
> +			lvds@feb90000 {
> +				compatible = "renesas,r8a77965-lvds";
> +				reg = <0 0xfeb90000 0 0x14>;
> +
> +				ports {
> +					#address-cells = <1>;
> +					#size-cells = <0>;
> +
> +					port@0 {
> +						reg = <0>;
> +						lvds0_input: endpoint {
> +						};
> +					};
> +					port@1 {
> +						reg = <1>;
> +						lvds0_out: endpoint {
> +						};
> +					};
> +				};
> +			};
> +		};
> +	};
> +
> +	fragment@1 {
> +		target-path = "/soc/display@feb00000/ports";
> +		__overlay__ {
> +			port@2 {
> +				endpoint {
> +					remote-endpoint = <&lvds0_input>;
> +				};
> +			};
> +		};
> +	};
> +};
>
Laurent Pinchart Dec. 14, 2018, 8:13 a.m. UTC | #2
Hi Hoan-san,

Thank you for the patch.

On Friday, 14 December 2018 09:18:05 EET Nguyen An Hoan wrote:
> From: Hoan Nguyen An <na-hoan@jinso.co.jp>
> 
> Add r8a77965 LVDS dts overlay support.

This shouldn't be needed. r8a77965 support was added to the DU LVDS driver 
after conversion to the new DT bindings. There has never been support for old 
LVDS bindings in the DU driver, so there's no need to offer backward 
compatibility.

> Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp>
> ---
>  drivers/gpu/drm/rcar-du/Makefile                   |  4 +-
>  drivers/gpu/drm/rcar-du/rcar_du_of.c               |  2 +
>  .../gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts   | 50 +++++++++++++++++++
>  3 files changed, 55 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts
> 
> diff --git a/drivers/gpu/drm/rcar-du/Makefile
> b/drivers/gpu/drm/rcar-du/Makefile index 2a3b8d7..9e73a83 100644
> --- a/drivers/gpu/drm/rcar-du/Makefile
> +++ b/drivers/gpu/drm/rcar-du/Makefile
> @@ -11,7 +11,8 @@ rcar-du-drm-$(CONFIG_DRM_RCAR_LVDS)	+= rcar_du_of.o \
>  					   rcar_du_of_lvds_r8a7791.dtb.o \
>  					   rcar_du_of_lvds_r8a7793.dtb.o \
>  					   rcar_du_of_lvds_r8a7795.dtb.o \
> -					   rcar_du_of_lvds_r8a7796.dtb.o
> +					   rcar_du_of_lvds_r8a7796.dtb.o \
> +					   rcar_du_of_lvds_r8a77965.dtb.o
>  rcar-du-drm-$(CONFIG_DRM_RCAR_VSP)	+= rcar_du_vsp.o
> 
>  obj-$(CONFIG_DRM_RCAR_DU)		+= rcar-du-drm.o
> @@ -24,3 +25,4 @@ DTC_FLAGS_rcar_du_of_lvds_r8a7791 += -Wno-graph_endpoint
>  DTC_FLAGS_rcar_du_of_lvds_r8a7793 += -Wno-graph_endpoint
>  DTC_FLAGS_rcar_du_of_lvds_r8a7795 += -Wno-graph_endpoint
>  DTC_FLAGS_rcar_du_of_lvds_r8a7796 += -Wno-graph_endpoint
> +DTC_FLAGS_rcar_du_of_lvds_r8a77965 += -Wno-graph_endpoint
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_of.c
> b/drivers/gpu/drm/rcar-du/rcar_du_of.c index afef696..56c341c 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_of.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_of.c
> @@ -107,6 +107,7 @@ RCAR_DU_OF_DTB(lvds, r8a7791);
>  RCAR_DU_OF_DTB(lvds, r8a7793);
>  RCAR_DU_OF_DTB(lvds, r8a7795);
>  RCAR_DU_OF_DTB(lvds, r8a7796);
> +RCAR_DU_OF_DTB(lvds, r8a77965);
> 
>  static const struct rcar_du_of_overlay rcar_du_lvds_overlays[] __initconst
> = { RCAR_DU_OF_OVERLAY(lvds, r8a7790),
> @@ -114,6 +115,7 @@ static const struct rcar_du_of_overlay
> rcar_du_lvds_overlays[] __initconst = { RCAR_DU_OF_OVERLAY(lvds, r8a7793),
>  	RCAR_DU_OF_OVERLAY(lvds, r8a7795),
>  	RCAR_DU_OF_OVERLAY(lvds, r8a7796),
> +	RCAR_DU_OF_OVERLAY(lvds, r8a77965),
>  	{ /* Sentinel */ },
>  };
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts
> b/drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts new file mode 100644
> index 0000000..34aea91
> --- /dev/null
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts
> @@ -0,0 +1,50 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * rcar_du_of_lvds_r8a77965.dts - Legacy LVDS DT bindings conversion for
> R8A77965 + *
> + * Copyright (C) 2018 Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> + */
> +
> +/dts-v1/;
> +/plugin/;
> +/ {
> +	fragment@0 {
> +		target-path = "/soc";
> +		__overlay__ {
> +			#address-cells = <2>;
> +			#size-cells = <2>;
> +
> +			lvds@feb90000 {
> +				compatible = "renesas,r8a77965-lvds";
> +				reg = <0 0xfeb90000 0 0x14>;
> +
> +				ports {
> +					#address-cells = <1>;
> +					#size-cells = <0>;
> +
> +					port@0 {
> +						reg = <0>;
> +						lvds0_input: endpoint {
> +						};
> +					};
> +					port@1 {
> +						reg = <1>;
> +						lvds0_out: endpoint {
> +						};
> +					};
> +				};
> +			};
> +		};
> +	};
> +
> +	fragment@1 {
> +		target-path = "/soc/display@feb00000/ports";
> +		__overlay__ {
> +			port@2 {
> +				endpoint {
> +					remote-endpoint = <&lvds0_input>;
> +				};
> +			};
> +		};
> +	};
> +};
Kieran Bingham Dec. 14, 2018, 8:24 a.m. UTC | #3
On 14/12/2018 07:48, Kieran Bingham wrote:
> Hi Hoan-san,
> 
> Thank you for the patch,
> 
> On 14/12/2018 07:18, Nguyen An Hoan wrote:
>> From: Hoan Nguyen An <na-hoan@jinso.co.jp>
>>
>> Add r8a77965 LVDS dts overlay support.
> 
> 
> There has been a recent change to the format of how these files are added.
> 
> With thanks to Geert's updates, we have a much simpler way to describe
> the overlay.
> 
> Geert has supplied a patch at:
>   https://patchwork.kernel.org/patch/10704417/
> 
> You can see the thread for this topic at:
> 
> https://lore.kernel.org/linux-renesas-soc/20181129105850.10953-1-geert+renesas@glider.be/
> 
> 
> Could you convert this file in the same way (and validate the generated
> output is the same), and repost please?

My apologies, following Laurent's comments, please disregard this
suggestion.

--
Regards

Kieran



> 
> --
> Regards
> 
> Kieran
> 
> 
>>
>> Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp>
>> ---
>>  drivers/gpu/drm/rcar-du/Makefile                   |  4 +-
>>  drivers/gpu/drm/rcar-du/rcar_du_of.c               |  2 +
>>  .../gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts   | 50 ++++++++++++++++++++++
>>  3 files changed, 55 insertions(+), 1 deletion(-)
>>  create mode 100644 drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts
>>
>> diff --git a/drivers/gpu/drm/rcar-du/Makefile b/drivers/gpu/drm/rcar-du/Makefile
>> index 2a3b8d7..9e73a83 100644
>> --- a/drivers/gpu/drm/rcar-du/Makefile
>> +++ b/drivers/gpu/drm/rcar-du/Makefile
>> @@ -11,7 +11,8 @@ rcar-du-drm-$(CONFIG_DRM_RCAR_LVDS)	+= rcar_du_of.o \
>>  					   rcar_du_of_lvds_r8a7791.dtb.o \
>>  					   rcar_du_of_lvds_r8a7793.dtb.o \
>>  					   rcar_du_of_lvds_r8a7795.dtb.o \
>> -					   rcar_du_of_lvds_r8a7796.dtb.o
>> +					   rcar_du_of_lvds_r8a7796.dtb.o \
>> +					   rcar_du_of_lvds_r8a77965.dtb.o
>>  rcar-du-drm-$(CONFIG_DRM_RCAR_VSP)	+= rcar_du_vsp.o
>>  
>>  obj-$(CONFIG_DRM_RCAR_DU)		+= rcar-du-drm.o
>> @@ -24,3 +25,4 @@ DTC_FLAGS_rcar_du_of_lvds_r8a7791 += -Wno-graph_endpoint
>>  DTC_FLAGS_rcar_du_of_lvds_r8a7793 += -Wno-graph_endpoint
>>  DTC_FLAGS_rcar_du_of_lvds_r8a7795 += -Wno-graph_endpoint
>>  DTC_FLAGS_rcar_du_of_lvds_r8a7796 += -Wno-graph_endpoint
>> +DTC_FLAGS_rcar_du_of_lvds_r8a77965 += -Wno-graph_endpoint
>> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_of.c b/drivers/gpu/drm/rcar-du/rcar_du_of.c
>> index afef696..56c341c 100644
>> --- a/drivers/gpu/drm/rcar-du/rcar_du_of.c
>> +++ b/drivers/gpu/drm/rcar-du/rcar_du_of.c
>> @@ -107,6 +107,7 @@ RCAR_DU_OF_DTB(lvds, r8a7791);
>>  RCAR_DU_OF_DTB(lvds, r8a7793);
>>  RCAR_DU_OF_DTB(lvds, r8a7795);
>>  RCAR_DU_OF_DTB(lvds, r8a7796);
>> +RCAR_DU_OF_DTB(lvds, r8a77965);
>>  
>>  static const struct rcar_du_of_overlay rcar_du_lvds_overlays[] __initconst = {
>>  	RCAR_DU_OF_OVERLAY(lvds, r8a7790),
>> @@ -114,6 +115,7 @@ static const struct rcar_du_of_overlay rcar_du_lvds_overlays[] __initconst = {
>>  	RCAR_DU_OF_OVERLAY(lvds, r8a7793),
>>  	RCAR_DU_OF_OVERLAY(lvds, r8a7795),
>>  	RCAR_DU_OF_OVERLAY(lvds, r8a7796),
>> +	RCAR_DU_OF_OVERLAY(lvds, r8a77965),
>>  	{ /* Sentinel */ },
>>  };
>>  
>> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts b/drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts
>> new file mode 100644
>> index 0000000..34aea91
>> --- /dev/null
>> +++ b/drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts
>> @@ -0,0 +1,50 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * rcar_du_of_lvds_r8a77965.dts - Legacy LVDS DT bindings conversion for R8A77965
>> + *
>> + * Copyright (C) 2018 Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> + */
>> +
>> +/dts-v1/;
>> +/plugin/;
>> +/ {
>> +	fragment@0 {
>> +		target-path = "/soc";
>> +		__overlay__ {
>> +			#address-cells = <2>;
>> +			#size-cells = <2>;
>> +
>> +			lvds@feb90000 {
>> +				compatible = "renesas,r8a77965-lvds";
>> +				reg = <0 0xfeb90000 0 0x14>;
>> +
>> +				ports {
>> +					#address-cells = <1>;
>> +					#size-cells = <0>;
>> +
>> +					port@0 {
>> +						reg = <0>;
>> +						lvds0_input: endpoint {
>> +						};
>> +					};
>> +					port@1 {
>> +						reg = <1>;
>> +						lvds0_out: endpoint {
>> +						};
>> +					};
>> +				};
>> +			};
>> +		};
>> +	};
>> +
>> +	fragment@1 {
>> +		target-path = "/soc/display@feb00000/ports";
>> +		__overlay__ {
>> +			port@2 {
>> +				endpoint {
>> +					remote-endpoint = <&lvds0_input>;
>> +				};
>> +			};
>> +		};
>> +	};
>> +};
>>
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/rcar-du/Makefile b/drivers/gpu/drm/rcar-du/Makefile
index 2a3b8d7..9e73a83 100644
--- a/drivers/gpu/drm/rcar-du/Makefile
+++ b/drivers/gpu/drm/rcar-du/Makefile
@@ -11,7 +11,8 @@  rcar-du-drm-$(CONFIG_DRM_RCAR_LVDS)	+= rcar_du_of.o \
 					   rcar_du_of_lvds_r8a7791.dtb.o \
 					   rcar_du_of_lvds_r8a7793.dtb.o \
 					   rcar_du_of_lvds_r8a7795.dtb.o \
-					   rcar_du_of_lvds_r8a7796.dtb.o
+					   rcar_du_of_lvds_r8a7796.dtb.o \
+					   rcar_du_of_lvds_r8a77965.dtb.o
 rcar-du-drm-$(CONFIG_DRM_RCAR_VSP)	+= rcar_du_vsp.o
 
 obj-$(CONFIG_DRM_RCAR_DU)		+= rcar-du-drm.o
@@ -24,3 +25,4 @@  DTC_FLAGS_rcar_du_of_lvds_r8a7791 += -Wno-graph_endpoint
 DTC_FLAGS_rcar_du_of_lvds_r8a7793 += -Wno-graph_endpoint
 DTC_FLAGS_rcar_du_of_lvds_r8a7795 += -Wno-graph_endpoint
 DTC_FLAGS_rcar_du_of_lvds_r8a7796 += -Wno-graph_endpoint
+DTC_FLAGS_rcar_du_of_lvds_r8a77965 += -Wno-graph_endpoint
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_of.c b/drivers/gpu/drm/rcar-du/rcar_du_of.c
index afef696..56c341c 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_of.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_of.c
@@ -107,6 +107,7 @@  RCAR_DU_OF_DTB(lvds, r8a7791);
 RCAR_DU_OF_DTB(lvds, r8a7793);
 RCAR_DU_OF_DTB(lvds, r8a7795);
 RCAR_DU_OF_DTB(lvds, r8a7796);
+RCAR_DU_OF_DTB(lvds, r8a77965);
 
 static const struct rcar_du_of_overlay rcar_du_lvds_overlays[] __initconst = {
 	RCAR_DU_OF_OVERLAY(lvds, r8a7790),
@@ -114,6 +115,7 @@  static const struct rcar_du_of_overlay rcar_du_lvds_overlays[] __initconst = {
 	RCAR_DU_OF_OVERLAY(lvds, r8a7793),
 	RCAR_DU_OF_OVERLAY(lvds, r8a7795),
 	RCAR_DU_OF_OVERLAY(lvds, r8a7796),
+	RCAR_DU_OF_OVERLAY(lvds, r8a77965),
 	{ /* Sentinel */ },
 };
 
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts b/drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts
new file mode 100644
index 0000000..34aea91
--- /dev/null
+++ b/drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a77965.dts
@@ -0,0 +1,50 @@ 
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * rcar_du_of_lvds_r8a77965.dts - Legacy LVDS DT bindings conversion for R8A77965
+ *
+ * Copyright (C) 2018 Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+ */
+
+/dts-v1/;
+/plugin/;
+/ {
+	fragment@0 {
+		target-path = "/soc";
+		__overlay__ {
+			#address-cells = <2>;
+			#size-cells = <2>;
+
+			lvds@feb90000 {
+				compatible = "renesas,r8a77965-lvds";
+				reg = <0 0xfeb90000 0 0x14>;
+
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+						lvds0_input: endpoint {
+						};
+					};
+					port@1 {
+						reg = <1>;
+						lvds0_out: endpoint {
+						};
+					};
+				};
+			};
+		};
+	};
+
+	fragment@1 {
+		target-path = "/soc/display@feb00000/ports";
+		__overlay__ {
+			port@2 {
+				endpoint {
+					remote-endpoint = <&lvds0_input>;
+				};
+			};
+		};
+	};
+};