← Documents Documentation/devicetree/bindings/phy/phy-miphy365x.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

STMicroelectronics STi MiPHY365x

SATA·PCIe mode를 제공하는 STi MiPHY365x 바인딩입니다.

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

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

1. 요약·해설

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

요약과 해설

phy-miphy365x.txt:1-77

포트별 sysconfig offset과 SATA generation·TX polarity 설정을 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 STMicroelectronics STi MIPHY365x PHY binding
2 ============================================
3
4 This binding describes a miphy device that is used to control PHY hardware
5 for SATA and PCIe.
6
7 Required properties (controller (parent) node):
8 - compatible : Should be "st,miphy365x-phy"
9 - st,syscfg : Phandle / integer array property. Phandle of sysconfig group
10 containing the miphy registers and integer array should contain
11 an entry for each port sub-node, specifying the control
12 register offset inside the sysconfig group.
13
14 Required nodes : A sub-node is required for each channel the controller
15 provides. Address range information including the usual
16 'reg' and 'reg-names' properties are used inside these
17 nodes to describe the controller's topology. These nodes
18 are translated by the driver's .xlate() function.
19
20 Required properties (port (child) node):
21 - #phy-cells : Should be 1 (See second example)
22 Cell after port phandle is device type from:
23 - PHY_TYPE_SATA
24 - PHY_TYPE_PCI
25 - reg : Address and length of register sets for each device in
26 "reg-names"
27 - reg-names : The names of the register addresses corresponding to the
28 registers filled in "reg":
29 - sata: For SATA devices
30 - pcie: For PCIe devices
31
32 Optional properties (port (child) node):
33 - st,sata-gen : Generation of locally attached SATA IP. Expected values
34 are {1,2,3). If not supplied generation 1 hardware will
35 be expected
36 - st,pcie-tx-pol-inv : Bool property to invert the polarity PCIe Tx (Txn/Txp)
37 - st,sata-tx-pol-inv : Bool property to invert the polarity SATA Tx (Txn/Txp)
38
39 Example:
40
41 miphy365x_phy: miphy365x@fe382000 {
42 compatible = "st,miphy365x-phy";
43 st,syscfg = <&syscfg_rear 0x824 0x828>;
44 #address-cells = <1>;
45 #size-cells = <1>;
46 ranges;
47
48 phy_port0: port@fe382000 {
49 reg = <0xfe382000 0x100>, <0xfe394000 0x100>;
50 reg-names = "sata", "pcie";
51 #phy-cells = <1>;
52 st,sata-gen = <3>;
53 };
54
55 phy_port1: port@fe38a000 {
56 reg = <0xfe38a000 0x100>, <0xfe804000 0x100>;;
57 reg-names = "sata", "pcie", "syscfg";
58 #phy-cells = <1>;
59 st,pcie-tx-pol-inv;
60 };
61 };
62
63 Specifying phy control of devices
64 =================================
65
66 Device nodes should specify the configuration required in their "phys"
67 property, containing a phandle to the phy port node and a device type.
68
69 Example:
70
71 #include <dt-bindings/phy/phy.h>
72
73 sata0: sata@fe380000 {
74 ...
75 phys = <&phy_port0 PHY_TYPE_SATA>;
76 ...
77 };
78

3. 한국어 전문 번역

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

STi MiPHY365x 컨트롤러

1-19

이 바인딩은 SATA와 PCIe PHY 하드웨어를 제어하는 STMicroelectronics STi MiPHY365x 장치를 설명합니다.

상위 컨트롤러 노드의 `compatible`은 `st,miphy365x-phy`여야 합니다. `st,syscfg`는 sysconfig group phandle과 integer 배열이며, 배열에는 각 포트 하위 노드마다 sysconfig group 내부 control register offset 하나가 있어야 합니다.

컨트롤러가 제공하는 각 channel마다 하위 노드가 필요합니다. `reg`와 `reg-names`를 포함한 주소 범위 정보가 컨트롤러 topology를 설명하며 드라이버의 `.xlate()` 함수가 이를 변환합니다.

MiPHY365x 포트 필수 속성

20-31

포트의 `#phy-cells`는 1이어야 하며 포트 phandle 뒤의 cell은 `PHY_TYPE_SATA` 또는 `PHY_TYPE_PCI`인 장치 유형입니다.

`reg`는 `reg-names`에 나열된 각 장치 register set의 주소와 길이입니다. `reg-names`의 `sata`는 SATA 장치, `pcie`는 PCIe 장치용 영역입니다.

MiPHY365x 포트 선택 속성

32-38

`st,sata-gen`은 로컬로 연결된 SATA IP의 세대이며 허용 값은 1, 2, 3입니다. 생략하면 1세대 하드웨어로 간주합니다.

`st,pcie-tx-pol-inv`는 PCIe TX의 Txn/Txp polarity를 반전하고, `st,sata-tx-pol-inv`는 SATA TX의 Txn/Txp polarity를 반전하는 boolean 속성입니다.

MiPHY365x provider 예제

39-62

예제 provider는 두 포트의 control register offset을 `st,syscfg`에 전달합니다. 포트 0은 SATA 3세대를 선택하고, 포트 1은 PCIe TX polarity 반전을 활성화합니다.

miphy365x_phy: miphy365x@fe382000 {
        compatible      = "st,miphy365x-phy";
        st,syscfg          = <&syscfg_rear 0x824 0x828>;
        #address-cells        = <1>;
        #size-cells        = <1>;
        ranges;

        phy_port0: port@fe382000 {
                reg = <0xfe382000 0x100>, <0xfe394000 0x100>;
                reg-names = "sata", "pcie";
                #phy-cells = <1>;
                st,sata-gen = <3>;
        };

        phy_port1: port@fe38a000 {
                reg = <0xfe38a000 0x100>, <0xfe804000 0x100>;;
                reg-names = "sata", "pcie", "syscfg";
                #phy-cells = <1>;
                st,pcie-tx-pol-inv;
        };
};

MiPHY365x consumer 지정

63-77

MiPHY365x를 사용하는 장치의 `phys`에는 PHY 포트 노드 phandle과 장치 유형을 지정합니다. 예제 SATA 컨트롤러는 `phy_port0`을 `PHY_TYPE_SATA`로 선택하며 관련 macro를 위해 `dt-bindings/phy/phy.h`를 포함합니다.

#include <dt-bindings/phy/phy.h>

        sata0: sata@fe380000 {
                ...
                phys          = <&phy_port0 PHY_TYPE_SATA>;
                ...
        };