diff options
author | Dawid Niedzwiecki <dn@semihalf.com> | 2022-04-14 08:32:35 +0200 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-04-25 07:47:55 +0000 |
commit | 40cbd28031f52f806a2a7c8834f648f616b5ee93 (patch) | |
tree | 379c28386dff2e4e587280a6201cdaf7986a24e6 /zephyr/dts | |
parent | 197da82322401ec38a181b28fb00ff37e647440b (diff) | |
download | chrome-ec-40cbd28031f52f806a2a7c8834f648f616b5ee93.tar.gz |
zephyr: add yaml file for charger chips
Add the binding yaml files for all charger chips used in Zephyr. It will
be needed for generating the chg_chips array based on DTS, not defining
in board-specific code.
The yaml files for ISL923x and ISL9241 chips were already present, so
just adjust them to the desired usage.
BUG=b:228237412
TEST=zmake testall
BRANCH=main
Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
Change-Id: I0e0120d28f03c5d1ba5fb1bd9bbb5a1e878af44f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3586424
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
Diffstat (limited to 'zephyr/dts')
-rw-r--r-- | zephyr/dts/bindings/charger/chg-chip.yaml | 85 | ||||
-rw-r--r-- | zephyr/dts/bindings/charger/intersil,isl923x.yaml (renamed from zephyr/dts/bindings/charger/intersil,isl9238.yaml) | 6 | ||||
-rw-r--r-- | zephyr/dts/bindings/charger/intersil,isl9241.yaml | 11 | ||||
-rw-r--r-- | zephyr/dts/bindings/charger/richtek,rt9490.yaml | 9 | ||||
-rw-r--r-- | zephyr/dts/bindings/charger/siliconmitus,sm5803.yaml | 9 | ||||
-rw-r--r-- | zephyr/dts/bindings/charger/ti,bq25710.yaml | 9 |
6 files changed, 116 insertions, 13 deletions
diff --git a/zephyr/dts/bindings/charger/chg-chip.yaml b/zephyr/dts/bindings/charger/chg-chip.yaml new file mode 100644 index 0000000000..50e78756d9 --- /dev/null +++ b/zephyr/dts/bindings/charger/chg-chip.yaml @@ -0,0 +1,85 @@ +# Copyright (c) 2022 The Chromium OS Authors +# SPDX-License-Identifier: Apache-2.0 + +description: Charger chip + +properties: + port: + type: phandle + required: true + description: | + I2C port used to communicate with charger chip + + i2c-addr-flags: + type: string + required: false + description: | + I2C address of charger chip + +# Example +# The charger chips nodes have to be placed under the USB-C +# nodes(named-usbc-port).If the OCPC(on-charger per type-c port) config is +# enabled, the charger chips has to be defiend per USB-C port, with the primary +# one defined under port 0. If the CHARGER_SINGLE_CHIP config is enabled, only +# one charger chip must be defined. It has to be done under the port 0. +# For OCPC: +# usbc { +# #address-cells = <1>; +# #size-cells = <0>; +# +# port0@0 { +# compatible = "named-usbc-port"; +# reg = <0>; +# bc12 { +# compatible = "pericom,pi3usb9201"; +# port = <&i2c_ec_i2c_usb_c0>; +# }; +# chg { +# compatible = "siliconmitus,sm5803"; +# status = "okay"; +# port = <&i2c_ec_i2c_usb_c0>; +# }; +# }; +# port1@1 { +# compatible = "named-usbc-port"; +# reg = <1>; +# bc12 { +# compatible = "pericom,pi3usb9201"; +# port = <&i2c_ec_i2c_sub_usb_c1>; +# }; +# chg { +# compatible = "siliconmitus,sm5803"; +# status = "okay"; +# port = <&i2c_ec_i2c_sub_usb_c1>; +# }; +# }; +# }; +# +# For CHARGER_SINGLE_CHIP: +# usbc { +# #address-cells = <1>; +# #size-cells = <0>; +# +# port0@0 { +# compatible = "named-usbc-port"; +# reg = <0>; +# bc12 { +# compatible = "pericom,pi3usb9201"; +# port = <&i2c_ec_i2c_usb_c0>; +# }; +# chg { +# compatible = "siliconmitus,sm5803"; +# status = "okay"; +# port = <&i2c_ec_i2c_usb_c0>; +# }; +# }; +# port1@1 { +# compatible = "named-usbc-port"; +# reg = <1>; +# bc12 { +# compatible = "pericom,pi3usb9201"; +# port = <&i2c_ec_i2c_sub_usb_c1>; +# }; +# }; +# }; + diff --git a/zephyr/dts/bindings/charger/intersil,isl9238.yaml b/zephyr/dts/bindings/charger/intersil,isl923x.yaml index 08e00bf313..2da947fea8 100644 --- a/zephyr/dts/bindings/charger/intersil,isl9238.yaml +++ b/zephyr/dts/bindings/charger/intersil,isl923x.yaml @@ -2,8 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -description: Intersil ISL9238 Charger IC +description: Intersil ISL923x Charger IC -compatible: "intersil,isl9238" +compatible: "intersil,isl923x" -include: i2c-device.yaml +include: chg-chip.yaml diff --git a/zephyr/dts/bindings/charger/intersil,isl9241.yaml b/zephyr/dts/bindings/charger/intersil,isl9241.yaml index 7557b949d8..567c2077a6 100644 --- a/zephyr/dts/bindings/charger/intersil,isl9241.yaml +++ b/zephyr/dts/bindings/charger/intersil,isl9241.yaml @@ -6,13 +6,4 @@ description: Intersil ISL9241 Charger IC compatible: "intersil,isl9241" -include: i2c-device.yaml - -properties: - switching-frequency: - type: int - required: false - description: - Sets the charger switching frequency. If not defined then the switching - frequency is configured by the resistor connected to the PROG pin on - the board. +include: chg-chip.yaml diff --git a/zephyr/dts/bindings/charger/richtek,rt9490.yaml b/zephyr/dts/bindings/charger/richtek,rt9490.yaml new file mode 100644 index 0000000000..96d8b81fa0 --- /dev/null +++ b/zephyr/dts/bindings/charger/richtek,rt9490.yaml @@ -0,0 +1,9 @@ +# Copyright 2022 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: Richtek RT9490 Charger + +compatible: "richtek,rt9490" + +include: chg-chip.yaml diff --git a/zephyr/dts/bindings/charger/siliconmitus,sm5803.yaml b/zephyr/dts/bindings/charger/siliconmitus,sm5803.yaml new file mode 100644 index 0000000000..9aac5f3d8b --- /dev/null +++ b/zephyr/dts/bindings/charger/siliconmitus,sm5803.yaml @@ -0,0 +1,9 @@ +# Copyright 2022 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: Silicon Mitus SM5803 Charger + +compatible: "siliconmitus,sm5803" + +include: chg-chip.yaml diff --git a/zephyr/dts/bindings/charger/ti,bq25710.yaml b/zephyr/dts/bindings/charger/ti,bq25710.yaml new file mode 100644 index 0000000000..2ebf194b77 --- /dev/null +++ b/zephyr/dts/bindings/charger/ti,bq25710.yaml @@ -0,0 +1,9 @@ +# Copyright 2022 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: TI BQ25710 Charger + +compatible: "ti,bq25710" + +include: chg-chip.yaml |