Alexandru Gagniuc (mr.nuke.me@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4637
-gerrit
commit 4688df68f90204a6d80ea8abce94db0d99e85ed0 Author: Alexandru Gagniuc mr.nuke.me@gmail.com Date: Thu Jan 9 20:07:10 2014 -0600
xpowers/axp209: Allow voltages to be sepecified in devicetree.cb
This allows system voltages to be specified uniformly, rather than hardcoding them for each board. This will be used by cubieboard in an upcoming patch.
Change-Id: I9dc2d3281d076c359c3fad13688649f7d36c0001 Signed-off-by: Alexandru Gagniuc mr.nuke.me@gmail.com --- src/drivers/xpowers/axp209/axp209.c | 13 +++++++++++++ src/drivers/xpowers/axp209/chip.h | 21 +++++++++++++++++++++ 2 files changed, 34 insertions(+)
diff --git a/src/drivers/xpowers/axp209/axp209.c b/src/drivers/xpowers/axp209/axp209.c index 68ab8a5..9f77cf6 100644 --- a/src/drivers/xpowers/axp209/axp209.c +++ b/src/drivers/xpowers/axp209/axp209.c @@ -9,7 +9,9 @@ */
#include "axp209.h" +#include "chip.h"
+#include <device/device.h> #include <device/i2c.h>
/* Hide these definitions from the rest of the source, so keep them here */ @@ -228,3 +230,14 @@ enum cb_err axp209_set_ldo4_voltage(u8 bus, u16 millivolts)
return CB_SUCCESS; } + +/* + * Usually, the AXP209 is enabled and configured in romstage, so there is no + * need for a full ramstage driver. Hence .enable_dev is NULL. + */ +#ifndef __PRE_RAM__ +struct chip_operations drivers_xpowers_axp209_config = { + CHIP_NAME("X-Powers AXP 209 Power Management Unit") + .enable_dev = NULL, +}; +#endif /* __PRE_RAM__ */ diff --git a/src/drivers/xpowers/axp209/chip.h b/src/drivers/xpowers/axp209/chip.h new file mode 100644 index 0000000..c19253d --- /dev/null +++ b/src/drivers/xpowers/axp209/chip.h @@ -0,0 +1,21 @@ +/* + * X-Powers AXP 209 devicetree.cb interface + * + * Copyright (C) 2013 Alexandru Gagniuc mr.nuke.me@gmail.com + * Subject to the GNU GPL v2, or (at your option) any later version. + */ + +#ifndef AXP209_CHIP_H +#define AXP209_CHIP_H + +#include <types.h> + +struct drivers_xpowers_axp209_config { + u16 dcdc2_voltage_mv; /**< DCDC2 converter voltage output */ + u16 dcdc3_voltage_mv; /**< DCDC3 converter voltage output */ + u16 ldo2_voltage_mv; /**< LDO2 regulator voltage output */ + u16 ldo3_voltage_mv; /**< LDO3 regulator voltage output */ + u16 ldo4_voltage_mv; /**< LDO4 regulator voltage output */ +}; + +#endif /* AXP209_CHIP_H */