当前位置: 首页 > news >正文

20250927让荣品RD-RK3588-MID开发板的Android13系统在uboot下关闭背光充电

20250927让荣品RD-RK3588-MID开发板的Android13系统在uboot下关闭背光充电
2025/9/27 18:20


缘起:搞不定在关机充电的时候:在uboot状态下显示电量的百分比。PM要求直接关闭LCD屏的电量显示图片。
我们有电量指示灯带的!这个功能以后再解决了!

不过现在还是有一个小瑕疵:插+12V适配器充电的时候,背光会闪一下:亮一下就关闭了!
如果要彻底彻底,还是有一点点工作量的!


在RD-RK3588-MID开发板中 充电的时候 有充电图标。没有电量 百分比?
请帮忙加一下 充电百分比 ?@权
在设置 电池  百分比显示
这个是 关机充电的时候。
现在 只有 图标。没有百分比!
关机后充电显示吗?这种加不了实时数字,只能加图片。你们可以根据自己的需求进行开发
PRO-RK3566+buildroot 
我司 吊舱 和 竞品 在实现同样的功能 ,但是我司产品 在3.3V下电流高1A。功耗大很多。

该从哪里分析问题?比如 CPU/GPU/NPU占用率?

请提供查看占用率的方法??@陈威

Y:\RK3588_android13-20250818\u-boot\drivers\power\charge_animation.c
Z:\rk-android13-20250818RD-RK3588-MID\u-boot\drivers\power\charge_animation.c

static void autowake_timer_handler(int irq, void *data)
{
struct udevice *dev = data;
struct charge_animation_priv *priv = dev_get_priv(dev);
static long long count;

printf("**** wyb 2025/9/27 10:09 %s %s %d\n", __FILE__, __FUNCTION__, __LINE__);

writel(TIMER_CLR_INT, TIMER_BASE + TIMER_INTSTATUS);

    priv->auto_wakeup_key_state = KEY_PRESS_DOWN;
printf("auto wakeup count: %lld\n", ++count);
}


#include <drm/drm_mipi_dsi.h>

#include <config.h>
#include <common.h>
#include <errno.h>
#include <malloc.h>
#include <video.h>
#include <backlight.h>
#include <spi.h>
#include <asm/gpio.h>
#include <dm/device.h>
#include <dm/read.h>
#include <dm/uclass.h>
#include <dm/uclass-id.h>
#include <linux/media-bus-format.h>
#include <power/regulator.h>


static void autowakeup_timer_init(struct udevice *dev, uint32_t seconds)
{
uint64_t period = 24000000ULL * seconds;

printf("**** wyb 2025/9/27 10:09 %s %s %d\n", __FILE__, __FUNCTION__, __LINE__);

    
    //GPIO4A0 BackLight 4*32+0*8+0=128  //LCD BACKLIGHT
gpio_request(128,  "GPIO128");
gpio_direction_output(128, 0);
//gpio_direction_output(128, 1);   //open backlight
mdelay(10);
gpio_free(128);
mdelay(10);


/* Disable before conifg */
writel(0, TIMER_BASE + TIMER_CTRL);

    /* Config */
writel((uint32_t)period, TIMER_BASE + TIMER_LOAD_COUNT0);
writel((uint32_t)(period >> 32), TIMER_BASE + TIMER_LOAD_COUNT1);
writel(TIMER_CLR_INT, TIMER_BASE + TIMER_INTSTATUS);
writel(TIMER_EN | TIMER_INT_EN, TIMER_BASE + TIMER_CTRL);

    /* IRQ */
irq_install_handler(TIMER_IRQ, autowake_timer_handler, dev);
irq_handler_enable(TIMER_IRQ);
}

static void autowakeup_timer_uninit(void)
{
printf("**** wyb 2025/9/27 10:09 %s %s %d\n", __FILE__, __FUNCTION__, __LINE__);

writel(0, TIMER_BASE + TIMER_CTRL);

    irq_handler_disable(TIMER_IRQ);
irq_free_handler(TIMER_IRQ);
}
#endif


LOG记录:
vconn is already Off
Start toggling
fusb302 start drp toggling
fusb302@22: init finished
CC connected in CC2 as UFP
vconn is already Off
PD chip enter low power mode
bq25703_charger_current_init pd charge input vol:5000000uv current:1500000ua
cw2017_get_vol voltage=8446
cw2017_get_vol voltage=8446
cw2017_get_soc soc 69
vol: 8446, soc: 69
cw2017_get_soc soc 69
plug-det-gpio not configured, using backup method
Enable charge animation display
**** wyb 2025/9/27 10:09 drivers/power/charge-display-uclass.c charge_display_show 16
**** wyb 2025/9/27 10:09 drivers/power/charge_animation.c charge_animation_show 660
**** wyb 2025/9/27 10:09 drivers/power/charge_animation.c charge_extrem_low_power 573
cw2017_get_vol voltage=8446
**** wyb 2025/9/27 10:09 drivers/power/charge_animation.c autowakeup_timer_uninit 434
**** wyb 2025/9/27 10:09 drivers/power/charge_animation.c fg_charger_get_chrg_online 513
cw2017_get_vol voltage=8446
Auto wakeup: 15S
**** wyb 2025/9/27 10:09 drivers/power/charge_animation.c autowakeup_timer_init 416
Enter U-Boot charging mode
**** wyb 2025/9/27 10:09 drivers/power/charge_animation.c fg_charger_get_chrg_online 513

cw2017_get_soc soc 69
cw2017_get_vol voltage=7906
soc(69%) exit charge animation...
**** wyb 2025/9/27 10:09 drivers/power/charge_animation.c charge_show_bmp 446
Rockchip UBOOT DRM driver version: v1.0.1
vp0 have layer nr:2[0 2 ], primary plane: 2
vp1 have layer nr:2[1 3 ], primary plane: 3
vp2 have layer nr:2[6 8 ], primary plane: 8
vp3 have layer nr:2[7 9 ], primary plane: 9


【不要在这里关闭背光!这里关闭背光之后,uboot阶段就不出图了!】
Y:\RK3588_android13-20250818\u-boot\drivers\power\charge-display-uclass.c
Z:\rk-android13-20250818RD-RK3588-MID\u-boot\drivers\power\charge-display-uclass.c

/*
* (C) Copyright 2017 Rockchip Electronics Co., Ltd
*
* SPDX-License-Identifier:     GPL-2.0+
*/

#include <command.h>
#include <common.h>
#include <dm.h>
#include <power/charge_display.h>

int charge_display_show(struct udevice *dev)
{
const struct dm_charge_display_ops *ops = dev_get_driver_ops(dev);

printf("**** wyb 2025/9/27 10:09 %s %s %d\n", __FILE__, __FUNCTION__, __LINE__);

    if (!ops || !ops->show)
return -ENOSYS;

    return ops->show(dev);
}


//#include <drm/drm_mipi_dsi.h>
//
//#include <config.h>
//#include <common.h>
//#include <errno.h>
//#include <malloc.h>
//#include <video.h>
//#include <backlight.h>
//#include <spi.h>
//#include <asm/gpio.h>
//#include <dm/device.h>
//#include <dm/read.h>
//#include <dm/uclass.h>
//#include <dm/uclass-id.h>
//#include <linux/media-bus-format.h>
//#include <power/regulator.h>


int charge_display(void)
{
struct udevice *dev;
int ret;

printf("**** wyb 2025/9/27 10:09 %s %s %d\n", __FILE__, __FUNCTION__, __LINE__);

//    //GPIO4A0 BackLight 4*32+0*8+0=128  //LCD BACKLIGHT
//    gpio_request(128,  "GPIO128");
//    gpio_direction_output(128, 0);
//    //gpio_direction_output(128, 1);   //open backlight
//    mdelay(10);
//    gpio_free(128);
//    mdelay(10);


ret = uclass_get_device(UCLASS_CHARGE_DISPLAY, 0, &dev);
if (ret) {
debug("Get charge display failed, ret=%d\n", ret);
return ret;
}

    return charge_display_show(dev);
}

UCLASS_DRIVER(charge_display) = {
.id    = UCLASS_CHARGE_DISPLAY,
.name    = "charge_display",
};

http://www.dtcms.com/a/414264.html

相关文章:

  • 人工智能专业知识图谱
  • 深入理解Windows服务:架构、管理与编程实践
  • 作风建设简报--门户网站如何提高网站百度权重
  • CentOS7搭建ELK日志分析系统
  • 基于大数据hive的银行信用卡用户的数仓系统的设计与实现_django
  • Docker从网络管理到容器优化
  • count down 83 days
  • 华为云速建站如何用网页设计制作个人网站
  • 做网站用什么压缩代码和图片如何做淘宝商城网站
  • 基于STM32与influxDB的电力监控系统-3
  • STM32 程序下载失败的问题原因和解决方法集合!
  • 【读论文】AI笔记(一)9月26日组会前
  • 逻辑的回归——一阶谓词逻辑及其变体在自然语言处理深层语义分析中的作用与前瞻
  • Java EE初阶启程记03---Thread类及常见方法
  • 医疗行业 AI 投毒攻击原理及防护研究
  • PostIn入门到实战(5) - 如何快速导入PostMan数据,实现数据迁移
  • 让别人做网站需要注意什么服务器试用
  • 京东JoyAgent-JDGenie开源多智能体系统如何重塑AI应用落地新范式
  • idea学习日记7: StringBuilder的基本操作
  • MySQL专用服务器自动调优指南
  • Ubuntu24.04 安卓模拟器安装指南
  • 做餐饮网站价格网站建设内部优化
  • AI大模型开发语言排行
  • UMI企业智脑知识与数据管理:企业的智慧宝库
  • B3611 【模板】传递闭包-普及/提高-
  • 网上帮别人做网站深圳网站营销公司
  • 国内完美安装 Rust 环境 + VSCode 编写 Hello World 完整指南(2025 最新)
  • 基于 HTML、CSS 和 JavaScript 的智能图像灰度直方图匹配系统
  • 【自然语言处理与大模型】LlamaIndex快速入门①
  • 基于html2web和deepseek实现单词卡片识记功能的web设计