SpacemiT K1 PCIe/USB3 Combo PHY

Schema identifier ($id): "http://devicetree.org/schemas/phy/spacemit,k1-combo-phy.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Alex Elder <elder@riscstar.com>"

Of the three PHYs on the SpacemiT K1 SoC capable of being used for PCIe, one is a combo PHY that can also be configured for use by a USB 3 controller. Using PCIe or USB 3 is a board design decision. The combo PHY is also the only PCIe PHY that is able to determine PCIe calibration values to use, and this must be determined before the other two PCIe PHYs can be used. This calibration must be performed with the combo PHY in PCIe mode, and is this is done when the combo PHY is probed. The combo PHY uses an external oscillator as a reference clock. During normal operation, the PCIe or USB port driver is responsible for ensuring all other clocks needed by a PHY are enabled, and all resets affecting the PHY are deasserted. However, for the combo PHY to perform calibration independent of whether it's later used for PCIe or USB, all PCIe mode clocks and resets must be defined.

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "spacemit,k1-combo-phy"

reg — required here #

Array item rules (items) #

Item 1

PHY control registers

clocks — required here #

Array item rules (items) #

Item 1

External oscillator used by the PHY PLL

Item 2

DWC PCIe Data Bus Interface (DBI) clock

Item 3

DWC PCIe application AXI-bus Master interface clock

Item 4

DWC PCIe application AXI-bus slave interface clock

clock-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "refclk"

Item 2

Exact value (const): "dbi"

Item 3

Exact value (const): "mstr"

Item 4

Exact value (const): "slv"

resets — required here #

Array item rules (items) #

Item 1

PHY reset; remains deasserted after initialization

Item 2

DWC PCIe Data Bus Interface (DBI) reset

Item 3

DWC PCIe application AXI-bus Master interface reset

Item 4

DWC PCIe application AXI-bus slave interface reset

reset-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "phy"

Item 2

Exact value (const): "dbi"

Item 3

Exact value (const): "mstr"

Item 4

Exact value (const): "slv"

spacemit,apmu — required here #

A phandle that refers to the APMU system controller, whose regmap is used in setting the mode

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle

#phy-cells — required here #

Exact value (const): 1

The argument value (PHY_TYPE_PCIE or PHY_TYPE_USB3) determines whether the PHY operates in PCIe or USB3 mode.

Required in this object (required): "compatible", "reg", "clocks", "clock-names", "resets", "reset-names", "spacemit,apmu", "#phy-cells"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/clock/spacemit,k1-syscon.h>
phy@c0b10000 {
    compatible = "spacemit,k1-combo-phy";
    reg = <0xc0b10000 0x1000>;
    clocks = <&vctcxo_24m>,
             <&syscon_apmu CLK_PCIE0_DBI>,
             <&syscon_apmu CLK_PCIE0_MASTER>,
             <&syscon_apmu CLK_PCIE0_SLAVE>;
    clock-names = "refclk",
                  "dbi",
                  "mstr",
                  "slv";
    resets = <&syscon_apmu RESET_PCIE0_GLOBAL>,
             <&syscon_apmu RESET_PCIE0_DBI>,
             <&syscon_apmu RESET_PCIE0_MASTER>,
             <&syscon_apmu RESET_PCIE0_SLAVE>;
    reset-names = "phy",
                  "dbi",
                  "mstr",
                  "slv";
    spacemit,apmu = <&syscon_apmu>;
    #phy-cells = <1>;
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page