Re: [PATCH v3 2/2] phy: ti: ti-pipe3: allow configuring ACSPCIe TX/RX mode

From: Krzysztof Kozlowski

Date: Wed Sep 09 2026 - 03:42:26 EST


On Sat, Sep 05, 2026 at 11:15:55PM +0200, David Oberhollenzer wrote:
> For the PCIe PHYs, read the property from the device tree and
> update the RX/TX mode selection bits in the specified syscon
> register.
>
> Signed-off-by: David Oberhollenzer <david.oberhollenzer@xxxxxxxxxxxxx>
> ---
> drivers/phy/ti/phy-ti-pipe3.c | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/drivers/phy/ti/phy-ti-pipe3.c b/drivers/phy/ti/phy-ti-pipe3.c
> index b5543b5c674c..bc02010dadb7 100644
> --- a/drivers/phy/ti/phy-ti-pipe3.c
> +++ b/drivers/phy/ti/phy-ti-pipe3.c
> @@ -115,6 +115,9 @@
> #define MEM_CDR_LOS_SOURCE_MASK GENMASK(10, 9)
> #define MEM_CDR_LOS_SOURCE_SHIFT 9
>
> +#define PCIE_TX_RX_CTRL_MASK GENMASK(17, 16)
> +#define PCIE_TX_RX_CTRL_SHIFT 16
> +
> /*
> * This is an Empirical value that works, need to confirm the actual
> * value required for the PIPE3PHY_PLL_CONFIGURATION2.PLL_IDLE status
> @@ -785,6 +788,24 @@ static int ti_pipe3_get_pll_base(struct ti_pipe3 *phy)
> return PTR_ERR_OR_ZERO(phy->pll_ctrl_base);
> }
>
> +static int ti_pipe3_acspcie_tx_rx_mode(struct ti_pipe3 *phy)
> +{
> + struct device_node *np = phy->dev->of_node;
> + struct regmap *regmap;
> + unsigned int args[2];
> +
> + regmap = syscon_regmap_lookup_by_phandle_args(np,
> + "ti,syscon-acspcie-tx-rx",
> + 2, args);
> + if (IS_ERR(regmap)) {
> + dev_warn(phy->dev, "can't get ti,syscon-acspcie-tx-rx\n");
> + return -EINVAL;
> + }
> +
> + return regmap_update_bits(regmap, args[0], PCIE_TX_RX_CTRL_MASK,
> + args[1] << PCIE_TX_RX_CTRL_SHIFT);
> +}
> +
> static int ti_pipe3_probe(struct platform_device *pdev)
> {
> struct ti_pipe3 *phy;
> @@ -807,6 +828,12 @@ static int ti_pipe3_probe(struct platform_device *pdev)
> phy->dpll_map = data->dpll_map;
> phy->settings = data->settings;
>
> + if (phy->mode == PIPE3_MODE_PCIE) {
> + ret = ti_pipe3_acspcie_tx_rx_mode(phy);
> + if (ret)
> + dev_warn(dev, "failed to set ACSPCIe TX/RX mode\n");

This looks like new warning for existing ABI without any explanation why
is this a warning. Was it working? If yes, why existing boards should
warn now?

Best regards,
Krzysztof