diff options
4 files changed, 52 insertions, 2 deletions
diff --git a/zephyr/dts/bindings/i2c/cros-ec-i2c-port-base.yaml b/zephyr/dts/bindings/i2c/cros-ec-i2c-port-base.yaml index 49d9ee53c4..d16dedc954 100644 --- a/zephyr/dts/bindings/i2c/cros-ec-i2c-port-base.yaml +++ b/zephyr/dts/bindings/i2c/cros-ec-i2c-port-base.yaml @@ -17,6 +17,9 @@ properties: - I2C_PORT_BATTERY - I2C_PORT_CHARGER - I2C_PORT_EEPROM + - I2C_PORT_EVB_1 + - I2C_PORT_EVB_2 + - I2C_PORT_OPT_4 - I2C_PORT_POWER - I2C_PORT_SENSOR - I2C_PORT_TCPC0 diff --git a/zephyr/projects/it8xxx2_evb/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts b/zephyr/projects/it8xxx2_evb/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts index f87376adce..e4f2e24b8e 100644 --- a/zephyr/projects/it8xxx2_evb/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts +++ b/zephyr/projects/it8xxx2_evb/boards/riscv/it8xxx2_evb/it8xxx2_evb.dts @@ -154,12 +154,57 @@ channel = <5>; }; }; + + named-i2c-ports { + compatible = "named-i2c-ports"; + + battery { + i2c-port = <&i2c2>; + enum-name = "I2C_PORT_BATTERY"; + label = "BATTERY"; + }; + evb-1 { + i2c-port = <&i2c0>; + enum-name = "I2C_PORT_EVB_1"; + label = "EVB_1"; + }; + evb-2 { + i2c-port = <&i2c1>; + enum-name = "I2C_PORT_EVB_2"; + label = "EVB_2"; + }; + opt-4 { + i2c-port = <&i2c4>; + enum-name = "I2C_PORT_OPT_4"; + label = "OPT_4"; + }; + }; }; &adc0 { status = "okay"; }; +&i2c0 { + status = "okay"; + clock-frequency = <I2C_BITRATE_STANDARD>; +}; + +&i2c1 { + status = "okay"; + clock-frequency = <I2C_BITRATE_STANDARD>; +}; + +&i2c2 { + status = "okay"; + clock-frequency = <I2C_BITRATE_STANDARD>; +}; + +&i2c4 { + status = "okay"; + clock-frequency = <I2C_BITRATE_STANDARD>; +}; + &uart1 { status = "okay"; current-speed = <115200>; diff --git a/zephyr/projects/it8xxx2_evb/boards/riscv/it8xxx2_evb/it8xxx2_evb_defconfig b/zephyr/projects/it8xxx2_evb/boards/riscv/it8xxx2_evb/it8xxx2_evb_defconfig index 1177eab7af..cde997421a 100644 --- a/zephyr/projects/it8xxx2_evb/boards/riscv/it8xxx2_evb/it8xxx2_evb_defconfig +++ b/zephyr/projects/it8xxx2_evb/boards/riscv/it8xxx2_evb/it8xxx2_evb_defconfig @@ -33,7 +33,7 @@ CONFIG_CLOCK_CONTROL=y CONFIG_WATCHDOG=n # I2C Controller -CONFIG_I2C_ITE_IT8XXX2=n +CONFIG_I2C_ITE_IT8XXX2=y CONFIG_ITE_IT8XXX2_TIMER=y diff --git a/zephyr/projects/it8xxx2_evb/prj.conf b/zephyr/projects/it8xxx2_evb/prj.conf index b6e48ea9c6..f9da4185b5 100644 --- a/zephyr/projects/it8xxx2_evb/prj.conf +++ b/zephyr/projects/it8xxx2_evb/prj.conf @@ -13,6 +13,9 @@ CONFIG_AP_ARM_MTK_MT8192=y # ADC CONFIG_PLATFORM_EC_ADC=y +# I2C +CONFIG_PLATFORM_EC_I2C=y + # Flash CONFIG_PLATFORM_EC_FLASH_CROS=y @@ -28,7 +31,6 @@ CONFIG_LOG=y # TODO(b:185202623): bring these features up CONFIG_PLATFORM_EC_BACKLIGHT_LID=n CONFIG_PLATFORM_EC_BOARD_VERSION=n -CONFIG_PLATFORM_EC_I2C=n CONFIG_PLATFORM_EC_KEYBOARD=n CONFIG_PLATFORM_EC_SWITCH=n CONFIG_PLATFORM_EC_VBOOT=n |