boards: nxp: frdm_mcxw71: Enable MCXW71 I2C Loopback

Enable and test I2C loopback with i2c_target_api

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
This commit is contained in:
Emilio Benavente 2025-01-10 13:03:01 -06:00 committed by Benjamin Cabé
commit d4bfe3b507
4 changed files with 52 additions and 0 deletions

View file

@ -32,6 +32,16 @@
};
};
pinmux_lpi2c0: pinmux_lpi2c0 {
group0 {
pinmux = <LPI2C0_SCL_PTA19>,
<LPI2C0_SDA_PTA18>;
drive-strength = "low";
slew-rate = "fast";
drive-open-drain;
};
};
pinmux_lpi2c1: pinmux_lpi2c1 {
group0 {
pinmux = <LPI2C1_SCL_PTB5>,

View file

@ -136,6 +136,10 @@ static ALWAYS_INLINE void clock_init(void)
CLOCK_EnableClock(kCLOCK_PortA);
}
if (DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(gpiob), nxp_kinetis_gpio, okay)) {
CLOCK_EnableClock(kCLOCK_PortB);
}
if (DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(gpioc), nxp_kinetis_gpio, okay)) {
CLOCK_EnableClock(kCLOCK_PortC);
}

View file

@ -0,0 +1 @@
CONFIG_I2C_VIRTUAL=n

View file

@ -0,0 +1,37 @@
/*
* Copyright 2025 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
/*
* This is a looback setup for the frdm_mcxw71
* To test this sample, connect J2.1 <-> J1.5 and J2.2 <-> J2.9
*/
&lpi2c1 {
status = "okay";
eeprom0: eeprom@54 {
compatible = "zephyr,i2c-target-eeprom";
reg = <0x54>;
size = <256>;
};
};
&lpi2c0 {
status = "okay";
pinctrl-0 = <&pinmux_lpi2c0>;
pinctrl-names = "default";
eeprom1: eeprom@56 {
compatible = "zephyr,i2c-target-eeprom";
reg = <0x56>;
size = <256>;
};
};
&gpiob {
status = "okay";
};
&gpioa {
status = "okay";
};