dts: esp32s3: add i2c support
Add i2c support for esp32s3 Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
This commit is contained in:
parent
084ddf9552
commit
ca0c46604f
|
@ -18,4 +18,24 @@
|
|||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_default: i2c0_default {
|
||||
group1 {
|
||||
pinmux = <I2C0_SDA_GPIO1>,
|
||||
<I2C0_SCL_GPIO2>;
|
||||
bias-pull-up;
|
||||
drive-open-drain;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
|
||||
i2c1_default: i2c1_default {
|
||||
group1 {
|
||||
pinmux = <I2C1_SDA_GPIO4>,
|
||||
<I2C1_SCL_GPIO5>;
|
||||
bias-pull-up;
|
||||
drive-open-drain;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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 = <I2C_BITRATE_STANDARD>;
|
||||
pinctrl-0 = <&i2c0_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
clock-frequency = <I2C_BITRATE_STANDARD>;
|
||||
pinctrl-0 = <&i2c1_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
status = "okay";
|
||||
partitions {
|
||||
|
|
|
@ -7,6 +7,7 @@ toolchain:
|
|||
supported:
|
||||
- gpio
|
||||
- uart
|
||||
- i2c
|
||||
testing:
|
||||
ignore_tags:
|
||||
- net
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <mem.h>
|
||||
#include <xtensa/xtensa.dtsi>
|
||||
#include <zephyr/dt-bindings/gpio/gpio.h>
|
||||
#include <zephyr/dt-bindings/i2c/i2c.h>
|
||||
#include <zephyr/dt-bindings/clock/esp32s3_clock.h>
|
||||
#include <zephyr/dt-bindings/interrupt-controller/esp32s3-xtensa-intmux.h>
|
||||
#include <dt-bindings/pinctrl/esp32s3-pinctrl.h>
|
||||
|
@ -150,5 +151,27 @@
|
|||
};
|
||||
};
|
||||
|
||||
i2c0: i2c@60013000 {
|
||||
compatible = "espressif,esp32-i2c";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x60013000 DT_SIZE_K(4)>;
|
||||
interrupts = <I2C_EXT0_INTR_SOURCE>;
|
||||
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 = <I2C_EXT1_INTR_SOURCE>;
|
||||
interrupt-parent = <&intc>;
|
||||
clocks = <&rtc ESP32_I2C1_MODULE>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue