요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Multi-Function Devices (MFD)
These devices comprise a nexus for heterogeneous hardware blocks containing
more than one non-unique yet varying hardware functionality.
A typical MFD can be:
- A mixed signal ASIC on an external bus, sometimes a PMIC (Power Management
Integrated Circuit) that is manufactured in a lower technology node (rough
silicon) that handles analog drivers for things like audio amplifiers, LED
drivers, level shifters, PHY (physical interfaces to things like USB or
ethernet), regulators etc.
- A range of memory registers containing "miscellaneous system registers" also
known as a system controller "syscon" or any other memory range containing a
mix of unrelated hardware devices.
Optional properties:
- compatible : "simple-mfd" - this signifies that the operating system
should consider all subnodes of the MFD device as separate and independent
devices, so not needing any resources to be provided by the parent device.
Similarly to how "simple-bus" indicates when to see subnodes as children for
a simple memory-mapped bus.
For more complex devices, when the nexus driver has to probe registers to
figure out what child devices exist etc, this should not be used. In the
latter case the child devices will be determined by the operating system.
- ranges: Describes the address mapping relationship to the parent. Should set
the child's base address to 0, the physical address within parent's address
space, and the length of the address map.
- #address-cells: Specifies the number of cells used to represent physical base
addresses. Must be present if ranges is used.
- #size-cells: Specifies the number of cells used to represent the size of an
address. Must be present if ranges is used.
Example:
foo@1000 {
compatible = "syscon", "simple-mfd";
reg = <0x01000 0x1000>;
compatible = "register-bit-led";
offset = <0x08>;
mask = <0x01>;
label = "myled";
default-state = "on";
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Multi-Function Device 개념
1-5MFD는 하나보다 많은, 서로 동일하지 않고 다양한 하드웨어 기능 블록을 묶는 nexus 장치입니다.
상위 register 또는 외부 bus 장치 아래에 서로 독립적인 기능 자식을 배치합니다.
대표 MFD 형태
6-17전형적인 MFD는 외부 bus의 mixed-signal ASIC일 수 있습니다. 때로는 더 낮은 공정 node의 거친 silicon으로 만든 PMIC가 audio amplifier, LED driver, level shifter, USB/Ethernet PHY, regulator 같은 analog driver를 담당합니다.
또는 `miscellaneous system registers`를 담은 memory register 범위, 즉 system controller `syscon`이나 서로 무관한 여러 hardware device가 섞인 다른 memory range일 수 있습니다.
simple-mfd 사용 조건
18-28선택적인 `compatible = "simple-mfd"`는 운영체제가 상위 장치에서 resource를 제공받을 필요 없이 모든 subnode를 별도의 독립 장치로 취급해야 함을 나타냅니다. 단순 memory-mapped bus에서 `simple-bus`가 자식 인식을 지시하는 것과 비슷합니다.
nexus driver가 register를 probe해 어떤 child가 존재하는지 판단해야 하는 복잡한 장치에는 `simple-mfd`를 사용하면 안 됩니다. 이런 경우 child 장치는 운영체제가 결정합니다.
자식 주소 매핑
29-38`ranges`는 상위 주소 공간과의 매핑 관계를 설명하며 자식 기준 주소 0, 상위 공간의 물리 주소, mapping 길이를 설정합니다. `ranges`를 쓰면 물리 기준 주소의 cell 수를 정하는 `#address-cells`와 크기 cell 수를 정하는 `#size-cells`가 반드시 있어야 합니다.
syscon simple-mfd LED 예제
39-52예제는 `0x1000`의 4KiB register 범위를 `syscon`, `simple-mfd`로 선언합니다. 자식 `register-bit-led`는 offset 8의 mask 1 bit를 `myled`로 이름 붙이고 기본 상태를 on으로 설정합니다.
foo@1000 {
compatible = "syscon", "simple-mfd";
reg = <0x01000 0x1000>;
[email protected] {
compatible = "register-bit-led";
offset = <0x08>;
mask = <0x01>;
label = "myled";
default-state = "on";
};
};
요약과 해설
mfd.txt:1-52Mixed-signal PMIC·syscon 유형과 register-bit LED 예제를 설명합니다.