2021-01-21 06:15:23

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v2 0/7] devicetree fixes for Protonic and Plymovent boards

changes v2:
- imx6dl-prtvt7: remove touchscreen-inverted-*

Oleksij Rempel (7):
dt-bindings: display: simple: add Innolux G070Y2-T02 panel
drm: panel-simple: Add support for the Innolux G070Y2-T02 panel
ARM: dts: imx6dl-prtvt7: Add display and panel nodes
ARM: dts: imx6dl-prtvt7: add TSC2046 touchscreen node
ARM: dts: imx6dl-prtvt7: Remove backlight enable gpio
ARM: dts: imx6dl-prtvt7: fix PWM cell count for the backlight node.
ARM: dts: imx6dl-plym2m: remove touchscreen-size-* properties

.../bindings/display/panel/panel-simple.yaml | 2 +
arch/arm/boot/dts/imx6dl-plym2m.dts | 2 -
arch/arm/boot/dts/imx6dl-prtvt7.dts | 74 ++++++++++++++++---
drivers/gpu/drm/panel/panel-simple.c | 16 ++++
4 files changed, 81 insertions(+), 13 deletions(-)

--
2.30.0


2021-01-21 06:16:35

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v2 6/7] ARM: dts: imx6dl-prtvt7: fix PWM cell count for the backlight node.

At some point PWM cell count was changed, but it didn't triggered any
error, since this DT was overwriting "#pwm-cells".
To make sure, we are in sync with the kernel driver, remove this
property and fix the pwm consumer.

Signed-off-by: Oleksij Rempel <[email protected]>
---
arch/arm/boot/dts/imx6dl-prtvt7.dts | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/imx6dl-prtvt7.dts b/arch/arm/boot/dts/imx6dl-prtvt7.dts
index 8a1491975da8..83b461eb33a2 100644
--- a/arch/arm/boot/dts/imx6dl-prtvt7.dts
+++ b/arch/arm/boot/dts/imx6dl-prtvt7.dts
@@ -21,7 +21,7 @@ memory@10000000 {

backlight_lcd: backlight-lcd {
compatible = "pwm-backlight";
- pwms = <&pwm1 0 500000>;
+ pwms = <&pwm1 0 500000 0>;
brightness-levels = <0 20 81 248 1000>;
default-brightness-level = <20>;
num-interpolated-steps = <21>;
@@ -320,7 +320,6 @@ &ipu1_di0_disp0 {
};

&pwm1 {
- #pwm-cells = <2>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pwm1>;
status = "okay";
--
2.30.0

2021-01-21 06:18:23

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v2 1/7] dt-bindings: display: simple: add Innolux G070Y2-T02 panel

Add binding for the Innolux G070Y2-T02 panel. It is 7" WVGA (800x480)
TFT LCD panel with TTL interface and a backlight unit.

Signed-off-by: Oleksij Rempel <[email protected]>
---
.../devicetree/bindings/display/panel/panel-simple.yaml | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
index 3207608d1178..f7a1465313db 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
@@ -152,6 +152,8 @@ properties:
- innolux,at070tn92
# Innolux G070Y2-L01 7" WVGA (800x480) TFT LCD panel
- innolux,g070y2-l01
+ # Innolux G070Y2-T02 7" WVGA (800x480) TFT LCD TTL panel
+ - innolux,g070y2-t02
# Innolux Corporation 10.1" G101ICE-L01 WXGA (1280x800) LVDS panel
- innolux,g101ice-l01
# Innolux Corporation 12.1" WXGA (1280x800) TFT LCD panel
--
2.30.0

2021-01-21 06:31:47

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v2 4/7] ARM: dts: imx6dl-prtvt7: add TSC2046 touchscreen node

Add touchscreen support to the Protonic VT7 board.

Co-Developed-by: Robin van der Gracht <[email protected]>
Signed-off-by: Robin van der Gracht <[email protected]>
Signed-off-by: Oleksij Rempel <[email protected]>
---
arch/arm/boot/dts/imx6dl-prtvt7.dts | 15 +++++++++++++++
1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/imx6dl-prtvt7.dts b/arch/arm/boot/dts/imx6dl-prtvt7.dts
index d9cb1e41cc10..836026a0e219 100644
--- a/arch/arm/boot/dts/imx6dl-prtvt7.dts
+++ b/arch/arm/boot/dts/imx6dl-prtvt7.dts
@@ -266,6 +266,21 @@ &ecspi2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi2>;
status = "okay";
+
+ touchscreen@0 {
+ compatible = "ti,tsc2046";
+ reg = <0>;
+ pinctrl-0 = <&pinctrl_tsc>;
+ pinctrl-names ="default";
+ spi-max-frequency = <100000>;
+ interrupts-extended = <&gpio3 20 IRQ_TYPE_EDGE_FALLING>;
+ pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>;
+ touchscreen-max-pressure = <4095>;
+ ti,vref-delay-usecs = /bits/ 16 <100>;
+ ti,x-plate-ohms = /bits/ 16 <800>;
+ ti,y-plate-ohms = /bits/ 16 <300>;
+ wakeup-source;
+ };
};

&i2c1 {
--
2.30.0

2021-01-21 06:32:13

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v2 7/7] ARM: dts: imx6dl-plym2m: remove touchscreen-size-* properties

Remove touchscreen-size-* properties. This values are not correct, event if it
works with ts_test tool, it fails to work properly with weston.
And the real range of values reported by the driver (or measured by the
controller) is close to max values and may change with time on resistive
panels. So, it make no sense to keep this values in the device tree.

Signed-off-by: Oleksij Rempel <[email protected]>
---
arch/arm/boot/dts/imx6dl-plym2m.dts | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/arm/boot/dts/imx6dl-plym2m.dts b/arch/arm/boot/dts/imx6dl-plym2m.dts
index 4d0d3d3386af..c97274f0df07 100644
--- a/arch/arm/boot/dts/imx6dl-plym2m.dts
+++ b/arch/arm/boot/dts/imx6dl-plym2m.dts
@@ -138,8 +138,6 @@ touchscreen@0 {
interrupts-extended = <&gpio3 20 IRQ_TYPE_EDGE_FALLING>;
pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>;

- touchscreen-size-x = <800>;
- touchscreen-size-y = <480>;
touchscreen-inverted-x;
touchscreen-inverted-y;
touchscreen-max-pressure = <4095>;
--
2.30.0

2021-01-21 06:32:38

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v2 3/7] ARM: dts: imx6dl-prtvt7: Add display and panel nodes

Add Innolux G070Y2-T02 panel to the Protonic VT7 board.

Signed-off-by: Robin van der Gracht <[email protected]>
Signed-off-by: Oleksij Rempel <[email protected]>
---
arch/arm/boot/dts/imx6dl-prtvt7.dts | 47 +++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)

diff --git a/arch/arm/boot/dts/imx6dl-prtvt7.dts b/arch/arm/boot/dts/imx6dl-prtvt7.dts
index ae6da241f13e..d9cb1e41cc10 100644
--- a/arch/arm/boot/dts/imx6dl-prtvt7.dts
+++ b/arch/arm/boot/dts/imx6dl-prtvt7.dts
@@ -31,6 +31,30 @@ backlight_lcd: backlight-lcd {
enable-gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>;
};

+ display {
+ compatible = "fsl,imx-parallel-display";
+ pinctrl-0 = <&pinctrl_ipu1_disp>;
+ pinctrl-names = "default";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ display_in: endpoint {
+ remote-endpoint = <&ipu1_di0_disp0>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ display_out: endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+
keys {
compatible = "gpio-keys";
autorepeat;
@@ -138,6 +162,18 @@ led-debug0 {
};
};

+ panel {
+ compatible = "innolux,g070y2-t02";
+ backlight = <&backlight_lcd>;
+ power-supply = <&reg_3v3>;
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&display_out>;
+ };
+ };
+ };
+
reg_bl_12v0: regulator-bl-12v0 {
compatible = "regulator-fixed";
pinctrl-names = "default";
@@ -149,6 +185,13 @@ reg_bl_12v0: regulator-bl-12v0 {
enable-active-high;
};

+ reg_3v3: regulator-3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
reg_1v8: regulator-1v8 {
compatible = "regulator-fixed";
regulator-name = "1v8";
@@ -260,6 +303,10 @@ &ipu1 {
status = "okay";
};

+&ipu1_di0_disp0 {
+ remote-endpoint = <&display_in>;
+};
+
&pwm1 {
#pwm-cells = <2>;
pinctrl-names = "default";
--
2.30.0

2021-01-21 06:33:43

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v2 2/7] drm: panel-simple: Add support for the Innolux G070Y2-T02 panel

Add compatible and timings for the Innolux G070Y2-T02 panel. It is 7"
WVGA (800x480) TFT LCD panel with TTL interface and a backlight unit.

Co-Developed-by: Robin van der Gracht <[email protected]>
Signed-off-by: Robin van der Gracht <[email protected]>
Signed-off-by: Oleksij Rempel <[email protected]>
---
drivers/gpu/drm/panel/panel-simple.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 41bbec72b2da..14996ca264f3 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -2149,6 +2149,19 @@ static const struct panel_desc innolux_g070y2_l01 = {
.connector_type = DRM_MODE_CONNECTOR_LVDS,
};

+static const struct panel_desc innolux_g070y2_t02 = {
+ .modes = &innolux_at070tn92_mode,
+ .num_modes = 1,
+ .bpc = 8,
+ .size = {
+ .width = 152,
+ .height = 92,
+ },
+ .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+ .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
+ .connector_type = DRM_MODE_CONNECTOR_DPI,
+};
+
static const struct display_timing innolux_g101ice_l01_timing = {
.pixelclock = { 60400000, 71100000, 74700000 },
.hactive = { 1280, 1280, 1280 },
@@ -4135,6 +4148,9 @@ static const struct of_device_id platform_of_match[] = {
}, {
.compatible = "innolux,g070y2-l01",
.data = &innolux_g070y2_l01,
+ }, {
+ .compatible = "innolux,g070y2-t02",
+ .data = &innolux_g070y2_t02,
}, {
.compatible = "innolux,g101ice-l01",
.data = &innolux_g101ice_l01
--
2.30.0

2021-01-21 06:34:32

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH v2 5/7] ARM: dts: imx6dl-prtvt7: Remove backlight enable gpio

The backlight power is controlled through the reg_bl_12v0 regulator.

Co-Developed-by: Robin van der Gracht <[email protected]>
Signed-off-by: Robin van der Gracht <[email protected]>
Signed-off-by: Oleksij Rempel <[email protected]>
---
arch/arm/boot/dts/imx6dl-prtvt7.dts | 9 ---------
1 file changed, 9 deletions(-)

diff --git a/arch/arm/boot/dts/imx6dl-prtvt7.dts b/arch/arm/boot/dts/imx6dl-prtvt7.dts
index 836026a0e219..8a1491975da8 100644
--- a/arch/arm/boot/dts/imx6dl-prtvt7.dts
+++ b/arch/arm/boot/dts/imx6dl-prtvt7.dts
@@ -21,14 +21,11 @@ memory@10000000 {

backlight_lcd: backlight-lcd {
compatible = "pwm-backlight";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_backlight>;
pwms = <&pwm1 0 500000>;
brightness-levels = <0 20 81 248 1000>;
default-brightness-level = <20>;
num-interpolated-steps = <21>;
power-supply = <&reg_bl_12v0>;
- enable-gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>;
};

display {
@@ -362,12 +359,6 @@ MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS 0x130b0
>;
};

- pinctrl_backlight: backlightgrp {
- fsl,pins = <
- MX6QDL_PAD_DISP0_DAT7__GPIO4_IO28 0x1b0b0
- >;
- };
-
pinctrl_can1phy: can1phy {
fsl,pins = <
/* CAN1_SR */
--
2.30.0

2021-01-21 14:21:42

by Fabio Estevam

[permalink] [raw]
Subject: Re: [PATCH v2 6/7] ARM: dts: imx6dl-prtvt7: fix PWM cell count for the backlight node.

Hi Oleksij,

On Thu, Jan 21, 2021 at 3:12 AM Oleksij Rempel <[email protected]> wrote:
>
> At some point PWM cell count was changed, but it didn't triggered any

It changed in this commit:

commit fa28d8212ede9c533ae87a737571a9d3b3eebb29
Author: Uwe Kleine-König <[email protected]>
Date: Fri Jul 10 07:19:37 2020 +0200

ARM: dts: imx: default to #pwm-cells = <3> in the SoC dtsi files

The imx-pwm driver supports 3 cells and this is the more flexible setting.
So use it by default and overwrite it back to two for the files that
reference the PWMs with just 2 cells to minimize changes.

This allows to drop explicit setting to 3 cells for the boards that already
depend on this. The boards that are now using 2 cells explicitly can be
converted to 3 individually.

Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Shawn Guo <[email protected]>

2021-01-22 09:50:08

by Oleksij Rempel

[permalink] [raw]
Subject: Re: [PATCH v2 6/7] ARM: dts: imx6dl-prtvt7: fix PWM cell count for the backlight node.

On Thu, Jan 21, 2021 at 11:17:42AM -0300, Fabio Estevam wrote:
> Hi Oleksij,
>
> On Thu, Jan 21, 2021 at 3:12 AM Oleksij Rempel <[email protected]> wrote:
> >
> > At some point PWM cell count was changed, but it didn't triggered any
>
> It changed in this commit:
>
> commit fa28d8212ede9c533ae87a737571a9d3b3eebb29
> Author: Uwe Kleine-König <[email protected]>
> Date: Fri Jul 10 07:19:37 2020 +0200
>
> ARM: dts: imx: default to #pwm-cells = <3> in the SoC dtsi files
>
> The imx-pwm driver supports 3 cells and this is the more flexible setting.
> So use it by default and overwrite it back to two for the files that
> reference the PWMs with just 2 cells to minimize changes.
>
> This allows to drop explicit setting to 3 cells for the boards that already
> depend on this. The boards that are now using 2 cells explicitly can be
> converted to 3 individually.
>
> Signed-off-by: Uwe Kleine-König <[email protected]>
> Signed-off-by: Shawn Guo <[email protected]>

OK, nice. Thx!

Should I resend this series without this patch?

Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

2021-02-09 02:39:48

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v2 1/7] dt-bindings: display: simple: add Innolux G070Y2-T02 panel

On Thu, 21 Jan 2021 07:11:35 +0100, Oleksij Rempel wrote:
> Add binding for the Innolux G070Y2-T02 panel. It is 7" WVGA (800x480)
> TFT LCD panel with TTL interface and a backlight unit.
>
> Signed-off-by: Oleksij Rempel <[email protected]>
> ---
> .../devicetree/bindings/display/panel/panel-simple.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>

Acked-by: Rob Herring <[email protected]>