linux/drivers/phy/rockchip/phy-rockchip-snps-pcie3.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Rockchip PCIE3.0 phy driver
 *
 * Copyright (C) 2022 Rockchip Electronics Co., Ltd.
 */

#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/phy/pcie.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/reset.h>

/* Register for RK3568 */
#define GRF_PCIE30PHY_CON1
#define GRF_PCIE30PHY_CON6
#define GRF_PCIE30PHY_CON9
#define GRF_PCIE30PHY_DA_OCM
#define GRF_PCIE30PHY_STATUS0
#define GRF_PCIE30PHY_WR_EN
#define SRAM_INIT_DONE(reg)

#define RK3568_BIFURCATION_LANE_0_1

/* Register for RK3588 */
#define PHP_GRF_PCIESEL_CON
#define RK3588_PCIE3PHY_GRF_CMN_CON0
#define RK3588_PCIE3PHY_GRF_PHY0_STATUS1
#define RK3588_PCIE3PHY_GRF_PHY1_STATUS1
#define RK3588_PCIE3PHY_GRF_PHY0_LN0_CON1
#define RK3588_PCIE3PHY_GRF_PHY0_LN1_CON1
#define RK3588_PCIE3PHY_GRF_PHY1_LN0_CON1
#define RK3588_PCIE3PHY_GRF_PHY1_LN1_CON1
#define RK3588_SRAM_INIT_DONE(reg)

#define RK3588_BIFURCATION_LANE_0_1
#define RK3588_BIFURCATION_LANE_2_3
#define RK3588_LANE_AGGREGATION
#define RK3588_RX_CMN_REFCLK_MODE_EN
#define RK3588_RX_CMN_REFCLK_MODE_DIS
#define RK3588_PCIE1LN_SEL_EN
#define RK3588_PCIE30_PHY_MODE_EN

struct rockchip_p3phy_ops;

struct rockchip_p3phy_priv {};

struct rockchip_p3phy_ops {};

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

static int rockchip_p3phy_rk3568_init(struct rockchip_p3phy_priv *priv)
{}

static const struct rockchip_p3phy_ops rk3568_ops =;

static int rockchip_p3phy_rk3588_init(struct rockchip_p3phy_priv *priv)
{}

static const struct rockchip_p3phy_ops rk3588_ops =;

static int rockchip_p3phy_init(struct phy *phy)
{}

static int rockchip_p3phy_exit(struct phy *phy)
{}

static const struct phy_ops rockchip_p3phy_ops =;

static int rockchip_p3phy_probe(struct platform_device *pdev)
{}

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

static struct platform_driver rockchip_p3phy_driver =;
module_platform_driver();
MODULE_DESCRIPTION();
MODULE_LICENSE();