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

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

#include <dt-bindings/phy/phy.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>

/* phy regs */
#define UTMI_REVISION
#define UTMI_CTRL
#define UTMI_PLL
#define UTMI_TX
#define UTMI_RX
#define UTMI_IVREF
#define UTMI_T0
#define UTMI_T1
#define UTMI_T2
#define UTMI_T3
#define UTMI_T4
#define UTMI_T5
#define UTMI_RESERVE
#define UTMI_USB_INT
#define UTMI_DBG_CTL
#define UTMI_OTG_ADDON

/* For UTMICTRL Register */
#define UTMI_CTRL_USB_CLK_EN
/* pxa168 */
#define UTMI_CTRL_SUSPEND_SET1
#define UTMI_CTRL_SUSPEND_SET2
#define UTMI_CTRL_RXBUF_PDWN
#define UTMI_CTRL_TXBUF_PDWN

#define UTMI_CTRL_INPKT_DELAY_SHIFT
#define UTMI_CTRL_INPKT_DELAY_SOF_SHIFT
#define UTMI_CTRL_PU_REF_SHIFT
#define UTMI_CTRL_ARC_PULLDN_SHIFT
#define UTMI_CTRL_PLL_PWR_UP_SHIFT
#define UTMI_CTRL_PWR_UP_SHIFT

/* For UTMI_PLL Register */
#define UTMI_PLL_PLLCALI12_SHIFT
#define UTMI_PLL_PLLCALI12_MASK

#define UTMI_PLL_PLLVDD18_SHIFT
#define UTMI_PLL_PLLVDD18_MASK

#define UTMI_PLL_PLLVDD12_SHIFT
#define UTMI_PLL_PLLVDD12_MASK

#define UTMI_PLL_CLK_BLK_EN_SHIFT
#define CLK_BLK_EN
#define PLL_READY
#define KVCO_EXT
#define VCOCAL_START

#define UTMI_PLL_KVCO_SHIFT
#define UTMI_PLL_KVCO_MASK

#define UTMI_PLL_ICP_SHIFT
#define UTMI_PLL_ICP_MASK

#define UTMI_PLL_FBDIV_SHIFT
#define UTMI_PLL_FBDIV_MASK

#define UTMI_PLL_REFDIV_SHIFT
#define UTMI_PLL_REFDIV_MASK

/* For UTMI_TX Register */
#define UTMI_TX_REG_EXT_FS_RCAL_SHIFT
#define UTMI_TX_REG_EXT_FS_RCAL_MASK

#define UTMI_TX_REG_EXT_FS_RCAL_EN_SHIFT
#define UTMI_TX_REG_EXT_FS_RCAL_EN_MASK

#define UTMI_TX_TXVDD12_SHIFT
#define UTMI_TX_TXVDD12_MASK

#define UTMI_TX_CK60_PHSEL_SHIFT
#define UTMI_TX_CK60_PHSEL_MASK

#define UTMI_TX_IMPCAL_VTH_SHIFT
#define UTMI_TX_IMPCAL_VTH_MASK

#define REG_RCAL_START

#define UTMI_TX_LOW_VDD_EN_SHIFT

#define UTMI_TX_AMP_SHIFT
#define UTMI_TX_AMP_MASK

/* For UTMI_RX Register */
#define UTMI_REG_SQ_LENGTH_SHIFT
#define UTMI_REG_SQ_LENGTH_MASK

#define UTMI_RX_SQ_THRESH_SHIFT
#define UTMI_RX_SQ_THRESH_MASK

#define UTMI_OTG_ADDON_OTG_ON

enum pxa_usb_phy_version {};

struct pxa_usb_phy {};

/*****************************************************************************
 * The registers read/write routines
 *****************************************************************************/

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 void u2o_write(void __iomem *base, unsigned int offset,
		unsigned int value)
{}

static int pxa_usb_phy_init(struct phy *phy)
{}

static int pxa_usb_phy_exit(struct phy *phy)
{}

static const struct phy_ops pxa_usb_phy_ops =;

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

static int pxa_usb_phy_probe(struct platform_device *pdev)
{}

static struct platform_driver pxa_usb_phy_driver =;
module_platform_driver();

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