diff options
47 files changed, 2002 insertions, 238 deletions
diff --git a/overlays/Makefile b/overlays/Makefile index 394a3d1..3123d76 100644 --- a/overlays/Makefile +++ b/overlays/Makefile @@ -24,6 +24,7 @@ dtb-y += apalis-imx6_adv7280_overlay.dtbo dtb-y += apalis-imx6_hdmi_overlay.dtbo dtb-y += apalis-imx6_nau8822-btl_overlay.dtbo dtb-y += apalis-imx6_ov5640-v11a_overlay.dtbo +dtb-y += apalis-imx6_ov5640-27mhz_overlay.dtbo dtb-y += apalis-imx6_ov5640_overlay.dtbo dtb-y += apalis-imx6_panel-cap-touch-7inch_overlay.dtbo dtb-y += apalis-imx6_panel-cap-touch-10inch_overlay.dtbo @@ -53,21 +54,42 @@ dtb-y += colibri-imx7_panel-cap-touch-10inch-lvds_overlay.dtbo dtb-y += colibri-imx7_panel-res-touch-7inch_overlay.dtbo dtb-y += colibri-imx7_spidev_overlay.dtbo dtb-y += colibri-imx7_vga-640x480_overlay.dtbo +dtb-y += colibri-imx8x_hmp_overlay.dtbo +dtb-y += toradex-smarc-imx8mp_csi0-ov5640-27mhz_overlay.dtbo +dtb-y += toradex-smarc-imx8mp_csi1-ov5640-27mhz_overlay.dtbo +dtb-y += toradex-smarc-imx8mp_dsi-to-hdmi_overlay.dtbo +dtb-y += toradex-smarc-imx8mp_panel-cap-touch-10inch-dsi_overlay.dtbo +dtb-y += toradex-smarc-imx8mp_panel-cap-touch-10inch-lvds_overlay.dtbo +dtb-y += toradex-smarc-imx8mp_panel-cap-touch-7inch-dsi_overlay.dtbo +dtb-y += toradex-smarc-imx8mp_spi0-cs0_spidev_overlay.dtbo +dtb-y += toradex-smarc-imx8mp_spi0-cs1_spidev_overlay.dtbo +dtb-y += toradex-smarc-imx8mp_spi1-cs0_spidev_overlay.dtbo +dtb-y += toradex-smarc-imx8mp_spi1-cs1_spidev_overlay.dtbo dtb-y += verdin-am62_dsi-to-hdmi_overlay.dtbo dtb-y += verdin-am62_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dtbo dtb-y += verdin-am62_nau8822-btl_overlay.dtbo +dtb-y += verdin-am62_ov5640-27mhz_overlay.dtbo +dtb-y += verdin-am62_ov5640_overlay.dtbo +dtb-y += verdin-am62_panel-cap-touch-7inch-dsi_overlay.dtbo dtb-y += verdin-am62_panel-cap-touch-10inch-dsi_overlay.dtbo dtb-y += verdin-am62_spidev_overlay.dtbo dtb-y += verdin-imx8mm_dsi-to-hdmi_overlay.dtbo dtb-y += verdin-imx8mm_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dtbo dtb-y += verdin-imx8mm_hmp_overlay.dtbo dtb-y += verdin-imx8mm_nau8822-btl_overlay.dtbo +dtb-y += verdin-imx8mm_ov5640-27mhz_overlay.dtbo +dtb-y += verdin-imx8mm_ov5640_overlay.dtbo +dtb-y += verdin-imx8mm_panel-cap-touch-7inch-dsi_overlay.dtbo dtb-y += verdin-imx8mm_panel-cap-touch-10inch-dsi_overlay.dtbo dtb-y += verdin-imx8mm_spidev_overlay.dtbo dtb-y += verdin-imx8mp_dsi-to-hdmi_overlay.dtbo dtb-y += verdin-imx8mp_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dtbo dtb-y += verdin-imx8mp_nau8822-btl_overlay.dtbo +dtb-y += verdin-imx8mp_ov5640-27mhz_overlay.dtbo +dtb-y += verdin-imx8mp_ov5640_overlay.dtbo +dtb-y += verdin-imx8mp_panel-cap-touch-7inch-dsi_overlay.dtbo dtb-y += verdin-imx8mp_panel-cap-touch-10inch-dsi_overlay.dtbo +dtb-y += verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dtbo dtb-y += verdin-imx8mp_spidev_overlay.dtbo targets += $(dtb-y) diff --git a/overlays/apalis-imx6_ov5640-27mhz_overlay.dts b/overlays/apalis-imx6_ov5640-27mhz_overlay.dts new file mode 100644 index 0000000..232d738 --- /dev/null +++ b/overlays/apalis-imx6_ov5640-27mhz_overlay.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2025 Toradex + * + * CSI Camera Module OV5640 with 27MHz Oscillator overlay for Apalis-iMX6 + * + * https://developer.toradex.com/hardware/accessories/cameras/csi-camera-module-5mp-ov5640-arducam + */ + +/dts-v1/; +/plugin/; + +&clk_ov5640_osc { + clock-frequency = <27000000>; +}; diff --git a/overlays/apalis-imx6_ov5640_overlay.dts b/overlays/apalis-imx6_ov5640_overlay.dts index 5593835..949f957 100644 --- a/overlays/apalis-imx6_ov5640_overlay.dts +++ b/overlays/apalis-imx6_ov5640_overlay.dts @@ -8,18 +8,33 @@ /dts-v1/; /plugin/; +#include <dt-bindings/gpio/gpio.h> #include <imx6q-pinfunc.h> / { compatible = "toradex,apalis_imx6q"; }; +&{/} { + regulator_camera: regulator-camera { + compatible = "regulator-fixed"; + /* Apalis GPIO4 - CSI Camera Connector 24 */ + gpio = <&gpio2 7 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-name = "V_CSI"; + startup-delay-us = <5000>; + }; +}; + &i2c3 { status = "okay"; }; &ov5640_csi_cam { clocks = <&clk_ov5640_osc>; + AVDD-supply = <®ulator_camera>; + DOVDD-supply = <®ulator_camera>; + DVDD-supply = <®ulator_camera>; status = "okay"; }; diff --git a/overlays/apalis-imx6_panel-edt-5.7inch_overlay.dts b/overlays/apalis-imx6_panel-edt-5.7inch_overlay.dts index cbe2b6e..7718242 100644 --- a/overlays/apalis-imx6_panel-edt-5.7inch_overlay.dts +++ b/overlays/apalis-imx6_panel-edt-5.7inch_overlay.dts @@ -13,6 +13,5 @@ compatible = "toradex,apalis_imx6q"; }; -#include "apalis-imx6_stmpe-ts_overlay.dtsi" #include "apalis-imx6_parallel-rgb_overlay.dtsi" #include "display-edt5.7_overlay.dtsi" diff --git a/overlays/apalis-imx6_panel-edt-7inch_overlay.dts b/overlays/apalis-imx6_panel-edt-7inch_overlay.dts index 623119e..a11a907 100644 --- a/overlays/apalis-imx6_panel-edt-7inch_overlay.dts +++ b/overlays/apalis-imx6_panel-edt-7inch_overlay.dts @@ -13,6 +13,5 @@ compatible = "toradex,apalis_imx6q"; }; -#include "apalis-imx6_stmpe-ts_overlay.dtsi" #include "apalis-imx6_parallel-rgb_overlay.dtsi" #include "display-edt7_overlay.dtsi" diff --git a/overlays/apalis-imx6_panel-res-touch-7inch_overlay.dts b/overlays/apalis-imx6_panel-res-touch-7inch_overlay.dts index caf4943..7684a69 100644 --- a/overlays/apalis-imx6_panel-res-touch-7inch_overlay.dts +++ b/overlays/apalis-imx6_panel-res-touch-7inch_overlay.dts @@ -13,6 +13,5 @@ compatible = "toradex,apalis_imx6q"; }; -#include "apalis-imx6_stmpe-ts_overlay.dtsi" #include "apalis-imx6_parallel-rgb_overlay.dtsi" #include "display-lt161010_overlay.dtsi" diff --git a/overlays/apalis-imx6_stmpe-ts_overlay.dtsi b/overlays/apalis-imx6_stmpe-ts_overlay.dtsi deleted file mode 100644 index f75fd83..0000000 --- a/overlays/apalis-imx6_stmpe-ts_overlay.dtsi +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/* - * Copyright 2020-2022 Toradex - */ - -// Resistive STMPE touch controller for the 7" display orderable -// at Toradex. - -&stmpe_ts { - status = "okay"; -}; diff --git a/overlays/colibri-imx6_panel-res-touch-7inch_overlay.dts b/overlays/colibri-imx6_panel-res-touch-7inch_overlay.dts index 3ef2652..48323c9 100644 --- a/overlays/colibri-imx6_panel-res-touch-7inch_overlay.dts +++ b/overlays/colibri-imx6_panel-res-touch-7inch_overlay.dts @@ -17,5 +17,4 @@ }; #include "colibri-imx6_parallel-rgb_overlay.dtsi" -#include "colibri-imx6_stmpe-ts_overlay.dtsi" #include "display-lt161010_overlay.dtsi" diff --git a/overlays/colibri-imx6_stmpe-ts_overlay.dtsi b/overlays/colibri-imx6_stmpe-ts_overlay.dtsi deleted file mode 100644 index f75fd83..0000000 --- a/overlays/colibri-imx6_stmpe-ts_overlay.dtsi +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/* - * Copyright 2020-2022 Toradex - */ - -// Resistive STMPE touch controller for the 7" display orderable -// at Toradex. - -&stmpe_ts { - status = "okay"; -}; diff --git a/overlays/colibri-imx8x_hmp_overlay.dts b/overlays/colibri-imx8x_hmp_overlay.dts new file mode 100644 index 0000000..de56bb9 --- /dev/null +++ b/overlays/colibri-imx8x_hmp_overlay.dts @@ -0,0 +1,73 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* Copyright 2025 Toradex */ + +// Enable RPMSG and RemoteProc for Colibri iMX8X + +/dts-v1/; +/plugin/; + +#include <dt-bindings/firmware/imx/rsrc.h> + +/ { + compatible = "toradex,colibri-imx8x"; +}; + +&{/} { + #address-cells = <2>; + #size-cells = <2>; + + imx8x-cm4 { + compatible = "fsl,imx8qxp-cm4"; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&lsio_mu5 0 1 + &lsio_mu5 1 1 + &lsio_mu5 3 1>; + memory-region = <&vdev0buffer>, <&vdev0vring0>, <&vdev0vring1>, + <&vdev1vring0>, <&vdev1vring1>, <&rsc_table>; + power-domains = <&pd IMX_SC_R_M4_0_PID0>, + <&pd IMX_SC_R_M4_0_MU_1A>; + fsl,entry-address = <0x34fe0000>; + fsl,resource-id = <IMX_SC_R_M4_0_PID0>; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + vdev0vring0: vdev0vring0@90000000 { + reg = <0 0x90000000 0 0x8000>; + no-map; + }; + + vdev0vring1: vdev0vring1@90008000 { + reg = <0 0x90008000 0 0x8000>; + no-map; + }; + + vdev1vring0: vdev1vring0@90010000 { + reg = <0 0x90010000 0 0x8000>; + no-map; + }; + + vdev1vring1: vdev1vring1@90018000 { + reg = <0 0x90018000 0 0x8000>; + no-map; + }; + + rsc_table: rsc-table@900ff000 { + reg = <0 0x900ff000 0 0x1000>; + no-map; + }; + + vdev0buffer: vdev0buffer@90400000 { + compatible = "shared-dma-pool"; + reg = <0 0x90400000 0 0x100000>; + no-map; + }; + }; +}; + +&lsio_mu5 { + status = "okay"; +}; diff --git a/overlays/display-lt170410-dsi-lvds_overlay.dtsi b/overlays/display-lt170410-dsi-lvds_overlay.dtsi new file mode 100644 index 0000000..345fbdf --- /dev/null +++ b/overlays/display-lt170410-dsi-lvds_overlay.dtsi @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2025 Toradex + */ + +// LT170410 panel with a resolution of 1280x800 pixel. + +&{/} { + panel_lt170410: panel-lt170410 { + compatible = "panel-lvds"; + data-mapping = "vesa-24"; + height-mm = <136>; + width-mm = <217>; + + 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>; + }; + }; +}; diff --git a/overlays/display-lt170410_sn65dsi84_overlay.dtsi b/overlays/display-lt170410_sn65dsi84_overlay.dtsi deleted file mode 100644 index 14c8f3b..0000000 --- a/overlays/display-lt170410_sn65dsi84_overlay.dtsi +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/* - * Copyright 2022 Toradex - */ - -// Verdin DSI to LVDS Adapter with connected LT170410 display (10 inch) with a -// resolution of 1280x800 pixel. Adapter and display can be ordered at Toradex. - -&lvds_ti_sn65dsi84 { - status = "okay"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@2 { - reg = <2>; - - lvds_out_panel: endpoint { - remote-endpoint = <&panel_in_lvds>; - }; - }; - }; -}; - -&panel_lvds { - compatible = "panel-lvds"; - backlight = <&backlight>; - data-mapping = "vesa-24"; - height-mm = <136>; - power-supply = <®_3p3v>; - 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 { - panel_in_lvds: endpoint { - remote-endpoint = <&lvds_out_panel>; - }; - }; -}; diff --git a/overlays/display-rvt101hvdwc00b_overlay.dtsi b/overlays/display-rvt101hvdwc00b_overlay.dtsi index e5bf1b5..a84df5e 100644 --- a/overlays/display-rvt101hvdwc00b_overlay.dtsi +++ b/overlays/display-rvt101hvdwc00b_overlay.dtsi @@ -5,38 +5,32 @@ // RVT101HVDWC00-B DSI display (10 inch) with a resolution of 1280x800 pixel. -&panel_lvds { - compatible = "panel-lvds"; - backlight = <&backlight>; - data-mapping = "vesa-24"; - height-mm = <136>; - width-mm = <217>; - status = "okay"; +&{/} { + panel_rvt101hvdwc00: panel-rvt101hvdwc00 { + compatible = "panel-lvds"; + data-mapping = "vesa-24"; + height-mm = <136>; + width-mm = <217>; - /* - * These timings are hand-optimized and more stable then teorethical - * In particular HBP+HS should be 88 (display datasheet) - * Likely an higher value is needed due to dsi to lvds pipeline. - */ - panel-timing { - clock-frequency = <66300000 69300000 78900000>; - de-active = <1>; - hactive = <1280 1280 1280>; - hback-porch = <64 64 64>; - hfront-porch = <72 72 72>; - hsync-active = <0>; - hsync-len = <32 32 32>; - pixelclk-active = <1>; - vactive = <800 800 800>; - vback-porch = <15 15 15>; - vfront-porch = <15 15 15>; - vsync-active = <0>; - vsync-len = <8 8 8>; - }; - - port { - panel_in_lvds_riv: endpoint { - remote-endpoint = <&lvds_out_panel_riv>; + /* + * These timings are hand-optimized and more stable then teorethical + * In particular HBP+HS should be 88 (display datasheet) + * Likely an higher value is needed due to dsi to lvds pipeline. + */ + panel-timing { + clock-frequency = <66300000 69300000 78900000>; + de-active = <1>; + hactive = <1280 1280 1280>; + hback-porch = <64 64 64>; + hfront-porch = <72 72 72>; + hsync-active = <0>; + hsync-len = <32 32 32>; + pixelclk-active = <1>; + vactive = <800 800 800>; + vback-porch = <15 15 15>; + vfront-porch = <15 15 15>; + vsync-active = <0>; + vsync-len = <8 8 8>; }; }; }; diff --git a/overlays/display-rvt70hslnwca0_overlay.dtsi b/overlays/display-rvt70hslnwca0_overlay.dtsi new file mode 100644 index 0000000..70703c2 --- /dev/null +++ b/overlays/display-rvt70hslnwca0_overlay.dtsi @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2024 Toradex + */ + +// RVT70HSLNWCA0 DSI display (7 inch) with a resolution of 1024x600 pixel. + +&{/} { + panel_rvt70hslnwca0: panel-rvt70hslnwca0 { + compatible = "panel-lvds"; + data-mapping = "vesa-24"; + height-mm = <86>; + width-mm = <154>; + + /* + * These timings are hand-optimized for improved stability compared to + * theoretical values. Specifically, HBP is set to 100 and combined with + * HS to total 160, matching the original HBP value in the datasheet. The + * original horizontal timings caused issues with proper display functionality + * on iMX8* platforms. + */ + panel-timing { + clock-frequency = <40800000 51200000 67200000>; + de-active = <1>; + hactive = <1024>; + hback-porch = <100 100 100>; + hfront-porch = <16 160 216>; + hsync-active = <0>; + hsync-len = <50 60 140>; + pixelclk-active = <1>; + vactive = <600>; + vback-porch = <23 23 23>; + vfront-porch = <1 12 126>; + vsync-active = <0>; + vsync-len = <1 10 20>; + }; + }; +}; diff --git a/overlays/toradex-smarc-imx8mp_csi0-ov5640-27mhz_overlay.dts b/overlays/toradex-smarc-imx8mp_csi0-ov5640-27mhz_overlay.dts new file mode 100644 index 0000000..89f60a9 --- /dev/null +++ b/overlays/toradex-smarc-imx8mp_csi0-ov5640-27mhz_overlay.dts @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2025 Toradex + * + * CSI Camera Module OV5640 with 27MHz Oscillator overlay for SMARC CSI0 + * + * https://developer.toradex.com/hardware/accessories/cameras/csi-camera-module-5mp-ov5640-arducam + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/gpio/gpio.h> + +/ { + compatible = "toradex,smarc-imx8mp"; +}; + +&{/} { + clk_csi_0_ov5640: ov5640-csi-0-clock { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <27000000>; + }; + + regulator_camera_csi_0: regulator-camera-csi-0 { + compatible = "regulator-fixed"; + /* SMARC GPIO0 as CAM0_PWR# - Camera Connector 24 */ + gpios = <&som_gpio_expander 0 GPIO_ACTIVE_LOW>; + enable-active-high; + regulator-name = "V_CSI"; + startup-delay-us = <5000>; + }; +}; + +/* SMARC I2C_CAM0 */ +&i2c3 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + clocks = <&clk_csi_0_ov5640>; + clock-names = "xclk"; + /* SMARC GPIO2 as CAM0_RST# - Camera Connector 11 */ + reset-gpios = <&som_gpio_expander 2 GPIO_ACTIVE_LOW>; + AVDD-supply = <®ulator_camera_csi_0>; + DVDD-supply = <®ulator_camera_csi_0>; + DOVDD-supply = <®ulator_camera_csi_0>; + PVDD-supply = <®ulator_camera_csi_0>; + + port { + ov5640_cam0_ep: endpoint { + remote-endpoint = <&mipi_csi_1_ep>; + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&isi_0 { + status = "okay"; +}; + +/* SMARC CSI0 */ +&mipi_csi_1 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + mipi_csi_1_ep: endpoint { + remote-endpoint = <&ov5640_cam0_ep>; + data-lanes = <1 2>; + }; + }; + }; +}; diff --git a/overlays/toradex-smarc-imx8mp_csi1-ov5640-27mhz_overlay.dts b/overlays/toradex-smarc-imx8mp_csi1-ov5640-27mhz_overlay.dts new file mode 100644 index 0000000..e92fcbc --- /dev/null +++ b/overlays/toradex-smarc-imx8mp_csi1-ov5640-27mhz_overlay.dts @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2025 Toradex + * + * CSI Camera Module OV5640 with 27MHz Oscillator + * + * https://developer.toradex.com/hardware/accessories/cameras/csi-camera-module-5mp-ov5640-arducam + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/gpio/gpio.h> + +/ { + compatible = "toradex,smarc-imx8mp"; +}; + +&{/} { + clk_csi_1_ov5640: ov5640-csi-1-clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <27000000>; + }; + + regulator_camera_csi_1: regulator-camera-csi-1 { + compatible = "regulator-fixed"; + /* SMARC GPIO1 as CAM1_PWR# - Camera Connector 24 */ + gpios = <&som_gpio_expander 1 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-name = "V_CSI"; + startup-delay-us = <5000>; + }; +}; + +/* SMARC I2C_CAM1 */ +&i2c5 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + clocks = <&clk_csi_1_ov5640>; + clock-names = "xclk"; + /* SMARC GPIO3 as CAM1_RST# - Camera Connector 11 */ + reset-gpios = <&som_gpio_expander 3 GPIO_ACTIVE_LOW>; + AVDD-supply = <®ulator_camera_csi_1>; + DVDD-supply = <®ulator_camera_csi_1>; + DOVDD-supply = <®ulator_camera_csi_1>; + PVDD-supply = <®ulator_camera_csi_1>; + + port { + ov5640_cam1_ep: endpoint { + clock-lanes = <0>; + data-lanes = <1 2>; + remote-endpoint = <&mipi_csi_0_ep>; + }; + }; + }; +}; + +&isi_0 { + status = "okay"; +}; + +/* SMARC CSI1 */ +&mipi_csi_0 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + mipi_csi_0_ep: endpoint { + data-lanes = <1 2>; + remote-endpoint = <&ov5640_cam1_ep>; + }; + }; + }; +}; diff --git a/overlays/toradex-smarc-imx8mp_dsi-to-hdmi_overlay.dts b/overlays/toradex-smarc-imx8mp_dsi-to-hdmi_overlay.dts new file mode 100644 index 0000000..702acea --- /dev/null +++ b/overlays/toradex-smarc-imx8mp_dsi-to-hdmi_overlay.dts @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2025 Toradex + * + * LT8912B MIPI DSI to HDMI accessory + * + * https://developer.toradex.com/hardware/accessories/add-ons/dsi-hdmi-adapter + * https://www.toradex.com/accessories/verdin-dsi-to-hdmi-adapter + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/gpio/gpio.h> +#include "imx8mp-pinfunc.h" + +/ { + compatible = "toradex,smarc-imx8mp"; +}; + +&{/} { + dsi-hdmi-connector { + compatible = "hdmi-connector"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_hdmi_hpd>; + /* I2C on DSI Connector Pins 52/54 */ + ddc-i2c-bus = <&i2c_dsi_1>; + /* SMARC LCD1_BKLT_PWM as GPIO */ + hpd-gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>; + label = "DSI-HDMI"; + type = "a"; + + port { + hdmi_connector_in: endpoint { + remote-endpoint = <<8912_hdmi_out>; + }; + }; + }; +}; + +/* I2C on DSI Connector Pins 4/6 */ +&i2c_dsi_0 { + #address-cells = <1>; + #size-cells = <0>; + + bridge@48 { + compatible = "lontium,lt8912b"; + reg = <0x48>; + /* SMARC LCD1_BKLT_EN */ + reset-gpios = <&som_gpio_expander 7 GPIO_ACTIVE_LOW>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + lt8912_dsi_in: endpoint { + data-lanes = <1 2 3 4>; + remote-endpoint = <&mipi_dsi_bridge1_out>; + }; + }; + + port@1 { + reg = <1>; + + lt8912_hdmi_out: endpoint { + remote-endpoint = <&hdmi_connector_in>; + }; + }; + }; + }; +}; + +&lcdif1 { + status = "okay"; +}; + +&mipi_dsi { + samsung,esc-clock-frequency = <16000000>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + mipi_dsi_bridge1_out: endpoint { + attach-bridge; + remote-endpoint = <<8912_dsi_in>; + }; + }; + }; +}; + +/* SMARC LCD1_BKLT_PWM - Used as GPIO */ +&pwm1 { + status = "disabled"; +}; + +&iomuxc { + /* SMARC LCD1_BKLT_PWM as GPIO */ + pinctrl_hdmi_hpd: hdmihpdgpiogrp { + fsl,pins = <MX8MP_IOMUXC_SPDIF_EXT_CLK__GPIO5_IO05 0x104>; /* SMARC S122 - LCD1_BKLT_PWM */ + }; +}; diff --git a/overlays/toradex-smarc-imx8mp_panel-cap-touch-10inch-dsi_overlay.dts b/overlays/toradex-smarc-imx8mp_panel-cap-touch-10inch-dsi_overlay.dts new file mode 100644 index 0000000..d3c3f45 --- /dev/null +++ b/overlays/toradex-smarc-imx8mp_panel-cap-touch-10inch-dsi_overlay.dts @@ -0,0 +1,100 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2025 Toradex + * + * Capacitive Touch Display 10.1" DSI. + * + * https://developer.toradex.com/hardware/accessories/displays/capacitive-touch-display-101inch-dsi + * https://www.toradex.com/accessories/capacitive-touch-display-10.1-inch-dsi + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/pwm/pwm.h> + +#include "display-rvt101hvdwc00b_overlay.dtsi" +#include "toradex-smarc_backlight-lcd1_overlay.dtsi" + +/ { + compatible = "toradex,smarc-imx8mp"; +}; + +/* I2C on DSI Connector Pins 52/54 */ +&i2c_dsi_1 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + bridge@2c { + compatible = "ti,sn65dsi83"; + reg = <0x2c>; + /* SMARC LCD1_BKLT_EN */ + enable-gpios = <&som_gpio_expander 7 GPIO_ACTIVE_HIGH>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + dsi_lvds_bridge_in: endpoint { + data-lanes = <1 2 3 4>; + remote-endpoint = <&mipi_dsi_bridge1_out>; + }; + }; + + port@2 { + reg = <2>; + + dsi_lvds_bridge_out: endpoint { + remote-endpoint = <&panel_in_rvt101hvdwc00>; + }; + }; + }; + }; + + touch@41 { + compatible = "ilitek,ili2132"; + reg = <0x41>; + /* SMARC GPIO8 */ + interrupt-parent = <&gpio1>; + interrupts = <1 IRQ_TYPE_EDGE_RISING>; + }; +}; + +&lcdif1 { + status = "okay"; +}; + +&mipi_dsi { + samsung,esc-clock-frequency = <16000000>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + mipi_dsi_bridge1_out: endpoint { + attach-bridge; + remote-endpoint = <&dsi_lvds_bridge_in>; + }; + }; + }; +}; + +&panel_rvt101hvdwc00 { + backlight = <&backlight_lcd1>; + + port { + panel_in_rvt101hvdwc00: endpoint { + remote-endpoint = <&dsi_lvds_bridge_out>; + }; + }; +}; diff --git a/overlays/toradex-smarc-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts b/overlays/toradex-smarc-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts new file mode 100644 index 0000000..a5d6db0 --- /dev/null +++ b/overlays/toradex-smarc-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts @@ -0,0 +1,113 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2025 Toradex + * + * Capacitive Touch Display 10.1" LVDS + * + * https://developer.toradex.com/hardware/accessories/displays/capacitive-touch-display-101inch-lvds + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/clock/imx8mp-clock.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/pwm/pwm.h> + +/ { + compatible = "toradex,smarc-imx8mp"; +}; + +&{/} { + backlight_lcd0: backlight-lcd0 { + compatible = "pwm-backlight"; + brightness-levels = <0 45 63 88 119 158 203 255>; + default-brightness-level = <4>; + /* SMARC LCD0_BKLT_EN */ + enable-gpios = <&som_gpio_expander 5 GPIO_ACTIVE_HIGH>; + /* SMARC LCD0_BKLT_PWM */ + pwms = <&pwm2 0 6666667 PWM_POLARITY_INVERTED>; + }; + + panel-lvds0 { + compatible = "panel-lvds"; + backlight = <&backlight_lcd0>; + data-mapping = "vesa-24"; + height-mm = <136>; + width-mm = <217>; + + 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-active = <0>; + hsync-len = <15 40 47>; + pixelclk-active = <1>; + vactive = <800 800 800>; + vback-porch = <5 7 10>; + vfront-porch = <5 7 10>; + vsync-active = <0>; + vsync-len = <6 9 12>; + }; + + port { + panel_lvds0_in: endpoint { + remote-endpoint = <&ldb_lvds_ch0>; + }; + }; + }; +}; + +/* SMARC I2C_LCD */ +&i2c2 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + touch@4a { + compatible = "atmel,maxtouch"; + reg = <0x4a>; + /* SMARC GPIO06 */ + interrupt-parent = <&gpio4>; + interrupts = <29 IRQ_TYPE_EDGE_FALLING>; + /* SMARC GPIO04 */ + reset-gpios = <&gpio4 18 GPIO_ACTIVE_LOW>; + }; +}; + +&lcdif2 { + status = "okay"; +}; + +&lvds_bridge { + assigned-clocks = <&clk IMX8MP_CLK_MEDIA_LDB>, + <&clk IMX8MP_VIDEO_PLL1>; + /* + * This display uses 71.1 MHz pixel clock, so IMX8MP_VIDEO_PLL1 needs + * to be 7 times 71.1MHz, or 497.7 MHz as the internal divider will + * always divide the output LVDS clock by 7. + */ + assigned-clock-rates = <0>, <497700000>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + ldb_lvds_ch0: endpoint { + remote-endpoint = <&panel_lvds0_in>; + }; + }; + }; +}; + +/* SMARC LCD0_BKLT_PWM */ +&pwm2 { + status = "okay"; +}; diff --git a/overlays/toradex-smarc-imx8mp_panel-cap-touch-7inch-dsi_overlay.dts b/overlays/toradex-smarc-imx8mp_panel-cap-touch-7inch-dsi_overlay.dts new file mode 100644 index 0000000..258819b --- /dev/null +++ b/overlays/toradex-smarc-imx8mp_panel-cap-touch-7inch-dsi_overlay.dts @@ -0,0 +1,100 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2025 Toradex + * + * Capacitive Touch Display 7" DSI. + * + * https://developer.toradex.com/hardware/accessories/displays/capacitive-touch-display-7inch-dsi + * https://www.toradex.com/accessories/capacitive-touch-display-7-inch-dsi + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/pwm/pwm.h> + +#include "display-rvt70hslnwca0_overlay.dtsi" +#include "toradex-smarc_backlight-lcd1_overlay.dtsi" + +/ { + compatible = "toradex,smarc-imx8mp"; +}; + +/* I2C on DSI Connector Pins 52/54 */ +&i2c_dsi_1 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + bridge@2c { + compatible = "ti,sn65dsi83"; + reg = <0x2c>; + /* SMARC LCD1_BKLT_EN */ + enable-gpios = <&som_gpio_expander 7 GPIO_ACTIVE_HIGH>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + dsi_lvds_bridge_in: endpoint { + data-lanes = <1 2 3 4>; + remote-endpoint = <&mipi_dsi_bridge1_out>; + }; + }; + + port@2 { + reg = <2>; + + dsi_lvds_bridge_out: endpoint { + remote-endpoint = <&panel_in_rvt70hslnwca0>; + }; + }; + }; + }; + + touch@41 { + compatible = "ilitek,ili2132"; + reg = <0x41>; + /* SMARC GPIO8 */ + interrupt-parent = <&gpio1>; + interrupts = <1 IRQ_TYPE_EDGE_RISING>; + }; +}; + +&lcdif1 { + status = "okay"; +}; + +&mipi_dsi { + samsung,esc-clock-frequency = <16000000>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + mipi_dsi_bridge1_out: endpoint { + attach-bridge; + remote-endpoint = <&dsi_lvds_bridge_in>; + }; + }; + }; +}; + +&panel_rvt70hslnwca0 { + backlight = <&backlight_lcd1>; + + port { + panel_in_rvt70hslnwca0: endpoint { + remote-endpoint = <&dsi_lvds_bridge_out>; + }; + }; +}; diff --git a/overlays/toradex-smarc-imx8mp_spi0-cs0_spidev_overlay.dts b/overlays/toradex-smarc-imx8mp_spi0-cs0_spidev_overlay.dts new file mode 100644 index 0000000..abf4988 --- /dev/null +++ b/overlays/toradex-smarc-imx8mp_spi0-cs0_spidev_overlay.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2025 Toradex + * + * SMARC SPI0 CS0 spidev overlay. + */ + +/dts-v1/; +/plugin/; + +/ { + compatible = "toradex,smarc-imx8mp"; +}; + +/* SMARC SPI0 */ +&ecspi1 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + spidev@0 { + compatible = "rohm,dh2228fv"; + reg = <0>; + spi-max-frequency = <10000000>; + }; +}; diff --git a/overlays/toradex-smarc-imx8mp_spi0-cs1_spidev_overlay.dts b/overlays/toradex-smarc-imx8mp_spi0-cs1_spidev_overlay.dts new file mode 100644 index 0000000..4b367b9 --- /dev/null +++ b/overlays/toradex-smarc-imx8mp_spi0-cs1_spidev_overlay.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2025 Toradex + * + * SMARC SPI0 CS1 spidev overlay. + */ + +/dts-v1/; +/plugin/; + +/ { + compatible = "toradex,smarc-imx8mp"; +}; + +/* SMARC SPI0 */ +&ecspi1 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + spidev@1 { + compatible = "rohm,dh2228fv"; + reg = <1>; + spi-max-frequency = <10000000>; + }; +}; diff --git a/overlays/toradex-smarc-imx8mp_spi1-cs0_spidev_overlay.dts b/overlays/toradex-smarc-imx8mp_spi1-cs0_spidev_overlay.dts new file mode 100644 index 0000000..c4cc780 --- /dev/null +++ b/overlays/toradex-smarc-imx8mp_spi1-cs0_spidev_overlay.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2025 Toradex + * + * SMARC SPI1 CS0 spidev overlay. + */ + +/dts-v1/; +/plugin/; + +/ { + compatible = "toradex,smarc-imx8mp"; +}; + +/* SMARC SPI1 */ +&ecspi2 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + spidev@0 { + compatible = "rohm,dh2228fv"; + reg = <0>; + spi-max-frequency = <10000000>; + }; +}; diff --git a/overlays/toradex-smarc-imx8mp_spi1-cs1_spidev_overlay.dts b/overlays/toradex-smarc-imx8mp_spi1-cs1_spidev_overlay.dts new file mode 100644 index 0000000..0164680 --- /dev/null +++ b/overlays/toradex-smarc-imx8mp_spi1-cs1_spidev_overlay.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2025 Toradex + * + * SMARC SPI1 CS1 spidev overlay. + */ + +/dts-v1/; +/plugin/; + +/ { + compatible = "toradex,smarc-imx8mp"; +}; + +/* SMARC SPI1 */ +&ecspi2 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + spidev@1 { + compatible = "rohm,dh2228fv"; + reg = <1>; + spi-max-frequency = <10000000>; + }; +}; diff --git a/overlays/toradex-smarc_backlight-lcd1_overlay.dtsi b/overlays/toradex-smarc_backlight-lcd1_overlay.dtsi new file mode 100644 index 0000000..15f001a --- /dev/null +++ b/overlays/toradex-smarc_backlight-lcd1_overlay.dtsi @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2025 Toradex + * + * SMARC LCD1 Backlight + */ + +&{/} { + backlight_lcd1: backlight-lcd1 { + compatible = "pwm-backlight"; + brightness-levels = <0 45 63 88 119 158 203 255>; + default-brightness-level = <4>; + /* SMARC LCD1_BKLT_PWM */ + pwms = <&pwm1 0 6666667 0>; + }; +}; + +/* SMARC LCD1_BKLT_PWM */ +&pwm1 { + status = "okay"; +}; diff --git a/overlays/verdin-am62_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts b/overlays/verdin-am62_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts index 35378de..fe2d536 100644 --- a/overlays/verdin-am62_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts +++ b/overlays/verdin-am62_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts @@ -59,6 +59,15 @@ }; }; }; + + reg_dsi_lvds: regulator-dsi-lvds { + compatible = "regulator-fixed"; + enable-active-high; + /* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */ + gpio = <&main_gpio0 31 GPIO_ACTIVE_HIGH>; + regulator-boot-on; + regulator-name = "DSI_1_PWR_EN"; + }; }; &dsi_bridge { @@ -101,6 +110,7 @@ /* Verdin Verdin DSI_1_INT# (SN65DSI84 IRQ, SODIMM 17, unused) */ /* Verdin DSI_1_BKL_EN (SODIMM 21) */ enable-gpios = <&main_gpio0 30 GPIO_ACTIVE_HIGH>; + vcc-supply = <®_dsi_lvds>; ports { #address-cells = <1>; @@ -138,5 +148,6 @@ pinctrl-0 = <&pinctrl_dsi1_int>, <&pinctrl_i2s_2_bclk_gpio>; /* Verdin I2S_2_BCLK (TOUCH_RESET#, SODIMM 42) */ reset-gpios = <&main_gpio0 35 GPIO_ACTIVE_LOW>; + vdd-supply = <®_dsi_lvds>; }; }; diff --git a/overlays/verdin-am62_mezzanine_can.dts b/overlays/verdin-am62_mezzanine_can.dts new file mode 100644 index 0000000..4c71caf --- /dev/null +++ b/overlays/verdin-am62_mezzanine_can.dts @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2024 Toradex + */ + +// Verdin AM62 Mezzanine CAN + +/dts-v1/; +/plugin/; + +#include "k3-pinctrl.h" + +/ { + compatible = "toradex,verdin-am62"; +}; + +&mcu_pmx0 { + pinctrl_mcu_mcan1: mcu-mcan1-default-pins { + pinctrl-single,pins = < + AM62X_MCU_IOPAD(0x0040, PIN_INPUT, 0) /* (D4) MCU_MCAN1_RX */ /* SODIMM 116 */ + AM62X_MCU_IOPAD(0x003c, PIN_OUTPUT, 0) /* (E5) MCU_MCAN1_TX */ /* SODIMM 128 */ + >; + }; +}; + +&mcu_mcan1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_mcu_mcan1>; + status = "okay"; +}; diff --git a/overlays/verdin-am62_ov5640-27mhz_overlay.dts b/overlays/verdin-am62_ov5640-27mhz_overlay.dts new file mode 100644 index 0000000..6a6ae1c --- /dev/null +++ b/overlays/verdin-am62_ov5640-27mhz_overlay.dts @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2025 Toradex + * + * CSI Camera Module OV5640 27MHz Oscillator + * + * https://developer.toradex.com/hardware/accessories/cameras/csi-camera-module-5mp-ov5640-arducam + */ + +/dts-v1/; +/plugin/; + +#include "verdin-am62_ov5640_overlay.dts" + +&clk_ov5640_osc { + clock-frequency = <27000000>; +}; diff --git a/overlays/verdin-am62_ov5640_overlay.dts b/overlays/verdin-am62_ov5640_overlay.dts new file mode 100644 index 0000000..a8c59b3 --- /dev/null +++ b/overlays/verdin-am62_ov5640_overlay.dts @@ -0,0 +1,79 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2023 Toradex + */ + +// CSI Camera Module 5MP OV5640 + +/dts-v1/; +/plugin/; + +#include <dt-bindings/gpio/gpio.h> + +/ { + compatible = "toradex,verdin-am62"; +}; + +&{/} { + clk_ov5640_osc: ov5640-xclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + }; + + regulator_camera: regulator-camera { + compatible = "regulator-fixed"; + /* Verdin GPIO_8_CSI - Camera Connector 24 */ + gpio = <&main_gpio0 42 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-name = "V_CSI"; + startup-delay-us = <5000>; + }; +}; + +&main_i2c3 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ov5640_csi_cam: camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + clocks = <&clk_ov5640_osc>; + clock-names = "xclk"; + AVDD-supply = <®ulator_camera>; + DVDD-supply = <®ulator_camera>; + DOVDD-supply = <®ulator_camera>; + /* Verdin GPIO6 - Camera Connector 22 */ + powerdown-gpios = <&main_gpio0 36 GPIO_ACTIVE_HIGH>; + /* Verdin GPIO5 - Camera Connector 11 */ + reset-gpios = <&main_gpio0 40 GPIO_ACTIVE_LOW>; + + port { + csi2_cam0: endpoint { + remote-endpoint = <&csi2rx0_in_sensor>; + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&csi0_port0 { + status = "okay"; + + csi2rx0_in_sensor: endpoint { + remote-endpoint = <&csi2_cam0>; + bus-type = <4>; /* CSI2 DPHY. */ + clock-lanes = <0>; + data-lanes = <1 2>; + }; +}; + +&dphy0 { + status = "okay"; +}; + +&ti_csi2rx0 { + status = "okay"; +}; diff --git a/overlays/verdin-am62_panel-cap-touch-10inch-dsi_overlay.dts b/overlays/verdin-am62_panel-cap-touch-10inch-dsi_overlay.dts index a56e845..1b97919 100644 --- a/overlays/verdin-am62_panel-cap-touch-10inch-dsi_overlay.dts +++ b/overlays/verdin-am62_panel-cap-touch-10inch-dsi_overlay.dts @@ -39,7 +39,7 @@ width-mm = <217>; panel-timing { - clock-frequency = <68900000 71100000 73400000>; + clock-frequency = <68900000 72400000 73400000>; de-active = <1>; hactive = <1280 1280 1280>; hback-porch = <88 88 88>; @@ -131,7 +131,7 @@ reg = <0x41>; /* Verdin DSI_1_INT# (TOUCH_INT#, SODIMM 17) */ interrupt-parent = <&main_gpio1>; - interrupts = <49 IRQ_TYPE_EDGE_FALLING>; + interrupts = <49 IRQ_TYPE_EDGE_RISING>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_dsi1_int>, <&pinctrl_i2s_2_bclk_gpio>; /* Verdin I2S_2_BCLK (TOUCH_RESET#, SODIMM 42) */ diff --git a/overlays/verdin-am62_panel-cap-touch-7inch-dsi_overlay.dts b/overlays/verdin-am62_panel-cap-touch-7inch-dsi_overlay.dts new file mode 100644 index 0000000..70955d2 --- /dev/null +++ b/overlays/verdin-am62_panel-cap-touch-7inch-dsi_overlay.dts @@ -0,0 +1,140 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2024 Toradex + */ + +// Verdin with connected Capacitive Touch Display 7" DSI. +// Adapter and display can be ordered at Toradex. + +/dts-v1/; +/plugin/; + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/pwm/pwm.h> + +/ { + compatible = "toradex,verdin-am62"; +}; + +&{/} { + backlight: backlight { + compatible = "pwm-backlight"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2s_2_d_out_gpio>; + brightness-levels = <0 45 63 88 119 158 203 255>; + default-brightness-level = <4>; + /* Verdin DSI_1_BKL_EN_LVDS (shared with I2S_2_D_OUT from MCASP1, SODIMM 46) */ + enable-gpios = <&main_gpio0 34 GPIO_ACTIVE_HIGH>; + power-supply = <®_3v3>; + /* Verdin PWM_3_DSI/PWM_3_DSI_LVDS (SODIMM 19) */ + pwms = <&epwm1 0 6666667 0>; + }; + + panel-lvds { + compatible = "panel-lvds"; + backlight = <&backlight>; + data-mapping = "vesa-24"; + height-mm = <86>; + width-mm = <154>; + + panel-timing { + clock-frequency = <40800000 51200000 67200000>; + de-active = <1>; + hactive = <1024>; + hback-porch = <160 160 160>; + hfront-porch = <16 160 216>; + hsync-active = <0>; + hsync-len = <1 5 140>; + pixelclk-active = <1>; + vactive = <600>; + vback-porch = <23 23 23>; + vfront-porch = <1 12 126>; + vsync-active = <0>; + vsync-len = <1 10 20>; + }; + + port { + panel_in_lvds: endpoint { + remote-endpoint = <&lvds_out_panel>; + }; + }; + }; +}; + +&dsi_bridge { + status = "okay"; +}; + +&dsi_bridge_ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + mipi_dsi_bridge1_out: endpoint { + remote-endpoint = <&dsi84_in>; + }; + }; +}; + +&dss { + status = "okay"; +}; + +/* Verdin PWM_3_DSI */ +&epwm1 { + status = "okay"; +}; + +/* Verdin I2C_2_DSI */ +&main_i2c2 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + bridge@2c { + compatible = "ti,sn65dsi83"; + reg = <0x2c>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_dsi1_bkl_en>; + /* SN65DSI83 IRQ, not connected) */ + /* Verdin DSI_1_BKL_EN (SODIMM 21) */ + enable-gpios = <&main_gpio0 30 GPIO_ACTIVE_HIGH>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + dsi84_in: endpoint { + data-lanes = <1 2 3 4>; + remote-endpoint = <&mipi_dsi_bridge1_out>; + }; + }; + + port@2 { + reg = <2>; + + lvds_out_panel: endpoint { + remote-endpoint = <&panel_in_lvds>; + }; + }; + }; + }; + + touch@41 { + compatible = "ilitek,ili2132"; + reg = <0x41>; + /* Verdin DSI_1_INT# (TOUCH_INT#, SODIMM 17) */ + interrupt-parent = <&main_gpio1>; + interrupts = <49 IRQ_TYPE_EDGE_RISING>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_dsi1_int>, <&pinctrl_i2s_2_bclk_gpio>; + /* Verdin I2S_2_BCLK (TOUCH_RESET#, SODIMM 42) */ + reset-gpios = <&main_gpio0 35 GPIO_ACTIVE_LOW>; + }; +}; diff --git a/overlays/verdin-imx8_mipi-dsi-to-sn65dsi84.dtsi b/overlays/verdin-imx8_mipi-dsi-to-sn65dsi84.dtsi deleted file mode 100644 index 889d175..0000000 --- a/overlays/verdin-imx8_mipi-dsi-to-sn65dsi84.dtsi +++ /dev/null @@ -1,56 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/* - * Copyright 2022 Toradex - */ - -// Common Code to setup MIPI DSI to SN65DSI84 - -#include <dt-bindings/gpio/gpio.h> - -&{/} { - reg_dsi_lvds: regulator-dsi-lvds { - compatible = "regulator-fixed"; - enable-active-high; - regulator-boot-on; - regulator-name = "DSI_1_PWR_EN"; - }; -}; - -&lvds_ti_sn65dsi84 { - compatible = "ti,sn65dsi84"; - vcc-supply = <®_dsi_lvds>; - status = "okay"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - - dsi84_in: endpoint { - data-lanes = <1 2 3 4>; - remote-endpoint = <&mipi_dsi_bridge1_out>; - }; - }; - }; -}; - -&mipi_dsi { - samsung,esc-clock-frequency = <16000000>; - status = "okay"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@1 { - reg = <1>; - - mipi_dsi_bridge1_out: endpoint { - attach-bridge; - remote-endpoint = <&dsi84_in>; - }; - }; - }; -}; diff --git a/overlays/verdin-imx8mm_backlight-dsi_overlay.dtsi b/overlays/verdin-imx8mm_backlight-dsi_overlay.dtsi new file mode 100644 index 0000000..ea1ab26 --- /dev/null +++ b/overlays/verdin-imx8mm_backlight-dsi_overlay.dtsi @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2025 Toradex + * + * Backlight on DSI connector + */ + +&{/} { + backlight_verdin_dsi: backlight-verdin-dsi { + compatible = "pwm-backlight"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2s_2_d_out_dsi_1_bkl_en>; + brightness-levels = <0 45 63 88 119 158 203 255>; + default-brightness-level = <4>; + /* Verdin I2S_2_D_OUT (DSI_1_BKL_EN/DSI_1_BKL_EN_LVDS, SODIMM 46) */ + enable-gpios = <&gpio3 24 GPIO_ACTIVE_HIGH>; + /* Verdin PWM_3_DSI */ + pwms = <&pwm1 0 6666667 0>; + }; +}; + +/* Verdin PWM_3_DSI */ +&pwm1 { + status = "okay"; +}; diff --git a/overlays/verdin-imx8mm_dsi-to-hdmi_overlay.dts b/overlays/verdin-imx8mm_dsi-to-hdmi_overlay.dts index 60172ac..c92354e 100644 --- a/overlays/verdin-imx8mm_dsi-to-hdmi_overlay.dts +++ b/overlays/verdin-imx8mm_dsi-to-hdmi_overlay.dts @@ -83,6 +83,8 @@ /* Verdin I2C_2_DSI */ &i2c2 { + /* Lower frequency to avoid DDC/EDID issues with certain displays/screens. */ + clock-frequency = <10000>; status = "okay"; }; diff --git a/overlays/verdin-imx8mm_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts b/overlays/verdin-imx8mm_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts index e9c1929..3ed39d0 100644 --- a/overlays/verdin-imx8mm_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts +++ b/overlays/verdin-imx8mm_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts @@ -13,38 +13,115 @@ compatible = "toradex,verdin-imx8mm"; }; -#include "verdin-imx8_mipi-dsi-to-sn65dsi84.dtsi" -#include "display-lt170410_sn65dsi84_overlay.dtsi" +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/pwm/pwm.h> -&atmel_mxt_ts { - vdd-supply = <®_dsi_lvds>; - status = "okay"; -}; +#include "verdin-imx8mm_backlight-dsi_overlay.dtsi" +#include "display-lt170410-dsi-lvds_overlay.dtsi" -&backlight { - status = "okay"; +&{/} { + reg_dsi_lvds: regulator-dsi-lvds { + compatible = "regulator-fixed"; + enable-active-high; + /* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */ + gpio = <&gpio5 1 GPIO_ACTIVE_HIGH>; + regulator-boot-on; + regulator-name = "DSI_1_PWR_EN"; + }; }; -/* Verdin I2C_2_DSI */ -&i2c2 { - status = "okay"; +&backlight_verdin_dsi { + pwms = <&pwm1 0 6666667 PWM_POLARITY_INVERTED>; }; /* Verdin I2C_1 */ &i2c4 { + #address-cells = <1>; + #size-cells = <0>; status = "okay"; + + bridge@2c { + compatible = "ti,sn65dsi84"; + reg = <0x2c>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_10_dsi>; + /* Verdin GPIO_9_DSI (SN65DSI84 IRQ, SODIMM 17, unused) */ + /* Verdin GPIO_10_DSI (SODIMM 21) */ + enable-gpios = <&gpio3 3 GPIO_ACTIVE_HIGH>; + vcc-supply = <®_dsi_lvds>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + dsi_lvds_bridge_in: endpoint { + data-lanes = <1 2 3 4>; + remote-endpoint = <&mipi_dsi_bridge1_out>; + }; + }; + + port@2 { + reg = <2>; + + dsi_lvds_bridge_out: endpoint { + remote-endpoint = <&panel_in_lt170410>; + }; + }; + }; + }; + + touch@4a { + compatible = "atmel,maxtouch"; + reg = <0x4a>; + /* + * Verdin GPIO_9_DSI + * (TOUCH_INT#, SODIMM 17, also routed to SN65DSI84 IRQ albeit currently unused) + */ + interrupt-parent = <&gpio3>; + interrupts = <15 IRQ_TYPE_EDGE_FALLING>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_9_dsi>, <&pinctrl_i2s_2_bclk_touch_reset>; + /* Verdin I2S_2_BCLK (TOUCH_RESET#, SODIMM 42) */ + reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>; + vdd-supply = <®_dsi_lvds>; + status = "okay"; + }; }; &lcdif { status = "okay"; }; -/* Verdin PWM_3_DSI */ -&pwm1 { +&mipi_dsi { + samsung,esc-clock-frequency = <16000000>; status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + mipi_dsi_bridge1_out: endpoint { + attach-bridge; + remote-endpoint = <&dsi_lvds_bridge_in>; + }; + }; + }; }; -®_dsi_lvds { - /* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */ - gpio = <&gpio5 1 GPIO_ACTIVE_HIGH>; +&panel_lt170410 { + backlight = <&backlight_verdin_dsi>; + + port { + panel_in_lt170410: endpoint { + remote-endpoint = <&dsi_lvds_bridge_out>; + }; + }; }; diff --git a/overlays/verdin-imx8mm_ov5640-27mhz_overlay.dts b/overlays/verdin-imx8mm_ov5640-27mhz_overlay.dts new file mode 100644 index 0000000..ccda70a --- /dev/null +++ b/overlays/verdin-imx8mm_ov5640-27mhz_overlay.dts @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2025 Toradex + * + * CSI Camera Module OV5640 with 27MHz Oscillator + * + * https://developer.toradex.com/hardware/accessories/cameras/csi-camera-module-5mp-ov5640-arducam + */ + +/dts-v1/; +/plugin/; + +#include "verdin-imx8mm_ov5640_overlay.dts" + +&clk_camera_verdin_csi { + clock-frequency = <27000000>; +}; diff --git a/overlays/verdin-imx8mm_ov5640_overlay.dts b/overlays/verdin-imx8mm_ov5640_overlay.dts new file mode 100644 index 0000000..6b8856f --- /dev/null +++ b/overlays/verdin-imx8mm_ov5640_overlay.dts @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2024 Toradex + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/clock/imx8mm-clock.h> +#include <dt-bindings/gpio/gpio.h> + +/ { + compatible = "toradex,verdin-imx8mm"; +}; + +&{/} { + clk_camera_verdin_csi: camera-verdin-csi-clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + }; + + regulator_camera: regulator-camera { + compatible = "regulator-fixed"; + /* Verdin GPIO_8_CSI - Camera Connector 24 */ + gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-name = "V_CSI"; + startup-delay-us = <5000>; + }; +}; + +&csi { + status = "okay"; +}; + +/* Verdin I2C_4_CSI */ +&i2c3 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio5>, <&pinctrl_gpio6>; + clocks = <&clk_camera_verdin_csi>; + clock-names = "xclk"; + AVDD-supply = <®ulator_camera>; + DOVDD-supply = <®ulator_camera>; + DVDD-supply = <®ulator_camera>; + /* Verdin GPIO6 - Camera Connector 22 */ + powerdown-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; + /* Verdin GPIO5 - Camera Connector 11 */ + reset-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; + + port { + ov5640_to_imx8mm_mipi_csi: endpoint { + remote-endpoint = <&imx8mm_mipi_csi_in>; + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&mipi_csi { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + imx8mm_mipi_csi_in: endpoint { + remote-endpoint = <&ov5640_to_imx8mm_mipi_csi>; + data-lanes = <1 2>; + }; + }; + }; +}; diff --git a/overlays/verdin-imx8mm_panel-cap-touch-10inch-dsi_overlay.dts b/overlays/verdin-imx8mm_panel-cap-touch-10inch-dsi_overlay.dts index a47709b..9e2aab3 100644 --- a/overlays/verdin-imx8mm_panel-cap-touch-10inch-dsi_overlay.dts +++ b/overlays/verdin-imx8mm_panel-cap-touch-10inch-dsi_overlay.dts @@ -14,11 +14,18 @@ #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/gpio/gpio.h> + #include "display-rvt101hvdwc00b_overlay.dtsi" +#include "verdin-imx8mm_backlight-dsi_overlay.dtsi" -&backlight { - pwms = <&pwm1 0 6666667 0>; - status = "okay"; +&panel_rvt101hvdwc00 { + backlight = <&backlight_verdin_dsi>; + + port { + panel_in_rvt101hvdwc00: endpoint { + remote-endpoint = <&dsi_lvds_bridge_out>; + }; + }; }; /* Verdin I2C_2_DSI */ @@ -35,6 +42,7 @@ enable-gpios = <&gpio3 3 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio_10_dsi>; + status = "okay"; ports { #address-cells = <1>; @@ -43,7 +51,7 @@ port@0 { reg = <0>; - dsi_riv_in: endpoint { + dsi_lvds_bridge_in: endpoint { data-lanes = <1 2 3 4>; remote-endpoint = <&mipi_dsi_bridge1_out>; }; @@ -52,8 +60,8 @@ port@2 { reg = <2>; - lvds_out_panel_riv: endpoint { - remote-endpoint = <&panel_in_lvds_riv>; + dsi_lvds_bridge_out: endpoint { + remote-endpoint = <&panel_in_rvt101hvdwc00>; }; }; }; @@ -64,11 +72,12 @@ reg = <0x41>; /* Verdin DSI_1_INT# (TOUCH_INT#, SODIMM 17) */ interrupt-parent = <&gpio3>; - interrupts = <15 IRQ_TYPE_LEVEL_LOW>; + interrupts = <15 IRQ_TYPE_EDGE_RISING>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio_9_dsi>, <&pinctrl_i2s_2_bclk_touch_reset>; /* Verdin I2S_2_BCLK (TOUCH_RESET#, SODIMM 42) */ reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>; + status = "okay"; }; }; @@ -89,7 +98,7 @@ mipi_dsi_bridge1_out: endpoint { attach-bridge; - remote-endpoint = <&dsi_riv_in>; + remote-endpoint = <&dsi_lvds_bridge_in>; }; }; }; diff --git a/overlays/verdin-imx8mm_panel-cap-touch-7inch-dsi_overlay.dts b/overlays/verdin-imx8mm_panel-cap-touch-7inch-dsi_overlay.dts new file mode 100644 index 0000000..9bc3666 --- /dev/null +++ b/overlays/verdin-imx8mm_panel-cap-touch-7inch-dsi_overlay.dts @@ -0,0 +1,105 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2024 Toradex + */ + +// Verdin with connected Capacitive Touch Display 7" DSI. + +/dts-v1/; +/plugin/; + +/ { + compatible = "toradex,verdin-imx8mm"; +}; + +#include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/gpio/gpio.h> + +#include "display-rvt70hslnwca0_overlay.dtsi" +#include "verdin-imx8mm_backlight-dsi_overlay.dtsi" + +&panel_rvt70hslnwca0 { + backlight = <&backlight_verdin_dsi>; + + port { + panel_in_rvt70hslnwca0: endpoint { + remote-endpoint = <&dsi_lvds_bridge_out>; + }; + }; +}; + +/* Verdin I2C_2_DSI */ +&i2c2 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + bridge@2c { + compatible = "ti,sn65dsi83"; + reg = <0x2c>; + /* IRQ not connected */ + /* Verdin GPIO_10_DSI (SODIMM 21) */ + enable-gpios = <&gpio3 3 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_10_dsi>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + dsi_lvds_bridge_in: endpoint { + data-lanes = <1 2 3 4>; + remote-endpoint = <&mipi_dsi_bridge1_out>; + }; + }; + + port@2 { + reg = <2>; + + dsi_lvds_bridge_out: endpoint { + remote-endpoint = <&panel_in_rvt70hslnwca0>; + }; + }; + }; + }; + + touch@41 { + compatible = "ilitek,ili2132"; + reg = <0x41>; + /* Verdin DSI_1_INT# (TOUCH_INT#, SODIMM 17) */ + interrupt-parent = <&gpio3>; + interrupts = <15 IRQ_TYPE_EDGE_RISING>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_9_dsi>, <&pinctrl_i2s_2_bclk_touch_reset>; + /* Verdin I2S_2_BCLK (TOUCH_RESET#, SODIMM 42) */ + reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>; + status = "okay"; + }; +}; + +&lcdif { + status = "okay"; +}; + +&mipi_dsi { + samsung,esc-clock-frequency = <16000000>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + mipi_dsi_bridge1_out: endpoint { + attach-bridge; + remote-endpoint = <&dsi_lvds_bridge_in>; + }; + }; + }; +}; diff --git a/overlays/verdin-imx8mp_backlight-dsi_overlay.dtsi b/overlays/verdin-imx8mp_backlight-dsi_overlay.dtsi new file mode 100644 index 0000000..bb6d6d6 --- /dev/null +++ b/overlays/verdin-imx8mp_backlight-dsi_overlay.dtsi @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2025 Toradex + * + * Backlight on DSI connector + */ + +&{/} { + backlight_verdin_dsi: backlight-verdin-dsi { + compatible = "pwm-backlight"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2s_2_d_out_dsi_1_bkl_en>; + brightness-levels = <0 45 63 88 119 158 203 255>; + default-brightness-level = <4>; + /* Verdin I2S_2_D_OUT (DSI_1_BKL_EN/DSI_1_BKL_EN_LVDS, SODIMM 46) */ + enable-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>; + /* Verdin PWM_3_DSI */ + pwms = <&pwm3 0 6666667 0>; + }; +}; + +/* Verdin PWM_3_DSI */ +&pwm3 { + status = "okay"; +}; diff --git a/overlays/verdin-imx8mp_dsi-to-hdmi_overlay.dts b/overlays/verdin-imx8mp_dsi-to-hdmi_overlay.dts index 1a05015..2d1250e 100644 --- a/overlays/verdin-imx8mp_dsi-to-hdmi_overlay.dts +++ b/overlays/verdin-imx8mp_dsi-to-hdmi_overlay.dts @@ -45,6 +45,8 @@ /* Verdin I2C_2_DSI */ &i2c2 { + /* Lower frequency to avoid DDC/EDID issues with certain displays/screens. */ + clock-frequency = <10000>; status = "okay"; }; diff --git a/overlays/verdin-imx8mp_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts b/overlays/verdin-imx8mp_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts index 80703c5..c0bf87e 100644 --- a/overlays/verdin-imx8mp_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts +++ b/overlays/verdin-imx8mp_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts @@ -9,36 +9,30 @@ /dts-v1/; /plugin/; +/ { + compatible = "toradex,verdin-imx8mp"; +}; + #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/pwm/pwm.h> -/ { - compatible = "toradex,verdin-imx8mp"; -}; +#include "verdin-imx8mp_backlight-dsi_overlay.dtsi" +#include "display-lt170410-dsi-lvds_overlay.dtsi" &{/} { - backlight { - compatible = "pwm-backlight"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_i2s_2_d_out_dsi_1_bkl_en>; - brightness-levels = <0 45 63 88 119 158 203 255>; - default-brightness-level = <4>; - /* Verdin I2S_2_D_OUT (DSI_1_BKL_EN/DSI_1_BKL_EN_LVDS, SODIMM 46) */ - enable-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>; - power-supply = <®_3p3v>; - /* Verdin PWM_3_DSI/PWM_3_DSI_LVDS (SODIMM 19) */ - pwms = <&pwm3 0 6666667 PWM_POLARITY_INVERTED>; - status = "okay"; + reg_dsi_lvds: regulator-dsi-lvds { + compatible = "regulator-fixed"; + enable-active-high; + /* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */ + gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>; + regulator-boot-on; + regulator-name = "DSI_1_PWR_EN"; }; +}; - panel_lvds: panel-lvds { - compatible = "panel-lvds"; - backlight = <&backlight>; - data-mapping = "vesa-24"; - height-mm = <136>; - width-mm = <217>; - }; +&backlight_verdin_dsi { + pwms = <&pwm3 0 6666667 PWM_POLARITY_INVERTED>; }; /* Verdin I2C_1 */ @@ -47,7 +41,7 @@ #size-cells = <0>; status = "okay"; - lvds_ti_sn65dsi84: bridge@2c { + bridge@2c { compatible = "ti,sn65dsi84"; reg = <0x2c>; pinctrl-names = "default"; @@ -55,6 +49,30 @@ /* Verdin GPIO_9_DSI (SN65DSI84 IRQ, SODIMM 17, unused) */ /* Verdin GPIO_10_DSI (SODIMM 21) */ enable-gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>; + vcc-supply = <®_dsi_lvds>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + dsi_lvds_bridge_in: endpoint { + data-lanes = <1 2 3 4>; + remote-endpoint = <&mipi_dsi_bridge1_out>; + }; + }; + + port@2 { + reg = <2>; + + dsi_lvds_bridge_out: endpoint { + remote-endpoint = <&panel_in_lt170410>; + }; + }; + }; }; touch@4a { @@ -80,16 +98,32 @@ status = "okay"; }; -/* Verdin PWM_3_DSI */ -&pwm3 { +&mipi_dsi { + samsung,esc-clock-frequency = <16000000>; status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + mipi_dsi_bridge1_out: endpoint { + attach-bridge; + remote-endpoint = <&dsi_lvds_bridge_in>; + }; + }; + }; }; -®_dsi_lvds { - /* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */ - gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>; +&panel_lt170410 { + backlight = <&backlight_verdin_dsi>; + + port { + panel_in_lt170410: endpoint { + remote-endpoint = <&dsi_lvds_bridge_out>; + }; + }; }; -/* As the following make use of labels only just created above */ -#include "display-lt170410_sn65dsi84_overlay.dtsi" -#include "verdin-imx8_mipi-dsi-to-sn65dsi84.dtsi" diff --git a/overlays/verdin-imx8mp_ov5640-27mhz_overlay.dts b/overlays/verdin-imx8mp_ov5640-27mhz_overlay.dts new file mode 100644 index 0000000..2330593 --- /dev/null +++ b/overlays/verdin-imx8mp_ov5640-27mhz_overlay.dts @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2025 Toradex + * + * CSI Camera Module OV5640 with 27MHz Oscillator + * + * https://developer.toradex.com/hardware/accessories/cameras/csi-camera-module-5mp-ov5640-arducam + */ + +/dts-v1/; +/plugin/; + +#include "verdin-imx8mp_ov5640_overlay.dts" + +&clk_camera_verdin_csi { + clock-frequency = <27000000>; +}; diff --git a/overlays/verdin-imx8mp_ov5640_overlay.dts b/overlays/verdin-imx8mp_ov5640_overlay.dts new file mode 100644 index 0000000..5f6bfcb --- /dev/null +++ b/overlays/verdin-imx8mp_ov5640_overlay.dts @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2024 Toradex + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/clock/imx8mp-clock.h> +#include <dt-bindings/gpio/gpio.h> + +/ { + compatible = "toradex,verdin-imx8mp"; +}; + +&{/} { + clk_camera_verdin_csi: camera-verdin-csi-clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + }; + + regulator_camera: regulator-camera { + compatible = "regulator-fixed"; + /* Verdin GPIO_8_CSI - Camera Connector 24 */ + gpio = <&gpio4 1 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-name = "V_CSI"; + startup-delay-us = <5000>; + }; +}; + +/* Verdin I2C_4_CSI */ +&i2c3 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio5>, <&pinctrl_gpio6>; + clocks = <&clk_camera_verdin_csi>; + clock-names = "xclk"; + AVDD-supply = <®ulator_camera>; + DOVDD-supply = <®ulator_camera>; + DVDD-supply = <®ulator_camera>; + /* Verdin GPIO6 - Camera Connector 22 */ + powerdown-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; + /* Verdin GPIO5 - Camera Connector 11 */ + reset-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; + + port { + ov5640_to_mipi_csi_0: endpoint { + remote-endpoint = <&mipi_csi_0_in>; + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&isi_0 { + status = "okay"; +}; + +&mipi_csi_0 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + mipi_csi_0_in: endpoint { + remote-endpoint = <&ov5640_to_mipi_csi_0>; + data-lanes = <1 2>; + }; + }; + }; +}; diff --git a/overlays/verdin-imx8mp_panel-cap-touch-10inch-dsi_overlay.dts b/overlays/verdin-imx8mp_panel-cap-touch-10inch-dsi_overlay.dts index cecf3a6..f904af9 100644 --- a/overlays/verdin-imx8mp_panel-cap-touch-10inch-dsi_overlay.dts +++ b/overlays/verdin-imx8mp_panel-cap-touch-10inch-dsi_overlay.dts @@ -15,14 +15,17 @@ #include <dt-bindings/interrupt-controller/arm-gic.h> #include <dt-bindings/gpio/gpio.h> -&{/} { - panel_lvds: panel-lvds { - }; -}; +#include "display-rvt101hvdwc00b_overlay.dtsi" +#include "verdin-imx8mp_backlight-dsi_overlay.dtsi" -&backlight { - pwms = <&pwm3 0 6666667 0>; - status = "okay"; +&panel_rvt101hvdwc00 { + backlight = <&backlight_verdin_dsi>; + + port { + panel_in_rvt101hvdwc00: endpoint { + remote-endpoint = <&dsi_lvds_bridge_out>; + }; + }; }; /* Verdin I2C_2_DSI */ @@ -39,6 +42,7 @@ enable-gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio_10_dsi>; + status = "okay"; ports { #address-cells = <1>; @@ -47,7 +51,7 @@ port@0 { reg = <0>; - dsi_riv_in: endpoint { + dsi_lvds_bridge_in: endpoint { data-lanes = <1 2 3 4>; remote-endpoint = <&mipi_dsi_bridge1_out>; }; @@ -56,8 +60,8 @@ port@2 { reg = <2>; - lvds_out_panel_riv: endpoint { - remote-endpoint = <&panel_in_lvds_riv>; + dsi_lvds_bridge_out: endpoint { + remote-endpoint = <&panel_in_rvt101hvdwc00>; }; }; }; @@ -68,11 +72,12 @@ reg = <0x41>; /* Verdin DSI_1_INT# (TOUCH_INT#, SODIMM 17) */ interrupt-parent = <&gpio4>; - interrupts = <25 IRQ_TYPE_LEVEL_LOW>; + interrupts = <25 IRQ_TYPE_EDGE_RISING>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio_9_dsi>, <&pinctrl_i2s_2_bclk_touch_reset>; /* Verdin I2S_2_BCLK (TOUCH_RESET#, SODIMM 42) */ reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; + status = "okay"; }; }; @@ -94,10 +99,8 @@ mipi_dsi_bridge1_out: endpoint { attach-bridge; - remote-endpoint = <&dsi_riv_in>; + remote-endpoint = <&dsi_lvds_bridge_in>; }; }; }; }; - -#include "display-rvt101hvdwc00b_overlay.dtsi" diff --git a/overlays/verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts b/overlays/verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts new file mode 100644 index 0000000..28b8518 --- /dev/null +++ b/overlays/verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts @@ -0,0 +1,130 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (C) 2025 Toradex + * + * Capacitive Touch Display 10.1" single-channel LVDS + * + * https://developer.toradex.com/hardware/accessories/displays/capacitive-touch-display-101inch-lvds + */ + +/dts-v1/; +/plugin/; + +#include <dt-bindings/clock/imx8mp-clock.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/pwm/pwm.h> + +#include "imx8mp-pinfunc.h" + +/ { + compatible = "toradex,verdin-imx8mp"; +}; + +&{/} { + backlight_lvds_native: backlight-lvds-native { + compatible = "pwm-backlight"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2s_2_d_out_dsi_1_bkl_en>; + brightness-levels = <0 45 63 88 119 158 203 255>; + default-brightness-level = <4>; + /* Verdin I2S_2_D_OUT as GPIO (SODIMM 46) */ + enable-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>; + /* Verdin PWM_2 (SODIMM 16) */ + pwms = <&pwm2 0 6666667 PWM_POLARITY_INVERTED>; + }; + + panel-lvds-native { + compatible = "panel-lvds"; + backlight = <&backlight_lvds_native>; + data-mapping = "vesa-24"; + height-mm = <136>; + width-mm = <217>; + + 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-active = <0>; + 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-active = <0>; + vsync-len = <6 9 12>; + }; + + port { + panel_lvds_native_in: endpoint { + remote-endpoint = <&ldb_lvds_ch0>; + }; + }; + }; +}; + +/* Verdin I2C_2_DSI */ +&i2c2 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + touch@4a { + compatible = "atmel,maxtouch"; + reg = <0x4a>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2s_2_d_in_gpio>, + <&pinctrl_i2s_2_sync_gpio>; + /* Verdin I2S_2_SYNC as GPIO (SODIMM 44) */ + interrupt-parent = <&gpio4>; + interrupts = <31 IRQ_TYPE_EDGE_FALLING>; + /* Verdin I2S_2_D_IN as GPIO (SODIMM 48) */ + reset-gpios = <&gpio4 30 GPIO_ACTIVE_LOW>; + }; +}; + +&lcdif2 { + status = "okay"; +}; + +&lvds_bridge { + assigned-clocks = <&clk IMX8MP_CLK_MEDIA_LDB>, + <&clk IMX8MP_VIDEO_PLL1>; + /* + * This display uses 71.1 MHz pixel clock, so IMX8MP_VIDEO_PLL1 needs + * to be 7 times 71.1MHz, or 497.7 MHz as the internal divider will + * always divide the output LVDS clock by 7. + */ + assigned-clock-rates = <0>, <497700000>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + ldb_lvds_ch0: endpoint { + remote-endpoint = <&panel_lvds_native_in>; + }; + }; + }; +}; + +/* Verdin PWM_2 */ +&pwm2 { + status = "okay"; +}; + +&iomuxc { + pinctrl_i2s_2_d_in_gpio: gpio4io30grp { + fsl,pins = <MX8MP_IOMUXC_SAI3_RXD__GPIO4_IO30 0x1c4>; /* SODIMM 48 */ + }; + + pinctrl_i2s_2_sync_gpio: gpio4io31grp { + fsl,pins = <MX8MP_IOMUXC_SAI3_TXFS__GPIO4_IO31 0x184>; /* SODIMM 44 */ + }; +}; diff --git a/overlays/verdin-imx8mp_panel-cap-touch-7inch-dsi_overlay.dts b/overlays/verdin-imx8mp_panel-cap-touch-7inch-dsi_overlay.dts new file mode 100644 index 0000000..b34d101 --- /dev/null +++ b/overlays/verdin-imx8mp_panel-cap-touch-7inch-dsi_overlay.dts @@ -0,0 +1,106 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2024 Toradex + */ + +// Verdin with connected Capacitive Touch Display 7" DSI. + +/dts-v1/; +/plugin/; + +/ { + compatible = "toradex,verdin-imx8mp"; +}; + +#include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/gpio/gpio.h> + +#include "display-rvt70hslnwca0_overlay.dtsi" +#include "verdin-imx8mp_backlight-dsi_overlay.dtsi" + +&panel_rvt70hslnwca0 { + backlight = <&backlight_verdin_dsi>; + + port { + panel_in_rvt70hslnwca0: endpoint { + remote-endpoint = <&dsi_lvds_bridge_out>; + }; + }; +}; + +/* Verdin I2C_2_DSI */ +&i2c2 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + bridge@2c { + compatible = "ti,sn65dsi83"; + reg = <0x2c>; + /* IRQ not connected */ + /* Verdin GPIO_10_DSI (SODIMM 21) */ + enable-gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_10_dsi>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + dsi_lvds_bridge_in: endpoint { + data-lanes = <1 2 3 4>; + remote-endpoint = <&mipi_dsi_bridge1_out>; + }; + }; + + port@2 { + reg = <2>; + + dsi_lvds_bridge_out: endpoint { + remote-endpoint = <&panel_in_rvt70hslnwca0>; + }; + }; + }; + }; + + touch@41 { + compatible = "ilitek,ili2132"; + reg = <0x41>; + /* Verdin DSI_1_INT# (TOUCH_INT#, SODIMM 17) */ + interrupt-parent = <&gpio4>; + interrupts = <25 IRQ_TYPE_EDGE_RISING>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_9_dsi>, <&pinctrl_i2s_2_bclk_touch_reset>; + /* Verdin I2S_2_BCLK (TOUCH_RESET#, SODIMM 42) */ + reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; + status = "okay"; + }; +}; + +/* LCDIF to MIPI-DSI */ +&lcdif1 { + status = "okay"; +}; + +&mipi_dsi { + samsung,esc-clock-frequency = <16000000>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + mipi_dsi_bridge1_out: endpoint { + attach-bridge; + remote-endpoint = <&dsi_lvds_bridge_in>; + }; + }; + }; +}; |