summaryrefslogtreecommitdiff
path: root/components/drivers/regulator/Kconfig
blob: c6abc51b2341aef41644f75fc2fc58f6fbc3bc55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
menuconfig RT_USING_REGULATOR
    bool "Using Voltage and Current Regulator"
    select RT_USING_ADT
    select RT_USING_ADT_REF
    depends on RT_USING_DM
    default n
    help
      Enable the regulator framework so power supplies described in the device
      tree can be registered, referenced, and controlled at runtime. With this
      selected, drivers may obtain regulators via `rt_regulator_get()`, request
      enable/disable, or vote for specific voltage/current levels before their
      peripherals start. The framework depends on the driver-model and ADT
      parser because it walks the same device tree phandles. Disable it only
      when the SoC has no controllable supplies and every peripheral is powered
      permanently.

config RT_REGULATOR_FIXED
    bool "Fixed regulator support"
    depends on RT_USING_REGULATOR
    depends on RT_USING_PIN
    depends on RT_USING_PINCTRL
    default y
    help
      Provide the "fixed" regulator type in which the output voltage is defined
      entirely by the hardware (for example a PMIC LDO) and RT-Thread can only
      toggle an optional GPIO enable pin. The driver parses standard device tree
      properties such as `startup-delay-us`, `off-on-delay-us`, `enable-active-
      high`, and also applies any pinctrl state before asserting the output.
      Select this when the board DTS contains `regulator-fixed` nodes; it is
      safe to leave enabled because it only instantiates devices that the DT
      describes.

config RT_REGULATOR_GPIO
    bool "GPIO regulator support"
    depends on RT_USING_REGULATOR
    depends on RT_USING_PIN
    default y
    help
      Allow the framework to emulate simple DAC-like regulators using GPIO banks
      where each output bit selects a discrete voltage/current point. The
      driver reads the `states` table from the device tree and programs the GPIO
      pins accordingly, so peripheral drivers can call `set_voltage()` and let
      the framework choose the closest valid entry. Enable this when your board
      uses GPIO strapping to select regulator levels (common with analog muxes)
      or PMIC power modes; otherwise it adds no runtime cost.

config RT_REGULATOR_SCMI
    bool "SCMI regulator support"
    depends on RT_USING_REGULATOR
    depends on RT_USING_OFW
    depends on RT_FIRMWARE_ARM_SCMI
    default n

if RT_USING_REGULATOR
    osource "$(SOC_DM_REGULATOR_DIR)/Kconfig"
endif