diff options
author | Tom Rini <trini@konsulko.com> | 2016-10-12 20:48:43 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-10-12 20:48:43 -0400 |
commit | 79493609c5300be6cc555ab8bd38971360b381f6 (patch) | |
tree | dff7c18752cbc05974dc5459c0b90879edf8e342 /include | |
parent | 5ebd27d860ec0c6e36f1b0f973653fe66a7360be (diff) | |
parent | bfeba0173aa45c24bbdba45149716c83258d25f6 (diff) | |
download | u-boot-79493609c5300be6cc555ab8bd38971360b381f6.tar.gz |
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'include')
-rw-r--r-- | include/cros_ec.h | 11 | ||||
-rw-r--r-- | include/os.h | 11 | ||||
-rw-r--r-- | include/power/lp873x.h | 19 | ||||
-rw-r--r-- | include/power/palmas.h | 25 | ||||
-rw-r--r-- | include/power/regulator.h | 5 |
5 files changed, 70 insertions, 1 deletions
diff --git a/include/cros_ec.h b/include/cros_ec.h index 30b19089b1..ec7517c5ae 100644 --- a/include/cros_ec.h +++ b/include/cros_ec.h @@ -281,6 +281,17 @@ int cros_ec_flash_read(struct cros_ec_dev *dev, uint8_t *data, uint32_t offset, uint32_t size); /** + * Read back flash parameters + * + * This function reads back parameters of the flash as reported by the EC + * + * @param dev Pointer to device + * @param info Pointer to output flash info struct + */ +int cros_ec_read_flashinfo(struct cros_ec_dev *dev, + struct ec_response_flash_info *info); + +/** * Write data to the flash * * Write an arbitrary amount of data to the EC flash, by repeatedly writing diff --git a/include/os.h b/include/os.h index 1782e50e77..049b248c5b 100644 --- a/include/os.h +++ b/include/os.h @@ -215,9 +215,18 @@ struct os_dirent_node { int os_dirent_ls(const char *dirname, struct os_dirent_node **headp); /** + * Free directory list + * + * This frees a linked list containing a directory listing. + * + * @param node Pointer to head of linked list + */ +void os_dirent_free(struct os_dirent_node *node); + +/** * Get the name of a directory entry type * - * @param type Type to cehck + * @param type Type to check * @return string containing the name of that type, or "???" if none/invalid */ const char *os_dirent_get_typename(enum os_dirent_t type); diff --git a/include/power/lp873x.h b/include/power/lp873x.h new file mode 100644 index 0000000000..e0c07115d6 --- /dev/null +++ b/include/power/lp873x.h @@ -0,0 +1,19 @@ +#define LP8732 0x0 +#define LP8733 0x1 + +#define LP873X_LDO_NUM 2 +#define LP873X_BUCK_NUM 2 + +/* Drivers name */ +#define LP873X_LDO_DRIVER "lp873x_ldo" +#define LP873X_BUCK_DRIVER "lp873x_buck" + +#define LP873X_BUCK_VOLT_MASK 0xFF +#define LP873X_BUCK_VOLT_MAX_HEX 0xFF +#define LP873X_BUCK_VOLT_MAX 3360000 +#define LP873X_BUCK_MODE_MASK 0x1 + +#define LP873X_LDO_VOLT_MASK 0x1F +#define LP873X_LDO_VOLT_MAX_HEX 0x19 +#define LP873X_LDO_VOLT_MAX 3300000 +#define LP873X_LDO_MODE_MASK 0x1 diff --git a/include/power/palmas.h b/include/power/palmas.h new file mode 100644 index 0000000000..bad5a354d3 --- /dev/null +++ b/include/power/palmas.h @@ -0,0 +1,25 @@ +#define PALMAS 0x0 +#define TPS659038 0x1 +#define TPS65917 0x2 + +/* I2C device address for pmic palmas */ +#define PALMAS_I2C_ADDR (0x12 >> 1) +#define PALMAS_LDO_NUM 11 +#define PALMAS_SMPS_NUM 8 + +/* Drivers name */ +#define PALMAS_LDO_DRIVER "palmas_ldo" +#define PALMAS_SMPS_DRIVER "palmas_smps" + +#define PALMAS_SMPS_VOLT_MASK 0x7F +#define PALMAS_SMPS_RANGE_MASK 0x80 +#define PALMAS_SMPS_VOLT_MAX_HEX 0x7F +#define PALMAS_SMPS_VOLT_MAX 3300000 +#define PALMAS_SMPS_MODE_MASK 0x3 +#define PALMAS_SMPS_STATUS_MASK 0x30 + +#define PALMAS_LDO_VOLT_MASK 0x3F +#define PALMAS_LDO_VOLT_MAX_HEX 0x3F +#define PALMAS_LDO_VOLT_MAX 3300000 +#define PALMAS_LDO_MODE_MASK 0x1 +#define PALMAS_LDO_STATUS_MASK 0x10 diff --git a/include/power/regulator.h b/include/power/regulator.h index 9bcd728120..f47ab6740b 100644 --- a/include/power/regulator.h +++ b/include/power/regulator.h @@ -108,6 +108,7 @@ enum regulator_type { REGULATOR_TYPE_BUCK, REGULATOR_TYPE_DVS, REGULATOR_TYPE_FIXED, + REGULATOR_TYPE_GPIO, REGULATOR_TYPE_OTHER, }; @@ -152,6 +153,8 @@ enum regulator_flag { * TODO(sjg@chromium.org): Consider putting the above two into @flags * @flags: - flags value (see REGULATOR_FLAG_...) * @name** - fdt regulator name - should be taken from the device tree + * ctrl_reg: - Control register offset used to enable/disable regulator + * volt_reg: - register offset for writing voltage vsel values * * Note: * * - set automatically on device probe by the uclass's '.pre_probe' method. @@ -171,6 +174,8 @@ struct dm_regulator_uclass_platdata { bool boot_on; const char *name; int flags; + u8 ctrl_reg; + u8 volt_reg; }; /* Regulator device operations */ |