diff options
21 files changed, 1305 insertions, 0 deletions
diff --git a/overlays/Makefile b/overlays/Makefile index dfea6af..394a3d1 100644 --- a/overlays/Makefile +++ b/overlays/Makefile @@ -10,6 +10,7 @@ DTC_FLAGS := -@ # to include both architectures. KERNEL_INCLUDE = " \ ${STAGING_KERNEL_DIR}/arch/arm/boot/dts/ \ + ${STAGING_KERNEL_DIR}/arch/arm/boot/dts/nxp/imx/ \ ${STAGING_KERNEL_DIR}/arch/arm64/boot/dts/*/ \ " @@ -21,6 +22,7 @@ PWD := $(shell pwd) 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_overlay.dtbo dtb-y += apalis-imx6_panel-cap-touch-7inch_overlay.dtbo @@ -30,6 +32,7 @@ dtb-y += apalis-imx6_panel-edt-7inch_overlay.dtbo dtb-y += apalis-imx6_panel-res-touch-7inch_overlay.dtbo dtb-y += apalis-imx6_spi1_spidev_overlay.dtbo dtb-y += apalis-imx6_spi2_spidev_overlay.dtbo +dtb-y += apalis-imx6_tc358743_overlay.dtbo dtb-y += apalis-imx6_vga-640x480_overlay.dtbo dtb-y += colibri-imx6_hdmi_overlay.dtbo dtb-y += colibri-imx6_panel-cap-touch-7inch_adapter_overlay.dtbo @@ -50,7 +53,21 @@ 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 += 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_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_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_panel-cap-touch-10inch-dsi_overlay.dtbo dtb-y += verdin-imx8mp_spidev_overlay.dtbo targets += $(dtb-y) diff --git a/overlays/apalis-imx6_nau8822-btl_overlay.dts b/overlays/apalis-imx6_nau8822-btl_overlay.dts new file mode 100644 index 0000000..30fab86 --- /dev/null +++ b/overlays/apalis-imx6_nau8822-btl_overlay.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2024 Toradex + */ + +/dts-v1/; +/plugin/; + +/ { + compatible = "toradex,apalis_imx6q"; +}; + +// Allow configuring the two loudspeaker outputs as a +// single Bridge Tied Load output getting higher output power. + +&nau8822_1a { + nuvoton,spk-btl; +}; diff --git a/overlays/apalis-imx6_tc358743_overlay.dts b/overlays/apalis-imx6_tc358743_overlay.dts new file mode 100644 index 0000000..db1bcf0 --- /dev/null +++ b/overlays/apalis-imx6_tc358743_overlay.dts @@ -0,0 +1,76 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2023 Toradex + */ + +// TC358743 HDMI to MIPI-CSI2 bridge driver. + +/dts-v1/; +/plugin/; + +#include <imx6q-pinfunc.h> +#include <dt-bindings/clock/imx6qdl-clock.h> + +/ { + compatible = "toradex,apalis_imx6q"; +}; + +&{/} { + clk27m: bridge-clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <27000000>; + }; +}; + +&gpr { + ipu1_csi0_mux { + status = "okay"; + }; +}; + +&i2c3 { + + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + tc358743@f { + compatible = "toshiba,tc358743"; + reg = <0x0f>; + clock-names = "refclk"; + clocks = <&clk27m>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_cam_mclk>; + + port { + tc358743_to_mipi_csi2: endpoint { + clock-lanes = <0>; + data-lanes = <1 2 3 4>; + link-frequencies = /bits/ 64 <297000000>; + remote-endpoint = <&mipi_csi2_from_tc358743>; + }; + }; + }; +}; + + +&mipi_csi { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + port@0 { + reg = <0>; + + mipi_csi2_from_tc358743: endpoint@1 { + clock-lanes = <0>; + csis-clk-settle = <2>; + csis-hs-settle = <13>; + csis-wclk; + data-lanes = <1 2 3 4>; + remote-endpoint = <&tc358743_to_mipi_csi2>; + }; + }; +}; + diff --git a/overlays/colibri-imx7_atmel-mxt-connector_overlay.dtsi b/overlays/colibri-imx7_atmel-mxt-connector_overlay.dtsi index aea097b..786c5a5 100644 --- a/overlays/colibri-imx7_atmel-mxt-connector_overlay.dtsi +++ b/overlays/colibri-imx7_atmel-mxt-connector_overlay.dtsi @@ -7,6 +7,10 @@ // orderable at Toradex. Compatible with a Capacitive Touch Connector. &atmel_mxt_ts { + pinctrl-0 = <&pinctrl_atmel_connector>; + interrupt-parent = <&gpio2>; + interrupts = <15 IRQ_TYPE_EDGE_FALLING>; + reset-gpios = <&gpio2 28 GPIO_ACTIVE_LOW>; status = "okay"; }; diff --git a/overlays/display-lt170410_sn65dsi84_overlay.dtsi b/overlays/display-lt170410_sn65dsi84_overlay.dtsi new file mode 100644 index 0000000..14c8f3b --- /dev/null +++ b/overlays/display-lt170410_sn65dsi84_overlay.dtsi @@ -0,0 +1,54 @@ +// 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 new file mode 100644 index 0000000..e5bf1b5 --- /dev/null +++ b/overlays/display-rvt101hvdwc00b_overlay.dtsi @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2023 Toradex + */ + +// 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"; + + /* + * 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>; + }; + }; +}; diff --git a/overlays/verdin-am62_dsi-to-hdmi_overlay.dts b/overlays/verdin-am62_dsi-to-hdmi_overlay.dts new file mode 100644 index 0000000..32a41e7 --- /dev/null +++ b/overlays/verdin-am62_dsi-to-hdmi_overlay.dts @@ -0,0 +1,106 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2023 Toradex + */ + +// Verdin DSI to HDMI Adapter orderable at Toradex. + +/dts-v1/; +/plugin/; + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> + +/ { + compatible = "toradex,verdin-am62"; +}; + +&{/} { + hdmi-connector { + compatible = "hdmi-connector"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pwm3_dsi_gpio>; + ddc-i2c-bus = <&main_i2c2>; + /* Verdin PWM_3_DSI (SODIMM 19) */ + hpd-gpios = <&main_gpio1 17 GPIO_ACTIVE_HIGH>; + label = "hdmi"; + type = "a"; + + port { + hdmi_connector_in: endpoint { + remote-endpoint = <<8912_1_out>; + }; + }; + }; +}; + +&dsi_bridge { + status = "okay"; +}; + +&dsi_bridge_ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + mipi_dsi_bridge1_out: endpoint { + remote-endpoint = <<8912_1_in>; + }; + }; +}; + +&dss { + status = "okay"; +}; + +/* Verdin PWM_3_DSI */ +&epwm1 { + /* Verdin PWM_3_DSI (SODIMM 19) is used as HDMI HPD / GPIO, disable to avoid conflicts */ + status = "disabled"; +}; + +/* Verdin I2C_1 */ +&main_i2c1 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + hdmi@48 { + compatible = "lontium,lt8912b"; + reg = <0x48>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_dsi1_bkl_en>; + /* Verdin GPIO_9_DSI (LT8912 INT, SODIMM 17, unused) */ + /* Verdin GPIO_10_DSI (SODIMM 21) */ + reset-gpios = <&main_gpio0 30 GPIO_ACTIVE_LOW>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + lt8912_1_in: endpoint { + data-lanes = <1 2 3 4>; + remote-endpoint = <&mipi_dsi_bridge1_out>; + }; + }; + + port@1 { + reg = <1>; + + lt8912_1_out: endpoint { + remote-endpoint = <&hdmi_connector_in>; + }; + }; + }; + }; +}; + +/* Verdin I2C_2_DSI */ +&main_i2c2 { + 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 new file mode 100644 index 0000000..35378de --- /dev/null +++ b/overlays/verdin-am62_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2023 Toradex + */ + +// Verdin DSI to LVDS Adapter orderable 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 PWM_POLARITY_INVERTED>; + }; + + panel-lvds { + compatible = "panel-lvds"; + backlight = <&backlight>; + 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 = <3 40 51>; + hfront-porch = <43 80 91>; + 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_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_1 */ +&main_i2c1 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + lvds_ti_sn65dsi84: bridge@2c { + compatible = "ti,sn65dsi84"; + reg = <0x2c>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_dsi1_bkl_en>; + /* 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>; + + 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>; + }; + }; + }; + }; + + atmel_mxt_ts: touch@4a { + compatible = "atmel,maxtouch"; + reg = <0x4a>; + /* + * Verdin DSI_1_INT# + * (TOUCH_INT#, SODIMM 17, also routed to SN65DSI84 IRQ albeit currently unused) + */ + interrupt-parent = <&main_gpio1>; + interrupts = <49 IRQ_TYPE_EDGE_FALLING>; + 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-am62_nau8822-btl_overlay.dts b/overlays/verdin-am62_nau8822-btl_overlay.dts new file mode 100644 index 0000000..a96627d --- /dev/null +++ b/overlays/verdin-am62_nau8822-btl_overlay.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2023 Toradex + */ + +/dts-v1/; +/plugin/; + +/ { + compatible = "toradex,verdin-am62"; +}; + +// Allow configuring the two loudspeaker outputs as a +// single Bridge Tied Load output getting higher output power. + +&nau8822_1a { + nuvoton,spk-btl; +}; diff --git a/overlays/verdin-am62_panel-cap-touch-10inch-dsi_overlay.dts b/overlays/verdin-am62_panel-cap-touch-10inch-dsi_overlay.dts new file mode 100644 index 0000000..a56e845 --- /dev/null +++ b/overlays/verdin-am62_panel-cap-touch-10inch-dsi_overlay.dts @@ -0,0 +1,140 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2023 Toradex + */ + +// Verdin with connected Capacitive Touch Display 10.1" 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 = <136>; + width-mm = <217>; + + panel-timing { + clock-frequency = <68900000 71100000 73400000>; + de-active = <1>; + hactive = <1280 1280 1280>; + hback-porch = <88 88 88>; + hfront-porch = <12 72 132>; + hsync-active = <0>; + hsync-len = <1 5 40>; + pixelclk-active = <1>; + vactive = <800 800 800>; + vback-porch = <23 23 23>; + vfront-porch = <1 15 49>; + 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_FALLING>; + 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-am62_spidev_overlay.dts b/overlays/verdin-am62_spidev_overlay.dts new file mode 100644 index 0000000..c5089db --- /dev/null +++ b/overlays/verdin-am62_spidev_overlay.dts @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2023 Toradex + */ + +// Verdin AM62 spidev + +/dts-v1/; +/plugin/; + +/ { + compatible = "toradex,verdin-am62"; +}; + +/* Verdin SPI_1 */ +&main_spi1 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + spidev@0 { + /* Use compatible "rohm,dh2228fv" to bind spidev driver */ + compatible = "rohm,dh2228fv"; + reg = <0>; + spi-max-frequency = <10000000>; + }; +}; diff --git a/overlays/verdin-imx8_mipi-dsi-to-sn65dsi84.dtsi b/overlays/verdin-imx8_mipi-dsi-to-sn65dsi84.dtsi new file mode 100644 index 0000000..3810320 --- /dev/null +++ b/overlays/verdin-imx8_mipi-dsi-to-sn65dsi84.dtsi @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2022 Toradex + */ + +// Common Code to setup MIPI DSI to SN65DSI84 + +&lvds_ti_sn65dsi84 { + compatible = "ti,sn65dsi84"; + 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_dsi-to-hdmi_overlay.dts b/overlays/verdin-imx8mm_dsi-to-hdmi_overlay.dts new file mode 100644 index 0000000..5edfbd0 --- /dev/null +++ b/overlays/verdin-imx8mm_dsi-to-hdmi_overlay.dts @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2022 Toradex + */ + +// Verdin DSI to HDMI Adapter orderable at Toradex. + +/dts-v1/; +/plugin/; + +/ { + compatible = "toradex,verdin-imx8mm"; +}; + +&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_1_in>; + }; + }; + }; +}; + +&hdmi_lontium_lt8912 { + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + lt8912_1_in: endpoint { + data-lanes = <1 2 3 4>; + remote-endpoint = <&mipi_dsi_bridge1_out>; + }; + }; + + port@1 { + reg = <1>; + + lt8912_1_out: endpoint { + remote-endpoint = <&hdmi_connector_in>; + }; + }; + }; +}; + +&hdmi_connector { + status = "okay"; + + port { + hdmi_connector_in: endpoint { + remote-endpoint = <<8912_1_out>; + }; + }; +}; + +/* Verdin I2C_2_DSI */ +&i2c2 { + status = "okay"; +}; + +&lcdif { + status = "okay"; +}; + +&pwm1 { + status = "disabled"; +}; 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 new file mode 100644 index 0000000..d9f9b67 --- /dev/null +++ b/overlays/verdin-imx8mm_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2022 Toradex + */ + +// Verdin DSI to LVDS Adapter with plugged in +// Capacitive Touch Display 10.1" LVDS orderable at Toradex. + +/dts-v1/; +/plugin/; + +/ { + compatible = "toradex,verdin-imx8mm"; +}; + +#include "verdin-imx8_mipi-dsi-to-sn65dsi84.dtsi" +#include "display-lt170410_sn65dsi84_overlay.dtsi" + +&atmel_mxt_ts { + status = "okay"; +}; + +&backlight { + status = "okay"; +}; + +/* Verdin I2C_2_DSI */ +&i2c2 { + status = "okay"; +}; + +/* Verdin I2C_1 */ +&i2c4 { + status = "okay"; +}; + +&lcdif { + status = "okay"; +}; + +/* Verdin PWM_3_DSI */ +&pwm1 { + status = "okay"; +}; diff --git a/overlays/verdin-imx8mm_hmp_overlay.dts b/overlays/verdin-imx8mm_hmp_overlay.dts new file mode 100644 index 0000000..b1b3df9 --- /dev/null +++ b/overlays/verdin-imx8mm_hmp_overlay.dts @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2023 Toradex + */ + +// Verdin iMX8MM Remoteproc + +/dts-v1/; +/plugin/; + +#include <dt-bindings/clock/imx8mm-clock.h> + +/ { + compatible = "toradex,verdin-imx8mm"; +}; + +&{/} { + imx8mm-cm4 { + compatible = "fsl,imx8mm-cm4"; + clocks = <&clk IMX8MM_CLK_M4_DIV>; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&mu 0 1 + &mu 1 1 + &mu 3 1>; + memory-region = <&vdev0buffer>, <&vdev0vring0>, + <&vdev0vring1>, <&rsctable>; + syscon = <&src>; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + + rsctable: rsctable@550ff000 { + reg = <0 0x550ff000 0 0x1000>; + no-map; + }; + + vdev0vring0: vdev0vring0@55000000 { + reg = <0 0x55000000 0 0x8000>; + no-map; + }; + + vdev0vring1: vdev0vring1@55008000 { + reg = <0 0x55008000 0 0x8000>; + no-map; + }; + + vdev0buffer: vdev0buffer@55400000 { + compatible = "shared-dma-pool"; + reg = <0 0x55400000 0 0x100000>; + no-map; + }; + }; +}; + +&uart4 { + status = "disabled"; +}; diff --git a/overlays/verdin-imx8mm_nau8822-btl_overlay.dts b/overlays/verdin-imx8mm_nau8822-btl_overlay.dts new file mode 100644 index 0000000..463852c --- /dev/null +++ b/overlays/verdin-imx8mm_nau8822-btl_overlay.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2023 Toradex + */ + +/dts-v1/; +/plugin/; + +/ { + compatible = "toradex,verdin-imx8mm"; +}; + +// Allow configuring the two loudspeaker outputs as a +// single Bridge Tied Load output getting higher output power. + +&nau8822_1a { + nuvoton,spk-btl; +}; diff --git a/overlays/verdin-imx8mm_panel-cap-touch-10inch-dsi_overlay.dts b/overlays/verdin-imx8mm_panel-cap-touch-10inch-dsi_overlay.dts new file mode 100644 index 0000000..a47709b --- /dev/null +++ b/overlays/verdin-imx8mm_panel-cap-touch-10inch-dsi_overlay.dts @@ -0,0 +1,96 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2023 Toradex + */ + +// Verdin with connected Capacitive Touch Display 10.1" DSI. + +/dts-v1/; +/plugin/; + +/ { + compatible = "toradex,verdin-imx8mm"; +}; + +#include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/gpio/gpio.h> +#include "display-rvt101hvdwc00b_overlay.dtsi" + +&backlight { + pwms = <&pwm1 0 6666667 0>; + status = "okay"; +}; + +/* 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>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + dsi_riv_in: endpoint { + data-lanes = <1 2 3 4>; + remote-endpoint = <&mipi_dsi_bridge1_out>; + }; + }; + + port@2 { + reg = <2>; + + lvds_out_panel_riv: endpoint { + remote-endpoint = <&panel_in_lvds_riv>; + }; + }; + }; + }; + + touch@41 { + compatible = "ilitek,ili2132"; + reg = <0x41>; + /* Verdin DSI_1_INT# (TOUCH_INT#, SODIMM 17) */ + interrupt-parent = <&gpio3>; + interrupts = <15 IRQ_TYPE_LEVEL_LOW>; + 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>; + }; +}; + +&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_riv_in>; + }; + }; + }; +}; diff --git a/overlays/verdin-imx8mp_dsi-to-hdmi_overlay.dts b/overlays/verdin-imx8mp_dsi-to-hdmi_overlay.dts new file mode 100644 index 0000000..5cece29 --- /dev/null +++ b/overlays/verdin-imx8mp_dsi-to-hdmi_overlay.dts @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2023 Toradex + */ + +// Verdin DSI to HDMI Adapter orderable at Toradex. + +/dts-v1/; +/plugin/; + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/interrupt-controller/irq.h> + +/ { + compatible = "toradex,verdin-imx8mp"; +}; + +&{/} { + hdmi-connector { + compatible = "hdmi-connector"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pwm_3_dsi_hpd_gpio>; + ddc-i2c-bus = <&i2c2>; + /* Verdin PWM_3_DSI/PWM_3_DSI_LVDS (SODIMM 19) */ + hpd-gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>; + label = "hdmi"; + type = "a"; + + port { + hdmi_connector_in: endpoint { + remote-endpoint = <<8912_1_out>; + }; + }; + }; +}; + +/* Verdin I2C_2_DSI */ +&i2c2 { + status = "okay"; +}; + +/* Verdin I2C_1 */ +&i2c4 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + hdmi@48 { + compatible = "lontium,lt8912b"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_10_dsi>; + reg = <0x48>; + /* Verdin GPIO_9_DSI (LT8912 INT, SODIMM 17, unused) */ + /* Verdin GPIO_10_DSI (SODIMM 21) */ + reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>; + status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + lt8912_1_in: endpoint { + data-lanes = <1 2 3 4>; + remote-endpoint = <&mipi_dsi_bridge1_out>; + }; + }; + + port@1 { + reg = <1>; + + lt8912_1_out: endpoint { + remote-endpoint = <&hdmi_connector_in>; + }; + }; + }; + }; +}; + +/* 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 = <<8912_1_in>; + }; + }; + }; +}; + +&pwm3 { + /* PWM 3 conflicts with the HPD signal from the adapter */ + status = "disabled"; +}; 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 new file mode 100644 index 0000000..840edd8 --- /dev/null +++ b/overlays/verdin-imx8mp_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dts @@ -0,0 +1,89 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2023 Toradex + */ + +// Verdin DSI to LVDS Adapter with plugged in +// Capacitive Touch Display 10.1" LVDS orderable 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-imx8mp"; +}; + +&{/} { + 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"; + }; + + panel_lvds: panel-lvds { + compatible = "panel-lvds"; + backlight = <&backlight>; + data-mapping = "vesa-24"; + height-mm = <136>; + width-mm = <217>; + }; +}; + +/* Verdin I2C_1 */ +&i2c4 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + lvds_ti_sn65dsi84: 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 = <&gpio4 28 GPIO_ACTIVE_HIGH>; + }; + + 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 = <&gpio4>; + interrupts = <25 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 = <&gpio5 0 GPIO_ACTIVE_LOW>; + status = "okay"; + }; +}; + +/* LCDIF to MIPI-DSI */ +&lcdif1 { + status = "okay"; +}; + +/* Verdin PWM_3_DSI */ +&pwm3 { + status = "okay"; +}; + +/* 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_nau8822-btl_overlay.dts b/overlays/verdin-imx8mp_nau8822-btl_overlay.dts new file mode 100644 index 0000000..e55e170 --- /dev/null +++ b/overlays/verdin-imx8mp_nau8822-btl_overlay.dts @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2023 Toradex + */ + +/dts-v1/; +/plugin/; + +/ { + compatible = "toradex,verdin-imx8mp"; +}; + +// Allow configuring the two loudspeaker outputs as a +// single Bridge Tied Load output getting higher output power. + +&nau8822_1a { + nuvoton,spk-btl; +}; diff --git a/overlays/verdin-imx8mp_panel-cap-touch-10inch-dsi_overlay.dts b/overlays/verdin-imx8mp_panel-cap-touch-10inch-dsi_overlay.dts new file mode 100644 index 0000000..cecf3a6 --- /dev/null +++ b/overlays/verdin-imx8mp_panel-cap-touch-10inch-dsi_overlay.dts @@ -0,0 +1,103 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2023 Toradex + */ + +// Verdin with connected Capacitive Touch Display 10.1" DSI. + +/dts-v1/; +/plugin/; + +/ { + compatible = "toradex,verdin-imx8mp"; +}; + +#include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/gpio/gpio.h> + +&{/} { + panel_lvds: panel-lvds { + }; +}; + +&backlight { + pwms = <&pwm3 0 6666667 0>; + status = "okay"; +}; + +/* 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>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + dsi_riv_in: endpoint { + data-lanes = <1 2 3 4>; + remote-endpoint = <&mipi_dsi_bridge1_out>; + }; + }; + + port@2 { + reg = <2>; + + lvds_out_panel_riv: endpoint { + remote-endpoint = <&panel_in_lvds_riv>; + }; + }; + }; + }; + + touch@41 { + compatible = "ilitek,ili2132"; + reg = <0x41>; + /* Verdin DSI_1_INT# (TOUCH_INT#, SODIMM 17) */ + interrupt-parent = <&gpio4>; + interrupts = <25 IRQ_TYPE_LEVEL_LOW>; + 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>; + }; +}; + +/* 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_riv_in>; + }; + }; + }; +}; + +#include "display-rvt101hvdwc00b_overlay.dtsi" |