diff options
author | Ting Shen <phoenixshen@google.com> | 2022-11-21 18:49:39 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-12-08 09:25:20 +0000 |
commit | dc9b358b676237c266131cdc0a287568cae715be (patch) | |
tree | 437ea853191d327b6f1f1d5da20ee24ee5d0b026 /zephyr/program/geralt/i2c.dtsi | |
parent | 86541abde27ed4c95592d3b70bfdb1b7869dc50b (diff) | |
download | chrome-ec-dc9b358b676237c266131cdc0a287568cae715be.tar.gz |
geralt: initial EC
BUG=b:251747125
TEST=zmake
BRANCH=none
LOW_COVERAGE_REASON=initial bringup
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: If40ef9ccdfdea650668b190a3e603d861299116c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4042170
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Tested-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'zephyr/program/geralt/i2c.dtsi')
-rw-r--r-- | zephyr/program/geralt/i2c.dtsi | 143 |
1 files changed, 143 insertions, 0 deletions
diff --git a/zephyr/program/geralt/i2c.dtsi b/zephyr/program/geralt/i2c.dtsi new file mode 100644 index 0000000000..d18cc7299a --- /dev/null +++ b/zephyr/program/geralt/i2c.dtsi @@ -0,0 +1,143 @@ +/* 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. + */ + +/ { + named-i2c-ports { + compatible = "named-i2c-ports"; + + battery { + i2c-port = <&i2c1>; + remote-port = <1>; + enum-names = "I2C_PORT_BATTERY", + "I2C_PORT_VIRTUAL_BATTERY"; + }; + i2c_charger: charger { + i2c-port = <&i2c0>; + enum-names = "I2C_PORT_CHARGER", + "I2C_PORT_EEPROM"; + }; + i2c_sensor: sensor { + i2c-port = <&i2c3>; + enum-names = "I2C_PORT_SENSOR"; + }; + i2c_usb_c: usb-c { + i2c-port = <&i2c2>; + enum-names = "I2C_PORT_USB_C"; + }; + i2c_detachable_base: detachable-base { + i2c-port = <&i2c4>; + enum-names = "I2C_PORT_DETACHABLE_BASE"; + }; + }; + +}; + +&pinctrl { + i2c3_clk_gpf2_sleep: i2c3_clk_gpf2_sleep { + pinmuxs = <&pinctrlf 2 IT8XXX2_ALT_DEFAULT>; + }; + i2c3_data_gpf3_sleep: i2c3_data_gpf3_sleep { + pinmuxs = <&pinctrlf 3 IT8XXX2_ALT_DEFAULT>; + }; +}; + +&i2c0 { + /* I2C_PWR_CBI */ + status = "okay"; + clock-frequency = <I2C_BITRATE_FAST>; + pinctrl-0 = <&i2c0_clk_gpb3_default + &i2c0_data_gpb4_default>; + pinctrl-names = "default"; + + cbi_eeprom: eeprom@50 { + compatible = "atmel,at24"; + reg = <0x50>; + size = <2048>; + pagesize = <16>; + address-width = <8>; + timeout = <5>; + }; + + charger: rt9490@53 { + compatible = "richtek,rt9490"; + status = "okay"; + reg = <0x53>; + }; + + bc12_port1: rt9490-bc12@53 { + compatible = "richtek,rt9490-bc12"; + status = "okay"; + reg = <0x53>; + irq = <&int_usb_c1_bc12_charger>; + }; +}; + +&i2c1 { + /* I2C_BATTERY */ + status = "okay"; + clock-frequency = <50000>; + pinctrl-0 = <&i2c1_clk_gpc1_default + &i2c1_data_gpc2_default>; + pinctrl-names = "default"; + fifo-enable; +}; + +&i2c2 { + /* I2C_USB_C */ + status = "okay"; + clock-frequency = <I2C_BITRATE_FAST>; + pinctrl-0 = <&i2c2_clk_gpf6_default + &i2c2_data_gpf7_default>; + pinctrl-names = "default"; + /delete-property/ fifo-enable; + + bc12_ppc_port0: rt1739@70 { + compatible = "richtek,rt1739"; + status = "okay"; + reg = <0x70>; + }; + + tusb546_mux_0: tusb546-mux-0@44 { + compatible = "ti,tusb1064"; + reg = <0x44>; + }; + + ppc_port1: syv682x@40 { + compatible = "silergy,syv682x"; + status = "okay"; + reg = <0x40>; + frs_en_gpio = <&usb_c1_frs_en>; + }; + + ps8743_mux_1: ps8743-mux-1@10 { + compatible = "parade,ps8743"; + reg = <0x10>; + }; +}; + +&i2c3 { + /* I2C_SENSOR */ + status = "okay"; + clock-frequency = <I2C_BITRATE_FAST>; + scl-gpios = <&gpiof 2 0>; + sda-gpios = <&gpiof 3 0>; + pinctrl-0 = <&i2c3_clk_gpf2_default + &i2c3_data_gpf3_default>; + pinctrl-1 = <&i2c3_clk_gpf2_sleep + &i2c3_data_gpf3_sleep>; + pinctrl-names = "default", "sleep"; + prescale-scl-low = <1>; +}; + +/* TODO(b/260377762): peripheral mode */ +&i2c4 { + /* I2C_DETACHABLE_BASE */ + status = "okay"; + clock-frequency = <I2C_BITRATE_FAST>; + pinctrl-0 = <&i2c4_clk_gpe0_default + &i2c4_data_gpe7_default>; + pinctrl-names = "default"; + prescale-scl-low = <1>; +}; |