summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2022-11-10 10:53:19 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-11-11 19:42:08 +0000
commit84ca1269ae0ad439141badd30c2b0e0d6e6d7783 (patch)
tree10de31ee729f3356603784c512b24a599c3be69a
parent9345f25c6586e8066669278dc4bfe1cc3db442f8 (diff)
downloadchrome-ec-84ca1269ae0ad439141badd30c2b0e0d6e6d7783.tar.gz
emul_bb_retimer: Rename compatible string
Rename the compatible string for the BB retimer emulator to match the real driver. Also removed unneeded devicetree properties from the emulator devicetree node. BUG=b:239457738 BRANCH=none TEST=twister Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I312129f5ffab9ba39394a3a2655d7ce3def5f9f0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4023765 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Yuval Peress <peress@google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
-rw-r--r--zephyr/dts/bindings/emul/cros,bb-retimer-emul.yaml30
-rw-r--r--zephyr/emul/emul_bb_retimer.c9
-rw-r--r--zephyr/test/drivers/boards/native_posix.overlay6
3 files changed, 6 insertions, 39 deletions
diff --git a/zephyr/dts/bindings/emul/cros,bb-retimer-emul.yaml b/zephyr/dts/bindings/emul/cros,bb-retimer-emul.yaml
deleted file mode 100644
index 11dd5f5218..0000000000
--- a/zephyr/dts/bindings/emul/cros,bb-retimer-emul.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 2021 The ChromiumOS Authors
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-description: Zephyr BB retimer Emulator
-
-compatible: "cros,bb-retimer-emul"
-
-include: base.yaml
-
-properties:
- vendor:
- type: string
- required: true
- enum:
- - BB_RETIMER_VENDOR_ID_1
- - BB_RETIMER_VENDOR_ID_2
- description: Vendor ID used by device that is emulated.
-
- error-on-ro-write:
- type: boolean
- description:
- Flag indicating if error should be generated when read only register
- is being written.
-
- error-on-reserved-bit-write:
- type: boolean
- description:
- Flag indicating if error should be generated when reserved bit
- is being written.
diff --git a/zephyr/emul/emul_bb_retimer.c b/zephyr/emul/emul_bb_retimer.c
index 266fd1a340..0536f19de6 100644
--- a/zephyr/emul/emul_bb_retimer.c
+++ b/zephyr/emul/emul_bb_retimer.c
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-#define DT_DRV_COMPAT cros_bb_retimer_emul
+#define DT_DRV_COMPAT intel_jhl8040r
#define LOG_LEVEL CONFIG_I2C_LOG_LEVEL
#include <zephyr/logging/log.h>
@@ -309,10 +309,9 @@ static int bb_emul_init(const struct emul *emul, const struct device *parent)
#define BB_RETIMER_EMUL(n) \
static struct bb_emul_data bb_emul_data_##n = { \
- .vendor_id = DT_STRING_TOKEN(DT_DRV_INST(n), vendor), \
- .error_on_ro_write = DT_INST_PROP(n, error_on_ro_write),\
- .error_on_rsvd_write = DT_INST_PROP(n, \
- error_on_reserved_bit_write), \
+ .vendor_id = BB_RETIMER_VENDOR_ID_1, \
+ .error_on_ro_write = true, \
+ .error_on_rsvd_write = true, \
.common = { \
.start_write = NULL, \
.write_byte = bb_emul_write_byte, \
diff --git a/zephyr/test/drivers/boards/native_posix.overlay b/zephyr/test/drivers/boards/native_posix.overlay
index d3e1d740ae..4458df9703 100644
--- a/zephyr/test/drivers/boards/native_posix.overlay
+++ b/zephyr/test/drivers/boards/native_posix.overlay
@@ -812,11 +812,9 @@
};
usb_c1_bb_retimer_emul: bbretimer@42 {
- compatible = "cros,bb-retimer-emul";
+ compatible = "intel,jhl8040r";
reg = <0x42>;
- vendor = "BB_RETIMER_VENDOR_ID_1";
- error-on-ro-write;
- error-on-reserved-bit-write;
+ reset-pin = <&usb_c1_rt_rst_odl>;
};
ps8xxx_emul: ps8xxx_emul@b {