Kconfig 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. menuconfig RT_USING_REGULATOR
  2. bool "Using Voltage and Current Regulator"
  3. select RT_USING_ADT
  4. select RT_USING_ADT_REF
  5. depends on RT_USING_DM
  6. default n
  7. help
  8. Enable the regulator framework so power supplies described in the device
  9. tree can be registered, referenced, and controlled at runtime. With this
  10. selected, drivers may obtain regulators via `rt_regulator_get()`, request
  11. enable/disable, or vote for specific voltage/current levels before their
  12. peripherals start. The framework depends on the driver-model and ADT
  13. parser because it walks the same device tree phandles. Disable it only
  14. when the SoC has no controllable supplies and every peripheral is powered
  15. permanently.
  16. config RT_REGULATOR_FIXED
  17. bool "Fixed regulator support"
  18. depends on RT_USING_REGULATOR
  19. depends on RT_USING_PIN
  20. depends on RT_USING_PINCTRL
  21. default y
  22. help
  23. Provide the "fixed" regulator type in which the output voltage is defined
  24. entirely by the hardware (for example a PMIC LDO) and RT-Thread can only
  25. toggle an optional GPIO enable pin. The driver parses standard device tree
  26. properties such as `startup-delay-us`, `off-on-delay-us`, `enable-active-
  27. high`, and also applies any pinctrl state before asserting the output.
  28. Select this when the board DTS contains `regulator-fixed` nodes; it is
  29. safe to leave enabled because it only instantiates devices that the DT
  30. describes.
  31. config RT_REGULATOR_GPIO
  32. bool "GPIO regulator support"
  33. depends on RT_USING_REGULATOR
  34. depends on RT_USING_PIN
  35. default y
  36. help
  37. Allow the framework to emulate simple DAC-like regulators using GPIO banks
  38. where each output bit selects a discrete voltage/current point. The
  39. driver reads the `states` table from the device tree and programs the GPIO
  40. pins accordingly, so peripheral drivers can call `set_voltage()` and let
  41. the framework choose the closest valid entry. Enable this when your board
  42. uses GPIO strapping to select regulator levels (common with analog muxes)
  43. or PMIC power modes; otherwise it adds no runtime cost.
  44. config RT_REGULATOR_SCMI
  45. bool "SCMI regulator support"
  46. depends on RT_USING_REGULATOR
  47. depends on RT_USING_OFW
  48. depends on RT_FIRMWARE_ARM_SCMI
  49. default n
  50. if RT_USING_REGULATOR
  51. osource "$(SOC_DM_REGULATOR_DIR)/Kconfig"
  52. endif