linux/drivers/phy/ingenic/phy-ingenic-usb.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Ingenic SoCs USB PHY driver
 * Copyright (c) Paul Cercueil <[email protected]>
 * Copyright (c) 漆鹏振 (Qi Pengzhen) <[email protected]>
 * Copyright (c) 周琰杰 (Zhou Yanjie) <[email protected]>
 */

#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>

/* OTGPHY register offsets */
#define REG_USBPCR_OFFSET
#define REG_USBRDT_OFFSET
#define REG_USBVBFIL_OFFSET
#define REG_USBPCR1_OFFSET

/* bits within the USBPCR register */
#define USBPCR_USB_MODE
#define USBPCR_AVLD_REG
#define USBPCR_COMMONONN
#define USBPCR_VBUSVLDEXT
#define USBPCR_VBUSVLDEXTSEL
#define USBPCR_POR
#define USBPCR_SIDDQ
#define USBPCR_OTG_DISABLE
#define USBPCR_TXPREEMPHTUNE

#define USBPCR_IDPULLUP_MASK
#define USBPCR_IDPULLUP_ALWAYS
#define USBPCR_IDPULLUP_SUSPEND
#define USBPCR_IDPULLUP_OTG

#define USBPCR_COMPDISTUNE_MASK
#define USBPCR_COMPDISTUNE_DFT

#define USBPCR_OTGTUNE_MASK
#define USBPCR_OTGTUNE_DFT

#define USBPCR_SQRXTUNE_MASK
#define USBPCR_SQRXTUNE_DCR_20PCT
#define USBPCR_SQRXTUNE_DFT

#define USBPCR_TXFSLSTUNE_MASK
#define USBPCR_TXFSLSTUNE_DCR_50PPT
#define USBPCR_TXFSLSTUNE_DCR_25PPT
#define USBPCR_TXFSLSTUNE_DFT
#define USBPCR_TXFSLSTUNE_INC_25PPT
#define USBPCR_TXFSLSTUNE_INC_50PPT

#define USBPCR_TXHSXVTUNE_MASK
#define USBPCR_TXHSXVTUNE_DFT
#define USBPCR_TXHSXVTUNE_DCR_15MV

#define USBPCR_TXRISETUNE_MASK
#define USBPCR_TXRISETUNE_DFT

#define USBPCR_TXVREFTUNE_MASK
#define USBPCR_TXVREFTUNE_INC_75PPT
#define USBPCR_TXVREFTUNE_INC_25PPT
#define USBPCR_TXVREFTUNE_DFT

/* bits within the USBRDTR register */
#define USBRDT_UTMI_RST
#define USBRDT_HB_MASK
#define USBRDT_VBFIL_LD_EN
#define USBRDT_IDDIG_EN
#define USBRDT_IDDIG_REG
#define USBRDT_VBFIL_EN

/* bits within the USBPCR1 register */
#define USBPCR1_BVLD_REG
#define USBPCR1_DPPD
#define USBPCR1_DMPD
#define USBPCR1_USB_SEL
#define USBPCR1_PORT_RST
#define USBPCR1_WORD_IF_16BIT

struct ingenic_soc_info {};

struct ingenic_usb_phy {};

static int ingenic_usb_phy_init(struct phy *phy)
{}

static int ingenic_usb_phy_exit(struct phy *phy)
{}

static int ingenic_usb_phy_power_on(struct phy *phy)
{}

static int ingenic_usb_phy_power_off(struct phy *phy)
{}

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

static const struct phy_ops ingenic_usb_phy_ops =;

static void jz4770_usb_phy_init(struct phy *phy)
{}

static void jz4775_usb_phy_init(struct phy *phy)
{}

static void jz4780_usb_phy_init(struct phy *phy)
{}

static void x1000_usb_phy_init(struct phy *phy)
{}

static void x1830_usb_phy_init(struct phy *phy)
{}

static void x2000_usb_phy_init(struct phy *phy)
{}

static const struct ingenic_soc_info jz4770_soc_info =;

static const struct ingenic_soc_info jz4775_soc_info =;

static const struct ingenic_soc_info jz4780_soc_info =;

static const struct ingenic_soc_info x1000_soc_info =;

static const struct ingenic_soc_info x1830_soc_info =;

static const struct ingenic_soc_info x2000_soc_info =;

static int ingenic_usb_phy_probe(struct platform_device *pdev)
{}

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

static struct platform_driver ingenic_usb_phy_driver =;
module_platform_driver();

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