boards: imx8mm_evk_a53: add i2c gpio expander support
Added gpio expander pca6416 support on the board, it use i2c bus to expand IO ports. Added GPIO test case overlay for the board. Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
This commit is contained in:
parent
594b646bfd
commit
2c2430cb49
@ -63,4 +63,16 @@
|
||||
drive-strength = "x6";
|
||||
};
|
||||
};
|
||||
|
||||
pinmux_i2c3: pinmux_i2c3 {
|
||||
group0 {
|
||||
pinmux = <&iomuxc_i2c3_scl_i2c_scl_i2c3_scl>,
|
||||
<&iomuxc_i2c3_sda_i2c_sda_i2c3_sda>;
|
||||
bias-pull-up;
|
||||
input-schmitt-enable;
|
||||
slew-rate = "slow";
|
||||
drive-strength = "x4";
|
||||
input-enable;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -6,6 +6,8 @@
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <zephyr/dt-bindings/gpio/gpio.h>
|
||||
#include <zephyr/dt-bindings/i2c/i2c.h>
|
||||
#include <nxp/nxp_mimx8mm_a53.dtsi>
|
||||
#include "imx8mm_evk-pinctrl.dtsi"
|
||||
|
||||
@ -67,3 +69,23 @@
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c3 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pinmux_i2c3>;
|
||||
pinctrl-names = "default";
|
||||
clock-frequency = <I2C_BITRATE_STANDARD>;
|
||||
|
||||
gpio_exp1: pca6416@20 {
|
||||
compatible = "nxp,pca6416";
|
||||
reg = <0x20>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-gpios = <&gpio1 12 (GPIO_ACTIVE_LOW|GPIO_PULL_UP)>;
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright 2024 NXP
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/{
|
||||
resources {
|
||||
compatible = "test-gpio-basic-api";
|
||||
/*
|
||||
* Use connector J1003 Pin-12 GPIO.1 which connect to pca6416 P1_2 as input
|
||||
* GPIO, and connector J1003 Pin-16 GPIO.4 which connect to pca6416 P1_5 as
|
||||
* output GPIO, connect these two pins with a Dupont Line.
|
||||
*/
|
||||
out-gpios = <&gpio_exp1 10 0>;
|
||||
in-gpios = <&gpio_exp1 13 0>;
|
||||
};
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user