|
| 1 | +# Copyright (c) 2024 Arif Balik <[email protected]> |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +description: STM32 Tocuh Sensing Controller (TSC) driver |
| 5 | + |
| 6 | +compatible: "st,stm32-tsc" |
| 7 | + |
| 8 | +include: [base.yaml, pinctrl-device.yaml, reset-device.yaml] |
| 9 | + |
| 10 | +properties: |
| 11 | + reg: |
| 12 | + required: true |
| 13 | + clocks: |
| 14 | + required: true |
| 15 | + resets: |
| 16 | + required: true |
| 17 | + interrupts: |
| 18 | + required: true |
| 19 | + pinctrl-0: |
| 20 | + required: true |
| 21 | + pinctrl-names: |
| 22 | + required: true |
| 23 | + |
| 24 | + st,pulse-generator-prescaler: |
| 25 | + type: int |
| 26 | + default: 1 |
| 27 | + description: | |
| 28 | + Prescaler for the pulse generator clock (t_pgclk=f_hclk/prescaler). |
| 29 | + The prescaler is used to generate the charge transfer pulse. The final |
| 30 | + prescaled value is 2^N where N is the value of this property. |
| 31 | + enum: [0, 1, 2, 3, 4, 5, 6, 7] |
| 32 | + |
| 33 | + st,charge-transfer-pulse-high: |
| 34 | + type: int |
| 35 | + default: 2 |
| 36 | + description: | |
| 37 | + Number of cycles for the high state of the |
| 38 | + charge transfer pulse (1 to 16 cycles of t_pgclk). |
| 39 | + enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] |
| 40 | + |
| 41 | + st,charge-transfer-pulse-low: |
| 42 | + type: int |
| 43 | + default: 2 |
| 44 | + description: | |
| 45 | + Number of cycles for the low state of the |
| 46 | + charge transfer pulse (1 to 16 cycles of t_pgclk). |
| 47 | + enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] |
| 48 | + |
| 49 | + st,spread-spectrum: |
| 50 | + type: boolean |
| 51 | + description: Spread spectrum enable |
| 52 | + |
| 53 | + st,spread-spectrum-prescaler: |
| 54 | + type: int |
| 55 | + default: 1 |
| 56 | + description: Spread spectrum clock prescaler (t_ssclk) |
| 57 | + enum: |
| 58 | + - 1 |
| 59 | + - 2 |
| 60 | + |
| 61 | + st,spread-spectrum-deviation: |
| 62 | + type: int |
| 63 | + default: 1 |
| 64 | + description: Spread spectrum deviation (1 to 128 cycles of t_ssclk) |
| 65 | + |
| 66 | + st,max-count-value: |
| 67 | + type: int |
| 68 | + default: 5 |
| 69 | + description: | |
| 70 | + Max number of charge transfer pulses before max count error is generated. |
| 71 | + The value of the counter is calculated as 256 * 2^max_count_value. |
| 72 | + enum: [0, 1, 2, 3, 4, 5, 6, 7] |
| 73 | + |
| 74 | + st,synced-acquisition: |
| 75 | + type: boolean |
| 76 | + description: | |
| 77 | + Synchronized acquisition enable. |
| 78 | + Acquisition starts when START bit and signal on sync pin. |
| 79 | + You have to provide a pinctrl for the sync pin. |
| 80 | +
|
| 81 | + st,syncpol-rising: |
| 82 | + type: boolean |
| 83 | + description: Rising synchronization pin polarity, instead of falling |
| 84 | + |
| 85 | + st,iodef-float: |
| 86 | + type: boolean |
| 87 | + description: | |
| 88 | + Set default state (not acqusition) of all channel I/Os to floating. |
| 89 | + push-pull down by default. |
| 90 | +
|
| 91 | +child-binding: |
| 92 | + description: STM32 TSC group configuration |
| 93 | + properties: |
| 94 | + group: |
| 95 | + type: int |
| 96 | + required: true |
| 97 | + description: Group number (0 to 7) |
| 98 | + enum: [0, 1, 2, 3, 4, 5, 6, 7] |
| 99 | + |
| 100 | + channel-ios: |
| 101 | + type: int |
| 102 | + default: 1 |
| 103 | + description: Channel I/Os to be enabled |
| 104 | + enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] |
| 105 | + |
| 106 | + sampling-io: |
| 107 | + type: int |
| 108 | + required: true |
| 109 | + description: Channel to be selected for sampling |
| 110 | + enum: |
| 111 | + - 1 |
| 112 | + - 2 |
| 113 | + - 4 |
| 114 | + - 8 |
| 115 | + |
| 116 | + st,use-as-shield: |
| 117 | + type: boolean |
| 118 | + description: | |
| 119 | + Use channel as shield. This configures group but |
| 120 | + does not enable it for acqusition. channel-io is used |
| 121 | + as shield pin and can only have values 1, 2, 4 or 8. |
0 commit comments