public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] soc: rockchip: disable jtag switching for RK3128 SoCs
@ 2018-03-02 12:20 Heiko Stuebner
  2018-03-05 14:39 ` Shawn Lin
  0 siblings, 1 reply; 4+ messages in thread
From: Heiko Stuebner @ 2018-03-02 12:20 UTC (permalink / raw)
  To: linux-arm-kernel

From: Xiao Yao <xiaoyao@rock-chips.com>

Disable IO function switching between sdmmc and jtag
for RK3128 SoCs.

Signed-off-by: Xiao Yao <xiaoyao@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 drivers/soc/rockchip/grf.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/soc/rockchip/grf.c b/drivers/soc/rockchip/grf.c
index dd81b87d79f0..96882ffde67e 100644
--- a/drivers/soc/rockchip/grf.c
+++ b/drivers/soc/rockchip/grf.c
@@ -43,6 +43,17 @@ static const struct rockchip_grf_info rk3036_grf __initconst = {
 	.num_values = ARRAY_SIZE(rk3036_defaults),
 };
 
+#define RK3128_GRF_SOC_CON0		0x140
+
+static const struct rockchip_grf_value rk3128_defaults[] __initconst = {
+	{ "jtag switching", RK3128_GRF_SOC_CON0, HIWORD_UPDATE(0, 1, 8) },
+};
+
+static const struct rockchip_grf_info rk3128_grf __initconst = {
+	.values = rk3128_defaults,
+	.num_values = ARRAY_SIZE(rk3128_defaults),
+};
+
 #define RK3228_GRF_SOC_CON6		0x418
 
 static const struct rockchip_grf_value rk3228_defaults[] __initconst = {
@@ -102,6 +113,9 @@ static const struct of_device_id rockchip_grf_dt_match[] __initconst = {
 	{
 		.compatible = "rockchip,rk3036-grf",
 		.data = (void *)&rk3036_grf,
+	}, {
+		.compatible = "rockchip,rk3128-grf",
+		.data = (void *)&rk3128_grf,
 	}, {
 		.compatible = "rockchip,rk3228-grf",
 		.data = (void *)&rk3228_grf,
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] soc: rockchip: disable jtag switching for RK3128 SoCs
  2018-03-02 12:20 [PATCH] soc: rockchip: disable jtag switching for RK3128 SoCs Heiko Stuebner
@ 2018-03-05 14:39 ` Shawn Lin
  2018-03-05 14:42   ` Heiko Stuebner
  0 siblings, 1 reply; 4+ messages in thread
From: Shawn Lin @ 2018-03-05 14:39 UTC (permalink / raw)
  To: linux-arm-kernel

On 2018/3/2 20:20, Heiko Stuebner wrote:
> From: Xiao Yao <xiaoyao@rock-chips.com>
> 
> Disable IO function switching between sdmmc and jtag
> for RK3128 SoCs.
> 

I acked this on the vendor kernel tree, so FWIW:

Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>

Hope this is one of the final patches for that, as I would
revive IO function switching between sdmmc and jtag for newer
SoCs after addressing the problem from HW level.



> Signed-off-by: Xiao Yao <xiaoyao@rock-chips.com>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
>   drivers/soc/rockchip/grf.c | 14 ++++++++++++++
>   1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/soc/rockchip/grf.c b/drivers/soc/rockchip/grf.c
> index dd81b87d79f0..96882ffde67e 100644
> --- a/drivers/soc/rockchip/grf.c
> +++ b/drivers/soc/rockchip/grf.c
> @@ -43,6 +43,17 @@ static const struct rockchip_grf_info rk3036_grf __initconst = {
>   	.num_values = ARRAY_SIZE(rk3036_defaults),
>   };
>   
> +#define RK3128_GRF_SOC_CON0		0x140
> +
> +static const struct rockchip_grf_value rk3128_defaults[] __initconst = {
> +	{ "jtag switching", RK3128_GRF_SOC_CON0, HIWORD_UPDATE(0, 1, 8) },
> +};
> +
> +static const struct rockchip_grf_info rk3128_grf __initconst = {
> +	.values = rk3128_defaults,
> +	.num_values = ARRAY_SIZE(rk3128_defaults),
> +};
> +
>   #define RK3228_GRF_SOC_CON6		0x418
>   
>   static const struct rockchip_grf_value rk3228_defaults[] __initconst = {
> @@ -102,6 +113,9 @@ static const struct of_device_id rockchip_grf_dt_match[] __initconst = {
>   	{
>   		.compatible = "rockchip,rk3036-grf",
>   		.data = (void *)&rk3036_grf,
> +	}, {
> +		.compatible = "rockchip,rk3128-grf",
> +		.data = (void *)&rk3128_grf,
>   	}, {
>   		.compatible = "rockchip,rk3228-grf",
>   		.data = (void *)&rk3228_grf,
> 


-- 
Best Regards
Shawn Lin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] soc: rockchip: disable jtag switching for RK3128 SoCs
  2018-03-05 14:39 ` Shawn Lin
@ 2018-03-05 14:42   ` Heiko Stuebner
  2018-03-05 14:55     ` Shawn Lin
  0 siblings, 1 reply; 4+ messages in thread
From: Heiko Stuebner @ 2018-03-05 14:42 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Shawn,

Am Montag, 5. M?rz 2018, 15:39:04 CET schrieb Shawn Lin:
> On 2018/3/2 20:20, Heiko Stuebner wrote:
> > From: Xiao Yao <xiaoyao@rock-chips.com>
> > 
> > Disable IO function switching between sdmmc and jtag
> > for RK3128 SoCs.
> > 
> 
> I acked this on the vendor kernel tree, so FWIW:
> 
> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
> 
> Hope this is one of the final patches for that, as I would
> revive IO function switching between sdmmc and jtag for newer
> SoCs after addressing the problem from HW level.

the main problem we had with that was that the  mmc-subsystem
somehow definitly didn't like it when the controller pins where pulled
out from under it on card eject.

But of course, if you can get this solved by hw somehow, that
would be pretty cool :-)


Heiko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] soc: rockchip: disable jtag switching for RK3128 SoCs
  2018-03-05 14:42   ` Heiko Stuebner
@ 2018-03-05 14:55     ` Shawn Lin
  0 siblings, 0 replies; 4+ messages in thread
From: Shawn Lin @ 2018-03-05 14:55 UTC (permalink / raw)
  To: linux-arm-kernel

On 2018/3/5 22:42, Heiko Stuebner wrote:
> Hi Shawn,
> 
> Am Montag, 5. M?rz 2018, 15:39:04 CET schrieb Shawn Lin:
>> On 2018/3/2 20:20, Heiko Stuebner wrote:
>>> From: Xiao Yao <xiaoyao@rock-chips.com>
>>>
>>> Disable IO function switching between sdmmc and jtag
>>> for RK3128 SoCs.
>>>
>>
>> I acked this on the vendor kernel tree, so FWIW:
>>
>> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
>>
>> Hope this is one of the final patches for that, as I would
>> revive IO function switching between sdmmc and jtag for newer
>> SoCs after addressing the problem from HW level.
> 
> the main problem we had with that was that the  mmc-subsystem
> somehow definitly didn't like it when the controller pins where pulled
> out from under it on card eject.

Right, we had sort out it's timing revelant between mmc controller and
the switching hw block.

> 
> But of course, if you can get this solved by hw somehow, that
> would be pretty cool :-)

It is under extensively tested now, and seems quite positive. :)

> 
> 
> Heiko
> 
> 
> 


-- 
Best Regards
Shawn Lin

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-05 14:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-02 12:20 [PATCH] soc: rockchip: disable jtag switching for RK3128 SoCs Heiko Stuebner
2018-03-05 14:39 ` Shawn Lin
2018-03-05 14:42   ` Heiko Stuebner
2018-03-05 14:55     ` Shawn Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox