linux/drivers/soc/rockchip/io-domain.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Rockchip IO Voltage Domain driver
 *
 * Copyright 2014 MundoReader S.L.
 * Copyright 2014 Google, Inc.
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/err.h>
#include <linux/mfd/syscon.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>

#define MAX_SUPPLIES

/*
 * The max voltage for 1.8V and 3.3V come from the Rockchip datasheet under
 * "Recommended Operating Conditions" for "Digital GPIO".   When the typical
 * is 3.3V the max is 3.6V.  When the typical is 1.8V the max is 1.98V.
 *
 * They are used like this:
 * - If the voltage on a rail is above the "1.8" voltage (1.98V) we'll tell the
 *   SoC we're at 3.3.
 * - If the voltage on a rail is above the "3.3" voltage (3.6V) we'll consider
 *   that to be an error.
 */
#define MAX_VOLTAGE_1_8
#define MAX_VOLTAGE_3_3

#define PX30_IO_VSEL
#define PX30_IO_VSEL_VCCIO6_SRC
#define PX30_IO_VSEL_VCCIO6_SUPPLY_NUM

#define RK3288_SOC_CON2
#define RK3288_SOC_CON2_FLASH0
#define RK3288_SOC_FLASH_SUPPLY_NUM

#define RK3328_SOC_CON4
#define RK3328_SOC_CON4_VCCIO2
#define RK3328_SOC_VCCIO2_SUPPLY_NUM

#define RK3368_SOC_CON15
#define RK3368_SOC_CON15_FLASH0
#define RK3368_SOC_FLASH_SUPPLY_NUM

#define RK3399_PMUGRF_CON0
#define RK3399_PMUGRF_CON0_VSEL
#define RK3399_PMUGRF_VSEL_SUPPLY_NUM

#define RK3568_PMU_GRF_IO_VSEL0
#define RK3568_PMU_GRF_IO_VSEL1
#define RK3568_PMU_GRF_IO_VSEL2

struct rockchip_iodomain;

struct rockchip_iodomain_supply {};

struct rockchip_iodomain_soc_data {};

struct rockchip_iodomain {};

static int rk3568_iodomain_write(struct rockchip_iodomain_supply *supply, int uV)
{}

static int rockchip_iodomain_write(struct rockchip_iodomain_supply *supply,
				   int uV)
{}

static int rockchip_iodomain_notify(struct notifier_block *nb,
				    unsigned long event,
				    void *data)
{}

static void px30_iodomain_init(struct rockchip_iodomain *iod)
{}

static void rk3288_iodomain_init(struct rockchip_iodomain *iod)
{}

static void rk3328_iodomain_init(struct rockchip_iodomain *iod)
{}

static void rk3368_iodomain_init(struct rockchip_iodomain *iod)
{}

static void rk3399_pmu_iodomain_init(struct rockchip_iodomain *iod)
{}

static const struct rockchip_iodomain_soc_data soc_data_px30 =;

static const struct rockchip_iodomain_soc_data soc_data_px30_pmu =;

/*
 * On the rk3188 the io-domains are handled by a shared register with the
 * lower 8 bits being still being continuing drive-strength settings.
 */
static const struct rockchip_iodomain_soc_data soc_data_rk3188 =;

static const struct rockchip_iodomain_soc_data soc_data_rk3228 =;

static const struct rockchip_iodomain_soc_data soc_data_rk3288 =;

static const struct rockchip_iodomain_soc_data soc_data_rk3328 =;

static const struct rockchip_iodomain_soc_data soc_data_rk3368 =;

static const struct rockchip_iodomain_soc_data soc_data_rk3368_pmu =;

static const struct rockchip_iodomain_soc_data soc_data_rk3399 =;

static const struct rockchip_iodomain_soc_data soc_data_rk3399_pmu =;

static const struct rockchip_iodomain_soc_data soc_data_rk3568_pmu =;

static const struct rockchip_iodomain_soc_data soc_data_rv1108 =;

static const struct rockchip_iodomain_soc_data soc_data_rv1108_pmu =;

static const struct rockchip_iodomain_soc_data soc_data_rv1126_pmu =;

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

static int rockchip_iodomain_probe(struct platform_device *pdev)
{}

static void rockchip_iodomain_remove(struct platform_device *pdev)
{}

static struct platform_driver rockchip_iodomain_driver =;

module_platform_driver();

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