xref: /freebsd/sys/contrib/device-tree/Bindings/phy/realtek,usb3phy.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
1*aa1a8ff2SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*aa1a8ff2SEmmanuel Vadot# Copyright 2023 Realtek Semiconductor Corporation
3*aa1a8ff2SEmmanuel Vadot%YAML 1.2
4*aa1a8ff2SEmmanuel Vadot---
5*aa1a8ff2SEmmanuel Vadot$id: http://devicetree.org/schemas/phy/realtek,usb3phy.yaml#
6*aa1a8ff2SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
7*aa1a8ff2SEmmanuel Vadot
8*aa1a8ff2SEmmanuel Vadottitle: Realtek DHC SoCs USB 3.0 PHY
9*aa1a8ff2SEmmanuel Vadot
10*aa1a8ff2SEmmanuel Vadotmaintainers:
11*aa1a8ff2SEmmanuel Vadot  - Stanley Chang <stanley_chang@realtek.com>
12*aa1a8ff2SEmmanuel Vadot
13*aa1a8ff2SEmmanuel Vadotdescription: |
14*aa1a8ff2SEmmanuel Vadot  Realtek USB 3.0 PHY support the digital home center (DHC) RTD series SoCs.
15*aa1a8ff2SEmmanuel Vadot  The USB 3.0 PHY driver is designed to support the XHCI controller. The SoCs
16*aa1a8ff2SEmmanuel Vadot  support multiple XHCI controllers. One PHY device node maps to one XHCI
17*aa1a8ff2SEmmanuel Vadot  controller.
18*aa1a8ff2SEmmanuel Vadot
19*aa1a8ff2SEmmanuel Vadot  RTD1295/RTD1619 SoCs USB
20*aa1a8ff2SEmmanuel Vadot  The USB architecture includes three XHCI controllers.
21*aa1a8ff2SEmmanuel Vadot  Each XHCI maps to one USB 2.0 PHY and map one USB 3.0 PHY on some
22*aa1a8ff2SEmmanuel Vadot  controllers.
23*aa1a8ff2SEmmanuel Vadot  XHCI controller#0 -- usb2phy -- phy#0
24*aa1a8ff2SEmmanuel Vadot                    |- usb3phy -- phy#0
25*aa1a8ff2SEmmanuel Vadot  XHCI controller#1 -- usb2phy -- phy#0
26*aa1a8ff2SEmmanuel Vadot  XHCI controller#2 -- usb2phy -- phy#0
27*aa1a8ff2SEmmanuel Vadot                    |- usb3phy -- phy#0
28*aa1a8ff2SEmmanuel Vadot
29*aa1a8ff2SEmmanuel Vadot  RTD1319/RTD1619b SoCs USB
30*aa1a8ff2SEmmanuel Vadot  The USB architecture includes three XHCI controllers.
31*aa1a8ff2SEmmanuel Vadot  Each XHCI maps to one USB 2.0 PHY and map one USB 3.0 PHY on controllers#2.
32*aa1a8ff2SEmmanuel Vadot  XHCI controller#0 -- usb2phy -- phy#0
33*aa1a8ff2SEmmanuel Vadot  XHCI controller#1 -- usb2phy -- phy#0
34*aa1a8ff2SEmmanuel Vadot  XHCI controller#2 -- usb2phy -- phy#0
35*aa1a8ff2SEmmanuel Vadot                    |- usb3phy -- phy#0
36*aa1a8ff2SEmmanuel Vadot
37*aa1a8ff2SEmmanuel Vadot  RTD1319d SoCs USB
38*aa1a8ff2SEmmanuel Vadot  The USB architecture includes three XHCI controllers.
39*aa1a8ff2SEmmanuel Vadot  Each xhci maps to one USB 2.0 PHY and map one USB 3.0 PHY on controllers#0.
40*aa1a8ff2SEmmanuel Vadot  XHCI controller#0 -- usb2phy -- phy#0
41*aa1a8ff2SEmmanuel Vadot                    |- usb3phy -- phy#0
42*aa1a8ff2SEmmanuel Vadot  XHCI controller#1 -- usb2phy -- phy#0
43*aa1a8ff2SEmmanuel Vadot  XHCI controller#2 -- usb2phy -- phy#0
44*aa1a8ff2SEmmanuel Vadot
45*aa1a8ff2SEmmanuel Vadotproperties:
46*aa1a8ff2SEmmanuel Vadot  compatible:
47*aa1a8ff2SEmmanuel Vadot    enum:
48*aa1a8ff2SEmmanuel Vadot      - realtek,rtd1295-usb3phy
49*aa1a8ff2SEmmanuel Vadot      - realtek,rtd1319-usb3phy
50*aa1a8ff2SEmmanuel Vadot      - realtek,rtd1319d-usb3phy
51*aa1a8ff2SEmmanuel Vadot      - realtek,rtd1619-usb3phy
52*aa1a8ff2SEmmanuel Vadot      - realtek,rtd1619b-usb3phy
53*aa1a8ff2SEmmanuel Vadot
54*aa1a8ff2SEmmanuel Vadot  reg:
55*aa1a8ff2SEmmanuel Vadot    maxItems: 1
56*aa1a8ff2SEmmanuel Vadot
57*aa1a8ff2SEmmanuel Vadot  "#phy-cells":
58*aa1a8ff2SEmmanuel Vadot    const: 0
59*aa1a8ff2SEmmanuel Vadot
60*aa1a8ff2SEmmanuel Vadot  nvmem-cells:
61*aa1a8ff2SEmmanuel Vadot    maxItems: 1
62*aa1a8ff2SEmmanuel Vadot    description: A phandle to the tx lfps swing trim data provided by
63*aa1a8ff2SEmmanuel Vadot      a nvmem device, if unspecified, default values shall be used.
64*aa1a8ff2SEmmanuel Vadot
65*aa1a8ff2SEmmanuel Vadot  nvmem-cell-names:
66*aa1a8ff2SEmmanuel Vadot    items:
67*aa1a8ff2SEmmanuel Vadot      - const: usb_u3_tx_lfps_swing_trim
68*aa1a8ff2SEmmanuel Vadot
69*aa1a8ff2SEmmanuel Vadot  realtek,amplitude-control-coarse-tuning:
70*aa1a8ff2SEmmanuel Vadot    description:
71*aa1a8ff2SEmmanuel Vadot      This adjusts the signal amplitude for normal operation and beacon LFPS.
72*aa1a8ff2SEmmanuel Vadot      This value is a parameter for coarse tuning.
73*aa1a8ff2SEmmanuel Vadot      For different boards, if the default value is inappropriate, this
74*aa1a8ff2SEmmanuel Vadot      property can be assigned to adjust.
75*aa1a8ff2SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
76*aa1a8ff2SEmmanuel Vadot    default: 255
77*aa1a8ff2SEmmanuel Vadot    minimum: 0
78*aa1a8ff2SEmmanuel Vadot    maximum: 255
79*aa1a8ff2SEmmanuel Vadot
80*aa1a8ff2SEmmanuel Vadot  realtek,amplitude-control-fine-tuning:
81*aa1a8ff2SEmmanuel Vadot    description:
82*aa1a8ff2SEmmanuel Vadot      This adjusts the signal amplitude for normal operation and beacon LFPS.
83*aa1a8ff2SEmmanuel Vadot      This value is used for fine-tuning parameters.
84*aa1a8ff2SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
85*aa1a8ff2SEmmanuel Vadot    default: 65535
86*aa1a8ff2SEmmanuel Vadot    minimum: 0
87*aa1a8ff2SEmmanuel Vadot    maximum: 65535
88*aa1a8ff2SEmmanuel Vadot
89*aa1a8ff2SEmmanuel Vadotrequired:
90*aa1a8ff2SEmmanuel Vadot  - compatible
91*aa1a8ff2SEmmanuel Vadot  - reg
92*aa1a8ff2SEmmanuel Vadot  - "#phy-cells"
93*aa1a8ff2SEmmanuel Vadot
94*aa1a8ff2SEmmanuel VadotadditionalProperties: false
95*aa1a8ff2SEmmanuel Vadot
96*aa1a8ff2SEmmanuel Vadotexamples:
97*aa1a8ff2SEmmanuel Vadot  - |
98*aa1a8ff2SEmmanuel Vadot    usb-phy@13e10 {
99*aa1a8ff2SEmmanuel Vadot        compatible = "realtek,rtd1319d-usb3phy";
100*aa1a8ff2SEmmanuel Vadot        reg = <0x13e10 0x4>;
101*aa1a8ff2SEmmanuel Vadot        #phy-cells = <0>;
102*aa1a8ff2SEmmanuel Vadot
103*aa1a8ff2SEmmanuel Vadot        nvmem-cells = <&otp_usb_u3_tx_lfps_swing_trim>;
104*aa1a8ff2SEmmanuel Vadot        nvmem-cell-names = "usb_u3_tx_lfps_swing_trim";
105*aa1a8ff2SEmmanuel Vadot
106*aa1a8ff2SEmmanuel Vadot        realtek,amplitude-control-coarse-tuning = <0x77>;
107*aa1a8ff2SEmmanuel Vadot    };
108