microchip,ptc-scroller
Description
Microchip PTC Scroller
Microchip PTC Scroller driver.
Base binding for Microchip Peripheral Touch Controller.
This defines common properties shared across all PTC versions.
- module name="PTC"
Examples
/* Example-1 contains only the scroller node properties. */
scroller-0-params {
compatible = "microchip,ptc-scroller";
scroller-type ="SCROLLER_TYPE_SLIDER";
start-key = <2>;
number-of-keys = <3>;
position-hysteresis = <8>;
contact-min-threshold = <50>;
/* resol_deadband */
scroller-resolution = "SCR_RESOL_8_BIT";
scr-db-percent = "SCR_DB_10_PERCENT";
};
/* Example-2 contains the complete PTC node parameters
* along with the scroller node properties.
*
* Please note the compatible property prior to implementation.
*
* In this example, the "microchip,ptc-controller-g1" compatible
* property is included for reference purposes only.
* This property must match the corresponding DTS node property.
*/
&ptc {
compatible = "microchip,ptc-controller-g1",
"microchip,ptc-controller";
reg = <0x42005400 0x400>;
interrupts = <0x1e 0x3>;
interrupt-names = "ptc-eoc";
clocks = <&mclkperiph CLOCK_MCHP_MCLKPERIPH_ID_APBC_PTC>,
<&gclkperiph CLOCK_MCHP_GCLKPERIPH_ID_PTC>;
clock-names = "mclk_ptc", "gclk_ptc";
def-ptc-cal-option = "CAL_AUTO_TUNE_NONE";
def-ptc-tau-target = "CAL_CHRG_5TAU";
def-touch-measurement-period-ms = <0x14>;
def-sensor-type = <0x81>;
def-ptc-interrupt-priority = <0x3>;
def-sel-freq-init = "FREQ_SEL_0";
def-touch-det-int = <0x4>;
def-anti-tch-det-int = <0x5>;
def-anti-tch-recal-thrshld = "RECAL_100";
def-tch-drift-rate = <0x14>;
def-anti-tch-drift-rate = <0x5>;
def-drift-hold-time = <0x14>;
def-reburst-mode = "REBURST_UNRESOLVED";
def-max-on-duration = <0x0>;
def-num-channels = <0x1>;
pinctrl-0 = <&ptc_btn1_default>;
pinctrl-names = "default";
def-num-sensors = <0x1>;
num-freq-steps = <0x3>;
def-median-filter-frequencies = "FREQ_SEL_0",
"FREQ_SEL_1",
"FREQ_SEL_2";
def-freq-autotune-enable = <0x1>;
freq-autotune-max-variance = <0xa>;
freq-autotune-count-in = <0x6>;
data-streamer-port = <&sercom4>;
run-in-standby-en = <0x0>;
node_0_params:touch_node0 {
x-mask = <19>, <13>, <28>, <29>, <25>;
x-name = "DRIVEN_SHIELD",
"BUTTON_1",
"SLIDER_0",
"SLIDER_1",
"SLIDER_2";
y-mask = <14>;
y-name = "BUTTON_0";
csd = <0>;
rselect = "RSEL_VAL_0";
prescaler = "PRSC_DIV_SEL_16";
digital-gain = "GAIN_1";
analog-gain = "GAIN_1";
filter-level = "FILTER_LEVEL_16";
};
key_0_params:touch_key0 {
threshold = <50>;
hysteresis = "HYST_25";
aks-group = "NO_AKS_GROUP";
};
node_1_params:touch_node1 {
x-mask = <19>, <14>, <28>, <29>, <25>;
x-name = "DRIVEN_SHIELD",
"BUTTON_0",
"SLIDER_0",
"SLIDER_1",
"SLIDER_2";
y-mask = <13>;
y-name = "BUTTON_1";
csd = <0>;
rselect = "RSEL_VAL_0";
prescaler = "PRSC_DIV_SEL_16";
digital-gain = "GAIN_1";
analog-gain = "GAIN_1";
filter-level = "FILTER_LEVEL_16";
};
key_1_params:touch_key1 {
threshold = <50>;
hysteresis = "HYST_25";
aks-group = "NO_AKS_GROUP";
};
node_2_params:touch_node2 {
x-mask = <19>, <14>, <13>, <28>, <29>;
x-name = "DRIVEN_SHIELD",
"BUTTON_0",
"BUTTON_1",
"SLIDER_1",
"SLIDER_2";
y-mask = <25>;
y-name = "SLIDER_0";
csd = <0>;
rselect = "RSEL_VAL_0";
prescaler = "PRSC_DIV_SEL_16";
digital-gain = "GAIN_1";
analog-gain = "GAIN_1";
filter-level = "FILTER_LEVEL_16";
};
key_2_params:touch_key2 {
threshold = <50>;
hysteresis = "HYST_25";
aks-group = "NO_AKS_GROUP";
};
node_3_params:touch_node3 {
x-mask = <19>, <14>, <13>, <28>, <25>;
x-name = "DRIVEN_SHIELD",
"BUTTON_0",
"BUTTON_1",
"SLIDER_0",
"SLIDER_2";
y-mask = <29>;
y-name = "SLIDER_1";
csd = <0>;
rselect = "RSEL_VAL_0";
prescaler = "PRSC_DIV_SEL_16";
digital-gain = "GAIN_1";
analog-gain = "GAIN_1";
filter-level = "FILTER_LEVEL_16";
};
key_3_params:touch_key3 {
threshold = <50>;
hysteresis = "HYST_25";
aks-group = "NO_AKS_GROUP";
};
node_4_params:touch_node4 {
x-mask = <19>, <14>, <13>, <29>, <25>;
x-name = "DRIVEN_SHIELD",
"BUTTON_0",
"BUTTON_1",
"SLIDER_0",
"SLIDER_1";
y-mask = <28>;
y-name = "SLIDER_2";
csd = <0>;
rselect = "RSEL_VAL_0";
prescaler = "PRSC_DIV_SEL_16";
digital-gain = "GAIN_1";
analog-gain = "GAIN_1";
filter-level = "FILTER_LEVEL_16";
};
key_4_params:touch_key4 {
threshold = <50>;
hysteresis = "HYST_25";
aks-group = "NO_AKS_GROUP";
};
def-num-scrollers = <1>;
/* Slider / wheel Parameters */
scroller-0-params {
compatible = "microchip,ptc-scroller";
scroller-type ="SCROLLER_TYPE_SLIDER";
start-key = <2>;
number-of-keys = <3>;
position-hysteresis = <8>;
contact-min-threshold = <50>;
/* resol_deadband */
scroller-resolution = "SCR_RESOL_8_BIT";
scr-db-percent = "SCR_DB_10_PERCENT";
};
status = "okay";
};
/* The following pincontrol node
* is located under the pinctrl node
*/
ptc_qt7_default:ptc_qt7_default {
group1 {
pinmux = <PB7B_PTC_Y13>,
<PB8B_PTC_Y14>,
<PA11B_PTC_Y19>,
<PB12B_PTC_Y28>,
<PB13B_PTC_Y29>,
<PA21B_PTC_Y25>;
};
};
/* The following clock node
* is located under the gclkperiph node.
*/
ptc {
subsystem = <CLOCK_MCHP_GCLKPERIPH_ID_PTC>;
gclkperiph-src = "gclk0";
gclkperiph-en = <1>;
};
Properties
Properties not inherited from the base binding file.
Name |
Type |
Details |
|---|---|---|
|
|
Scroller Type
Scroller physical / layout types.
Legal values: |
|
|
Start Key
Scroller node offset as defined in the node params.
Note: Please provide only the node number, not the full node name.
example: The scroller node starts from node 2 (defined in node_2_params);
therefore, please provide the value as 2.
|
|
|
number of scroller keys
|
|
|
scroller hysteresis
|
|
|
Contact Minimum Threshold
threshold for scroller buttons
|
|
|
Scroller resolution
Legal values: |
|
|
scroller deadband percentage setting
Legal values: |
Deprecated properties not inherited from the base binding file.
(None)
Properties inherited from the base binding file, which defines common properties that may be set on many nodes. Not all of these may apply to the “microchip,ptc-scroller” compatible.
(None)