mirror of
https://github.com/sipeed/LicheeRV-Nano-Build.git
synced 2026-11-09 18:04:55 -06:00
Merge pull request #53 from 916BGAI/main
Add AIC8800DC support and add axp2101 0x47 version support
This commit is contained in:
@@ -231,12 +231,12 @@
|
||||
reg_names = "core_mem";
|
||||
src-frequency = <375000000>;
|
||||
min-frequency = <400000>; // 400Khz
|
||||
max-frequency = <50000000>; // 50Mhz
|
||||
//max-frequency = <50000000>; // 50Mhz
|
||||
//max-frequency = <45000000>; // 45Mhz
|
||||
//max-frequency = <40000000>; // 40Mhz
|
||||
//max-frequency = <35000000>; // 35Mhz
|
||||
//max-frequency = <30000000>; // 30Mhz
|
||||
//max-frequency = <25000000>; // 25Mhz
|
||||
max-frequency = <25000000>; // 25Mhz
|
||||
//max-frequency = <20000000>; // 20Mhz
|
||||
//max-frequency = <15000000>; // 15Mhz
|
||||
//max-frequency = <10000000>; // 10Mhz
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#define AXP2101_SLAVE_ADDRESS (0x34)
|
||||
|
||||
#define XPOWERS_AXP2101_CHIP_ID (0x4A)
|
||||
#define XPOWERS_AXP2101_CHIP_ID_2 (0x47)
|
||||
|
||||
#define XPOWERS_AXP2101_STATUS1 (0x00)
|
||||
#define XPOWERS_AXP2101_STATUS2 (0x01)
|
||||
|
||||
@@ -3030,7 +3030,7 @@ protected:
|
||||
|
||||
bool initImpl()
|
||||
{
|
||||
if (getChipID() == XPOWERS_AXP2101_CHIP_ID) {
|
||||
if (getChipID() == XPOWERS_AXP2101_CHIP_ID || getChipID() == XPOWERS_AXP2101_CHIP_ID_2) {
|
||||
setChipModel(XPOWERS_AXP2101);
|
||||
disableTSPinMeasure(); //Disable NTC temperature detection by default
|
||||
return true;
|
||||
|
||||
@@ -616,6 +616,7 @@ public:
|
||||
virtual void setChargerTerminationCurr(uint8_t opt) = 0;
|
||||
virtual void disableDieOverTempDetect(void) = 0;
|
||||
virtual void resetGauge(void) = 0;
|
||||
virtual void enableLongPressShutdown(void) = 0;
|
||||
|
||||
// PMU PEKEY settings
|
||||
/**
|
||||
|
||||
@@ -222,6 +222,7 @@ int main(int argc, char* argv[])
|
||||
PMU->setPowerKeyPressOffTime(XPOWERS_POWEROFF_4S);
|
||||
// Set the button power-on press time
|
||||
PMU->setPowerKeyPressOnTime(XPOWERS_POWERON_128MS);
|
||||
PMU->enableLongPressShutdown();
|
||||
|
||||
PMU->disableTSPinMeasure();
|
||||
PMU->enableVbusVoltageMeasure();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
CONFIG_SDIO_SUPPORT := y
|
||||
CONFIG_SDIO_PWRCTRL := y
|
||||
#CONFIG_AIC_FW_PATH = "/vendor/etc/firmware"
|
||||
CONFIG_AIC_FW_PATH ?= "/lib/firmware/aic8800_sdio/aic8800"
|
||||
#CONFIG_AIC_FW_PATH ?= "/lib/firmware/aic8800_sdio/aic8800"
|
||||
|
||||
export CONFIG_AIC_FW_PATH
|
||||
ccflags-y += -DCONFIG_AIC_FW_PATH=\"$(CONFIG_AIC_FW_PATH)\"
|
||||
|
||||
@@ -338,8 +338,9 @@ int is_file_exist(char* name);
|
||||
#endif
|
||||
int aicbsp_resv_mem_init(void);
|
||||
int aicbsp_resv_mem_deinit(void);
|
||||
extern char* aic_default_fw_path;
|
||||
|
||||
#define AICBSP_FW_PATH CONFIG_AIC_FW_PATH
|
||||
#define AICBSP_FW_PATH aic_default_fw_path
|
||||
#define AICBSP_FW_PATH_MAX 200
|
||||
|
||||
#define RAM_FMAC_FW_ADDR 0x00120000
|
||||
|
||||
@@ -54,9 +54,9 @@ static bool aicbsp_load_fw_in_fdrv = false;
|
||||
#define FW_PATH_MAX 200
|
||||
|
||||
//#ifdef CONFIG_PLATFORM_UBUNTU
|
||||
//static const char* aic_default_fw_path = "/lib/firmware/aic8800_sdio";
|
||||
char* aic_default_fw_path = "/usr/lib/firmware/aic8800_sdio/aic8800";
|
||||
//#else
|
||||
static const char* aic_default_fw_path = CONFIG_AIC_FW_PATH;
|
||||
//static const char* aic_default_fw_path = CONFIG_AIC_FW_PATH;
|
||||
//#endif
|
||||
char aic_fw_path[FW_PATH_MAX];
|
||||
module_param_string(aic_fw_path, aic_fw_path, FW_PATH_MAX, 0660);
|
||||
@@ -313,6 +313,7 @@ static int aicbsp_sdio_probe(struct sdio_func *func,
|
||||
if(sdiodev->chipid == PRODUCT_ID_AIC8800DC || sdiodev->chipid == PRODUCT_ID_AIC8800DW){
|
||||
dev_set_drvdata(&sdiodev->func_msg->dev, bus_if);
|
||||
printk("the device is PRODUCT_ID_AIC8800DC \n");
|
||||
aic_default_fw_path = "/usr/lib/firmware/aic8800_sdio/aic8800DC";
|
||||
}
|
||||
dev_set_drvdata(&func->dev, bus_if);
|
||||
sdiodev->dev = &func->dev;
|
||||
|
||||
Reference in New Issue
Block a user