Skip to content

Support kpp with rt1180 cm7 cm33 #93301

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mcuxted
Copy link
Contributor

@mcuxted mcuxted commented Jul 18, 2025

This is an implementation for KPP(keyboard port) driver on rt1180.

The KPP (Keypad port) module is a driver for managing the matrix keyboard (Keypad). It is mainly used for RT series chips and is responsible for keyboard row and column scanning.

This PR mainly support kpp drivers, test case, dts support on RT1180.

driver: kpp provides "input_kpp_init()" to initialize the module, including configuration initialization and clock enable. At the same time, the KPP module can be configured and interrupts can be enabled through "input_kpp_config()". When the kpp interrupt is triggered, you can enter "kpp_isr()' to handle the interrupt and call back. Users can use "input_kpp_scan()" in the callback to scan and obtain keypad data and analyze it.

# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
Copy link
Contributor

Choose a reason for hiding this comment

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

this should go in samples/boards/<vendor> if it's not usable on other vendor's SoCs

@mcuxted mcuxted force-pushed the support-kpp-with-rt1180-cm7-cm33 branch from 2d04b81 to cec9feb Compare July 18, 2025 07:50
mcuxted added 2 commits July 18, 2025 16:43
Add KPP driver support.

Signed-off-by: Qiang Zhang <[email protected]>
Add KPP clock support for ccm.

Signed-off-by: Qiang Zhang <[email protected]>
@mcuxted mcuxted force-pushed the support-kpp-with-rt1180-cm7-cm33 branch from cec9feb to eb04ef9 Compare July 18, 2025 08:43
mcuxted added 4 commits July 18, 2025 17:44
Added support for KPP driver.

Signed-off-by: Qiang Zhang <[email protected]>
add KPP driver bindings.

Signed-off-by: Qiang Zhang <[email protected]>
add kpp peripheral to mimxrt1180_evk.

Signed-off-by: Qiang Zhang <[email protected]>
added gpio_kpp test implementation.

Signed-off-by: Qiang Zhang <[email protected]>
@mcuxted mcuxted force-pushed the support-kpp-with-rt1180-cm7-cm33 branch from eb04ef9 to 578fe5e Compare July 18, 2025 09:45
Copy link
Member

@fabiobaltieri fabiobaltieri left a comment

Choose a reason for hiding this comment

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

This is not how input subsystem drivers area meant to work, they should get a list of input event codes from devicetree and emit them on their own with input_report, look at other drivers in-tree works, this needs to be reworked to function in a similar way, the sample can go, the default one should be enough to demonstrate it once the driver is written properly, also rename to input_mcux_kpp

@mcuxted mcuxted closed this Jul 21, 2025
@mcuxted mcuxted reopened this Jul 21, 2025
@mcuxted
Copy link
Contributor Author

mcuxted commented Jul 21, 2025

This is not how input subsystem drivers area meant to work, they should get a list of input event codes from devicetree and emit them on their own with input_report, look at other drivers in-tree works, this needs to be reworked to function in a similar way, the sample can go, the default one should be enough to demonstrate it once the driver is written properly, also rename to input_mcux_kpp

Hi Fabio, thanks for your comment, i will modfiy the driver to adapt the input subsystem, and what is the default example for input?

Copy link

@fabiobaltieri
Copy link
Member

fabiobaltieri commented Jul 21, 2025

Hi Fabio, thanks for your comment, i will modfiy the driver to adapt the input subsystem, and what is the default example for input?

samples/subsys/input/input_dump, it's really just an empty project that enables CONFIG_INPUT_EVENT_DUMP so that every input event is printed on the console, it's really all you need to demonstrate a keypad type device

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Clock Control area: Input Input Subsystem and Drivers platform: NXP Drivers NXP Semiconductors, drivers platform: NXP NXP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants