From patchwork Sat Feb 17 13:00:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 202616 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp306952dyc; Sat, 17 Feb 2024 05:02:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUuDqa85ndXEEa8KoWI/8bJa07qpWDigmN8OQkloIJRKEmkjekmfPQqiKibsaFOS7Ocf9rstn7aPMhFviarKj0VYkiehQ== X-Google-Smtp-Source: AGHT+IEg67VOuDtz/NhJISydBL3s+2f4+kpt0zeh8hX0D12HjXYNL5SciVvCPrqSrHgq2cgb/z1n X-Received: by 2002:a05:6a20:e68d:b0:19e:9a75:7851 with SMTP id mz13-20020a056a20e68d00b0019e9a757851mr8641371pzb.3.1708174941461; Sat, 17 Feb 2024 05:02:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708174941; cv=pass; d=google.com; s=arc-20160816; b=Xx/Py0bab8PpHBjTtkyU9MMDihRJn60Fg2OMGbfHEXMVQvP8iwEAtkohymI83bU0WK FCHGUkH2bMMq9QE7VhEPqb7+3uP0nMIqxOgRko46UMZnAVRax4lppWK+KR8lQgRIHggb ILVuEN4rwKvft8k7sblkL5TGsRR6EmH2HtUqKwg9duJ675Mraa4AaKobQweoXaDS/C24 Ghg+ZXVZ6ZTpVfyRBMRsaM+xSYS2VqWGoGfuoFJw2O0KLERsFo3HdrsxgNadUjoK6YHP 3bBv35mjUeMQ0U+e8MrF+B6Xq1MiBHusL/ahK/U1rMncMcE5AqKrAjHd/SCf4sPpR6UI m3pQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=r5LAeDafp6SlV51FL4IFDbVVSVdllmf4Yk3bxC0Buqc=; fh=Ie/rQP3nz1+GfmIZYsun15B3MFgSOumJ7o8bpKP5K84=; b=TR96lvYO9CiX/QnAI3cfHUhiH6l19v8rYoLBWMQWMgy00qg9d3DgfvsYlFbJlVuBGq 5Dniqx2Pz06tvoJuuFOyDcfjyi7x+A4+N/M+fH/lmQ4N5BiNRuz+qGoE7x6f+oDXOg6p pogVC6Zm4kOSDv5qdQypYQJzg0VgJj36U0nr6447+maXxf6hr+3fFmIoVPfQi2DIyyik txfEOYhoP9KsGvK+GtU8Y2g46b2ui6Syp5a46juD0zc2JOG0ImpoFcaCZS8wSTovusWX uWjCTfkpi/84OP4t72yU/OEEuVUUluHxtE7AUCbg6um7HFJfEmKiV/JbZzXokFTwhL7X M+wQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="M6XWPE/C"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69855-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69855-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q67-20020a634346000000b005cfda2f8f08si1151885pga.452.2024.02.17.05.02.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 05:02:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69855-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="M6XWPE/C"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69855-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69855-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 476C7282400 for ; Sat, 17 Feb 2024 13:02:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 618A27C08E; Sat, 17 Feb 2024 13:01:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="M6XWPE/C" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 BC9E03DBBB; Sat, 17 Feb 2024 13:01:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708174881; cv=none; b=B1b3SQNIlSMV6bdJw8V+4g56+sr5cwdos8goFIYSe5VQWXkz580JGA3g7pPzDNKZRqe2BHazJEafjJuPq5qWqwD/hq4DCc2s7NBAmUZOmRisSV2kaRO/JYfe2umXcBU6UGcGyqbV1YtzE+OC9MkT+O8KFwB4fMPiEp8pkEp3eA4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708174881; c=relaxed/simple; bh=uiy23fzx9AJKJeZCc+CpWKPnHutJKS8U/tiBSjzkWs4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=k2+ucRSNiKfWPeT9V5czKtzBBcp70yyRjfjBvVQ74Mk2BVVUa/2+vZlcqBbdLJQF2kTDp6w08v4qZ9LC8ZI79cdk6XvIgpG602Sy1wt7hLJPRSR67DrsqhtT/QXFHqFDVvbggE8yWNGXMmJhg0fzAVRghM6ytlumRmeKtLCdh0Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=M6XWPE/C; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 92F19C433C7; Sat, 17 Feb 2024 13:01:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708174881; bh=uiy23fzx9AJKJeZCc+CpWKPnHutJKS8U/tiBSjzkWs4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=M6XWPE/CJ/2hlwW69ATq3fqpxb7P56tKpuB2LexT0HGjqxTiy5/bfK27l5GMbAbcA rUgEyNm2L4IIrJqwcPKxP3FSb1pLxzP3K+wQGovS5EuHMXX9l5VQUTLA7zRhf4ADhg I5ENZaOetAG0hF4i/mkJR57ToYqfyNuIkQ5AKi5OlyvcSjlkty2pZKhrb9bxhb9G0o ARev8ZEOSs7hcd/933PjS6taTneizlfsdMf3SAGp22SR7S7uwwcsQF7C196hJ1O2Hp n4HHenkD12SKmkaOuxMe7axQuuIpIM+7ccj62XfWqlhhIqqaasE51ngUY4SW2Px0EY 4LdVb8LCe2chw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79BC8C5475B; Sat, 17 Feb 2024 13:01:21 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Sat, 17 Feb 2024 21:00:54 +0800 Subject: [PATCH v4 1/4] mmc: dw_mmc-hi3798cv200: remove MODULE_ALIAS() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240217-b4-mmc-hi3798mv200-v4-1-0fdd9bd48532@outlook.com> References: <20240217-b4-mmc-hi3798mv200-v4-0-0fdd9bd48532@outlook.com> In-Reply-To: <20240217-b4-mmc-hi3798mv200-v4-0-0fdd9bd48532@outlook.com> To: Ulf Hansson , Jaehoon Chung , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Igor Opaniuk , tianshuliang , David Yang , linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, Yang Xiwen , Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708174876; l=722; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=MzqKbWX8E5l9h/hzBiWtMINHXtoCtQN0jkOqsqOv7OM=; b=p0Ru/9B0Gk5E2CLKrQbhOKHda9ywTxh0drWAf+iaFC5vAIAFNgoKlj+svGoazn/8OR2LKjXQm tbUpbM/Cn74D3Pkr29ca8stVMRbgFhJxfLx6P32i2mmrRFadbIBH/ob X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791151247517833969 X-GMAIL-MSGID: 1791151247517833969 From: Yang Xiwen The alias is not used and should be removed. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Yang Xiwen --- drivers/mmc/host/dw_mmc-hi3798cv200.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mmc/host/dw_mmc-hi3798cv200.c b/drivers/mmc/host/dw_mmc-hi3798cv200.c index e9470c50a348..61923a518369 100644 --- a/drivers/mmc/host/dw_mmc-hi3798cv200.c +++ b/drivers/mmc/host/dw_mmc-hi3798cv200.c @@ -201,4 +201,3 @@ module_platform_driver(dw_mci_hi3798cv200_driver); MODULE_DESCRIPTION("HiSilicon Hi3798CV200 Specific DW-MSHC Driver Extension"); MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("platform:dwmmc_hi3798cv200"); From patchwork Sat Feb 17 13:00:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 202618 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp307204dyc; Sat, 17 Feb 2024 05:02:43 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXEI/w4iqHOmYy4VLX/T7K8eN7cilnRiHC4QN4rkT/89TVUYOg0tO7bvlEOaJg6tPNnHxguhP3pZyspjDx6aA0yTztJmQ== X-Google-Smtp-Source: AGHT+IEuj4mQQIrmviMcV9bB0mYNl/iXsVGBuDTrr92/TpJcCRRKb3GuPg5bh4m0JV9mo9zJGv5j X-Received: by 2002:a1f:4c84:0:b0:4c0:774b:e7b0 with SMTP id z126-20020a1f4c84000000b004c0774be7b0mr5780132vka.13.1708174962896; Sat, 17 Feb 2024 05:02:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708174962; cv=pass; d=google.com; s=arc-20160816; b=rI/vZXmK1VlFY6QCtw8OOgPXOxEKi1zbXUZGNq+1mdB4Hsza02D2w1jZn1+b9jeibm FjJXCifCJJVRgcLA47LODUMPTTEuD0rTjwdWcHGdYDwSc7UyIucNwq28JlmCHaAOUTVl E/Gh80ckPf9POuba3tUAluHL5iocjCnyUxw6pQDLxPQvyMxmT/EkolFDAC7f9lG+GAPA GwPimdkVNtplu9F9aEH7Ah9X0R+JhPS90nrIBeQzVPrvpMyN8Anqfg3EKbRQ2K59dfjh qznAv6rOahFpFlPlP5xDGPLcN7qz0FtRv7iTvoW7thp0qnjikOWZW/i1nPhRxH+sQs9N 8vnQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=9TT+2nHBRBqdsEqL5VILKQ4mMxGHKOI2z5lDYfyAfDE=; fh=qrLD1Bzw/v8uOtvD8TPeCBb7psUcqsm97yGxLmHNFfU=; b=UTJe3Qd3Zaw6w4R2Mp3KNIRSub5KpFIZTQc1aLtH/hfNCIwE1SMvp+wnvPaP+P0nd/ o97bOoAiFujAkDANlsd883QaN4XkTPXmWg4VTsOe5dUPI8S4k4Z6/TbxoAd7ocC3K1o2 A50oQ2heF7JhRGUJGqLutNDuiGz020o5gkJ07Kw9lzwJfpTS4vCOqhWYdORlz83SCwK9 3X/xSFHYrVdGPXebudyZh8O3FtOqWSNiLh6y3O5dT5EXHS71wkb8LBXnSX6/yL3sA97o wT+fYFjD13xnrezl2KotadgtEFYbEnG3uBlVgGFPtSRcp3yq7lbn2w3msHlPjHSjsbpa /dlw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BMlbF2Kb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69856-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69856-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a7-20020ac5c4c7000000b004bd4a95b8d0si399217vkl.261.2024.02.17.05.02.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 05:02:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69856-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BMlbF2Kb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69856-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69856-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 998691C21B6E for ; Sat, 17 Feb 2024 13:02:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB60F7C6C1; Sat, 17 Feb 2024 13:01:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BMlbF2Kb" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 CCE36657B6; Sat, 17 Feb 2024 13:01:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708174881; cv=none; b=bXXNnmz+WpQIcuwN2vXi67yNwsILTJNTlDK/WBkOhuvSXKmaFkPjMqJQmmZGC1Jf77H5YzbZoUQEWQXTmaWKVjrPTBzBm6dcxSISnMfAHye9x6u/6sLC5xFZrzipW9pNbH3qmAOF8c5bMvDIBFMvdLxUmoZSdHyVkgH2WlSftEo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708174881; c=relaxed/simple; bh=tv2Xuz6CpMKcrJjZYSehkqKc6XHdPD8PJ9seVNpS/PM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fP9uxJWuDJyBo8xmXvJA8Wuwk6G9yZ0Z75QiTqDWju2NL3gyWVUACCS0n2gsQ/hPj0JPlFwmTDv9xgJKw/JCQujaHn0aIxLl/WrfAikhsXvuCa4vCIPr1M408KCYQh4y72YojPSmCngyL5ZctfAHojE/bBTntxjo9mO6gsKJa+g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BMlbF2Kb; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 9D960C43390; Sat, 17 Feb 2024 13:01:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708174881; bh=tv2Xuz6CpMKcrJjZYSehkqKc6XHdPD8PJ9seVNpS/PM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=BMlbF2KbqoYoHEVtGBltaGco5/Ej98kONYdbD4i1vqWWiLtWSVkrtprPAQgtFxwXQ w749OOTlG0hP8f3NwZmp0MHzQGj1RYInid7wg+YDTSg8fupCytmGoX26z8DFBFuy0Q yTwhynpQ5627OOP0dkjwBPF2BmB8Wndw8FYVod//eaAXWUd4Zhv8tZgj8tWonVk8m2 OLDG8nhgJDLteZtsabzNRy7qXnMH0mOYfor/nxoIuqqfFFAmWR4FowkmfyemR/rW5d DkWs6ou+R6RMlVCbWTs8drNra6x9Yt16MsWwiJubJpDQ1MYKfJc+FO+QuAXpwDLuTR Vlt3xjT+fs5ng== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84108C48BC3; Sat, 17 Feb 2024 13:01:21 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Sat, 17 Feb 2024 21:00:55 +0800 Subject: [PATCH v4 2/4] mmc: dw_mmc: add support for hi3798mv200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240217-b4-mmc-hi3798mv200-v4-2-0fdd9bd48532@outlook.com> References: <20240217-b4-mmc-hi3798mv200-v4-0-0fdd9bd48532@outlook.com> In-Reply-To: <20240217-b4-mmc-hi3798mv200-v4-0-0fdd9bd48532@outlook.com> To: Ulf Hansson , Jaehoon Chung , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Igor Opaniuk , tianshuliang , David Yang , linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708174876; l=8914; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=ZXUq4LugZ7YohpARkO8qzS8uuAtt58OsC2QWLmIjkWE=; b=4Fe+/y8j5yWXjyNtSMK8tSzRpKFhjOrYlZ45n6bPI8cohsLsgcwZZNjwGb1DQ0UggPomVlcJ1 XaVrMONJNGNBMIr+PokyN2gx7WN+MtTcMLaD4XEsiS83D70wkS/2hNH X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791151270011388469 X-GMAIL-MSGID: 1791151270011388469 From: Yang Xiwen Add support for Hi3798MV200 specific extension. Signed-off-by: Yang Xiwen --- drivers/mmc/host/Kconfig | 9 ++ drivers/mmc/host/Makefile | 1 + drivers/mmc/host/dw_mmc-hi3798mv200.c | 235 ++++++++++++++++++++++++++++++++++ 3 files changed, 245 insertions(+) diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 81f2c4e05287..aebc587f77a7 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -798,6 +798,15 @@ config MMC_DW_HI3798CV200 Synopsys DesignWare Memory Card Interface driver. Select this option for platforms based on HiSilicon Hi3798CV200 SoC. +config MMC_DW_HI3798MV200 + tristate "Hi3798MV200 specific extensions for Synopsys DW Memory Card Interface" + depends on MMC_DW + select MMC_DW_PLTFM + help + This selects support for HiSilicon Hi3798MV200 SoC specific extensions to the + Synopsys DesignWare Memory Card Interface driver. Select this option + for platforms based on HiSilicon Hi3798MV200 SoC. + config MMC_DW_K3 tristate "K3 specific extensions for Synopsys DW Memory Card Interface" depends on MMC_DW diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile index d0be4465f3ec..f53f86d200ac 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -51,6 +51,7 @@ obj-$(CONFIG_MMC_DW_PLTFM) += dw_mmc-pltfm.o obj-$(CONFIG_MMC_DW_BLUEFIELD) += dw_mmc-bluefield.o obj-$(CONFIG_MMC_DW_EXYNOS) += dw_mmc-exynos.o obj-$(CONFIG_MMC_DW_HI3798CV200) += dw_mmc-hi3798cv200.o +obj-$(CONFIG_MMC_DW_HI3798MV200) += dw_mmc-hi3798mv200.o obj-$(CONFIG_MMC_DW_K3) += dw_mmc-k3.o obj-$(CONFIG_MMC_DW_PCI) += dw_mmc-pci.o obj-$(CONFIG_MMC_DW_ROCKCHIP) += dw_mmc-rockchip.o diff --git a/drivers/mmc/host/dw_mmc-hi3798mv200.c b/drivers/mmc/host/dw_mmc-hi3798mv200.c new file mode 100644 index 000000000000..b7d1d1a31a3f --- /dev/null +++ b/drivers/mmc/host/dw_mmc-hi3798mv200.c @@ -0,0 +1,235 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Modified from dw_mmc-hi3798cv200.c + * + * Copyright (c) 2024 Yang Xiwen + * Copyright (c) 2018 HiSilicon Technologies Co., Ltd. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "dw_mmc.h" +#include "dw_mmc-pltfm.h" + +#define SDMMC_TUNING_CTRL 0x118 +#define SDMMC_TUNING_FIND_EDGE BIT(5) + +#define ALL_INT_CLR 0x1ffff + +/* DLL ctrl reg */ +#define SAP_DLL_CTRL_DLLMODE BIT(16) + +struct dw_mci_hi3798mv200_priv { + struct clk *sample_clk; + struct clk *drive_clk; + struct regmap *sap_dll_reg; + struct mmc_clk_phase_map phase_map; +}; + +static void dw_mci_hi3798mv200_set_ios(struct dw_mci *host, struct mmc_ios *ios) +{ + struct dw_mci_hi3798mv200_priv *priv = host->priv; + struct mmc_clk_phase phase = priv->phase_map.phase[ios->timing]; + u32 val; + + val = mci_readl(host, ENABLE_SHIFT); + if (ios->timing == MMC_TIMING_MMC_DDR52 + || ios->timing == MMC_TIMING_UHS_DDR50) + val |= SDMMC_ENABLE_PHASE; + else + val &= ~SDMMC_ENABLE_PHASE; + mci_writel(host, ENABLE_SHIFT, val); + + val = mci_readl(host, DDR_REG); + if (ios->timing == MMC_TIMING_MMC_HS400) + val |= SDMMC_DDR_HS400; + else + val &= ~SDMMC_DDR_HS400; + mci_writel(host, DDR_REG, val); + + if (clk_set_rate(host->ciu_clk, ios->clock)) + dev_warn(host->dev, "Failed to set rate to %u\n", ios->clock); + else + // CLK_MUX_ROUND_NEAREST is enabled for this clock + // The actual clock rate is not what we setted, but a rounded value + // so we should get the rate once again + host->bus_hz = clk_get_rate(host->ciu_clk); + + if (phase.valid) { + clk_set_phase(priv->drive_clk, phase.out_deg); + clk_set_phase(priv->sample_clk, phase.in_deg); + } else { + dev_warn(host->dev, + "The phase entry for timing mode %d is missing in device tree.\n", + ios->timing); + } +} + +static inline int dw_mci_hi3798mv200_enable_tuning(struct dw_mci_slot *slot) +{ + struct dw_mci_hi3798mv200_priv *priv = slot->host->priv; + struct regmap *dll_reg = priv->sap_dll_reg; + + return regmap_clear_bits(dll_reg, 0, SAP_DLL_CTRL_DLLMODE); +} + +static inline int dw_mci_hi3798mv200_disable_tuning(struct dw_mci_slot *slot) +{ + struct dw_mci_hi3798mv200_priv *priv = slot->host->priv; + struct regmap *dll_reg = priv->sap_dll_reg; + + return regmap_set_bits(dll_reg, 0, SAP_DLL_CTRL_DLLMODE); +} + +static int dw_mci_hi3798mv200_execute_tuning_mix_mode(struct dw_mci_slot *slot, + u32 opcode) +{ + static const int degrees[] = { 0, 45, 90, 135, 180, 225, 270, 315 }; + struct dw_mci *host = slot->host; + struct dw_mci_hi3798mv200_priv *priv = host->priv; + int raise_point = -1, fall_point = -1; + int err, prev_err = -1; + int found = 0; + int regval; + int i; + int ret; + + // enable tuning + ret = dw_mci_hi3798mv200_enable_tuning(slot); + if (ret < 0) + return ret; + for (i = 0; i < ARRAY_SIZE(degrees); i++) { + clk_set_phase(priv->sample_clk, degrees[i]); + mci_writel(host, RINTSTS, ALL_INT_CLR); + + err = mmc_send_tuning(slot->mmc, opcode, NULL); + if (!err) { + regval = mci_readl(host, TUNING_CTRL); + if (regval & SDMMC_TUNING_FIND_EDGE) + err = 1; + else + found = 1; + }; + + if (i > 0) { + if (err && !prev_err) + fall_point = i - 1; + if (!err && prev_err) + raise_point = i; + } + + if (raise_point != -1 && fall_point != -1) + goto tuning_out; + + prev_err = err; + err = 0; + } + +tuning_out: + ret = dw_mci_hi3798mv200_disable_tuning(slot); + if (ret < 0) + return ret; + if (found) { + if (raise_point == -1) + raise_point = 0; + if (fall_point == -1) + fall_point = ARRAY_SIZE(degrees) - 1; + if (fall_point < raise_point) { + if ((raise_point + fall_point) > + (ARRAY_SIZE(degrees) - 1)) + i = fall_point / 2; + else + i = (raise_point + ARRAY_SIZE(degrees) - 1) / 2; + } else { + i = (raise_point + fall_point) / 2; + } + + // use the same phase table for both HS200 and HS400 + priv->phase_map.phase[MMC_TIMING_MMC_HS200].in_deg = degrees[i]; + priv->phase_map.phase[MMC_TIMING_MMC_HS400].in_deg = degrees[i]; + + clk_set_phase(priv->sample_clk, degrees[i]); + dev_dbg(host->dev, "Tuning clk_sample[%d, %d], set[%d]\n", + raise_point, fall_point, degrees[i]); + err = 0; + } else { + dev_err(host->dev, "No valid clk_sample shift! use default\n"); + err = -EINVAL; + } + + mci_writel(host, RINTSTS, ALL_INT_CLR); + return err; +} + +static int dw_mci_hi3798mv200_init(struct dw_mci *host) +{ + struct dw_mci_hi3798mv200_priv *priv; + struct device_node *np = host->dev->of_node; + + priv = devm_kzalloc(host->dev, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + mmc_of_parse_clk_phase(host->dev, &priv->phase_map); + + priv->sample_clk = devm_clk_get_enabled(host->dev, "ciu-sample"); + if (IS_ERR(priv->sample_clk)) + return dev_err_probe(host->dev, PTR_ERR(priv->sample_clk), + "failed to get enabled ciu-sample clock\n"); + + priv->drive_clk = devm_clk_get_enabled(host->dev, "ciu-drive"); + if (IS_ERR(priv->drive_clk)) + return dev_err_probe(host->dev, PTR_ERR(priv->drive_clk), + "failed to get enabled ciu-drive clock\n"); + + priv->sap_dll_reg = syscon_regmap_lookup_by_phandle(np, "hisilicon,sap-dll-reg"); + if (IS_ERR(priv->sap_dll_reg)) + return dev_err_probe(host->dev, PTR_ERR(priv->sap_dll_reg), + "failed to get sap-dll-reg\n"); + + host->priv = priv; + return 0; +} + +static const struct dw_mci_drv_data hi3798mv200_data = { + .common_caps = MMC_CAP_CMD23, + .init = dw_mci_hi3798mv200_init, + .set_ios = dw_mci_hi3798mv200_set_ios, + .execute_tuning = dw_mci_hi3798mv200_execute_tuning_mix_mode, +}; + +static const struct of_device_id dw_mci_hi3798mv200_match[] = { + { .compatible = "hisilicon,hi3798mv200-dw-mshc" }, + {}, +}; + +static int dw_mci_hi3798mv200_probe(struct platform_device *pdev) +{ + return dw_mci_pltfm_register(pdev, &hi3798mv200_data); +} + +static void dw_mci_hi3798mv200_remove(struct platform_device *pdev) +{ + dw_mci_pltfm_remove(pdev); +} + +MODULE_DEVICE_TABLE(of, dw_mci_hi3798mv200_match); +static struct platform_driver dw_mci_hi3798mv200_driver = { + .probe = dw_mci_hi3798mv200_probe, + .remove_new = dw_mci_hi3798mv200_remove, + .driver = { + .name = "dwmmc_hi3798mv200", + .probe_type = PROBE_PREFER_ASYNCHRONOUS, + .of_match_table = dw_mci_hi3798mv200_match, + }, +}; +module_platform_driver(dw_mci_hi3798mv200_driver); + +MODULE_DESCRIPTION("HiSilicon Hi3798MV200 Specific DW-MSHC Driver Extension"); +MODULE_LICENSE("GPL"); From patchwork Sat Feb 17 13:00:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 202617 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp307120dyc; Sat, 17 Feb 2024 05:02:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVYIQzNaiDrm+7KiXTrmR50cNdHa3xBKLkyTX38SvyP14KmDPXa1doyn7vGwrAoHx9MDLxSmri8e5zQ3akGapMbExEZqA== X-Google-Smtp-Source: AGHT+IH04wXs4gGv7nk5ooErgJXiWJwf4HiiEpn/bgPS6dTRwPbb5TDn/rxjrvY/XTDFgc1QjzQF X-Received: by 2002:a17:902:ec8d:b0:1d8:ee28:a305 with SMTP id x13-20020a170902ec8d00b001d8ee28a305mr8977962plg.54.1708174957262; Sat, 17 Feb 2024 05:02:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708174957; cv=pass; d=google.com; s=arc-20160816; b=kj4vEJX8wuzzZzv6OpQYwi1j6Ljqoo7fjDiz5ZWyAsROb97rmy/BJCRCofUPtEdP2K qyVKyFW80UnsCKR64a8r9yHBAdw5i6uycMBd6kk23H5GJefRWepsUJGqbXXMacaZq1fo FhdYU6nQLLygimX189n0+naNsC7ynElMT7ey/wBU6DIrshl1GL5c+QWEWbrPVOq518lu mUC2giL7eqma2Pybjpe5EdbS7bt93JAjx50ViiSyJkqzx5qt1O/xu+BINB5rK0uKMm2N 68k7XfIvwZlcBkg9ycCNhYXFwFeCl0LfLzyvYDp+SSXp5YVeAW7U0ueHujdwMQpVTm4W D8Sw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=BySu18w2SrTawG8qSKpMTUbAyEW4uOqaAkv4O2h8w0o=; fh=Ie/rQP3nz1+GfmIZYsun15B3MFgSOumJ7o8bpKP5K84=; b=owUoVErysf5D8FI/r66hd0gnLA1y+9H6pmKkjBgkIGgkcaBFG9UrX07jZPd1Nmo8nA 7Wyv90FHhbIy0YVedv+qqpvV+kri88jJhrAbobyYhFAN4jSycCBgcs7c8aT/NjaPs5IT 6Gv33RcQgQmh4/HdMtk04PVwoArCyN2QwAwBxnWJPUc8mRuaxAz/a4YryRIH5D9XWQ+i c+OFmRa4c3bw37z3a1wDETV9bsh/LNYv90d2E4ZBi3XqJSYJ0H4abRzqWZTz7sZ1+HwI P1U4zkJN92DXKBiht02z0UMNzJxKeRfKMi5WbcPbZsNaUu9TN5/kUCarJQFrLA21ssKf 2/ZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WZueS9SS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69858-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69858-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q9-20020a17090311c900b001db492705ffsi1512080plh.97.2024.02.17.05.02.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 05:02:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69858-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WZueS9SS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69858-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69858-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 11994282186 for ; Sat, 17 Feb 2024 13:02:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C1F87C0B3; Sat, 17 Feb 2024 13:01:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WZueS9SS" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1EA837A73A; Sat, 17 Feb 2024 13:01:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708174882; cv=none; b=DwYls3mK3RRG8dIrMS7ykLAms9HygOjxbyKHfmCPmE/7Z3nwzFQLWyR7seayGJez8pWf8YIG6AaprywlPO7QJSWU4jpNYGIc4nPHtv4VelKzAg5YLdAYztVUXJmWJWgehok8n+5zEXB5YnOgOxRd56UHsHHLQM3WnKwArd07hZE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708174882; c=relaxed/simple; bh=ZAX9Em2I3TtnHcZcltf0TchJ6NPlrQE8PyBaCkDKCT0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=I0XFIA2JNr4gAnfWzLhgJmtuAsqn1Lo2DKoYmBuOI40oSfBlmEzfXMe5faJsJYasQZchlRKn/ten2WEQOz2ziYzWzgkmBsIUdQnmxPYSRYDGZ0g1JWg5nNTj4OZXItI/oMl9juFZ3r/A1E/T6D5SjpWHHqI4XUQZvO4wEQnedhI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WZueS9SS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id A58D5C43394; Sat, 17 Feb 2024 13:01:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708174881; bh=ZAX9Em2I3TtnHcZcltf0TchJ6NPlrQE8PyBaCkDKCT0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=WZueS9SS2pr3d2SQlDx7zGR2e5lKIQ6SqFK3dlCbExrAiYgG8YyE7B92UzMkPbUHA mpQAdf+s/UXDgviAvbx147zfIJhGSACsopMqs8tWmWoVktrT2WXM3mFZ3+cRelzn/O hObmaD0cUWieje6qXkOeN4/5UdNGSuMnc5zawvj1nUFx4gRWYKZx7CC8ri3LaNgGf6 5XN74tpmqZCotmLIYMZL5ElrFmbavSmAYFhPsOxATelxb0Hd7po5S0f62aJehQLrh/ Utis8qEBDxzeFzY5gnTYS2bhJQax4hnFv2D5ejmkbARxpcsoI/8N5Hk4ToLyD9Rihz 4S6uWTQ7u6nCw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E985C54766; Sat, 17 Feb 2024 13:01:21 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Sat, 17 Feb 2024 21:00:56 +0800 Subject: [PATCH v4 3/4] dt-bindings: mmc: dw-mshc-hi3798cv200: convert to YAML Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240217-b4-mmc-hi3798mv200-v4-3-0fdd9bd48532@outlook.com> References: <20240217-b4-mmc-hi3798mv200-v4-0-0fdd9bd48532@outlook.com> In-Reply-To: <20240217-b4-mmc-hi3798mv200-v4-0-0fdd9bd48532@outlook.com> To: Ulf Hansson , Jaehoon Chung , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Igor Opaniuk , tianshuliang , David Yang , linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, Yang Xiwen , Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708174876; l=4709; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=z5/cBD8zJzGgT2WFAWSZ2rRYPe9PGIgRVLWNL1lYtXo=; b=3/y8yFfax0Z8i0ogUexGcigrwWgsMQl5uH6jU/k+dW4L1ySMvgIZWa0msJ7KVjz4sN6a5gpim Eworul8TuAaBYJVlrk2o95GaEGeJ03Mkh3UlbgZ5hyxWjw0M7LDOXsX X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791151263856738168 X-GMAIL-MSGID: 1791151263856738168 From: Yang Xiwen convert the legacy txt binding to modern YAML and rename to hisilicon,hi3798cv200-dw-mshc.yaml. No semantic change. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Yang Xiwen --- .../bindings/mmc/hi3798cv200-dw-mshc.txt | 40 ------------ .../mmc/hisilicon,hi3798cv200-dw-mshc.yaml | 75 ++++++++++++++++++++++ 2 files changed, 75 insertions(+), 40 deletions(-) diff --git a/Documentation/devicetree/bindings/mmc/hi3798cv200-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/hi3798cv200-dw-mshc.txt deleted file mode 100644 index a0693b7145f2..000000000000 --- a/Documentation/devicetree/bindings/mmc/hi3798cv200-dw-mshc.txt +++ /dev/null @@ -1,40 +0,0 @@ -* Hisilicon Hi3798CV200 specific extensions to the Synopsys Designware Mobile - Storage Host Controller - -Read synopsys-dw-mshc.txt for more details - -The Synopsys designware mobile storage host controller is used to interface -a SoC with storage medium such as eMMC or SD/MMC cards. This file documents -differences between the core Synopsys dw mshc controller properties described -by synopsys-dw-mshc.txt and the properties used by the Hisilicon Hi3798CV200 -specific extensions to the Synopsys Designware Mobile Storage Host Controller. - -Required Properties: -- compatible: Should contain "hisilicon,hi3798cv200-dw-mshc". -- clocks: A list of phandle + clock-specifier pairs for the clocks listed - in clock-names. -- clock-names: Should contain the following: - "ciu" - The ciu clock described in synopsys-dw-mshc.txt. - "biu" - The biu clock described in synopsys-dw-mshc.txt. - "ciu-sample" - Hi3798CV200 extended phase clock for ciu sampling. - "ciu-drive" - Hi3798CV200 extended phase clock for ciu driving. - -Example: - - emmc: mmc@9830000 { - compatible = "hisilicon,hi3798cv200-dw-mshc"; - reg = <0x9830000 0x10000>; - interrupts = ; - clocks = <&crg HISTB_MMC_CIU_CLK>, - <&crg HISTB_MMC_BIU_CLK>, - <&crg HISTB_MMC_SAMPLE_CLK>, - <&crg HISTB_MMC_DRV_CLK>; - clock-names = "ciu", "biu", "ciu-sample", "ciu-drive"; - fifo-depth = <256>; - clock-frequency = <200000000>; - cap-mmc-highspeed; - mmc-ddr-1_8v; - mmc-hs200-1_8v; - non-removable; - bus-width = <8>; - }; diff --git a/Documentation/devicetree/bindings/mmc/hisilicon,hi3798cv200-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/hisilicon,hi3798cv200-dw-mshc.yaml new file mode 100644 index 000000000000..f3dc973cb490 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/hisilicon,hi3798cv200-dw-mshc.yaml @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mmc/hisilicon,hi3798cv200-dw-mshc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Hisilicon Hi3798CV200 SoC specific extensions to the Synopsys DWMMC controller + +maintainers: + - Yang Xiwen + +properties: + compatible: + enum: + - hisilicon,hi3798cv200-dw-mshc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: bus interface unit clock + - description: card interface unit clock + - description: card input sample phase clock + - description: controller output drive phase clock + + clock-names: + items: + - const: ciu + - const: biu + - const: ciu-sample + - const: ciu-drive + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +allOf: + - $ref: synopsys-dw-mshc-common.yaml# + +unevaluatedProperties: false + +examples: + - | + #include + #include + + mmc@9830000 { + compatible = "hisilicon,hi3798cv200-dw-mshc"; + reg = <0x9830000 0x10000>; + interrupts = ; + clocks = <&crg HISTB_MMC_CIU_CLK>, + <&crg HISTB_MMC_BIU_CLK>, + <&crg HISTB_MMC_SAMPLE_CLK>, + <&crg HISTB_MMC_DRV_CLK>; + clock-names = "ciu", "biu", "ciu-sample", "ciu-drive"; + resets = <&crg 0xa0 4>; + reset-names = "reset"; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_pins_1 &emmc_pins_2 + &emmc_pins_3 &emmc_pins_4>; + fifo-depth = <256>; + clock-frequency = <200000000>; + cap-mmc-highspeed; + mmc-ddr-1_8v; + mmc-hs200-1_8v; + non-removable; + bus-width = <8>; + }; From patchwork Sat Feb 17 13:00:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Xiwen via B4 Relay X-Patchwork-Id: 202619 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp307269dyc; Sat, 17 Feb 2024 05:02:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUXf7MtXmUkxKCjk1faM4AWw/WhGXD/VP85FJkzSz9T2yAXLnGs8xcQgpZ6JCI5MWqPbSkX+h/Flv5c+EBinjJ7fBQC+g== X-Google-Smtp-Source: AGHT+IFLT4BB8iPhG/6ctRjRNpLEPNKYzDa8kIGHIUuqNRsocFij24Wmydwn9tKtOYWN912Whr6R X-Received: by 2002:a17:90a:8986:b0:299:51f6:5230 with SMTP id v6-20020a17090a898600b0029951f65230mr1257860pjn.15.1708174969946; Sat, 17 Feb 2024 05:02:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708174969; cv=pass; d=google.com; s=arc-20160816; b=W6v5GArFoIXs/16mmAfiQKEXIOMoP5c6yM7mL+b4oDOX+/DJHEGiL879vv5ciNKwF3 PQfr+LRrjAAfYDerGqDQo6JfINyn78rZgsC3Nje048v8zbkDzpPNSX8schgePPAEqUaJ xLLWSBfyWNK7/4WyW3r/Q/UfcN2+NVJ5WeustQWvAKr5Ki6LzyzjE04K/UdEpTpeX9sQ NkIH38oI1SwkigTr3AP/5UnFhHJbvIlfXPj4qtJkOEzmhaSWTwQR7whWXa/JCl8Qx65u 3m4w4dm70IR+XgHK0TMkfMcCec/5hUYb3dJjhioHFwfTPsu2QsUQ0cB2qD+qfupTZhJC EmlA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=ueG+HaOt2D0Mh7F3CE/1K7zhTjChqpyJ+ZIj8pQCfQY=; fh=qrLD1Bzw/v8uOtvD8TPeCBb7psUcqsm97yGxLmHNFfU=; b=X9wCUTa8SfkwR0wpuY3LiVXZyKkNbXl3Flrbu7R8q4J7t2dtL8RZsPoIj03Mhsz6eT Q/zvrrz4DHErwMZTtZKPlrfbAjAJww5N9SJOOk9CbmBA0jHnqlno2t/R+t3R0e4LpxW1 sQEhjho2rKBFdHGI4Voz2l0UM3v0hnS6ktELaJt8aYzHFfRTs9uhE2BTsDBEYIKi3qbI yy2JkZSskNPX7Gv8221rQsDUY6oU/Mvmt/kuihuazow/u5nIBCWGyKqRI08rdwAoFuex U60zrWM4sqx1y7Stkras+eYISEC0p/k3GUFxrMxeda8Y/rBZP0tcdLBPeRKlEtbV1YHk YQ6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MLfIPVlK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69859-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69859-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id lt9-20020a17090b354900b002993f393765si1551538pjb.76.2024.02.17.05.02.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 05:02:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69859-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MLfIPVlK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69859-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69859-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 451E7B20F07 for ; Sat, 17 Feb 2024 13:02:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC30B7C0A3; Sat, 17 Feb 2024 13:01:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MLfIPVlK" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3C5197AE4E; Sat, 17 Feb 2024 13:01:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708174882; cv=none; b=sfourq+fz414pnKQg2DG/rhYxYbdVPMBJwzIYXoev8gNIUSPPnp3r/5UIrsbXK9WYkgl7QwPh2dXSdPvoI2jODOzwrqWXq70b/qeRTmx+0DX99hIzyNXqXWbYYIpGQW/GNLS4j/H9nHoxRDMc7t0/vaARj0LP8j0zkNv5h7N5yk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708174882; c=relaxed/simple; bh=a0Rnun53xamkzRBY9WJl2kq9P3bR/nz0WyszTolKlyk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=C60jj24jx3XT4yACSFAbD1OU9HMddKsogZlVhYz1KF3suTTpA+8iVApwqCecGhLTqNFimULxDrF7Peh6+m6cLrCqSpj4cXSIxy+rqP5f93uCbCgjYJ2+h0eauyQhT5RldkekBamBgg5c317P+uBgBU/jfy13FEw5+XAvtOacd8k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MLfIPVlK; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id B1A23C43601; Sat, 17 Feb 2024 13:01:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708174881; bh=a0Rnun53xamkzRBY9WJl2kq9P3bR/nz0WyszTolKlyk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=MLfIPVlKDb60KRKjOhhOMWVMRX4pusZQ7YBCRYsoVhYfYDf38ZFiXesEKD9gSif0U M6Ac3ijQy5hFcL8bwv99BAWL3kc9fMQ4/MpzcKx/hQ7h7yj6zIJJ+JtLLfCd6BS3DJ 3K+3auWfgB7YzngLpMSb1hp/7M5pWthbpm+RzkpVh1MuEY/h5uJxUjI1tT8pYsWMQ4 QwBi4ehNe0Fm9aBKp9DcvypGjqc/jQdPDPyKIXcgyJwVO3NCe4/ZjQBbo746l3+Vxm HUjWkGW+DE/3wunb/n+b0k6aotO9lKZlSqZ4Q/XPzrxc1sJjOYfSCJ+RYB7UYLu523 nXe8Yle4Cg2Rw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97657C54764; Sat, 17 Feb 2024 13:01:21 +0000 (UTC) From: Yang Xiwen via B4 Relay Date: Sat, 17 Feb 2024 21:00:57 +0800 Subject: [PATCH v4 4/4] dt-bindings: mmc: hisilicon,hi3798cv200-dw-mshc: rename to hisilicon,hi3798-dw-mshc Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240217-b4-mmc-hi3798mv200-v4-4-0fdd9bd48532@outlook.com> References: <20240217-b4-mmc-hi3798mv200-v4-0-0fdd9bd48532@outlook.com> In-Reply-To: <20240217-b4-mmc-hi3798mv200-v4-0-0fdd9bd48532@outlook.com> To: Ulf Hansson , Jaehoon Chung , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Igor Opaniuk , tianshuliang , David Yang , linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, Yang Xiwen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708174876; l=1929; i=forbidden405@outlook.com; s=20230724; h=from:subject:message-id; bh=UhNvYRHLXQw+Q46M6kTVm5H9HZIII379G5nTtWehYUE=; b=f+IL42Ls385Vj/Qf19jgGJe7gzOt6DV1rUWoN9fUDz4F1kvCeQ0aB5taB+NkzftWKGR8IoLaQ qaGDiAx5knCAm7Fx5kZhEk95FMFTHPgDK7UFVIoULaWGdzuHbvUIcWz X-Developer-Key: i=forbidden405@outlook.com; a=ed25519; pk=qOD5jhp891/Xzc+H/PZ8LWVSWE3O/XCQnAg+5vdU2IU= X-Endpoint-Received: by B4 Relay for forbidden405@outlook.com/20230724 with auth_id=67 X-Original-From: Yang Xiwen Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791151277596861283 X-GMAIL-MSGID: 1791151277596861283 From: Yang Xiwen Add binding and an extra property for Hi3798MV200 DWMMC specific extension. Signed-off-by: Yang Xiwen Reviewed-by: Rob Herring Reviewed-by: Krzysztof Kozlowski --- .../bindings/mmc/hisilicon,hi3798cv200-dw-mshc.yaml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mmc/hisilicon,hi3798cv200-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/hisilicon,hi3798cv200-dw-mshc.yaml index f3dc973cb490..d635bf3a5596 100644 --- a/Documentation/devicetree/bindings/mmc/hisilicon,hi3798cv200-dw-mshc.yaml +++ b/Documentation/devicetree/bindings/mmc/hisilicon,hi3798cv200-dw-mshc.yaml @@ -4,7 +4,7 @@ $id: http://devicetree.org/schemas/mmc/hisilicon,hi3798cv200-dw-mshc.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Hisilicon Hi3798CV200 SoC specific extensions to the Synopsys DWMMC controller +title: Hisilicon HiSTB SoCs specific extensions to the Synopsys DWMMC controller maintainers: - Yang Xiwen @@ -13,6 +13,7 @@ properties: compatible: enum: - hisilicon,hi3798cv200-dw-mshc + - hisilicon,hi3798mv200-dw-mshc reg: maxItems: 1 @@ -34,6 +35,12 @@ properties: - const: ciu-sample - const: ciu-drive + hisilicon,sap-dll-reg: + $ref: /schemas/types.yaml#/definitions/phandle + description: + A phandle points to the sample delay-locked-loop(DLL) + syscon node, used for tuning. + required: - compatible - reg @@ -44,6 +51,18 @@ required: allOf: - $ref: synopsys-dw-mshc-common.yaml# + - if: + properties: + compatible: + contains: + const: hisilicon,hi3798mv200-dw-mshc + then: + required: + - hisilicon,sap-dll-reg + else: + properties: + hisilicon,sap-dll-reg: false + unevaluatedProperties: false examples: