Skip to content

Commit ba608f8

Browse files
committed
boards: nxp: imx943_evk: m33: add i2c support
Add i2c support for m33(in NETCMIX) of imx943_evk Signed-off-by: Biwen Li <[email protected]>
1 parent 8e5e992 commit ba608f8

File tree

6 files changed

+115
-0
lines changed

6 files changed

+115
-0
lines changed

boards/nxp/imx943_evk/imx943_evk-pinctrl.dtsi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,17 @@
166166
};
167167
};
168168

169+
lpi2c6_default: lpi2c6_default {
170+
group0 {
171+
pinmux = <&iomuxc_gpio_io28_lpi2c_scl_lpi2c6_scl>,
172+
<&iomuxc_gpio_io29_lpi2c_sda_lpi2c6_sda>;
173+
drive-open-drain;
174+
slew-rate = "slightly_fast";
175+
drive-strength = "x4";
176+
input-enable;
177+
};
178+
};
179+
169180
lpuart1_default: lpuart1_default {
170181
group0 {
171182
pinmux = <&iomuxc_uart1_rxd_lpuart_rx_lpuart1_rx>,

boards/nxp/imx943_evk/imx943_evk_mimx94398_m33.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@
9999
};
100100
};
101101

102+
&lpi2c6 {
103+
pinctrl-0 = <&lpi2c6_default>;
104+
pinctrl-names = "default";
105+
status = "okay";
106+
};
107+
102108
&lpuart8 {
103109
status = "okay";
104110
current-speed = <115200>;

boards/nxp/imx943_evk/imx943_evk_mimx94398_m33.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ supported:
1818
- netif:eth
1919
- gpio
2020
- pwm
21+
- i2c
2122
vendor: nxp

dts/arm/nxp/nxp_imx943_m33.dtsi

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <arm/armv8-m.dtsi>
88
#include <zephyr/dt-bindings/clock/imx943_clock.h>
9+
#include <dt-bindings/i2c/i2c.h>
910
#include <mem.h>
1011
#include <freq.h>
1112

@@ -89,6 +90,28 @@
8990
reg = <0x20000000 DT_SIZE_K(256)>;
9091
};
9192

93+
lpi2c3: i2c@42530000 {
94+
compatible = "nxp,lpi2c";
95+
clock-frequency = <I2C_BITRATE_STANDARD>;
96+
#address-cells = <1>;
97+
#size-cells = <0>;
98+
reg = <0x42530000 0x4000>;
99+
interrupts = <67 0>;
100+
clocks = <&scmi_clk IMX943_CLK_LPI2C3>;
101+
status = "disabled";
102+
};
103+
104+
lpi2c4: i2c@42540000 {
105+
compatible = "nxp,lpi2c";
106+
clock-frequency = <I2C_BITRATE_STANDARD>;
107+
#address-cells = <1>;
108+
#size-cells = <0>;
109+
reg = <0x42540000 0x4000>;
110+
interrupts = <68 0>;
111+
clocks = <&scmi_clk IMX943_CLK_LPI2C4>;
112+
status = "disabled";
113+
};
114+
92115
lpuart3: serial@42570000 {
93116
compatible = "nxp,imx-lpuart", "nxp,lpuart";
94117
reg = <0x42570000 DT_SIZE_K(64)>;
@@ -137,6 +160,50 @@
137160
status = "disabled";
138161
};
139162

163+
lpi2c5: i2c@426b0000 {
164+
compatible = "nxp,lpi2c";
165+
clock-frequency = <I2C_BITRATE_STANDARD>;
166+
#address-cells = <1>;
167+
#size-cells = <0>;
168+
reg = <0x426b0000 0x4000>;
169+
interrupts = <108 0>;
170+
clocks = <&scmi_clk IMX943_CLK_LPI2C5>;
171+
status = "disabled";
172+
};
173+
174+
lpi2c6: i2c@426c0000 {
175+
compatible = "nxp,lpi2c";
176+
clock-frequency = <I2C_BITRATE_STANDARD>;
177+
#address-cells = <1>;
178+
#size-cells = <0>;
179+
reg = <0x426c0000 0x4000>;
180+
interrupts = <109 0>;
181+
clocks = <&scmi_clk IMX943_CLK_LPI2C6>;
182+
status = "disabled";
183+
};
184+
185+
lpi2c7: i2c@426d0000 {
186+
compatible = "nxp,lpi2c";
187+
clock-frequency = <I2C_BITRATE_STANDARD>;
188+
#address-cells = <1>;
189+
#size-cells = <0>;
190+
reg = <0x426d0000 0x4000>;
191+
interrupts = <110 0>;
192+
clocks = <&scmi_clk IMX943_CLK_LPI2C7>;
193+
status = "disabled";
194+
};
195+
196+
lpi2c8: i2c@426e0000 {
197+
compatible = "nxp,lpi2c";
198+
clock-frequency = <I2C_BITRATE_STANDARD>;
199+
#address-cells = <1>;
200+
#size-cells = <0>;
201+
reg = <0x426e0000 0x4000>;
202+
interrupts = <111 0>;
203+
clocks = <&scmi_clk IMX943_CLK_LPI2C8>;
204+
status = "disabled";
205+
};
206+
140207
lpuart9: serial@42a50000 {
141208
compatible = "nxp,imx-lpuart", "nxp,lpuart";
142209
reg = <0x42a50000 DT_SIZE_K(64)>;
@@ -262,6 +329,28 @@
262329
status = "disabled";
263330
};
264331

332+
lpi2c1: i2c@44340000 {
333+
compatible = "nxp,lpi2c";
334+
clock-frequency = <I2C_BITRATE_STANDARD>;
335+
#address-cells = <1>;
336+
#size-cells = <0>;
337+
reg = <0x44340000 0x4000>;
338+
interrupts = <15 0>;
339+
clocks = <&scmi_clk IMX943_CLK_LPI2C1>;
340+
status = "disabled";
341+
};
342+
343+
lpi2c2: i2c@44350000 {
344+
compatible = "nxp,lpi2c";
345+
clock-frequency = <I2C_BITRATE_STANDARD>;
346+
#address-cells = <1>;
347+
#size-cells = <0>;
348+
reg = <0x44350000 0x4000>;
349+
interrupts = <16 0>;
350+
clocks = <&scmi_clk IMX943_CLK_LPI2C2>;
351+
status = "disabled";
352+
};
353+
265354
lpuart1: serial@44380000 {
266355
compatible = "nxp,imx-lpuart", "nxp,lpuart";
267356
reg = <0x44380000 DT_SIZE_K(64)>;

modules/hal_nxp/mcux/mcux-sdk-ng/drivers/drivers.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ endif()
185185
set_variable_ifdef(CONFIG_HAS_MCUX_XCACHE CONFIG_MCUX_COMPONENT_driver.cache_xcache)
186186

187187
if((${MCUX_DEVICE} MATCHES "MIMX9596") OR (${MCUX_DEVICE} MATCHES "MIMX8UD7") OR (${MCUX_DEVICE} MATCHES "MIMXRT118") OR (CONFIG_SOC_MIMX94398) OR (CONFIG_SOC_MIMXRT798S))
188+
189+
if(CONFIG_SOC_MIMX94398_M33)
190+
set(CONFIG_MCUX_COMPONENT_driver.irqsteer_1 ON)
191+
set(CONFIG_MCUX_COMPONENT_driver.irqsteer_1_soc.cm33_core1 ON)
192+
endif()
193+
188194
set_variable_ifdef(CONFIG_IPM_IMX CONFIG_MCUX_COMPONENT_driver.mu1)
189195
set_variable_ifdef(CONFIG_MBOX_NXP_IMX_MU CONFIG_MCUX_COMPONENT_driver.mu1)
190196
else()
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CONFIG_I2C=y
2+
CONFIG_I2C_SHELL=y

0 commit comments

Comments
 (0)