summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--baseboard/guybrush/baseboard.c2
-rw-r--r--baseboard/zork/variant_trembyle.c2
-rw-r--r--board/dalboz/board.c2
-rw-r--r--board/dirinboz/board.c2
-rw-r--r--board/ezkinil/board.c2
-rw-r--r--board/gumboz/board.c2
-rw-r--r--board/morphius/board.c2
-rw-r--r--board/shuboz/board.c2
-rw-r--r--board/vilboz/board.c2
-rw-r--r--driver/ppc/aoz1380.c2
-rw-r--r--include/driver/ppc/aoz1380_public.h (renamed from driver/ppc/aoz1380.h)4
-rw-r--r--zephyr/dts/bindings/usbc/ppc/aoz,aoz1380.yaml9
-rw-r--r--zephyr/projects/skyrim/src/usbc_config.c2
-rw-r--r--zephyr/shim/include/usbc/ppc_aoz1380.h11
-rw-r--r--zephyr/shim/src/ppc.c5
15 files changed, 37 insertions, 14 deletions
diff --git a/baseboard/guybrush/baseboard.c b/baseboard/guybrush/baseboard.c
index d4440a1fe1..6e6ce84a69 100644
--- a/baseboard/guybrush/baseboard.c
+++ b/baseboard/guybrush/baseboard.c
@@ -16,7 +16,7 @@
#include "chip/npcx/ps2_chip.h"
#include "chip/npcx/pwm_chip.h"
#include "chipset.h"
-#include "driver/ppc/aoz1380.h"
+#include "driver/ppc/aoz1380_public.h"
#include "driver/ppc/nx20p348x.h"
#include "driver/retimer/anx7491.h"
#include "driver/retimer/ps8811.h"
diff --git a/baseboard/zork/variant_trembyle.c b/baseboard/zork/variant_trembyle.c
index 871f3b351d..c75ee4aa85 100644
--- a/baseboard/zork/variant_trembyle.c
+++ b/baseboard/zork/variant_trembyle.c
@@ -9,7 +9,7 @@
#include "console.h"
#include "driver/bc12/pi3usb9201.h"
#include "driver/charger/isl9241.h"
-#include "driver/ppc/aoz1380.h"
+#include "driver/ppc/aoz1380_public.h"
#include "driver/ppc/nx20p348x.h"
#include "driver/retimer/ps8802.h"
#include "driver/retimer/ps8818.h"
diff --git a/board/dalboz/board.c b/board/dalboz/board.c
index 4be54125b4..f43bdeb17a 100644
--- a/board/dalboz/board.c
+++ b/board/dalboz/board.c
@@ -10,7 +10,7 @@
#include "driver/accelgyro_lsm6dsm.h"
#include "driver/bc12/pi3usb9201.h"
#include "driver/ioexpander/pcal6408.h"
-#include "driver/ppc/aoz1380.h"
+#include "driver/ppc/aoz1380_public.h"
#include "driver/ppc/nx20p348x.h"
#include "driver/retimer/pi3hdx1204.h"
#include "driver/tcpm/nct38xx.h"
diff --git a/board/dirinboz/board.c b/board/dirinboz/board.c
index be519fb8c6..472e10bd78 100644
--- a/board/dirinboz/board.c
+++ b/board/dirinboz/board.c
@@ -8,7 +8,7 @@
#include "cros_board_info.h"
#include "charge_state.h"
#include "driver/bc12/pi3usb9201.h"
-#include "driver/ppc/aoz1380.h"
+#include "driver/ppc/aoz1380_public.h"
#include "driver/ppc/nx20p348x.h"
#include "driver/tcpm/nct38xx.h"
#include "driver/usb_mux/amd_fp5.h"
diff --git a/board/ezkinil/board.c b/board/ezkinil/board.c
index 47089c85da..f51ae73c36 100644
--- a/board/ezkinil/board.c
+++ b/board/ezkinil/board.c
@@ -14,7 +14,7 @@
#include "driver/accelgyro_icm426xx.h"
#include "driver/accel_kionix.h"
#include "driver/accel_kx022.h"
-#include "driver/ppc/aoz1380.h"
+#include "driver/ppc/aoz1380_public.h"
#include "driver/ppc/nx20p348x.h"
#include "driver/retimer/pi3hdx1204.h"
#include "driver/retimer/tusb544.h"
diff --git a/board/gumboz/board.c b/board/gumboz/board.c
index e3119dc6f6..66f7fe3dc3 100644
--- a/board/gumboz/board.c
+++ b/board/gumboz/board.c
@@ -10,7 +10,7 @@
#include "driver/accel_kionix.h"
#include "driver/accelgyro_lsm6dsm.h"
#include "driver/bc12/pi3usb9201.h"
-#include "driver/ppc/aoz1380.h"
+#include "driver/ppc/aoz1380_public.h"
#include "driver/ppc/nx20p348x.h"
#include "driver/tcpm/nct38xx.h"
#include "driver/usb_mux/amd_fp5.h"
diff --git a/board/morphius/board.c b/board/morphius/board.c
index 99434e485c..cb4758be09 100644
--- a/board/morphius/board.c
+++ b/board/morphius/board.c
@@ -16,7 +16,7 @@
#include "driver/accelgyro_icm426xx.h"
#include "driver/accel_kionix.h"
#include "driver/accel_kx022.h"
-#include "driver/ppc/aoz1380.h"
+#include "driver/ppc/aoz1380_public.h"
#include "driver/ppc/nx20p348x.h"
#include "driver/retimer/pi3dpx1207.h"
#include "driver/retimer/pi3hdx1204.h"
diff --git a/board/shuboz/board.c b/board/shuboz/board.c
index 220ca09541..af0f9988b1 100644
--- a/board/shuboz/board.c
+++ b/board/shuboz/board.c
@@ -13,7 +13,7 @@
#include "driver/accel_kionix.h"
#include "driver/accel_kx022.h"
#include "driver/bc12/pi3usb9201.h"
-#include "driver/ppc/aoz1380.h"
+#include "driver/ppc/aoz1380_public.h"
#include "driver/ppc/nx20p348x.h"
#include "driver/tcpm/nct38xx.h"
#include "driver/usb_mux/amd_fp5.h"
diff --git a/board/vilboz/board.c b/board/vilboz/board.c
index b183d74f27..6c634da62e 100644
--- a/board/vilboz/board.c
+++ b/board/vilboz/board.c
@@ -11,7 +11,7 @@
#include "driver/accelgyro_lsm6dsm.h"
#include "driver/bc12/pi3usb9201.h"
#include "driver/ioexpander/pcal6408.h"
-#include "driver/ppc/aoz1380.h"
+#include "driver/ppc/aoz1380_public.h"
#include "driver/tcpm/nct38xx.h"
#include "driver/usb_mux/amd_fp5.h"
#include "extpower.h"
diff --git a/driver/ppc/aoz1380.c b/driver/ppc/aoz1380.c
index f207ebbddf..3d0c60dbb3 100644
--- a/driver/ppc/aoz1380.c
+++ b/driver/ppc/aoz1380.c
@@ -14,8 +14,8 @@
#include "atomic.h"
#include "common.h"
#include "console.h"
-#include "aoz1380.h"
#include "hooks.h"
+#include "ppc/aoz1380_public.h"
#include "system.h"
#include "tcpm/tcpm.h"
#include "usb_pd.h"
diff --git a/driver/ppc/aoz1380.h b/include/driver/ppc/aoz1380_public.h
index dfd8bb7703..3ac92e862a 100644
--- a/driver/ppc/aoz1380.h
+++ b/include/driver/ppc/aoz1380_public.h
@@ -11,8 +11,8 @@
* controlled PPC chips that are similar to the AOZ1380
*/
-#ifndef __CROS_EC_AOZ1380_H
-#define __CROS_EC_AOZ1380_H
+#ifndef __CROS_EC_AOZ1380_PUBLIC_H
+#define __CROS_EC_AOZ1380_PUBLIC_H
#include "usb_pd_tcpm.h"
diff --git a/zephyr/dts/bindings/usbc/ppc/aoz,aoz1380.yaml b/zephyr/dts/bindings/usbc/ppc/aoz,aoz1380.yaml
new file mode 100644
index 0000000000..def8450903
--- /dev/null
+++ b/zephyr/dts/bindings/usbc/ppc/aoz,aoz1380.yaml
@@ -0,0 +1,9 @@
+# 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.
+
+description: AOZ1380 USBC PPC binding
+
+compatible: "aoz,aoz1380"
+
+include: ppc-chip.yaml
diff --git a/zephyr/projects/skyrim/src/usbc_config.c b/zephyr/projects/skyrim/src/usbc_config.c
index b3b26f653d..851dc33560 100644
--- a/zephyr/projects/skyrim/src/usbc_config.c
+++ b/zephyr/projects/skyrim/src/usbc_config.c
@@ -17,7 +17,7 @@
#include "charger.h"
#include "driver/bc12/pi3usb9201.h"
#include "driver/charger/isl9241.h"
-#include "driver/ppc/aoz1380.h"
+#include "driver/ppc/aoz1380_public.h"
#include "driver/ppc/nx20p348x.h"
#include "driver/retimer/anx7483_public.h"
#include "driver/retimer/ps8811.h"
diff --git a/zephyr/shim/include/usbc/ppc_aoz1380.h b/zephyr/shim/include/usbc/ppc_aoz1380.h
new file mode 100644
index 0000000000..75acb4c502
--- /dev/null
+++ b/zephyr/shim/include/usbc/ppc_aoz1380.h
@@ -0,0 +1,11 @@
+/* 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 "ppc/aoz1380_public.h"
+
+#define AOZ1380_COMPAT aoz_aoz1380
+
+/* Note: This chip has no i2c interface */
+#define PPC_CHIP_AOZ1380(id) { .drv = &aoz1380_drv },
diff --git a/zephyr/shim/src/ppc.c b/zephyr/shim/src/ppc.c
index 24ff2cc4b8..68ad3102a0 100644
--- a/zephyr/shim/src/ppc.c
+++ b/zephyr/shim/src/ppc.c
@@ -5,13 +5,15 @@
#include <zephyr/devicetree.h>
#include "usbc_ppc.h"
+#include "usbc/ppc_aoz1380.h"
#include "usbc/ppc_nx20p348x.h"
#include "usbc/ppc_rt1739.h"
#include "usbc/ppc_sn5s330.h"
#include "usbc/ppc_syv682x.h"
#include "usbc/ppc.h"
-#if DT_HAS_COMPAT_STATUS_OKAY(NX20P348X_COMPAT) || \
+#if DT_HAS_COMPAT_STATUS_OKAY(AOZ1380_COMPAT) || \
+ DT_HAS_COMPAT_STATUS_OKAY(NX20P348X_COMPAT) || \
DT_HAS_COMPAT_STATUS_OKAY(RT1739_PPC_COMPAT) || \
DT_HAS_COMPAT_STATUS_OKAY(SN5S330_COMPAT) || \
DT_HAS_COMPAT_STATUS_OKAY(SYV682X_COMPAT)
@@ -24,6 +26,7 @@
(PPC_CHIP_ENTRY(usbc_id, ppc_id, config_fn)), ())
#define PPC_CHIP_FIND(usbc_id, ppc_id) \
+ CHECK_COMPAT(AOZ1380_COMPAT, usbc_id, ppc_id, PPC_CHIP_AOZ1380) \
CHECK_COMPAT(NX20P348X_COMPAT, usbc_id, ppc_id, PPC_CHIP_NX20P348X) \
CHECK_COMPAT(RT1739_PPC_COMPAT, usbc_id, ppc_id, PPC_CHIP_RT1739) \
CHECK_COMPAT(SN5S330_COMPAT, usbc_id, ppc_id, PPC_CHIP_SN5S330) \