Skip to content

Commit 0e830e8

Browse files
biwenlikartben
authored andcommitted
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 7d6b48a commit 0e830e8

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
@@ -5,6 +5,7 @@
55
*/
66

77
#include <arm/armv8-m.dtsi>
8+
#include <dt-bindings/i2c/i2c.h>
89
#include <zephyr/dt-bindings/clock/imx943_clock.h>
910
#include <zephyr/dt-bindings/ethernet/dsa_tag_proto.h>
1011
#include <mem.h>
@@ -90,6 +91,28 @@
9091
reg = <0x20000000 DT_SIZE_K(256)>;
9192
};
9293

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

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

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