linux/drivers/phy/marvell/phy-mmp3-usb.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2011 Marvell International Ltd. All rights reserved.
 * Copyright (C) 2018,2019 Lubomir Rintel <[email protected]>
 */

#include <linux/delay.h>
#include <linux/io.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
#include <linux/soc/mmp/cputype.h>

#define USB2_PLL_REG0
#define USB2_PLL_REG1
#define USB2_TX_REG0
#define USB2_TX_REG1
#define USB2_TX_REG2
#define USB2_RX_REG0
#define USB2_RX_REG1
#define USB2_RX_REG2
#define USB2_ANA_REG0
#define USB2_ANA_REG1
#define USB2_ANA_REG2
#define USB2_DIG_REG0
#define USB2_DIG_REG1
#define USB2_DIG_REG2
#define USB2_DIG_REG3
#define USB2_TEST_REG0
#define USB2_TEST_REG1
#define USB2_TEST_REG2
#define USB2_CHARGER_REG0
#define USB2_OTG_REG0
#define USB2_PHY_MON0
#define USB2_RESETVE_REG0
#define USB2_ICID_REG0
#define USB2_ICID_REG1

/* USB2_PLL_REG0 */

/* This is for Ax stepping */
#define USB2_PLL_FBDIV_SHIFT_MMP3
#define USB2_PLL_FBDIV_MASK_MMP3

#define USB2_PLL_REFDIV_SHIFT_MMP3
#define USB2_PLL_REFDIV_MASK_MMP3

#define USB2_PLL_VDD12_SHIFT_MMP3
#define USB2_PLL_VDD18_SHIFT_MMP3

/* This is for B0 stepping */
#define USB2_PLL_FBDIV_SHIFT_MMP3_B0
#define USB2_PLL_REFDIV_SHIFT_MMP3_B0
#define USB2_PLL_VDD18_SHIFT_MMP3_B0
#define USB2_PLL_FBDIV_MASK_MMP3_B0
#define USB2_PLL_REFDIV_MASK_MMP3_B0

#define USB2_PLL_CAL12_SHIFT_MMP3
#define USB2_PLL_CALI12_MASK_MMP3

#define USB2_PLL_VCOCAL_START_SHIFT_MMP3

#define USB2_PLL_KVCO_SHIFT_MMP3
#define USB2_PLL_KVCO_MASK_MMP3

#define USB2_PLL_ICP_SHIFT_MMP3
#define USB2_PLL_ICP_MASK_MMP3

#define USB2_PLL_LOCK_BYPASS_SHIFT_MMP3

#define USB2_PLL_PU_PLL_SHIFT_MMP3
#define USB2_PLL_PU_PLL_MASK

#define USB2_PLL_READY_MASK_MMP3

/* USB2_TX_REG0 */
#define USB2_TX_IMPCAL_VTH_SHIFT_MMP3
#define USB2_TX_IMPCAL_VTH_MASK_MMP3

#define USB2_TX_RCAL_START_SHIFT_MMP3

/* USB2_TX_REG1 */
#define USB2_TX_CK60_PHSEL_SHIFT_MMP3
#define USB2_TX_CK60_PHSEL_MASK_MMP3

#define USB2_TX_AMP_SHIFT_MMP3
#define USB2_TX_AMP_MASK_MMP3

#define USB2_TX_VDD12_SHIFT_MMP3
#define USB2_TX_VDD12_MASK_MMP3

/* USB2_TX_REG2 */
#define USB2_TX_DRV_SLEWRATE_SHIFT

/* USB2_RX_REG0 */
#define USB2_RX_SQ_THRESH_SHIFT_MMP3
#define USB2_RX_SQ_THRESH_MASK_MMP3

#define USB2_RX_SQ_LENGTH_SHIFT_MMP3
#define USB2_RX_SQ_LENGTH_MASK_MMP3

/* USB2_ANA_REG1*/
#define USB2_ANA_PU_ANA_SHIFT_MMP3

/* USB2_OTG_REG0 */
#define USB2_OTG_PU_OTG_SHIFT_MMP3

struct mmp3_usb_phy {};

static unsigned int u2o_get(void __iomem *base, unsigned int offset)
{}

static void u2o_set(void __iomem *base, unsigned int offset,
		unsigned int value)
{}

static void u2o_clear(void __iomem *base, unsigned int offset,
		unsigned int value)
{}

static int mmp3_usb_phy_init(struct phy *phy)
{}

static int mmp3_usb_phy_calibrate(struct phy *phy)
{}

static const struct phy_ops mmp3_usb_phy_ops =;

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

static int mmp3_usb_phy_probe(struct platform_device *pdev)
{}

static struct platform_driver mmp3_usb_phy_driver =;
module_platform_driver();

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