요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
STMicroelectronics STi MIPHY365x PHY binding
============================================
This binding describes a miphy device that is used to control PHY hardware
for SATA and PCIe.
Required properties (controller (parent) node):
- compatible : Should be "st,miphy365x-phy"
- st,syscfg : Phandle / integer array property. Phandle of sysconfig group
containing the miphy registers and integer array should contain
an entry for each port sub-node, specifying the control
register offset inside the sysconfig group.
Required nodes : A sub-node is required for each channel the controller
provides. Address range information including the usual
'reg' and 'reg-names' properties are used inside these
nodes to describe the controller's topology. These nodes
are translated by the driver's .xlate() function.
Required properties (port (child) node):
- #phy-cells : Should be 1 (See second example)
Cell after port phandle is device type from:
- PHY_TYPE_SATA
- PHY_TYPE_PCI
- reg : Address and length of register sets for each device in
"reg-names"
- reg-names : The names of the register addresses corresponding to the
registers filled in "reg":
- sata: For SATA devices
- pcie: For PCIe devices
Optional properties (port (child) node):
- st,sata-gen : Generation of locally attached SATA IP. Expected values
are {1,2,3). If not supplied generation 1 hardware will
be expected
- st,pcie-tx-pol-inv : Bool property to invert the polarity PCIe Tx (Txn/Txp)
- st,sata-tx-pol-inv : Bool property to invert the polarity SATA Tx (Txn/Txp)
Example:
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;
};
};
Specifying phy control of devices
=================================
Device nodes should specify the configuration required in their "phys"
property, containing a phandle to the phy port node and a device type.
Example:
#include <dt-bindings/phy/phy.h>
sata0: sata@fe380000 {
...
phys = <&phy_port0 PHY_TYPE_SATA>;
...
};
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-77MiPHY365x를 사용하는 장치의 `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>;
...
};
요약과 해설
phy-miphy365x.txt:1-77포트별 sysconfig offset과 SATA generation·TX polarity 설정을 설명합니다.