xref: /openbmc/linux/Documentation/devicetree/bindings/phy/nvidia,tegra20-usb-phy.yaml (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
16941d194SDmitry Osipenko# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
26941d194SDmitry Osipenko%YAML 1.2
36941d194SDmitry Osipenko---
46941d194SDmitry Osipenko$id: http://devicetree.org/schemas/phy/nvidia,tegra20-usb-phy.yaml#
56941d194SDmitry Osipenko$schema: http://devicetree.org/meta-schemas/core.yaml#
66941d194SDmitry Osipenko
76941d194SDmitry Osipenkotitle: NVIDIA Tegra USB PHY
86941d194SDmitry Osipenko
96941d194SDmitry Osipenkomaintainers:
106941d194SDmitry Osipenko  - Dmitry Osipenko <digetx@gmail.com>
116941d194SDmitry Osipenko  - Jon Hunter <jonathanh@nvidia.com>
126941d194SDmitry Osipenko  - Thierry Reding <thierry.reding@gmail.com>
136941d194SDmitry Osipenko
146941d194SDmitry Osipenkoproperties:
156941d194SDmitry Osipenko  compatible:
166941d194SDmitry Osipenko    oneOf:
176941d194SDmitry Osipenko      - items:
186941d194SDmitry Osipenko          - enum:
196941d194SDmitry Osipenko              - nvidia,tegra124-usb-phy
206941d194SDmitry Osipenko              - nvidia,tegra114-usb-phy
216941d194SDmitry Osipenko          - enum:
226941d194SDmitry Osipenko              - nvidia,tegra30-usb-phy
236941d194SDmitry Osipenko      - items:
246941d194SDmitry Osipenko          - enum:
256941d194SDmitry Osipenko              - nvidia,tegra30-usb-phy
266941d194SDmitry Osipenko              - nvidia,tegra20-usb-phy
276941d194SDmitry Osipenko
286941d194SDmitry Osipenko  reg:
296941d194SDmitry Osipenko    minItems: 1
306941d194SDmitry Osipenko    maxItems: 2
316941d194SDmitry Osipenko    description: |
326941d194SDmitry Osipenko      PHY0 and PHY2 share power and ground, PHY0 contains shared registers.
336941d194SDmitry Osipenko      PHY0 and PHY2 must specify two register sets, where the first set is
346941d194SDmitry Osipenko      PHY own registers and the second set is the PHY0 registers.
356941d194SDmitry Osipenko
366941d194SDmitry Osipenko  clocks:
376941d194SDmitry Osipenko    anyOf:
386941d194SDmitry Osipenko      - items:
396941d194SDmitry Osipenko          - description: Registers clock
406941d194SDmitry Osipenko          - description: Main PHY clock
416941d194SDmitry Osipenko
426941d194SDmitry Osipenko      - items:
436941d194SDmitry Osipenko          - description: Registers clock
446941d194SDmitry Osipenko          - description: Main PHY clock
456941d194SDmitry Osipenko          - description: ULPI PHY clock
466941d194SDmitry Osipenko
476941d194SDmitry Osipenko      - items:
486941d194SDmitry Osipenko          - description: Registers clock
496941d194SDmitry Osipenko          - description: Main PHY clock
506941d194SDmitry Osipenko          - description: UTMI pads control registers clock
516941d194SDmitry Osipenko
526941d194SDmitry Osipenko      - items:
536941d194SDmitry Osipenko          - description: Registers clock
546941d194SDmitry Osipenko          - description: Main PHY clock
556941d194SDmitry Osipenko          - description: UTMI timeout clock
566941d194SDmitry Osipenko          - description: UTMI pads control registers clock
576941d194SDmitry Osipenko
586941d194SDmitry Osipenko  clock-names:
596941d194SDmitry Osipenko    oneOf:
606941d194SDmitry Osipenko      - items:
616941d194SDmitry Osipenko          - const: reg
626941d194SDmitry Osipenko          - const: pll_u
636941d194SDmitry Osipenko
646941d194SDmitry Osipenko      - items:
656941d194SDmitry Osipenko          - const: reg
666941d194SDmitry Osipenko          - const: pll_u
676941d194SDmitry Osipenko          - const: ulpi-link
686941d194SDmitry Osipenko
696941d194SDmitry Osipenko      - items:
706941d194SDmitry Osipenko          - const: reg
716941d194SDmitry Osipenko          - const: pll_u
726941d194SDmitry Osipenko          - const: utmi-pads
736941d194SDmitry Osipenko
746941d194SDmitry Osipenko      - items:
756941d194SDmitry Osipenko          - const: reg
766941d194SDmitry Osipenko          - const: pll_u
776941d194SDmitry Osipenko          - const: timer
786941d194SDmitry Osipenko          - const: utmi-pads
796941d194SDmitry Osipenko
80*7557c1bfSDmitry Osipenko  interrupts:
81*7557c1bfSDmitry Osipenko    maxItems: 1
82*7557c1bfSDmitry Osipenko
836941d194SDmitry Osipenko  resets:
846941d194SDmitry Osipenko    oneOf:
856941d194SDmitry Osipenko      - maxItems: 1
866941d194SDmitry Osipenko        description: PHY reset
876941d194SDmitry Osipenko
886941d194SDmitry Osipenko      - items:
896941d194SDmitry Osipenko          - description: PHY reset
906941d194SDmitry Osipenko          - description: UTMI pads reset
916941d194SDmitry Osipenko
926941d194SDmitry Osipenko  reset-names:
936941d194SDmitry Osipenko    oneOf:
946941d194SDmitry Osipenko      - const: usb
956941d194SDmitry Osipenko
966941d194SDmitry Osipenko      - items:
976941d194SDmitry Osipenko          - const: usb
986941d194SDmitry Osipenko          - const: utmi-pads
996941d194SDmitry Osipenko
1006941d194SDmitry Osipenko  "#phy-cells":
1016941d194SDmitry Osipenko    const: 0
1026941d194SDmitry Osipenko
1036941d194SDmitry Osipenko  phy_type:
1046941d194SDmitry Osipenko    $ref: /schemas/types.yaml#/definitions/string
1056941d194SDmitry Osipenko    enum: [utmi, ulpi, hsic]
1066941d194SDmitry Osipenko
1076941d194SDmitry Osipenko  dr_mode:
1086941d194SDmitry Osipenko    $ref: /schemas/types.yaml#/definitions/string
1096941d194SDmitry Osipenko    enum: [host, peripheral, otg]
1106941d194SDmitry Osipenko    default: host
1116941d194SDmitry Osipenko
1126941d194SDmitry Osipenko  vbus-supply:
1136941d194SDmitry Osipenko    description: Regulator controlling USB VBUS.
1146941d194SDmitry Osipenko
1156941d194SDmitry Osipenko  nvidia,has-legacy-mode:
1166941d194SDmitry Osipenko    description: |
1176941d194SDmitry Osipenko      Indicates whether this controller can operate in legacy mode
1186941d194SDmitry Osipenko      (as APX 2500 / 2600). In legacy mode some registers are accessed
1196941d194SDmitry Osipenko      through the APB_MISC base address instead of the USB controller.
1206941d194SDmitry Osipenko    type: boolean
1216941d194SDmitry Osipenko
1226941d194SDmitry Osipenko  nvidia,is-wired:
1236941d194SDmitry Osipenko    description: |
1246941d194SDmitry Osipenko      Indicates whether we can do certain kind of power optimizations for
1256941d194SDmitry Osipenko      the devices that are always connected. e.g. modem.
1266941d194SDmitry Osipenko    type: boolean
1276941d194SDmitry Osipenko
1286941d194SDmitry Osipenko  nvidia,has-utmi-pad-registers:
1296941d194SDmitry Osipenko    description: |
1306941d194SDmitry Osipenko      Indicates whether this controller contains the UTMI pad control
1316941d194SDmitry Osipenko      registers common to all USB controllers.
1326941d194SDmitry Osipenko    type: boolean
1336941d194SDmitry Osipenko
1346941d194SDmitry Osipenko  nvidia,hssync-start-delay:
1356941d194SDmitry Osipenko    $ref: /schemas/types.yaml#/definitions/uint32
1366941d194SDmitry Osipenko    minimum: 0
1376941d194SDmitry Osipenko    maximum: 31
1386941d194SDmitry Osipenko    description: |
1396941d194SDmitry Osipenko      Number of 480 MHz clock cycles to wait before start of sync launches
1406941d194SDmitry Osipenko      RxActive.
1416941d194SDmitry Osipenko
1426941d194SDmitry Osipenko  nvidia,elastic-limit:
1436941d194SDmitry Osipenko    $ref: /schemas/types.yaml#/definitions/uint32
1446941d194SDmitry Osipenko    minimum: 0
1456941d194SDmitry Osipenko    maximum: 31
1466941d194SDmitry Osipenko    description: Variable FIFO Depth of elastic input store.
1476941d194SDmitry Osipenko
1486941d194SDmitry Osipenko  nvidia,idle-wait-delay:
1496941d194SDmitry Osipenko    $ref: /schemas/types.yaml#/definitions/uint32
1506941d194SDmitry Osipenko    minimum: 0
1516941d194SDmitry Osipenko    maximum: 31
1526941d194SDmitry Osipenko    description: |
1536941d194SDmitry Osipenko      Number of 480 MHz clock cycles of idle to wait before declare IDLE.
1546941d194SDmitry Osipenko
1556941d194SDmitry Osipenko  nvidia,term-range-adj:
1566941d194SDmitry Osipenko    $ref: /schemas/types.yaml#/definitions/uint32
1576941d194SDmitry Osipenko    minimum: 0
1586941d194SDmitry Osipenko    maximum: 15
1596941d194SDmitry Osipenko    description: Range adjustment on terminations.
1606941d194SDmitry Osipenko
1616941d194SDmitry Osipenko  nvidia,xcvr-setup:
1626941d194SDmitry Osipenko    $ref: /schemas/types.yaml#/definitions/uint32
1636941d194SDmitry Osipenko    minimum: 0
1646941d194SDmitry Osipenko    maximum: 127
1656941d194SDmitry Osipenko    description: Input of XCVR cell, HS driver output control.
1666941d194SDmitry Osipenko
1676941d194SDmitry Osipenko  nvidia,xcvr-setup-use-fuses:
1686941d194SDmitry Osipenko    description: Indicates that the value is read from the on-chip fuses.
1696941d194SDmitry Osipenko    type: boolean
1706941d194SDmitry Osipenko
1716941d194SDmitry Osipenko  nvidia,xcvr-lsfslew:
1726941d194SDmitry Osipenko    $ref: /schemas/types.yaml#/definitions/uint32
1736941d194SDmitry Osipenko    minimum: 0
1746941d194SDmitry Osipenko    maximum: 3
1756941d194SDmitry Osipenko    description: LS falling slew rate control.
1766941d194SDmitry Osipenko
1776941d194SDmitry Osipenko  nvidia,xcvr-lsrslew:
1786941d194SDmitry Osipenko    $ref: /schemas/types.yaml#/definitions/uint32
1796941d194SDmitry Osipenko    minimum: 0
1806941d194SDmitry Osipenko    maximum: 3
1816941d194SDmitry Osipenko    description: LS rising slew rate control.
1826941d194SDmitry Osipenko
1836941d194SDmitry Osipenko  nvidia,xcvr-hsslew:
1846941d194SDmitry Osipenko    $ref: /schemas/types.yaml#/definitions/uint32
1856941d194SDmitry Osipenko    minimum: 0
1866941d194SDmitry Osipenko    maximum: 511
1876941d194SDmitry Osipenko    description: HS slew rate control.
1886941d194SDmitry Osipenko
1896941d194SDmitry Osipenko  nvidia,hssquelch-level:
1906941d194SDmitry Osipenko    $ref: /schemas/types.yaml#/definitions/uint32
1916941d194SDmitry Osipenko    minimum: 0
1926941d194SDmitry Osipenko    maximum: 3
1936941d194SDmitry Osipenko    description: HS squelch detector level.
1946941d194SDmitry Osipenko
1956941d194SDmitry Osipenko  nvidia,hsdiscon-level:
1966941d194SDmitry Osipenko    $ref: /schemas/types.yaml#/definitions/uint32
1976941d194SDmitry Osipenko    minimum: 0
1986941d194SDmitry Osipenko    maximum: 7
1996941d194SDmitry Osipenko    description: HS disconnect detector level.
2006941d194SDmitry Osipenko
2016941d194SDmitry Osipenko  nvidia,phy-reset-gpio:
2026941d194SDmitry Osipenko    maxItems: 1
2036941d194SDmitry Osipenko    description: GPIO used to reset the PHY.
2046941d194SDmitry Osipenko
205*7557c1bfSDmitry Osipenko  nvidia,pmc:
206*7557c1bfSDmitry Osipenko    $ref: /schemas/types.yaml#/definitions/phandle-array
207*7557c1bfSDmitry Osipenko    items:
208*7557c1bfSDmitry Osipenko      - items:
209*7557c1bfSDmitry Osipenko          - description: Phandle to Power Management controller.
210*7557c1bfSDmitry Osipenko          - description: USB controller ID.
211*7557c1bfSDmitry Osipenko    description:
212*7557c1bfSDmitry Osipenko      Phandle to Power Management controller.
213*7557c1bfSDmitry Osipenko
2146941d194SDmitry Osipenkorequired:
2156941d194SDmitry Osipenko  - compatible
2166941d194SDmitry Osipenko  - reg
2176941d194SDmitry Osipenko  - clocks
2186941d194SDmitry Osipenko  - clock-names
2196941d194SDmitry Osipenko  - resets
2206941d194SDmitry Osipenko  - reset-names
2216941d194SDmitry Osipenko  - "#phy-cells"
2226941d194SDmitry Osipenko  - phy_type
2236941d194SDmitry Osipenko
2246941d194SDmitry OsipenkoadditionalProperties: false
2256941d194SDmitry Osipenko
2266941d194SDmitry OsipenkoallOf:
2276941d194SDmitry Osipenko  - if:
2286941d194SDmitry Osipenko      properties:
2296941d194SDmitry Osipenko        phy_type:
2306941d194SDmitry Osipenko          const: utmi
2316941d194SDmitry Osipenko
2326941d194SDmitry Osipenko    then:
2336941d194SDmitry Osipenko      properties:
2346941d194SDmitry Osipenko        reg:
2356941d194SDmitry Osipenko          minItems: 2
2366941d194SDmitry Osipenko          maxItems: 2
2376941d194SDmitry Osipenko
2386941d194SDmitry Osipenko        resets:
2396941d194SDmitry Osipenko          maxItems: 2
2406941d194SDmitry Osipenko
2416941d194SDmitry Osipenko        reset-names:
2426941d194SDmitry Osipenko          maxItems: 2
2436941d194SDmitry Osipenko
2446941d194SDmitry Osipenko      required:
2456941d194SDmitry Osipenko        - nvidia,hssync-start-delay
2466941d194SDmitry Osipenko        - nvidia,elastic-limit
2476941d194SDmitry Osipenko        - nvidia,idle-wait-delay
2486941d194SDmitry Osipenko        - nvidia,term-range-adj
2496941d194SDmitry Osipenko        - nvidia,xcvr-lsfslew
2506941d194SDmitry Osipenko        - nvidia,xcvr-lsrslew
2516941d194SDmitry Osipenko
2526941d194SDmitry Osipenko      anyOf:
2536941d194SDmitry Osipenko        - required: ["nvidia,xcvr-setup"]
2546941d194SDmitry Osipenko        - required: ["nvidia,xcvr-setup-use-fuses"]
2556941d194SDmitry Osipenko
2566941d194SDmitry Osipenko      if:
2576941d194SDmitry Osipenko        properties:
2586941d194SDmitry Osipenko          compatible:
2596941d194SDmitry Osipenko            contains:
2606941d194SDmitry Osipenko              const: nvidia,tegra30-usb-phy
2616941d194SDmitry Osipenko
2626941d194SDmitry Osipenko      then:
2636941d194SDmitry Osipenko        properties:
2646941d194SDmitry Osipenko          clocks:
2656941d194SDmitry Osipenko            maxItems: 3
2666941d194SDmitry Osipenko
2676941d194SDmitry Osipenko          clock-names:
2686941d194SDmitry Osipenko            items:
2696941d194SDmitry Osipenko              - const: reg
2706941d194SDmitry Osipenko              - const: pll_u
2716941d194SDmitry Osipenko              - const: utmi-pads
2726941d194SDmitry Osipenko
2736941d194SDmitry Osipenko        required:
2746941d194SDmitry Osipenko          - nvidia,xcvr-hsslew
2756941d194SDmitry Osipenko          - nvidia,hssquelch-level
2766941d194SDmitry Osipenko          - nvidia,hsdiscon-level
2776941d194SDmitry Osipenko
2786941d194SDmitry Osipenko      else:
2796941d194SDmitry Osipenko        properties:
2806941d194SDmitry Osipenko          clocks:
2816941d194SDmitry Osipenko            maxItems: 4
2826941d194SDmitry Osipenko
2836941d194SDmitry Osipenko          clock-names:
2846941d194SDmitry Osipenko            items:
2856941d194SDmitry Osipenko              - const: reg
2866941d194SDmitry Osipenko              - const: pll_u
2876941d194SDmitry Osipenko              - const: timer
2886941d194SDmitry Osipenko              - const: utmi-pads
2896941d194SDmitry Osipenko
2906941d194SDmitry Osipenko  - if:
2916941d194SDmitry Osipenko      properties:
2926941d194SDmitry Osipenko        phy_type:
2936941d194SDmitry Osipenko          const: ulpi
2946941d194SDmitry Osipenko
2956941d194SDmitry Osipenko    then:
2966941d194SDmitry Osipenko      properties:
2976941d194SDmitry Osipenko        reg:
2986941d194SDmitry Osipenko          minItems: 1
2996941d194SDmitry Osipenko          maxItems: 1
3006941d194SDmitry Osipenko
3016941d194SDmitry Osipenko        clocks:
3026941d194SDmitry Osipenko          minItems: 2
3036941d194SDmitry Osipenko          maxItems: 3
3046941d194SDmitry Osipenko
3056941d194SDmitry Osipenko        clock-names:
3066941d194SDmitry Osipenko          minItems: 2
3076941d194SDmitry Osipenko          maxItems: 3
3086941d194SDmitry Osipenko
3096941d194SDmitry Osipenko          oneOf:
3106941d194SDmitry Osipenko            - items:
3116941d194SDmitry Osipenko                - const: reg
3126941d194SDmitry Osipenko                - const: pll_u
3136941d194SDmitry Osipenko
3146941d194SDmitry Osipenko            - items:
3156941d194SDmitry Osipenko                - const: reg
3166941d194SDmitry Osipenko                - const: pll_u
3176941d194SDmitry Osipenko                - const: ulpi-link
3186941d194SDmitry Osipenko
3196941d194SDmitry Osipenko        resets:
3206941d194SDmitry Osipenko          minItems: 1
3216941d194SDmitry Osipenko          maxItems: 2
3226941d194SDmitry Osipenko
3236941d194SDmitry Osipenko        reset-names:
3246941d194SDmitry Osipenko          minItems: 1
3256941d194SDmitry Osipenko          maxItems: 2
3266941d194SDmitry Osipenko
3276941d194SDmitry Osipenkoexamples:
3286941d194SDmitry Osipenko  - |
3296941d194SDmitry Osipenko    #include <dt-bindings/clock/tegra124-car.h>
3306941d194SDmitry Osipenko
3316941d194SDmitry Osipenko    usb-phy@7d008000 {
3326941d194SDmitry Osipenko        compatible = "nvidia,tegra124-usb-phy", "nvidia,tegra30-usb-phy";
3336941d194SDmitry Osipenko        reg = <0x7d008000 0x4000>,
3346941d194SDmitry Osipenko              <0x7d000000 0x4000>;
335*7557c1bfSDmitry Osipenko        interrupts = <0 97 4>;
3366941d194SDmitry Osipenko        phy_type = "utmi";
3376941d194SDmitry Osipenko        clocks = <&tegra_car TEGRA124_CLK_USB3>,
3386941d194SDmitry Osipenko                 <&tegra_car TEGRA124_CLK_PLL_U>,
3396941d194SDmitry Osipenko                 <&tegra_car TEGRA124_CLK_USBD>;
3406941d194SDmitry Osipenko        clock-names = "reg", "pll_u", "utmi-pads";
3416941d194SDmitry Osipenko        resets = <&tegra_car 59>, <&tegra_car 22>;
3426941d194SDmitry Osipenko        reset-names = "usb", "utmi-pads";
3436941d194SDmitry Osipenko        #phy-cells = <0>;
3446941d194SDmitry Osipenko        nvidia,hssync-start-delay = <0>;
3456941d194SDmitry Osipenko        nvidia,idle-wait-delay = <17>;
3466941d194SDmitry Osipenko        nvidia,elastic-limit = <16>;
3476941d194SDmitry Osipenko        nvidia,term-range-adj = <6>;
3486941d194SDmitry Osipenko        nvidia,xcvr-setup = <9>;
3496941d194SDmitry Osipenko        nvidia,xcvr-lsfslew = <0>;
3506941d194SDmitry Osipenko        nvidia,xcvr-lsrslew = <3>;
3516941d194SDmitry Osipenko        nvidia,hssquelch-level = <2>;
3526941d194SDmitry Osipenko        nvidia,hsdiscon-level = <5>;
3536941d194SDmitry Osipenko        nvidia,xcvr-hsslew = <12>;
354*7557c1bfSDmitry Osipenko        nvidia,pmc = <&tegra_pmc 2>;
3556941d194SDmitry Osipenko    };
3566941d194SDmitry Osipenko
3576941d194SDmitry Osipenko  - |
3586941d194SDmitry Osipenko    #include <dt-bindings/clock/tegra20-car.h>
3596941d194SDmitry Osipenko
3606941d194SDmitry Osipenko    usb-phy@c5004000 {
3616941d194SDmitry Osipenko        compatible = "nvidia,tegra20-usb-phy";
3626941d194SDmitry Osipenko        reg = <0xc5004000 0x4000>;
363*7557c1bfSDmitry Osipenko        interrupts = <0 21 4>;
3646941d194SDmitry Osipenko        phy_type = "ulpi";
3656941d194SDmitry Osipenko        clocks = <&tegra_car TEGRA20_CLK_USB2>,
3666941d194SDmitry Osipenko                 <&tegra_car TEGRA20_CLK_PLL_U>,
3676941d194SDmitry Osipenko                 <&tegra_car TEGRA20_CLK_CDEV2>;
3686941d194SDmitry Osipenko        clock-names = "reg", "pll_u", "ulpi-link";
3696941d194SDmitry Osipenko        resets = <&tegra_car 58>, <&tegra_car 22>;
3706941d194SDmitry Osipenko        reset-names = "usb", "utmi-pads";
3716941d194SDmitry Osipenko        #phy-cells = <0>;
372*7557c1bfSDmitry Osipenko        nvidia,pmc = <&tegra_pmc 1>;
3736941d194SDmitry Osipenko    };
374