Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards: shield: Support touch for the NXP LCD-PAR-S035 LCD on MCXN947 #75353

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion boards/nxp/frdm_mcxn947/frdm_mcxn947.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,26 @@
status = "disabled";
};
};

nxp_flexio_connector: flexio-connector {
compatible = "nxp,flexio-lcd";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <
0 0 &gpio4 6 0 /* Pin 5, INT */
1 0 &gpio4 0 0 /* Pin 0, BOGUS RESET */
>;
};

};

&flexcomm1_lpspi1 {
pinctrl-0 = <&pinmux_flexcomm1_lpspi>;
pinctrl-names = "default";
};

&flexcomm2_lpi2c2 {
flexio_i2c: &flexcomm2_lpi2c2 {
pinctrl-0 = <&pinmux_flexcomm2_lpi2c>;
pinctrl-names = "default";
clock-frequency = <I2C_BITRATE_STANDARD>;
Expand Down
5 changes: 5 additions & 0 deletions boards/shields/lcd_par_s035/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
if SHIELD_LCD_PAR_S035
if LVGL

# Configure LVGL to use touchscreen with KSCAN API

config INPUT
default y

# Enable double buffering
config LV_Z_DOUBLE_VDB
default y
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright 2024, NXP
*
* SPDX-License-Identifier: Apache-2.0
*/


&flexio_i2c {
status = "okay";
gt911_lcd_par_s035: gt911-lcd_par_s035@5d {
/delete-property/ reset-gpios;
alt-addr = <0x14>;
};
};
17 changes: 17 additions & 0 deletions boards/shields/lcd_par_s035/lcd_par_s035_8080.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
chosen {
zephyr,display = &st7796s;
};

lvgl_pointer {
compatible = "zephyr,lvgl-pointer-input";
input = <&gt911_lcd_par_s035>;
swap-xy;
invert-y;
};
};

&nxp_flexio_lcd {
Expand Down Expand Up @@ -39,3 +46,13 @@
color-invert;
};
};

&flexio_i2c {
status = "okay";
gt911_lcd_par_s035: gt911-lcd_par_s035@5d {
compatible = "goodix,gt911";
reg = <0x5d>;
irq-gpios = <&nxp_flexio_connector 0 GPIO_ACTIVE_HIGH>; // INT
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wrong irq-gpios is an phandle-array now the 2nd assignment overrules the first one.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right!

reset-gpios = <&nxp_flexio_connector 1 GPIO_ACTIVE_HIGH>; // RESET
};
};
41 changes: 41 additions & 0 deletions dts/bindings/gpio/nxp,flexio-lcd.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not belong in dts/bindings/gpio/.

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright 2024 NXP
# SPDX-License-Identifier: Apache-2.0


compatible: "nxp,flexio-lcd"

description: |
GPIO pins exposed on NXP FlexIO LCD interface. These pins are
exposed on a 32 pin. The pins have the
following assignments:

Pin Number Usage
1 VDD (3v3)
2 GND
3 FC2_I2C_SCL-FXIO_HDR
4 FC2_I2C_SDA-FXIO_HDR
5 LCD_INT
6 LCD_GPIO
7 LCD_RST
8 LCD_DC
9 LCD_CS
10 LCD_WR
11 LCD_RD
12 LCD_TE
13-15 FXIO_HDR
16 D19
17 D20
18 D21
19 D22
20 D23
21 D24
22 D25
23 D26
24 D27
25 D28
26 D29
27 D30
28 D31
29-32 NC

include: [gpio-nexus.yaml, base.yaml]
Loading