Commit 5a086f5c authored by Caveh Jalali's avatar Caveh Jalali Committed by chrome-bot
Browse files

ps8751: enable software sync.

this turns on ps8751 firmware update during software sync on
reef/electro and derivative boards.

testing on electro:

with debug code enabled in the ps8751 driver (i.e. forced update),
we can see the update taking place in the console logs.  when no update
is needed, we simply see:

ps8751.1: vendor 0x1da0 product 0x8751 device 0x0001 hw_rev A3 fw_rev 0x37

reported from the update driver, verifying that we've enabled the
update driver in the board file.

we have a working design doc for firmware updates:

https://goto.google.com/obvph



also, spot checked nasher build to verify defconfig changes carry over
to derivative boards.

TEST=updated ps8751 firmware on electro

BUG=b:35586896
BRANCH=none

Change-Id: I2c777425d8d266f833b3da6fa255c76084989401
Signed-off-by: default avatarCaveh Jalali <caveh@google.com>
Reviewed-on: https://chromium-review.googlesource.com/502708

Reviewed-by: default avatarJulius Werner <jwerner@chromium.org>
parent 49e76252
......@@ -21,10 +21,12 @@ CONFIG_NV_STORAGE_CMOS=y
CONFIG_KERNEL_ZIMAGE=y
# Drivers
CONFIG_DRIVER_BUS_I2C_CROS_EC_TUNNEL=y
CONFIG_DRIVER_BUS_I2C_DESIGNWARE=y
CONFIG_DRIVER_BUS_I2C_DESIGNWARE_PCI=y
CONFIG_DRIVER_EC_CROS=y
CONFIG_DRIVER_EC_CROS_LPC=y
CONFIG_DRIVER_EC_PS8751=y
CONFIG_DRIVER_FLASH_MEMMAPPED=y
CONFIG_DRIVER_INPUT_PS2=y
CONFIG_DRIVER_INPUT_USB=y
......
# Arch
CONFIG_ARCH_X86=y
# Board
# Board
CONFIG_BOARD="nasher"
CONFIG_BOARD_DIR="reef"
......@@ -22,10 +21,12 @@ CONFIG_NV_STORAGE_CMOS=y
CONFIG_KERNEL_ZIMAGE=y
# Drivers
CONFIG_DRIVER_BUS_I2C_CROS_EC_TUNNEL=y
CONFIG_DRIVER_BUS_I2C_DESIGNWARE=y
CONFIG_DRIVER_BUS_I2C_DESIGNWARE_PCI=y
CONFIG_DRIVER_EC_CROS=y
CONFIG_DRIVER_EC_CROS_LPC=y
CONFIG_DRIVER_EC_PS8751=y
CONFIG_DRIVER_FLASH_MEMMAPPED=y
CONFIG_DRIVER_INPUT_PS2=y
CONFIG_DRIVER_INPUT_USB=y
......
......@@ -21,10 +21,12 @@ CONFIG_NV_STORAGE_CMOS=y
CONFIG_KERNEL_ZIMAGE=y
# Drivers
CONFIG_DRIVER_BUS_I2C_CROS_EC_TUNNEL=y
CONFIG_DRIVER_BUS_I2C_DESIGNWARE=y
CONFIG_DRIVER_BUS_I2C_DESIGNWARE_PCI=y
CONFIG_DRIVER_EC_CROS=y
CONFIG_DRIVER_EC_CROS_LPC=y
CONFIG_DRIVER_EC_PS8751=y
CONFIG_DRIVER_FLASH_MEMMAPPED=y
CONFIG_DRIVER_INPUT_PS2=y
CONFIG_DRIVER_INPUT_USB=y
......
......@@ -20,10 +20,12 @@ CONFIG_NV_STORAGE_CMOS=y
CONFIG_KERNEL_ZIMAGE=y
# Drivers
CONFIG_DRIVER_BUS_I2C_CROS_EC_TUNNEL=y
CONFIG_DRIVER_BUS_I2C_DESIGNWARE=y
CONFIG_DRIVER_BUS_I2C_DESIGNWARE_PCI=y
CONFIG_DRIVER_EC_CROS=y
CONFIG_DRIVER_EC_CROS_LPC=y
CONFIG_DRIVER_EC_PS8751=y
CONFIG_DRIVER_FLASH_MEMMAPPED=y
CONFIG_DRIVER_INPUT_PS2=y
CONFIG_DRIVER_INPUT_USB=y
......
# Arch
CONFIG_ARCH_X86=y
# Board
# Board
CONFIG_BOARD="sand"
CONFIG_BOARD_DIR="reef"
......@@ -22,10 +21,12 @@ CONFIG_NV_STORAGE_CMOS=y
CONFIG_KERNEL_ZIMAGE=y
# Drivers
CONFIG_DRIVER_BUS_I2C_CROS_EC_TUNNEL=y
CONFIG_DRIVER_BUS_I2C_DESIGNWARE=y
CONFIG_DRIVER_BUS_I2C_DESIGNWARE_PCI=y
CONFIG_DRIVER_EC_CROS=y
CONFIG_DRIVER_EC_CROS_LPC=y
CONFIG_DRIVER_EC_PS8751=y
CONFIG_DRIVER_FLASH_MEMMAPPED=y
CONFIG_DRIVER_INPUT_PS2=y
CONFIG_DRIVER_INPUT_USB=y
......
......@@ -21,10 +21,12 @@ CONFIG_NV_STORAGE_CMOS=y
CONFIG_KERNEL_ZIMAGE=y
# Drivers
CONFIG_DRIVER_BUS_I2C_CROS_EC_TUNNEL=y
CONFIG_DRIVER_BUS_I2C_DESIGNWARE=y
CONFIG_DRIVER_BUS_I2C_DESIGNWARE_PCI=y
CONFIG_DRIVER_EC_CROS=y
CONFIG_DRIVER_EC_CROS_LPC=y
CONFIG_DRIVER_EC_PS8751=y
CONFIG_DRIVER_FLASH_MEMMAPPED=y
CONFIG_DRIVER_INPUT_PS2=y
CONFIG_DRIVER_INPUT_USB=y
......
......@@ -23,9 +23,11 @@
#include <sysinfo.h>
#include "base/init_funcs.h"
#include "drivers/bus/i2c/cros_ec_tunnel.h"
#include "drivers/bus/i2c/designware.h"
#include "drivers/bus/i2c/i2c.h"
#include "drivers/ec/cros/lpc.h"
#include "drivers/ec/ps8751/ps8751.h"
#include "drivers/flash/memmapped.h"
#include "drivers/gpio/sysinfo.h"
#include "drivers/soc/apollolake.h"
......@@ -51,7 +53,11 @@
#define BFPREG_LIMIT_MASK (0x7fff << BFPREG_LIMIT_SHIFT)
#define AUD_VOLUME 4000
#define SDMODE_PIN GPIO_76
#define SDMODE_PIN GPIO_76
#ifdef PD_SYNC
#error "PD_SYNC configuration incompatible with ec_tunnel"
#endif
static void board_flash_init(void)
{
......@@ -98,6 +104,12 @@ static int board_setup(void)
CrosEc *cros_ec = new_cros_ec(&cros_ec_lpc_bus->ops, 0, NULL);
register_vboot_ec(&cros_ec->vboot, 0);
/* programmables downstream from the EC */
CrosECTunnelI2c *cros_ec_i2c_tunnel_ps =
new_cros_ec_tunnel_i2c(cros_ec, /* i2c bus */ 1);
Ps8751 *ps8751 = new_ps8751(cros_ec_i2c_tunnel_ps, /* ec pd# */ 1);
register_vboot_aux_fw(&ps8751->fw_ops);
board_flash_init();
/* H1 TPM on I2C bus 2 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment