From adb8b9638b6de3a641f00b4c607ed9dd6293a19e Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Wed, 21 Dec 2022 18:00:35 +0100 Subject: apalis-imx8: lvds: move to one overlay per panel - Move to use only one overlay file for each panel/connection variant - Move lvds overlays to new naming - Adapt to dtb changes used in BSP6, 5.15-2.1.x kernel - Rename *mezzanine-can* to *mezzanine_can* Related-to: ELB-4896 ELB-4901 Signed-off-by: Max Krummenacher --- overlays/Makefile | 8 +- overlays/apalis-imx8_atmel-mxt_overlay.dts | 17 ---- overlays/apalis-imx8_lvds_overlay.dts | 24 ------ overlays/apalis-imx8_mezzanine-can_overlay.dts | 30 ------- overlays/apalis-imx8_mezzanine_can_overlay.dts | 30 +++++++ overlays/apalis-imx8_mezzanine_lvds_overlay.dts | 69 --------------- ...zzanine_panel-cap-touch-10inch-lvds_overlay.dts | 98 ++++++++++++++++++++++ ...is-imx8_panel-cap-touch-10inch-lvds_overlay.dts | 57 +++++++++++++ ...-imx8_panel-lvds-dual-channel-1080p_overlay.dts | 58 +++++++++++++ 9 files changed, 247 insertions(+), 144 deletions(-) delete mode 100644 overlays/apalis-imx8_atmel-mxt_overlay.dts delete mode 100644 overlays/apalis-imx8_lvds_overlay.dts delete mode 100644 overlays/apalis-imx8_mezzanine-can_overlay.dts create mode 100644 overlays/apalis-imx8_mezzanine_can_overlay.dts delete mode 100644 overlays/apalis-imx8_mezzanine_lvds_overlay.dts create mode 100644 overlays/apalis-imx8_mezzanine_panel-cap-touch-10inch-lvds_overlay.dts create mode 100644 overlays/apalis-imx8_panel-cap-touch-10inch-lvds_overlay.dts create mode 100644 overlays/apalis-imx8_panel-lvds-dual-channel-1080p_overlay.dts diff --git a/overlays/Makefile b/overlays/Makefile index 49ebdbe..609c11e 100644 --- a/overlays/Makefile +++ b/overlays/Makefile @@ -20,13 +20,13 @@ HOSTCC := gcc $(DTS_INCLUDES) PWD := $(shell pwd) dtb-y += apalis-imx8_ar0521_overlay.dtbo -dtb-y += apalis-imx8_atmel-mxt_overlay.dtbo dtb-y += apalis-imx8_hdmi_overlay.dtbo -dtb-y += apalis-imx8_lvds_overlay.dtbo -dtb-y += apalis-imx8_mezzanine-can_overlay.dtbo -dtb-y += apalis-imx8_mezzanine_lvds_overlay.dtbo +dtb-y += apalis-imx8_mezzanine_can_overlay.dtbo dtb-y += apalis-imx8_mezzanine_ov5640_overlay.dtbo +dtb-y += apalis-imx8_mezzanine_panel-cap-touch-10inch-lvds_overlay.dtbo dtb-y += apalis-imx8_ov5640_overlay.dtbo +dtb-y += apalis-imx8_panel-cap-touch-10inch-lvds_overlay.dtbo +dtb-y += apalis-imx8_panel-lvds-dual-channel-1080p_overlay.dtbo dtb-y += apalis-imx8_resistive-touch_overlay.dtbo dtb-y += apalis-imx8_spi1_spidev_overlay.dtbo dtb-y += apalis-imx8_spi2_spidev_overlay.dtbo diff --git a/overlays/apalis-imx8_atmel-mxt_overlay.dts b/overlays/apalis-imx8_atmel-mxt_overlay.dts deleted file mode 100644 index a823f67..0000000 --- a/overlays/apalis-imx8_atmel-mxt_overlay.dts +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/* - * Copyright 2020-2021 Toradex - */ - -// Atmel MXT touchscreen for the 7 inch and 10 inch display orderable at Toradex. - -/dts-v1/; -/plugin/; - -/ { - compatible = "toradex,apalis-imx8"; -}; - -&atmel_mxt_ts { - status = "okay"; -}; diff --git a/overlays/apalis-imx8_lvds_overlay.dts b/overlays/apalis-imx8_lvds_overlay.dts deleted file mode 100644 index fa50c1f..0000000 --- a/overlays/apalis-imx8_lvds_overlay.dts +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/* - * Copyright 2020-2021 Toradex - */ - -// Enable a generic LVDS display. - -/dts-v1/; -/plugin/; -/ { - compatible = "toradex,apalis-imx8"; -}; - -&ldb2 { - status = "okay"; -}; - -&ldb2_phy { - status = "okay"; -}; - -&panel_lvds { - status = "okay"; -}; diff --git a/overlays/apalis-imx8_mezzanine-can_overlay.dts b/overlays/apalis-imx8_mezzanine-can_overlay.dts deleted file mode 100644 index 0bcab87..0000000 --- a/overlays/apalis-imx8_mezzanine-can_overlay.dts +++ /dev/null @@ -1,30 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/* - * Copyright 2020-2021 Toradex - */ - -// Apalis iMX8 Mezzanine CAN overlay - -/dts-v1/; -/plugin/; - -#include - -/ { - compatible = "toradex,apalis-imx8"; -}; - -/* Please note atmel_mxt_ts node should be disabled */ -&flexcan3 { - status = "okay"; -}; - -&lsio_gpio2 { - /* Disable CAN transceiver silent mode */ - CAN_SILENT { - gpio-hog; - gpios = <18 GPIO_ACTIVE_HIGH>; /* SODIMM 193 */ - line-name = "CAN_SILENT"; - output-low; - }; -}; diff --git a/overlays/apalis-imx8_mezzanine_can_overlay.dts b/overlays/apalis-imx8_mezzanine_can_overlay.dts new file mode 100644 index 0000000..0bcab87 --- /dev/null +++ b/overlays/apalis-imx8_mezzanine_can_overlay.dts @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2020-2021 Toradex + */ + +// Apalis iMX8 Mezzanine CAN overlay + +/dts-v1/; +/plugin/; + +#include + +/ { + compatible = "toradex,apalis-imx8"; +}; + +/* Please note atmel_mxt_ts node should be disabled */ +&flexcan3 { + status = "okay"; +}; + +&lsio_gpio2 { + /* Disable CAN transceiver silent mode */ + CAN_SILENT { + gpio-hog; + gpios = <18 GPIO_ACTIVE_HIGH>; /* SODIMM 193 */ + line-name = "CAN_SILENT"; + output-low; + }; +}; diff --git a/overlays/apalis-imx8_mezzanine_lvds_overlay.dts b/overlays/apalis-imx8_mezzanine_lvds_overlay.dts deleted file mode 100644 index 7e2de0a..0000000 --- a/overlays/apalis-imx8_mezzanine_lvds_overlay.dts +++ /dev/null @@ -1,69 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/* - * Copyright 2020-2021 Toradex - */ - -// LVDS display overlay for Apalis Evaluation board Mezzanine -#include - -/dts-v1/; -/plugin/; -/ { - compatible = "toradex,apalis-imx8"; -}; - -&ldb1 { - status = "okay"; - - lvds-channel@0 { - #address-cells = <1>; - #size-cells = <0>; - - fsl,data-mapping = "spwg"; - fsl,data-width = <24>; - status = "okay"; - - port@1 { - reg = <1>; - - lvds1_out: endpoint { - remote-endpoint = <&panel_lvds_in>; - }; - }; - }; -}; - -&ldb1_phy { - status = "okay"; -}; - -&panel_lvds { - status = "okay"; -}; - -/* Enable 10" LVDS backlight LVDS_0_BKL1_ON */ -&lsio_gpio1 { - LVDS_0_BKL1_ON { - gpio-hog; - gpios = <22 GPIO_ACTIVE_HIGH>; - line-name = "LVDS_0_BKL1_ON"; - output-high; - }; -}; - -/* - * Put LVDS_0_PWM_BKL1 (GPIO8) low. GPIO8 is shared with gpio-fan. - * JP20 should be set to 1-2 (automatic) instead of GPIO8 (2-3). - */ -&lsio_gpio3 { - PWM_BKL1 { - gpio-hog; - gpios = <28 GPIO_ACTIVE_HIGH>; - line-name = "LVDS_0_PWM_BKL1"; - output-low; - }; -}; - -&gpio_fan { - status = "disabled"; -}; diff --git a/overlays/apalis-imx8_mezzanine_panel-cap-touch-10inch-lvds_overlay.dts b/overlays/apalis-imx8_mezzanine_panel-cap-touch-10inch-lvds_overlay.dts new file mode 100644 index 0000000..84f485b --- /dev/null +++ b/overlays/apalis-imx8_mezzanine_panel-cap-touch-10inch-lvds_overlay.dts @@ -0,0 +1,98 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2020-2022 Toradex + */ + +/* + * Apalis iMX8 driving the Capacitive Touch Display 10.1" LVDS connected to + * the Apalis Evaluation board Mezzanine. + */ +#include + +/dts-v1/; +/plugin/; +/ { + compatible = "toradex,apalis-imx8", "toradex,apalis-imx8-v1.1"; +}; + +&ldb1 { + status = "okay"; + + lvds-channel@0 { + #address-cells = <1>; + #size-cells = <0>; + + fsl,data-mapping = "spwg"; + fsl,data-width = <24>; + status = "okay"; + + port@1 { + reg = <1>; + + lvds2_out: endpoint { + remote-endpoint = <&panel2_lvds_in>; + }; + }; + }; +}; + +&ldb1_phy { + status = "okay"; +}; + +&{/} { + panel2_lvds: panel2-lvds { + compatible = "panel-lvds"; + data-mapping = "vesa-24"; + height-mm = <136>; + width-mm = <217>; + status = "okay"; + + panel-timing { + clock-frequency = <68900000 71100000 73400000>; + de-active = <1>; + hactive = <1280 1280 1280>; + hback-porch = <23 60 71>; + hfront-porch = <23 60 71>; + hsync-len = <15 40 47>; + pixelclk-active = <1>; /* positive edge */ + vactive = <800 800 800>; + vback-porch = <5 7 10>; + vfront-porch = <5 7 10>; + vsync-len = <6 9 12>; + }; + + port { + panel2_lvds_in: endpoint { + remote-endpoint = <&lvds2_out>; + }; + }; + }; +}; + +/* Enable 10" LVDS backlight LVDS_0_BKL1_ON */ +&lsio_gpio1 { + LVDS_0_BKL1_ON { + gpio-hog; + gpios = <22 GPIO_ACTIVE_HIGH>; + line-name = "LVDS_0_BKL1_ON"; + output-high; + }; +}; + +/* + * Put LVDS_0_PWM_BKL1 (GPIO8) low. GPIO8 is shared with gpio-fan. + * JP20 should be set to 1-2 (automatic) instead of GPIO8 (2-3). + */ +&lsio_gpio3 { + PWM_BKL1 { + gpio-hog; + gpios = <28 GPIO_ACTIVE_HIGH>; + line-name = "LVDS_0_PWM_BKL1"; + output-low; + }; +}; + +&gpio_fan { + status = "disabled"; +}; diff --git a/overlays/apalis-imx8_panel-cap-touch-10inch-lvds_overlay.dts b/overlays/apalis-imx8_panel-cap-touch-10inch-lvds_overlay.dts new file mode 100644 index 0000000..7c93473 --- /dev/null +++ b/overlays/apalis-imx8_panel-cap-touch-10inch-lvds_overlay.dts @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2020-2022 Toradex + */ + +/* Apalis iMX8 driving the Capacitive Touch Display 10.1" LVDS. */ + +/dts-v1/; +/plugin/; +/ { + compatible = "toradex,apalis-imx8", "toradex,apalis-imx8-v1.1"; +}; + +&atmel_mxt_ts { + status = "okay"; +}; + +&backlight { + status = "okay"; +}; + +&ldb2 { + status = "okay"; + + lvds-channel@0 { + status = "okay"; + }; +}; + +&ldb2_phy { + status = "okay"; +}; + +&panel_lvds { + data-mapping = "vesa-24"; + height-mm = <136>; + width-mm = <217>; + status = "okay"; + + panel-timing { + clock-frequency = <68900000 71100000 73400000>; + de-active = <1>; + hactive = <1280 1280 1280>; + hback-porch = <23 60 71>; + hfront-porch = <23 60 71>; + hsync-len = <15 40 47>; + pixelclk-active = <1>; /* positive edge */ + vactive = <800 800 800>; + vback-porch = <5 7 10>; + vfront-porch = <5 7 10>; + vsync-len = <6 9 12>; + }; +}; + +&pwm_lvds1 { + status = "okay"; +}; diff --git a/overlays/apalis-imx8_panel-lvds-dual-channel-1080p_overlay.dts b/overlays/apalis-imx8_panel-lvds-dual-channel-1080p_overlay.dts new file mode 100644 index 0000000..0deb3b0 --- /dev/null +++ b/overlays/apalis-imx8_panel-lvds-dual-channel-1080p_overlay.dts @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2020-2022 Toradex + */ + +/* Apalis iMX8 driving a LP156WF1 display (15 inch) with a resolution + * of 1920x1080 pixel. + * This serves as an example how to specify a dual link LVDS display. + */ + +/dts-v1/; +/plugin/; +/ { + compatible = "toradex,apalis-imx8", "toradex,apalis-imx8-v1.1"; +}; + +&backlight { + status = "okay"; +}; + +&ldb2 { + fsl,dual-channel; + status = "okay"; + + lvds-channel@0 { + fsl,data-mapping = "spwg"; + fsl,data-width = <18>; + status = "okay"; + }; +}; + +&ldb2_phy { + status = "okay"; +}; + +&panel_lvds { + data-mapping = "jeida-18"; + height-mm = <194>; + width-mm = <345>; + status = "okay"; + + panel-timing { + clock-frequency = <138500000>; + hactive = <1920>; + hback-porch = <40>; + hfront-porch = <24>; + hsync-len = <16>; + pixelclk-active = <0>; + vactive = <1080>; + vback-porch = <23>; + vfront-porch = <3>; + vsync-len = <5>; + }; +}; + +&pwm_lvds1 { + status = "okay"; +}; -- cgit v1.2.3