Files
linux/Documentation/devicetree/bindings/phy/rockchip,pcie3-phy.yaml
Niklas Cassel 46492d1006 dt-bindings: phy: rockchip,pcie3-phy: add rockchip,rx-common-refclk-mode
>From the RK3588 Technical Reference Manual, Part1,
section 6.19 PCIe3PHY_GRF Register Description:
"rxX_cmn_refclk_mode"
RX common reference clock mode for lane X. This mode should be enabled
only when the far-end and near-end devices are running with a common
reference clock.

The hardware reset value for this field is 0x1 (enabled).
Note that this register field is only available on RK3588, not on RK3568.

The link training either fails or is highly unstable (link state will jump
continuously between L0 and recovery) when this mode is enabled while
using an endpoint running in Separate Reference Clock with No SSC (SRNS)
mode or Separate Reference Clock with SSC (SRIS) mode.
(Which is usually the case when using a real SoC as endpoint, e.g. the
RK3588 PCIe controller can run in both Root Complex and Endpoint mode.)

Add a rockchip specific property to enable/disable the rxX_cmn_refclk_mode
per lane. (Since this PHY supports bifurcation.)

Signed-off-by: Niklas Cassel <cassel@kernel.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20240412125818.17052-2-cassel@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2024-04-13 11:36:15 +05:30

114 lines
2.5 KiB
YAML

# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/phy/rockchip,pcie3-phy.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Rockchip PCIe v3 phy
maintainers:
- Heiko Stuebner <heiko@sntech.de>
properties:
compatible:
enum:
- rockchip,rk3568-pcie3-phy
- rockchip,rk3588-pcie3-phy
reg:
maxItems: 1
clocks:
minItems: 1
maxItems: 3
clock-names:
minItems: 1
maxItems: 3
data-lanes:
description: which lanes (by position) should be mapped to which
controller (value). 0 means lane disabled, higher value means used.
(controller-number +1 )
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 2
maxItems: 16
items:
minimum: 0
maximum: 16
"#phy-cells":
const: 0
resets:
maxItems: 1
reset-names:
const: phy
rockchip,phy-grf:
$ref: /schemas/types.yaml#/definitions/phandle
description: phandle to the syscon managing the phy "general register files"
rockchip,pipe-grf:
$ref: /schemas/types.yaml#/definitions/phandle
description: phandle to the syscon managing the pipe "general register files"
rockchip,rx-common-refclk-mode:
description: which lanes (by position) should be configured to run in
RX common reference clock mode. 0 means disabled, 1 means enabled.
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 16
items:
minimum: 0
maximum: 1
required:
- compatible
- reg
- rockchip,phy-grf
- "#phy-cells"
allOf:
- if:
properties:
compatible:
enum:
- rockchip,rk3588-pcie3-phy
then:
properties:
clocks:
maxItems: 1
clock-names:
items:
- const: pclk
else:
properties:
clocks:
minItems: 3
clock-names:
items:
- const: refclk_m
- const: refclk_n
- const: pclk
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/rk3568-cru.h>
pcie30phy: phy@fe8c0000 {
compatible = "rockchip,rk3568-pcie3-phy";
reg = <0xfe8c0000 0x20000>;
#phy-cells = <0>;
clocks = <&pmucru CLK_PCIE30PHY_REF_M>,
<&pmucru CLK_PCIE30PHY_REF_N>,
<&cru PCLK_PCIE30PHY>;
clock-names = "refclk_m", "refclk_n", "pclk";
resets = <&cru SRST_PCIE30PHY>;
reset-names = "phy";
rockchip,phy-grf = <&pcie30_phy_grf>;
};