ARM: dts: stm32: enable i2c1 and i2c5 on stm32mp135f-dk.dts
authorAlain Volmat <alain.volmat@foss.st.com>
Thu, 21 Jul 2022 15:29:33 +0000 (17:29 +0200)
committerAlexandre Torgue <alexandre.torgue@foss.st.com>
Mon, 12 Sep 2022 13:19:12 +0000 (15:19 +0200)
Enable the two i2c busses i2c1 and i2c5 available on the
stm32mp135f-dk Discovery board.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
arch/arm/boot/dts/stm32mp13-pinctrl.dtsi
arch/arm/boot/dts/stm32mp135f-dk.dts

index d2472cd..749078b 100644 (file)
@@ -6,6 +6,40 @@
 #include <dt-bindings/pinctrl/stm32-pinfunc.h>
 
 &pinctrl {
+       i2c1_pins_a: i2c1-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('D', 12, AF5)>, /* I2C1_SCL */
+                                <STM32_PINMUX('E', 8, AF5)>; /* I2C1_SDA */
+                       bias-disable;
+                       drive-open-drain;
+                       slew-rate = <0>;
+               };
+       };
+
+       i2c1_sleep_pins_a: i2c1-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('D', 12, ANALOG)>, /* I2C1_SCL */
+                                <STM32_PINMUX('E', 8, ANALOG)>; /* I2C1_SDA */
+               };
+       };
+
+       i2c5_pins_a: i2c5-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('D', 1, AF4)>, /* I2C5_SCL */
+                                <STM32_PINMUX('H', 6, AF4)>; /* I2C5_SDA */
+                       bias-disable;
+                       drive-open-drain;
+                       slew-rate = <0>;
+               };
+       };
+
+       i2c5_sleep_pins_a: i2c5-sleep-0 {
+               pins {
+                       pinmux = <STM32_PINMUX('D', 1, ANALOG)>, /* I2C5_SCL */
+                                <STM32_PINMUX('H', 6, ANALOG)>; /* I2C5_SDA */
+               };
+       };
+
        sdmmc1_b4_pins_a: sdmmc1-b4-0 {
                pins {
                        pinmux = <STM32_PINMUX('C', 8, AF12)>, /* SDMMC1_D0 */
index e6b8ffd..3e28233 100644 (file)
        };
 };
 
+&i2c1 {
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&i2c1_pins_a>;
+       pinctrl-1 = <&i2c1_sleep_pins_a>;
+       i2c-scl-rising-time-ns = <96>;
+       i2c-scl-falling-time-ns = <3>;
+       clock-frequency = <1000000>;
+       status = "okay";
+       /* spare dmas for other usage */
+       /delete-property/dmas;
+       /delete-property/dma-names;
+};
+
+&i2c5 {
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&i2c5_pins_a>;
+       pinctrl-1 = <&i2c5_sleep_pins_a>;
+       i2c-scl-rising-time-ns = <170>;
+       i2c-scl-falling-time-ns = <5>;
+       clock-frequency = <400000>;
+       status = "okay";
+       /* spare dmas for other usage */
+       /delete-property/dmas;
+       /delete-property/dma-names;
+};
+
 &iwdg2 {
        timeout-sec = <32>;
        status = "okay";