ec/google/chromeec: Add API to get PD Chip info
Add API to get Power Delivery (PD) Chip info which includes vendor ID, product ID and firmware version(if any). BUG=None TEST=Build Brox BIOS image and boot to OS. Change-Id: I4cc4493ac64d44076877fee633488c95cd09807e Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84936 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
This commit is contained in:
parent
c7bca700c8
commit
2e52f863ad
2 changed files with 23 additions and 0 deletions
|
|
@ -1170,6 +1170,17 @@ int google_chromeec_get_num_pd_ports(unsigned int *num_ports)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int google_chromeec_get_pd_chip_infoi(int port, int renew,
|
||||
struct ec_response_pd_chip_info *r)
|
||||
{
|
||||
const struct ec_params_pd_chip_info p = {
|
||||
.port = port,
|
||||
.live = renew,
|
||||
};
|
||||
|
||||
return ec_cmd_pd_chip_info(PLAT_EC, &p, r);
|
||||
}
|
||||
|
||||
int google_chromeec_get_pd_port_caps(int port,
|
||||
struct usb_pd_port_caps *port_caps)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -337,6 +337,18 @@ int google_chromeec_get_cmd_versions(int command, uint32_t *pmask);
|
|||
*/
|
||||
int google_chromeec_get_num_pd_ports(unsigned int *num_ports);
|
||||
|
||||
/**
|
||||
* Return a port's PD chip information.
|
||||
*
|
||||
* @param port The desired port number
|
||||
* @param renew Refresh cached value
|
||||
* @param r Result buffer for chip info
|
||||
*
|
||||
* @return 0 if ok, -1 on error
|
||||
*/
|
||||
int google_chromeec_get_pd_chip_infoi(int port, int renew,
|
||||
struct ec_response_pd_chip_info *r);
|
||||
|
||||
/* Structure representing the capabilities of a USB-PD port */
|
||||
struct usb_pd_port_caps {
|
||||
enum ec_pd_power_role_caps power_role_cap;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue