imx7ulp-backlight

cancel
Showing results for 
Search instead for 
Did you mean: 

imx7ulp-backlight

142 Views
晖蓝
Contributor I

@jian_jiang

蒋工,LCD屏背光默认改成低电平不生效。上电默认是高电平,需要改成默认低电平。不然会出现闪屏现象。

我的修改如下:dts和fbtft_device.c

   pinctrl_lpspi2: lpspi2grp {
                        fsl,pins = <
                                IMX7ULP_PAD_PTE4__LPSPI2_SIN      0x0
                                IMX7ULP_PAD_PTE5__LPSPI2_SOUT     0x0
                                IMX7ULP_PAD_PTE6__LPSPI2_SCK      0x0                              
                        >;
                };

                pinctrl_lpspi2_cs: lpspi2cs {
                        fsl,pins = <
                                IMX7ULP_PAD_PTE7__PTE7     0x10003 
                        >;
                };
                pinctrl_st7789v: st7789vgrp {
                        fsl,pins = <                              
                                IMX7ULP_PAD_PTE1__PTE1            0x10003                                
                                IMX7ULP_PAD_PTE14__PTE14          0x10003  
                                IMX7ULP_PAD_PTE13__PTE13          0x10003     //backlight                
                        >;
                };  
                
 &lpspi2 {
        #address-cells = <1>;
        #size-cells = <0>;
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&pinctrl_lpspi2 &pinctrl_lpspi2_cs>;
        cs-gpios = <&gpio_pte 7 GPIO_ACTIVE_LOW>;
        //pinctrl-1 = <&pinctrl_lpspi2>; 
        status = "okay";

        sd2088@0 {
                compatible = "sitronix,st7789v";
                reg = <0>;
                // add pin ctrl
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_st7789v>;

                spi-max-frequency = <24000000>;
                rotate = <0>;
                bgr;
                fps = <15>;
                buswidth = <8>;
                reset-gpios = <&gpio_pte 01 GPIO_ACTIVE_LOW>;
                dc-gpios = <&gpio_pte 14 GPIO_ACTIVE_LOW>;
                led-gpios = <&gpio_pte 13 GPIO_ACTIVE_LOW>;//backlight
                debug = <0>; 
        };
        
};               
                
static struct fbtft_device_display displays[] = {
{
		.name = "sd2088",
		.spi = &(struct spi_board_info) {
			.modalias = "fb_st7789v",
			.max_speed_hz = 24000000,
			.mode = SPI_MODE_0,
			.platform_data = &(struct fbtft_platform_data) {
				.display = {
					.buswidth = 8,
					.backlight = 1,
					.init_sequence = cberry28_init_sequence,
				},
				.gpios = (const struct fbtft_gpio []) {
					{ "reset", 65},
					{ "dc", 78 },
					{ "led", 77 },//backlight
					{},
				},
				.gamma = CBERRY28_GAMMA,
			}
		}
	},
}

 

0 Kudos
2 Replies

96 Views
terry_lv
NXP Employee
NXP Employee

Hi,

  Confirmed by customer that it is a hardware issue.

  Now the issue is fixed.

  Thanks!

Regards

Terry

0 Kudos

112 Views
weidong_sun
NXP TechSupport
NXP TechSupport

你好,晖蓝

  你提到的蒋工,是我的同事Maggie Jiang吗? 我会转告她!

 你提到的背光LED控制电路,确实是这样的,开始的时候,恒流电源芯片的enable端需要保持LOW电平,不能电路上拉高。一般情况下,可以PWM信号,直接控制恒流源的EN脚,这样就可以随着PWM波的占空比调整,就可以控制LED的亮度了。

 

Have a nice day!

B.R,

Weidong

0 Kudos