mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-27 15:24:54 +00:00
Merge "feat(allwinner): allow to skip PMIC regulator setup" into integration
This commit is contained in:
commit
e752fa4a4c
5 changed files with 17 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
||||||
const uint8_t axp_chip_id = AXP803_CHIP_ID;
|
const uint8_t axp_chip_id = AXP803_CHIP_ID;
|
||||||
const char *const axp_compatible = "x-powers,axp803";
|
const char *const axp_compatible = "x-powers,axp803";
|
||||||
|
|
||||||
|
#if SUNXI_SETUP_REGULATORS == 1
|
||||||
const struct axp_regulator axp_regulators[] = {
|
const struct axp_regulator axp_regulators[] = {
|
||||||
{"dcdc1", 1600, 3400, 100, NA, 0x20, 0x10, 0},
|
{"dcdc1", 1600, 3400, 100, NA, 0x20, 0x10, 0},
|
||||||
{"dcdc5", 800, 1840, 10, 32, 0x24, 0x10, 4},
|
{"dcdc5", 800, 1840, 10, 32, 0x24, 0x10, 4},
|
||||||
|
@ -20,3 +21,4 @@ const struct axp_regulator axp_regulators[] = {
|
||||||
{"fldo1", 700, 1450, 50, NA, 0x1c, 0x13, 2},
|
{"fldo1", 700, 1450, 50, NA, 0x1c, 0x13, 2},
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
const uint8_t axp_chip_id = AXP805_CHIP_ID;
|
const uint8_t axp_chip_id = AXP805_CHIP_ID;
|
||||||
const char *const axp_compatible = "x-powers,axp805";
|
const char *const axp_compatible = "x-powers,axp805";
|
||||||
|
|
||||||
|
#if SUNXI_SETUP_REGULATORS == 1
|
||||||
/*
|
/*
|
||||||
* The "dcdcd" split changes the step size by a factor of 5, not 2;
|
* The "dcdcd" split changes the step size by a factor of 5, not 2;
|
||||||
* disallow values above the split to maintain accuracy.
|
* disallow values above the split to maintain accuracy.
|
||||||
|
@ -31,3 +32,4 @@ const struct axp_regulator axp_regulators[] = {
|
||||||
{"cldo3", 700, 3300, 100, NA, 0x26, 0x11, 6},
|
{"cldo3", 700, 3300, 100, NA, 0x26, 0x11, 6},
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
|
@ -48,6 +48,7 @@ void axp_power_off(void)
|
||||||
axp_setbits(0x32, BIT(7));
|
axp_setbits(0x32, BIT(7));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if SUNXI_SETUP_REGULATORS == 1
|
||||||
/*
|
/*
|
||||||
* Retrieve the voltage from a given regulator DTB node.
|
* Retrieve the voltage from a given regulator DTB node.
|
||||||
* Both the regulator-{min,max}-microvolt properties must be present and
|
* Both the regulator-{min,max}-microvolt properties must be present and
|
||||||
|
@ -208,3 +209,4 @@ void axp_setup_regulators(const void *fdt)
|
||||||
axp_setbits(0x11, BIT(7));
|
axp_setbits(0x11, BIT(7));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* SUNXI_SETUP_REGULATORS */
|
||||||
|
|
|
@ -47,6 +47,13 @@ int axp_clrsetbits(uint8_t reg, uint8_t clr_mask, uint8_t set_mask);
|
||||||
|
|
||||||
int axp_check_id(void);
|
int axp_check_id(void);
|
||||||
void axp_power_off(void);
|
void axp_power_off(void);
|
||||||
|
|
||||||
|
#if SUNXI_SETUP_REGULATORS == 1
|
||||||
void axp_setup_regulators(const void *fdt);
|
void axp_setup_regulators(const void *fdt);
|
||||||
|
#else
|
||||||
|
static inline void axp_setup_regulators(const void *fdt)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* AXP_H */
|
#endif /* AXP_H */
|
||||||
|
|
|
@ -61,6 +61,10 @@ BL31_SOURCES += drivers/allwinner/sunxi_msgbox.c \
|
||||||
${AW_PLAT}/common/sunxi_scpi_pm.c
|
${AW_PLAT}/common/sunxi_scpi_pm.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
SUNXI_SETUP_REGULATORS ?= 1
|
||||||
|
$(eval $(call assert_boolean,SUNXI_SETUP_REGULATORS))
|
||||||
|
$(eval $(call add_define,SUNXI_SETUP_REGULATORS))
|
||||||
|
|
||||||
# The bootloader is guaranteed to only run on CPU 0 by the boot ROM.
|
# The bootloader is guaranteed to only run on CPU 0 by the boot ROM.
|
||||||
COLD_BOOT_SINGLE_CPU := 1
|
COLD_BOOT_SINGLE_CPU := 1
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue