← Documents Documentation/devicetree/bindings/clock/hisi-crg.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

HiSilicon clock and reset generator

HiSilicon CRG의 1-cell clock과 2-cell reset provider 바인딩입니다.

Source pathDocumentation/devicetree/bindings/clock/hisi-crg.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

hisi-crg.txt:1-50

Reset register offset와 bit index를 consumer에 전달하는 방식을 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 * HiSilicon Clock and Reset Generator(CRG)
2
3 The CRG module provides clock and reset signals to various
4 modules within the SoC.
5
6 This binding uses the following bindings:
7 Documentation/devicetree/bindings/clock/clock-bindings.txt
8 Documentation/devicetree/bindings/reset/reset.txt
9
10 Required Properties:
11
12 - compatible: should be one of the following.
13 - "hisilicon,hi3516cv300-crg"
14 - "hisilicon,hi3516cv300-sysctrl"
15 - "hisilicon,hi3519-crg"
16 - "hisilicon,hi3798cv200-crg"
17 - "hisilicon,hi3798cv200-sysctrl"
18
19 - reg: physical base address of the controller and length of memory mapped
20 region.
21
22 - #clock-cells: should be 1.
23
24 Each clock is assigned an identifier and client nodes use this identifier
25 to specify the clock which they consume.
26
27 All these identifier could be found in <dt-bindings/clock/hi3519-clock.h>.
28
29 - #reset-cells: should be 2.
30
31 A reset signal can be controlled by writing a bit register in the CRG module.
32 The reset specifier consists of two cells. The first cell represents the
33 register offset relative to the base address. The second cell represents the
34 bit index in the register.
35
36 Example: CRG nodes
37 CRG: clock-reset-controller@12010000 {
38 compatible = "hisilicon,hi3519-crg";
39 reg = <0x12010000 0x10000>;
40 #clock-cells = <1>;
41 #reset-cells = <2>;
42 };
43
44 Example: consumer nodes
45 i2c0: i2c@12110000 {
46 compatible = "hisilicon,hi3519-i2c";
47 reg = <0x12110000 0x1000>;
48 clocks = <&CRG HI3519_I2C0_RST>;
49 resets = <&CRG 0xe4 0>;
50 };
51

3. 한국어 전문 번역

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

HiSilicon CRG clock과 reset specifier

1-35

HiSilicon Clock and Reset Generator(CRG)

CRG module은 SoC 안의 여러 module에 clock과 reset signal을 제공합니다.

이 바인딩은 `Documentation/devicetree/bindings/clock/clock-bindings.txt`와 `Documentation/devicetree/bindings/reset/reset.txt`를 사용합니다.

필수 `compatible`은 `hisilicon,hi3516cv300-crg`, `hisilicon,hi3516cv300-sysctrl`, `hisilicon,hi3519-crg`, `hisilicon,hi3798cv200-crg`, `hisilicon,hi3798cv200-sysctrl` 중 하나입니다.

`reg`에는 controller의 physical base address와 memory-mapped region 길이를 지정합니다. `#clock-cells`는 1이어야 합니다.

각 clock identifier는 client가 소비할 clock을 지정하는 데 사용하며 `<dt-bindings/clock/hi3519-clock.h>`에 정의되어 있습니다.

`#reset-cells`는 2여야 합니다. Reset signal은 CRG module의 bit register를 써서 제어합니다. Reset specifier의 첫 번째 cell은 base address 기준 register offset, 두 번째 cell은 register 안의 bit index입니다.

HiSilicon CRG reset specifier
Reset cell 0CRG base 기준 register offset
Reset cell 1Register bit index
CRG write선택한 reset signal 제어
Consumerresets phandle로 요청

두 cell이 CRG reset bit를 선택하는 구조입니다.

Hi3519 CRG provider 예

36-43

CRG provider 예제는 0x12010000의 0x10000-byte register 영역에서 1-cell clock과 2-cell reset을 제공합니다.

CRG: clock-reset-controller@12010000 {
        compatible = "hisilicon,hi3519-crg";
        reg = <0x12010000 0x10000>;
        #clock-cells = <1>;
        #reset-cells = <2>;
};

I2C consumer 예

44-50

I2C0 consumer는 CRG clock identifier와 register offset `0xe4`, bit index 0의 reset specifier를 사용합니다.

i2c0: i2c@12110000 {
        compatible = "hisilicon,hi3519-i2c";
        reg = <0x12110000 0x1000>;
        clocks = <&CRG HI3519_I2C0_RST>;
        resets = <&CRG 0xe4 0>;
};