This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM4378: LCD not working and no PWM output on backlight(ecap0)

Part Number: AM4378

Hello,

I'm developing a product using custom am437x board. (Based on am437x-gp-evm)

It almost done but the LCD and LCD backlight don't work.

When I measure the backlight pin with an oscilloscope, it outputs a constant 3.6V high level instead of a PWM signal.

But, The '/sys/class/backlight/backlight' directory contains files such as 'max_brightness' and 'brightness'.

The LCD also does not work.

Below is dts file I write.

// dts //////////////////////////////

/dts-v1/;

#include "am4372.dtsi"
#include <dt-bindings/pinctrl/am43xx.h>
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/gpio/gpio.h>

/ {
    model = "TI AM437x UPE1";
    compatible = "ti,am437x-upe1","ti,am4372","ti,am43";

    chosen {
        stdout-path = &uart0;
    };
    
    aliases {
        display0 = &lcd0;
    };

    evm_v3_3d: fixedregulator-v3_3d {
        compatible = "regulator-fixed";
        regulator-name = "evm_v3_3d";
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        enable-active-high;
    };
    
    /* TPS51200 */
    vtt_fixed: fixedregulator-vtt {
        compatible = "regulator-fixed";
        regulator-name = "vtt_fixed";
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        regulator-always-on;
        regulator-boot-on;
        /*enable-active-high;*/
        /*gpio = <&gpio5 7 GPIO_ACTIVE_HIGH>;*/
    };

    
    /* Gpio leds */
    gpio-leds {
        compatible = "gpio-leds";

        status_led0 {
            label = "status_led0";
            gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
            linux,default-trigger = "heartbeat";
        };
    };
    
    /* LCD Backlight */
    lcd_bl: backlight {
        compatible = "pwm-backlight";
        //50000 => 20kHz
        pwms = <&ecap0 0 50000 PWM_POLARITY_INVERTED>;
        brightness-levels = <10 35 70 105 140 175 210 245 255>;
        default-brightness-level = <3>;
    };

    /* 1280x800 LCD */
    lcd0: display {
        compatible = "panel-dpi";
        label = "lcd";

        backlight = <&lcd_bl>;
        
        panel-timing {
            clock-frequency = <70946400>;
            hactive = <1280>;
            vactive = <800>;
            hfront-porch = <52>;
            hsync-len = <58>;
            hback-porch = <52>;
            vfront-porch = <6>;
            vsync-len = <10>;
            vback-porch = <6>;
            hsync-active = <1>;
            vsync-active = <1>;
            de-active = <1>;
            pixelclk-active = <1>;
        };

        port {
            lcd_in: endpoint {
                remote-endpoint = <&dpi_out>;
            };
        };
    };
    
    cpus {
        cpu@0 {
            cpu0-supply = <&dcdc2>;
        };
    };
};

&am43xx_pinmux {
    pinctrl-names = "default";

    /* I2C0: PMIC, EEPROM */
    i2c0_pins: i2c0_pins {
        pinctrl-single,pins = <
            AM4372_IOPAD(0x98c, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_sda */
            AM4372_IOPAD(0x988, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_scl */
        >;
    };

   .

   .

   .
    
    /* LCD */
    dss_pins: dss_pins {
        pinctrl-single,pins = <
            AM4372_IOPAD(0x820, PIN_OUTPUT_PULLUP | MUX_MODE1) /*gpmc ad 8 -> DSS DATA 23 */
            AM4372_IOPAD(0x824, PIN_OUTPUT_PULLUP | MUX_MODE1)
            AM4372_IOPAD(0x828, PIN_OUTPUT_PULLUP | MUX_MODE1)
            AM4372_IOPAD(0x82c, PIN_OUTPUT_PULLUP | MUX_MODE1)
            AM4372_IOPAD(0x830, PIN_OUTPUT_PULLUP | MUX_MODE1)
            AM4372_IOPAD(0x834, PIN_OUTPUT_PULLUP | MUX_MODE1)
            AM4372_IOPAD(0x838, PIN_OUTPUT_PULLUP | MUX_MODE1)
            AM4372_IOPAD(0x83c, PIN_OUTPUT_PULLUP | MUX_MODE1) /*gpmc ad 15 -> DSS DATA 16 */
            AM4372_IOPAD(0x8a0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 0 */
            AM4372_IOPAD(0x8a4, PIN_OUTPUT_PULLUP | MUX_MODE0)
            AM4372_IOPAD(0x8a8, PIN_OUTPUT_PULLUP | MUX_MODE0)
            AM4372_IOPAD(0x8ac, PIN_OUTPUT_PULLUP | MUX_MODE0)
            AM4372_IOPAD(0x8b0, PIN_OUTPUT_PULLUP | MUX_MODE0)
            AM4372_IOPAD(0x8b4, PIN_OUTPUT_PULLUP | MUX_MODE0)
            AM4372_IOPAD(0x8b8, PIN_OUTPUT_PULLUP | MUX_MODE0)
            AM4372_IOPAD(0x8bc, PIN_OUTPUT_PULLUP | MUX_MODE0)
            AM4372_IOPAD(0x8c0, PIN_OUTPUT_PULLUP | MUX_MODE0)
            AM4372_IOPAD(0x8c4, PIN_OUTPUT_PULLUP | MUX_MODE0)
            AM4372_IOPAD(0x8c8, PIN_OUTPUT_PULLUP | MUX_MODE0)
            AM4372_IOPAD(0x8cc, PIN_OUTPUT_PULLUP | MUX_MODE0)
            AM4372_IOPAD(0x8d0, PIN_OUTPUT_PULLUP | MUX_MODE0)
            AM4372_IOPAD(0x8d4, PIN_OUTPUT_PULLUP | MUX_MODE0)
            AM4372_IOPAD(0x8d8, PIN_OUTPUT_PULLUP | MUX_MODE0)
            AM4372_IOPAD(0x8dc, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 15 */
            AM4372_IOPAD(0x8e0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS VSYNC */
            AM4372_IOPAD(0x8e4, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS HSYNC */
            AM4372_IOPAD(0x8e8, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS PCLK */
            AM4372_IOPAD(0x8ec, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS AC BIAS EN */

        >;
    };
    
    ecap0_pins: backlight_pins {
        pinctrl-single,pins = <
            AM4372_IOPAD(0x964, PIN_OUTPUT | MUX_MODE0)
        >;
    };
};

&i2c0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&i2c0_pins>;
    clock-frequency = <100000>;

    tps65218: tps65218@24 {
        reg = <0x24>;
        compatible = "ti,tps65218";
        interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* NMIn */
        interrupt-parent = <&gic>;
        interrupt-controller;
        #interrupt-cells = <2>;

        dcdc1: regulator-dcdc1 {
            compatible = "ti,tps65218-dcdc1";
            regulator-name = "vdd_core";
            regulator-min-microvolt = <912000>;
            regulator-max-microvolt = <1144000>;
            regulator-boot-on;
            regulator-always-on;
        };

       .

       .

       .
};

.

.

.

&epwmss0 {
status = "okay";
};

&ecap0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&ecap0_pins>;
    //pwm-cells = <3>;
};

&dss {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&dss_pins>;

    port {
        dpi_out: endpoint@0 {
            remote-endpoint = <&lcd_in>;
            data-lines = <24>;
        };
    };
};

////////////

 

Could the issue be related to the device driver or Linux kernel configuration rather than the DTS file?

Please help.

  • Hi Kim,
    The backlight and display output are 2 independent outputs. Since the backlight currently doesn't work, we do not know for sure if the display works or not.
    For the display part, can you please try probing HSYNC, VSYNC, PCLK and one-two DATA lines to check if you are seeing any signals while running any display application like kmstest?

    Please use Insert->Code for code blocks.

  • Hello,

    HSYNC, VSYNC, PCLK signals are not being generated.

    I also cannot find any fb* devices in the /dev directory.

    [ 0.790863] panel-simple display: supply power not found, using dummy regulator
    [ 0.791092] panel-simple display: Specify missing bus_format
    [ 0.791102] panel-simple display: Expected bpc in {6,8} but got: 0

    Above log appears during boot.

  • Hi,
    Seems like you are missing some configurations in your 'panel-dpi' dts settings. We do not have any examples on how to use 'panel-dpi', you may check in community forums for that.
    However, can you try something like the following compatible for your lcd0 node definition:

    panel {
    	compatible = "newhaven,nhd-4.3-480272ef-atxl";
    	port {
    		lcd_in: endpoint {
    			remote-endpoint = <&dpi_out>;
    		};
    	};
    };

    The above uses panel-simple driver and has all the bus flags etc defined. If this works, you can create your new node within panel simple with the required parameters as per your usecase.

  • Hi,

    I modified the dts file as you told, but it still doesn't work.

    Actually, I am not sure whether the issue is related to the DTS file, the device driver or the kernel configuration.

    I modified the DTS file based on 'am437x-gp-evm.dts', but it is not working.

    I have one additional question.
    There is no panel-timing information (such as resolution, hsync or vsync) in 'am437x-gp-evm.dts'. Where is this configured?

  • Hi,
    Apologies, can you try something like shown in https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm/boot/dts/ti/omap/am437x-gp-evm.dts?h=ti-linux-6.12.y#n88 

    There is no panel-timing information (such as resolution, hsync or vsync) in 'am437x-gp-evm.dts'. Where is this configured?

    lcd0: display {
    		compatible = "osddisplays,osd070t1718-19ts", "panel-dpi";
    		label = "lcd";
    
    		backlight = <&lcd_bl>;
    
    		port {
    			lcd_in: endpoint {
    				remote-endpoint = <&dpi_out>;
    			};
    		};
    	};

    This has been used with parameters defined in panel-simple.c:

    static const struct drm_display_mode osddisplays_osd070t1718_19ts_mode  = {
    	.clock = 33000,
    	.hdisplay = 800,
    	.hsync_start = 800 + 210,
    	.hsync_end = 800 + 210 + 30,
    	.htotal = 800 + 210 + 30 + 16,
    	.vdisplay = 480,
    	.vsync_start = 480 + 22,
    	.vsync_end = 480 + 22 + 13,
    	.vtotal = 480 + 22 + 13 + 10,
    	.flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
    };
    
    static const struct panel_desc osddisplays_osd070t1718_19ts = {
    	.modes = &osddisplays_osd070t1718_19ts_mode,
    	.num_modes = 1,
    	.bpc = 8,
    	.size = {
    		.width = 152,
    		.height = 91,
    	},
    	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
    	.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
    		DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
    	.connector_type = DRM_MODE_CONNECTOR_DPI,
    };

  • Hi, thank you for your reply.

    Now I'm using the ti-processor-sdk-linux-am437x-evm-11.02.05.02-Linux-x86-Install.bin SDK file, and I already tried dts in https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm/boot/dts/ti/omap/am437x-gp-evm.dts?h=ti-linux-6.12.y#n88.

    Here is the DTS file I writed. It's a bit long, but could you please check if there are any issue?

    // SPDX-License-Identifier: GPL-2.0-only
    /*
     * Copyright (C) 2013 Texas Instruments Incorporated - https://www.ti.com/
     */
    
    /* AM437x GP EVM */
    
    /dts-v1/;
    
    #include "am4372.dtsi"
    #include <dt-bindings/pinctrl/am43xx.h>
    #include <dt-bindings/pwm/pwm.h>
    #include <dt-bindings/gpio/gpio.h>
    
    / {
    	model = "TI AM437x UPE1";
    	compatible = "ti,am437x-upe1","ti,am4372","ti,am43";
    
    	chosen {
    		stdout-path = &uart0;
    	};
    	
    	aliases {
    		display0 = &lcd0;
    	};
    
    	evm_v3_3d: fixedregulator-v3_3d {
    		compatible = "regulator-fixed";
    		regulator-name = "evm_v3_3d";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		enable-active-high;
    	};
    	
    	/* TPS51200 */
    	vtt_fixed: fixedregulator-vtt {
    		compatible = "regulator-fixed";
    		regulator-name = "vtt_fixed";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		regulator-always-on;
    		regulator-boot-on;
    		/*enable-active-high;*/
    		/*gpio = <&gpio5 7 GPIO_ACTIVE_HIGH>;*/
    	};
    
    	/* Fixed 32k RTC clock from BAT */
    	clk_32k_rtc: clk_32k_rtc {
    		#clock-cells = <0>;
    		compatible = "fixed-clock";
    		clock-frequency = <32768>;
    	};
    	
    	/* Gpio leds */
    	gpio-leds {
    		compatible = "gpio-leds";
    
    		status_led0 {
    			label = "status_led0";
    			gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
    			linux,default-trigger = "heartbeat";
    		};
    	};
    	
    	/* LCD Backlight */
    	lcd_bl: backlight {
    		compatible = "pwm-backlight";
    		//50000 => 20kHz
    		pwms = <&ecap0 0 50000 PWM_POLARITY_INVERTED>;
    		brightness-levels = <10 35 70 105 140 175 210 245 255>;
    		default-brightness-level = <3>;
    	};
    
    	/* 1280x800 LCD */
    	//lcd0: display {
    	//	compatible = "osddisplays,osd070t1718-19ts", "panel-dpi";
    	//	label = "lcd";
    	//
    	//	backlight = <&lcd_bl>;
    	//
    	//	port {
    	//		lcd_in: endpoint {
    	//			remote-endpoint = <&dpi_out>;
    	//		};
    	//	};
    	//};
    	
    	lcd0: display {
    		compatible = "osddisplays,osd070t1718-19ts", "panel-dpi";
    		label = "lcd";
    	
    		//backlight = <&lcd_bl>;
    		
    		panel-timing {
    			clock-frequency = <70946400>;
    			hactive = <1280>;
    			vactive = <800>;
    			hfront-porch = <52>;
    			hsync-len = <58>;
    			hback-porch = <52>;
    			vfront-porch = <6>;
    			vsync-len = <10>;
    			vback-porch = <6>;
    			hsync-active = <1>;
    			vsync-active = <1>;
    			de-active = <1>;
    			pixelclk-active = <1>;
    		};
    	
    		port {
    			lcd_in: endpoint {
    				remote-endpoint = <&dpi_out>;
    			};
    		};
    	};
    	
    	cpus {
    		cpu@0 {
    			cpu0-supply = <&dcdc2>;
    		};
    	};
    };
    
    &am43xx_pinmux {
    	pinctrl-names = "default";
    
    	/* I2C0: PMIC, EEPROM */
    	i2c0_pins: i2c0_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x98c, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_sda */
    			AM4372_IOPAD(0x988, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_scl */
    		>;
    	};
    
    	/* I2C1 */
    	i2c1_pins: i2c1_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0xa40, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE1)  /* spi0_cs0.i2c1_scl */
    			AM4372_IOPAD(0xa48, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE1)  /* spi0_d1.i2c1_sda  */
    		>;
    	};
    	
    	/* SD card */
    	mmc1_pins: mmc1-pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x900, PIN_INPUT | MUX_MODE0) /* (D1) mmc0_clk.mmc0_clk */
    			AM4372_IOPAD(0x904, PIN_INPUT | MUX_MODE0) /* (D2) mmc0_cmd.mmc0_cmd */
    			AM4372_IOPAD(0x8fc, PIN_INPUT | MUX_MODE0) /* (C1) mmc0_dat0.mmc0_dat0 */
    			AM4372_IOPAD(0x8f8, PIN_INPUT | MUX_MODE0) /* (C2) mmc0_dat1.mmc0_dat1 */
    			AM4372_IOPAD(0x8f4, PIN_INPUT | MUX_MODE0) /* (B2) mmc0_dat2.mmc0_dat2 */
    			AM4372_IOPAD(0x8f0, PIN_INPUT | MUX_MODE0) /* (B1) mmc0_dat3.mmc0_dat3 */
    			AM4372_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* (R25) spi0_cs1.mmc0_sdcd */
    		>;
    	};
    	
    	/* eMMC */
    	emmc_pins_default: emmc-default-pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
    			AM4372_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
    			AM4372_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
    			AM4372_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
    			AM4372_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */
    			AM4372_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */
    			AM4372_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */
    			AM4372_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
    			AM4372_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
    			AM4372_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
    		>;
    	};
    
    	emmc_pins_sleep: emmc-sleep-pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x800, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad0.gpio1_0 */
    			AM4372_IOPAD(0x804, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad1.gpio1_1 */
    			AM4372_IOPAD(0x808, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad2.gpio1_2 */
    			AM4372_IOPAD(0x80c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad3.gpio1_3 */
    			AM4372_IOPAD(0x810, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad4.gpio1_4 */
    			AM4372_IOPAD(0x814, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad5.gpio1_5 */
    			AM4372_IOPAD(0x818, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad6.gpio1_6 */
    			AM4372_IOPAD(0x81c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad7.gpio1_7 */
    			AM4372_IOPAD(0x880, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn1.gpio1_30 */
    			AM4372_IOPAD(0x884, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn2.gpio1_31 */
    		>;
    	};
    	
    	/* Debug uart */
    	uart0_pins: uart0_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x970, PIN_INPUT | MUX_MODE0)				/* uart0_rxd.uart0_rxd */
    			AM4372_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) 	/* uart0_txd.uart0_txd */
    		>;
    	};
    	
    	/* Tracer 2 */
    	uart1_pins: uart1_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x980, PIN_INPUT | MUX_MODE0)				/* uart1_rxd.uart1_rxd */
    			AM4372_IOPAD(0x984, PIN_OUTPUT_PULLDOWN | MUX_MODE0) 	/* uart1_txd.uart1_txd */
    		>;
    	};
    	
    	/* Motor BD */
    	uart2_pins: uart2_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x90c, PIN_INPUT | MUX_MODE6)				/* uart2_rxd.uart2_rxd */
    			AM4372_IOPAD(0x910, PIN_OUTPUT_PULLDOWN | MUX_MODE6) 	/* uart2_txd.uart2_txd */
    		>;
    	};
    	
    	/* Barcode */
    	uart3_pins: uart3_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0xa28, PIN_INPUT | MUX_MODE0)				/* uart3_rxd.uart3_rxd */
    			AM4372_IOPAD(0xa2c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) 	/* uart3_txd.uart3_txd */
    			AM4372_IOPAD(0xa30, PIN_INPUT_PULLUP | MUX_MODE0)		/* uart3_ctsn.uart3_ctsn */
    			AM4372_IOPAD(0xa34, PIN_OUTPUT_PULLDOWN | MUX_MODE0) 	/* uart3_rtsn.uart3_rtsn */
    		>;
    	};
    	
    	/* Spare */
    	uart4_pins: uart4_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x968, PIN_INPUT | MUX_MODE1)				/* uart4_rxd.uart4_rxd */
    			AM4372_IOPAD(0x96c, PIN_OUTPUT_PULLDOWN | MUX_MODE1) 	/* uart4_txd.uart4_txd */
    		>;
    	};
    	
    	/* Tracer 1 */
    	uart5_pins: uart5_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x908, PIN_INPUT | MUX_MODE3)				/* uart5_rxd.uart5_rxd */
    			AM4372_IOPAD(0x944, PIN_OUTPUT_PULLDOWN | MUX_MODE3) 	/* uart5_txd.uart5_txd */
    		>;
    	};
    	
    	/* QSPI */
    	qspi1_default: qspi1-default-pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x888, PIN_INPUT | MUX_MODE2) /* (B12) gpmc_csn3.qspi_clk */
    			AM4372_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE3) /* (A8) gpmc_csn0.qspi_csn */
    			AM4372_IOPAD(0x890, PIN_INPUT | MUX_MODE3) /* (A9) gpmc_advn_ale.qspi_d0 */
    			AM4372_IOPAD(0x894, PIN_INPUT | MUX_MODE3) /* (E10) gpmc_oen_ren.qspi_d1 */
    			AM4372_IOPAD(0x898, PIN_INPUT | MUX_MODE3) /* (D10) gpmc_wen.qspi_d2 */
    			AM4372_IOPAD(0x89c, PIN_INPUT | MUX_MODE3) /* (C10) gpmc_be0n_cle.qspi_d3 */
    		>;
    	};
    	
    	/* Ethernet */
    	cpsw_default: cpsw-default-pins {
    		pinctrl-single,pins = <
    			/* Slave 1 */
    			AM4372_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txen.rgmii1_txen */
    			AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxdv.rgmii1_rxctl */
    			AM4372_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txd1.rgmii1_txd3 */
    			AM4372_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txd0.rgmii1_txd2 */
    			AM4372_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txd1.rgmii1_txd1 */
    			AM4372_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txd0.rgmii1_txd0 */
    			AM4372_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txclk.rmii1_tclk */
    			AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxclk.rmii1_rclk */
    			AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd1.rgmii1_rxd3 */
    			AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd0.rgmii1_rxd2 */
    			AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd1.rgmii1_rxd1 */
    			AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd0.rgmii1_rxd0 */
    		>;
    	};
    
    	cpsw_sleep: cpsw-sleep-pins {
    		pinctrl-single,pins = <
    			/* Slave 1 reset value */
    			AM4372_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x91c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x920, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
    		>;
    	};
    	
    	davinci_mdio_default: davinci-mdio-default-pins {
    		pinctrl-single,pins = <
    			/* MDIO */
    			AM4372_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)	/* mdio_data.mdio_data */
    			AM4372_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)			/* mdio_clk.mdio_clk */
    		>;
    	};
    	
    	davinci_mdio_sleep: davinci-mdio-sleep-pins {
    		pinctrl-single,pins = <
    			/* MDIO reset value */
    			AM4372_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    		>;
    	};
    	
    	/* LCD */
    	dss_pins: dss_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x820, PIN_OUTPUT_PULLUP | MUX_MODE1) /*gpmc ad 8 -> DSS DATA 23 */
    			AM4372_IOPAD(0x824, PIN_OUTPUT_PULLUP | MUX_MODE1)
    			AM4372_IOPAD(0x828, PIN_OUTPUT_PULLUP | MUX_MODE1)
    			AM4372_IOPAD(0x82c, PIN_OUTPUT_PULLUP | MUX_MODE1)
    			AM4372_IOPAD(0x830, PIN_OUTPUT_PULLUP | MUX_MODE1)
    			AM4372_IOPAD(0x834, PIN_OUTPUT_PULLUP | MUX_MODE1)
    			AM4372_IOPAD(0x838, PIN_OUTPUT_PULLUP | MUX_MODE1)
    			AM4372_IOPAD(0x83c, PIN_OUTPUT_PULLUP | MUX_MODE1) /*gpmc ad 15 -> DSS DATA 16 */
    			AM4372_IOPAD(0x8a0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 0 */
    			AM4372_IOPAD(0x8a4, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8a8, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8ac, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8b0, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8b4, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8b8, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8bc, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8c0, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8c4, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8c8, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8cc, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8d0, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8d4, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8d8, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8dc, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 15 */
    			AM4372_IOPAD(0x8e0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS VSYNC */
    			AM4372_IOPAD(0x8e4, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS HSYNC */
    			AM4372_IOPAD(0x8e8, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS PCLK */
    			AM4372_IOPAD(0x8ec, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS AC BIAS EN */
    	
    		>;
    	};
    	
    	ecap0_pins: ecap0_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x964, PIN_OUTPUT | MUX_MODE0)       /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
    		>;
    	};
    };
    
    &i2c0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&i2c0_pins>;
    	clock-frequency = <100000>;
    
    	/* Set OPP50 (0.95V) for VDD MPU and core */
    	sleep-sequence = /bits/ 8 <
    		0x02 0x24 0x10 0x6b /* Password unlock 1 */
    		0x02 0x24 0x16 0x8A /* Set DCDC1 (Core) to 0.95V */
    		0x02 0x24 0x10 0x67 /* Password unlock 3 */
    		0x02 0x24 0x1A 0x86 /* Apply DCDC changes */
    		0x02 0x24 0x10 0x6F /* Password unlock for LS */
    		0x02 0x24 0x12 0x0F /* ENABLE2 LS2_EN=0, LS3_EN=0 (off) */
    	>;
    
    	/* Set OPP100 (1.10V) for VDD core */
    	wake-sequence = /bits/ 8 <
    		0x02 0x24 0x10 0x6B /* Password unlock 2 */
    		0x02 0x24 0x16 0x99 /* Set DCDC1 (Core) to 1.1V */
    		0x02 0x24 0x10 0x67 /* Password unlock 3 */
    		0x02 0x24 0x1A 0x86 /* Apply DCDC changes */
    		0x02 0x24 0x10 0x6F /* Password unlock for LS */
    		0x02 0x24 0x12 0x0F /* ENABLE2 LS2_EN=1, LS3_EN=1 (on, Bit 2/1 = 1) */
    	>;
    
    	tps65218: tps65218@24 {
    		reg = <0x24>;
    		compatible = "ti,tps65218";
    		interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* NMIn */
    		interrupt-parent = <&gic>;
    		interrupt-controller;
    		#interrupt-cells = <2>;
    
    		dcdc1: regulator-dcdc1 {
    			compatible = "ti,tps65218-dcdc1";
    			regulator-name = "vdd_core";
    			regulator-min-microvolt = <912000>;
    			regulator-max-microvolt = <1144000>;
    			regulator-boot-on;
    			regulator-always-on;
    		};
    
    		dcdc2: regulator-dcdc2 {
    			compatible = "ti,tps65218-dcdc2";
    			regulator-name = "vdd_mpu";
    			regulator-min-microvolt = <912000>;
    			regulator-max-microvolt = <1378000>;
    			regulator-boot-on;
    			regulator-always-on;
    		};
    
    		dcdc3: regulator-dcdc3 {
    			compatible = "ti,tps65218-dcdc3";
    			regulator-name = "vdcdc3";
    			regulator-min-microvolt = <1500000>;
    			regulator-max-microvolt = <1500000>;
    			regulator-boot-on;
    			regulator-always-on;
    		};
    
    		dcdc4: regulator-dcdc4 {
    			compatible = "ti,tps65218-dcdc4";
    			regulator-name = "vdcdc4";
    			regulator-min-microvolt = <3300000>;
    			regulator-max-microvolt = <3300000>;
    			regulator-boot-on;
    			regulator-always-on;
    		};
    
    		dcdc5: regulator-dcdc5 {
    			compatible = "ti,tps65218-dcdc5";
    			regulator-name = "v1_0bat";
    			regulator-min-microvolt = <1000000>;
    			regulator-max-microvolt = <1000000>;
    			regulator-boot-on;
    			regulator-always-on;
    		};
    
    		dcdc6: regulator-dcdc6 {
    			compatible = "ti,tps65218-dcdc6";
    			regulator-name = "v1_8bat";
    			regulator-min-microvolt = <1800000>;
    			regulator-max-microvolt = <1800000>;
    			regulator-boot-on;
    			regulator-always-on;
    		};
    
    		ldo1: regulator-ldo1 {
    			compatible = "ti,tps65218-ldo1";
    			regulator-min-microvolt = <1800000>;
    			regulator-max-microvolt = <1800000>;
    			regulator-boot-on;
    			regulator-always-on;
    		};
    
    		/* for usb vbus control */
    		LS2: regulator-ls2 {
    			compatible = "ti,tps65218-ls2";
    			regulator-name = "vdd_vbus0";
    			regulator-min-microamp = <100000>;
    			regulator-max-microamp = <1000000>;
    			regulator-always-on;
    			regulator-boot-on;
    		};
    		
    		LS3: regulator-ls3 {
    			compatible = "ti,tps65218-ls3";
    			regulator-name = "vdd_vbus1";
    			regulator-min-microamp = <100000>;
    			regulator-max-microamp = <1000000>;
    			regulator-always-on;
    			regulator-boot-on;
    		};
    	};
    	
    	eeprom: eeprom@50 {
    		compatible = "at24,24c256";
    		reg = <0x50>;
    		pagesize = <64>;
    	};
    };
    
    &i2c1 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&i2c1_pins>;
    	clock-frequency = <100000>;
    };
    
    /* SD card */
    &mmc1 {
    	status = "okay";
    	vmmc-supply = <&evm_v3_3d>;
    	bus-width = <4>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&mmc1_pins>;
    	cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
    };
    
    /* eMMC */
    &mmc2 {
    	/*
    	 * When enabling eMMC, disable GPMC/NAND and set
    	 * SelEMMCorNAND to output-high
    	 */
    	status = "okay";
    	vmmc-supply = <&evm_v3_3d>;
    	bus-width = <8>;
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&emmc_pins_default>;
    	pinctrl-1 = <&emmc_pins_sleep>;
    	non-removable;
    };
    
    /* Enable qspi, 16MB S25FL128S norflash */
    &qspi {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&qspi1_default>;
    
    //	qspi-gpio = <&gpio1 16 GPIO_ACTIVE_LOW>;
    	spi-max-frequency = <24000000>;
    	m25p80@0 {
    		compatible = "s25fl128s", "IS25LP128";
    		spi-max-frequency = <24000000>;
    		reg = <0>;
    		spi-cpol;
    		spi-cpha;
    		spi-tx-bus-width = <1>;
    		spi-rx-bus-width = <4>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    
    		/* MTD partition table.
    		 * The ROM checks the first 512KiB
    		 * for a valid file to boot(XIP).
    		 */
    		partition@0 {
    			label = "QSPI.U_BOOT";
    			reg = <0x00000000 0x000080000>;
    		};
    		partition@1 {
    			label = "QSPI.U_BOOT.backup";
    			reg = <0x00080000 0x00080000>;
    		};
    		partition@2 {
    			label = "QSPI.U_BOOT_ENV";
    			reg = <0x00100000 0x00020000>;
    		};
    		partition@3 {
    			label = "QSPI.U-BOOT-ENV.backup";
    			reg = <0x00120000 0x00020000>;
    		};
    		partition@4 {
    			label = "QSPI.U-BOOT-DEVICETREE";
    			reg = <0x00140000 0x00010000>;
    		};
    		partition@5 {
    			label = "QSPI.KERNEL";
    			reg = <0x00150000 0x0500000>;
    		};
    		partition@6 {
    			label = "QSPI.FILESYSTEM";
    			reg = <0x00650000 0x9B0000>;
    		};
    	};
    };
    
    &gpio0 {
    	status = "okay";
    };
    
    &gpio1 {
    	status = "okay";
    };
    
    &gpio2 {
    	status = "okay";
    };
    
    &gpio3 {
    	status = "okay";
    };
    
    &gpio4 {
    	status = "okay";
    };
    
    &gpio5 {
    	status = "okay";
    };
    
    &uart0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart0_pins>;
    };
    
    &uart1 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart1_pins>;
    };
    
    &uart2 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart2_pins>;
    };
    
    &uart3 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart3_pins>;
    };
    
    &uart4 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart4_pins>;
    };
    
    &uart5 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart5_pins>;
    };
    
    &cpu {
    	cpu0-supply = <&dcdc2>;
    };
    
    //&rtc {
    //	clocks = <&clk_32k_rtc>, <&clk_32768_ck>;
    //	clock-names = "ext-clk", "int-clk";
    //	status = "okay";
    //};
    
    &mac_sw {
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&cpsw_default>;
    	pinctrl-1 = <&cpsw_sleep>;
    	status = "okay";
    };
    
    &davinci_mdio_sw {
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&davinci_mdio_default>;
    	pinctrl-1 = <&davinci_mdio_sleep>;
    
    	ethphy0: ethernet-phy@0 {
    		reg = <0>;
    	};
    };
    
    &cpsw_port1 {
    	phy-handle = <&ethphy0>;
    	phy-mode = "rgmii-rxid";
    	ti,dual-emac-pvid = <1>;
    };
    
    &cpsw_port2 {
    	status = "disabled";
    };
    
    &usb2_phy1 {
    	status = "okay";
    };
    
    &usb1 { //USB 0
    	dr_mode = "host";
    	status = "okay";
    };
    
    &usb2_phy2 {
    	status = "okay";
    };
    
    &usb2 { //USB 1
    	dr_mode = "host";
    	status = "okay";
    };
    
    &epwmss0 {
    	status = "okay";
    };
    
    &ecap0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&ecap0_pins>;
    };
    
    &dss {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&dss_pins>;
    
    	port {
    		dpi_out: endpoint@0 {
    			remote-endpoint = <&lcd_in>;
    			data-lines = <24>;
    		};
    	};
    };
    


  • Hi Kim,
    I am assuming that you were able to probe DPI signals with the default dts (the commented portion in your dts).
    If the above is the case, I would advise to first change the timing parameters in the panel-simple.c file and rebuild kernel driver to check instead of specifying in the DT as you are currently doing.

    We should first be able to remove these error:
    [ 0.791092] panel-simple display: Specify missing bus_format
    [ 0.791102] panel-simple display: Expected bpc in {6,8} but got: 0

    and get some device listed under /dev/dri/card*

  • Hi,

    Thank you for your continuous support.

    After setting CONFIG_DRM_OMAP to yes, clocks such as PCLK, VSYNC and HSYNC started to be output.

    The backlight is also working properly.

    I am using the LCD dts below.

    lcd0: display {
    		compatible = "osddisplays,osd070t1718-19ts", "panel-dpi";
    		label = "lcd";
    
    		backlight = <&lcd_bl>;
    
    		port {
    			lcd_in: endpoint {
    				remote-endpoint = <&dpi_out>;
    			};
    		};
    	};

    Finally, I want to adjust the clock and resolution to match the LCD I am using now.

    Is it sufficient to modify only the DTS file, or do I also need to modify kernel source files such as panel-simple.c?

  • Hi Kim,
    We only have tested the panel-simple based panel specifications. My recommended approach would be to modify the same. More formal way to do this would be to create another panel instance for your specific panel within the panel-simple driver and use that compatible instead.
    If you intend to use the dts approach, you are free to do so, will be difficult to support further if issue arises with that approach.