diff --git a/config/boards/shields/charybdis/charybdis_pmw3610.dtsi b/config/boards/shields/charybdis/charybdis_pmw3610.dtsi new file mode 100644 index 00000000..f7770225 --- /dev/null +++ b/config/boards/shields/charybdis/charybdis_pmw3610.dtsi @@ -0,0 +1,52 @@ +#define INPUT_EV_KEY 0x01 /**< Key event */ +#define INPUT_EV_REL 0x02 /**< Relative coordinate event */ +#define INPUT_EV_ABS 0x03 /**< Absolute coordinate event */ +#define INPUT_EV_MSC 0x04 /**< Miscellaneous event */ +#define INPUT_EV_VENDOR_START 0xf0 /**< Vendor specific event start */ +#define INPUT_EV_VENDOR_STOP 0xff /**< Vendor specific event stop */ + +#define INPUT_REL_X 0x00 /**< Relative X coordinate */ +#define INPUT_REL_Y 0x01 /**< Relative Y coordinate */ +#define INPUT_REL_WHEEL 0x08 /**< Relative wheel coordinate */ +#define INPUT_REL_HWHEEL 0x06 /**< Relative horizontal wheel coordinate */ +#define INPUT_REL_MISC 0x09 /**< Relative misc coordinate */ + +&pinctrl { + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; + + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; +}; + +&spi0 { + status = "disabled"; + compatible = "nordic,nrf-spim"; + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; + cs-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; + + trackball: trackball@0 { + status = "disabled"; + compatible = "pixart,pmw3610"; + reg = <0>; + spi-max-frequency = <2000000>; + irq-gpios = <&gpio0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + cpi = <1000>; + evt-type = ; + x-input-code = ; + y-input-code = ; + }; +};