build/dts/api/bindings/regulator/zephyr,fake-regulator.html · build/dts/api/bindings/regulator/zephyr,fake-regulator.rst 공식 원문 ↗

Zephyr 3.7.0 · Devicetree · Regulator · Zephyr-specific binding

Zephyr Fake Regulator 바인딩

Test에서 voltage·current·timing·fault threshold·hardware state를 모의하는 regulator를 정의하는 44개 property schema입니다.

Official pathbuild/dts/api/bindings/regulator/zephyr,fake-regulator.html
Source filebuild/dts/api/bindings/regulator/zephyr,fake-regulator.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

공식 원문 471줄과 property 44행을 전수 대조해 arbitrary child count·voltage/current/ramp/settling policy·three-level fault thresholds·special zero/one threshold semantics·mock hardware-enabled state 제약을 보존했습니다.

Compatible

zephyr,fake-regulator

Vendor

Zephyr-specific binding

Properties

44 rows

Interface

Test mock/stub + arbitrary regulator children + full policy surface

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 1B9813C5714D5395058836B0787DA4E4560AC2C69CAE03887779078C7DDB8E38
:orphan:

.. raw:: html

    <!--
    FIXME: do not limit page width until content uses another representation
    format other than tables
    -->
    <style>.wy-nav-content { max-width: none; !important }</style>

.. dtcompatible:: zephyr,fake-regulator
.. _dtbinding_zephyr_fake_regulator:

zephyr,fake-regulator
#####################

Vendor: :ref:`Zephyr-specific binding <dt_vendor_zephyr>`

Description
***********



.. code-block:: none

   Fake regulator, to be used as a mock or stub in tests.

   An arbitrary number of children can be defined.

Properties
**********

Top level properties
====================

No top-level properties.

Child node properties
=====================

.. list-table::
   :widths: 1 1 4
   :header-rows: 1

   * - Name
     - Type
     - Details

   * - ``supply-gpios``
     - ``phandle-array``
     - .. code-block:: none

          GPIO specifier that controls power to the device.

          This property should be provided when the device has a dedicated
          switch that controls power to the device.  The supply state is
          entirely the responsibility of the device driver.

          Contrast with vin-supply.



   * - ``vin-supply``
     - ``phandle``
     - .. code-block:: none

          Reference to the regulator that controls power to the device.
          The referenced devicetree node must have a regulator compatible.

          This property should be provided when device power is supplied
          by a shared regulator.  The supply state is dependent on the
          request status of all devices fed by the regulator.

          Contrast with supply-gpios.  If both properties are provided
          then the regulator must be requested before the supply GPIOS is
          set to an active state, and the supply GPIOS must be set to an
          inactive state before releasing the regulator.



   * - ``regulator-name``
     - ``string``
     - .. code-block:: none

          A string used as a descriptive name for regulator outputs


   * - ``regulator-init-microvolt``
     - ``int``
     - .. code-block:: none

          Voltage set during initialisation


   * - ``regulator-min-microvolt``
     - ``int``
     - .. code-block:: none

          smallest voltage consumers may set


   * - ``regulator-max-microvolt``
     - ``int``
     - .. code-block:: none

          largest voltage consumers may set


   * - ``regulator-microvolt-offset``
     - ``int``
     - .. code-block:: none

          Offset applied to voltages to compensate for voltage drops


   * - ``regulator-init-microamp``
     - ``int``
     - .. code-block:: none

          Current set during initialisation


   * - ``regulator-min-microamp``
     - ``int``
     - .. code-block:: none

          smallest current consumers may set


   * - ``regulator-max-microamp``
     - ``int``
     - .. code-block:: none

          largest current consumers may set


   * - ``regulator-input-current-limit-microamp``
     - ``int``
     - .. code-block:: none

          maximum input current regulator allows


   * - ``regulator-always-on``
     - ``boolean``
     - .. code-block:: none

          boolean, regulator should never be disabled


   * - ``regulator-boot-on``
     - ``boolean``
     - .. code-block:: none

          bootloader/firmware enabled regulator.
          It's expected that this regulator was left on by the bootloader.
          If the bootloader didn't leave it on then OS should turn it on
          at boot but shouldn't prevent it from being turned off later.
          This property is intended to only be used for regulators where
          software cannot read the state of the regulator.



   * - ``regulator-boot-off``
     - ``boolean``
     - .. code-block:: none

          Regulator should be disabled on boot.



   * - ``regulator-allow-bypass``
     - ``boolean``
     - .. code-block:: none

          allow the regulator to go into bypass mode


   * - ``regulator-allow-set-load``
     - ``boolean``
     - .. code-block:: none

          allow the regulator performance level to be configured


   * - ``regulator-ramp-delay``
     - ``int``
     - .. code-block:: none

          ramp delay for regulator(in uV/us) For hardware which supports disabling
          ramp rate, it should be explicitly initialised to zero
          (regulator-ramp-delay = <0>) for disabling ramp delay.



   * - ``regulator-enable-ramp-delay``
     - ``int``
     - .. code-block:: none

          The time taken, in microseconds, for the supply rail to reach the target
          voltage, plus/minus whatever tolerance the board design requires. This
          property describes the total system ramp time required due to the
          combination of internal ramping of the regulator itself, and board design
          issues such as trace capacitance and load on the supply.



   * - ``regulator-settling-time-us``
     - ``int``
     - .. code-block:: none

          Settling time, in microseconds, for voltage change if regulator have the
          constant time for any level voltage change. This is useful when regulator
          have exponential voltage change.



   * - ``regulator-settling-time-up-us``
     - ``int``
     - .. code-block:: none

          Settling time, in microseconds, for voltage increase if the regulator
          needs a constant time to settle after voltage increases of any level. This
          is useful for regulators with exponential voltage changes.



   * - ``regulator-settling-time-down-us``
     - ``int``
     - .. code-block:: none

          Settling time, in microseconds, for voltage decrease if the regulator
          needs a constant time to settle after voltage decreases of any level. This
          is useful for regulators with exponential voltage changes.



   * - ``regulator-soft-start``
     - ``boolean``
     - .. code-block:: none

          Enable soft start so that voltage ramps slowly


   * - ``regulator-initial-mode``
     - ``int``
     - .. code-block:: none

          Initial operating mode. The set of possible operating modes depends on the
          capabilities of every hardware so each device binding documentation
          explains which values the regulator supports.



   * - ``regulator-allowed-modes``
     - ``array``
     - .. code-block:: none

          List of operating modes that software is allowed to configure for the
          regulator at run-time. Elements may be specified in any order. The set of
          possible operating modes depends on the capabilities of every hardware so
          each device binding document explains which values the regulator supports.



   * - ``regulator-system-load``
     - ``int``
     - .. code-block:: none

          Load in uA present on regulator that is not captured by any consumer
          request.



   * - ``regulator-pull-down``
     - ``boolean``
     - .. code-block:: none

          Enable pull down resistor when the regulator is disabled.


   * - ``regulator-over-current-protection``
     - ``boolean``
     - .. code-block:: none

          Enable over current protection.


   * - ``regulator-oc-protection-microamp``
     - ``int``
     - .. code-block:: none

          Set over current protection limit. This is a limit where hardware performs
          emergency shutdown. Zero can be passed to disable protection and value '1'
          indicates that protection should be enabled but limit setting can be
          omitted.



   * - ``regulator-oc-error-microamp``
     - ``int``
     - .. code-block:: none

          Set over current error limit. This is a limit where part of the hardware
          probably is malfunctional and damage prevention is requested. Zero can be
          passed to disable error detection and value '1' indicates that detection
          should be enabled but limit setting can be omitted.



   * - ``regulator-oc-warn-microamp``
     - ``int``
     - .. code-block:: none

          Set over current warning limit. This is a limit where hardware is assumed
          still to be functional but approaching limit where it gets damaged.
          Recovery actions should be initiated. Zero can be passed to disable
          detection and value '1' indicates that detection should be enabled but
          limit setting can be omitted.



   * - ``regulator-ov-protection-microvolt``
     - ``int``
     - .. code-block:: none

          Set over voltage protection limit. This is a limit where hardware performs
          emergency shutdown. Zero can be passed to disable protection and value '1'
          indicates that protection should be enabled but limit setting can be
          omitted. Limit is given as microvolt offset from voltage set to regulator.



   * - ``regulator-ov-error-microvolt``
     - ``int``
     - .. code-block:: none

          Set over voltage error limit. This is a limit where part of the hardware
          probably is malfunctional and damage prevention is requested Zero can be
          passed to disable error detection and value '1' indicates that detection
          should be enabled but limit setting can be omitted. Limit is given as
          microvolt offset from voltage set to regulator.



   * - ``regulator-ov-warn-microvolt``
     - ``int``
     - .. code-block:: none

          Set over voltage warning limit. This is a limit where hardware is assumed
          still to be functional but approaching limit where it gets damaged.
          Recovery actions should be initiated. Zero can be passed to disable
          detection and value '1' indicates that detection should be enabled but
          limit setting can be omitted. Limit is given as microvolt offset from
          voltage set to regulator.



   * - ``regulator-uv-protection-microvolt``
     - ``int``
     - .. code-block:: none

          Set over under voltage protection limit. This is a limit where hardware
          performs emergency shutdown. Zero can be passed to disable protection and
          value '1' indicates that protection should be enabled but limit setting
          can be omitted. Limit is given as microvolt offset from voltage set to
          regulator.



   * - ``regulator-uv-error-microvolt``
     - ``int``
     - .. code-block:: none

          Set under voltage error limit. This is a limit where part of the hardware
          probably is malfunctional and damage prevention is requested Zero can be
          passed to disable error detection and value '1' indicates that detection
          should be enabled but limit setting can be omitted. Limit is given as
          microvolt offset from voltage set to regulator.



   * - ``regulator-uv-warn-microvolt``
     - ``int``
     - .. code-block:: none

          Set over under voltage warning limit. This is a limit where hardware is
          assumed still to be functional but approaching limit where it gets
          damaged. Recovery actions should be initiated. Zero can be passed to
          disable detection and value '1' indicates that detection should be enabled
          but limit setting can be omitted. Limit is given as microvolt offset from
          voltage set to regulator.



   * - ``regulator-temp-protection-kelvin``
     - ``int``
     - .. code-block:: none

          Set over temperature protection limit. This is a limit where hardware
          performs emergency shutdown. Zero can be passed to disable protection and
          value '1' indicates that protection should be enabled but limit setting
          can be omitted.



   * - ``regulator-temp-error-kelvin``
     - ``int``
     - .. code-block:: none

          Set over temperature error limit. This is a limit where part of the
          hardware probably is malfunctional and damage prevention is requested Zero
          can be passed to disable error detection and value '1' indicates that
          detection should be enabled but limit setting can be omitted.



   * - ``regulator-temp-warn-kelvin``
     - ``int``
     - .. code-block:: none

          Set over temperature warning limit. This is a limit where hardware is
          assumed still to be functional but approaching limit where it gets
          damaged. Recovery actions should be initiated. Zero can be passed to
          disable detection and value '1' indicates that detection should be enabled
          but limit setting can be omitted.



   * - ``regulator-active-discharge``
     - ``int``
     - .. code-block:: none

          tristate, enable/disable active discharge of regulators. The values are:
          0: Disable active discharge.
          1: Enable active discharge.
          Absence of this property will leave configuration to default.



       Legal values: ``0``, ``1``

   * - ``regulator-max-step-microvolt``
     - ``int``
     - .. code-block:: none

          Maximum difference between current and target voltages that can be changed
          safely in a single step.



   * - ``startup-delay-us``
     - ``int``
     - .. code-block:: none

          Startup time, in microseconds


   * - ``off-on-delay-us``
     - ``int``
     - .. code-block:: none

          Off to on delay time, in microseconds


   * - ``fake-is-enabled-in-hardware``
     - ``boolean``
     - .. code-block:: none

          Sets the is_enabled flag passed to regulator_common_init.
          Allows test cases where the regulator is enabled in hardware.



Part 3

한국어 전문 번역

zephyr,fake-regulator

Vendor: Zephyr-specific binding

공식 설명

Test에서 mock 또는 stub으로 사용하는 fake regulator입니다. Child는 임의 개수로 정의할 수 있습니다.

Regulator framework의 정상·오류 경로를 모두 시험

Voltage/current 범위, ramp와 settling, bypass와 load, boot policy뿐 아니라 over-current·over-voltage·under-voltage·temperature threshold를 protection·error·warning 세 단계로 각각 설정할 수 있습니다.

Test request

Voltage · current · mode

Fake timing

Ramp · settle · startup

Fault policy

Protection · error · warning

Mock state

Enabled in hardware

Threshold 값 0은 기능 disable, 1은 기능 enable 후 구체 limit 생략이라는 sentinel입니다. Active discharge의 0/1은 단순 disable/enable이고 property 생략은 default 유지이므로 이 의미들과 섞지 않았습니다.

속성 전체 번역

Top-level property 없이 공식 child 44개 property를 모두 번역했습니다.

하위 노드 속성 · 44개

각 하위 노드에 적용되는 속성입니다.

이름형식설명과 제약
supply-gpiosphandle-arrayDevice 전원을 직접 제어하는 GPIO specifier입니다. Regulator와 함께 사용하면 regulator를 먼저 켠 뒤 GPIO를 active로 해야 합니다.
vin-supplyphandleDevice 입력 전원 regulator의 phandle입니다. supply-gpios와 함께 사용하면 GPIO를 inactive로 한 뒤 regulator를 해제합니다.
regulator-namestringRegulator output을 설명하는 이름입니다.
regulator-init-microvoltintInitialization 때 설정할 regulator voltage이며 microvolt 단위입니다.
regulator-min-microvoltintConsumer가 설정할 수 있는 최소 regulator voltage이며 microvolt 단위입니다.
regulator-max-microvoltintConsumer가 설정할 수 있는 최대 regulator voltage이며 microvolt 단위입니다.
regulator-microvolt-offsetintBoard trace와 load의 voltage drop을 보정하도록 설정 voltage에 적용할 offset입니다.
regulator-init-microampintInitialization 때 설정할 regulator current이며 microampere 단위입니다.
regulator-min-microampintConsumer가 설정할 수 있는 최소 regulator current이며 microampere 단위입니다.
regulator-max-microampintConsumer가 설정할 수 있는 최대 regulator current이며 microampere 단위입니다.
regulator-input-current-limit-microampintRegulator가 허용하는 최대 input current입니다.
regulator-always-onbooleanRegulator를 절대 비활성화하면 안 됨을 나타냅니다.
regulator-boot-onbooleanBootloader 또는 firmware가 regulator를 켜 둔 상태를 OS가 인계하도록 합니다.
regulator-boot-offbooleanBoot 때 regulator를 비활성화해야 함을 나타냅니다.
regulator-allow-bypassbooleanRegulator가 bypass mode로 들어가는 것을 허용합니다.
regulator-allow-set-loadbooleanRegulator performance level을 설정할 수 있게 합니다.
regulator-ramp-delayintVoltage ramp rate이며 µV/µs 단위입니다. Hardware가 ramp rate disable을 지원하면 0을 명시해 초기화해야 합니다.
regulator-enable-ramp-delayintRegulator 내부 ramp와 board trace capacitance·load를 합쳐 enable 후 목표 voltage에 도달하는 전체 시간이며 microsecond 단위입니다.
regulator-settling-time-usintVoltage 변화 크기와 관계없이 일정한 settling 시간이 필요한 exponential-change regulator용 값입니다.
regulator-settling-time-up-usintVoltage가 증가한 뒤 변화 크기와 관계없이 필요한 고정 settling 시간입니다.
regulator-settling-time-down-usintVoltage가 감소한 뒤 변화 크기와 관계없이 필요한 고정 settling 시간입니다.
regulator-soft-startbooleanVoltage가 천천히 상승하도록 soft-start를 활성화합니다.
regulator-initial-modeintInitialization 때 적용할 regulator operating mode입니다.
regulator-allowed-modesarraySoftware가 runtime에 설정할 수 있는 regulator operating mode 목록입니다.
regulator-system-loadintConsumer request가 포착하지 못하는 고정 load이며 microampere 단위입니다.
regulator-pull-downbooleanRegulator disable 상태에서 pull-down resistor를 활성화합니다.
regulator-over-current-protectionbooleanOver-current protection 기능을 활성화합니다.
regulator-oc-protection-microampintHardware emergency shutdown을 수행할 over-current protection limit입니다. 값 0은 해당 detection/protection을 끄고, 값 1은 기능을 켜되 구체적인 limit programming을 생략하라는 뜻입니다.
regulator-oc-error-microampintHardware 일부가 오동작해 damage prevention이 필요한 over-current error limit입니다. 값 0은 해당 detection/protection을 끄고, 값 1은 기능을 켜되 구체적인 limit programming을 생략하라는 뜻입니다.
regulator-oc-warn-microampintHardware는 동작하지만 damage limit에 접근해 recovery가 필요한 over-current warning limit입니다. 값 0은 해당 detection/protection을 끄고, 값 1은 기능을 켜되 구체적인 limit programming을 생략하라는 뜻입니다.
regulator-ov-protection-microvoltintEmergency shutdown을 수행할 over-voltage protection offset입니다. 설정 voltage 기준 microvolt offset이며 값 0은 해당 detection/protection을 끄고, 값 1은 기능을 켜되 구체적인 limit programming을 생략하라는 뜻입니다.
regulator-ov-error-microvoltintDamage prevention이 필요한 over-voltage error offset입니다. 설정 voltage 기준 microvolt offset이며 값 0은 해당 detection/protection을 끄고, 값 1은 기능을 켜되 구체적인 limit programming을 생략하라는 뜻입니다.
regulator-ov-warn-microvoltintRecovery를 시작할 over-voltage warning offset입니다. 설정 voltage 기준 microvolt offset이며 값 0은 해당 detection/protection을 끄고, 값 1은 기능을 켜되 구체적인 limit programming을 생략하라는 뜻입니다.
regulator-uv-protection-microvoltintEmergency shutdown을 수행할 under-voltage protection offset입니다. 원문 첫 문장은 "over under voltage"라고 적으며 설정 voltage 기준 microvolt offset입니다. 값 0은 해당 detection/protection을 끄고, 값 1은 기능을 켜되 구체적인 limit programming을 생략하라는 뜻입니다.
regulator-uv-error-microvoltintDamage prevention이 필요한 under-voltage error offset입니다. 설정 voltage 기준 microvolt offset이며 값 0은 해당 detection/protection을 끄고, 값 1은 기능을 켜되 구체적인 limit programming을 생략하라는 뜻입니다.
regulator-uv-warn-microvoltintRecovery를 시작할 under-voltage warning offset입니다. 원문 첫 문장은 "over under voltage"라고 적으며 설정 voltage 기준 microvolt offset입니다. 값 0은 해당 detection/protection을 끄고, 값 1은 기능을 켜되 구체적인 limit programming을 생략하라는 뜻입니다.
regulator-temp-protection-kelvinintEmergency shutdown을 수행할 over-temperature protection limit입니다. Kelvin 단위이며 값 0은 해당 detection/protection을 끄고, 값 1은 기능을 켜되 구체적인 limit programming을 생략하라는 뜻입니다.
regulator-temp-error-kelvinintDamage prevention이 필요한 over-temperature error limit입니다. Kelvin 단위이며 값 0은 해당 detection/protection을 끄고, 값 1은 기능을 켜되 구체적인 limit programming을 생략하라는 뜻입니다.
regulator-temp-warn-kelvinintRecovery를 시작할 over-temperature warning limit입니다. Kelvin 단위이며 값 0은 해당 detection/protection을 끄고, 값 1은 기능을 켜되 구체적인 limit programming을 생략하라는 뜻입니다.
regulator-active-dischargeintActive discharge를 0으로 disable하거나 1로 enable합니다. Property를 생략하면 hardware/default configuration을 유지합니다.
허용값: 0, 1
regulator-max-step-microvoltint현재 voltage에서 target voltage까지 한 번에 안전하게 바꿀 수 있는 최대 차이입니다.
startup-delay-usintRegulator startup 시간이며 microsecond 단위입니다.
off-on-delay-usintRegulator를 끈 뒤 다시 켤 때 필요한 지연이며 microsecond 단위입니다.
fake-is-enabled-in-hardwarebooleanregulator_common_init에 전달할 is_enabled flag를 설정해 hardware에서 이미 켜진 regulator test case를 만듭니다.

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.