diff --git a/boards/xtensa/esp32s3_devkitm/esp32s3_devkitm-pinctrl.dtsi b/boards/xtensa/esp32s3_devkitm/esp32s3_devkitm-pinctrl.dtsi index 5d0378d280..e07a3a0e7e 100644 --- a/boards/xtensa/esp32s3_devkitm/esp32s3_devkitm-pinctrl.dtsi +++ b/boards/xtensa/esp32s3_devkitm/esp32s3_devkitm-pinctrl.dtsi @@ -18,4 +18,24 @@ bias-pull-up; }; }; + + i2c0_default: i2c0_default { + group1 { + pinmux = , + ; + bias-pull-up; + drive-open-drain; + output-high; + }; + }; + + i2c1_default: i2c1_default { + group1 { + pinmux = , + ; + bias-pull-up; + drive-open-drain; + output-high; + }; + }; }; diff --git a/boards/xtensa/esp32s3_devkitm/esp32s3_devkitm.dts b/boards/xtensa/esp32s3_devkitm/esp32s3_devkitm.dts index e052f090b2..6bd3583ea5 100644 --- a/boards/xtensa/esp32s3_devkitm/esp32s3_devkitm.dts +++ b/boards/xtensa/esp32s3_devkitm/esp32s3_devkitm.dts @@ -12,6 +12,10 @@ model = "esp32s3_devkitm"; compatible = "espressif,esp32s3"; + aliases { + i2c-0 = &i2c0; + }; + chosen { zephyr,sram = &sram0; zephyr,console = &uart0; @@ -56,6 +60,18 @@ status = "okay"; }; +&i2c0 { + clock-frequency = ; + pinctrl-0 = <&i2c0_default>; + pinctrl-names = "default"; +}; + +&i2c1 { + clock-frequency = ; + pinctrl-0 = <&i2c1_default>; + pinctrl-names = "default"; +}; + &flash0 { status = "okay"; partitions { diff --git a/boards/xtensa/esp32s3_devkitm/esp32s3_devkitm.yaml b/boards/xtensa/esp32s3_devkitm/esp32s3_devkitm.yaml index 171b9bfd3e..f93155836d 100644 --- a/boards/xtensa/esp32s3_devkitm/esp32s3_devkitm.yaml +++ b/boards/xtensa/esp32s3_devkitm/esp32s3_devkitm.yaml @@ -7,6 +7,7 @@ toolchain: supported: - gpio - uart + - i2c testing: ignore_tags: - net diff --git a/dts/xtensa/espressif/esp32s3.dtsi b/dts/xtensa/espressif/esp32s3.dtsi index 069a49e962..03873a5228 100644 --- a/dts/xtensa/espressif/esp32s3.dtsi +++ b/dts/xtensa/espressif/esp32s3.dtsi @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -150,5 +151,27 @@ }; }; + i2c0: i2c@60013000 { + compatible = "espressif,esp32-i2c"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x60013000 DT_SIZE_K(4)>; + interrupts = ; + interrupt-parent = <&intc>; + clocks = <&rtc ESP32_I2C0_MODULE>; + status = "disabled"; + }; + + i2c1: i2c@60027000 { + compatible = "espressif,esp32-i2c"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x60027000 DT_SIZE_K(4)>; + interrupts = ; + interrupt-parent = <&intc>; + clocks = <&rtc ESP32_I2C1_MODULE>; + status = "disabled"; + }; + }; };