diff options
author | lschyi <lschyi@google.com> | 2022-09-15 16:04:59 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-10-05 11:02:19 +0000 |
commit | 0f0c4f11a35dbf26d0b230bf1bf52c1301378f14 (patch) | |
tree | a381f93df9ac6fd788609f819556dffdc927a0af /zephyr/shim/include/usbc/tcpc_anx7447_emul.h | |
parent | 284362b55afed23932d3d55a09d7b39ac1e322a8 (diff) | |
download | chrome-ec-0f0c4f11a35dbf26d0b230bf1bf52c1301378f14.tar.gz |
zephyr: add anx7447 emulator
Add basic ANX7447 TCPC emulator, along with KConfig option, dts binding,
and can be found in the TCPC shim code.
BUG=b:244232583
TEST=none
BRANCH=none
Signed-off-by: lschyi <lschyi@google.com>
Change-Id: Idac771d92de526abf0796015fab6d473dae5502e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3905448
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Sung-Chi Li <lschyi@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Tested-by: Sung-Chi Li <lschyi@chromium.org>
Diffstat (limited to 'zephyr/shim/include/usbc/tcpc_anx7447_emul.h')
-rw-r--r-- | zephyr/shim/include/usbc/tcpc_anx7447_emul.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/zephyr/shim/include/usbc/tcpc_anx7447_emul.h b/zephyr/shim/include/usbc/tcpc_anx7447_emul.h new file mode 100644 index 0000000000..78322a7329 --- /dev/null +++ b/zephyr/shim/include/usbc/tcpc_anx7447_emul.h @@ -0,0 +1,19 @@ +/* Copyright 2022 The ChromiumOS Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include <zephyr/devicetree.h> +#include "driver/tcpm/anx7447_public.h" + +#define ANX7447_EMUL_COMPAT cros_anx7447_emul + +#define TCPC_CONFIG_ANX7447_EMUL(id) \ + { \ + .bus_type = EC_BUS_TYPE_I2C, \ + .i2c_info = { \ + .port = I2C_PORT_BY_DEV(id), \ + .addr_flags = DT_REG_ADDR(id), \ + }, \ + .drv = &anx7447_tcpm_drv, \ + }, |