linux/drivers/phy/freescale/phy-fsl-imx8qm-hsio.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright 2024 NXP
 */

#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/pci_regs.h>
#include <linux/phy/phy.h>
#include <linux/phy/pcie.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>

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

#define MAX_NUM_LANE
#define LANE_NUM_CLKS

/* Parameters for the waiting for PCIe PHY PLL to lock */
#define PHY_INIT_WAIT_USLEEP_MAX
#define PHY_INIT_WAIT_TIMEOUT

/* i.MX8Q HSIO registers */
#define HSIO_CTRL0
#define HSIO_APB_RSTN_0
#define HSIO_APB_RSTN_1
#define HSIO_PIPE_RSTN_0_MASK
#define HSIO_PIPE_RSTN_1_MASK
#define HSIO_MODE_MASK
#define HSIO_MODE_PCIE
#define HSIO_MODE_SATA
#define HSIO_DEVICE_TYPE_MASK
#define HSIO_EPCS_TXDEEMP
#define HSIO_EPCS_TXDEEMP_SEL
#define HSIO_EPCS_PHYRESET_N
#define HSIO_RESET_N

#define HSIO_IOB_RXENA
#define HSIO_IOB_TXENA
#define HSIO_IOB_A_0_TXOE
#define HSIO_IOB_A_0_M1M0_2
#define HSIO_IOB_A_0_M1M0_MASK
#define HSIO_PHYX1_EPCS_SEL
#define HSIO_PCIE_AB_SELECT

#define HSIO_PHY_STS0
#define HSIO_LANE0_TX_PLL_LOCK
#define HSIO_LANE1_TX_PLL_LOCK

#define HSIO_CTRL2
#define HSIO_LTSSM_ENABLE
#define HSIO_BUTTON_RST_N
#define HSIO_PERST_N
#define HSIO_POWER_UP_RST_N

#define HSIO_PCIE_STS0
#define HSIO_PM_REQ_CORE_RST

#define HSIO_REG48_PMA_STATUS
#define HSIO_REG48_PMA_RDY

struct imx_hsio_drvdata {};

struct imx_hsio_lane {};

struct imx_hsio_priv {};

static const char * const lan0_pcie_clks[] =;
static const char * const lan1_pciea_clks[] =;
static const char * const lan1_pcieb_clks[] =;
static const char * const lan2_pcieb_clks[] =;
static const char * const lan2_sata_clks[] =;

static const struct regmap_config regmap_config =;

static int imx_hsio_init(struct phy *phy)
{}

static int imx_hsio_exit(struct phy *phy)
{}

static void imx_hsio_pcie_phy_resets(struct phy *phy)
{}

static void imx_hsio_sata_phy_resets(struct phy *phy)
{}

static void imx_hsio_configure_clk_pad(struct phy *phy)
{}

static void imx_hsio_pre_set(struct phy *phy)
{}

static int imx_hsio_pcie_power_on(struct phy *phy)
{}

static int imx_hsio_sata_power_on(struct phy *phy)
{}

static int imx_hsio_power_on(struct phy *phy)
{}

static int imx_hsio_power_off(struct phy *phy)
{}

static int imx_hsio_set_mode(struct phy *phy, enum phy_mode mode,
			     int submode)
{}

static int imx_hsio_set_speed(struct phy *phy, int speed)
{}

static const struct phy_ops imx_hsio_ops =;

static const struct imx_hsio_drvdata imx8qxp_hsio_drvdata =;

static const struct imx_hsio_drvdata imx8qm_hsio_drvdata =;

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

static struct phy *imx_hsio_xlate(struct device *dev,
				  const struct of_phandle_args *args)
{}

static int imx_hsio_probe(struct platform_device *pdev)
{}

static struct platform_driver imx_hsio_driver =;
module_platform_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();