xref: /freebsd/sys/contrib/device-tree/Bindings/phy/mediatek,xsphy.yaml (revision 7ef62cebc2f965b0f640263e179276928885e33d)
15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
25def4c47SEmmanuel Vadot# Copyright (c) 2020 MediaTek
35def4c47SEmmanuel Vadot%YAML 1.2
45def4c47SEmmanuel Vadot---
55def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/phy/mediatek,xsphy.yaml#
65def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
75def4c47SEmmanuel Vadot
8*7ef62cebSEmmanuel Vadottitle: MediaTek XS-PHY Controller
95def4c47SEmmanuel Vadot
105def4c47SEmmanuel Vadotmaintainers:
115def4c47SEmmanuel Vadot  - Chunfeng Yun <chunfeng.yun@mediatek.com>
125def4c47SEmmanuel Vadot
135def4c47SEmmanuel Vadotdescription: |
145def4c47SEmmanuel Vadot  The XS-PHY controller supports physical layer functionality for USB3.1
155def4c47SEmmanuel Vadot  GEN2 controller on MediaTek SoCs.
165def4c47SEmmanuel Vadot
175def4c47SEmmanuel Vadot  Banks layout of xsphy
185def4c47SEmmanuel Vadot  ----------------------------------
195def4c47SEmmanuel Vadot  port        offset    bank
205def4c47SEmmanuel Vadot  u2 port0    0x0000    MISC
215def4c47SEmmanuel Vadot              0x0100    FMREG
225def4c47SEmmanuel Vadot              0x0300    U2PHY_COM
235def4c47SEmmanuel Vadot  u2 port1    0x1000    MISC
245def4c47SEmmanuel Vadot              0x1100    FMREG
255def4c47SEmmanuel Vadot              0x1300    U2PHY_COM
265def4c47SEmmanuel Vadot  u2 port2    0x2000    MISC
275def4c47SEmmanuel Vadot              ...
285def4c47SEmmanuel Vadot  u31 common  0x3000    DIG_GLB
295def4c47SEmmanuel Vadot              0x3100    PHYA_GLB
305def4c47SEmmanuel Vadot  u31 port0   0x3400    DIG_LN_TOP
315def4c47SEmmanuel Vadot              0x3500    DIG_LN_TX0
325def4c47SEmmanuel Vadot              0x3600    DIG_LN_RX0
335def4c47SEmmanuel Vadot              0x3700    DIG_LN_DAIF
345def4c47SEmmanuel Vadot              0x3800    PHYA_LN
355def4c47SEmmanuel Vadot  u31 port1   0x3a00    DIG_LN_TOP
365def4c47SEmmanuel Vadot              0x3b00    DIG_LN_TX0
375def4c47SEmmanuel Vadot              0x3c00    DIG_LN_RX0
385def4c47SEmmanuel Vadot              0x3d00    DIG_LN_DAIF
395def4c47SEmmanuel Vadot              0x3e00    PHYA_LN
405def4c47SEmmanuel Vadot              ...
415def4c47SEmmanuel Vadot  DIG_GLB & PHYA_GLB are shared by U31 ports.
425def4c47SEmmanuel Vadot
435def4c47SEmmanuel Vadotproperties:
445def4c47SEmmanuel Vadot  $nodename:
455def4c47SEmmanuel Vadot    pattern: "^xs-phy@[0-9a-f]+$"
465def4c47SEmmanuel Vadot
475def4c47SEmmanuel Vadot  compatible:
485def4c47SEmmanuel Vadot    items:
495def4c47SEmmanuel Vadot      - enum:
505def4c47SEmmanuel Vadot          - mediatek,mt3611-xsphy
515def4c47SEmmanuel Vadot          - mediatek,mt3612-xsphy
525def4c47SEmmanuel Vadot      - const: mediatek,xsphy
535def4c47SEmmanuel Vadot
545def4c47SEmmanuel Vadot  reg:
555def4c47SEmmanuel Vadot    description:
565def4c47SEmmanuel Vadot      Register shared by multiple U3 ports, exclude port's private register,
575def4c47SEmmanuel Vadot      if only U2 ports provided, shouldn't use the property.
585def4c47SEmmanuel Vadot    maxItems: 1
595def4c47SEmmanuel Vadot
605def4c47SEmmanuel Vadot  "#address-cells":
615def4c47SEmmanuel Vadot    enum: [1, 2]
625def4c47SEmmanuel Vadot
635def4c47SEmmanuel Vadot  "#size-cells":
645def4c47SEmmanuel Vadot    enum: [1, 2]
655def4c47SEmmanuel Vadot
665def4c47SEmmanuel Vadot  ranges: true
675def4c47SEmmanuel Vadot
685def4c47SEmmanuel Vadot  mediatek,src-ref-clk-mhz:
695def4c47SEmmanuel Vadot    description:
705def4c47SEmmanuel Vadot      Frequency of reference clock for slew rate calibrate
715def4c47SEmmanuel Vadot    default: 26
725def4c47SEmmanuel Vadot
735def4c47SEmmanuel Vadot  mediatek,src-coef:
745def4c47SEmmanuel Vadot    description:
755def4c47SEmmanuel Vadot      Coefficient for slew rate calibrate, depends on SoC process
765def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
775def4c47SEmmanuel Vadot    default: 17
785def4c47SEmmanuel Vadot
795def4c47SEmmanuel Vadot# Required child node:
805def4c47SEmmanuel VadotpatternProperties:
815def4c47SEmmanuel Vadot  "^usb-phy@[0-9a-f]+$":
825def4c47SEmmanuel Vadot    type: object
835def4c47SEmmanuel Vadot    description:
845def4c47SEmmanuel Vadot      A sub-node is required for each port the controller provides.
855def4c47SEmmanuel Vadot      Address range information including the usual 'reg' property
865def4c47SEmmanuel Vadot      is used inside these nodes to describe the controller's topology.
875def4c47SEmmanuel Vadot
885def4c47SEmmanuel Vadot    properties:
895def4c47SEmmanuel Vadot      reg:
905def4c47SEmmanuel Vadot        maxItems: 1
915def4c47SEmmanuel Vadot
925def4c47SEmmanuel Vadot      clocks:
935def4c47SEmmanuel Vadot        items:
945def4c47SEmmanuel Vadot          - description: Reference clock, (HS is 48Mhz, SS/P is 24~27Mhz)
955def4c47SEmmanuel Vadot
965def4c47SEmmanuel Vadot      clock-names:
975def4c47SEmmanuel Vadot        items:
985def4c47SEmmanuel Vadot          - const: ref
995def4c47SEmmanuel Vadot
1005def4c47SEmmanuel Vadot      "#phy-cells":
1015def4c47SEmmanuel Vadot        const: 1
1025def4c47SEmmanuel Vadot        description: |
1035def4c47SEmmanuel Vadot          The cells contain the following arguments.
1045def4c47SEmmanuel Vadot
1055def4c47SEmmanuel Vadot          - description: The PHY type
1065def4c47SEmmanuel Vadot              enum:
1075def4c47SEmmanuel Vadot                - PHY_TYPE_USB2
1085def4c47SEmmanuel Vadot                - PHY_TYPE_USB3
1095def4c47SEmmanuel Vadot
1105def4c47SEmmanuel Vadot      # The following optional vendor properties are only for debug or HQA test
1115def4c47SEmmanuel Vadot      mediatek,eye-src:
1125def4c47SEmmanuel Vadot        description:
1135def4c47SEmmanuel Vadot          The value of slew rate calibrate (U2 phy)
1145def4c47SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
1155def4c47SEmmanuel Vadot        minimum: 1
1165def4c47SEmmanuel Vadot        maximum: 7
1175def4c47SEmmanuel Vadot
1185def4c47SEmmanuel Vadot      mediatek,eye-vrt:
1195def4c47SEmmanuel Vadot        description:
1205def4c47SEmmanuel Vadot          The selection of VRT reference voltage (U2 phy)
1215def4c47SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
1225def4c47SEmmanuel Vadot        minimum: 1
1235def4c47SEmmanuel Vadot        maximum: 7
1245def4c47SEmmanuel Vadot
1255def4c47SEmmanuel Vadot      mediatek,eye-term:
1265def4c47SEmmanuel Vadot        description:
1275def4c47SEmmanuel Vadot          The selection of HS_TX TERM reference voltage (U2 phy)
1285def4c47SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
1295def4c47SEmmanuel Vadot        minimum: 1
1305def4c47SEmmanuel Vadot        maximum: 7
1315def4c47SEmmanuel Vadot
1325def4c47SEmmanuel Vadot      mediatek,efuse-intr:
1335def4c47SEmmanuel Vadot        description:
1345def4c47SEmmanuel Vadot          The selection of Internal Resistor (U2/U3 phy)
1355def4c47SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
1365def4c47SEmmanuel Vadot        minimum: 1
1375def4c47SEmmanuel Vadot        maximum: 63
1385def4c47SEmmanuel Vadot
1395def4c47SEmmanuel Vadot      mediatek,efuse-tx-imp:
1405def4c47SEmmanuel Vadot        description:
1415def4c47SEmmanuel Vadot          The selection of TX Impedance (U3 phy)
1425def4c47SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
1435def4c47SEmmanuel Vadot        minimum: 1
1445def4c47SEmmanuel Vadot        maximum: 31
1455def4c47SEmmanuel Vadot
1465def4c47SEmmanuel Vadot      mediatek,efuse-rx-imp:
1475def4c47SEmmanuel Vadot        description:
1485def4c47SEmmanuel Vadot          The selection of RX Impedance (U3 phy)
1495def4c47SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
1505def4c47SEmmanuel Vadot        minimum: 1
1515def4c47SEmmanuel Vadot        maximum: 31
1525def4c47SEmmanuel Vadot
1535def4c47SEmmanuel Vadot    required:
1545def4c47SEmmanuel Vadot      - reg
1555def4c47SEmmanuel Vadot      - clocks
1565def4c47SEmmanuel Vadot      - clock-names
1575def4c47SEmmanuel Vadot      - "#phy-cells"
1585def4c47SEmmanuel Vadot
1595def4c47SEmmanuel Vadot    additionalProperties: false
1605def4c47SEmmanuel Vadot
1615def4c47SEmmanuel Vadotrequired:
1625def4c47SEmmanuel Vadot  - compatible
1635def4c47SEmmanuel Vadot  - "#address-cells"
1645def4c47SEmmanuel Vadot  - "#size-cells"
1655def4c47SEmmanuel Vadot  - ranges
1665def4c47SEmmanuel Vadot
1675def4c47SEmmanuel VadotadditionalProperties: false
1685def4c47SEmmanuel Vadot
1695def4c47SEmmanuel Vadotexamples:
1705def4c47SEmmanuel Vadot  - |
1715def4c47SEmmanuel Vadot    #include <dt-bindings/phy/phy.h>
1725def4c47SEmmanuel Vadot
1735def4c47SEmmanuel Vadot    u3phy: xs-phy@11c40000 {
1745def4c47SEmmanuel Vadot        compatible = "mediatek,mt3611-xsphy", "mediatek,xsphy";
1755def4c47SEmmanuel Vadot        reg = <0x11c43000 0x0200>;
1765def4c47SEmmanuel Vadot        mediatek,src-ref-clk-mhz = <26>;
1775def4c47SEmmanuel Vadot        mediatek,src-coef = <17>;
1785def4c47SEmmanuel Vadot        #address-cells = <1>;
1795def4c47SEmmanuel Vadot        #size-cells = <1>;
1805def4c47SEmmanuel Vadot        ranges;
1815def4c47SEmmanuel Vadot
1825def4c47SEmmanuel Vadot        u2port0: usb-phy@11c40000 {
1835def4c47SEmmanuel Vadot            reg = <0x11c40000 0x0400>;
1845def4c47SEmmanuel Vadot            clocks = <&clk48m>;
1855def4c47SEmmanuel Vadot            clock-names = "ref";
1865def4c47SEmmanuel Vadot            mediatek,eye-src = <4>;
1875def4c47SEmmanuel Vadot            #phy-cells = <1>;
1885def4c47SEmmanuel Vadot        };
1895def4c47SEmmanuel Vadot
1905def4c47SEmmanuel Vadot        u3port0: usb-phy@11c43000 {
1915def4c47SEmmanuel Vadot            reg = <0x11c43400 0x0500>;
1925def4c47SEmmanuel Vadot            clocks = <&clk26m>;
1935def4c47SEmmanuel Vadot            clock-names = "ref";
1945def4c47SEmmanuel Vadot            mediatek,efuse-intr = <28>;
1955def4c47SEmmanuel Vadot            #phy-cells = <1>;
1965def4c47SEmmanuel Vadot        };
1975def4c47SEmmanuel Vadot    };
1985def4c47SEmmanuel Vadot
1995def4c47SEmmanuel Vadot...
200