soc: nxp: mcxw71: Add LPI2C node and clocking

Add LPI2C node and default clocking in soc.c

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This commit is contained in:
Declan Snyder 2024-09-25 16:23:06 -05:00 committed by Anas Nashif
commit 8a104729c4
2 changed files with 30 additions and 0 deletions

View file

@ -170,6 +170,28 @@
status = "disabled";
};
lpi2c0: i2c@33000 {
compatible = "nxp,imx-lpi2c";
clock-frequency = <I2C_BITRATE_STANDARD>;
#address-cells = <1>;
#size-cells = <0>;
reg = <0x33000 0x200>;
interrupts = <39 0>;
clocks = <&scg SCG_K4_FIRC_CLK 0xe0>;
status = "disabled";
};
lpi2c1: i2c@34000 {
compatible = "nxp,imx-lpi2c";
clock-frequency = <I2C_BITRATE_STANDARD>;
#address-cells = <1>;
#size-cells = <0>;
reg = <0x34000 0x200>;
interrupts = <40 0>;
clocks = <&scg SCG_K4_FIRC_CLK 0xe4>;
status = "disabled";
};
gpiod: gpio@46000{
compatible = "nxp,kinetis-gpio";
status = "disabled";

View file

@ -136,6 +136,14 @@ static ALWAYS_INLINE void clock_init(void)
if (DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(tpm1), nxp_kinetis_tpm, okay)) {
CLOCK_EnableClock(kCLOCK_Tpm1);
}
if (DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(lpi2c0), nxp_imx_lpi2c, okay)) {
CLOCK_EnableClock(kCLOCK_Lpi2c0);
}
if (DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(lpi2c1), nxp_imx_lpi2c, okay)) {
CLOCK_EnableClock(kCLOCK_Lpi2c1);
}
}
static void vbat_init(void)