From 16245fe2c3f2b8b98627a06f0577c84c22ef1eb4 Mon Sep 17 00:00:00 2001 From: Tomasz Michalec Date: Fri, 20 Aug 2021 12:19:52 +0200 Subject: zephyr: Add BB retimer emulator Add BB retimer emulator on i2c bus. Emulator properties can be defined using device tree or runtime emulator API. Emulator checks if RO registers and reserved bits are accessed correctly. API allows to set custom read/write i2c messagess handlers to emulate complex behaviour. BUG=b:184856919 BRANCH=none TEST=none Signed-off-by: Tomasz Michalec Change-Id: I4b641a90e6fb55e89aaee388c0ac04ab7bf367ba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3110085 Commit-Queue: Jeremy Bettis Reviewed-by: Jeremy Bettis Reviewed-by: Yuval Peress --- zephyr/dts/bindings/emul/cros,bb-retimer-emul.yaml | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 zephyr/dts/bindings/emul/cros,bb-retimer-emul.yaml (limited to 'zephyr/dts/bindings') diff --git a/zephyr/dts/bindings/emul/cros,bb-retimer-emul.yaml b/zephyr/dts/bindings/emul/cros,bb-retimer-emul.yaml new file mode 100644 index 0000000000..007a73b17b --- /dev/null +++ b/zephyr/dts/bindings/emul/cros,bb-retimer-emul.yaml @@ -0,0 +1,30 @@ +# Copyright 2021 The Chromium OS Authors. All rights reserved. +# 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. -- cgit v1.2.1