← Documents Documentation/devicetree/bindings/regmap/regmap.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Devicetree regmap

Devicetree regmap의 property, cell 형식과 device-tree 예제를 설명합니다.

Source pathDocumentation/devicetree/bindings/regmap/regmap.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

regmap.txt:1-29

필수·선택 property의 의미와 원문의 실제 선언 예제를 함께 읽을 수 있습니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Devicetree binding for regmap
2
3 Optional properties:
4
5 little-endian,
6 big-endian,
7 native-endian: See common-properties.txt for a definition
8
9 Note:
10 Regmap defaults to little-endian register access on MMIO based
11 devices, this is by far the most common setting. On CPU
12 architectures that typically run big-endian operating systems
13 (e.g. PowerPC), registers can be defined as big-endian and must
14 be marked that way in the devicetree.
15
16 On SoCs that can be operated in both big-endian and little-endian
17 modes, with a single hardware switch controlling both the endianness
18 of the CPU and a byteswap for MMIO registers (e.g. many Broadcom MIPS
19 chips), "native-endian" is used to allow using the same device tree
20 blob in both cases.
21
22 Examples:
23 Scenario 1 : a register set in big-endian mode.
24 dev: dev@40031000 {
25 compatible = "syscon";
26 reg = <0x40031000 0x1000>;
27 big-endian;
28 ...
29 };
30

3. 한국어 전문 번역

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

Regmap endian property

1-8

Regmap binding의 선택 property는 `little-endian`, `big-endian`, `native-endian`입니다. 각 정의는 `common-properties.txt`를 참조합니다.

MMIO byte order 선택

9-21

MMIO 기반 device의 regmap은 가장 흔한 설정인 little-endian register access를 기본값으로 사용합니다. PowerPC처럼 보통 big-endian 운영체제를 실행하는 CPU architecture에서는 big-endian register를 device tree에 그렇게 표시해야 합니다.

CPU endianness와 MMIO register byteswap을 하나의 hardware switch로 함께 바꾸는 Broadcom MIPS 계열 같은 SoC에서는 `native-endian`을 사용합니다. 그러면 big-endian과 little-endian mode가 같은 device tree blob을 공유할 수 있습니다.

Big-endian regmap 예제

22-29

예제의 syscon register set은 `big-endian` boolean property로 access byte order를 지정합니다.

dev: dev@40031000 {
              compatible = "syscon";
              reg = <0x40031000 0x1000>;
              big-endian;
              ...
};