← Documents Documentation/w1/masters/omap-hdq.rst GitHub 원문 ↗

Linux 6.18.37 · 1-Wire / Master

Kernel driver for OMAP HDQ/1-Wire

OMAP2430/3430 controller의 HDQ·1-Wire mode, ID와 DT 선택을 설명합니다.

Source pathDocumentation/w1/masters/omap-hdq.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

omap-hdq.rst:1-54

OMAP2430/3430 controller의 HDQ·1-Wire mode, ID와 DT 선택을 설명합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 ========================================
2 Kernel driver for omap HDQ/1-wire module
3 ========================================
4
5 Supported chips:
6 ================
7 HDQ/1-wire controller on the TI OMAP 2430/3430 platforms.
8
9 A useful link about HDQ basics:
10 ===============================
11 http://focus.ti.com/lit/an/slua408a/slua408a.pdf
12
13 Description:
14 ============
15 The HDQ/1-Wire module of TI OMAP2430/3430 platforms implement the hardware
16 protocol of the master functions of the Benchmark HDQ and the Dallas
17 Semiconductor 1-Wire protocols. These protocols use a single wire for
18 communication between the master (HDQ/1-Wire controller) and the slave
19 (HDQ/1-Wire external compliant device).
20
21 A typical application of the HDQ/1-Wire module is the communication with battery
22 monitor (gas gauge) integrated circuits.
23
24 The controller supports operation in both HDQ and 1-wire mode. The essential
25 difference between the HDQ and 1-wire mode is how the slave device responds to
26 initialization pulse.In HDQ mode, the firmware does not require the host to
27 create an initialization pulse to the slave.However, the slave can be reset by
28 using an initialization pulse (also referred to as a break pulse).The slave
29 does not respond with a presence pulse as it does in the 1-Wire protocol.
30
31 Remarks:
32 ========
33 The driver (drivers/w1/masters/omap_hdq.c) supports the HDQ mode of the
34 controller. In this mode, as we can not read the ID which obeys the W1
35 spec(family:id:crc), a module parameter can be passed to the driver which will
36 be used to calculate the CRC and pass back an appropriate slave ID to the W1
37 core.
38
39 By default the master driver and the BQ slave i/f
40 driver(drivers/w1/slaves/w1_bq27000.c) sets the ID to 1.
41 Please note to load both the modules with a different ID if required, but note
42 that the ID used should be same for both master and slave driver loading.
43
44 e.g::
45
46 insmod omap_hdq.ko W1_ID=2
47 insmod w1_bq27000.ko F_ID=2
48
49 The driver also supports 1-wire mode. In this mode, there is no need to
50 pass slave ID as parameter. The driver will auto-detect slaves connected
51 to the bus using SEARCH_ROM procedure. 1-wire mode can be selected by
52 setting "ti,mode" property to "1w" in DT (see
53 Documentation/devicetree/bindings/w1/omap-hdq.txt for more details).
54 By default driver is in HDQ mode.
55

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

지원 controller와 protocol

1-28

이 driver는 TI OMAP 2430/3430 platform의 HDQ/1-Wire controller를 지원합니다.

OMAP HDQ/1-Wire module은 Benchmark HDQ와 Dallas Semiconductor 1-Wire protocol의 master function을 hardware로 구현합니다.

두 protocol은 master controller와 external compliant slave 사이 통신에 single wire를 사용하며, 대표 용도는 battery monitor 또는 gas gauge integrated circuit 통신입니다.

Controller는 HDQ와 1-Wire mode를 모두 지원합니다. 핵심 차이는 slave가 initialization pulse에 응답하는 방식입니다.

HDQ mode에서는 firmware가 host에 initialization pulse 생성을 요구하지 않습니다. Break pulse로 slave를 reset할 수 있지만 1-Wire protocol처럼 presence pulse를 반환하지 않습니다.

HDQ와 1-Wire
항목HDQ1-Wire
WireSingle wireSingle wire
Initialization pulseHost가 필수로 만들지 않음Bus 초기화에 사용
ResetBreak pulse 가능Reset pulse
Presence response없음Presence pulse
대표 slaveBattery gas gauge1-Wire family device

초기화·presence 동작 차이입니다.

OMAP single-wire path
TI OMAP HDQ/1-Wire controllerHDQ 또는 1-Wire mode 선택Single physical wireBattery monitor 등 external slave

Controller가 external slave와 통신합니다.

========================================
Kernel driver for omap HDQ/1-wire module
========================================

Supported chips:
================
HDQ/1-wire controller on the TI OMAP 2430/3430 platforms.

A useful link about HDQ basics:
===============================
http://focus.ti.com/lit/an/slua408a/slua408a.pdf

Description:
============
The HDQ/1-Wire module of TI OMAP2430/3430 platforms implement the hardware
protocol of the master functions of the Benchmark HDQ and the Dallas
Semiconductor 1-Wire protocols. These protocols use a single wire for
communication between the master (HDQ/1-Wire controller) and the slave
(HDQ/1-Wire external compliant device).

A typical application of the HDQ/1-Wire module is the communication with battery
monitor (gas gauge) integrated circuits.

The controller supports operation in both HDQ and 1-wire mode. The essential
difference between the HDQ and 1-wire mode is how the slave device responds to
initialization pulse.In HDQ mode, the firmware does not require the host to
create an initialization pulse to the slave.However, the slave can be reset by
using an initialization pulse (also referred to as a break pulse).The slave

HDQ mode의 synthetic W1 ID

29-45

`drivers/w1/masters/omap_hdq.c`는 controller의 HDQ mode를 지원합니다.

HDQ mode에서는 W1의 `family:id:crc` 형식을 따르는 ID를 읽을 수 없으므로 module parameter를 받아 CRC를 계산하고 W1 core에 적절한 slave ID를 반환합니다.

기본적으로 master driver와 `drivers/w1/slaves/w1_bq27000.c` BQ slave interface는 ID 1을 사용합니다.

다른 ID가 필요하면 `insmod omap_hdq.ko W1_ID=2`와 `insmod w1_bq27000.ko F_ID=2`처럼 두 module에 같은 ID를 전달해야 합니다.

HDQ ID parameter
ModuleParameter기본
omap_hdq.koW1_ID1W1_ID=2
w1_bq27000.koF_ID1F_ID=2

Master와 slave driver의 ID가 일치해야 합니다.

does not respond with a presence pulse as it does in the 1-Wire protocol.

Remarks:
========
The driver (drivers/w1/masters/omap_hdq.c) supports the HDQ mode of the
controller. In this mode, as we can not read the ID which obeys the W1
spec(family:id:crc), a module parameter can be passed to the driver which will
be used to calculate the CRC and pass back an appropriate slave ID to the W1
core.

By default the master driver and the BQ slave i/f
driver(drivers/w1/slaves/w1_bq27000.c) sets the ID to 1.
Please note to load both the modules with a different ID if required, but note
that the ID used should be same for both master and slave driver loading.

e.g::

1-Wire mode와 DT 선택

46-54

Driver는 1-Wire mode도 지원하며 이 mode에서는 slave ID parameter가 필요하지 않습니다.

SEARCH_ROM procedure로 bus에 연결된 slave를 자동 detect합니다.

Device tree의 `ti,mode` property를 `1w`로 설정하면 1-Wire mode를 선택합니다. 기본 mode는 HDQ입니다.

OMAP mode 선택
ModeDTSlave IDDiscovery
HDQ기본W1_ID/F_ID parameterSynthetic ID
1-Wireti,mode="1w"불필요SEARCH_ROM

ID 처리와 slave discovery 차이입니다.

  insmod omap_hdq.ko W1_ID=2
  insmod w1_bq27000.ko F_ID=2

The driver also supports 1-wire mode. In this mode, there is no need to
pass slave ID as parameter. The driver will auto-detect slaves connected
to the bus using SEARCH_ROM procedure. 1-wire mode can be selected by
setting "ti,mode" property to "1w" in DT (see
Documentation/devicetree/bindings/w1/omap-hdq.txt for more details).
By default driver is in HDQ mode.