linux/drivers/phy/amlogic/phy-meson-g12a-usb3-pcie.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Amlogic G12A USB3 + PCIE Combo PHY driver
 *
 * Copyright (C) 2017 Amlogic, Inc. All rights reserved
 * Copyright (C) 2019 BayLibre, SAS
 * Author: Neil Armstrong <[email protected]>
 */

#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/phy/phy.h>
#include <linux/regmap.h>
#include <linux/reset.h>
#include <linux/platform_device.h>
#include <dt-bindings/phy/phy.h>

#define PHY_R0
	#define PHY_R0_PCIE_POWER_STATE
	#define PHY_R0_PCIE_USB3_SWITCH

#define PHY_R1
	#define PHY_R1_PHY_TX1_TERM_OFFSET
	#define PHY_R1_PHY_TX0_TERM_OFFSET
	#define PHY_R1_PHY_RX1_EQ
	#define PHY_R1_PHY_RX0_EQ
	#define PHY_R1_PHY_LOS_LEVEL
	#define PHY_R1_PHY_LOS_BIAS
	#define PHY_R1_PHY_REF_CLKDIV2
	#define PHY_R1_PHY_MPLL_MULTIPLIER

#define PHY_R2
	#define PHY_R2_PCS_TX_DEEMPH_GEN2_6DB
	#define PHY_R2_PCS_TX_DEEMPH_GEN2_3P5DB
	#define PHY_R2_PCS_TX_DEEMPH_GEN1
	#define PHY_R2_PHY_TX_VBOOST_LVL

#define PHY_R4
	#define PHY_R4_PHY_CR_WRITE
	#define PHY_R4_PHY_CR_READ
	#define PHY_R4_PHY_CR_DATA_IN
	#define PHY_R4_PHY_CR_CAP_DATA
	#define PHY_R4_PHY_CR_CAP_ADDR

#define PHY_R5
	#define PHY_R5_PHY_CR_DATA_OUT
	#define PHY_R5_PHY_CR_ACK
	#define PHY_R5_PHY_BS_OUT

#define PCIE_RESET_DELAY

struct phy_g12a_usb3_pcie_priv {};

static const struct regmap_config phy_g12a_usb3_pcie_regmap_conf =;

static int phy_g12a_usb3_pcie_cr_bus_addr(struct phy_g12a_usb3_pcie_priv *priv,
					  unsigned int addr)
{}

static int phy_g12a_usb3_pcie_cr_bus_read(void *context, unsigned int addr,
					  unsigned int *data)
{}

static int phy_g12a_usb3_pcie_cr_bus_write(void *context, unsigned int addr,
					   unsigned int data)
{}

static const struct regmap_config phy_g12a_usb3_pcie_cr_regmap_conf =;

static int phy_g12a_usb3_init(struct phy *phy)
{}

static int phy_g12a_usb3_pcie_power_on(struct phy *phy)
{}

static int phy_g12a_usb3_pcie_power_off(struct phy *phy)
{}

static int phy_g12a_usb3_pcie_reset(struct phy *phy)
{}

static int phy_g12a_usb3_pcie_init(struct phy *phy)
{}

static int phy_g12a_usb3_pcie_exit(struct phy *phy)
{}

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

static const struct phy_ops phy_g12a_usb3_pcie_ops =;

static int phy_g12a_usb3_pcie_probe(struct platform_device *pdev)
{}

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

static struct platform_driver phy_g12a_usb3_pcie_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();