Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp473787rdb; Fri, 26 Jan 2024 00:57:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHfrx+YqWQKSyf6LVNBDy1FG0mOlqqbISN3B61N7fiEZY2iP0SlNq6K6zoeqCfIK0icEzYm X-Received: by 2002:a17:907:7673:b0:a31:15a9:ecec with SMTP id kk19-20020a170907767300b00a3115a9ececmr1125839ejc.13.1706259425170; Fri, 26 Jan 2024 00:57:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706259425; cv=pass; d=google.com; s=arc-20160816; b=00eIKxkPYtDJ89c2YTOebKrDIJB463rqpSVHZsQ3YVebCoNCEcyaYS2dKgcnGdk2wM 3dCE9j9/oL5Moe5T7B0fhfOJa6NZMUePSqVFlCiMnRktgCoZTpSJNqiRvmlMtHWym99M JxeZJokUJh5kj4PX0eNJleEPI8gnG03fx5pXHbzzygTrk6hiVzubHno6PG0GVMlu9FDy 1OPTyNWsRjngUSs84NAxJ27t5zkx5ZwEcxl7N3pfWXTkDG8mrVKjUqz/9g5Y+TDnqM1J i0JwXn3XxOvVyV2ULhbOW5bwA7xqYWPtf+R17N8cWAWC7LnRC94Hu826+PCGt0S0TIU0 WOJw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=o0t+MfDqVm3X5Nqibb28Ci/mN20IReJ02S0VvZJURXU=; fh=J1hUYYNdeFQVMmaNG9yCFAT+rwMD8mTfbt7b0RDxxGs=; b=Bpbl1phVrq7lk20nA6KLkqFOf7cmSPi3paSKFVhtNy23sy9xG1rCtGzUAemAB5PsGM mVUlB/83VJzM1JyCmTGJ3J8Upfl9CfSLJQTKK4iRI7EatZQk6/+o6uoOXLdoXpaw5A4+ znP9RnP5FqGz3xVbG/oVvVTrWHA+gbvKurCqMzX6o2S3sIBLr8G6GvSDs8DLEtt5XZK+ VfvqFnFPNvTz+WYbGx7drYbXXNIfILuNqkkBxbUbiqbew9iIXBDkUqib3l6K3N2IGsp9 RYQLNDNzWvy7MuAPGlcENfatiD3X0K1BdXWpLE03WjmwqAvZnLaU6Tkxy07wZHVSP9Bc EE8w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rock-chips.com header.s=default header.b=YFOPswdg; arc=pass (i=1 spf=pass spfdomain=rock-chips.com dkim=pass dkdomain=rock-chips.com dmarc=pass fromdomain=rock-chips.com); spf=pass (google.com: domain of linux-kernel+bounces-39691-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39691-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=rock-chips.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id cd19-20020a170906b35300b00a3164b1fb9dsi353787ejb.64.2024.01.26.00.57.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 00:57:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39691-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@rock-chips.com header.s=default header.b=YFOPswdg; arc=pass (i=1 spf=pass spfdomain=rock-chips.com dkim=pass dkdomain=rock-chips.com dmarc=pass fromdomain=rock-chips.com); spf=pass (google.com: domain of linux-kernel+bounces-39691-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39691-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=rock-chips.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 050DE1F2521E for ; Fri, 26 Jan 2024 08:56:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 976AC1B275; Fri, 26 Jan 2024 07:12:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=rock-chips.com header.i=@rock-chips.com header.b="YFOPswdg" Received: from mail-m12752.qiye.163.com (mail-m12752.qiye.163.com [115.236.127.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F15E21A14 for ; Fri, 26 Jan 2024 07:11:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.236.127.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706253118; cv=none; b=ABXpsitL7WjogXVvNM+EHd3DzqHSZ8J/N53r2vqTeR3cWywTVBwcle5w7YJCKOAWSVRWSpicN+sRpvM/JSIljbhQU6Et1nR4g5oHb8tDqm6EgNDIf5h2ko7w9Cw4GPenYK6PEKbHdCr0GNUZMGGSywMTDHDQW4j09pTWUTutxss= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706253118; c=relaxed/simple; bh=dcIAeG3Ad3qzRg2oAb5j/Ir8olPhDHQEiDDtXnwU9Bg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=TH1q+iGKGeSqwYFttR1rDrp4km0pt7uDPm1Lq/g5pxDo2ug1MO1/xofCMIl+pjOYHMy+MVZHDfDreL6aqYrQtiEOhQD+suIctAGkuEvN5hkwLGFnjWTM/hrgFCvN1ocOOGFAI5nfH2POywvq58zj/08SdI6KrVJnCkC22IUnzT4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rock-chips.com; spf=pass smtp.mailfrom=rock-chips.com; dkim=pass (1024-bit key) header.d=rock-chips.com header.i=@rock-chips.com header.b=YFOPswdg; arc=none smtp.client-ip=115.236.127.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rock-chips.com DKIM-Signature: a=rsa-sha256; b=YFOPswdg7rBxtjGvY8CH7u++ZspuDmBVGAFE0YiKDY6Kpz3ROhPkZhHAbsg7udKDRdxOgI31dRT9zqciiqi7d9qiL0UZ5WSReqjhjDiZWASQCHHWqMPzOHfxZbgDNZxwIDXbHEsVn5ZdQ5XmhVxbxeJ7th/i5iQYAZ79079zH1U=; c=relaxed/relaxed; s=default; d=rock-chips.com; v=1; bh=o0t+MfDqVm3X5Nqibb28Ci/mN20IReJ02S0VvZJURXU=; h=date:mime-version:subject:message-id:from; Received: from [192.168.60.65] (unknown [103.29.142.67]) by smtp.qiye.163.com (Hmail) with ESMTPA id 683D79001AB; Fri, 26 Jan 2024 10:56:46 +0800 (CST) Message-ID: Date: Fri, 26 Jan 2024 10:56:42 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] soc: rockchip: grf: Fix SDMMC not working on RK3588 with bus-width > 1 Content-Language: en-US To: =?UTF-8?Q?Ond=C5=99ej_Jirman?= , linux-rockchip@lists.infradead.org Cc: Heiko Stuebner , "moderated list:ARM/Rockchip SoC support" , open list References: <20230619011002.2249960-1-megi@xff.cz> From: Kever Yang In-Reply-To: <20230619011002.2249960-1-megi@xff.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVlCGEpMVh8aTx8eTBkYTklJTFUTARMWGhIXJBQOD1 lXWRgSC1lBWUpLSFVJQlVKT0lVTUxZV1kWGg8SFR0UWUFZT0tIVUpNT0lOSFVKS0tVSkJLS1kG X-HM-Tid: 0a8d43b2c95a03a9kunm683d79001ab X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6PC46PTo*TDMJDA9OFgsPEU4q SUwwCkpVSlVKTEtNSUhMQ0tMSE1CVTMWGhIXVRAeDR4JVQIaFRw7CRQYEFYYExILCFUYFBZFWVdZ EgtZQVlKS0hVSUJVSk9JVU1MWVdZCAFZQUhMQks3Bg++ Hi Ondrej, On 2023/6/19 09:09, Ondřej Jirman wrote: > 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 = <1>. (JTAG is muxed to data pins D2 and D3) Which board did you met this issue? The force jtag function should be work if all the iomux and hardware setting is corret:     All the IO for SDMMC signal including SDMMC_DET, should set the iomux/pinctrl to mmc function instead of GPIO function. Seems like you are working on rk3588-quartzpro64, when I check its dts, I found below setting in sdmmc node: cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>; Since quartzpro64 is using the correct IO and there is already a &sdmmc_det in sdmmc node, you don't need to overwrite it with "cd-gpios". Could you help to revert this patch and remove "cd-gpios" in dts sdmmc, and test sdmmc function again? It should work with SD card 4 line mode and force jtag available when people need it. Thanks, - Kever > > 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 = { > .num_values = ARRAY_SIZE(rk3566_defaults), > }; > > +#define RK3588_GRF_SOC_CON6 0x0318 > + > +static const struct rockchip_grf_value rk3588_defaults[] __initconst = { > + { "jtag switching", RK3588_GRF_SOC_CON6, HIWORD_UPDATE(0, 1, 14) }, > +}; > + > +static const struct rockchip_grf_info rk3588_sysgrf __initconst = { > + .values = rk3588_defaults, > + .num_values = ARRAY_SIZE(rk3588_defaults), > +}; > + > > static const struct of_device_id rockchip_grf_dt_match[] __initconst = { > { > @@ -147,6 +158,9 @@ static const struct of_device_id rockchip_grf_dt_match[] __initconst = { > }, { > .compatible = "rockchip,rk3566-pipe-grf", > .data = (void *)&rk3566_pipegrf, > + }, { > + .compatible = "rockchip,rk3588-sys-grf", > + .data = (void *)&rk3588_sysgrf, > }, > { /* sentinel */ }, > };