wch,ch5xx-comparator

Description

CH5xx Comparator

Binding for the WCH CH5xx Comparator driver.

Examples

&pinctrl {
  cmp0_pins: cmp0_pins {
    group {
      pinmux = <CMP_P_PA2_0 CMP_N_PA3_0>;
      /* It's recommended on CH57x to disable digital input
       * This configures the pin as analog input only */
      input-disable;
    };
  };
};

&cmp0 {
  compatible = "wch,ch5xx-comparator";
  status = "okay";
  pinctrl-0 = <&cmp0_pins>;
  pinctrl-names = "default";
  nref-voltage = <500>;
};

Properties

Properties not inherited from the base binding file.

Name

Type

Details

nref-voltage

int

The negative input reference voltage in mV

Default value: 50

Legal values: 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800

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.