diff --git a/boards/nxp/frdm_mcxn947/frdm_mcxn947.dtsi b/boards/nxp/frdm_mcxn947/frdm_mcxn947.dtsi index 77708792e49d279..6abebc19d17ba68 100644 --- a/boards/nxp/frdm_mcxn947/frdm_mcxn947.dtsi +++ b/boards/nxp/frdm_mcxn947/frdm_mcxn947.dtsi @@ -52,6 +52,15 @@ status = "disabled"; }; }; + + nxp_flexio_connector: flexio-connector { + compatible = "gpio-nexus"; + #gpio-cells = <2>; + gpio-map-mask = <0xffffffff 0xffffffc0>; + gpio-map-pass-thru = <0 0x3f>; + gpio-map = <0 0 &gpio4 6 0>; /* Pin 6, INT */ + }; + }; &flexcomm1_lpspi1 { @@ -59,7 +68,7 @@ pinctrl-names = "default"; }; -&flexcomm2_lpi2c2 { +flexio_i2c: &flexcomm2_lpi2c2 { pinctrl-0 = <&pinmux_flexcomm2_lpi2c>; pinctrl-names = "default"; clock-frequency = ; diff --git a/boards/shields/lcd_par_s035/Kconfig.defconfig b/boards/shields/lcd_par_s035/Kconfig.defconfig index 07f0bb7bab1af9f..603f47d9a002afd 100644 --- a/boards/shields/lcd_par_s035/Kconfig.defconfig +++ b/boards/shields/lcd_par_s035/Kconfig.defconfig @@ -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 diff --git a/boards/shields/lcd_par_s035/boards/frdm_mcxn947_mcxn947_cpu0.overlay b/boards/shields/lcd_par_s035/boards/frdm_mcxn947_mcxn947_cpu0.overlay new file mode 100644 index 000000000000000..0d64a79f8a75a3c --- /dev/null +++ b/boards/shields/lcd_par_s035/boards/frdm_mcxn947_mcxn947_cpu0.overlay @@ -0,0 +1,16 @@ +/* + * Copyright 2024, NXP + * + * SPDX-License-Identifier: Apache-2.0 + */ + + +&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>; + alt-addr = <0x14>; + }; +}; diff --git a/boards/shields/lcd_par_s035/lcd_par_s035_8080.overlay b/boards/shields/lcd_par_s035/lcd_par_s035_8080.overlay index eaf7b8b9c03fb45..1f934e121a41c50 100644 --- a/boards/shields/lcd_par_s035/lcd_par_s035_8080.overlay +++ b/boards/shields/lcd_par_s035/lcd_par_s035_8080.overlay @@ -10,6 +10,13 @@ chosen { zephyr,display = &st7796s; }; + + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <>911_lcd_par_s035>; + swap-xy; + invert-y; + }; }; &nxp_flexio_lcd { @@ -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 + irq-gpios = <&nxp_flexio_connector 1 GPIO_ACTIVE_HIGH>; // RESET + }; +};