-
Notifications
You must be signed in to change notification settings - Fork 8.2k
boards: shield: Support touch for the NXP LCD-PAR-S035 LCD on MCXN947 #75353
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,11 @@ | |||||
| if SHIELD_LCD_PAR_S035 | ||||||
| if LVGL | ||||||
|
|
||||||
| # Configure LVGL to use touchscreen with KSCAN API | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| config INPUT | ||||||
| default y | ||||||
|
|
||||||
| # Enable double buffering | ||||||
| config LV_Z_DOUBLE_VDB | ||||||
| default y | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| /* | ||
| * 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>; | ||
| /delete-property/ reset-gpios; | ||
| alt-addr = <0x14>; | ||
| }; | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
||
| reset-gpios = <&nxp_flexio_connector 1 GPIO_ACTIVE_HIGH>; // RESET | ||
| }; | ||
| }; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be defining a custom compatible for the flexio connector, and adding a pin map in the dt binding. See here for an example for the 6 pin FPC touch connector present on NXP RT10xx EVKs:
zephyr/dts/bindings/gpio/nxp,i2c-tsc-fpc.yaml
Line 10 in cce7e9a
Also, should we be defining additional pins beyond the INT and RESET? The FlexIO connector is 28 pins in total, and many can be used as GPIOs, right?
Generally the approach taken is to define all pins for the interface in the binding file, and only define the pins that are actually in use as GPIOs in the devicetree for the board. A good example of this would be the 40 pin parallel LCD connector on the RT10xx boards:
zephyr/dts/bindings/gpio/nxp,parallel-lcd-connector.yaml
Line 13 in cce7e9a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the suggestion!
duly applied