ARM: dts: imx6dl-colibri: Unify with changes to Apalis iMX6 device trees.
Subsystems (2)
v2 cover ARM: dts: imx6dl-colibri: Unify with changes to Apalis iMX6 device trees.
From: Max Krummenacher <[email protected]>
- Follows a change to the SGTL5000 MCLK handling fixed for Apalis iMX6 by Fabio.
- Simplify handling of inverted PWM backlight
- Fixes a regression for the capacitive touch introduced with
https://lore.kernel.org/all/[email protected]/
Changes in v2:
- add reviewed-by tags
- Split the Backlight PWM patch into two patches, a) #pwm-cells 3, b) adapt brightness steps
Max Krummenacher (4):
ARM: dts: imx6qdl-colibri: Fix capacitive touch reset polarity
ARM: dts: imx6qdl-colibri: Mux mclk for sgtl5000 with the codec node
ARM: dts: imx6qdl-colibri: backlight pwm: Simplify inverted backlight
ARM: dts: imx6qdl-colibri: backlight pwm: Adapt brightness steps
arch/arm/boot/dts/imx6qdl-colibri.dtsi | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
Signature · 1 line
2.20.1
PATCH v2 1/4 ARM: dts: imx6qdl-colibri: Fix capacitive touch reset polarity
From: Max Krummenacher <[email protected]>
The commit feedaacdadfc ("Input: atmel_mxt_ts - fix up inverted RESET handler") requires the reset GPIO to have GPIO_ACTIVE_LOW.
---
Changes in v2:
- Added Fabio's 'Reviewed-by'
- Removed blank line in commit text
arch/arm/boot/dts/imx6qdl-colibri.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6qdl-colibri.dtsi +1 -1
@@ -593,7 +593,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_atmel_conn>; reg = <0x4a>; - reset-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; /* SODIMM 106 */ + reset-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; /* SODIMM 106 */ status = "disabled"; }; };
Signature · 1 line
2.20.1
PATCH v2 2/4 ARM: dts: imx6qdl-colibri: Mux mclk for sgtl5000 with the codec node
In reply to Max KrummenacherFrom: Max Krummenacher <[email protected]>
Move the pin muxing for MCLK used by the codec to the codec node instead of placing it inside the audmux pinctrl group.
While no negative effects have been observed this should make sure that MCLK is provided when the codec driver is probed.
Follows commit fa51e1dc4b91 ("ARM: dts: imx6qdl-apalis: Fix sgtl5000 detection issue")
---
Changes in v2:
- Added Fabio's 'Reviewed-by'
arch/arm/boot/dts/imx6qdl-colibri.dtsi | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx6qdl-colibri.dtsi +9 -2
@@ -520,6 +520,8 @@ compatible = "fsl,sgtl5000"; clocks = <&clks IMX6QDL_CLK_CKO>; lrclk-strength = <3>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sgtl5000>; reg = <0x0a>; #sound-dai-cells = <0>; VDDA-supply = <®_module_3v3_audio>;
@@ -739,8 +741,6 @@ pinctrl_audmux: audmuxgrp { fsl,pins = < - /* SGTL5000 sys_mclk */ - MX6QDL_PAD_GPIO_0__CCM_CLKO1 0x000b0 MX6QDL_PAD_KEY_COL0__AUD5_TXC 0x130b0 MX6QDL_PAD_KEY_ROW0__AUD5_TXD 0x130b0 MX6QDL_PAD_KEY_COL1__AUD5_TXFS 0x130b0
@@ -991,6 +991,13 @@ >; }; + pinctrl_sgtl5000: sgtl5000grp { + fsl,pins = < + /* SGTL5000 sys_mclk */ + MX6QDL_PAD_GPIO_0__CCM_CLKO1 0x000b0 + >; + }; + pinctrl_spdif: spdifgrp { fsl,pins = < MX6QDL_PAD_GPIO_17__SPDIF_OUT 0x1b0b0
Signature · 1 line
2.20.1
PATCH v2 3/4 ARM: dts: imx6qdl-colibri: backlight pwm: Simplify inverted backlight
In reply to Max KrummenacherFrom: Max Krummenacher <[email protected]>
Set #pwm-cells to the default 3 to gain access to the parameter which allows inverting the PWM signal. This is useful to specify a backlight which has its highest brightness at 0.
---
Changes in v2:
- Split to two patches as proposed by Fabio Estevam
arch/arm/boot/dts/imx6qdl-colibri.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/imx6qdl-colibri.dtsi +4 -4
@@ -6,6 +6,7 @@ */ #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/pwm/pwm.h> / { model = "Toradex Colibri iMX6DL/S Module";
@@ -13,13 +14,13 @@ backlight: backlight { compatible = "pwm-backlight"; - brightness-levels = <0 127 191 223 239 247 251 255>; - default-brightness-level = <1>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; enable-gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* Colibri BL_ON */ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio_bl_on>; power-supply = <®_module_3v3>; - pwms = <&pwm3 0 5000000>; + pwms = <&pwm3 0 5000000 PWM_POLARITY_INVERTED>; status = "disabled"; };
@@ -620,7 +621,6 @@ /* Colibri PWM<A> */ &pwm3 { - #pwm-cells = <2>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm3>; status = "disabled";
Signature · 1 line
2.20.1
Fabio Estevam
reviewerRe: [PATCH v2 3/4] ARM: dts: imx6qdl-colibri: backlight pwm: Simplify inverted backlight
arch/arm/boot/dts/imx6qdl-colibri.dtsi line 18
Quoted 6 lines · Max Krummenacher
backlight: backlight { compatible = "pwm-backlight";arch/arm/boot/dts/imx6qdl-colibri.dtsi +2
-2- brightness-levels = <0 127 191 223 239 247 251 255>; - default-brightness-level = <1>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>;
In this patch, you are still changing the brightness levels + passing the polarity.
I would suggest that this patch only touches the PWM polarity.
The next patch could fix the brightness levels.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v2 3/4] ARM: dts: imx6qdl-colibri: backlight pwm: Simplify inverted backlight
Hi Fabio
Quoted 10 lines · Fabio Estevam
arch/arm/boot/dts/imx6qdl-colibri.dtsi line 18
Quoted 6 lines · Max Krummenacher
backlight: backlight { compatible = "pwm-backlight";arch/arm/boot/dts/imx6qdl-colibri.dtsi +2
-2- brightness-levels = <0 127 191 223 239 247 251 255>; - default-brightness-level = <1>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>;
Quoted 4 lines
In this patch, you are still changing the brightness levels + passing the polarity.
I would suggest that this patch only touches the PWM polarity.
I disagree. Just setting the invert without at the same changing the brightness-levels does
change the user experience way more than when one adapts the available duty cycles
at the same time.
With the change to use the PWM with inverted polarity the PWM signals is inverted to
how it was before this patch. Keeping the brightness-levels will then have a big brightness
jump from 0 to 127 duty cycle, the other 6 steps will then be barely noticable.
I.e. before the change the brightness for level [0..7] was ['off', 128/255, 64/255, 32/255, 16/255, 8/255, 4/255, 'off'], if one only inverts the polarity it will be
['off', 128/255, 191/255, 223/255, 239/255, 247/255, 255/255]. With the proposed patch it will be
['off', 4/255, 8/255, 16/255, 32/255, 64/255, 128/255, 255/255].
Max
Quoted 1 line
The next patch could fix the brightness levels.
Fabio Estevam
reviewerRe: [PATCH v2 3/4] ARM: dts: imx6qdl-colibri: backlight pwm: Simplify inverted backlight
Quoted 12 lines · Max Krummenacher
I disagree. Just setting the invert without at the same changing the brightness-levels does
change the user experience way more than when one adapts the available duty cycles
at the same time.With the change to use the PWM with inverted polarity the PWM signals is inverted to
how it was before this patch. Keeping the brightness-levels will then have a big brightness
jump from 0 to 127 duty cycle, the other 6 steps will then be barely noticable.
Quoted 6 lines
I.e. before the change the brightness for level [0..7] was ['off', 128/255, 64/255, 32/255, 16/255, 8/255, 4/255, 'off'], if one only inverts the polarity it will be
['off', 128/255, 191/255, 223/255, 239/255, 247/255, 255/255]. With the proposed patch it will be
['off', 4/255, 8/255, 16/255, 32/255, 64/255, 128/255, 255/255].
Ok, please add an explanation to the commit log as to why you are changing the brightness levels
like you did here. Thanks
PATCH v2 4/4 ARM: dts: imx6qdl-colibri: backlight pwm: Adapt brightness steps
In reply to Max KrummenacherFrom: Max Krummenacher <[email protected]>
Adapt the brightness steps as the backlight doesn't light up for very low duty cycles.
---
Changes in v2:
- add reviewed-by tags
- Split the Backlight PWM patch into two patches, a) #pwm-cells 3, b) adapt brightness steps
- Split to two patches as proposed by Fabio Estevam
arch/arm/boot/dts/imx6qdl-colibri.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx6qdl-colibri.dtsi +2 -2
@@ -14,8 +14,8 @@ backlight: backlight { compatible = "pwm-backlight"; - brightness-levels = <0 4 8 16 32 64 128 255>; - default-brightness-level = <6>; + brightness-levels = <0 45 63 88 119 158 203 255>; + default-brightness-level = <4>; enable-gpios = <&gpio3 26 GPIO_ACTIVE_HIGH>; /* Colibri BL_ON */ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio_bl_on>;
Signature · 1 line
2.20.1
Re: [PATCH v2 4/4] ARM: dts: imx6qdl-colibri: backlight pwm: Adapt brightness steps
Quoted 7 lines · Max Krummenacher
From: Max Krummenacher <[email protected]>
Adapt the brightness steps as the backlight doesn't light up for very low duty cycles.
Signed-off-by Max Krummenacher <[email protected]>