project:cfg:BoardConfig_IPC: Added fastboot BoardConfig file and firmware post-scripts, distinguishing between the BoardConfigs for Luckfox Pico Pro and Luckfox Pico Max. project:app: Added fastboot_client and rk_smart_door for quick boot applications; updated rkipc app to adapt to the latest media library. media:samples: Added more usage examples. media:rockit: Fixed bugs; removed support for retrieving data frames from VPSS. media:isp: Updated rkaiq library and related tools to support connection to RKISP_Tuner. sysdrv:Makefile: Added support for compiling drv_ko on Luckfox Pico Ultra W using Ubuntu; added support for custom root filesystem. sysdrv:tools:board: Updated Buildroot optional mirror sources, updated some software versions, and stored device tree files and configuration files that undergo multiple modifications for U-Boot and kernel separately. sysdrv:source:mcu: Used RISC-V MCU SDK with RT-Thread system, mainly for initializing camera AE during quick boot. sysdrv:source:uboot: Added support for fastboot; added high baud rate DDR bin for serial firmware upgrades. sysdrv:source:kernel: Upgraded to version 5.10.160; increased NPU frequency for RV1106G3; added support for fastboot. Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
43 lines
934 B
C
43 lines
934 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Copyright (c) 2024 Rockchip Electronics Co., Ltd.
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <dm.h>
|
|
#include <thermal.h>
|
|
#include <power/pmic.h>
|
|
#include <power/sy7636a.h>
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
static int sy7636a_get_temp(struct udevice *dev, int *temp)
|
|
{
|
|
struct udevice *pmic = dev_get_parent(dev);
|
|
int ret;
|
|
|
|
ret = pmic_reg_read(pmic, SY7636A_REG_TERMISTOR_READOUT);
|
|
if (ret < 0)
|
|
return ret;
|
|
|
|
*temp = *((signed char *)&ret);
|
|
|
|
return 0;
|
|
}
|
|
|
|
static const struct dm_thermal_ops sy7636a_thermal_ops = {
|
|
.get_temp = sy7636a_get_temp,
|
|
};
|
|
|
|
static const struct udevice_id sy7636a_thermal_of_match[] = {
|
|
{ .compatible = SY7636A_THERMAL_COMTATIBLE_NAME },
|
|
{ }
|
|
};
|
|
|
|
U_BOOT_DRIVER(sy7636a_thermal) = {
|
|
.name = SY7636A_THERMAL_COMTATIBLE_NAME,
|
|
.id = UCLASS_THERMAL,
|
|
.of_match = sy7636a_thermal_of_match,
|
|
.ops = &sy7636a_thermal_ops,
|
|
};
|