요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
* Generic PM domains
System on chip designs are often divided into multiple PM domains that can be
used for power gating of selected IP blocks for power saving by reduced leakage
current.
This device tree binding can be used to bind PM domain consumer devices with
their PM domains provided by PM domain providers. A PM domain provider can be
represented by any node in the device tree and can provide one or more PM
domains. A consumer node can refer to the provider by a phandle and a set of
phandle arguments (so called PM domain specifiers) of length specified by the
#power-domain-cells property in the PM domain provider node.
==PM domain providers==
See power-domain.yaml.
==PM domain consumers==
Required properties:
- power-domains : A list of PM domain specifiers, as defined by bindings of
the power controller that is the PM domain provider.
Optional properties:
- power-domain-names : A list of power domain name strings sorted in the same
order as the power-domains property. Consumers drivers will use
power-domain-names to match power domains with power-domains
specifiers.
Example:
leaky-device@12350000 {
compatible = "foo,i-leak-current";
reg = <0x12350000 0x1000>;
power-domains = <&power 0>;
power-domain-names = "io";
};
leaky-device@12351000 {
compatible = "foo,i-leak-current";
reg = <0x12351000 0x1000>;
power-domains = <&power 0>, <&power 1> ;
power-domain-names = "io", "clk";
};
The first example above defines a typical PM domain consumer device, which is
located inside a PM domain with index 0 of a power controller represented by a
node with the label "power".
In the second example the consumer device are partitioned across two PM domains,
the first with index 0 and the second with index 1, of a power controller that
is represented by a node with the label "power".
Optional properties:
- required-opps: This contains phandle to an OPP node in another device's OPP
table. It may contain an array of phandles, where each phandle points to an
OPP of a different device. It should not contain multiple phandles to the OPP
nodes in the same OPP table. This specifies the minimum required OPP of the
device(s), whose OPP's phandle is present in this property, for the
functioning of the current device at the current OPP (where this property is
present).
Example:
- OPP table for domain provider that provides two domains.
domain0_opp_table: opp-table0 {
compatible = "operating-points-v2";
domain0_opp_0: opp-1000000000 {
opp-hz = /bits/ 64 <1000000000>;
opp-microvolt = <975000 970000 985000>;
};
domain0_opp_1: opp-1100000000 {
opp-hz = /bits/ 64 <1100000000>;
opp-microvolt = <1000000 980000 1010000>;
};
};
domain1_opp_table: opp-table1 {
compatible = "operating-points-v2";
domain1_opp_0: opp-1200000000 {
opp-hz = /bits/ 64 <1200000000>;
opp-microvolt = <975000 970000 985000>;
};
domain1_opp_1: opp-1300000000 {
opp-hz = /bits/ 64 <1300000000>;
opp-microvolt = <1000000 980000 1010000>;
};
};
power: power-controller@12340000 {
compatible = "foo,power-controller";
reg = <0x12340000 0x1000>;
#power-domain-cells = <1>;
operating-points-v2 = <&domain0_opp_table>, <&domain1_opp_table>;
};
leaky-device0@12350000 {
compatible = "foo,i-leak-current";
reg = <0x12350000 0x1000>;
power-domains = <&power 0>;
required-opps = <&domain0_opp_0>;
};
leaky-device1@12350000 {
compatible = "foo,i-leak-current";
reg = <0x12350000 0x1000>;
power-domains = <&power 1>;
required-opps = <&domain1_opp_1>;
};
[1]. Documentation/devicetree/bindings/power/domain-idle-state.yaml
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Generic PM domain과 provider
1-16SoC 설계는 흔히 여러 PM domain으로 나뉩니다. 선택한 IP block의 전원을 gating해 leakage current를 줄이고 전력을 절약할 수 있습니다.
이 Device Tree binding은 PM-domain consumer device를 provider가 제공하는 PM domain에 연결합니다. Provider는 Device Tree의 어느 node로도 표현할 수 있고 하나 이상의 PM domain을 제공할 수 있습니다.
Consumer node는 phandle과 PM domain specifier라고 부르는 phandle argument 집합으로 provider를 참조합니다. Specifier 길이는 provider node의 `#power-domain-cells`가 정합니다. PM-domain provider binding은 `power-domain.yaml`을 참조합니다.
PM-domain consumer 속성
17-29Consumer의 필수 `power-domains`는 PM-domain specifier 목록이며, provider인 power controller의 binding이 각 specifier를 정의합니다.
선택적 `power-domain-names`는 `power-domains`와 같은 순서로 정렬한 domain 이름 string 목록입니다. Consumer driver는 이 이름을 사용해 domain과 `power-domains` specifier를 대응시킵니다.
단일·복수 domain consumer 예제
30-51첫 device는 label이 `power`인 controller의 index 0 PM domain 안에 있는 전형적인 consumer이며 이름은 `io`입니다. 두 번째 device는 같은 controller의 index 0과 1, 두 PM domain에 걸쳐 있고 이름은 각각 `io`, `clk`입니다.
leaky-device@12350000 {
compatible = "foo,i-leak-current";
reg = <0x12350000 0x1000>;
power-domains = <&power 0>;
power-domain-names = "io";
};
leaky-device@12351000 {
compatible = "foo,i-leak-current";
reg = <0x12351000 0x1000>;
power-domains = <&power 0>, <&power 1> ;
power-domain-names = "io", "clk";
};
다른 device에 요구하는 최소 OPP
52-61선택적 `required-opps`는 다른 device의 OPP table에 있는 OPP node의 phandle을 담습니다. 서로 다른 device의 OPP를 가리키는 phandle 배열일 수 있지만, 같은 OPP table의 node를 가리키는 phandle을 여러 개 담아서는 안 됩니다.
이 property는 현재 device가 현재 OPP에서 동작하기 위해, property에 phandle이 들어 있는 다른 device들이 최소한 어떤 OPP를 가져야 하는지 지정합니다.
두 domain provider와 required OPP 예제
62-112예제는 domain0과 domain1용 OPP table을 각각 두 단계로 정의합니다. Power controller는 `#power-domain-cells = <1>`과 `operating-points-v2` 배열로 두 domain을 제공합니다.
Domain index 0의 consumer는 `domain0_opp_0`을, index 1의 consumer는 `domain1_opp_1`을 최소 required OPP로 참조합니다.
domain0_opp_table: opp-table0 {
compatible = "operating-points-v2";
domain0_opp_0: opp-1000000000 {
opp-hz = /bits/ 64 <1000000000>;
opp-microvolt = <975000 970000 985000>;
};
domain0_opp_1: opp-1100000000 {
opp-hz = /bits/ 64 <1100000000>;
opp-microvolt = <1000000 980000 1010000>;
};
};
domain1_opp_table: opp-table1 {
compatible = "operating-points-v2";
domain1_opp_0: opp-1200000000 {
opp-hz = /bits/ 64 <1200000000>;
opp-microvolt = <975000 970000 985000>;
};
domain1_opp_1: opp-1300000000 {
opp-hz = /bits/ 64 <1300000000>;
opp-microvolt = <1000000 980000 1010000>;
};
};
power: power-controller@12340000 {
compatible = "foo,power-controller";
reg = <0x12340000 0x1000>;
#power-domain-cells = <1>;
operating-points-v2 = <&domain0_opp_table>, <&domain1_opp_table>;
};
leaky-device0@12350000 {
compatible = "foo,i-leak-current";
reg = <0x12350000 0x1000>;
power-domains = <&power 0>;
required-opps = <&domain0_opp_0>;
};
leaky-device1@12350000 {
compatible = "foo,i-leak-current";
reg = <0x12350000 0x1000>;
power-domains = <&power 1>;
required-opps = <&domain1_opp_1>;
};
원문의 참고문헌 `[1]`은 `Documentation/devicetree/bindings/power/domain-idle-state.yaml`을 가리킵니다.
요약과 해설
power_domain.txt:1-112단일·복수 domain 연결과 두 OPP table에 대한 최소 required OPP 예제를 해설합니다.