boards: nxp: frdm_mcxe247: add i2c feature

- support accel feature using lpi2c0 and enable accel cases:
  accel_trig/accel_polling
- enable i2c_target_api case using lpi2c0 and lpi2c1

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
This commit is contained in:
Lucien Zhao
2025-12-17 23:01:03 +08:00
committed by Anas Nashif
parent 6ef3de03fa
commit 3756fa3c1a
6 changed files with 83 additions and 0 deletions

View File

@@ -26,6 +26,26 @@
};
};
pinmux_lpi2c0: pinmux_lpi2c0 {
group0 {
pinmux = <LPI2C0_SCL_PTA3>,
<LPI2C0_SDA_PTA2>;
drive-strength = "low";
slew-rate = "slow";
input-enable;
};
};
pinmux_lpi2c1: pinmux_lpi2c1 {
group0 {
pinmux = <LPI2C1_SCL_PTD9>,
<LPI2C1_SDA_PTD8>;
drive-strength = "low";
slew-rate = "slow";
input-enable;
};
};
pinmux_adc0: pinmux_adc0 {
group0 {
pinmux = <ADC0_SE1_PTA1>,

View File

@@ -22,6 +22,7 @@
sw0 = &user_button_2;
sw1 = &user_button_3;
rtc = &counter_rtc;
accel0 = &fxls8974;
};
chosen {
@@ -221,6 +222,24 @@
status = "okay";
};
&lpi2c0 {
pinctrl-0 = <&pinmux_lpi2c0>;
pinctrl-names = "default";
status = "okay";
fxls8974: fxls8974@18 {
compatible = "nxp,fxls8974";
reg = <0x18>;
status = "okay";
};
};
&lpi2c1 {
pinctrl-0 = <&pinmux_lpi2c1>;
pinctrl-names = "default";
status = "okay";
};
&edma {
status = "okay";
};

View File

@@ -15,6 +15,7 @@ toolchain:
- gnuarmemb
supported:
- uart
- i2c
- gpio
- adc
- arduino_gpio

View File

@@ -0,0 +1 @@
CONFIG_FXLS8974_TRIGGER_OWN_THREAD=y

View File

@@ -0,0 +1,11 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2025 NXP
*/
&fxls8974 {
status = "okay";
int1-gpios = <&gpioe 14 GPIO_ACTIVE_LOW>;
int2-gpios = <&gpioe 11 GPIO_ACTIVE_LOW>;
};

View File

@@ -0,0 +1,31 @@
/*
* Copyright 2025 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
/* To test this sample, connect
* LPI2C0 SCL(J2-20) --> LPI2C3 SCL(J5-5)
* LPI2C0 SDA(J2-18) --> LPI2C3 SDA(J5-6)
*/
&lpi2c0 {
eeprom0: eeprom@54 {
compatible = "zephyr,i2c-target-eeprom";
reg = <0x54>;
size = <256>;
};
};
&lpi2c1 {
eeprom1: eeprom@56 {
compatible = "zephyr,i2c-target-eeprom";
reg = <0x56>;
size = <256>;
};
};
/* Disable the FXLS8974 sensor to avoid conflict with accel samples */
&fxls8974 {
status = "disabled";
};