요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Status and HCI
btmrvl.rst:72-112Status node와 raw HCI interface-control command를 정리합니다.
Firmware
btmrvl.rst:113-124SD8688 helper·main firmware image와 source를 기록합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
=============
btmrvl driver
=============
All commands are used via debugfs interface.
Set/get driver configurations
=============================
Path: /debug/btmrvl/config/
gpiogap=[n], hscfgcmd
These commands are used to configure the host sleep parameters::
bit 8:0 -- Gap
bit 16:8 -- GPIO
where GPIO is the pin number of GPIO used to wake up the host.
It could be any valid GPIO pin# (e.g. 0-7) or 0xff (SDIO interface
wakeup will be used instead).
where Gap is the gap in milli seconds between wakeup signal and
wakeup event, or 0xff for special host sleep setting.
Usage::
# Use SDIO interface to wake up the host and set GAP to 0x80:
echo 0xff80 > /debug/btmrvl/config/gpiogap
echo 1 > /debug/btmrvl/config/hscfgcmd
# Use GPIO pin #3 to wake up the host and set GAP to 0xff:
echo 0x03ff > /debug/btmrvl/config/gpiogap
echo 1 > /debug/btmrvl/config/hscfgcmd
psmode=[n], pscmd
These commands are used to enable/disable auto sleep mode
where the option is::
1 -- Enable auto sleep mode
0 -- Disable auto sleep mode
Usage::
# Enable auto sleep mode
echo 1 > /debug/btmrvl/config/psmode
echo 1 > /debug/btmrvl/config/pscmd
# Disable auto sleep mode
echo 0 > /debug/btmrvl/config/psmode
echo 1 > /debug/btmrvl/config/pscmd
hsmode=[n], hscmd
These commands are used to enable host sleep or wake up firmware
where the option is::
1 -- Enable host sleep
0 -- Wake up firmware
Usage::
# Enable host sleep
echo 1 > /debug/btmrvl/config/hsmode
echo 1 > /debug/btmrvl/config/hscmd
# Wake up firmware
echo 0 > /debug/btmrvl/config/hsmode
echo 1 > /debug/btmrvl/config/hscmd
Get driver status
=================
Path: /debug/btmrvl/status/
Usage::
cat /debug/btmrvl/status/<args>
where the args are:
curpsmode
This command displays current auto sleep status.
psstate
This command display the power save state.
hsstate
This command display the host sleep state.
txdnldrdy
This command displays the value of Tx download ready flag.
Issuing a raw hci command
=========================
Use hcitool to issue raw hci command, refer to hcitool manual
Usage::
Hcitool cmd <ogf> <ocf> [Parameters]
Interface Control Command::
hcitool cmd 0x3f 0x5b 0xf5 0x01 0x00 --Enable All interface
hcitool cmd 0x3f 0x5b 0xf5 0x01 0x01 --Enable Wlan interface
hcitool cmd 0x3f 0x5b 0xf5 0x01 0x02 --Enable BT interface
hcitool cmd 0x3f 0x5b 0xf5 0x00 0x00 --Disable All interface
hcitool cmd 0x3f 0x5b 0xf5 0x00 0x01 --Disable Wlan interface
hcitool cmd 0x3f 0x5b 0xf5 0x00 0x02 --Disable BT interface
SD8688 firmware
===============
Images:
- /lib/firmware/sd8688_helper.bin
- /lib/firmware/sd8688.bin
The images can be downloaded from:
git.infradead.org/users/dwmw2/linux-firmware.git/libertas/
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Host-sleep GPIO·gap 구성
1-33`btmrvl` driver command는 모두 debugfs interface를 사용합니다. Driver configuration path는 `/debug/btmrvl/config/`입니다. `gpiogap=[n]`에 값을 쓰고 `hscfgcmd`를 trigger해 host-sleep parameter를 설정합니다.
Host wakeup source와 timing gap을 한 값에 pack합니다.
GPIO는 host를 깨우는 GPIO pin number입니다. 유효한 pin(예: 0-7)이나 SDIO interface wakeup을 선택하는 `0xff`를 사용할 수 있습니다. Gap은 wakeup signal과 event 사이 millisecond이며 `0xff`는 special host-sleep setting입니다.
Usage::
# Use SDIO interface to wake up the host and set GAP to 0x80:
echo 0xff80 > /debug/btmrvl/config/gpiogap
echo 1 > /debug/btmrvl/config/hscfgcmd
# Use GPIO pin #3 to wake up the host and set GAP to 0xff:
echo 0x03ff > /debug/btmrvl/config/gpiogap
echo 1 > /debug/btmrvl/config/hscfgcmd
첫 예제 `0xff80`은 SDIO wakeup과 gap `0x80`을, 두 번째 `0x03ff`는 GPIO pin 3과 special gap `0xff`를 설정합니다. 값을 쓴 뒤 `hscfgcmd`에 1을 써 적용합니다.
Auto sleep와 host sleep 제어
34-71`psmode`와 `pscmd`는 auto-sleep mode를 enable 또는 disable합니다. `psmode`의 1은 enable, 0은 disable이며 값을 정한 뒤 `pscmd`에 1을 써 command를 실행합니다.
psmode=[n], pscmd
These commands are used to enable/disable auto sleep mode
where the option is::
1 -- Enable auto sleep mode
0 -- Disable auto sleep mode
Usage::
# Enable auto sleep mode
echo 1 > /debug/btmrvl/config/psmode
echo 1 > /debug/btmrvl/config/pscmd
# Disable auto sleep mode
echo 0 > /debug/btmrvl/config/psmode
echo 1 > /debug/btmrvl/config/pscmd
`hsmode`와 `hscmd`는 host sleep을 enable하거나 firmware를 깨웁니다. `hsmode`의 1은 host sleep enable, 0은 firmware wakeup이며 `hscmd`에 1을 써 적용합니다.
hsmode=[n], hscmd
These commands are used to enable host sleep or wake up firmware
where the option is::
1 -- Enable host sleep
0 -- Wake up firmware
Usage::
# Enable host sleep
echo 1 > /debug/btmrvl/config/hsmode
echo 1 > /debug/btmrvl/config/hscmd
# Wake up firmware
echo 0 > /debug/btmrvl/config/hsmode
echo 1 > /debug/btmrvl/config/hscmd
Mode node에 값을 쓴 다음 command node를 trigger합니다.
Driver status 조회
72-94Driver status path는 `/debug/btmrvl/status/`이며 `cat /debug/btmrvl/status/<args>`로 읽습니다.
Path: /debug/btmrvl/status/
Usage::
cat /debug/btmrvl/status/<args>
각 debugfs file이 표시하는 상태입니다.
Raw HCI interface control command
95-112Raw HCI command는 `hcitool`로 발행하며 자세한 형식은 hcitool manual을 참고합니다. 일반 형식은 `Hcitool cmd <ogf> <ocf> [Parameters]`입니다.
Usage::
Hcitool cmd <ogf> <ocf> [Parameters]
Interface Control Command::
hcitool cmd 0x3f 0x5b 0xf5 0x01 0x00 --Enable All interface
hcitool cmd 0x3f 0x5b 0xf5 0x01 0x01 --Enable Wlan interface
hcitool cmd 0x3f 0x5b 0xf5 0x01 0x02 --Enable BT interface
hcitool cmd 0x3f 0x5b 0xf5 0x00 0x00 --Disable All interface
hcitool cmd 0x3f 0x5b 0xf5 0x00 0x01 --Disable Wlan interface
hcitool cmd 0x3f 0x5b 0xf5 0x00 0x02 --Disable BT interface
`0x3f 0x5b 0xf5` command의 enable flag와 대상입니다.
SD8688 firmware image
113-124SD8688은 `/lib/firmware/sd8688_helper.bin`과 `/lib/firmware/sd8688.bin` image를 사용합니다. Image는 `git.infradead.org/users/dwmw2/linux-firmware.git/libertas/`에서 받을 수 있습니다.
Helper와 main image를 firmware directory에 배치합니다.
Configuration
btmrvl.rst:1-71GPIO gap, auto sleep와 host sleep을 mode/command node pair로 설정합니다.