Skip to content
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
2 changes: 2 additions & 0 deletions app/boards/shields/iqs5xx_dev/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config ZMK_KEYBOARD_NAME
default "IQS5xx Dev Kit"
Empty file.
23 changes: 23 additions & 0 deletions app/boards/shields/iqs5xx_dev/iqs5xx_dev.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
CONFIG_LOG=n
CONFIG_ZMK_USB_LOGGING=n
CONFIG_ZMK_RTT_LOGGING=n
# CONFIG_ZMK_LOG_LEVEL_DBG=y
CONFIG_ZMK_BLE_PASSKEY_ENTRY=n

CONFIG_ZMK_BLE=y
CONFIG_ZMK_USB=y
CONFIG_ZMK_SETTINGS_RESET_ON_START=y
CONFIG_MAIN_STACK_SIZE=8192
CONFIG_ZMK_BLE_KEYBOARD_REPORT_QUEUE_SIZE=50
CONFIG_ZMK_BLE_THREAD_STACK_SIZE=4096

# Might not be needed.
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y

CONFIG_I2C=y
CONFIG_GPIO=y
CONFIG_PINCTRL=y
CONFIG_ZMK_MOUSE=y
CONFIG_ZMK_POINTING=y
CONFIG_INPUT=y
CONFIG_INPUT_AZOTEQ_IQS5XX=y
18 changes: 18 additions & 0 deletions app/boards/shields/iqs5xx_dev/iqs5xx_dev.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>

/ {
keymap {
compatible = "zmk,keymap";

default_layer {
bindings = < &kp SPACE >;
};
};
};
58 changes: 58 additions & 0 deletions app/boards/shields/iqs5xx_dev/iqs5xx_dev.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#include <dt-bindings/zmk/matrix_transform.h>

/ {
chosen {
zmk,kscan = &kscan_direct;
zmk,matrix-transform = &default_transform;
};
kscan_direct: kscan_direct {
compatible = "zmk,kscan-gpio-direct";
wakeup-source;

input-gpios
= <&gpio1 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;

};

default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <1>;
rows = <1>;
map = < RC(0,0) >;
};

tps43_input: tps43_input {
compatible = "zmk,input-listener";
device = <&tps43>;
};
};

/*
* SDA: P0.26
* SCL: P0.27
*/
&arduino_i2c {
status = "okay";
tps43: iqs5xx@74 {
status = "okay";
compatible = "azoteq,iqs5xx";
reg = <0x74>;

one-finger-tap;
press-and-hold;
press-and-hold-time = <250>;
two-finger-tap;

scroll;
natural-scroll-y;
natural-scroll-x;

bottom-beta = <5>;
stationary-threshold = <5>;

switch-xy;

reset-gpios = <&arduino_header 14 GPIO_ACTIVE_LOW>; /* P1.10 */
rdy-gpios = <&arduino_header 15 GPIO_ACTIVE_HIGH>; /* P1.11 */
};
};
63 changes: 63 additions & 0 deletions app/dts/bindings/input/azoteq,iqs5xx-common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
properties:
rdy-gpios:
type: phandle-array
description: "Data Ready pin for the Azoteq IQS5xx trackpad"

reset-gpios:
type: phandle-array
description: "Reset pin for the Azoteq IQS5xx trackpad"

one-finger-tap:
type: boolean
description: "Register single finger tap gestures and report them as a left click"

press-and-hold:
type: boolean
description: "Register press and hold gestures and report them as a left click until released"

press-and-hold-time:
type: int
description: "Time in ms (in addition to the tap time) it takes to register a press and hold gesture"
default: 250

two-finger-tap:
type: boolean
description: "Register two finger tap gestures and report them as a right click"

scroll:
type: boolean
description: "Register and report scroll gestures, both vertical and horizontal scroll is supported"

natural-scroll-x:
type: boolean
description: "Whether content should track finger movement when scrolling on the x axis."

natural-scroll-y:
type: boolean
description: "Whether content should track finger movement when scrolling on the y axis."

switch-xy:
type: boolean
description: "Flip x and y axes"

flip-x:
type: boolean
description: "Invert the direction of the x axis"

flip-y:
type: boolean
description: "Invert the direction of the y axis"

bottom-beta:
type: int
description: |
Amount of filtering applied at slow speeds.
0: Most filtering, smoother, but laggier.
255: Least filtering, least smooth, more responsive.
default: 5

stationary-threshold:
type: int
description: |
How far a finger must move (in pixels) to not be considered stationary.
default: 5
6 changes: 6 additions & 0 deletions app/dts/bindings/input/azoteq,iqs5xx-i2c.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: |
Sensor driver for the Azoteq IQS5XX trackpad, using the I2C interface

compatible: "azoteq,iqs5xx"

include: ["i2c-device.yaml", "azoteq,iqs5xx-common.yaml"]
3 changes: 2 additions & 1 deletion app/dts/bindings/vendor-prefixes.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
zmk ZMK Project
moergo MoErgo
moergo MoErgo
azoteq Azoteq (Pty) Ltd.
2 changes: 2 additions & 0 deletions app/module/drivers/input/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@

zephyr_library_amend()

zephyr_library_sources_ifdef(CONFIG_INPUT_AZOTEQ_IQS5XX iqs5xx.c)

zephyr_library_sources_ifdef(CONFIG_ZMK_INPUT_MOCK input_mock.c)
30 changes: 30 additions & 0 deletions app/module/drivers/input/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@

if INPUT

menuconfig INPUT_AZOTEQ_IQS5XX
bool "Azoteq IQS5xx trackpads"
default y
depends on GPIO
depends on I2C
depends on INPUT
depends on DT_HAS_AZOTEQ_IQS5XX_ENABLED
help
Enable driver for Azoteq IQS5xx trackpads.

if INPUT_AZOTEQ_IQS5XX

config INPUT_AZOTEQ_IQS5XX_INIT_PRIORITY
int "Azoteq IQS5xx initialization priority"
default INPUT_INIT_PRIORITY
help
Driver initialization priority for the IQS5xx driver.
Lower values initialize earlier.

# if ZMK_MOUSE
# config ZMK_INPUT_AZOTEQ_IQS5XX_IDLE_SLEEPER
# bool "IQS5xx Sleep linked to ZMK idle state"
# default n
# help
# If enabled, the driver will suspend/resume the IQS5xx based on
# ZMK's activity state changes (e.g. powering down when idle).
# endif # ZMK_MOUSE

endif # INPUT_AZOTEQ_IQS5XX

config ZMK_INPUT_MOCK
bool "Input Mock"
default y
Expand Down
Loading
Loading