* [RESEND PATCH] PM / AVS: rockchip-io: add io selectors and supplies for rk3328
@ 2017-02-23 12:33 ` David Wu
0 siblings, 0 replies; 12+ messages in thread
From: David Wu @ 2017-02-23 12:33 UTC (permalink / raw)
To: rjw, khilman, nm, heiko
Cc: rafael.j.wysocki, huangtao, linux-rockchip, linux-pm,
linux-arm-kernel, linux-kernel, david.wu
From: "david.wu" <david.wu@rock-chips.com>
This adds the necessary data for handling io voltage domains on the rk3328.
As interesting tidbit, the rk3328 only contains one iodomain area in the
regular General Register Files (GRF).
Signed-off-by: david.wu <david.wu@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
---
.../bindings/power/rockchip-io-domain.txt | 1 +
drivers/power/avs/rockchip-io-domain.c | 41 ++++++++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
index d23dc00..d3a5a93 100644
--- a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
+++ b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
@@ -33,6 +33,7 @@ Required properties:
- compatible: should be one of:
- "rockchip,rk3188-io-voltage-domain" for rk3188
- "rockchip,rk3288-io-voltage-domain" for rk3288
+ - "rockchip,rk3328-io-voltage-domain" for rk3328
- "rockchip,rk3368-io-voltage-domain" for rk3368
- "rockchip,rk3368-pmu-io-voltage-domain" for rk3368 pmu-domains
- "rockchip,rk3399-io-voltage-domain" for rk3399
diff --git a/drivers/power/avs/rockchip-io-domain.c b/drivers/power/avs/rockchip-io-domain.c
index 56bce19..8581252 100644
--- a/drivers/power/avs/rockchip-io-domain.c
+++ b/drivers/power/avs/rockchip-io-domain.c
@@ -43,6 +43,10 @@
#define RK3288_SOC_CON2_FLASH0 BIT(7)
#define RK3288_SOC_FLASH_SUPPLY_NUM 2
+#define RK3328_SOC_CON4 0x410
+#define RK3328_SOC_CON4_VCCIO2 BIT(7)
+#define RK3328_SOC_VCCIO2_SUPPLY_NUM 1
+
#define RK3368_SOC_CON15 0x43c
#define RK3368_SOC_CON15_FLASH0 BIT(14)
#define RK3368_SOC_FLASH_SUPPLY_NUM 2
@@ -166,6 +170,25 @@ static void rk3288_iodomain_init(struct rockchip_iodomain *iod)
dev_warn(iod->dev, "couldn't update flash0 ctrl\n");
}
+static void rk3328_iodomain_init(struct rockchip_iodomain *iod)
+{
+ int ret;
+ u32 val;
+
+ /* if no vccio2 supply we should leave things alone */
+ if (!iod->supplies[RK3328_SOC_VCCIO2_SUPPLY_NUM].reg)
+ return;
+
+ /*
+ * set vccio2 iodomain to also use this framework
+ * instead of a special gpio.
+ */
+ val = RK3328_SOC_CON4_VCCIO2 | (RK3328_SOC_CON4_VCCIO2 << 16);
+ ret = regmap_write(iod->grf, RK3328_SOC_CON4, val);
+ if (ret < 0)
+ dev_warn(iod->dev, "couldn't update vccio2 vsel ctrl\n");
+}
+
static void rk3368_iodomain_init(struct rockchip_iodomain *iod)
{
int ret;
@@ -247,6 +270,20 @@ static void rk3399_pmu_iodomain_init(struct rockchip_iodomain *iod)
.init = rk3288_iodomain_init,
};
+static const struct rockchip_iodomain_soc_data soc_data_rk3328 = {
+ .grf_offset = 0x410,
+ .supply_names = {
+ "vccio1",
+ "vccio2",
+ "vccio3",
+ "vccio4",
+ "vccio5",
+ "vccio6",
+ "pmuio",
+ },
+ .init = rk3328_iodomain_init,
+};
+
static const struct rockchip_iodomain_soc_data soc_data_rk3368 = {
.grf_offset = 0x900,
.supply_names = {
@@ -312,6 +349,10 @@ static void rk3399_pmu_iodomain_init(struct rockchip_iodomain *iod)
.data = (void *)&soc_data_rk3288
},
{
+ .compatible = "rockchip,rk3328-io-voltage-domain",
+ .data = (void *)&soc_data_rk3328
+ },
+ {
.compatible = "rockchip,rk3368-io-voltage-domain",
.data = (void *)&soc_data_rk3368
},
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* [RESEND PATCH] PM / AVS: rockchip-io: add io selectors and supplies for rk3328
@ 2017-02-23 12:33 ` David Wu
0 siblings, 0 replies; 12+ messages in thread
From: David Wu @ 2017-02-23 12:33 UTC (permalink / raw)
To: linux-arm-kernel
From: "david.wu" <david.wu@rock-chips.com>
This adds the necessary data for handling io voltage domains on the rk3328.
As interesting tidbit, the rk3328 only contains one iodomain area in the
regular General Register Files (GRF).
Signed-off-by: david.wu <david.wu@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
---
.../bindings/power/rockchip-io-domain.txt | 1 +
drivers/power/avs/rockchip-io-domain.c | 41 ++++++++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
index d23dc00..d3a5a93 100644
--- a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
+++ b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
@@ -33,6 +33,7 @@ Required properties:
- compatible: should be one of:
- "rockchip,rk3188-io-voltage-domain" for rk3188
- "rockchip,rk3288-io-voltage-domain" for rk3288
+ - "rockchip,rk3328-io-voltage-domain" for rk3328
- "rockchip,rk3368-io-voltage-domain" for rk3368
- "rockchip,rk3368-pmu-io-voltage-domain" for rk3368 pmu-domains
- "rockchip,rk3399-io-voltage-domain" for rk3399
diff --git a/drivers/power/avs/rockchip-io-domain.c b/drivers/power/avs/rockchip-io-domain.c
index 56bce19..8581252 100644
--- a/drivers/power/avs/rockchip-io-domain.c
+++ b/drivers/power/avs/rockchip-io-domain.c
@@ -43,6 +43,10 @@
#define RK3288_SOC_CON2_FLASH0 BIT(7)
#define RK3288_SOC_FLASH_SUPPLY_NUM 2
+#define RK3328_SOC_CON4 0x410
+#define RK3328_SOC_CON4_VCCIO2 BIT(7)
+#define RK3328_SOC_VCCIO2_SUPPLY_NUM 1
+
#define RK3368_SOC_CON15 0x43c
#define RK3368_SOC_CON15_FLASH0 BIT(14)
#define RK3368_SOC_FLASH_SUPPLY_NUM 2
@@ -166,6 +170,25 @@ static void rk3288_iodomain_init(struct rockchip_iodomain *iod)
dev_warn(iod->dev, "couldn't update flash0 ctrl\n");
}
+static void rk3328_iodomain_init(struct rockchip_iodomain *iod)
+{
+ int ret;
+ u32 val;
+
+ /* if no vccio2 supply we should leave things alone */
+ if (!iod->supplies[RK3328_SOC_VCCIO2_SUPPLY_NUM].reg)
+ return;
+
+ /*
+ * set vccio2 iodomain to also use this framework
+ * instead of a special gpio.
+ */
+ val = RK3328_SOC_CON4_VCCIO2 | (RK3328_SOC_CON4_VCCIO2 << 16);
+ ret = regmap_write(iod->grf, RK3328_SOC_CON4, val);
+ if (ret < 0)
+ dev_warn(iod->dev, "couldn't update vccio2 vsel ctrl\n");
+}
+
static void rk3368_iodomain_init(struct rockchip_iodomain *iod)
{
int ret;
@@ -247,6 +270,20 @@ static void rk3399_pmu_iodomain_init(struct rockchip_iodomain *iod)
.init = rk3288_iodomain_init,
};
+static const struct rockchip_iodomain_soc_data soc_data_rk3328 = {
+ .grf_offset = 0x410,
+ .supply_names = {
+ "vccio1",
+ "vccio2",
+ "vccio3",
+ "vccio4",
+ "vccio5",
+ "vccio6",
+ "pmuio",
+ },
+ .init = rk3328_iodomain_init,
+};
+
static const struct rockchip_iodomain_soc_data soc_data_rk3368 = {
.grf_offset = 0x900,
.supply_names = {
@@ -312,6 +349,10 @@ static void rk3399_pmu_iodomain_init(struct rockchip_iodomain *iod)
.data = (void *)&soc_data_rk3288
},
{
+ .compatible = "rockchip,rk3328-io-voltage-domain",
+ .data = (void *)&soc_data_rk3328
+ },
+ {
.compatible = "rockchip,rk3368-io-voltage-domain",
.data = (void *)&soc_data_rk3368
},
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [RESEND PATCH] PM / AVS: rockchip-io: add io selectors and supplies for rk3328
2017-02-23 12:33 ` David Wu
(?)
@ 2017-02-23 22:17 ` Rafael J. Wysocki
-1 siblings, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2017-02-23 22:17 UTC (permalink / raw)
To: David Wu, khilman
Cc: nm, huangtao, heiko, linux-pm, rafael.j.wysocki, linux-kernel,
linux-rockchip, linux-arm-kernel
On Thursday, February 23, 2017 08:33:11 PM David Wu wrote:
> From: "david.wu" <david.wu@rock-chips.com>
>
> This adds the necessary data for handling io voltage domains on the rk3328.
> As interesting tidbit, the rk3328 only contains one iodomain area in the
> regular General Register Files (GRF).
>
> Signed-off-by: david.wu <david.wu@rock-chips.com>
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Kevin?
> ---
> .../bindings/power/rockchip-io-domain.txt | 1 +
> drivers/power/avs/rockchip-io-domain.c | 41 ++++++++++++++++++++++
> 2 files changed, 42 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> index d23dc00..d3a5a93 100644
> --- a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> +++ b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> @@ -33,6 +33,7 @@ Required properties:
> - compatible: should be one of:
> - "rockchip,rk3188-io-voltage-domain" for rk3188
> - "rockchip,rk3288-io-voltage-domain" for rk3288
> + - "rockchip,rk3328-io-voltage-domain" for rk3328
> - "rockchip,rk3368-io-voltage-domain" for rk3368
> - "rockchip,rk3368-pmu-io-voltage-domain" for rk3368 pmu-domains
> - "rockchip,rk3399-io-voltage-domain" for rk3399
> diff --git a/drivers/power/avs/rockchip-io-domain.c b/drivers/power/avs/rockchip-io-domain.c
> index 56bce19..8581252 100644
> --- a/drivers/power/avs/rockchip-io-domain.c
> +++ b/drivers/power/avs/rockchip-io-domain.c
> @@ -43,6 +43,10 @@
> #define RK3288_SOC_CON2_FLASH0 BIT(7)
> #define RK3288_SOC_FLASH_SUPPLY_NUM 2
>
> +#define RK3328_SOC_CON4 0x410
> +#define RK3328_SOC_CON4_VCCIO2 BIT(7)
> +#define RK3328_SOC_VCCIO2_SUPPLY_NUM 1
> +
> #define RK3368_SOC_CON15 0x43c
> #define RK3368_SOC_CON15_FLASH0 BIT(14)
> #define RK3368_SOC_FLASH_SUPPLY_NUM 2
> @@ -166,6 +170,25 @@ static void rk3288_iodomain_init(struct rockchip_iodomain *iod)
> dev_warn(iod->dev, "couldn't update flash0 ctrl\n");
> }
>
> +static void rk3328_iodomain_init(struct rockchip_iodomain *iod)
> +{
> + int ret;
> + u32 val;
> +
> + /* if no vccio2 supply we should leave things alone */
> + if (!iod->supplies[RK3328_SOC_VCCIO2_SUPPLY_NUM].reg)
> + return;
> +
> + /*
> + * set vccio2 iodomain to also use this framework
> + * instead of a special gpio.
> + */
> + val = RK3328_SOC_CON4_VCCIO2 | (RK3328_SOC_CON4_VCCIO2 << 16);
> + ret = regmap_write(iod->grf, RK3328_SOC_CON4, val);
> + if (ret < 0)
> + dev_warn(iod->dev, "couldn't update vccio2 vsel ctrl\n");
> +}
> +
> static void rk3368_iodomain_init(struct rockchip_iodomain *iod)
> {
> int ret;
> @@ -247,6 +270,20 @@ static void rk3399_pmu_iodomain_init(struct rockchip_iodomain *iod)
> .init = rk3288_iodomain_init,
> };
>
> +static const struct rockchip_iodomain_soc_data soc_data_rk3328 = {
> + .grf_offset = 0x410,
> + .supply_names = {
> + "vccio1",
> + "vccio2",
> + "vccio3",
> + "vccio4",
> + "vccio5",
> + "vccio6",
> + "pmuio",
> + },
> + .init = rk3328_iodomain_init,
> +};
> +
> static const struct rockchip_iodomain_soc_data soc_data_rk3368 = {
> .grf_offset = 0x900,
> .supply_names = {
> @@ -312,6 +349,10 @@ static void rk3399_pmu_iodomain_init(struct rockchip_iodomain *iod)
> .data = (void *)&soc_data_rk3288
> },
> {
> + .compatible = "rockchip,rk3328-io-voltage-domain",
> + .data = (void *)&soc_data_rk3328
> + },
> + {
> .compatible = "rockchip,rk3368-io-voltage-domain",
> .data = (void *)&soc_data_rk3368
> },
>
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [RESEND PATCH] PM / AVS: rockchip-io: add io selectors and supplies for rk3328
@ 2017-02-23 22:17 ` Rafael J. Wysocki
0 siblings, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2017-02-23 22:17 UTC (permalink / raw)
To: David Wu, khilman
Cc: nm, heiko, rafael.j.wysocki, huangtao, linux-rockchip, linux-pm,
linux-arm-kernel, linux-kernel
On Thursday, February 23, 2017 08:33:11 PM David Wu wrote:
> From: "david.wu" <david.wu@rock-chips.com>
>
> This adds the necessary data for handling io voltage domains on the rk3328.
> As interesting tidbit, the rk3328 only contains one iodomain area in the
> regular General Register Files (GRF).
>
> Signed-off-by: david.wu <david.wu@rock-chips.com>
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Kevin?
> ---
> .../bindings/power/rockchip-io-domain.txt | 1 +
> drivers/power/avs/rockchip-io-domain.c | 41 ++++++++++++++++++++++
> 2 files changed, 42 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> index d23dc00..d3a5a93 100644
> --- a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> +++ b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> @@ -33,6 +33,7 @@ Required properties:
> - compatible: should be one of:
> - "rockchip,rk3188-io-voltage-domain" for rk3188
> - "rockchip,rk3288-io-voltage-domain" for rk3288
> + - "rockchip,rk3328-io-voltage-domain" for rk3328
> - "rockchip,rk3368-io-voltage-domain" for rk3368
> - "rockchip,rk3368-pmu-io-voltage-domain" for rk3368 pmu-domains
> - "rockchip,rk3399-io-voltage-domain" for rk3399
> diff --git a/drivers/power/avs/rockchip-io-domain.c b/drivers/power/avs/rockchip-io-domain.c
> index 56bce19..8581252 100644
> --- a/drivers/power/avs/rockchip-io-domain.c
> +++ b/drivers/power/avs/rockchip-io-domain.c
> @@ -43,6 +43,10 @@
> #define RK3288_SOC_CON2_FLASH0 BIT(7)
> #define RK3288_SOC_FLASH_SUPPLY_NUM 2
>
> +#define RK3328_SOC_CON4 0x410
> +#define RK3328_SOC_CON4_VCCIO2 BIT(7)
> +#define RK3328_SOC_VCCIO2_SUPPLY_NUM 1
> +
> #define RK3368_SOC_CON15 0x43c
> #define RK3368_SOC_CON15_FLASH0 BIT(14)
> #define RK3368_SOC_FLASH_SUPPLY_NUM 2
> @@ -166,6 +170,25 @@ static void rk3288_iodomain_init(struct rockchip_iodomain *iod)
> dev_warn(iod->dev, "couldn't update flash0 ctrl\n");
> }
>
> +static void rk3328_iodomain_init(struct rockchip_iodomain *iod)
> +{
> + int ret;
> + u32 val;
> +
> + /* if no vccio2 supply we should leave things alone */
> + if (!iod->supplies[RK3328_SOC_VCCIO2_SUPPLY_NUM].reg)
> + return;
> +
> + /*
> + * set vccio2 iodomain to also use this framework
> + * instead of a special gpio.
> + */
> + val = RK3328_SOC_CON4_VCCIO2 | (RK3328_SOC_CON4_VCCIO2 << 16);
> + ret = regmap_write(iod->grf, RK3328_SOC_CON4, val);
> + if (ret < 0)
> + dev_warn(iod->dev, "couldn't update vccio2 vsel ctrl\n");
> +}
> +
> static void rk3368_iodomain_init(struct rockchip_iodomain *iod)
> {
> int ret;
> @@ -247,6 +270,20 @@ static void rk3399_pmu_iodomain_init(struct rockchip_iodomain *iod)
> .init = rk3288_iodomain_init,
> };
>
> +static const struct rockchip_iodomain_soc_data soc_data_rk3328 = {
> + .grf_offset = 0x410,
> + .supply_names = {
> + "vccio1",
> + "vccio2",
> + "vccio3",
> + "vccio4",
> + "vccio5",
> + "vccio6",
> + "pmuio",
> + },
> + .init = rk3328_iodomain_init,
> +};
> +
> static const struct rockchip_iodomain_soc_data soc_data_rk3368 = {
> .grf_offset = 0x900,
> .supply_names = {
> @@ -312,6 +349,10 @@ static void rk3399_pmu_iodomain_init(struct rockchip_iodomain *iod)
> .data = (void *)&soc_data_rk3288
> },
> {
> + .compatible = "rockchip,rk3328-io-voltage-domain",
> + .data = (void *)&soc_data_rk3328
> + },
> + {
> .compatible = "rockchip,rk3368-io-voltage-domain",
> .data = (void *)&soc_data_rk3368
> },
>
^ permalink raw reply [flat|nested] 12+ messages in thread* [RESEND PATCH] PM / AVS: rockchip-io: add io selectors and supplies for rk3328
@ 2017-02-23 22:17 ` Rafael J. Wysocki
0 siblings, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2017-02-23 22:17 UTC (permalink / raw)
To: linux-arm-kernel
On Thursday, February 23, 2017 08:33:11 PM David Wu wrote:
> From: "david.wu" <david.wu@rock-chips.com>
>
> This adds the necessary data for handling io voltage domains on the rk3328.
> As interesting tidbit, the rk3328 only contains one iodomain area in the
> regular General Register Files (GRF).
>
> Signed-off-by: david.wu <david.wu@rock-chips.com>
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Kevin?
> ---
> .../bindings/power/rockchip-io-domain.txt | 1 +
> drivers/power/avs/rockchip-io-domain.c | 41 ++++++++++++++++++++++
> 2 files changed, 42 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> index d23dc00..d3a5a93 100644
> --- a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> +++ b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> @@ -33,6 +33,7 @@ Required properties:
> - compatible: should be one of:
> - "rockchip,rk3188-io-voltage-domain" for rk3188
> - "rockchip,rk3288-io-voltage-domain" for rk3288
> + - "rockchip,rk3328-io-voltage-domain" for rk3328
> - "rockchip,rk3368-io-voltage-domain" for rk3368
> - "rockchip,rk3368-pmu-io-voltage-domain" for rk3368 pmu-domains
> - "rockchip,rk3399-io-voltage-domain" for rk3399
> diff --git a/drivers/power/avs/rockchip-io-domain.c b/drivers/power/avs/rockchip-io-domain.c
> index 56bce19..8581252 100644
> --- a/drivers/power/avs/rockchip-io-domain.c
> +++ b/drivers/power/avs/rockchip-io-domain.c
> @@ -43,6 +43,10 @@
> #define RK3288_SOC_CON2_FLASH0 BIT(7)
> #define RK3288_SOC_FLASH_SUPPLY_NUM 2
>
> +#define RK3328_SOC_CON4 0x410
> +#define RK3328_SOC_CON4_VCCIO2 BIT(7)
> +#define RK3328_SOC_VCCIO2_SUPPLY_NUM 1
> +
> #define RK3368_SOC_CON15 0x43c
> #define RK3368_SOC_CON15_FLASH0 BIT(14)
> #define RK3368_SOC_FLASH_SUPPLY_NUM 2
> @@ -166,6 +170,25 @@ static void rk3288_iodomain_init(struct rockchip_iodomain *iod)
> dev_warn(iod->dev, "couldn't update flash0 ctrl\n");
> }
>
> +static void rk3328_iodomain_init(struct rockchip_iodomain *iod)
> +{
> + int ret;
> + u32 val;
> +
> + /* if no vccio2 supply we should leave things alone */
> + if (!iod->supplies[RK3328_SOC_VCCIO2_SUPPLY_NUM].reg)
> + return;
> +
> + /*
> + * set vccio2 iodomain to also use this framework
> + * instead of a special gpio.
> + */
> + val = RK3328_SOC_CON4_VCCIO2 | (RK3328_SOC_CON4_VCCIO2 << 16);
> + ret = regmap_write(iod->grf, RK3328_SOC_CON4, val);
> + if (ret < 0)
> + dev_warn(iod->dev, "couldn't update vccio2 vsel ctrl\n");
> +}
> +
> static void rk3368_iodomain_init(struct rockchip_iodomain *iod)
> {
> int ret;
> @@ -247,6 +270,20 @@ static void rk3399_pmu_iodomain_init(struct rockchip_iodomain *iod)
> .init = rk3288_iodomain_init,
> };
>
> +static const struct rockchip_iodomain_soc_data soc_data_rk3328 = {
> + .grf_offset = 0x410,
> + .supply_names = {
> + "vccio1",
> + "vccio2",
> + "vccio3",
> + "vccio4",
> + "vccio5",
> + "vccio6",
> + "pmuio",
> + },
> + .init = rk3328_iodomain_init,
> +};
> +
> static const struct rockchip_iodomain_soc_data soc_data_rk3368 = {
> .grf_offset = 0x900,
> .supply_names = {
> @@ -312,6 +349,10 @@ static void rk3399_pmu_iodomain_init(struct rockchip_iodomain *iod)
> .data = (void *)&soc_data_rk3288
> },
> {
> + .compatible = "rockchip,rk3328-io-voltage-domain",
> + .data = (void *)&soc_data_rk3328
> + },
> + {
> .compatible = "rockchip,rk3368-io-voltage-domain",
> .data = (void *)&soc_data_rk3368
> },
>
^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <1487853191-10994-1-git-send-email-david.wu-TNX95d0MmH7DzftRWevZcw@public.gmane.org>]
* Re: [RESEND PATCH] PM / AVS: rockchip-io: add io selectors and supplies for rk3328
2017-02-23 12:33 ` David Wu
(?)
@ 2017-02-26 21:48 ` Kevin Hilman
-1 siblings, 0 replies; 12+ messages in thread
From: Kevin Hilman @ 2017-02-26 21:48 UTC (permalink / raw)
To: David Wu
Cc: nm-l0cyMroinI0, huangtao-TNX95d0MmH7DzftRWevZcw,
heiko-4mtYJXux2i+zQB+pC5nmwQ, linux-pm-u79uwXL29TY76Z2rM5mHXA,
rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w,
rjw-LthD3rsA81gm4RdzfppkhA, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
David Wu <david.wu-TNX95d0MmH7DzftRWevZcw@public.gmane.org> writes:
> From: "david.wu" <david.wu-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
>
> This adds the necessary data for handling io voltage domains on the rk3328.
> As interesting tidbit, the rk3328 only contains one iodomain area in the
> regular General Register Files (GRF).
>
> Signed-off-by: david.wu <david.wu-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> Reviewed-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Reviewed-by: Kevin Hilman <khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
Rafael, feel free to take directly. I don't currently have any other
AVS stuff in the queue.
Kevin
> ---
> .../bindings/power/rockchip-io-domain.txt | 1 +
> drivers/power/avs/rockchip-io-domain.c | 41 ++++++++++++++++++++++
> 2 files changed, 42 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> index d23dc00..d3a5a93 100644
> --- a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> +++ b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> @@ -33,6 +33,7 @@ Required properties:
> - compatible: should be one of:
> - "rockchip,rk3188-io-voltage-domain" for rk3188
> - "rockchip,rk3288-io-voltage-domain" for rk3288
> + - "rockchip,rk3328-io-voltage-domain" for rk3328
> - "rockchip,rk3368-io-voltage-domain" for rk3368
> - "rockchip,rk3368-pmu-io-voltage-domain" for rk3368 pmu-domains
> - "rockchip,rk3399-io-voltage-domain" for rk3399
> diff --git a/drivers/power/avs/rockchip-io-domain.c b/drivers/power/avs/rockchip-io-domain.c
> index 56bce19..8581252 100644
> --- a/drivers/power/avs/rockchip-io-domain.c
> +++ b/drivers/power/avs/rockchip-io-domain.c
> @@ -43,6 +43,10 @@
> #define RK3288_SOC_CON2_FLASH0 BIT(7)
> #define RK3288_SOC_FLASH_SUPPLY_NUM 2
>
> +#define RK3328_SOC_CON4 0x410
> +#define RK3328_SOC_CON4_VCCIO2 BIT(7)
> +#define RK3328_SOC_VCCIO2_SUPPLY_NUM 1
> +
> #define RK3368_SOC_CON15 0x43c
> #define RK3368_SOC_CON15_FLASH0 BIT(14)
> #define RK3368_SOC_FLASH_SUPPLY_NUM 2
> @@ -166,6 +170,25 @@ static void rk3288_iodomain_init(struct rockchip_iodomain *iod)
> dev_warn(iod->dev, "couldn't update flash0 ctrl\n");
> }
>
> +static void rk3328_iodomain_init(struct rockchip_iodomain *iod)
> +{
> + int ret;
> + u32 val;
> +
> + /* if no vccio2 supply we should leave things alone */
> + if (!iod->supplies[RK3328_SOC_VCCIO2_SUPPLY_NUM].reg)
> + return;
> +
> + /*
> + * set vccio2 iodomain to also use this framework
> + * instead of a special gpio.
> + */
> + val = RK3328_SOC_CON4_VCCIO2 | (RK3328_SOC_CON4_VCCIO2 << 16);
> + ret = regmap_write(iod->grf, RK3328_SOC_CON4, val);
> + if (ret < 0)
> + dev_warn(iod->dev, "couldn't update vccio2 vsel ctrl\n");
> +}
> +
> static void rk3368_iodomain_init(struct rockchip_iodomain *iod)
> {
> int ret;
> @@ -247,6 +270,20 @@ static void rk3399_pmu_iodomain_init(struct rockchip_iodomain *iod)
> .init = rk3288_iodomain_init,
> };
>
> +static const struct rockchip_iodomain_soc_data soc_data_rk3328 = {
> + .grf_offset = 0x410,
> + .supply_names = {
> + "vccio1",
> + "vccio2",
> + "vccio3",
> + "vccio4",
> + "vccio5",
> + "vccio6",
> + "pmuio",
> + },
> + .init = rk3328_iodomain_init,
> +};
> +
> static const struct rockchip_iodomain_soc_data soc_data_rk3368 = {
> .grf_offset = 0x900,
> .supply_names = {
> @@ -312,6 +349,10 @@ static void rk3399_pmu_iodomain_init(struct rockchip_iodomain *iod)
> .data = (void *)&soc_data_rk3288
> },
> {
> + .compatible = "rockchip,rk3328-io-voltage-domain",
> + .data = (void *)&soc_data_rk3328
> + },
> + {
> .compatible = "rockchip,rk3368-io-voltage-domain",
> .data = (void *)&soc_data_rk3368
> },
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [RESEND PATCH] PM / AVS: rockchip-io: add io selectors and supplies for rk3328
@ 2017-02-26 21:48 ` Kevin Hilman
0 siblings, 0 replies; 12+ messages in thread
From: Kevin Hilman @ 2017-02-26 21:48 UTC (permalink / raw)
To: David Wu
Cc: rjw, nm, heiko, rafael.j.wysocki, huangtao, linux-rockchip,
linux-pm, linux-arm-kernel, linux-kernel
David Wu <david.wu@rock-chips.com> writes:
> From: "david.wu" <david.wu@rock-chips.com>
>
> This adds the necessary data for handling io voltage domains on the rk3328.
> As interesting tidbit, the rk3328 only contains one iodomain area in the
> regular General Register Files (GRF).
>
> Signed-off-by: david.wu <david.wu@rock-chips.com>
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Rafael, feel free to take directly. I don't currently have any other
AVS stuff in the queue.
Kevin
> ---
> .../bindings/power/rockchip-io-domain.txt | 1 +
> drivers/power/avs/rockchip-io-domain.c | 41 ++++++++++++++++++++++
> 2 files changed, 42 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> index d23dc00..d3a5a93 100644
> --- a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> +++ b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> @@ -33,6 +33,7 @@ Required properties:
> - compatible: should be one of:
> - "rockchip,rk3188-io-voltage-domain" for rk3188
> - "rockchip,rk3288-io-voltage-domain" for rk3288
> + - "rockchip,rk3328-io-voltage-domain" for rk3328
> - "rockchip,rk3368-io-voltage-domain" for rk3368
> - "rockchip,rk3368-pmu-io-voltage-domain" for rk3368 pmu-domains
> - "rockchip,rk3399-io-voltage-domain" for rk3399
> diff --git a/drivers/power/avs/rockchip-io-domain.c b/drivers/power/avs/rockchip-io-domain.c
> index 56bce19..8581252 100644
> --- a/drivers/power/avs/rockchip-io-domain.c
> +++ b/drivers/power/avs/rockchip-io-domain.c
> @@ -43,6 +43,10 @@
> #define RK3288_SOC_CON2_FLASH0 BIT(7)
> #define RK3288_SOC_FLASH_SUPPLY_NUM 2
>
> +#define RK3328_SOC_CON4 0x410
> +#define RK3328_SOC_CON4_VCCIO2 BIT(7)
> +#define RK3328_SOC_VCCIO2_SUPPLY_NUM 1
> +
> #define RK3368_SOC_CON15 0x43c
> #define RK3368_SOC_CON15_FLASH0 BIT(14)
> #define RK3368_SOC_FLASH_SUPPLY_NUM 2
> @@ -166,6 +170,25 @@ static void rk3288_iodomain_init(struct rockchip_iodomain *iod)
> dev_warn(iod->dev, "couldn't update flash0 ctrl\n");
> }
>
> +static void rk3328_iodomain_init(struct rockchip_iodomain *iod)
> +{
> + int ret;
> + u32 val;
> +
> + /* if no vccio2 supply we should leave things alone */
> + if (!iod->supplies[RK3328_SOC_VCCIO2_SUPPLY_NUM].reg)
> + return;
> +
> + /*
> + * set vccio2 iodomain to also use this framework
> + * instead of a special gpio.
> + */
> + val = RK3328_SOC_CON4_VCCIO2 | (RK3328_SOC_CON4_VCCIO2 << 16);
> + ret = regmap_write(iod->grf, RK3328_SOC_CON4, val);
> + if (ret < 0)
> + dev_warn(iod->dev, "couldn't update vccio2 vsel ctrl\n");
> +}
> +
> static void rk3368_iodomain_init(struct rockchip_iodomain *iod)
> {
> int ret;
> @@ -247,6 +270,20 @@ static void rk3399_pmu_iodomain_init(struct rockchip_iodomain *iod)
> .init = rk3288_iodomain_init,
> };
>
> +static const struct rockchip_iodomain_soc_data soc_data_rk3328 = {
> + .grf_offset = 0x410,
> + .supply_names = {
> + "vccio1",
> + "vccio2",
> + "vccio3",
> + "vccio4",
> + "vccio5",
> + "vccio6",
> + "pmuio",
> + },
> + .init = rk3328_iodomain_init,
> +};
> +
> static const struct rockchip_iodomain_soc_data soc_data_rk3368 = {
> .grf_offset = 0x900,
> .supply_names = {
> @@ -312,6 +349,10 @@ static void rk3399_pmu_iodomain_init(struct rockchip_iodomain *iod)
> .data = (void *)&soc_data_rk3288
> },
> {
> + .compatible = "rockchip,rk3328-io-voltage-domain",
> + .data = (void *)&soc_data_rk3328
> + },
> + {
> .compatible = "rockchip,rk3368-io-voltage-domain",
> .data = (void *)&soc_data_rk3368
> },
^ permalink raw reply [flat|nested] 12+ messages in thread* [RESEND PATCH] PM / AVS: rockchip-io: add io selectors and supplies for rk3328
@ 2017-02-26 21:48 ` Kevin Hilman
0 siblings, 0 replies; 12+ messages in thread
From: Kevin Hilman @ 2017-02-26 21:48 UTC (permalink / raw)
To: linux-arm-kernel
David Wu <david.wu@rock-chips.com> writes:
> From: "david.wu" <david.wu@rock-chips.com>
>
> This adds the necessary data for handling io voltage domains on the rk3328.
> As interesting tidbit, the rk3328 only contains one iodomain area in the
> regular General Register Files (GRF).
>
> Signed-off-by: david.wu <david.wu@rock-chips.com>
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Rafael, feel free to take directly. I don't currently have any other
AVS stuff in the queue.
Kevin
> ---
> .../bindings/power/rockchip-io-domain.txt | 1 +
> drivers/power/avs/rockchip-io-domain.c | 41 ++++++++++++++++++++++
> 2 files changed, 42 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> index d23dc00..d3a5a93 100644
> --- a/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> +++ b/Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> @@ -33,6 +33,7 @@ Required properties:
> - compatible: should be one of:
> - "rockchip,rk3188-io-voltage-domain" for rk3188
> - "rockchip,rk3288-io-voltage-domain" for rk3288
> + - "rockchip,rk3328-io-voltage-domain" for rk3328
> - "rockchip,rk3368-io-voltage-domain" for rk3368
> - "rockchip,rk3368-pmu-io-voltage-domain" for rk3368 pmu-domains
> - "rockchip,rk3399-io-voltage-domain" for rk3399
> diff --git a/drivers/power/avs/rockchip-io-domain.c b/drivers/power/avs/rockchip-io-domain.c
> index 56bce19..8581252 100644
> --- a/drivers/power/avs/rockchip-io-domain.c
> +++ b/drivers/power/avs/rockchip-io-domain.c
> @@ -43,6 +43,10 @@
> #define RK3288_SOC_CON2_FLASH0 BIT(7)
> #define RK3288_SOC_FLASH_SUPPLY_NUM 2
>
> +#define RK3328_SOC_CON4 0x410
> +#define RK3328_SOC_CON4_VCCIO2 BIT(7)
> +#define RK3328_SOC_VCCIO2_SUPPLY_NUM 1
> +
> #define RK3368_SOC_CON15 0x43c
> #define RK3368_SOC_CON15_FLASH0 BIT(14)
> #define RK3368_SOC_FLASH_SUPPLY_NUM 2
> @@ -166,6 +170,25 @@ static void rk3288_iodomain_init(struct rockchip_iodomain *iod)
> dev_warn(iod->dev, "couldn't update flash0 ctrl\n");
> }
>
> +static void rk3328_iodomain_init(struct rockchip_iodomain *iod)
> +{
> + int ret;
> + u32 val;
> +
> + /* if no vccio2 supply we should leave things alone */
> + if (!iod->supplies[RK3328_SOC_VCCIO2_SUPPLY_NUM].reg)
> + return;
> +
> + /*
> + * set vccio2 iodomain to also use this framework
> + * instead of a special gpio.
> + */
> + val = RK3328_SOC_CON4_VCCIO2 | (RK3328_SOC_CON4_VCCIO2 << 16);
> + ret = regmap_write(iod->grf, RK3328_SOC_CON4, val);
> + if (ret < 0)
> + dev_warn(iod->dev, "couldn't update vccio2 vsel ctrl\n");
> +}
> +
> static void rk3368_iodomain_init(struct rockchip_iodomain *iod)
> {
> int ret;
> @@ -247,6 +270,20 @@ static void rk3399_pmu_iodomain_init(struct rockchip_iodomain *iod)
> .init = rk3288_iodomain_init,
> };
>
> +static const struct rockchip_iodomain_soc_data soc_data_rk3328 = {
> + .grf_offset = 0x410,
> + .supply_names = {
> + "vccio1",
> + "vccio2",
> + "vccio3",
> + "vccio4",
> + "vccio5",
> + "vccio6",
> + "pmuio",
> + },
> + .init = rk3328_iodomain_init,
> +};
> +
> static const struct rockchip_iodomain_soc_data soc_data_rk3368 = {
> .grf_offset = 0x900,
> .supply_names = {
> @@ -312,6 +349,10 @@ static void rk3399_pmu_iodomain_init(struct rockchip_iodomain *iod)
> .data = (void *)&soc_data_rk3288
> },
> {
> + .compatible = "rockchip,rk3328-io-voltage-domain",
> + .data = (void *)&soc_data_rk3328
> + },
> + {
> .compatible = "rockchip,rk3368-io-voltage-domain",
> .data = (void *)&soc_data_rk3368
> },
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [RESEND PATCH] PM / AVS: rockchip-io: add io selectors and supplies for rk3328
2017-02-26 21:48 ` Kevin Hilman
(?)
@ 2017-02-27 13:26 ` Rafael J. Wysocki
-1 siblings, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2017-02-27 13:26 UTC (permalink / raw)
To: Kevin Hilman
Cc: nm, huangtao, heiko, linux-pm, rafael.j.wysocki, linux-kernel,
linux-rockchip, David Wu, linux-arm-kernel
On Sunday, February 26, 2017 01:48:40 PM Kevin Hilman wrote:
> David Wu <david.wu@rock-chips.com> writes:
>
> > From: "david.wu" <david.wu@rock-chips.com>
> >
> > This adds the necessary data for handling io voltage domains on the rk3328.
> > As interesting tidbit, the rk3328 only contains one iodomain area in the
> > regular General Register Files (GRF).
> >
> > Signed-off-by: david.wu <david.wu@rock-chips.com>
> > Reviewed-by: Heiko Stuebner <heiko@sntech.de>
>
> Reviewed-by: Kevin Hilman <khilman@baylibre.com>
>
> Rafael, feel free to take directly. I don't currently have any other
> AVS stuff in the queue.
I'll queue it up for 4.12 then.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RESEND PATCH] PM / AVS: rockchip-io: add io selectors and supplies for rk3328
@ 2017-02-27 13:26 ` Rafael J. Wysocki
0 siblings, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2017-02-27 13:26 UTC (permalink / raw)
To: Kevin Hilman
Cc: David Wu, nm, heiko, rafael.j.wysocki, huangtao, linux-rockchip,
linux-pm, linux-arm-kernel, linux-kernel
On Sunday, February 26, 2017 01:48:40 PM Kevin Hilman wrote:
> David Wu <david.wu@rock-chips.com> writes:
>
> > From: "david.wu" <david.wu@rock-chips.com>
> >
> > This adds the necessary data for handling io voltage domains on the rk3328.
> > As interesting tidbit, the rk3328 only contains one iodomain area in the
> > regular General Register Files (GRF).
> >
> > Signed-off-by: david.wu <david.wu@rock-chips.com>
> > Reviewed-by: Heiko Stuebner <heiko@sntech.de>
>
> Reviewed-by: Kevin Hilman <khilman@baylibre.com>
>
> Rafael, feel free to take directly. I don't currently have any other
> AVS stuff in the queue.
I'll queue it up for 4.12 then.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 12+ messages in thread
* [RESEND PATCH] PM / AVS: rockchip-io: add io selectors and supplies for rk3328
@ 2017-02-27 13:26 ` Rafael J. Wysocki
0 siblings, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2017-02-27 13:26 UTC (permalink / raw)
To: linux-arm-kernel
On Sunday, February 26, 2017 01:48:40 PM Kevin Hilman wrote:
> David Wu <david.wu@rock-chips.com> writes:
>
> > From: "david.wu" <david.wu@rock-chips.com>
> >
> > This adds the necessary data for handling io voltage domains on the rk3328.
> > As interesting tidbit, the rk3328 only contains one iodomain area in the
> > regular General Register Files (GRF).
> >
> > Signed-off-by: david.wu <david.wu@rock-chips.com>
> > Reviewed-by: Heiko Stuebner <heiko@sntech.de>
>
> Reviewed-by: Kevin Hilman <khilman@baylibre.com>
>
> Rafael, feel free to take directly. I don't currently have any other
> AVS stuff in the queue.
I'll queue it up for 4.12 then.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 12+ messages in thread