Skip to content

Commit

Permalink
dts: arm: st: f0: refactor stm32f0 i2c2 driver
Browse files Browse the repository at this point in the history
Remove I2C2 from base dtsi, and add it to F030x8, F070xB & F051

Signed-off-by: Guillaume Gautier <[email protected]>
  • Loading branch information
gautierg-st authored and carlescufi committed Mar 7, 2023
1 parent 03aad04 commit b3a08d4
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 13 deletions.
12 changes: 0 additions & 12 deletions dts/arm/st/f0/stm32f0.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -185,18 +185,6 @@
status = "disabled";
};

i2c2: i2c@40005800 {
compatible = "st,stm32-i2c-v2";
clock-frequency = <I2C_BITRATE_STANDARD>;
#address-cells = <1>;
#size-cells = <0>;
reg = <0x40005800 0x400>;
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00400000>;
interrupts = <24 0>;
interrupt-names = "combined";
status = "disabled";
};

spi1: spi@40013000 {
compatible = "st,stm32-spi-fifo", "st,stm32-spi";
#address-cells = <1>;
Expand Down
1 change: 0 additions & 1 deletion dts/arm/st/f0/stm32f030X6.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
};
};

/delete-node/ &i2c2;
/delete-node/ &timers6;
/delete-node/ &timers7;
/delete-node/ &timers15;
12 changes: 12 additions & 0 deletions dts/arm/st/f0/stm32f030X8.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@
status = "disabled";
};

i2c2: i2c@40005800 {
compatible = "st,stm32-i2c-v2";
clock-frequency = <I2C_BITRATE_STANDARD>;
#address-cells = <1>;
#size-cells = <0>;
reg = <0x40005800 0x400>;
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00400000>;
interrupts = <24 0>;
interrupt-names = "combined";
status = "disabled";
};

spi2: spi@40003800 {
compatible = "st,stm32-spi-fifo", "st,stm32-spi";
#address-cells = <1>;
Expand Down
12 changes: 12 additions & 0 deletions dts/arm/st/f0/stm32f051.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@
status = "disabled";
};

i2c2: i2c@40005800 {
compatible = "st,stm32-i2c-v2";
clock-frequency = <I2C_BITRATE_STANDARD>;
#address-cells = <1>;
#size-cells = <0>;
reg = <0x40005800 0x400>;
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00400000>;
interrupts = <24 0>;
interrupt-names = "combined";
status = "disabled";
};

dac1: dac@40007400 {
compatible = "st,stm32-dac";
reg = <0x40007400 0x400>;
Expand Down
12 changes: 12 additions & 0 deletions dts/arm/st/f0/stm32f070Xb.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,17 @@
reg = <0x08000000 DT_SIZE_K(128)>;
};
};

i2c2: i2c@40005800 {
compatible = "st,stm32-i2c-v2";
clock-frequency = <I2C_BITRATE_STANDARD>;
#address-cells = <1>;
#size-cells = <0>;
reg = <0x40005800 0x400>;
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00400000>;
interrupts = <24 0>;
interrupt-names = "combined";
status = "disabled";
};
};
};

0 comments on commit b3a08d4

Please sign in to comment.