1*612ad27aSStanley Chang# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2*612ad27aSStanley Chang# Copyright 2023 Realtek Semiconductor Corporation 3*612ad27aSStanley Chang%YAML 1.2 4*612ad27aSStanley Chang--- 5*612ad27aSStanley Chang$id: http://devicetree.org/schemas/phy/realtek,usb2phy.yaml# 6*612ad27aSStanley Chang$schema: http://devicetree.org/meta-schemas/core.yaml# 7*612ad27aSStanley Chang 8*612ad27aSStanley Changtitle: Realtek DHC SoCs USB 2.0 PHY 9*612ad27aSStanley Chang 10*612ad27aSStanley Changmaintainers: 11*612ad27aSStanley Chang - Stanley Chang <stanley_chang@realtek.com> 12*612ad27aSStanley Chang 13*612ad27aSStanley Changdescription: | 14*612ad27aSStanley Chang Realtek USB 2.0 PHY support the digital home center (DHC) RTD series SoCs. 15*612ad27aSStanley Chang The USB 2.0 PHY driver is designed to support the XHCI controller. The SoCs 16*612ad27aSStanley Chang support multiple XHCI controllers. One PHY device node maps to one XHCI 17*612ad27aSStanley Chang controller. 18*612ad27aSStanley Chang 19*612ad27aSStanley Chang RTD1295/RTD1619 SoCs USB 20*612ad27aSStanley Chang The USB architecture includes three XHCI controllers. 21*612ad27aSStanley Chang Each XHCI maps to one USB 2.0 PHY and map one USB 3.0 PHY on some 22*612ad27aSStanley Chang controllers. 23*612ad27aSStanley Chang XHCI controller#0 -- usb2phy -- phy#0 24*612ad27aSStanley Chang |- usb3phy -- phy#0 25*612ad27aSStanley Chang XHCI controller#1 -- usb2phy -- phy#0 26*612ad27aSStanley Chang XHCI controller#2 -- usb2phy -- phy#0 27*612ad27aSStanley Chang |- usb3phy -- phy#0 28*612ad27aSStanley Chang 29*612ad27aSStanley Chang RTD1395 SoCs USB 30*612ad27aSStanley Chang The USB architecture includes two XHCI controllers. 31*612ad27aSStanley Chang The controller#0 has one USB 2.0 PHY. The controller#1 includes two USB 2.0 32*612ad27aSStanley Chang PHY. 33*612ad27aSStanley Chang XHCI controller#0 -- usb2phy -- phy#0 34*612ad27aSStanley Chang XHCI controller#1 -- usb2phy -- phy#0 35*612ad27aSStanley Chang |- phy#1 36*612ad27aSStanley Chang 37*612ad27aSStanley Chang RTD1319/RTD1619b SoCs USB 38*612ad27aSStanley Chang The USB architecture includes three XHCI controllers. 39*612ad27aSStanley Chang Each XHCI maps to one USB 2.0 PHY and map one USB 3.0 PHY on controllers#2. 40*612ad27aSStanley Chang XHCI controller#0 -- usb2phy -- phy#0 41*612ad27aSStanley Chang XHCI controller#1 -- usb2phy -- phy#0 42*612ad27aSStanley Chang XHCI controller#2 -- usb2phy -- phy#0 43*612ad27aSStanley Chang |- usb3phy -- phy#0 44*612ad27aSStanley Chang 45*612ad27aSStanley Chang RTD1319d SoCs USB 46*612ad27aSStanley Chang The USB architecture includes three XHCI controllers. 47*612ad27aSStanley Chang Each xhci maps to one USB 2.0 PHY and map one USB 3.0 PHY on controllers#0. 48*612ad27aSStanley Chang XHCI controller#0 -- usb2phy -- phy#0 49*612ad27aSStanley Chang |- usb3phy -- phy#0 50*612ad27aSStanley Chang XHCI controller#1 -- usb2phy -- phy#0 51*612ad27aSStanley Chang XHCI controller#2 -- usb2phy -- phy#0 52*612ad27aSStanley Chang 53*612ad27aSStanley Chang RTD1312c/RTD1315e SoCs USB 54*612ad27aSStanley Chang The USB architecture includes three XHCI controllers. 55*612ad27aSStanley Chang Each XHCI maps to one USB 2.0 PHY. 56*612ad27aSStanley Chang XHCI controller#0 -- usb2phy -- phy#0 57*612ad27aSStanley Chang XHCI controller#1 -- usb2phy -- phy#0 58*612ad27aSStanley Chang XHCI controller#2 -- usb2phy -- phy#0 59*612ad27aSStanley Chang 60*612ad27aSStanley Changproperties: 61*612ad27aSStanley Chang compatible: 62*612ad27aSStanley Chang enum: 63*612ad27aSStanley Chang - realtek,rtd1295-usb2phy 64*612ad27aSStanley Chang - realtek,rtd1312c-usb2phy 65*612ad27aSStanley Chang - realtek,rtd1315e-usb2phy 66*612ad27aSStanley Chang - realtek,rtd1319-usb2phy 67*612ad27aSStanley Chang - realtek,rtd1319d-usb2phy 68*612ad27aSStanley Chang - realtek,rtd1395-usb2phy 69*612ad27aSStanley Chang - realtek,rtd1395-usb2phy-2port 70*612ad27aSStanley Chang - realtek,rtd1619-usb2phy 71*612ad27aSStanley Chang - realtek,rtd1619b-usb2phy 72*612ad27aSStanley Chang 73*612ad27aSStanley Chang reg: 74*612ad27aSStanley Chang items: 75*612ad27aSStanley Chang - description: PHY data registers 76*612ad27aSStanley Chang - description: PHY control registers 77*612ad27aSStanley Chang 78*612ad27aSStanley Chang "#phy-cells": 79*612ad27aSStanley Chang const: 0 80*612ad27aSStanley Chang 81*612ad27aSStanley Chang nvmem-cells: 82*612ad27aSStanley Chang maxItems: 2 83*612ad27aSStanley Chang description: 84*612ad27aSStanley Chang Phandles to nvmem cell that contains the trimming data. 85*612ad27aSStanley Chang If unspecified, default value is used. 86*612ad27aSStanley Chang 87*612ad27aSStanley Chang nvmem-cell-names: 88*612ad27aSStanley Chang items: 89*612ad27aSStanley Chang - const: usb-dc-cal 90*612ad27aSStanley Chang - const: usb-dc-dis 91*612ad27aSStanley Chang description: 92*612ad27aSStanley Chang The following names, which correspond to each nvmem-cells. 93*612ad27aSStanley Chang usb-dc-cal is the driving level for each phy specified via efuse. 94*612ad27aSStanley Chang usb-dc-dis is the disconnection level for each phy specified via efuse. 95*612ad27aSStanley Chang 96*612ad27aSStanley Chang realtek,inverse-hstx-sync-clock: 97*612ad27aSStanley Chang description: 98*612ad27aSStanley Chang For one of the phys of RTD1619b SoC, the synchronous clock of the 99*612ad27aSStanley Chang high-speed tx must be inverted. 100*612ad27aSStanley Chang type: boolean 101*612ad27aSStanley Chang 102*612ad27aSStanley Chang realtek,driving-level: 103*612ad27aSStanley Chang description: 104*612ad27aSStanley Chang Control the magnitude of High speed Dp/Dm output swing (mV). 105*612ad27aSStanley Chang For a different board or port, the original magnitude maybe not meet 106*612ad27aSStanley Chang the specification. In this situation we can adjust the value to meet 107*612ad27aSStanley Chang the specification. 108*612ad27aSStanley Chang $ref: /schemas/types.yaml#/definitions/uint32 109*612ad27aSStanley Chang default: 8 110*612ad27aSStanley Chang minimum: 0 111*612ad27aSStanley Chang maximum: 31 112*612ad27aSStanley Chang 113*612ad27aSStanley Chang realtek,driving-level-compensate: 114*612ad27aSStanley Chang description: 115*612ad27aSStanley Chang For RTD1315e SoC, the driving level can be adjusted by reading the 116*612ad27aSStanley Chang efuse table. This property provides drive compensation. 117*612ad27aSStanley Chang If the magnitude of High speed Dp/Dm output swing still not meet the 118*612ad27aSStanley Chang specification, then we can set this value to meet the specification. 119*612ad27aSStanley Chang $ref: /schemas/types.yaml#/definitions/int32 120*612ad27aSStanley Chang default: 0 121*612ad27aSStanley Chang minimum: -8 122*612ad27aSStanley Chang maximum: 8 123*612ad27aSStanley Chang 124*612ad27aSStanley Chang realtek,disconnection-compensate: 125*612ad27aSStanley Chang description: 126*612ad27aSStanley Chang This adjusts the disconnection level compensation for the different 127*612ad27aSStanley Chang boards with different disconnection level. 128*612ad27aSStanley Chang $ref: /schemas/types.yaml#/definitions/int32 129*612ad27aSStanley Chang default: 0 130*612ad27aSStanley Chang minimum: -8 131*612ad27aSStanley Chang maximum: 8 132*612ad27aSStanley Chang 133*612ad27aSStanley Changrequired: 134*612ad27aSStanley Chang - compatible 135*612ad27aSStanley Chang - reg 136*612ad27aSStanley Chang - "#phy-cells" 137*612ad27aSStanley Chang 138*612ad27aSStanley ChangallOf: 139*612ad27aSStanley Chang - if: 140*612ad27aSStanley Chang not: 141*612ad27aSStanley Chang properties: 142*612ad27aSStanley Chang compatible: 143*612ad27aSStanley Chang contains: 144*612ad27aSStanley Chang enum: 145*612ad27aSStanley Chang - realtek,rtd1619b-usb2phy 146*612ad27aSStanley Chang then: 147*612ad27aSStanley Chang properties: 148*612ad27aSStanley Chang realtek,inverse-hstx-sync-clock: false 149*612ad27aSStanley Chang 150*612ad27aSStanley Chang - if: 151*612ad27aSStanley Chang not: 152*612ad27aSStanley Chang properties: 153*612ad27aSStanley Chang compatible: 154*612ad27aSStanley Chang contains: 155*612ad27aSStanley Chang enum: 156*612ad27aSStanley Chang - realtek,rtd1315e-usb2phy 157*612ad27aSStanley Chang then: 158*612ad27aSStanley Chang properties: 159*612ad27aSStanley Chang realtek,driving-level-compensate: false 160*612ad27aSStanley Chang 161*612ad27aSStanley ChangadditionalProperties: false 162*612ad27aSStanley Chang 163*612ad27aSStanley Changexamples: 164*612ad27aSStanley Chang - | 165*612ad27aSStanley Chang usb-phy@13214 { 166*612ad27aSStanley Chang compatible = "realtek,rtd1619b-usb2phy"; 167*612ad27aSStanley Chang reg = <0x13214 0x4>, <0x28280 0x4>; 168*612ad27aSStanley Chang #phy-cells = <0>; 169*612ad27aSStanley Chang nvmem-cells = <&otp_usb_port0_dc_cal>, <&otp_usb_port0_dc_dis>; 170*612ad27aSStanley Chang nvmem-cell-names = "usb-dc-cal", "usb-dc-dis"; 171*612ad27aSStanley Chang 172*612ad27aSStanley Chang realtek,inverse-hstx-sync-clock; 173*612ad27aSStanley Chang realtek,driving-level = <0xa>; 174*612ad27aSStanley Chang realtek,disconnection-compensate = <(-1)>; 175*612ad27aSStanley Chang }; 176