diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2019-01-24 19:34:38 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2019-01-30 19:19:57 +0100 |
commit | 5e063592f0df4ed60443ff73116d2e129365b31f (patch) | |
tree | 871433c45cc66680a3976bbf76f3563d322830d9 | |
parent | cb9c09a669be79db5214ac557cab6240198ccaf2 (diff) |
fsl-imx8qm-apalis.dts: add backlight pwm
This moves from a gpio to a pwm backlight driver to control
BKL1_ON and BKL1_PWM.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r-- | arch/arm64/boot/dts/freescale/fsl-imx8qm-apalis.dts | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/arch/arm64/boot/dts/freescale/fsl-imx8qm-apalis.dts b/arch/arm64/boot/dts/freescale/fsl-imx8qm-apalis.dts index 4bb9cf38f0c6..4e54bd8464f0 100644 --- a/arch/arm64/boot/dts/freescale/fsl-imx8qm-apalis.dts +++ b/arch/arm64/boot/dts/freescale/fsl-imx8qm-apalis.dts @@ -32,12 +32,15 @@ }; backlight: backlight { - compatible = "gpio-backlight"; + compatible = "pwm-backlight"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio_bl_on>; - gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>, /* BKL1_ON */ - <&gpio1 10 GPIO_ACTIVE_HIGH>; /* BKL1_PWM */ - default-on; + gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; /* BKL1_ON */ + pwms = <&lvds1_pwm 0 100000 0>; + + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + status = "okay"; }; @@ -212,7 +215,6 @@ pinctrl_gpio_bl_on: gpio-bl-on { fsl,pins = < SC_P_LVDS0_GPIO00_LSIO_GPIO1_IO04 0x00000021 - SC_P_LVDS1_GPIO00_LSIO_GPIO1_IO10 0x00000021 >; }; @@ -310,6 +312,12 @@ >; }; + pinctrl_pwm_bkl: pwmbklgrp { + fsl,pins = < + SC_P_LVDS1_GPIO00_LVDS1_PWM0_OUT 0x00000020 + >; + }; + pinctrl_usdhc1: usdhc1grp { fsl,pins = < SC_P_EMMC0_CLK_CONN_EMMC0_CLK 0x06000041 @@ -518,6 +526,12 @@ status = "okay"; }; +&lvds1_pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pwm_bkl>; + status = "okay"; +}; + &usdhc1 { pinctrl-names = "default", "state_100mhz", "state_200mhz"; pinctrl-0 = <&pinctrl_usdhc1>; |