diff options
author | Hyungwoo Yang <hyungwoo.yang@intel.corp-partner.google.com> | 2021-03-20 11:51:05 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-24 02:10:56 +0000 |
commit | e0835c1209a7ce2911a1ebfdd6763c4907d2c2ff (patch) | |
tree | aaffb82b6c21b00c4549b9c33459d786d14a6d57 /zephyr/dts/bindings/motionsense | |
parent | a0e46cd164efca0f48ecff3d1d2ffe10309e3fd4 (diff) | |
download | chrome-ec-e0835c1209a7ce2911a1ebfdd6763c4907d2c2ff.tar.gz |
zephyr: DT: support TCS3400
This change is to support TCS3400 via DT.
The change includes, using DT,
- creating TCS3400 driver specific data
- creating motion sensor entry for TCS3400
- creating the TCS3400 irq event to motion sense task
BUG=b:173507858
BRANCH=none
TEST=make buildall -j8
build volteer on zephyr
Signed-off-by: Hyungwoo Yang <hyungwoo.yang@intel.corp-partner.google.com>
Change-Id: I09cb7d69baa95c8450c7f5cc0149038aa23f3bc9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2778822
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/dts/bindings/motionsense')
5 files changed, 87 insertions, 0 deletions
diff --git a/zephyr/dts/bindings/motionsense/driver/cros-ec,tcs3400-clear.yaml b/zephyr/dts/bindings/motionsense/driver/cros-ec,tcs3400-clear.yaml new file mode 100644 index 0000000000..323286c462 --- /dev/null +++ b/zephyr/dts/bindings/motionsense/driver/cros-ec,tcs3400-clear.yaml @@ -0,0 +1,9 @@ +# 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: motion sense sensor node for TCS3400 CLEAR + +compatible: "cros-ec,tcs3400-clear" + +include: tcs3400.yaml diff --git a/zephyr/dts/bindings/motionsense/driver/cros-ec,tcs3400-rgb.yaml b/zephyr/dts/bindings/motionsense/driver/cros-ec,tcs3400-rgb.yaml new file mode 100644 index 0000000000..e2987cf44b --- /dev/null +++ b/zephyr/dts/bindings/motionsense/driver/cros-ec,tcs3400-rgb.yaml @@ -0,0 +1,9 @@ +# 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: motion sense sensor node for TCS3400 RGB + +compatible: "cros-ec,tcs3400-rgb" + +include: tcs3400.yaml diff --git a/zephyr/dts/bindings/motionsense/driver/tcs3400.yaml b/zephyr/dts/bindings/motionsense/driver/tcs3400.yaml new file mode 100644 index 0000000000..ddf50f6d62 --- /dev/null +++ b/zephyr/dts/bindings/motionsense/driver/tcs3400.yaml @@ -0,0 +1,16 @@ +# 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. + +# common fields for both TCS3400 clear and TCS3400 rgb + +# every motionsense sensor node should include motionsense-sensor-base.yaml +include: motionsense-sensor-base.yaml + +properties: + i2c-spi-addr-flags: + type: string + required: false + description: i2c address or SPI slave logic GPIO + enum: + - "TCS3400_I2C_ADDR_FLAGS" diff --git a/zephyr/dts/bindings/motionsense/drvdata/cros-ec,drvdata-tcs3400-clear.yaml b/zephyr/dts/bindings/motionsense/drvdata/cros-ec,drvdata-tcs3400-clear.yaml new file mode 100644 index 0000000000..c1059d40be --- /dev/null +++ b/zephyr/dts/bindings/motionsense/drvdata/cros-ec,drvdata-tcs3400-clear.yaml @@ -0,0 +1,32 @@ +# 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: TCS3400 CLEAR driver data + +compatible: "cros-ec,drvdata-tcs3400-clear" + +include: drvdata-base.yaml + +# +# examples: +# +# tcs_clear_data: tcs3400-clear-drv-data { +# compatible = "cros-ec,drvdata-tcs3400-clear"; +# status = "okay"; +# +# als-drv-data { +# compatible = "cros-ec,accelgyro-als-drv-data"; +# als-cal { +# scale = <1>; +# uscale = <0>; +# offset = <0>; +# als-channel-scale { +# compatible = "cros-ec,accelgyro-als-channel-scale"; +# k-channel-scale = <1>; +# cover-scale = <1>; +# }; +# }; +# }; +# }; +# diff --git a/zephyr/dts/bindings/motionsense/drvdata/cros-ec,drvdata-tcs3400-rgb.yaml b/zephyr/dts/bindings/motionsense/drvdata/cros-ec,drvdata-tcs3400-rgb.yaml new file mode 100644 index 0000000000..7ae7bc5983 --- /dev/null +++ b/zephyr/dts/bindings/motionsense/drvdata/cros-ec,drvdata-tcs3400-rgb.yaml @@ -0,0 +1,21 @@ +# 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: TCS3400 RGB driver data + +compatible: "cros-ec,drvdata-tcs3400-rgb" + +include: drvdata-base.yaml + +child-binding: + description: saturation auto-adjustment + properties: + again: + type: int + required: false + description: Gain Scaling; must be value between 0 and 3 + atime: + type: int + required: false + description: Acquisition Time, controlled by the ATIME register |