linux/drivers/phy/intel/phy-intel-keembay-emmc.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Intel Keem Bay eMMC PHY driver
 * Copyright (C) 2020 Intel Corporation
 */

#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>

/* eMMC/SD/SDIO core/phy configuration registers */
#define PHY_CFG_0
#define SEL_DLY_TXCLK_MASK
#define OTAP_DLY_ENA_MASK
#define OTAP_DLY_SEL_MASK
#define DLL_EN_MASK
#define PWR_DOWN_MASK

#define PHY_CFG_2
#define SEL_FREQ_MASK

#define PHY_STAT
#define CAL_DONE_MASK
#define IS_CALDONE(x)
#define DLL_RDY_MASK
#define IS_DLLRDY(x)

/* From ACS_eMMC51_16nFFC_RO1100_Userguide_v1p0.pdf p17 */
#define FREQSEL_200M_170M
#define FREQSEL_170M_140M
#define FREQSEL_140M_110M
#define FREQSEL_110M_80M
#define FREQSEL_80M_50M

struct keembay_emmc_phy {};

static const struct regmap_config keembay_regmap_config =;

static int keembay_emmc_phy_power(struct phy *phy, bool on_off)
{}

static int keembay_emmc_phy_init(struct phy *phy)
{}

static int keembay_emmc_phy_exit(struct phy *phy)
{
	struct keembay_emmc_phy *priv = phy_get_drvdata(phy);

	clk_put(priv->emmcclk);

	return 0;
};

static int keembay_emmc_phy_power_on(struct phy *phy)
{}

static int keembay_emmc_phy_power_off(struct phy *phy)
{}

static const struct phy_ops ops =;

static int keembay_emmc_phy_probe(struct platform_device *pdev)
{}

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

static struct platform_driver keembay_emmc_phy_driver =;
module_platform_driver();

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