1*7d0873ebSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*7d0873ebSEmmanuel Vadot%YAML 1.2 3*7d0873ebSEmmanuel Vadot--- 4*7d0873ebSEmmanuel Vadot$id: http://devicetree.org/schemas/phy/phy-rockchip-usbdp.yaml# 5*7d0873ebSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*7d0873ebSEmmanuel Vadot 7*7d0873ebSEmmanuel Vadottitle: Rockchip USBDP Combo PHY with Samsung IP block 8*7d0873ebSEmmanuel Vadot 9*7d0873ebSEmmanuel Vadotmaintainers: 10*7d0873ebSEmmanuel Vadot - Frank Wang <frank.wang@rock-chips.com> 11*7d0873ebSEmmanuel Vadot - Zhang Yubing <yubing.zhang@rock-chips.com> 12*7d0873ebSEmmanuel Vadot 13*7d0873ebSEmmanuel Vadotproperties: 14*7d0873ebSEmmanuel Vadot compatible: 15*7d0873ebSEmmanuel Vadot enum: 16*7d0873ebSEmmanuel Vadot - rockchip,rk3588-usbdp-phy 17*7d0873ebSEmmanuel Vadot 18*7d0873ebSEmmanuel Vadot reg: 19*7d0873ebSEmmanuel Vadot maxItems: 1 20*7d0873ebSEmmanuel Vadot 21*7d0873ebSEmmanuel Vadot "#phy-cells": 22*7d0873ebSEmmanuel Vadot description: | 23*7d0873ebSEmmanuel Vadot Cell allows setting the type of the PHY. Possible values are: 24*7d0873ebSEmmanuel Vadot - PHY_TYPE_USB3 25*7d0873ebSEmmanuel Vadot - PHY_TYPE_DP 26*7d0873ebSEmmanuel Vadot const: 1 27*7d0873ebSEmmanuel Vadot 28*7d0873ebSEmmanuel Vadot clocks: 29*7d0873ebSEmmanuel Vadot maxItems: 4 30*7d0873ebSEmmanuel Vadot 31*7d0873ebSEmmanuel Vadot clock-names: 32*7d0873ebSEmmanuel Vadot items: 33*7d0873ebSEmmanuel Vadot - const: refclk 34*7d0873ebSEmmanuel Vadot - const: immortal 35*7d0873ebSEmmanuel Vadot - const: pclk 36*7d0873ebSEmmanuel Vadot - const: utmi 37*7d0873ebSEmmanuel Vadot 38*7d0873ebSEmmanuel Vadot resets: 39*7d0873ebSEmmanuel Vadot maxItems: 5 40*7d0873ebSEmmanuel Vadot 41*7d0873ebSEmmanuel Vadot reset-names: 42*7d0873ebSEmmanuel Vadot items: 43*7d0873ebSEmmanuel Vadot - const: init 44*7d0873ebSEmmanuel Vadot - const: cmn 45*7d0873ebSEmmanuel Vadot - const: lane 46*7d0873ebSEmmanuel Vadot - const: pcs_apb 47*7d0873ebSEmmanuel Vadot - const: pma_apb 48*7d0873ebSEmmanuel Vadot 49*7d0873ebSEmmanuel Vadot rockchip,dp-lane-mux: 50*7d0873ebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 51*7d0873ebSEmmanuel Vadot minItems: 2 52*7d0873ebSEmmanuel Vadot maxItems: 4 53*7d0873ebSEmmanuel Vadot items: 54*7d0873ebSEmmanuel Vadot maximum: 3 55*7d0873ebSEmmanuel Vadot description: 56*7d0873ebSEmmanuel Vadot An array of physical Type-C lanes indexes. Position of an entry 57*7d0873ebSEmmanuel Vadot determines the DisplayPort (DP) lane index, while the value of an entry 58*7d0873ebSEmmanuel Vadot indicates physical Type-C lane. The supported DP lanes number are 2 or 4. 59*7d0873ebSEmmanuel Vadot e.g. for 2 lanes DP lanes map, we could have "rockchip,dp-lane-mux = <2, 60*7d0873ebSEmmanuel Vadot 3>;", assuming DP lane0 on Type-C phy lane2, DP lane1 on Type-C phy 61*7d0873ebSEmmanuel Vadot lane3. For 4 lanes DP lanes map, we could have "rockchip,dp-lane-mux = 62*7d0873ebSEmmanuel Vadot <0, 1, 2, 3>;", assuming DP lane0 on Type-C phy lane0, DP lane1 on Type-C 63*7d0873ebSEmmanuel Vadot phy lane1, DP lane2 on Type-C phy lane2, DP lane3 on Type-C phy lane3. If 64*7d0873ebSEmmanuel Vadot DP lanes are mapped by DisplayPort Alt mode, this property is not needed. 65*7d0873ebSEmmanuel Vadot 66*7d0873ebSEmmanuel Vadot rockchip,u2phy-grf: 67*7d0873ebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 68*7d0873ebSEmmanuel Vadot description: 69*7d0873ebSEmmanuel Vadot Phandle to the syscon managing the 'usb2 phy general register files'. 70*7d0873ebSEmmanuel Vadot 71*7d0873ebSEmmanuel Vadot rockchip,usb-grf: 72*7d0873ebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 73*7d0873ebSEmmanuel Vadot description: 74*7d0873ebSEmmanuel Vadot Phandle to the syscon managing the 'usb general register files'. 75*7d0873ebSEmmanuel Vadot 76*7d0873ebSEmmanuel Vadot rockchip,usbdpphy-grf: 77*7d0873ebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 78*7d0873ebSEmmanuel Vadot description: 79*7d0873ebSEmmanuel Vadot Phandle to the syscon managing the 'usbdp phy general register files'. 80*7d0873ebSEmmanuel Vadot 81*7d0873ebSEmmanuel Vadot rockchip,vo-grf: 82*7d0873ebSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 83*7d0873ebSEmmanuel Vadot description: 84*7d0873ebSEmmanuel Vadot Phandle to the syscon managing the 'video output general register files'. 85*7d0873ebSEmmanuel Vadot When select the DP lane mapping will request its phandle. 86*7d0873ebSEmmanuel Vadot 87*7d0873ebSEmmanuel Vadot sbu1-dc-gpios: 88*7d0873ebSEmmanuel Vadot description: 89*7d0873ebSEmmanuel Vadot GPIO connected to the SBU1 line of the USB-C connector via a big resistor 90*7d0873ebSEmmanuel Vadot (~100K) to apply a DC offset for signalling the connector orientation. 91*7d0873ebSEmmanuel Vadot maxItems: 1 92*7d0873ebSEmmanuel Vadot 93*7d0873ebSEmmanuel Vadot sbu2-dc-gpios: 94*7d0873ebSEmmanuel Vadot description: 95*7d0873ebSEmmanuel Vadot GPIO connected to the SBU2 line of the USB-C connector via a big resistor 96*7d0873ebSEmmanuel Vadot (~100K) to apply a DC offset for signalling the connector orientation. 97*7d0873ebSEmmanuel Vadot maxItems: 1 98*7d0873ebSEmmanuel Vadot 99*7d0873ebSEmmanuel Vadot orientation-switch: 100*7d0873ebSEmmanuel Vadot description: Flag the port as possible handler of orientation switching 101*7d0873ebSEmmanuel Vadot type: boolean 102*7d0873ebSEmmanuel Vadot 103*7d0873ebSEmmanuel Vadot mode-switch: 104*7d0873ebSEmmanuel Vadot description: Flag the port as possible handler of altmode switching 105*7d0873ebSEmmanuel Vadot type: boolean 106*7d0873ebSEmmanuel Vadot 107*7d0873ebSEmmanuel Vadot port: 108*7d0873ebSEmmanuel Vadot $ref: /schemas/graph.yaml#/properties/port 109*7d0873ebSEmmanuel Vadot description: 110*7d0873ebSEmmanuel Vadot A port node to link the PHY to a TypeC controller for the purpose of 111*7d0873ebSEmmanuel Vadot handling orientation switching. 112*7d0873ebSEmmanuel Vadot 113*7d0873ebSEmmanuel Vadotrequired: 114*7d0873ebSEmmanuel Vadot - compatible 115*7d0873ebSEmmanuel Vadot - reg 116*7d0873ebSEmmanuel Vadot - clocks 117*7d0873ebSEmmanuel Vadot - clock-names 118*7d0873ebSEmmanuel Vadot - resets 119*7d0873ebSEmmanuel Vadot - reset-names 120*7d0873ebSEmmanuel Vadot - "#phy-cells" 121*7d0873ebSEmmanuel Vadot 122*7d0873ebSEmmanuel VadotadditionalProperties: false 123*7d0873ebSEmmanuel Vadot 124*7d0873ebSEmmanuel Vadotexamples: 125*7d0873ebSEmmanuel Vadot - | 126*7d0873ebSEmmanuel Vadot #include <dt-bindings/clock/rockchip,rk3588-cru.h> 127*7d0873ebSEmmanuel Vadot #include <dt-bindings/reset/rockchip,rk3588-cru.h> 128*7d0873ebSEmmanuel Vadot 129*7d0873ebSEmmanuel Vadot usbdp_phy0: phy@fed80000 { 130*7d0873ebSEmmanuel Vadot compatible = "rockchip,rk3588-usbdp-phy"; 131*7d0873ebSEmmanuel Vadot reg = <0xfed80000 0x10000>; 132*7d0873ebSEmmanuel Vadot #phy-cells = <1>; 133*7d0873ebSEmmanuel Vadot clocks = <&cru CLK_USBDPPHY_MIPIDCPPHY_REF>, 134*7d0873ebSEmmanuel Vadot <&cru CLK_USBDP_PHY0_IMMORTAL>, 135*7d0873ebSEmmanuel Vadot <&cru PCLK_USBDPPHY0>, 136*7d0873ebSEmmanuel Vadot <&u2phy0>; 137*7d0873ebSEmmanuel Vadot clock-names = "refclk", "immortal", "pclk", "utmi"; 138*7d0873ebSEmmanuel Vadot resets = <&cru SRST_USBDP_COMBO_PHY0_INIT>, 139*7d0873ebSEmmanuel Vadot <&cru SRST_USBDP_COMBO_PHY0_CMN>, 140*7d0873ebSEmmanuel Vadot <&cru SRST_USBDP_COMBO_PHY0_LANE>, 141*7d0873ebSEmmanuel Vadot <&cru SRST_USBDP_COMBO_PHY0_PCS>, 142*7d0873ebSEmmanuel Vadot <&cru SRST_P_USBDPPHY0>; 143*7d0873ebSEmmanuel Vadot reset-names = "init", "cmn", "lane", "pcs_apb", "pma_apb"; 144*7d0873ebSEmmanuel Vadot rockchip,u2phy-grf = <&usb2phy0_grf>; 145*7d0873ebSEmmanuel Vadot rockchip,usb-grf = <&usb_grf>; 146*7d0873ebSEmmanuel Vadot rockchip,usbdpphy-grf = <&usbdpphy0_grf>; 147*7d0873ebSEmmanuel Vadot rockchip,vo-grf = <&vo0_grf>; 148*7d0873ebSEmmanuel Vadot }; 149