xref: /openbmc/linux/Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
15ffc259dSYuti Amonkar# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
25ffc259dSYuti Amonkar%YAML 1.2
35ffc259dSYuti Amonkar---
4*e43462c1SRob Herring$id: http://devicetree.org/schemas/phy/phy-cadence-torrent.yaml#
5*e43462c1SRob Herring$schema: http://devicetree.org/meta-schemas/core.yaml#
65ffc259dSYuti Amonkar
784e85359SKrzysztof Kozlowskititle: Cadence Torrent SD0801 PHY
85ffc259dSYuti Amonkar
95ffc259dSYuti Amonkardescription:
105ffc259dSYuti Amonkar  This binding describes the Cadence SD0801 PHY (also known as Torrent PHY)
11074e9915SSwapnil Jakhade  hardware included with the Cadence MHDP DisplayPort controller. Torrent
12074e9915SSwapnil Jakhade  PHY also supports multilink multiprotocol combinations including protocols
13074e9915SSwapnil Jakhade  such as PCIe, USB, SGMII, QSGMII etc.
145ffc259dSYuti Amonkar
155ffc259dSYuti Amonkarmaintainers:
165ffc259dSYuti Amonkar  - Swapnil Jakhade <sjakhade@cadence.com>
175ffc259dSYuti Amonkar  - Yuti Amonkar <yamonkar@cadence.com>
185ffc259dSYuti Amonkar
195ffc259dSYuti Amonkarproperties:
205ffc259dSYuti Amonkar  compatible:
215ffc259dSYuti Amonkar    enum:
225ffc259dSYuti Amonkar      - cdns,torrent-phy
235ffc259dSYuti Amonkar      - ti,j721e-serdes-10g
245ffc259dSYuti Amonkar
255ffc259dSYuti Amonkar  '#address-cells':
265ffc259dSYuti Amonkar    const: 1
275ffc259dSYuti Amonkar
285ffc259dSYuti Amonkar  '#size-cells':
295ffc259dSYuti Amonkar    const: 0
305ffc259dSYuti Amonkar
31eaabb559SKishon Vijay Abraham I  '#clock-cells':
32eaabb559SKishon Vijay Abraham I    const: 1
33eaabb559SKishon Vijay Abraham I
345ffc259dSYuti Amonkar  clocks:
35eaabb559SKishon Vijay Abraham I    minItems: 1
36eaabb559SKishon Vijay Abraham I    maxItems: 2
375ffc259dSYuti Amonkar    description:
38eaabb559SKishon Vijay Abraham I      PHY reference clock for 1 item. Must contain an entry in clock-names.
39eaabb559SKishon Vijay Abraham I      Optional Parent to enable output reference clock.
405ffc259dSYuti Amonkar
415ffc259dSYuti Amonkar  clock-names:
42eaabb559SKishon Vijay Abraham I    minItems: 1
43eaabb559SKishon Vijay Abraham I    items:
44eaabb559SKishon Vijay Abraham I      - const: refclk
45eaabb559SKishon Vijay Abraham I      - const: phy_en_refclk
46eaabb559SKishon Vijay Abraham I
475ffc259dSYuti Amonkar  reg:
485ffc259dSYuti Amonkar    minItems: 1
495ffc259dSYuti Amonkar    items:
505ffc259dSYuti Amonkar      - description: Offset of the Torrent PHY configuration registers.
515ffc259dSYuti Amonkar      - description: Offset of the DPTX PHY configuration registers.
525ffc259dSYuti Amonkar
535ffc259dSYuti Amonkar  reg-names:
545ffc259dSYuti Amonkar    minItems: 1
555ffc259dSYuti Amonkar    items:
565ffc259dSYuti Amonkar      - const: torrent_phy
575ffc259dSYuti Amonkar      - const: dptx_phy
585ffc259dSYuti Amonkar
595ffc259dSYuti Amonkar  resets:
60074e9915SSwapnil Jakhade    minItems: 1
61074e9915SSwapnil Jakhade    items:
62074e9915SSwapnil Jakhade      - description: Torrent PHY reset.
63074e9915SSwapnil Jakhade      - description: Torrent APB reset. This is optional.
645ffc259dSYuti Amonkar
654feac940STomi Valkeinen  reset-names:
664feac940STomi Valkeinen    minItems: 1
674feac940STomi Valkeinen    items:
684feac940STomi Valkeinen      - const: torrent_reset
694feac940STomi Valkeinen      - const: torrent_apb
704feac940STomi Valkeinen
715ffc259dSYuti AmonkarpatternProperties:
72074e9915SSwapnil Jakhade  '^phy@[0-3]$':
735ffc259dSYuti Amonkar    type: object
745ffc259dSYuti Amonkar    description:
755ffc259dSYuti Amonkar      Each group of PHY lanes with a single master lane should be represented as a sub-node.
765ffc259dSYuti Amonkar    properties:
775ffc259dSYuti Amonkar      reg:
785ffc259dSYuti Amonkar        description:
795ffc259dSYuti Amonkar          The master lane number. This is the lowest numbered lane in the lane group.
80074e9915SSwapnil Jakhade        minimum: 0
81074e9915SSwapnil Jakhade        maximum: 3
825ffc259dSYuti Amonkar
835ffc259dSYuti Amonkar      resets:
845ffc259dSYuti Amonkar        minItems: 1
855ffc259dSYuti Amonkar        maxItems: 4
865ffc259dSYuti Amonkar        description:
875ffc259dSYuti Amonkar          Contains list of resets, one per lane, to get all the link lanes out of reset.
885ffc259dSYuti Amonkar
895ffc259dSYuti Amonkar      "#phy-cells":
905ffc259dSYuti Amonkar        const: 0
915ffc259dSYuti Amonkar
925ffc259dSYuti Amonkar      cdns,phy-type:
935ffc259dSYuti Amonkar        description:
945ffc259dSYuti Amonkar          Specifies the type of PHY for which the group of PHY lanes is used.
955ffc259dSYuti Amonkar          Refer include/dt-bindings/phy/phy.h. Constants from the header should be used.
963d21a460SRob Herring        $ref: /schemas/types.yaml#/definitions/uint32
97074e9915SSwapnil Jakhade        minimum: 1
98074e9915SSwapnil Jakhade        maximum: 9
995ffc259dSYuti Amonkar
1005ffc259dSYuti Amonkar      cdns,num-lanes:
1015ffc259dSYuti Amonkar        description:
102074e9915SSwapnil Jakhade          Number of lanes.
1033d21a460SRob Herring        $ref: /schemas/types.yaml#/definitions/uint32
104074e9915SSwapnil Jakhade        enum: [1, 2, 3, 4]
1055ffc259dSYuti Amonkar        default: 4
1065ffc259dSYuti Amonkar
107962fad30SSwapnil Jakhade      cdns,ssc-mode:
108962fad30SSwapnil Jakhade        description:
109962fad30SSwapnil Jakhade          Specifies the Spread Spectrum Clocking mode used. It can be NO_SSC,
110962fad30SSwapnil Jakhade          EXTERNAL_SSC or INTERNAL_SSC.
11153112213SWan Jiabing          Refer include/dt-bindings/phy/phy-cadence.h for the constants to be used.
112962fad30SSwapnil Jakhade        $ref: /schemas/types.yaml#/definitions/uint32
113962fad30SSwapnil Jakhade        enum: [0, 1, 2]
114962fad30SSwapnil Jakhade        default: 0
115962fad30SSwapnil Jakhade
1165ffc259dSYuti Amonkar      cdns,max-bit-rate:
1175ffc259dSYuti Amonkar        description:
1185ffc259dSYuti Amonkar          Maximum DisplayPort link bit rate to use, in Mbps
1193d21a460SRob Herring        $ref: /schemas/types.yaml#/definitions/uint32
1203d21a460SRob Herring        enum: [2160, 2430, 2700, 3240, 4320, 5400, 8100]
1215ffc259dSYuti Amonkar        default: 8100
1225ffc259dSYuti Amonkar
1235ffc259dSYuti Amonkar    required:
1245ffc259dSYuti Amonkar      - reg
1255ffc259dSYuti Amonkar      - resets
1265ffc259dSYuti Amonkar      - "#phy-cells"
1275ffc259dSYuti Amonkar      - cdns,phy-type
128074e9915SSwapnil Jakhade      - cdns,num-lanes
1295ffc259dSYuti Amonkar
1305ffc259dSYuti Amonkar    additionalProperties: false
1315ffc259dSYuti Amonkar
1325ffc259dSYuti Amonkarrequired:
1335ffc259dSYuti Amonkar  - compatible
1345ffc259dSYuti Amonkar  - "#address-cells"
1355ffc259dSYuti Amonkar  - "#size-cells"
1365ffc259dSYuti Amonkar  - clocks
1375ffc259dSYuti Amonkar  - clock-names
1385ffc259dSYuti Amonkar  - reg
1395ffc259dSYuti Amonkar  - reg-names
1405ffc259dSYuti Amonkar  - resets
1414feac940STomi Valkeinen  - reset-names
1425ffc259dSYuti Amonkar
1435ffc259dSYuti AmonkaradditionalProperties: false
1445ffc259dSYuti Amonkar
1455ffc259dSYuti Amonkarexamples:
1465ffc259dSYuti Amonkar  - |
1475ffc259dSYuti Amonkar    #include <dt-bindings/phy/phy.h>
148fba56184SRob Herring
149fba56184SRob Herring    bus {
150fba56184SRob Herring        #address-cells = <2>;
151fba56184SRob Herring        #size-cells = <2>;
152fba56184SRob Herring
153fba56184SRob Herring        torrent-phy@f0fb500000 {
1545ffc259dSYuti Amonkar            compatible = "cdns,torrent-phy";
1555ffc259dSYuti Amonkar            reg = <0xf0 0xfb500000 0x0 0x00100000>,
1565ffc259dSYuti Amonkar                  <0xf0 0xfb030a00 0x0 0x00000040>;
1575ffc259dSYuti Amonkar            reg-names = "torrent_phy", "dptx_phy";
1585ffc259dSYuti Amonkar            resets = <&phyrst 0>;
1594feac940STomi Valkeinen            reset-names = "torrent_reset";
1605ffc259dSYuti Amonkar            clocks = <&ref_clk>;
1615ffc259dSYuti Amonkar            clock-names = "refclk";
1625ffc259dSYuti Amonkar            #address-cells = <1>;
1635ffc259dSYuti Amonkar            #size-cells = <0>;
164fba56184SRob Herring            phy@0 {
1655ffc259dSYuti Amonkar                reg = <0>;
1665ffc259dSYuti Amonkar                resets = <&phyrst 1>, <&phyrst 2>,
1675ffc259dSYuti Amonkar                         <&phyrst 3>, <&phyrst 4>;
1685ffc259dSYuti Amonkar                #phy-cells = <0>;
1695ffc259dSYuti Amonkar                cdns,phy-type = <PHY_TYPE_DP>;
1705ffc259dSYuti Amonkar                cdns,num-lanes = <4>;
1715ffc259dSYuti Amonkar                cdns,max-bit-rate = <8100>;
1725ffc259dSYuti Amonkar            };
1735ffc259dSYuti Amonkar        };
174fba56184SRob Herring    };
175074e9915SSwapnil Jakhade  - |
176074e9915SSwapnil Jakhade    #include <dt-bindings/phy/phy.h>
177fd7abc3cSKishon Vijay Abraham I    #include <dt-bindings/phy/phy-cadence.h>
178074e9915SSwapnil Jakhade
179074e9915SSwapnil Jakhade    bus {
180074e9915SSwapnil Jakhade        #address-cells = <2>;
181074e9915SSwapnil Jakhade        #size-cells = <2>;
182074e9915SSwapnil Jakhade
183074e9915SSwapnil Jakhade        torrent-phy@f0fb500000 {
184074e9915SSwapnil Jakhade            compatible = "cdns,torrent-phy";
185074e9915SSwapnil Jakhade            reg = <0xf0 0xfb500000 0x0 0x00100000>;
186074e9915SSwapnil Jakhade            reg-names = "torrent_phy";
187074e9915SSwapnil Jakhade            resets = <&phyrst 0>, <&phyrst 1>;
1884feac940STomi Valkeinen            reset-names = "torrent_reset", "torrent_apb";
189074e9915SSwapnil Jakhade            clocks = <&ref_clk>;
190074e9915SSwapnil Jakhade            clock-names = "refclk";
191074e9915SSwapnil Jakhade            #address-cells = <1>;
192074e9915SSwapnil Jakhade            #size-cells = <0>;
193074e9915SSwapnil Jakhade            phy@0 {
194074e9915SSwapnil Jakhade                reg = <0>;
195074e9915SSwapnil Jakhade                resets = <&phyrst 2>, <&phyrst 3>;
196074e9915SSwapnil Jakhade                #phy-cells = <0>;
197074e9915SSwapnil Jakhade                cdns,phy-type = <PHY_TYPE_PCIE>;
198074e9915SSwapnil Jakhade                cdns,num-lanes = <2>;
199253f06c7SSwapnil Jakhade                cdns,ssc-mode = <CDNS_SERDES_NO_SSC>;
200074e9915SSwapnil Jakhade            };
201074e9915SSwapnil Jakhade
202074e9915SSwapnil Jakhade            phy@2 {
203074e9915SSwapnil Jakhade                reg = <2>;
204074e9915SSwapnil Jakhade                resets = <&phyrst 4>;
205074e9915SSwapnil Jakhade                #phy-cells = <0>;
206074e9915SSwapnil Jakhade                cdns,phy-type = <PHY_TYPE_SGMII>;
207074e9915SSwapnil Jakhade                cdns,num-lanes = <1>;
208253f06c7SSwapnil Jakhade                cdns,ssc-mode = <CDNS_SERDES_NO_SSC>;
209074e9915SSwapnil Jakhade            };
210074e9915SSwapnil Jakhade        };
211074e9915SSwapnil Jakhade    };
2125ffc259dSYuti Amonkar...
213