Hi,
i am developing a project with som verdin imx8mp and carrier board Mallow. I have to create a custom dts overlay for add touch display 10.1”. Inside the sistem is installed Linux Reference Multimedia Image. I started from this dts overlay file: verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts and i added a section for touch controller ilitek 2511. This is my device tree overlay.
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright 2023 Toradex
*/
// Verdin iMX8M Plus single-channel LVDS
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pwm/pwm.h>
#include "freescale/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>; /* 66.3 72.4 78.9 */
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 = <&lvds_out>;
};
};
};
};
&gpu_2d {
status = "okay";
};
&gpu_3d {
status = "okay";
};
/* Verdin I2C channel 4 */
&i2c4 {
// Pin 44 (SAI3_TXFS, GPIO4_IO31) > INT_TOUCH#
// Pin 48 (SAI3_RXD, GPIO4_IO30) > RST_TOUCH#
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
touchscreen@41 {
compatible = "ilitek, ilitek251x";
reg = <0x41>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2s_2_d_in_gpio>,
<&pinctrl_i2s_2_sync_gpio>;
interrupt-parent = <&gpio4>;
interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpio4 30 GPIO_ACTIVE_LOW>;
status = "okay";
};
};
&lcdif2 {
status = "okay";
};
&ldb {
status = "okay";
lvds-channel@0 {
fsl,data-mapping = "spwg";
fsl,data-width = <24>;
status = "okay";
port@1 {
reg = <1>;
lvds_out: endpoint {
remote-endpoint = <&panel_lvds_native_in>;
};
};
};
};
&ldb_phy {
status = "okay";
};
&mix_gpu_ml {
status = "okay";
};
&ml_vipsi {
status = "okay";
};
/* 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 */
};
};
For compile my dts overlay file i run the follow commands:
cpp -nostdinc -I ../linux-toradex/arch/arm64/boot/dts -I ../linux-toradex/include -undef -x assembler-with-cpp verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts.preprocessed
dtc -@ -Hepapr -I dts -O dtb -i ../linux-toradex/arch/arm64/boot/dts/ -o verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dtbo verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts.preprocessed
The last command return:
verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts:108.4-14: Warning (reg_format): /fragment@5/__overlay__/lvds-channel@0/port@1:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts:102.17-114.4: Warning (unit_address_vs_reg): /fragment@5/__overlay__/lvds-channel@0: node has a unit name, but no reg or ranges property
verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dtbo: Warning (pci_device_reg): Failed prerequisite 'reg_format'
verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dtbo: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dtbo: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dtbo: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dtbo: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts:107.10-113.5: Warning (avoid_default_addr_size): /fragment@5/__overlay__/lvds-channel@0/port@1: Relying on default #address-cells value
verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts:107.10-113.5: Warning (avoid_default_addr_size): /fragment@5/__overlay__/lvds-channel@0/port@1: Relying on default #size-cells value
verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dtbo: Warning (avoid_unnecessary_addr_size): Failed prerequisite 'avoid_default_addr_size'
verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dtbo: Warning (unique_unit_address): Failed prerequisite 'avoid_default_addr_size'
verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts:107.10-113.5: Warning (graph_port): /fragment@5/__overlay__/lvds-channel@0/port@1: graph node '#address-cells' is -1, must be 1
verdin-imx8mp_panel-cap-touch-10inch-lvds_overlay.dts:107.10-113.5: Warning (graph_port): /fragment@5/__overlay__/lvds-channel@0/port@1: graph node '#size-cells' is -1, must be 0
My questions are:
-
Is my dts file correct for touch controller ili2511?
-
Why does the dtc command return warnings?
Thanks for the help.
Fabio