linux/drivers/phy/hisilicon/phy-hi3660-usb3.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Phy provider for USB 3.0 controller on HiSilicon 3660 platform
 *
 * Copyright (C) 2017-2018 Hilisicon Electronics Co., Ltd.
 *		http://www.huawei.com
 *
 * Authors: Yu Chen <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>

#define PERI_CRG_CLK_EN4
#define PERI_CRG_CLK_DIS4
#define GT_CLK_USB3OTG_REF
#define GT_ACLK_USB3OTG

#define PERI_CRG_RSTEN4
#define PERI_CRG_RSTDIS4
#define IP_RST_USB3OTGPHY_POR
#define IP_RST_USB3OTG

#define PERI_CRG_ISODIS
#define USB_REFCLK_ISO_EN

#define PCTRL_PERI_CTRL3
#define PCTRL_PERI_CTRL3_MSK_START
#define USB_TCXO_EN

#define PCTRL_PERI_CTRL24
#define SC_CLK_USB3PHY_3MUX1_SEL

#define USBOTG3_CTRL0
#define SC_USB3PHY_ABB_GT_EN

#define USBOTG3_CTRL2
#define USBOTG3CTRL2_POWERDOWN_HSP
#define USBOTG3CTRL2_POWERDOWN_SSP

#define USBOTG3_CTRL3
#define USBOTG3_CTRL3_VBUSVLDEXT
#define USBOTG3_CTRL3_VBUSVLDEXTSEL

#define USBOTG3_CTRL4

#define USBOTG3_CTRL7
#define REF_SSP_EN

/* This value config the default txtune parameter of the usb 2.0 phy */
#define HI3660_USB_DEFAULT_PHY_PARAM

struct hi3660_priv {};

static int hi3660_phy_init(struct phy *phy)
{}

static int hi3660_phy_exit(struct phy *phy)
{}

static const struct phy_ops hi3660_phy_ops =;

static int hi3660_phy_probe(struct platform_device *pdev)
{}

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

static struct platform_driver hi3660_phy_driver =;
module_platform_driver();

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