Skip to content
Snippets Groups Projects
Commit 6424577b authored by Hou Zhiqiang's avatar Hou Zhiqiang Committed by York Sun
Browse files

ls1046ardb: cpld: add API for selecting core volt

parent 4394ad12
No related branches found
No related tags found
No related merge requests found
...@@ -82,6 +82,15 @@ void cpld_set_sd(void) ...@@ -82,6 +82,15 @@ void cpld_set_sd(void)
CPLD_WRITE(system_rst, 1); CPLD_WRITE(system_rst, 1);
} }
void cpld_select_core_volt(bool en_0v9)
{
u8 reg17 = en_0v9;
CPLD_WRITE(vdd_en, 1);
CPLD_WRITE(vdd_sel, reg17);
}
#ifdef DEBUG #ifdef DEBUG
static void cpld_dump_regs(void) static void cpld_dump_regs(void)
{ {
......
...@@ -35,6 +35,7 @@ struct cpld_data { ...@@ -35,6 +35,7 @@ struct cpld_data {
u8 cpld_read(unsigned int reg); u8 cpld_read(unsigned int reg);
void cpld_write(unsigned int reg, u8 value); void cpld_write(unsigned int reg, u8 value);
void cpld_rev_bit(unsigned char *value); void cpld_rev_bit(unsigned char *value);
void cpld_select_core_volt(bool en_0v9);
#define CPLD_READ(reg) cpld_read(offsetof(struct cpld_data, reg)) #define CPLD_READ(reg) cpld_read(offsetof(struct cpld_data, reg))
#define CPLD_WRITE(reg, value) \ #define CPLD_WRITE(reg, value) \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment