linux/drivers/phy/qualcomm/phy-qcom-pcie2.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2019, Linaro Ltd.
 */

#include <linux/clk-provider.h>
#include <linux/clk.h>
#include <linux/iopoll.h>
#include <linux/module.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
#include <linux/reset.h>
#include <linux/slab.h>

#include <dt-bindings/phy/phy.h>

#define PCIE20_PARF_PHY_STTS
#define PCIE2_PHY_RESET_CTRL
#define PCIE20_PARF_PHY_REFCLK_CTRL2
#define PCIE20_PARF_PHY_REFCLK_CTRL3
#define PCIE20_PARF_PCS_SWING_CTRL1
#define PCIE20_PARF_PCS_SWING_CTRL2
#define PCIE20_PARF_PCS_DEEMPH1
#define PCIE20_PARF_PCS_DEEMPH2
#define PCIE20_PARF_PCS_DEEMPH3
#define PCIE20_PARF_CONFIGBITS
#define PCIE20_PARF_PHY_CTRL3
#define PCIE20_PARF_PCS_CTRL

#define TX_AMP_VAL
#define PHY_RX0_EQ_GEN1_VAL
#define PHY_RX0_EQ_GEN2_VAL
#define TX_DEEMPH_GEN1_VAL
#define TX_DEEMPH_GEN2_3_5DB_VAL
#define TX_DEEMPH_GEN2_6DB_VAL
#define PHY_TX0_TERM_OFFST_VAL

struct qcom_phy {};

static int qcom_pcie2_phy_init(struct phy *phy)
{}

static int qcom_pcie2_phy_power_on(struct phy *phy)
{}

static int qcom_pcie2_phy_power_off(struct phy *phy)
{}

static int qcom_pcie2_phy_exit(struct phy *phy)
{}

static const struct phy_ops qcom_pcie2_ops =;

/*
 * Register a fixed rate pipe clock.
 *
 * The <s>_pipe_clksrc generated by PHY goes to the GCC that gate
 * controls it. The <s>_pipe_clk coming out of the GCC is requested
 * by the PHY driver for its operations.
 * We register the <s>_pipe_clksrc here. The gcc driver takes care
 * of assigning this <s>_pipe_clksrc as parent to <s>_pipe_clk.
 * Below picture shows this relationship.
 *
 *         +---------------+
 *         |   PHY block   |<<---------------------------------------+
 *         |               |                                         |
 *         |   +-------+   |                   +-----+               |
 *   I/P---^-->|  PLL  |---^--->pipe_clksrc--->| GCC |--->pipe_clk---+
 *    clk  |   +-------+   |                   +-----+
 *         +---------------+
 */
static int phy_pipe_clksrc_register(struct qcom_phy *qphy)
{}

static int qcom_pcie2_phy_probe(struct platform_device *pdev)
{}

static const struct of_device_id qcom_pcie2_phy_match_table[] =;
MODULE_DEVICE_TABLE(of, qcom_pcie2_phy_match_table);

static struct platform_driver qcom_pcie2_phy_driver =;

module_platform_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();