Change V_VBAT_BKUP Configuration on an Intel® Edison Board
See the steps below to change the default settings of V_VBAT_BKUP on an Intel® Edison Board. The guide assumes you have an environment ready to build a standard Intel® Edison image. If your environment isn't ready, see the Intel® Edison Board Support Package.
In this example, the BBCHGRCFG register is set to 31, with a charge voltage of 3.3V, and charge current of 500 uA.
To change the default settings, follow these steps:
- Change directory:
cd/meta-intel-edison/meta-intel-edison-bsp/recipes-kernel/linux/files/ - Create a file named intel_scu_pmic.patch with the following content:
diff -urN a/drivers/platform/x86/intel_scu_pmic.c b/drivers/platform/x86/intel_scu_pmic.c
--- a/drivers/platform/x86/intel_scu_pmic.c 2015-08-20 14:16:14.115259252 -0700
+++ b/drivers/platform/x86/intel_scu_pmic.c 2015-08-20 14:15:11.823260500 -0700
@@ -380,6 +380,8 @@static int pmic_rpmsg_probe(struct rpmsg_channel *rpdev)
{
+ uint8_t bbchgrcfg_value;
+ int ret1;
int ret = 0;if (rpdev == NULL) {
@@ -415,6 +417,13 @@
goto rpmsg_err;
}+ ret1 = intel_scu_ipc_ioread8(0x52, &bbchgrcfg_value);
+ printk("ret=%d, reg=%d\n", ret1, bbchgrcfg_value);
+ ret1 = intel_scu_ipc_iowrite8(0x52, 31);
+ printk("ret=%d\n", ret1);
+ ret1 = intel_scu_ipc_ioread8(0x52, &bbchgrcfg_value);
+ printk("ret=%d, reg=%d\n", ret1, bbchgrcfg_value);
+
goto out;rpmsg_err:
@@ -475,3 +484,4 @@
MODULE_AUTHOR("Bin Yang");
MODULE_DESCRIPTION("Intel PMIC Driver");
MODULE_LICENSE("GPL v2");
+ - Go back one level to this directory:
cd/meta-intel-edison/meta-intel-edison-bsp/recipes-kernel/linux/ - Edit the linux-yocto_3.10.bbappend file and add this line:
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
COMPATIBLE_MACHINE = "edison"
LINUX_VERSION = "3.10.17"
SRCREV_machine = "c03195ed6e3066494e3fb4be69154a57066e845b"
SRCREV_meta = "6ad20f049abd52b515a8e0a4664861cfd331f684"SRC_URI += "file://defconfig"
SRC_URI += "file://upstream_to_edison.patch"
SRC_URI += "file:// intel_scu_pmic.patch"
PV = "${LINUX_VERSION}" - Run the following command to clean the build:
bitbake virtual/kernel –c cleanall - Run the following command to build the kernel:
bitbake virtual/kernel
After you successfully build the kernel, flash your new image to the Intel Edison Board. The V_VBAT_BKUP has the following configuration:
- Register setting: BBCHGRCFG = 31
- Voltage 3.3V
- Current 500 uA