microchip,ac-g1-comparator

Description

Microchip G1 Analog Comparator

Binding for the Microchip Comparator driver supporting AC G1 peripherals.

Properties

Properties not inherited from the base binding file.

Name

Type

Details

comparator-channel

int

Comparator channel index (0 or 1).

This property is required.

Legal values: 0, 1

single-shot-mode

boolean

Enable single-shot mode operation. When enabled, the comparator performs a single comparison
and disables itself. This must be disabled for continuous-mode features like hysteresis.

positive-mux-input

string

Positive input source selection (MUXPOS):
  - pin0:   I/O pin 0 (0x0)
  - pin1:   I/O pin 1 (0x1)
  - pin2:   I/O pin 2 (0x2)
  - pin3:   I/O pin 3 (0x3)
  - vscale: VDDANA scaler (0x4)

Legal values: 'pin0', 'pin1', 'pin2', 'pin3', 'vscale'

negative-mux-input

string

Negative input source selection (MUXNEG):
  - pin0:    I/O pin 0 (0x0)
  - pin1:    I/O pin 1 (0x1)
  - pin2:    I/O pin 2 (0x2)
  - pin3:    I/O pin 3 (0x3)
  - gnd:     Ground (0x4)
  - vscale:  VDDANA scaler (0x5)
  - bandgap: Internal bandgap voltage (0x6)
  - dac:     DAC output (0x7)

Legal values: 'pin0', 'pin1', 'pin2', 'pin3', 'gnd', 'vscale', 'bandgap', 'dac'

vddana-scale-value

int

VSCALE = (VDDANA * (value + 1)) / 64
Only used when either positive or negative input is configured as "vscale".
Valid range: 0 to 63

output-mode

string

Comparator output routing mode:
  - off:   Output is not routed to COMPn I/O pin (0x0)
  - async: Asynchronous output is routed (0x1)
  - sync:  Synchronous filtered output is routed (0x2)

Default value: off

Legal values: 'off', 'async', 'sync'

run-standby

boolean

Keep the comparator running in standby mode (when the core is sleeping).

hysteresis-enable

boolean

Enable hysteresis on comparator output.
This is only valid when single-shot mode is disabled (i.e., in continuous mode).

hysteresis-level

string

Hysteresis voltage level to apply when hysteresis is enabled:
  - hyst50:  50 mV (0x0)
  - hyst100: 100 mV (0x1)
  - hyst150: 150 mV (0x2)

This setting is effective only if hysteresis is enabled and single-shot mode is disabled.

Default value: hyst50

Legal values: 'hyst50', 'hyst100', 'hyst150'

filter-length

string

Output filtering (debounce) mode:
  - off:   No filtering (0x0)
  - maj3:  3-bit majority filter (2 of 3) (0x1)
  - maj5:  5-bit majority filter (3 of 5) (0x2)

Default value: off

Legal values: 'off', 'maj3', 'maj5'

swap-inputs

boolean

Swap the comparator inputs and invert the output:
  - false: MUXPOS → positive input, MUXNEG → negative input
  - true:  MUXNEG → positive input, MUXPOS → negative input (output inverted)

This can be used for offset cancellation.
It must be configured before enabling the comparator.

event-input-enable

boolean

Enable the event input path for the comparator.

event-output-enable

boolean

Enable the event output path for the comparator.

pinctrl-0

phandles

Pin configuration/s for the first state. Content is specific to the
selected pin controller driver implementation.

pinctrl-1

phandles

Pin configuration/s for the second state. See pinctrl-0.

pinctrl-2

phandles

Pin configuration/s for the third state. See pinctrl-0.

pinctrl-3

phandles

Pin configuration/s for the fourth state. See pinctrl-0.

pinctrl-4

phandles

Pin configuration/s for the fifth state. See pinctrl-0.

pinctrl-names

string-array

Names for the provided states. The number of names needs to match the
number of states.