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

Linux 6.18.37 · Devicetree Bindings

STMicroelectronics STi MiPHY28LP

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

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

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

1. 요약·해설

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

요약과 해설

phy-miphy28lp.txt:1-117

포트별 register topology, reset, oscillator 및 polarity 설정을 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 STMicroelectronics STi MIPHY28LP PHY binding
2 ============================================
3
4 This binding describes a miphy device that is used to control PHY hardware
5 for SATA, PCIe or USB3.
6
7 Required properties (controller (parent) node):
8 - compatible : Should be "st,miphy28lp-phy".
9 - st,syscfg : Should be a phandle of the system configuration register group
10 which contain the SATA, PCIe or USB3 mode setting bits.
11
12 Required nodes : A sub-node is required for each channel the controller
13 provides. Address range information including the usual
14 'reg' and 'reg-names' properties are used inside these
15 nodes to describe the controller's topology. These nodes
16 are translated by the driver's .xlate() function.
17
18 Required properties (port (child) node):
19 - #phy-cells : Should be 1 (See second example)
20 Cell after port phandle is device type from:
21 - PHY_TYPE_SATA
22 - PHY_TYPE_PCI
23 - PHY_TYPE_USB3
24 - reg : Address and length of the register set for the device.
25 - reg-names : The names of the register addresses corresponding to the registers
26 filled in "reg". It can also contain the offset of the system configuration
27 registers used as glue-logic to setup the device for SATA/PCIe or USB3
28 devices.
29 - st,syscfg : Offset of the parent configuration register.
30 - resets : phandle to the parent reset controller.
31 - reset-names : Associated name must be "miphy-sw-rst".
32
33 Optional properties (port (child) node):
34 - st,osc-rdy : to check the MIPHY0_OSC_RDY status in the glue-logic. This
35 is not available in all the MiPHY. For example, for STiH407, only the
36 MiPHY0 has this bit.
37 - st,osc-force-ext : to select the external oscillator. This can change from
38 different MiPHY inside the same SoC.
39 - st,sata_gen : to select which SATA_SPDMODE has to be set in the SATA system config
40 register.
41 - st,px_rx_pol_inv : to invert polarity of RXn/RXp (respectively negative line and positive
42 line).
43 - st,scc-on : enable ssc to reduce effects of EMI (only for sata or PCIe).
44 - st,tx-impedance-comp : to compensate tx impedance avoiding out of range values.
45
46 example:
47
48 miphy28lp_phy: miphy28lp@9b22000 {
49 compatible = "st,miphy28lp-phy";
50 st,syscfg = <&syscfg_core>;
51 #address-cells = <1>;
52 #size-cells = <1>;
53 ranges;
54
55 phy_port0: port@9b22000 {
56 reg = <0x9b22000 0xff>,
57 <0x9b09000 0xff>,
58 <0x9b04000 0xff>;
59 reg-names = "sata-up",
60 "pcie-up",
61 "pipew";
62
63 st,syscfg = <0x114 0x818 0xe0 0xec>;
64 #phy-cells = <1>;
65 st,osc-rdy;
66 reset-names = "miphy-sw-rst";
67 resets = <&softreset STIH407_MIPHY0_SOFTRESET>;
68 };
69
70 phy_port1: port@9b2a000 {
71 reg = <0x9b2a000 0xff>,
72 <0x9b19000 0xff>,
73 <0x9b14000 0xff>;
74 reg-names = "sata-up",
75 "pcie-up",
76 "pipew";
77
78 st,syscfg = <0x118 0x81c 0xe4 0xf0>;
79
80 #phy-cells = <1>;
81 st,osc-force-ext;
82 reset-names = "miphy-sw-rst";
83 resets = <&softreset STIH407_MIPHY1_SOFTRESET>;
84 };
85
86 phy_port2: port@8f95000 {
87 reg = <0x8f95000 0xff>,
88 <0x8f90000 0xff>;
89 reg-names = "pipew",
90 "usb3-up";
91
92 st,syscfg = <0x11c 0x820>;
93
94 #phy-cells = <1>;
95 reset-names = "miphy-sw-rst";
96 resets = <&softreset STIH407_MIPHY2_SOFTRESET>;
97 };
98 };
99
100
101 Specifying phy control of devices
102 =================================
103
104 Device nodes should specify the configuration required in their "phys"
105 property, containing a phandle to the miphy device node and an index
106 specifying which configuration to use, as described in phy-bindings.txt.
107
108 example:
109 sata0: sata@9b20000 {
110 ...
111 phys = <&phy_port0 PHY_TYPE_SATA>;
112 ...
113 };
114
115 Macro definitions for the supported miphy configuration can be found in:
116
117 include/dt-bindings/phy/phy.h
118

3. 한국어 전문 번역

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

STi MiPHY28LP 컨트롤러

1-17

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

상위 컨트롤러 노드의 `compatible`은 `st,miphy28lp-phy`여야 합니다. `st,syscfg`는 SATA, PCIe 또는 USB3 mode 설정 bit가 들어 있는 system configuration register group의 phandle이어야 합니다.

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

MiPHY28LP 포트 필수 속성

18-32

포트 하위 노드의 `#phy-cells`는 1이어야 합니다. 포트 phandle 뒤의 cell은 `PHY_TYPE_SATA`, `PHY_TYPE_PCI`, `PHY_TYPE_USB3` 가운데 하나인 장치 유형입니다.

`reg`는 장치 register set의 주소와 길이입니다. `reg-names`는 `reg`의 각 register 주소에 대응하는 이름이며, SATA·PCIe·USB3 장치를 설정하는 glue logic으로 쓰는 system configuration register offset도 포함할 수 있습니다.

`st,syscfg`는 상위 configuration register의 offset입니다. `resets`는 상위 reset controller의 phandle이고 연결된 `reset-names`는 `miphy-sw-rst`여야 합니다.

MiPHY28LP 포트 선택 속성

33-45

`st,osc-rdy`는 glue logic의 `MIPHY0_OSC_RDY` 상태를 검사합니다. 모든 MiPHY에 있는 기능은 아니며 STiH407에서는 MiPHY0에만 이 bit가 있습니다.

`st,osc-force-ext`는 외부 oscillator를 선택하며 같은 SoC 안에서도 MiPHY마다 달라질 수 있습니다. `st,sata_gen`은 SATA system configuration register에 설정할 `SATA_SPDMODE`를 선택합니다.

`st,px_rx_pol_inv`는 음극선 RXn과 양극선 RXp의 polarity를 반전합니다. `st,scc-on`은 SATA 또는 PCIe에서 EMI 영향을 줄이기 위해 SSC를 활성화하고, `st,tx-impedance-comp`는 범위를 벗어나는 값을 피하도록 TX impedance를 보정합니다.

MiPHY28LP provider 예제

46-100

예제는 세 포트를 가진 MiPHY28LP provider를 정의합니다. 포트 0과 1은 SATA·PCIe·PIPE register 영역을 가지며 각각 oscillator-ready 검사와 외부 oscillator 선택을 사용합니다. 포트 2는 PIPE와 USB3 register 영역을 사용합니다.

각 포트는 별도의 `st,syscfg` offset 목록과 `miphy-sw-rst` reset을 사용하고 `#phy-cells = <1>`로 동작 mode를 받습니다.

miphy28lp_phy: miphy28lp@9b22000 {
        compatible = "st,miphy28lp-phy";
        st,syscfg = <&syscfg_core>;
        #address-cells        = <1>;
        #size-cells        = <1>;
        ranges;

        phy_port0: port@9b22000 {
                reg = <0x9b22000 0xff>,
                      <0x9b09000 0xff>,
                      <0x9b04000 0xff>;
                reg-names = "sata-up",
                            "pcie-up",
                            "pipew";

                st,syscfg = <0x114 0x818 0xe0 0xec>;
                #phy-cells = <1>;
                st,osc-rdy;
                reset-names = "miphy-sw-rst";
                resets = <&softreset STIH407_MIPHY0_SOFTRESET>;
        };

        phy_port1: port@9b2a000 {
                reg = <0x9b2a000 0xff>,
                      <0x9b19000 0xff>,
                      <0x9b14000 0xff>;
                reg-names = "sata-up",
                            "pcie-up",
                            "pipew";

                st,syscfg = <0x118 0x81c 0xe4 0xf0>;

                #phy-cells = <1>;
                st,osc-force-ext;
                reset-names = "miphy-sw-rst";
                resets = <&softreset STIH407_MIPHY1_SOFTRESET>;
        };

        phy_port2: port@8f95000 {
                reg = <0x8f95000 0xff>,
                      <0x8f90000 0xff>;
                reg-names = "pipew",
                            "usb3-up";

                st,syscfg = <0x11c 0x820>;

                #phy-cells = <1>;
                reset-names = "miphy-sw-rst";
                resets = <&softreset STIH407_MIPHY2_SOFTRESET>;
        };
};

장치의 MiPHY 제어 지정

101-117

MiPHY를 사용하는 장치 노드는 `phys`에 MiPHY 포트 노드 phandle과 사용할 configuration index를 지정해야 합니다. 형식은 `phy-bindings.txt`의 정의를 따릅니다.

SATA 예제는 `phy_port0`을 `PHY_TYPE_SATA` mode로 선택합니다. 지원하는 MiPHY configuration macro는 `include/dt-bindings/phy/phy.h`에 정의되어 있습니다.

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