18c2ecf20Sopenharmony_ciMicrochip AT42QT1050 Five-channel Touch Sensor IC 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThe AT42QT1050 (QT1050) is a QTouchADC sensor device. The device can sense from 48c2ecf20Sopenharmony_cione to five keys, dependent on mode. The QT1050 includes all signal processing 58c2ecf20Sopenharmony_cifunctions necessary to provide stable sensing under a wide variety of changing 68c2ecf20Sopenharmony_ciconditions, and the outputs are fully debounced. 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ciThe touchkey device node should be placed inside an I2C bus node. 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciRequired properties: 118c2ecf20Sopenharmony_ci- compatible: Must be "microchip,qt1050" 128c2ecf20Sopenharmony_ci- reg: The I2C address of the device 138c2ecf20Sopenharmony_ci- interrupts: The sink for the touchpad's IRQ output, 148c2ecf20Sopenharmony_ci see ../interrupt-controller/interrupts.txt 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciOptional properties: 178c2ecf20Sopenharmony_ci- wakeup-source: touch keys can be used as a wakeup source 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ciEach button (key) is represented as a sub-node: 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ciEach not specified key or key with linux,code set to KEY_RESERVED gets disabled 228c2ecf20Sopenharmony_ciin HW. 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciSubnode properties: 258c2ecf20Sopenharmony_ci- linux,code: Keycode to emit. 268c2ecf20Sopenharmony_ci- reg: The key number. Valid values: 0, 1, 2, 3, 4. 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ciOptional subnode-properties: 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ciIf a optional property is missing or has a invalid value the default value is 318c2ecf20Sopenharmony_citaken. 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci- microchip,pre-charge-time-ns: 348c2ecf20Sopenharmony_ci Each touchpad need some time to precharge. The value depends on the mechanical 358c2ecf20Sopenharmony_ci layout. 368c2ecf20Sopenharmony_ci Valid value range: 0 - 637500; values must be a multiple of 2500; 378c2ecf20Sopenharmony_ci default is 0. 388c2ecf20Sopenharmony_ci- microchip,average-samples: 398c2ecf20Sopenharmony_ci Number of data samples which are averaged for each read. 408c2ecf20Sopenharmony_ci Valid values: 1, 4, 16, 64, 256, 1024, 4096, 16384; default is 1. 418c2ecf20Sopenharmony_ci- microchip,average-scaling: 428c2ecf20Sopenharmony_ci The scaling factor which is used to scale the average-samples. 438c2ecf20Sopenharmony_ci Valid values: 1, 2, 4, 8, 16, 32, 64, 128; default is 1. 448c2ecf20Sopenharmony_ci- microchip,threshold: 458c2ecf20Sopenharmony_ci Number of counts to register a touch detection. 468c2ecf20Sopenharmony_ci Valid value range: 0 - 255; default is 20. 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ciExample: 498c2ecf20Sopenharmony_ciQT1050 with 3 non continuous keys, key2 and key4 are disabled. 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_citouchkeys@41 { 528c2ecf20Sopenharmony_ci compatible = "microchip,qt1050"; 538c2ecf20Sopenharmony_ci reg = <0x41>; 548c2ecf20Sopenharmony_ci interrupt-parent = <&gpio0>; 558c2ecf20Sopenharmony_ci interrupts = <17 IRQ_TYPE_EDGE_FALLING>; 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci up@0 { 588c2ecf20Sopenharmony_ci reg = <0>; 598c2ecf20Sopenharmony_ci linux,code = <KEY_UP>; 608c2ecf20Sopenharmony_ci microchip,average-samples = <64>; 618c2ecf20Sopenharmony_ci microchip,average-scaling = <16>; 628c2ecf20Sopenharmony_ci microchip,pre-charge-time-ns = <10000>; 638c2ecf20Sopenharmony_ci }; 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci right@1 { 668c2ecf20Sopenharmony_ci reg = <1>; 678c2ecf20Sopenharmony_ci linux,code = <KEY_RIGHT>; 688c2ecf20Sopenharmony_ci microchip,average-samples = <64>; 698c2ecf20Sopenharmony_ci microchip,average-scaling = <8>; 708c2ecf20Sopenharmony_ci }; 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ci down@3 { 738c2ecf20Sopenharmony_ci reg = <3>; 748c2ecf20Sopenharmony_ci linux,code = <KEY_DOWN>; 758c2ecf20Sopenharmony_ci microchip,average-samples = <256>; 768c2ecf20Sopenharmony_ci microchip,average-scaling = <16>; 778c2ecf20Sopenharmony_ci }; 788c2ecf20Sopenharmony_ci}; 79