hancock: board update

- handle PMIC v3.14 (overprogrammed) as v1.0
- change default DTB name
This commit is contained in:
Rene Straub 2018-06-24 19:06:02 +02:00 committed by Patrick Zysset
parent 786c7ae6c3
commit d202e6b407
1 changed files with 12 additions and 2 deletions

View File

@ -628,7 +628,7 @@ static void set_devicetree_name(void)
/* add hardware versions to environment */
if (bd_get_devicetree(devicetreename, sizeof(devicetreename)) != 0) {
printf("Devicetree name not found, using default name\n");
strcpy(devicetreename, "am335x-hancock-prod1.dtb");
strcpy(devicetreename, "am335x-vcu-prod1.dtb");
}
setenv("fdt_image", devicetreename);
@ -668,9 +668,19 @@ static void get_pmic_version(void)
uint8_t val = 0x00;
uint8_t ver, rev;
da9063_get_reg(PMIC_REG_CONFIG_ID, &val);
(void)da9063_get_reg(PMIC_REG_CONFIG_ID, &val);
ver = (val >> 4) & 0xF;
rev = (val >> 0) & 0xF;
/* Quirk:
* If reported version is 3.14, this is one of the 5 prototypes which have
* been programmed multiple times --> Treat these as 1.0
*/
if ((ver == 3) && (rev == 14)) {
ver = 1;
rev = 0;
}
printf("PMIC: V%d.%d\n", ver, rev);
}