Activate my RGB Tianma display on the torizon core eval image

Hi,

I have an apalis iMX6 board with a working Yocto 2.8 (Rocko) image using a Tianma TM070RVHG04-01 RGB display. So I know the display is working.

I would like to evaluate switching to the latest Torizon Core image and have deployed it onto my board.

I have done my best to convert the Rocko device-tree to TC but all I see is some bright vertical lines when I boot the torizon image. Our old DT is based on the imx6q-apalis-ixora-v1.1.dts, as our carry-on board is based on the eval board. I have loaded the apalis-imx6_panel-res-touch-7inch_overlay.dts TDO.

I have found no reference of the Tianma monitor in our DT file, so I’m not even sure how it got configured on the Rocko image.

I would greatly appreciate some help in converting my DT to be just a DTO on top of the imx6q-apalis-ixora-v1.1.dts and to successfully convert the HW changes to get everything running.

best, Tilli

Hello @tw.apex ,
Would it be possible for you to share your working device tree for Yocto 2.8?

Best regards,
Josep

Hi @tw.apex ,

is there any update on that?

Best Regards
Kevin

Hi Josep, sure :slight_smile:

this is the arch/arm/boot/dts/imx6q-apalis-gcu-r01b.dts

/*
 * Copyright 2014-2017 Toradex AG
 * Copyright 2012 Freescale Semiconductor, Inc.
 * Copyright 2011 Linaro Ltd.
 *
 * The code contained herein is licensed under the GNU General Public
 * License. You may obtain a copy of the GNU General Public License
 * Version 2 or later at the following locations:
 *
 * http://www.opensource.org/licenses/gpl-license.html
 * http://www.gnu.org/copyleft/gpl.html
 */

/dts-v1/;

#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include "imx6q.dtsi"
#include "imx6qdl-apalis.dtsi"
#include "imx6qdl-apalis-gcu-r01b.dtsi"

/ {
	model = "Toradex Apalis iMX6Q/D Module on APEX-G GCU Mainboard R01b";
	compatible = "toradex,apalis_imx6q-ixora-v1.1", "toradex,apalis_imx6q",
		     "fsl,imx6q";
};

and here the arch/arm/boot/dts/imx6qdl-apalis-gcu-r01b.dtsi

/*
 * Copyright 2014-2017 Toradex AG
 * Copyright 2012 Freescale Semiconductor, Inc.
 * Copyright 2011 Linaro Ltd.
 *
 * The code contained herein is licensed under the GNU General Public
 * License. You may obtain a copy of the GNU General Public License
 * Version 2 or later at the following locations:
 *
 * http://www.opensource.org/licenses/gpl-license.html
 * http://www.gnu.org/copyleft/gpl.html
 */

#include <dt-bindings/input/input.h>

/ {
	aliases {
		i2c0 = &i2cddc;
		i2c1 = &i2c1;
		i2c2 = &i2c2;
		i2c3 = &i2c3;
	};

	aliases {
		/* the following, together with kernel patches, forces a fixed assignment
		   between device id and usdhc controller */
		/* i.e. the eMMC on usdhc3 will be /dev/mmcblk0 */
		mmc0 = &usdhc3; /* eMMC */
		mmc1 = &usdhc1; /* MMC1  4bit slot */
	};

	aliases {
		rtc0 = &snvs_rtc;
	};

	gpio-keys {
		compatible = "gpio-keys";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_gpio_keys>;

		/*wakeup {
			label = "Wake-Up";
			gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_WAKEUP>;
			debounce-interval = <10>;
			gpio-key,wakeup;
		}; */
	};

	v4l2_cap_0 {
		compatible = "fsl,imx6q-v4l2-capture";
		ipu_id = <0>;
		csi_id = <0>;
		mclk_source = <0>;
		status = "disabled";
	};

	v4l2_cap_2 { // mipi-csi2 camera
		compatible = "fsl,imx6q-v4l2-capture";
		ipu_id = <0>;
		csi_id = <1>;
		mclk_source = <0>;
		status = "disabled";
	};

#if 0
	v4l2_out {
		compatible = "fsl,mxc_v4l2_output";
		status = "okay";
	};
#endif
};

&backlight {
#if 1 /* PWM polarity: if 1 is brightest */
	pwms = <&pwm4 0 5000000 0>;
#if 1 /* Fusion 7 needs 10kHz PWM frequency */
	pwms = <&pwm4 0 100000 0>;
#endif
#else /* PWM polarity: if 0 is brightest */
	pwms = <&pwm4 0 5000000 1>;
#endif
	brightness-levels = <0 4 8 16 32 64 128 255>;
	default-brightness-level = <7>;
	status = "okay";
};

/* Apalis SPI1 */
&ecspi1 {
	status = "okay";

	spidev0: spidev@1 {
		compatible = "toradex,evalspi";
		reg = <0>;
		spi-max-frequency = <18000000>;
	};
};

&can1 {
	status = "okay";
};

&can2 {
	status = "okay";
};

/*
&hdmi_audio {
	status = "okay";
};

&hdmi_cec {
	status = "okay";
};

&hdmi_core {
	status = "okay";
};

&hdmi_video {
	status = "okay";
};
*/

/*
 * GEN1_I2C: I2C1_SDA/SCL on MXM3 209/211 (e.g. RTC on carrier
 * board)
 */
&i2c1 {
	status = "okay";

	touchscreen@41 {
		// Ilitek I2C Touchscreen Controller
		// see: https://git.toradex.com/cgit/linux-toradex.git/tree/Documentation/devicetree/bindings/input/ilitek,ili2xxx.txt?h=toradex_5.4-2.3.x-imx#n
		// working: compatible = "ili210x", "ilitek,ili210x", "ilitek,ili251x";
		// compatible = "ili210x", "ilitek,ili210x", "ilitek,ili251x";

		// trying newer driver
		compatible = "ilitek,ili210x", "ilitek,ili251x";
		reg = <0x41>;
		interrupt-parent = <&gpio4>;
		interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
	  reset-gpios = <&gpio5 21 GPIO_ACTIVE_LOW>;
		status = "okay";

		/* not working
		[    2.013364] ili210x_i2c 1-0048: Probing for ILI210X I2C Touschreen driver
		[    2.020504] ili210x_i2c 1-0048: i2c transfer failed
		[    2.025419] ili210x_i2c 1-0048: Failed to get firmware version, err: -5
		[    2.032048] ili210x_i2c: probe of 1-0048 failed with error -5
		reg = <0x48>;
		interrupt-parent = <&gpio1>;
		interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
	  reset-gpios = <&gpio5 21 GPIO_ACTIVE_LOW>;
		status = "okay";
		*/

		/* not working: 
		[    2.013372] ili210x_i2c 1-0041: Probing for ILI210X I2C Touschreen driver
		[    2.020506] ili210x_i2c 1-0041: i2c transfer failed
		[    2.025415] ili210x_i2c 1-0041: Failed to get firmware version, err: -5
		[    2.032046] ili210x_i2c: probe of 1-0041 failed with error -5
		reg = <0x41>;
		interrupt-parent = <&gpio4>;
		interrupts = <2 IRQ_TYPE_EDGE_FALLING>;	// Apalis GPIO7
		reset-gpios = <&gpio1 6 1>; // Apalis GPIO8
		status = "okay";
		*/

		/*
		not working: SOLOMON
		// [    2.013380] ili210x_i2c 1-0048: Probing for ILI210X I2C Touschreen driver
		// [    2.020513] ili210x_i2c 1-0048: i2c transfer failed
		// [    2.025422] ili210x_i2c 1-0048: Failed to get firmware version, err: -5
		// [    2.032055] ili210x_i2c: probe of 1-0048 failed with error -5
		reg = <0x48>;
		interrupt-parent = <&gpio1>;
		interrupts = <2 IRQ_TYPE_EDGE_FALLING>;	// Apalis GPIO7
		reset-gpios = <&gpio1 6 1>; // Apalis GPIO8
		status = "okay";
		
		not working: ILI
		// [    2.013364] ili210x_i2c 1-0041: No platform data!
		// [    2.018087] ili210x_i2c: probe of 1-0041 failed with error -22
		// struct ili210x_platform_data { unsigned long irq_flags; unsigned int poll_period; bool (*get_pendown_state)(void); };
		reg = <0x41>;
		interrupt-parent = <&gpio4>;
		interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
	  reset-gpios = <&gpio5 21 GPIO_ACTIVE_LOW>;
		status = "okay";
		*/
	};

  /*
	solomon@48 {
		// SSL SSD254X multi-touch controller
		compatible = "solomon,solomon-ssd254x";
		reg = <0x48>;
		interrupt-parent = <&gpio1>;
		interrupts = <2 IRQ_TYPE_EDGE_FALLING>;	// Apalis GPIO7
		reset-gpios = <&gpio1 6 1>; // Apalis GPIO8
		num_drive_lines = <26>;
		num_sense_lines = <16>;
		bias_resistor_value = <0x06>;
		min_finger_area = <0x01>;	
		sense_line_offset = <0x14>;
		status = "okay";
	};
	*/
};

/*
 * DDC_I2C: I2C2_SDA/SCL on MXM3 205/207
 */
&i2cddc {
	status = "disabled";

	hdmi_ddc: edid@50 {
		compatible = "fsl,imx6-hdmi-i2c";
		reg = <0x50>;
	};
};

&iomuxc {
	/*
	 * Mux the Apalis GPIOs. (defaults to input with pulldown)
	 * Note: Overwrite nodes that need different direction/pullup/pulldown
	 *
	 * - GPIO1: Output, PWR_KILL# (force poweroff)
	 * - GPIO2: Input PU, PWR_INT#
	 * - GPIO3: Input PU, UV# (Undervoltage detection)
	 * - GPIO4: Input PU, OV# (Overvoltage detection)
	 * - GPIO5: Output, AUX_EN (Auxiliary Power Enable)
	 * - GPIO6: Output, SYS_EN (pull high to enable Gimbal System)
	 * - GPIO7: Input PU, CT_INT# (is used for PCIe reset in Toradex driver)
	 * - GPIO8: Output PU, CT_RESET#
	 * - Additional GPIOs: 
	 *   i.MX6 GPIO1_IO11: Input PU, SW-MOT
	 */
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_apalis_gpio1 &pinctrl_apalis_gpio2
		     &pinctrl_apalis_gpio3 &pinctrl_apalis_gpio4
		     &pinctrl_apalis_gpio5 &pinctrl_apalis_gpio6
		     &pinctrl_apalis_gpio7 &pinctrl_apalis_gpio8
			 &pinctrl_custom_gpio>;
	
	pinctrl_apalis_gpio1: gpio2io04grp {
		fsl,pins = <
			MX6QDL_PAD_NANDF_D4__GPIO2_IO04 PAD_CTRL_HYS_PU
		>;
	};

	pinctrl_apalis_gpio2: gpio2io05grp {
		fsl,pins = <
			MX6QDL_PAD_NANDF_D5__GPIO2_IO05 PAD_CTRL_HYS_PU
		>;
	};

	pinctrl_apalis_gpio3: gpio2io06grp {
		fsl,pins = <
			MX6QDL_PAD_NANDF_D6__GPIO2_IO06 PAD_CTRL_HYS_PU
		>;
	};

	pinctrl_apalis_gpio4: gpio2io07grp {
		fsl,pins = <
			MX6QDL_PAD_NANDF_D7__GPIO2_IO07 PAD_CTRL_HYS_PU
		>;
	};

	pinctrl_apalis_gpio7: gpio1io02grp {
		fsl,pins = <
			MX6QDL_PAD_GPIO_2__GPIO1_IO02 PAD_CTRL_HYS_PU
		>;
	};

	pinctrl_custom_gpio: customgpios {
		fsl,pins = <
			MX6QDL_PAD_SD2_CMD__GPIO1_IO11 PAD_CTRL_HYS_PU
		>;
	};
};

&lcd {
	status = "okay";
};

&mxcfb1 {
	status = "okay";
};

&mxcfb2 {
	status = "okay";
};

&mxcfb3 {
	status = "okay";
};

&mxcfb4 {
	status = "okay";
};

&pcie {
	reset-ep-gpio = <&gpio1 28 0>;
	status = "okay";
};

&pwm1 {
	status = "okay";
};

&pwm2 {
	status = "okay";
};

&pwm3 {
	status = "okay";
};

&pwm4 {
	status = "okay";
};

&reg_usb_otg_vbus {
	status = "okay";
};

&reg_usb_host_vbus {
	status = "okay";
};

&uart1 {
	status = "okay";
};

&uart2 {
	status = "okay";
#if 0
	linux,rs485-enabled-at-boot-time;
	rs485-rts-active-low;
	rs485-rx-during-tx;
#endif
};

&uart4 {
	status = "okay";
};

&uart5 {
	status = "okay";
};

&usbh1 {
	status = "okay";
};

&usbotg {
	status = "okay";
};

/* MMC1 */
&usdhc1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usdhc1_4bit &pinctrl_mmc_cd>;
	bus-width = <4>;
	status = "okay";
};

sorry for the late reply, was on vacation and seem to not get any notification that someone responded to my message

1 Like

Hi @josep.tx - please see my device-tree files above, thanks!

Hi @tw.apex !

Sorry for the delay.

From your device tree, I do not see the panel timings for your display.

As you are coming from Angstrom (BSP 2.8), would it be possible that some source code has been modified in order to support your display? If this is the case, just “bringing” the device tree is certainly not enough.

As the kernels from BSP 2.8 and the latest TorizonCore (currently version 6) are quite distant timewise, you should check if you are using the device tree bindings in the recommended way.

I recommend you to check Toradex’s Device Tree documentation, where you will find some nice overview/explanation/links about device tree: Device Tree Documentation Overview | Toradex Developer Center

If you are interested, we also have some Device Tree webinars available: Toradex | Embedded Computing Solutions - Webinars

I also recommend you to take a look at our Device Tree Overlays, as we have some Overlays for displays and, if suitable, you create a Device Tree Overlay for your display based on them: Device Tree Overlays (Linux) | Toradex Developer Center

Best regards,

Hi,

I have all modifications to the BSP 2.8 in my layer and I have applied that layer to a complete fresh setup of BSP 2.8 - so I am pretty sure that there is nothing being modified except what’s in my layer.

Is it possible to hire someone to take my 2.8 layer and convert it to the most recent torizon-core format?

I’ve spent way toooo long on this to try to make it work and we finally need to get this working.

Hi @tw.apex !

Toradex has a wide Partner Network from where you can select a Toradex Partner to help you: Embedded Computing | Hardware & Software Service Partners

You will certainly find what you need.

Let us know if you need further help with the Partner selection.

Best regards,