add lcd backlight in uboot

This commit is contained in:
hyx 2026-04-02 10:53:45 +08:00
parent e29cdcb2e4
commit 1ec442c549
7 changed files with 9 additions and 6 deletions

View File

@ -220,10 +220,10 @@ static int32_t qua_lcm_mipi_er88577b_PowerOn(void * param, lcm_ops *ops)
#if LCM_DEBUG
printf("%s e\n",__func__);
#endif
#ifdef CONFIG_UBOOT_XKPHOTO
//#ifdef CONFIG_UBOOT_XKPHOTO
extern int qua_lcm_mipi_er88577b_bkl(void);
qua_lcm_mipi_er88577b_bkl();
#endif
//#endif
ops->ctrl_fun.mipi.bus_init((void *)param, (void *)&qua_lcm_mipi_er88577b_6hc1017b7e_info);
#if LCM_DEBUG
printf("%s x\n",__func__);

View File

@ -189,7 +189,7 @@ extern uint32_t qua_readl(uint32_t addr);
#define GPIO_NUM_LCD_VS GPIO_NUM_INDEX(3,5)
#define GPIO_NUM_LCD_D0 GPIO_NUM_INDEX(3,7)
#define GPIO_NUM_LCD_D1 GPIO_NUM_INDEX(4,0)
#define GPIO_NUM_LCD_BL GPIO_NUM_INDEX(5,6)
#define GPIO_NUM_LCD_BL GPIO_NUM_INDEX(3,7)
#else
#define REG_PIN_MUX_BASE 0x10200000
#define REG_LCD_DE_PIN 0x64
@ -212,7 +212,7 @@ extern uint32_t qua_readl(uint32_t addr);
#define GPIO_NUM_LCD_VS GPIO_NUM_INDEX(3,5)
#define GPIO_NUM_LCD_D0 GPIO_NUM_INDEX(3,7)
#define GPIO_NUM_LCD_D1 GPIO_NUM_INDEX(4,0)
#define GPIO_NUM_LCD_BL GPIO_NUM_INDEX(0,5)
#define GPIO_NUM_LCD_BL GPIO_NUM_INDEX(3,7)
#endif
#define PIN_MUX_GPIO_ENABLE (1)
@ -319,14 +319,14 @@ int qua_lcm_mipi_er88577b_rst(int lcm_id)
int qua_lcm_mipi_er88577b_bkl(void)
{
unsigned int pmux_reg = (unsigned int)REG_PIN_MUX_BASE;
// printf("%s e\n", __func__);
printf("%s e\n", __func__);
/* power backlight gpio enable, 0x102000b0 */
qua_writel(PIN_MUX_GPIO_ENABLE, pmux_reg + REG_LCD_BL_PIN);
gpio_request(GPIO_NUM_LCD_BL, "bkl_gpio");
gpio_direction_output(GPIO_NUM_LCD_BL, 1);
gpio_set_value(GPIO_NUM_LCD_BL, 1);
// printf("%s x\n", __func__);
printf("%s x\n", __func__);
return 0;
}
#if 0

View File

@ -15,3 +15,5 @@ rm -fr base/soc/qm10xd/linux/output/qm10xd_demo_ld_nand/bsp/spl/u-boot-spl-heade
rm -fr base/soc/qm10xd/linux/prebuilts/demo_ld/bsp/rootfs/initramfs-v510.cpio.xz
make project_demo_ld_defconfig
make xos -j$(nproc)
#make xos-uboot
#make xos-kernel

View File

@ -3,3 +3,4 @@ cp ../out/qm10xd_linux/qmimages/u-boot-spl-header.img .
cp ../out/qm10xd_linux/qmimages/zImage-dtb .
cp ../out/qm10xd_linux/qmimages/bsp/pdl/u-boot-pdl-header.img .
cp ../out/qm10xd_linux/qmimages/bsp/boot/u-boot-sdl.bin .
#cp ../base/soc/qm10xd/linux/output/qm10xd_demo_ld_nand/bsp/boot/u-boot.bin .