From nobody Sun Feb 8 04:13:03 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCE7CEB64D8 for ; Mon, 19 Jun 2023 01:10:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229597AbjFSBKP (ORCPT ); Sun, 18 Jun 2023 21:10:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjFSBKO (ORCPT ); Sun, 18 Jun 2023 21:10:14 -0400 Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 586DE1B0 for ; Sun, 18 Jun 2023 18:10:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1687137006; bh=l1Av13OOBeHvZ6hhVrMrrY1JviPoUrwczfkLMItzFNU=; h=From:To:Cc:Subject:Date:From; b=v1GWcFzR9GXrM78ith3aTO2L3gwShkuGbtZcQitGAWjKjPiIG8QMtzxBAEzVIKr5s AE+7K9ITO/vaFMj+gIME6QDFFf9xirUQTYL7fISoQT1pUXU5Hk7p9jYqn2ms8C1mI/ wZFoZqj11dtT0Zy4eI1IoJMuxNV2P9qo2FKX57xY= From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= To: linux-rockchip@lists.infradead.org Cc: Ondrej Jirman , Heiko Stuebner , linux-arm-kernel@lists.infradead.org (moderated list:ARM/Rockchip SoC support), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] soc: rockchip: grf: Fix SDMMC not working on RK3588 with bus-width > 1 Date: Mon, 19 Jun 2023 03:09:58 +0200 Message-ID: <20230619011002.2249960-1-megi@xff.cz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Ondrej Jirman RK3588 has the same issue as other earlier RK SoCs. JTAG functionality muxed to some SDMMC data pins causes issues with SDMMC interface. Without this patch, I can only use SDMMC inteface with bus-width =3D <1>. (JTAG is muxed to data pins D2 and D3) Signed-off-by: Ondrej Jirman --- 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 15a3970e3509..d768c5a70174 100644 --- a/drivers/soc/rockchip/grf.c +++ b/drivers/soc/rockchip/grf.c @@ -121,6 +121,17 @@ static const struct rockchip_grf_info rk3566_pipegrf _= _initconst =3D { .num_values =3D ARRAY_SIZE(rk3566_defaults), }; =20 +#define RK3588_GRF_SOC_CON6 0x0318 + +static const struct rockchip_grf_value rk3588_defaults[] __initconst =3D { + { "jtag switching", RK3588_GRF_SOC_CON6, HIWORD_UPDATE(0, 1, 14) }, +}; + +static const struct rockchip_grf_info rk3588_sysgrf __initconst =3D { + .values =3D rk3588_defaults, + .num_values =3D ARRAY_SIZE(rk3588_defaults), +}; + =20 static const struct of_device_id rockchip_grf_dt_match[] __initconst =3D { { @@ -147,6 +158,9 @@ static const struct of_device_id rockchip_grf_dt_match[= ] __initconst =3D { }, { .compatible =3D "rockchip,rk3566-pipe-grf", .data =3D (void *)&rk3566_pipegrf, + }, { + .compatible =3D "rockchip,rk3588-sys-grf", + .data =3D (void *)&rk3588_sysgrf, }, { /* sentinel */ }, }; --=20 2.41.0