- compatible: should be one of:
- "rockchip,rk3188-io-voltage-domain" for rk3188
- "rockchip,rk3288-io-voltage-domain" for rk3288
+ - "rockchip,rk3366-io-voltage-domain" for rk3366
- "rockchip,rk3368-io-voltage-domain" for rk3368
- "rockchip,rk3368-pmu-io-voltage-domain" for rk3368 pmu-domains
- rockchip,grf: phandle to the syscon managing the "general register files"
- sdcard-supply: The supply connected to SDMMC0_VDD.
- wifi-supply: The supply connected to APIO3_VDD. Also known as SDIO0.
+Possible supplies for rk3366:
+- lcdc-supply: The supply connected to LCDC_IOVDD.
+- dvpts-supply: The supply connected to DVP_IOVDD.
+- flash-supply: The supply connected to FLASH_IOVDD. Typically for eMMC
+- wifibt-supply: The supply connected to APIO1_VDD. Also known as SDIO and UART0.
+- audio-supply: The supply connected to AUDIO_IOVDD.
+- sdcard-supply: The supply connected to SDMMC0_VDD.
+- tphdsor-suply: The supply connected to APIO2_IOVDD.
+
Possible supplies for rk3368:
- audio-supply: The supply connected to APIO3_VDD.
- dvp-supply: The supply connected to DVPIO_VDD.
#define RK3288_SOC_CON2_FLASH0 BIT(7)
#define RK3288_SOC_FLASH_SUPPLY_NUM 2
+#define RK3366_SOC_CON6 0x418
+#define RK3366_SOC_CON6_FLASH0 BIT(14)
+#define RK3366_SOC_FLASH_SUPPLY_NUM 2
+
#define RK3368_SOC_CON15 0x43c
#define RK3368_SOC_CON15_FLASH0 BIT(14)
#define RK3368_SOC_FLASH_SUPPLY_NUM 2
dev_warn(iod->dev, "couldn't update flash0 ctrl\n");
}
+static void rk3366_iodomain_init(struct rockchip_iodomain *iod)
+{
+ int ret;
+ u32 val;
+
+ /* if no flash supply we should leave things alone */
+ if (!iod->supplies[RK3366_SOC_FLASH_SUPPLY_NUM].reg)
+ return;
+
+ /*
+ * set flash0 iodomain to also use this framework
+ * instead of a special gpio.
+ */
+ val = RK3366_SOC_CON6_FLASH0 | (RK3366_SOC_CON6_FLASH0 << 16);
+ ret = regmap_write(iod->grf, RK3368_SOC_CON15, val);
+ if (ret < 0)
+ dev_warn(iod->dev, "couldn't update flash0 ctrl\n");
+}
+
static void rk3368_iodomain_init(struct rockchip_iodomain *iod)
{
int ret;
.init = rk3288_iodomain_init,
};
+static const struct rockchip_iodomain_soc_data soc_data_rk3366 = {
+ .grf_offset = 0x900,
+ .supply_names = {
+ "lcdc", /* LCDC_IOVDD */
+ "dvpts", /* DVP_IOVDD */
+ "flash", /* FLASH_IOVDD (emmc) */
+ "wifibt", /* APIO1_IOVDD */
+ NULL,
+ "audio", /* AUDIO_IODVDD */
+ "sdcard", /* SDMMC_IOVDD (sdmmc) */
+ "tphdsor", /* APIO2_IOVDD */
+ },
+ .init = rk3366_iodomain_init,
+};
+
static const struct rockchip_iodomain_soc_data soc_data_rk3368 = {
.grf_offset = 0x900,
.supply_names = {
.compatible = "rockchip,rk3288-io-voltage-domain",
.data = (void *)&soc_data_rk3288
},
+ {
+ .compatible = "rockchip,rk3366-io-voltage-domain",
+ .data = (void *)&soc_data_rk3366
+ },
{
.compatible = "rockchip,rk3368-io-voltage-domain",
.data = (void *)&soc_data_rk3368