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:
parent
4551f3410d
commit
d4bfe3b507
4 changed files with 52 additions and 0 deletions
|
|
@ -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 {
|
pinmux_lpi2c1: pinmux_lpi2c1 {
|
||||||
group0 {
|
group0 {
|
||||||
pinmux = <LPI2C1_SCL_PTB5>,
|
pinmux = <LPI2C1_SCL_PTB5>,
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,10 @@ static ALWAYS_INLINE void clock_init(void)
|
||||||
CLOCK_EnableClock(kCLOCK_PortA);
|
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)) {
|
if (DT_NODE_HAS_COMPAT_STATUS(DT_NODELABEL(gpioc), nxp_kinetis_gpio, okay)) {
|
||||||
CLOCK_EnableClock(kCLOCK_PortC);
|
CLOCK_EnableClock(kCLOCK_PortC);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1
tests/drivers/i2c/i2c_target_api/boards/frdm_mcxw71.conf
Normal file
1
tests/drivers/i2c/i2c_target_api/boards/frdm_mcxw71.conf
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
CONFIG_I2C_VIRTUAL=n
|
||||||
37
tests/drivers/i2c/i2c_target_api/boards/frdm_mcxw71.overlay
Normal file
37
tests/drivers/i2c/i2c_target_api/boards/frdm_mcxw71.overlay
Normal 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";
|
||||||
|
};
|
||||||
Loading…
Reference in a new issue