linux/drivers/phy/amlogic/phy-meson-gxl-usb2.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Meson GXL and GXM USB2 PHY driver
 *
 * Copyright (C) 2017 Martin Blumenstingl <[email protected]>
 */

#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/reset.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>

/* bits [31:27] are read-only */
#define U2P_R0
	#define U2P_R0_BYPASS_SEL
	#define U2P_R0_BYPASS_DM_EN
	#define U2P_R0_BYPASS_DP_EN
	#define U2P_R0_TXBITSTUFF_ENH
	#define U2P_R0_TXBITSTUFF_EN
	#define U2P_R0_DM_PULLDOWN
	#define U2P_R0_DP_PULLDOWN
	#define U2P_R0_DP_VBUS_VLD_EXT_SEL
	#define U2P_R0_DP_VBUS_VLD_EXT
	#define U2P_R0_ADP_PRB_EN
	#define U2P_R0_ADP_DISCHARGE
	#define U2P_R0_ADP_CHARGE
	#define U2P_R0_DRV_VBUS
	#define U2P_R0_ID_PULLUP
	#define U2P_R0_LOOPBACK_EN_B
	#define U2P_R0_OTG_DISABLE
	#define U2P_R0_COMMON_ONN
	#define U2P_R0_FSEL_MASK
	#define U2P_R0_REF_CLK_SEL_MASK
	#define U2P_R0_POWER_ON_RESET
	#define U2P_R0_V_ATE_TEST_EN_B_MASK
	#define U2P_R0_ID_SET_ID_DQ
	#define U2P_R0_ATE_RESET
	#define U2P_R0_FSV_MINUS
	#define U2P_R0_FSV_PLUS
	#define U2P_R0_BYPASS_DM_DATA
	#define U2P_R0_BYPASS_DP_DATA

#define U2P_R1
	#define U2P_R1_BURN_IN_TEST
	#define U2P_R1_ACA_ENABLE
	#define U2P_R1_DCD_ENABLE
	#define U2P_R1_VDAT_SRC_EN_B
	#define U2P_R1_VDAT_DET_EN_B
	#define U2P_R1_CHARGES_SEL
	#define U2P_R1_TX_PREEMP_PULSE_TUNE
	#define U2P_R1_TX_PREEMP_AMP_TUNE_MASK
	#define U2P_R1_TX_RES_TUNE_MASK
	#define U2P_R1_TX_RISE_TUNE_MASK
	#define U2P_R1_TX_VREF_TUNE_MASK
	#define U2P_R1_TX_FSLS_TUNE_MASK
	#define U2P_R1_TX_HSXV_TUNE_MASK
	#define U2P_R1_OTG_TUNE_MASK
	#define U2P_R1_SQRX_TUNE_MASK
	#define U2P_R1_COMP_DIS_TUNE_MASK

/* bits [31:14] are read-only */
#define U2P_R2
	#define U2P_R2_TESTDATA_IN_MASK
	#define U2P_R2_TESTADDR_MASK
	#define U2P_R2_TESTDATA_OUT_SEL
	#define U2P_R2_TESTCLK
	#define U2P_R2_TESTDATA_OUT_MASK
	#define U2P_R2_ACA_PIN_RANGE_C
	#define U2P_R2_ACA_PIN_RANGE_B
	#define U2P_R2_ACA_PIN_RANGE_A
	#define U2P_R2_ACA_PIN_GND
	#define U2P_R2_ACA_PIN_FLOAT
	#define U2P_R2_CHARGE_DETECT
	#define U2P_R2_DEVICE_SESSION_VALID
	#define U2P_R2_ADP_PROBE
	#define U2P_R2_ADP_SENSE
	#define U2P_R2_SESSION_END
	#define U2P_R2_VBUS_VALID
	#define U2P_R2_B_VALID
	#define U2P_R2_A_VALID
	#define U2P_R2_ID_DIG

#define U2P_R3

#define RESET_COMPLETE_TIME

struct phy_meson_gxl_usb2_priv {};

static const struct regmap_config phy_meson_gxl_usb2_regmap_conf =;

static int phy_meson_gxl_usb2_init(struct phy *phy)
{}

static int phy_meson_gxl_usb2_exit(struct phy *phy)
{}

static int phy_meson_gxl_usb2_reset(struct phy *phy)
{}

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

static int phy_meson_gxl_usb2_power_off(struct phy *phy)
{}

static int phy_meson_gxl_usb2_power_on(struct phy *phy)
{}

static const struct phy_ops phy_meson_gxl_usb2_ops =;

static int phy_meson_gxl_usb2_probe(struct platform_device *pdev)
{}

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

static struct platform_driver phy_meson_gxl_usb2_driver =;
module_platform_driver();

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