요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
MediaTek UART based Bluetooth Devices
==================================
This device is a serial attached device to UART device and thus it must be a
child node of the serial node with UART.
Please refer to the following documents for generic properties:
Documentation/devicetree/bindings/serial/serial.yaml
Required properties:
- compatible: Must be
"mediatek,mt7663u-bluetooth": for MT7663U device
"mediatek,mt7668u-bluetooth": for MT7668U device
- vcc-supply: Main voltage regulator
If the pin controller on the platform can support both pinmux and GPIO
control such as the most of MediaTek platform. Please use below properties.
- pinctrl-names: Should be "default", "runtime"
- pinctrl-0: Should contain UART RXD low when the device is powered up to
enter proper bootstrap mode.
- pinctrl-1: Should contain UART mode pin ctrl
Else, the pin controller on the platform only can support pinmux control and
the GPIO control still has to rely on the dedicated GPIO controller such as
a legacy MediaTek SoC, MT7621. Please use the below properties.
- boot-gpios: GPIO same to the pin as UART RXD and used to keep LOW when
the device is powered up to enter proper bootstrap mode when
- pinctrl-names: Should be "default"
- pinctrl-0: Should contain UART mode pin ctrl
Optional properties:
- reset-gpios: GPIO used to reset the device whose initial state keeps low,
if the GPIO is missing, then board-level design should be
guaranteed.
- clocks: Should be the clock specifiers corresponding to the entry in
clock-names property. If the clock is missing, then board-level
design should be guaranteed.
- clock-names: Should contain "osc" entry for the external oscillator.
- current-speed: Current baud rate of the device whose defaults to 921600
Example:
uart1_pins_boot: uart1-default {
pins-dat {
pinmux = <MT7623_PIN_81_URXD1_FUNC_GPIO81>;
output-low;
};
};
uart1_pins_runtime: uart1-runtime {
pins-dat {
pinmux = <MT7623_PIN_81_URXD1_FUNC_URXD1>,
<MT7623_PIN_82_UTXD1_FUNC_UTXD1>;
};
};
uart1: serial@11003000 {
compatible = "mediatek,mt7623-uart",
"mediatek,mt6577-uart";
reg = <0 0x11003000 0 0x400>;
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_UART1_SEL>,
<&pericfg CLK_PERI_UART1>;
clock-names = "baud", "bus";
bluetooth {
compatible = "mediatek,mt7663u-bluetooth";
vcc-supply = <®_5v>;
reset-gpios = <&pio 24 GPIO_ACTIVE_LOW>;
pinctrl-names = "default", "runtime";
pinctrl-0 = <&uart1_pins_boot>;
pinctrl-1 = <&uart1_pins_runtime>;
current-speed = <921600>;
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
MediaTek UART 기반 Bluetooth 장치
1-10이 장치는 UART에 직렬로 연결되므로 UART를 제공하는 serial 노드의 자식 노드여야 합니다.
일반 속성은 `Documentation/devicetree/bindings/serial/serial.yaml`을 참조하십시오.
필수 속성과 부트스트랩 핀 제어
11-34필수 `compatible`은 MT7663U 장치의 `mediatek,mt7663u-bluetooth` 또는 MT7668U 장치의 `mediatek,mt7668u-bluetooth`여야 합니다. `vcc-supply`는 주 전압 레귤레이터입니다.
대부분의 MediaTek 플랫폼처럼 핀 컨트롤러가 pinmux와 GPIO 제어를 모두 지원하면 `pinctrl-names`를 `default`, `runtime`으로 지정합니다. `pinctrl-0`에는 전원 인가 시 올바른 bootstrap mode에 들어가도록 UART RXD를 낮게 유지하는 상태를, `pinctrl-1`에는 UART mode pin control을 넣습니다.
레거시 MediaTek MT7621 SoC처럼 핀 컨트롤러가 pinmux만 지원하고 GPIO 제어는 별도 GPIO 컨트롤러에 의존한다면 `boot-gpios`를 사용합니다. 이 GPIO는 UART RXD와 같은 핀이며 전원 인가 시 LOW를 유지해 올바른 bootstrap mode로 진입시킵니다. 이 경우 `pinctrl-names`는 `default`이고 `pinctrl-0`에는 UART mode pin control을 넣습니다.
전원을 켤 때 RXD를 LOW로 고정한 뒤 정상 UART 모드로 전환합니다.
선택 속성
35-45`reset-gpios`는 장치를 재설정하며 초기 상태를 LOW로 유지하는 GPIO입니다. 이 GPIO가 없다면 보드 수준 설계가 해당 동작을 보장해야 합니다.
`clocks`는 `clock-names` 항목에 대응하는 clock specifier입니다. 클록이 없으면 보드 수준 설계가 이를 보장해야 하며, `clock-names`에는 외부 oscillator를 뜻하는 `osc` 항목을 넣습니다.
`current-speed`는 장치의 현재 baud rate이며 기본값은 921600입니다.
MT7623 UART1과 MT7663U 예제
46-80예제는 부트 시 URXD1을 GPIO81 LOW로 설정하고 runtime 상태에서 URXD1/UTXD1 UART 기능으로 바꿉니다. `serial@11003000`의 자식 Bluetooth 노드에는 5V 전원, active-low reset, 두 pinctrl 상태와 921600 baud를 지정합니다.
uart1_pins_boot: uart1-default {
pins-dat {
pinmux = <MT7623_PIN_81_URXD1_FUNC_GPIO81>;
output-low;
};
};
uart1_pins_runtime: uart1-runtime {
pins-dat {
pinmux = <MT7623_PIN_81_URXD1_FUNC_URXD1>,
<MT7623_PIN_82_UTXD1_FUNC_UTXD1>;
};
};
uart1: serial@11003000 {
compatible = "mediatek,mt7623-uart",
"mediatek,mt6577-uart";
reg = <0 0x11003000 0 0x400>;
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_UART1_SEL>,
<&pericfg CLK_PERI_UART1>;
clock-names = "baud", "bus";
bluetooth {
compatible = "mediatek,mt7663u-bluetooth";
vcc-supply = <®_5v>;
reset-gpios = <&pio 24 GPIO_ACTIVE_LOW>;
pinctrl-names = "default", "runtime";
pinctrl-0 = <&uart1_pins_boot>;
pinctrl-1 = <&uart1_pins_runtime>;
current-speed = <921600>;
};
};
요약과 해설
mediatek,bluetooth.txt:1-80전원 인가 시 UART RXD를 LOW로 유지한 뒤 runtime UART 상태로 전환하는 두 하드웨어 제어 방식을 비교합니다.