[PATCH v2 v4.4.y-cip] ARM: dts: iwg20d-q7-common: Add LCD support


Fabrizio Castro
 

Hi Pavel,

thank you for your feedback!

From: cip-dev@lists.cip-project.org <cip-dev@lists.cip-project.org> On Behalf
Of Pavel Machek via lists.cip-project.org
Sent: 05 June 2020 12:45
To: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Cc: Pavel Machek <pavel@denx.de>; cip-dev@lists.cip-project.org; Chris
Paterson <Chris.Paterson2@renesas.com>
Subject: Re: [cip-dev] [PATCH v2 v4.4.y-cip] ARM: dts: iwg20d-q7-common: Add
LCD support

Hi!

SIMPLE_PANEL is not enabled in
4.4.y-cip/arm/renesas_shmobile_defconfig , and it seems to be driver
relevant to this panel.
This seems to be a problem. DRM_PANEL_SIMPLE depends on DRM_PANEL,
but DRM_PANEL is not user selectable, it needs to be selected by another
option.
In upstream, commit:
https://github.com/torvalds/linux/commit/bf7149f34

modified the LVDS driver to use the panel API to delegate panel handling,
rather
than parsing the DT manually, and of course in the same context Kconfig is
modified to select DRM_PANEL.

I think we should have another look at this, do you guys think it's possible to
drop
this patch?
It is possible to drop the patch and force push before new commits are
added on top. It is also possible to queue a revert at any later time.

OTOH if the patch is not wrong, just needs another patch to be useful,
I'd keep it.

Adding prompt to Kconfig so that it can be enabled manually should not
be too hard to do.
Thank you for laying down all of the options for me. Since you are open
to a revert patch, I think we'll have another look at this at a later stage,
fixes will follow.

Thanks,
Fab


Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Renesas Electronics Europe GmbH, Geschaeftsfuehrer/President: Carsten Jauch, Sitz der Gesellschaft/Registered office: Duesseldorf, Arcadiastrasse 10, 40472 Duesseldorf, Germany, Handelsregister/Commercial Register: Duesseldorf, HRB 3708 USt-IDNr./Tax identification no.: DE 119353406 WEEE-Reg.-Nr./WEEE reg. no.: DE 14978647


Pavel Machek
 

Hi!

SIMPLE_PANEL is not enabled in
4.4.y-cip/arm/renesas_shmobile_defconfig , and it seems to be driver
relevant to this panel.
This seems to be a problem. DRM_PANEL_SIMPLE depends on DRM_PANEL,
but DRM_PANEL is not user selectable, it needs to be selected by another option.
In upstream, commit:
https://github.com/torvalds/linux/commit/bf7149f34

modified the LVDS driver to use the panel API to delegate panel handling, rather
than parsing the DT manually, and of course in the same context Kconfig is
modified to select DRM_PANEL.

I think we should have another look at this, do you guys think it's possible to drop
this patch?
It is possible to drop the patch and force push before new commits are
added on top. It is also possible to queue a revert at any later time.

OTOH if the patch is not wrong, just needs another patch to be useful,
I'd keep it.

Adding prompt to Kconfig so that it can be enabled manually should not
be too hard to do.

Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


Pavel Machek
 

Hi!

The iwg20d comes with a 7" capacitive touch screen, therefore
add support for it.
Thanks, applied, I'll run tests on it and push the result.

Best regards,
Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


Pavel Machek
 

Hi!

The iwg20d comes with a 7" capacitive touch screen, therefore
add support for it.
Looks good to me this patch.
BTW, when you confirmed this patch, did you update the kernel config?
If we need to add drivers, please tell us what kernel config you
used.
I don't see anything wrong, either.

SIMPLE_PANEL is not enabled in
4.4.y-cip/arm/renesas_shmobile_defconfig , and it seems to be driver
relevant to this panel.

Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


Nobuhiro Iwamatsu
 

Hi,

-----Original Message-----
From: cip-dev@lists.cip-project.org [mailto:cip-dev@lists.cip-project.org] On Behalf Of Marian-Cristian Rotariu
Sent: Tuesday, June 2, 2020 5:43 PM
To: cip-dev@lists.cip-project.org
Cc: Chris Paterson <chris.paterson2@renesas.com>; fabrizio.castro.jz@renesas.com
Subject: [cip-dev] [PATCH v2 v4.4.y-cip] ARM: dts: iwg20d-q7-common: Add LCD support

commit 6f89dd9e9325d05b1f54d860dbbc84b42aa40759 upstream.

The iwg20d comes with a 7" capacitive touch screen, therefore
add support for it.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/1573660292-10629-11-git-send-email-fabrizio.castro@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
(remove the LVDS decoder as there is no driver for it;
add panel timings to panel node since the LVDS driver reads them off the
panel DT node)
Signed-off-by: Marian-Cristian Rotariu <marian.c.rotariu@gmail.com>
---
arch/arm/boot/dts/iwg20d-q7-common.dtsi | 81 ++++++++++++++++++++++++++++++++
arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi | 1 -
2 files changed, 81 insertions(+), 1 deletion(-)

Looks good to me this patch.
BTW, when you confirmed this patch, did you update the kernel config?
If we need to add drivers, please tell us what kernel config you used.

Best regards,
Nobuhiro

diff --git a/arch/arm/boot/dts/iwg20d-q7-common.dtsi b/arch/arm/boot/dts/iwg20d-q7-common.dtsi
index 011dbab..52c1787 100644
--- a/arch/arm/boot/dts/iwg20d-q7-common.dtsi
+++ b/arch/arm/boot/dts/iwg20d-q7-common.dtsi
@@ -49,6 +49,40 @@
clock-frequency = <26000000>;
};

+ lcd_backlight: backlight {
+ compatible = "pwm-backlight";
+
+ pwms = <&pwm3 0 5000000 0>;
+ brightness-levels = <0 4 8 16 32 64 128 255>;
+ default-brightness-level = <7>;
+ enable-gpios = <&gpio5 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ panel {
+ compatible = "edt,etm0700g0dh6", "simple-panel";
+ backlight = <&lcd_backlight>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&du_out_lvds0>;
+ };
+ };
+
+ panel-timing {
+ clock-frequency = <33260>;
+ hactive = <800>;
+ vactive = <480>;
+
+ hfront-porch = <40>;
+ hback-porch = <88>;
+ hsync-len = <128>;
+
+ vback-porch = <33>;
+ vfront-porch = <10>;
+ vsync-len = <2>;
+ };
+ };
+
reg_1p5v: 1p5v {
compatible = "regulator-fixed";
regulator-name = "1P5V";
@@ -123,6 +157,35 @@
status = "okay";
};

+&du {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ du_out_rgb: endpoint {
+ };
+ };
+ port@1 {
+ reg = <1>;
+ du_out_lvds0: endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+};
+
+&gpio2 {
+ touch-interrupt {
+ gpio-hog;
+ gpios = <12 GPIO_ACTIVE_LOW>;
+ input;
+ };
+};
+
&hsusb {
status = "okay";
pinctrl-0 = <&usb0_pins>;
@@ -150,6 +213,13 @@
VDDIO-supply = <&reg_3p3v>;
VDDD-supply = <&reg_1p5v>;
};
+
+ touch: touchpanel@38 {
+ compatible = "edt,edt-ft5406";
+ reg = <0x38>;
+ interrupt-parent = <&gpio2>;
+ interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
+ };
};

&pci0 {
@@ -183,6 +253,11 @@
function = "i2c2";
};

+ pwm3_pins: pwm3 {
+ groups = "pwm3";
+ function = "pwm3";
+ };
+
scif0_pins: scif0 {
groups = "scif0_data_d";
function = "scif0";
@@ -215,6 +290,12 @@
};
};

+&pwm3 {
+ pinctrl-0 = <&pwm3_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
&rcar_sound {
pinctrl-0 = <&sound_pins>;
pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi b/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi
index e643064..ec4c29a 100644
--- a/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi
+++ b/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi
@@ -42,7 +42,6 @@
&du {
pinctrl-0 = <&du_pins>;
pinctrl-names = "default";
- status = "okay";

ports {
port@0 {
--
2.7.4


Marian-Cristian Rotariu
 

commit 6f89dd9e9325d05b1f54d860dbbc84b42aa40759 upstream.

The iwg20d comes with a 7" capacitive touch screen, therefore
add support for it.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/1573660292-10629-11-git-send-email-fabrizio.castro@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
(remove the LVDS decoder as there is no driver for it;
add panel timings to panel node since the LVDS driver reads them off the
panel DT node)
Signed-off-by: Marian-Cristian Rotariu <marian.c.rotariu@gmail.com>
---
arch/arm/boot/dts/iwg20d-q7-common.dtsi | 81 ++++++++++++++++++++++++++++++++
arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi | 1 -
2 files changed, 81 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/iwg20d-q7-common.dtsi b/arch/arm/boot/dts/iwg20d-q7-common.dtsi
index 011dbab..52c1787 100644
--- a/arch/arm/boot/dts/iwg20d-q7-common.dtsi
+++ b/arch/arm/boot/dts/iwg20d-q7-common.dtsi
@@ -49,6 +49,40 @@
clock-frequency = <26000000>;
};

+ lcd_backlight: backlight {
+ compatible = "pwm-backlight";
+
+ pwms = <&pwm3 0 5000000 0>;
+ brightness-levels = <0 4 8 16 32 64 128 255>;
+ default-brightness-level = <7>;
+ enable-gpios = <&gpio5 14 GPIO_ACTIVE_HIGH>;
+ };
+
+ panel {
+ compatible = "edt,etm0700g0dh6", "simple-panel";
+ backlight = <&lcd_backlight>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&du_out_lvds0>;
+ };
+ };
+
+ panel-timing {
+ clock-frequency = <33260>;
+ hactive = <800>;
+ vactive = <480>;
+
+ hfront-porch = <40>;
+ hback-porch = <88>;
+ hsync-len = <128>;
+
+ vback-porch = <33>;
+ vfront-porch = <10>;
+ vsync-len = <2>;
+ };
+ };
+
reg_1p5v: 1p5v {
compatible = "regulator-fixed";
regulator-name = "1P5V";
@@ -123,6 +157,35 @@
status = "okay";
};

+&du {
+ status = "okay";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ du_out_rgb: endpoint {
+ };
+ };
+ port@1 {
+ reg = <1>;
+ du_out_lvds0: endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+};
+
+&gpio2 {
+ touch-interrupt {
+ gpio-hog;
+ gpios = <12 GPIO_ACTIVE_LOW>;
+ input;
+ };
+};
+
&hsusb {
status = "okay";
pinctrl-0 = <&usb0_pins>;
@@ -150,6 +213,13 @@
VDDIO-supply = <&reg_3p3v>;
VDDD-supply = <&reg_1p5v>;
};
+
+ touch: touchpanel@38 {
+ compatible = "edt,edt-ft5406";
+ reg = <0x38>;
+ interrupt-parent = <&gpio2>;
+ interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
+ };
};

&pci0 {
@@ -183,6 +253,11 @@
function = "i2c2";
};

+ pwm3_pins: pwm3 {
+ groups = "pwm3";
+ function = "pwm3";
+ };
+
scif0_pins: scif0 {
groups = "scif0_data_d";
function = "scif0";
@@ -215,6 +290,12 @@
};
};

+&pwm3 {
+ pinctrl-0 = <&pwm3_pins>;
+ pinctrl-names = "default";
+ status = "okay";
+};
+
&rcar_sound {
pinctrl-0 = <&sound_pins>;
pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi b/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi
index e643064..ec4c29a 100644
--- a/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi
+++ b/arch/arm/boot/dts/iwg20d-q7-dbcm-ca.dtsi
@@ -42,7 +42,6 @@
&du {
pinctrl-0 = <&du_pins>;
pinctrl-names = "default";
- status = "okay";

ports {
port@0 {
--
2.7.4