linux/drivers/phy/ti/phy-am654-serdes.c

// SPDX-License-Identifier: GPL-2.0
/*
 * PCIe SERDES driver for AM654x SoC
 *
 * Copyright (C) 2018 - 2019 Texas Instruments Incorporated - http://www.ti.com/
 * Author: Kishon Vijay Abraham I <[email protected]>
 */

#include <dt-bindings/phy/phy.h>
#include <linux/cleanup.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/mfd/syscon.h>
#include <linux/mux/consumer.h>
#include <linux/of_address.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>

#define CMU_R004
#define CMU_R060
#define CMU_R07C
#define CMU_R088
#define CMU_R0D0
#define CMU_R0E8

#define LANE_R048
#define LANE_R058
#define LANE_R06c
#define LANE_R070
#define LANE_R19C

#define COMLANE_R004
#define COMLANE_R138
#define VERSION_VAL

#define COMLANE_R190
#define COMLANE_R194

#define COMRXEQ_R004
#define COMRXEQ_R008
#define COMRXEQ_R00C
#define COMRXEQ_R014
#define COMRXEQ_R018
#define COMRXEQ_R01C
#define COMRXEQ_R04C
#define COMRXEQ_R088
#define COMRXEQ_R094
#define COMRXEQ_R098

#define SERDES_CTRL

#define WIZ_LANEXCTL_STS
#define TX0_DISABLE_STATE
#define TX0_SLEEP_STATE
#define TX0_SNOOZE_STATE
#define TX0_ENABLE_STATE

#define RX0_DISABLE_STATE
#define RX0_SLEEP_STATE
#define RX0_SNOOZE_STATE
#define RX0_ENABLE_STATE

#define WIZ_PLL_CTRL
#define PLL_DISABLE_STATE
#define PLL_SLEEP_STATE
#define PLL_SNOOZE_STATE
#define PLL_ENABLE_STATE

#define PLL_LOCK_TIME
#define SLEEP_TIME

#define LANE_USB3
#define LANE_PCIE0_LANE0

#define LANE_PCIE1_LANE0
#define LANE_PCIE0_LANE1

#define SERDES_NUM_CLOCKS

#define AM654_SERDES_CTRL_CLKSEL_MASK
#define AM654_SERDES_CTRL_CLKSEL_SHIFT

struct serdes_am654_clk_mux {};

#define to_serdes_am654_clk_mux(_hw)

static const struct regmap_config serdes_am654_regmap_config =;

enum serdes_am654_fields {};

static const struct reg_field serdes_am654_reg_fields[] =;

struct serdes_am654 {};

static int serdes_am654_enable_pll(struct serdes_am654 *phy)
{}

static void serdes_am654_disable_pll(struct serdes_am654 *phy)
{}

static int serdes_am654_enable_txrx(struct serdes_am654 *phy)
{}

static int serdes_am654_disable_txrx(struct serdes_am654 *phy)
{}

static int serdes_am654_power_on(struct phy *x)
{}

static int serdes_am654_power_off(struct phy *x)
{}

#define SERDES_AM654_CFG(offset, a, b, val)

static int serdes_am654_usb3_init(struct serdes_am654 *phy)
{}

static int serdes_am654_pcie_init(struct serdes_am654 *phy)
{}

static int serdes_am654_init(struct phy *x)
{}

static int serdes_am654_reset(struct phy *x)
{}

static void serdes_am654_release(struct phy *x)
{}

static struct phy *serdes_am654_xlate(struct device *dev,
				      const struct of_phandle_args *args)
{}

static const struct phy_ops ops =;

#define SERDES_NUM_MUX_COMBINATIONS

#define LICLK
#define EXT_REFCLK
#define RICLK

static const int
serdes_am654_mux_table[SERDES_NUM_MUX_COMBINATIONS][SERDES_NUM_CLOCKS] =;

static u8 serdes_am654_clk_mux_get_parent(struct clk_hw *hw)
{}

static int serdes_am654_clk_mux_set_parent(struct clk_hw *hw, u8 index)
{}

static const struct clk_ops serdes_am654_clk_mux_ops =;

static int serdes_am654_clk_register(struct serdes_am654 *am654_phy,
				     const char *clock_name, int clock_num)
{}

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

static int serdes_am654_regfield_init(struct serdes_am654 *am654_phy)
{}

static int serdes_am654_probe(struct platform_device *pdev)
{}

static void serdes_am654_remove(struct platform_device *pdev)
{}

static struct platform_driver serdes_am654_driver =;
module_platform_driver();

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