hardware/peripherals/bc12.html · hardware/peripherals/bc12.rst 공식 원문 ↗

Zephyr 3.7.0 · Hardware · Peripherals · USB BC1.2

BC1.2 device(Experimental)

USB Power Delivery가 없을 때 charger capability를 판단하는 BC1.2 fallback을 설명합니다.

Official pathhardware/peripherals/bc12.html
Source filehardware/peripherals/bc12.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

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

Part 1

요약·해설

Portable device와 charging port role, 1.5A limit, SDP failure current 규칙을 다룹니다.

Roles

disconnected · portable · charging port

Limit

IDEV_CHG 1.5 A

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 5CD44EFF25B1908CF572B89AE0728BCD6F74985B4335E429F328A9E01D736BAD
.. _usb_bc12_api:

BC1.2 Devices (Experimental)
#######################################

The Battery Charging specification, currently at revision 1.2, is commonly
referred to as just BC1.2. BC1.2 defines limits and detection mechanisms for USB
devices to draw current exceeding the USB 2.0 specification limit of 0.5A, 2.5W.

The BC1.2 specification uses the term Charging Port for the device that supplies
VBUS on the USB connection and the term Portable Device for the device that
sinks current from the USB connection.

Note that the `BC1.2 Specification`_ uses the acronym PD for Portable Device. This
should not be confused with the USB-C Power Delivery, which also uses the
acronym PD.

On many devices, BC1.2 is the fallback mechanism to determine the connected
charger capability on USB type C ports when the attached type-C partner does not
support Power Delivery.

Key parameters from the `BC1.2 Specification`_ include:

============================================================  ========  ===========
Parameter                                                     Symbol    Range
============================================================  ========  ===========
Allowed PD (portable device) Current Draw from Charging Port  IDEV_CHG  1.5 A
Charging Downstream Port Rated Current                        ICDP      1.5 - 5.0 A
Maximum Configured Current when connected to a SDP            ICFG_MAX  500 mA
Dedicated Charging Port Rated Current                         IDCP      1.5 - 5.0 A
Suspend current                                               ISUSP     2.5 mA
Unit load current                                             IUNIT     100 mA
============================================================  ========  ===========

While the ICDP and IDCP rated currents go up to 5.0 A, the BC1.2 current is
limited by the IDEV_CHG parameter. So the BC1.2 support is capped at 1.5 A in
the Zephyr implementation when using portable-device mode.

.. _BC1.2 Specification: https://www.usb.org/document-library/battery-charging-v12-spec-and-adopters-agreement

Basic Operation
***************

The BC1.2 device driver provides only two APIs, ``bc12_set_role()`` and
``bc12_set_result_cb()``.

The application calls ``bc12_set_role()`` to transition the BC1.2 device to
either a disconnected, portable-device, or charging port mode.

For the disconnected state, the BC1.2 driver powers down the detection chip.
The power down operation is vendor specific.

The application calls ``bc12_set_role()`` with the type set to
BC12_PORTABLE_DEVICE when both the following conditions are true:

* The application configured the port as an upstream facing port, i.e. a USB
  device port.
* The application detects VBUS on the USB connection.

For portable-device mode, the BC1.2 driver powers up the detection chip and
starts charger detection. At completion of the charger detection, the BC1.2
driver notifies the callback registered with ``bc12_set_result_cb()``. By
default, the BC1.2 driver clamps the current to 1.5A to comply with the BC1.2
specification.

To comply with the USB 2.0 specification, when the driver detects a SDP
(Standard Downstream Port) charging partner or if BC1.2 detection fails, the
driver reports the available current as ISUSP (2.5 mA). The application may
increase the current draw to IUNIT (100 mA) when the connected USB host resumes
the USB bus and may increase the current draw to ICFG_MAX (500 mA) when the USB
host configures the USB device.

Charging port mode is used by the application when the USB port is configured as
a downstream facing port, i.e. a USB host port. For charging port mode, the
BC1.2 driver powers up the detection chip and configures the charger type
specified by a devicetree property. If the driver supports detection of plug and
unplug events, the BC1.2 driver notifies the callback registered with
``bc12_set_result_cb()`` to indicate the current connection state of the
portable device partner.

Configuration Options
*********************

Related configuration options:

* :kconfig:option:`CONFIG_USB_BC12`

.. _bc12_api_reference:

API Reference
*************

.. doxygengroup:: b12_interface
.. doxygengroup:: b12_emulator_backend

Part 3

한국어 전문 번역

Battery Charging specification revision 1.2는 보통 BC1.2라고 부릅니다. BC1.2는 USB device가 USB 2.0 제한인 0.5A·2.5W를 넘는 current를 끌어올 때 적용하는 limit와 detection mechanism을 정의합니다.

BC1.2 specification에서 USB connection에 VBUS를 공급하는 device는 Charging Port, connection에서 current를 소비하는 device는 Portable Device라고 합니다.

BC1.2 specification은 Portable Device를 PD로 줄여 쓰지만, 역시 PD라는 약어를 쓰는 USB-C Power Delivery와 혼동하면 안 됩니다.

USB Type-C port에 연결된 Type-C partner가 Power Delivery를 지원하지 않으면, 많은 device가 연결 charger의 capability를 판단하는 fallback mechanism으로 BC1.2를 사용합니다.

BC1.2 specification의 주요 parameter는 다음과 같습니다. 공식 원문은 USB-IF Battery Charging v1.2 specification입니다.

ParameterSymbolRange
Charging Port에서 허용되는 PD(Portable Device) current drawIDEV_CHG1.5 A
Charging Downstream Port rated currentICDP1.5 - 5.0 A
SDP 연결 시 maximum configured currentICFG_MAX500 mA
Dedicated Charging Port rated currentIDCP1.5 - 5.0 A
Suspend currentISUSP2.5 mA
Unit load currentIUNIT100 mA

ICDP와 IDCP rated current는 5.0A까지지만 실제 BC1.2 current는 IDEV_CHG parameter가 제한합니다. 따라서 Zephyr의 portable-device mode 구현은 BC1.2 지원을 1.5A로 제한합니다.

기본 동작

BC1.2 device driver가 제공하는 API는 bc12_set_role()과 bc12_set_result_cb() 두 개뿐입니다.

bc12_set_role()을 호출해 BC1.2 device를 disconnected, portable-device, charging-port mode 중 하나로 전환합니다.

Disconnected 상태에서는 BC1.2 driver가 detection chip의 power를 끕니다. Power-down operation은 vendor-specific입니다.

BC12_PORTABLE_DEVICE type으로 bc12_set_role()을 호출하려면 다음 조건이 모두 참이어야 합니다.

  • Application이 port를 upstream-facing port, 즉 USB device port로 설정했습니다.
  • Application이 USB connection에서 VBUS를 감지했습니다.

Portable-device mode에서 driver는 detection chip의 power를 켜고 charger detection을 시작합니다. Detection이 끝나면 bc12_set_result_cb()에 등록된 callback을 호출합니다. 기본적으로 BC1.2 specification에 맞춰 current를 1.5A로 제한합니다.

USB 2.0 specification을 지키기 위해 SDP(Standard Downstream Port) charger를 감지했거나 BC1.2 detection이 실패하면 available current를 ISUSP(2.5mA)로 보고합니다. 연결 USB host가 USB bus를 resume하면 application은 IUNIT(100mA)까지, host가 USB device를 configure하면 ICFG_MAX(500mA)까지 current draw를 늘릴 수 있습니다.

Charging-port mode는 USB port가 downstream-facing port, 즉 USB host port로 설정됐을 때 사용합니다. Driver는 detection chip의 power를 켜고 devicetree property가 지정한 charger type을 설정합니다. Plug/unplug event detection을 지원하면 bc12_set_result_cb() callback으로 portable-device partner의 현재 connection state를 알립니다.

설정 option

관련 설정 option은 CONFIG_USB_BC12입니다.

API reference

b12_interface와 b12_emulator_backend Doxygen group이 BC1.2 driver와 emulator backend API를 제공합니다.

Source

출처

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