From 81ad8eb4259448cb41b2c6cdc1f7864180aebad9 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Thu, 28 Feb 2019 18:36:51 +0800 Subject: [PATCH] MLK-21013 ARM64: dts: imx8qm: passthrough lvds pwm Passthrough lvds pwm, otherwise dom0 will panic when reboot if domu started and shutdown, because LVDS_1_PWM_0 is assigned to domu and when domu shutdown, the resource will be powered off, however dom0 still think it is powered on. since lvds1_pwm is expected for domu, so let's passthrough it. Signed-off-by: Peng Fan Reviewed-by: Flynn xu (cherry picked from commit abb243aba12a6649fad8114e298ff075b0a8399d) (cherry picked from commit 9644178aeb4fc2a5b04824e7f6fb9cd9b5f7477f) --- .../dts/freescale/fsl-imx8qm-mek-dom0.dts | 9 +++++- .../dts/freescale/fsl-imx8qm-mek-domu.dts | 31 ++++++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/fsl-imx8qm-mek-dom0.dts b/arch/arm64/boot/dts/freescale/fsl-imx8qm-mek-dom0.dts index 2b3eb606a10e..d23e7d0df165 100644 --- a/arch/arm64/boot/dts/freescale/fsl-imx8qm-mek-dom0.dts +++ b/arch/arm64/boot/dts/freescale/fsl-imx8qm-mek-dom0.dts @@ -1,5 +1,5 @@ /* - * Copyright 2018 NXP + * Copyright 2018-2019 NXP * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -257,6 +257,9 @@ SC_P_ESAI0_TX3_RX2 SC_P_ESAI0_TX4_RX1 SC_P_ESAI0_TX5_RX0 + + /* lvds pwm */ + SC_P_LVDS1_GPIO00 >; gpios = <&gpio1 13 GPIO_ACTIVE_LOW>, @@ -920,3 +923,7 @@ &aud_rec_clk1_lpcg { xen,passthrough; }; + +&lvds1_pwm { + xen,passthrough; +}; diff --git a/arch/arm64/boot/dts/freescale/fsl-imx8qm-mek-domu.dts b/arch/arm64/boot/dts/freescale/fsl-imx8qm-mek-domu.dts index 702c8c22fc22..c4c1b7347f36 100644 --- a/arch/arm64/boot/dts/freescale/fsl-imx8qm-mek-domu.dts +++ b/arch/arm64/boot/dts/freescale/fsl-imx8qm-mek-domu.dts @@ -216,6 +216,24 @@ clock-names = "apb_pclk"; }; + lvds_backlight1: lvds_backlight@1 { + compatible = "pwm-backlight"; + pwms = <&lvds1_pwm 0 100000 0>; + + brightness-levels = < 0 1 2 3 4 5 6 7 8 9 + 10 11 12 13 14 15 16 17 18 19 + 20 21 22 23 24 25 26 27 28 29 + 30 31 32 33 34 35 36 37 38 39 + 40 41 42 43 44 45 46 47 48 49 + 50 51 52 53 54 55 56 57 58 59 + 60 61 62 63 64 65 66 67 68 69 + 70 71 72 73 74 75 76 77 78 79 + 80 81 82 83 84 85 86 87 88 89 + 90 91 92 93 94 95 96 97 98 99 + 100>; + default-brightness-level = <80>; + }; + passthrough { compatible = "simple-bus"; ranges; @@ -666,7 +684,6 @@ /delete-node/ &lvds_region1; /delete-node/ &ldb1_phy; /delete-node/ &ldb1; -/delete-node/ &lvds1_pwm; /*/delete-node/ &camera;*/ /delete-node/ &adc0; /delete-node/ &adc1; @@ -984,6 +1001,12 @@ >; }; + pinctrl_lvds1_pwm0: lvds1pwm0grp { + fsl,pins = < + SC_P_LVDS1_GPIO00_LVDS1_PWM0_OUT 0x00000020 + >; + }; + pinctrl_lpuart1: lpuart1grp { fsl,pins = < SC_P_UART1_RX_DMA_UART1_RX 0x06000020 @@ -1239,3 +1262,9 @@ }; }; }; + +&lvds1_pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lvds1_pwm0>; + status = "okay"; +}; -- 2.17.1