renesas,rx-lvd

Vendor: Renesas Electronics Corporation

Note

An implementation of a driver matching this compatible is available in drivers/comparator/comparator_renesas_rx_lvd.c.

Description

Renesas RX LVD (Low-voltage detection) Controller

The following example displays the minimum node layout:

  lvd: lvd@800e2 {
          compatible = "renesas,rx-lvd";
          reg = <0x000800e2 0x02>;
          interrupts = <89 1>;
          status = "disabled";
  };

Enabling the comparator controller node requires setting the minimum
default configuration of the comparator. This includes selecting the
positive and negative inputs.
Note: negative input of this controller is selected through specific
voltage threshold levels, and positive input can be either Vcc or CMPA pin.
If CMPA pin is selected as positive input, pinctrl must be defined to
route CMPA pin to the controller.

    &pinctrl {
              lvd1_cmpa: lvd1_cmpa {
                      group1 {
                              /* CMPA */
                              psels = <RX_PSEL(RX_PSEL_LVD, ..., ...)>;
                              renesas,analog-enable;
                              input-enable;
                      };
              };
      };

    &lvd1 {
          pinctrl-0 = <&lvd1_cmpa>;
          pinctrl-names = "default";
          lvd-action = "maskable-interrupt";
          voltage_level = <384>;
          vdet-target = "cmpa";
          lvd-trigger = "rising";
          lvd-stabilization = <0>;
          status = "okay";
    };

Properties

Properties not inherited from the base binding file.

Name

Type

Details

channel

int

This property is required.

lvd-action

string

Choose the action to be taken when the LVD is detected.

This property is required.

Legal values: 'reset', 'non-maskable-interrupt', 'maskable-interrupt', 'no-action'

lvd-support-cmpa

boolean

Specifies whether the RX LVD supports CMPA pin as target.

voltage-level

int

Specifies the voltage detection level for each channel, as an integer
value that represents the voltage in hundredths of a volt.
Example:
  - To set the voltage detection level to 3.00 V, specify '300'.
  - To set the voltage detection level to 3.84 V, specify '384'.
  - To set the voltage detection level to default value, specify '0xFFFF'
For specific voltage detection support levels of each RX MCU series,
please refer to the HWM.

This property is required.

vdet-target

string

Specifies the target to be monitored for each channel.
Not all RX LVD channels support CMPA pin as target.
Please refer to the HWM for details.

This property is required.

Legal values: 'vcc', 'cmpa'

lvd-trigger

string

Specifies the voltage detection conditions and influences interrupt conditions

This property is required.

Legal values: 'rising', 'falling', 'both'

lvd-stabilization

int

Specifies the reset negation timing for each channel, with reset selected as processing.
  - 0: After a LVD reset, negation occurs when a certain period elapses after the
    monitored voltage goes above the voltage detection level.
  - 1: Negation occurs when a certain period elapses after the LVD reset assertion.
Note: "a certain period" here means a wait time after a voltage monitoring reset.
      Refer to the User's Manual: Hardware for details.

Legal values: 0, 1

pinctrl-0

phandles

Pin control for LVD when using CMPA pin as target

pinctrl-names

string-array

Pin control names for LVD when using CMPA pin as target

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.