From patchwork Sat Mar 1 10:42:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Zi X-Patchwork-Id: 869664 Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46DC41DB15C; Sat, 1 Mar 2025 10:43:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740825814; cv=none; b=QXl5fVKEp/8qMFp5feiZTFiNEk5tAt/JH+cCtTMRXQdxildTUMErFfT/Y5lgsem02gezkfJhQwLzHW69PcKytEgUQfba8mRFGHQV7xKE05BfTnKGj9KJRG3lvgO22NQU+RFuJfdpD8/635WefmTIHAof/secxgbFJJRrNp0Iwec= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740825814; c=relaxed/simple; bh=+/8rpNaXqgj2/UDdoRlxWLdQHgeGvT0ON3E4PuZizwg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=vGIarM/1qmnXyS/bpbDHwg4+s5vEL/xiwfRTr5uKVq+TbJNa2gjoq1PRuqV6Hte8QWEGulmG8nqnuXyGvvEL83Zp7aGpL+IvXC/nLHVYcMqH0BymIvo2si8Nsb1akh5g5Z4KcoWuO5kxX8ugVFumQr26ScWbLuvT8mWwV4Cdcd4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=CBr6IEh4; arc=none smtp.client-ip=178.21.23.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="CBr6IEh4" Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 017AA25E9E; Sat, 1 Mar 2025 11:43:30 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 2tShyXdx4OvH; Sat, 1 Mar 2025 11:43:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1740825809; bh=+/8rpNaXqgj2/UDdoRlxWLdQHgeGvT0ON3E4PuZizwg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=CBr6IEh4ns1UkkAX2jgVc8D44yDKhj6U45DkWOx4DAJf3rJGDq10+NtJI9NObCHrJ WM9pbfm2XnDVPfkeM75v3Ckb0dd12tLNDIwdITy0aj7TWY38YJJABZ9SELpkWPl23C NrawBTlMIB0oVc+Di42YukqrgTbwUn9MPQkCB87YjB+5wzgeu2KVZknRAWqyRmkG98 MVCF4Ufk0Gv7B9dVzw8+AjjfYWAA/FomPNA5UT8blVZFsJZpRmFUF/9Kav+m+F8P45 u38BKwYPSnTVmN0JV0+0J8CY4dKhiFLQrIOfsHxK5RCJQPc2Zw2aEpVX1AFiFEcoI0 TnKllwalzlOPA== From: Yao Zi To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Michael Turquette , Stephen Boyd , Frank Wang , Shresth Prasad , Cristian Ciocaltea , Detlev Casanova , Jonas Karlman Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Yao Zi Subject: [PATCH 1/8] dt-bindings: soc: rockchip: Add RK3528 VO GRF syscon Date: Sat, 1 Mar 2025 10:42:43 +0000 Message-ID: <20250301104250.36295-2-ziyao@disroot.org> In-Reply-To: <20250301104250.36295-1-ziyao@disroot.org> References: <20250301104250.36295-1-ziyao@disroot.org> Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add compatible string for VO GRF found on RK3528 SoC. Signed-off-by: Yao Zi --- Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml index 61f38b68a4a3..7936be79159e 100644 --- a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml +++ b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml @@ -15,6 +15,7 @@ properties: - items: - enum: - rockchip,rk3288-sgrf + - rockchip,rk3528-vo-grf - rockchip,rk3566-pipe-grf - rockchip,rk3568-pcie3-phy-grf - rockchip,rk3568-pipe-grf From patchwork Sat Mar 1 10:42:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Zi X-Patchwork-Id: 869788 Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF0E01D8A0B; Sat, 1 Mar 2025 10:43:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740825820; cv=none; b=Vce/aoOoiU2lYFmZMv6xoneULKWMFzABdLPsU6Ju5b/rT8mZ+zQJhogxA774+/Y98EGweuGGRcL3Rks+73pCHsJOKFNzWpjL/e58vdYaV+FwLwL0fN4ghZUih/AVD3MgKYDCxaZuZV8usJyb/WDkgXUAUY8Y6HSFf+Ic1KjA8W0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740825820; c=relaxed/simple; bh=IcxoBNMF866xo6B/pUEpfJhgIiq85yQkiPhUYjcLSRM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ayb6mXu7VlDLkxHHsQAWfxcFux6K/QcuaYKycPWMfmOVnlLzrOp2l4CcyT2UX2myc1rkWIMeqGm7zPfCIecdWfAR1S3aar9dmRgUJm5maO12XLKEE8/uegVIQL+wOjuykIb5wGR1pDVa2qgNkmnmJFcd7u9lKE2CTxYRwgX7BCc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=hoFZ7TZg; arc=none smtp.client-ip=178.21.23.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="hoFZ7TZg" Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 5D34A25DBB; Sat, 1 Mar 2025 11:43:37 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id m4hbEaM-UyVA; Sat, 1 Mar 2025 11:43:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1740825816; bh=IcxoBNMF866xo6B/pUEpfJhgIiq85yQkiPhUYjcLSRM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=hoFZ7TZghC1eDtUuv1kanXee1IlKgZYG9RzjcQosospzlwi/nBsgFwbcx2Cb9Kfa8 6fEPDf5ErFx5EoJgM6Pcw9OvS0PDlvuGoI3iUgINjn0hfTc2GGX1WSmihcmNgp2pIQ vw6Iyqcdb0DITFJr4sZZFC9ECPB0eMYvxxa0PI5eQrtV+5CDh7m0gl04HNuOWxrS6L Sk9/WAG1V/AsSpfdgZlk3/XUfRTYs0kVu8jkCrc83uShORJoBDH9MYzGii/c+4+xtk 6t9n9StLL0rOBc/fSQMrAkpdk7o+exCN9X3V60TPDEu9hlW3/J889yWrFcPVXLXgcu eqDQZG+xCCjxg== From: Yao Zi To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Michael Turquette , Stephen Boyd , Frank Wang , Shresth Prasad , Cristian Ciocaltea , Detlev Casanova , Jonas Karlman Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Yao Zi Subject: [PATCH 2/8] dt-bindings: soc: rockchip: Add RK3528 VPU GRF syscon Date: Sat, 1 Mar 2025 10:42:44 +0000 Message-ID: <20250301104250.36295-3-ziyao@disroot.org> In-Reply-To: <20250301104250.36295-1-ziyao@disroot.org> References: <20250301104250.36295-1-ziyao@disroot.org> Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add compatible string for VPU GRF found on RK3528 SoC. Signed-off-by: Yao Zi --- Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml index 7936be79159e..d43c3f7e74fa 100644 --- a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml +++ b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml @@ -16,6 +16,7 @@ properties: - enum: - rockchip,rk3288-sgrf - rockchip,rk3528-vo-grf + - rockchip,rk3528-vpu-grf - rockchip,rk3566-pipe-grf - rockchip,rk3568-pcie3-phy-grf - rockchip,rk3568-pipe-grf From patchwork Sat Mar 1 10:42:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Zi X-Patchwork-Id: 869663 Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77BFB1CBEB9; Sat, 1 Mar 2025 10:43:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740825828; cv=none; b=hdH9PaY4IWf9K9Ndncq5jPEGIYZzzR/n7EzDmNMtPJBRR9OoOQWKmEstxbAZ4C4Xy58kBB4UkjHOBwhPtnIeBIRNQzs7g+NngyHUUk778juZ98iZE9WHnxE+V0sNEfsa8IiAdOZ9my3VTUlr1ufWYmXTaLj7mRwb01fNLpuP9uc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740825828; c=relaxed/simple; bh=b7EbBDCtbwDBTCFmgFj8wrNPICeYFLhWlDWP8XBGTec=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SuVnapwFjibsHOTdaxngJ9uLt0csQf5oFia7N6d4K6oMAO5AbqkDE5rZ7JpTUq84qRRsLYO5OSzlXL7WlkBwe+2Y2VhDkhKKUAytTg3Q2gPqWjowOKHDNnupZj8GXRI7EbetjF3RReoYlXwIix8VZzoEgQiZFdLvRGAOqHiAqTM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=fbg4aZte; arc=none smtp.client-ip=178.21.23.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="fbg4aZte" Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id CAC2525DBB; Sat, 1 Mar 2025 11:43:44 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 1ni52fxJz4eH; Sat, 1 Mar 2025 11:43:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1740825824; bh=b7EbBDCtbwDBTCFmgFj8wrNPICeYFLhWlDWP8XBGTec=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=fbg4aZteoWIk1PerzubZjJTAQZ3pb5oTYB3WN36lEuux86x28ez/s6uBAeb1sWuXM Di4rO7n9STt6wc2/yXaSHdQsvLqu8V+B9oupqqqp33wqTquKleC/pWAn4MhCGjpcpX aPMPMMIkgJ2aSu0CWEINX+Jy8mbKYs2r0k88rqt6DqXSq9CH7wJfElqUmXjrTvDe/O Rt7EKSZn+CG0WRJhLGl/HRfbfzOlk55c5sIHF04aig4AqzSd/dDxipfCDC700lL2bW nhV4GnlH4rnAXD2m5pvRDMWSjCDh79Nd5/q0f8YoRvr7dLTh6TKL2+eY/+e3mWkWWD dZ0RtcNiL8ORg== From: Yao Zi To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Michael Turquette , Stephen Boyd , Frank Wang , Shresth Prasad , Cristian Ciocaltea , Detlev Casanova , Jonas Karlman Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Yao Zi Subject: [PATCH 3/8] dt-bindings: mmc: rockchip-dw-mshc: Add compatible string for RK3528 Date: Sat, 1 Mar 2025 10:42:45 +0000 Message-ID: <20250301104250.36295-4-ziyao@disroot.org> In-Reply-To: <20250301104250.36295-1-ziyao@disroot.org> References: <20250301104250.36295-1-ziyao@disroot.org> Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add RK3528 compatible string for SD/SDIO interface. Signed-off-by: Yao Zi --- Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml index 06df1269f247..ea0feb733e32 100644 --- a/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml +++ b/Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml @@ -38,6 +38,7 @@ properties: - rockchip,rk3328-dw-mshc - rockchip,rk3368-dw-mshc - rockchip,rk3399-dw-mshc + - rockchip,rk3528-dw-mshc - rockchip,rk3568-dw-mshc - rockchip,rk3588-dw-mshc - rockchip,rv1108-dw-mshc From patchwork Sat Mar 1 10:44:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Zi X-Patchwork-Id: 869662 Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A32871ADC6C; Sat, 1 Mar 2025 10:44:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740825892; cv=none; b=pFktpxL9pKYGMkkuVA6j+4Nlm5RmECXL/Wa8Q3CYMCz8/jlbAw3V9XJi4F/woVGDxT1rKYEbaR6jbJJnXwGtzLMcZ8K8SVpFU4nDHfankQ4D/lbBIlE3ruKe8TPpiw8Jqgt6bhmeW/95zEeWc0NHj6CXi1Y8hOiWSn615FZ5G9U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740825892; c=relaxed/simple; bh=zwk+LtszMoHSIYjGCAqbuOU0QSVYlP5K54ulz6VjFyA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HIXq5O62Y0FaLbG9h1v5tYESturMDSQ9AS8G3Rv/d6N0TbtbkCDo9R/SlUmvXT4uIPoTLGXofWeUoNzpYgbWVhuAG4ETZO7tKMT4YqKyRmPEzQvGlqRzRK+QOkGZrOa5t9gHIHrcMm0gWkUJITk2ZimagwqDtTz9JnrcxRXIlwA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=cusEpx7U; arc=none smtp.client-ip=178.21.23.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="cusEpx7U" Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 0C37A25DBB; Sat, 1 Mar 2025 11:44:49 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id C-seUOwGjVr2; Sat, 1 Mar 2025 11:44:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1740825887; bh=zwk+LtszMoHSIYjGCAqbuOU0QSVYlP5K54ulz6VjFyA=; h=From:To:Cc:Subject:Date; b=cusEpx7U6cVra4Av0kljPG7s/Z+2Nkpmc/8HjdRJAnRK0zBim6wVGtKJJy6MsnYgS 8vhw0HHivQdEFpTmerOrGX4j/wpzJf6x1lIFJUSAaPM/+cW0XRZLtD9X3L3naQxFhr eEerUaBziLo9TsazDr4n0qINaaJl+YF1k3IcD11IYOMkZJWDIZp03+FT8njZobFPXP eJ3z2BXwvMBApexnMNLbJc4juNpaMavnnFjNLYlqoDto5X6ehi/BPq0kbKKND/fmEZ 3Qi7RqWA09iLcujtfmbTtluVyocqVifsp3v++OB/fAIUE7xHN/FCvW9FAdYW/RNeMW G1qR3zwddZjtQ== From: Yao Zi To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Michael Turquette , Stephen Boyd , Frank Wang , Shresth Prasad , Cristian Ciocaltea , Detlev Casanova , Jonas Karlman Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Yao Zi Subject: [PATCH 4/8] dt-bindings: clock: Add GRF clock definition for RK3528 Date: Sat, 1 Mar 2025 10:44:13 +0000 Message-ID: <20250301104413.36335-1-ziyao@disroot.org> Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 These clocks are for SD/SDIO tuning purpose and come with registers in GRF syscon. Signed-off-by: Yao Zi --- include/dt-bindings/clock/rockchip,rk3528-cru.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/dt-bindings/clock/rockchip,rk3528-cru.h b/include/dt-bindings/clock/rockchip,rk3528-cru.h index 55a448f5ed6d..0245a53fc334 100644 --- a/include/dt-bindings/clock/rockchip,rk3528-cru.h +++ b/include/dt-bindings/clock/rockchip,rk3528-cru.h @@ -414,6 +414,12 @@ #define MCLK_I2S2_2CH_SAI_SRC_PRE 402 #define MCLK_I2S3_8CH_SAI_SRC_PRE 403 #define MCLK_SDPDIF_SRC_PRE 404 +#define SCLK_SDMMC_DRV 405 +#define SCLK_SDMMC_SAMPLE 406 +#define SCLK_SDIO0_DRV 407 +#define SCLK_SDIO0_SAMPLE 408 +#define SCLK_SDIO1_DRV 409 +#define SCLK_SDIO1_SAMPLE 410 /* scmi-clocks indices */ #define SCMI_PCLK_KEYREADER 0 From patchwork Sat Mar 1 10:46:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Zi X-Patchwork-Id: 869786 Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5752D1ADC6C; Sat, 1 Mar 2025 10:47:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740826028; cv=none; b=S0y+eFjjle0mYB7Pq0XwQkrJw1yjeRIG3nYFCl33adU5c7u7TukeW4Z52SPZ6OHWYYGh7X+fp7ZqOlwilmX7pTClsBn+fg7K48J1kyvVsvCUU6Zdqft6Kx2ibk2qnp+lqtbkDikm5xNmjrb1GkguqZeQnR3XCkNhN3+AA5Bi0SA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740826028; c=relaxed/simple; bh=5eKewyN1WftFiUI6ei60MyYXAvxsM9pNSidru5AK5xI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=S2NwZhKAsd6qIolLE/SsevXK95Vd9NGi+PlUWC81iuZ9a/kpiHtJeefXguQvVH5q5UJN0H2wJnaKXbTU+Lt/GROuEXKpdXHr3cfMVHVV3i155ABA3ns+cKPhwu5Fq7RoxZgJs4txaUnH4vFZWSsdkj2ffdmbwNSFTIsYASJnQSs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=QYdf7c3S; arc=none smtp.client-ip=178.21.23.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="QYdf7c3S" Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 216F725F03; Sat, 1 Mar 2025 11:47:05 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id nVyNymBMovRc; Sat, 1 Mar 2025 11:47:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1740826024; bh=5eKewyN1WftFiUI6ei60MyYXAvxsM9pNSidru5AK5xI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=QYdf7c3SQclai5cHxffyI/BCgeI5GX9OkZN/LDbR7TLSS8K82iAT4wxd6wvTNrgLw COU2oG4PgqNuHDSyhQWIBMomTKSYky+TD+kGGJf1T4LN29Fmp67TRVFdEhMHAQxg1U vKO2uAb9GmUnnfd9JmME+GoFJuheEct0cOufOaAhrrsZtaLaLyIJNYZKWnUFXDHWI0 kC6jd28S8jQSGkKgPRV9kdEAm3pyF2Fd0MTlX5HdTsOkkLE+AwuO4leSketBbkB8xY DzVgA3N39SL6GICk9697T/Snmi5w989pqmnhvjUAvCxwV47LnWpmCNfR1ogp5AVz3u PVbrmK/7oxFGA== From: Yao Zi To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Michael Turquette , Stephen Boyd , Frank Wang , Shresth Prasad , Cristian Ciocaltea , Detlev Casanova , Jonas Karlman Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Yao Zi Subject: [PATCH 5/8] clk: rockchip: Support MMC clocks in GRF region Date: Sat, 1 Mar 2025 10:46:21 +0000 Message-ID: <20250301104621.36375-1-ziyao@disroot.org> In-Reply-To: <20250301104250.36295-1-ziyao@disroot.org> References: <20250301104250.36295-1-ziyao@disroot.org> Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Registers of MMC drive/sample clocks in Rockchip RV1106 and RK3528 locate in GRF regions. Adjust MMC clock code to support register operations through regmap. Also add a helper to ease registration of GRF clocks. Signed-off-by: Yao Zi --- drivers/clk/rockchip/clk-mmc-phase.c | 24 +++++++++++++--- drivers/clk/rockchip/clk.c | 42 ++++++++++++++++++++++++++++ drivers/clk/rockchip/clk.h | 20 ++++++++++++- 3 files changed, 81 insertions(+), 5 deletions(-) diff --git a/drivers/clk/rockchip/clk-mmc-phase.c b/drivers/clk/rockchip/clk-mmc-phase.c index 91012078681b..b3ed8e7523e5 100644 --- a/drivers/clk/rockchip/clk-mmc-phase.c +++ b/drivers/clk/rockchip/clk-mmc-phase.c @@ -9,11 +9,14 @@ #include #include #include +#include #include "clk.h" struct rockchip_mmc_clock { struct clk_hw hw; void __iomem *reg; + struct regmap *grf; + int grf_reg; int shift; int cached_phase; struct notifier_block clk_rate_change_nb; @@ -54,7 +57,12 @@ static int rockchip_mmc_get_phase(struct clk_hw *hw) if (!rate) return 0; - raw_value = readl(mmc_clock->reg) >> (mmc_clock->shift); + if (mmc_clock->grf) + regmap_read(mmc_clock->grf, mmc_clock->grf_reg, &raw_value); + else + raw_value = readl(mmc_clock->reg); + + raw_value >>= mmc_clock->shift; degrees = (raw_value & ROCKCHIP_MMC_DEGREE_MASK) * 90; @@ -134,8 +142,12 @@ static int rockchip_mmc_set_phase(struct clk_hw *hw, int degrees) raw_value = delay_num ? ROCKCHIP_MMC_DELAY_SEL : 0; raw_value |= delay_num << ROCKCHIP_MMC_DELAYNUM_OFFSET; raw_value |= nineties; - writel(HIWORD_UPDATE(raw_value, 0x07ff, mmc_clock->shift), - mmc_clock->reg); + raw_value = HIWORD_UPDATE(raw_value, 0x07ff, mmc_clock->shift); + + if (mmc_clock->grf) + regmap_write(mmc_clock->grf, mmc_clock->grf_reg, raw_value); + else + writel(raw_value, mmc_clock->reg); pr_debug("%s->set_phase(%d) delay_nums=%u reg[0x%p]=0x%03x actual_degrees=%d\n", clk_hw_get_name(hw), degrees, delay_num, @@ -189,7 +201,9 @@ static int rockchip_mmc_clk_rate_notify(struct notifier_block *nb, struct clk *rockchip_clk_register_mmc(const char *name, const char *const *parent_names, u8 num_parents, - void __iomem *reg, int shift) + void __iomem *reg, + struct regmap *grf, int grf_reg, + int shift) { struct clk_init_data init; struct rockchip_mmc_clock *mmc_clock; @@ -208,6 +222,8 @@ struct clk *rockchip_clk_register_mmc(const char *name, mmc_clock->hw.init = &init; mmc_clock->reg = reg; + mmc_clock->grf = grf; + mmc_clock->grf_reg = grf_reg; mmc_clock->shift = shift; clk = clk_register(NULL, &mmc_clock->hw); diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c index cbf93ea119a9..ce2f3323d84e 100644 --- a/drivers/clk/rockchip/clk.c +++ b/drivers/clk/rockchip/clk.c @@ -590,6 +590,7 @@ void rockchip_clk_register_branches(struct rockchip_clk_provider *ctx, list->name, list->parent_names, list->num_parents, ctx->reg_base + list->muxdiv_offset, + NULL, 0, list->div_shift ); break; @@ -619,6 +620,11 @@ void rockchip_clk_register_branches(struct rockchip_clk_provider *ctx, break; case branch_linked_gate: /* must be registered late, fall-through for error message */ + case branch_mmc_grf: + /* + * must be registered through rockchip_clk_register_grf_branches, + * fall-through for error message + */ break; } @@ -665,6 +671,42 @@ void rockchip_clk_register_late_branches(struct device *dev, } EXPORT_SYMBOL_GPL(rockchip_clk_register_late_branches); +void rockchip_clk_register_grf_branches(struct rockchip_clk_provider *ctx, + struct rockchip_clk_branch *list, + struct regmap *grf, + unsigned int nr_clk) +{ + unsigned int idx; + struct clk *clk; + + for (idx = 0; idx < nr_clk; idx++, list++) { + clk = NULL; + + switch (list->branch_type) { + case branch_mmc_grf: + clk = rockchip_clk_register_mmc( + list->name, + list->parent_names, list->num_parents, + NULL, + grf, list->muxdiv_offset, + list->div_shift + ); + break; + default: + pr_err("%s: unknown clock type %d\n", + __func__, list->branch_type); + break; + } + + if (!clk) + pr_err("%s: failed to register clock %s: %ld\n", + __func__, list->name, PTR_ERR(clk)); + else + rockchip_clk_set_lookup(ctx, clk, list->id); + } +} +EXPORT_SYMBOL_GPL(rockchip_clk_register_grf_branches); + void rockchip_clk_register_armclk(struct rockchip_clk_provider *ctx, unsigned int lookup_id, const char *name, const char *const *parent_names, diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h index b322d42dc879..5d82ec5facfa 100644 --- a/drivers/clk/rockchip/clk.h +++ b/drivers/clk/rockchip/clk.h @@ -555,7 +555,9 @@ struct clk *rockchip_clk_register_cpuclk(const char *name, struct clk *rockchip_clk_register_mmc(const char *name, const char *const *parent_names, u8 num_parents, - void __iomem *reg, int shift); + void __iomem *reg, + struct regmap *grf, int grf_reg, + int shift); /* * DDRCLK flags, including method of setting the rate @@ -594,6 +596,7 @@ enum rockchip_clk_branch_type { branch_gate, branch_linked_gate, branch_mmc, + branch_mmc_grf, branch_inverter, branch_factor, branch_ddrclk, @@ -944,6 +947,17 @@ struct rockchip_clk_branch { .div_shift = shift, \ } +#define MMC_GRF(_id, cname, pname, offset, shift) \ + { \ + .id = _id, \ + .branch_type = branch_mmc_grf, \ + .name = cname, \ + .parent_names = (const char *[]){ pname }, \ + .num_parents = 1, \ + .muxdiv_offset = offset, \ + .div_shift = shift, \ + } + #define INVERTER(_id, cname, pname, io, is, if) \ { \ .id = _id, \ @@ -1093,6 +1107,10 @@ void rockchip_clk_register_late_branches(struct device *dev, struct rockchip_clk_provider *ctx, struct rockchip_clk_branch *list, unsigned int nr_clk); +void rockchip_clk_register_grf_branches(struct rockchip_clk_provider *ctx, + struct rockchip_clk_branch *list, + struct regmap *grf, + unsigned int nr_clk); void rockchip_clk_register_plls(struct rockchip_clk_provider *ctx, struct rockchip_pll_clock *pll_list, unsigned int nr_pll, int grf_lock_offset); From patchwork Sat Mar 1 10:47:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Zi X-Patchwork-Id: 869661 Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 242FA1ADC6C; Sat, 1 Mar 2025 10:47:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740826070; cv=none; b=UPFF4ZM17gf5cROnaexWd0JeG9qg8QhaZ79ULIPujiBOPtHXBX5woc7/iHidKDwPx6XVr+8T3zjEsBWRymoizL8f8FSoEfdJ1cQ8yamZKyD9kobPdJ3S6UHOV1actPKDcLlu68TwTpg8Shzg5K8KQ4/b7wu9CI4O+X2QjfRkvYw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740826070; c=relaxed/simple; bh=24/fM25kYYpFUi8g0nBw6v3VxpKWAQB9iUoSs2evMuo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LTXuVoBSn8r5HIAX08nLWVCDcWMsF8UjMSV8chraCeM6i0zNWYR9w0sBwOnnwbeRflHUyR0hOf0VgJkUzJ/QAevGG/PWlubI8eWGCU0c9AjjaYPUdA3bMSdwJyIal8j5NleCskipiwrjsxXWzqNcDyMHvTIwNYVgxi2PdF8T24U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=EGDgDacb; arc=none smtp.client-ip=178.21.23.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="EGDgDacb" Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 9EAB325D15; Sat, 1 Mar 2025 11:47:47 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id WYXAj15D2LYa; Sat, 1 Mar 2025 11:47:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1740826062; bh=24/fM25kYYpFUi8g0nBw6v3VxpKWAQB9iUoSs2evMuo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=EGDgDacb8FZjKnNZPW9kIvRennie5y1g1WetGPPztEFEAGE3ri9Z2FNwaxEvF19Fa vmNRUNzqRFdEIIqnsIyUm0TZDFaPFep8g8PPLeenip8Sbq/d/irMFxe1Sli2D90au+ JfYH3owK/7n8eAn6CwQGLgTbLfOvcwmdhVVoUCE0bF/0jbpQzFDX7kpTNrlhyvCk3F KcLvPCVaAA9E8CFa5UvOB+D0qY8Q1XsSmXp1qeUQ0lzkXQdd46nbhNZY+Vdb+2pMgi mfpe0gZySUlZmGtwuSe31qWoXJMGmr4f2WBqH8GLipKbC34XiOE0WAaFtmkW2W/AQ3 EiGFmT/LlDRHg== From: Yao Zi To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Michael Turquette , Stephen Boyd , Frank Wang , Shresth Prasad , Cristian Ciocaltea , Detlev Casanova , Jonas Karlman Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Yao Zi Subject: [PATCH 6/8] clk: rockchip: rk3528: Add SD/SDIO tuning clocks in GRF region Date: Sat, 1 Mar 2025 10:47:24 +0000 Message-ID: <20250301104724.36399-1-ziyao@disroot.org> In-Reply-To: <20250301104250.36295-1-ziyao@disroot.org> References: <20250301104250.36295-1-ziyao@disroot.org> Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 These clocks locate in VO and VPU GRF, serving for SD/SDIO controller tuning purpose. Add their definitions and register them in driver if corresponding GRF is available. GRFs are looked up by compatible to simplify devicetree binding. Signed-off-by: Yao Zi --- drivers/clk/rockchip/clk-rk3528.c | 56 ++++++++++++++++++++++++++++--- drivers/clk/rockchip/clk.h | 3 ++ 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/drivers/clk/rockchip/clk-rk3528.c b/drivers/clk/rockchip/clk-rk3528.c index b8b577b902a0..b89440dd7448 100644 --- a/drivers/clk/rockchip/clk-rk3528.c +++ b/drivers/clk/rockchip/clk-rk3528.c @@ -10,6 +10,7 @@ #include #include #include +#include #include @@ -1061,23 +1062,62 @@ static struct rockchip_clk_branch rk3528_clk_branches[] __initdata = { 0, 1, 1), }; +static struct rockchip_clk_branch rk3528_vo_clk_branches[] __initdata = { + MMC_GRF(SCLK_SDMMC_DRV, "sdmmc_drv", "cclk_src_sdmmc0", + RK3528_SDMMC_CON(0), 1), + MMC_GRF(SCLK_SDMMC_SAMPLE, "sdmmc_sample", "cclk_src_sdmmc0", + RK3528_SDMMC_CON(1), 1), +}; + +static struct rockchip_clk_branch rk3528_vpu_clk_branches[] __initdata = { + MMC_GRF(SCLK_SDIO0_DRV, "sdio0_drv", "cclk_src_sdio0", + RK3528_SDIO0_CON(0), 1), + MMC_GRF(SCLK_SDIO0_SAMPLE, "sdio0_sample", "cclk_src_sdio0", + RK3528_SDIO0_CON(1), 1), + MMC_GRF(SCLK_SDIO1_DRV, "sdio1_drv", "cclk_src_sdio1", + RK3528_SDIO1_CON(0), 1), + MMC_GRF(SCLK_SDIO1_SAMPLE, "sdio1_sample", "cclk_src_sdio1", + RK3528_SDIO1_CON(1), 1), +}; + static int __init clk_rk3528_probe(struct platform_device *pdev) { + unsigned long nr_vpu_branches = ARRAY_SIZE(rk3528_vpu_clk_branches); + unsigned long nr_vo_branches = ARRAY_SIZE(rk3528_vo_clk_branches); + unsigned long nr_branches = ARRAY_SIZE(rk3528_clk_branches); struct rockchip_clk_provider *ctx; struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; - unsigned long nr_branches = ARRAY_SIZE(rk3528_clk_branches); - unsigned long nr_clks; + struct regmap *vo_grf, *vpu_grf; void __iomem *reg_base; - - nr_clks = rockchip_clk_find_max_clk_id(rk3528_clk_branches, - nr_branches) + 1; + unsigned long nr_clks; reg_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(reg_base)) return dev_err_probe(dev, PTR_ERR(reg_base), "could not map cru region"); + nr_clks = rockchip_clk_find_max_clk_id(rk3528_clk_branches, + nr_branches) + 1; + + vo_grf = syscon_regmap_lookup_by_compatible("rockchip,rk3528-vo-grf"); + if (!IS_ERR(vo_grf)) + nr_clks = MAX(rockchip_clk_find_max_clk_id(rk3528_vo_clk_branches, + nr_vo_branches) + 1, + nr_clks); + else if (PTR_ERR(vo_grf) != ENODEV) + return dev_err_probe(dev, PTR_ERR(vo_grf), + "failed to look up VO GRF\n"); + + vpu_grf = syscon_regmap_lookup_by_compatible("rockchip,rk3528-vpu-grf"); + if (!IS_ERR(vpu_grf)) + nr_clks = MAX(rockchip_clk_find_max_clk_id(rk3528_vpu_clk_branches, + nr_vpu_branches) + 1, + nr_clks); + else if (PTR_ERR(vpu_grf) != ENODEV) + return dev_err_probe(dev, PTR_ERR(vpu_grf), + "failed to look up VPU GRF\n"); + ctx = rockchip_clk_init(np, reg_base, nr_clks); if (IS_ERR(ctx)) return dev_err_probe(dev, PTR_ERR(ctx), @@ -1091,6 +1131,12 @@ static int __init clk_rk3528_probe(struct platform_device *pdev) &rk3528_cpuclk_data, rk3528_cpuclk_rates, ARRAY_SIZE(rk3528_cpuclk_rates)); rockchip_clk_register_branches(ctx, rk3528_clk_branches, nr_branches); + if (!IS_ERR(vo_grf)) + rockchip_clk_register_grf_branches(ctx, rk3528_vo_clk_branches, + vo_grf, nr_vo_branches); + if (!IS_ERR(vpu_grf)) + rockchip_clk_register_grf_branches(ctx, rk3528_vpu_clk_branches, + vpu_grf, nr_vpu_branches); rk3528_rst_init(np, reg_base); diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h index 5d82ec5facfa..02d4ca0012d7 100644 --- a/drivers/clk/rockchip/clk.h +++ b/drivers/clk/rockchip/clk.h @@ -217,6 +217,9 @@ struct clk; #define RK3528_CLKSEL_CON(x) ((x) * 0x4 + 0x300) #define RK3528_CLKGATE_CON(x) ((x) * 0x4 + 0x800) #define RK3528_SOFTRST_CON(x) ((x) * 0x4 + 0xa00) +#define RK3528_SDMMC_CON(x) ((x) * 0x4 + 0x24) +#define RK3528_SDIO0_CON(x) ((x) * 0x4 + 0x4) +#define RK3528_SDIO1_CON(x) ((x) * 0x4 + 0xc) #define RK3528_PMU_CLKSEL_CON(x) ((x) * 0x4 + 0x300 + RK3528_PMU_CRU_BASE) #define RK3528_PMU_CLKGATE_CON(x) ((x) * 0x4 + 0x800 + RK3528_PMU_CRU_BASE) #define RK3528_PCIE_CLKSEL_CON(x) ((x) * 0x4 + 0x300 + RK3528_PCIE_CRU_BASE) From patchwork Sat Mar 1 10:47:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Zi X-Patchwork-Id: 869785 Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FD801D63F9; Sat, 1 Mar 2025 10:48:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740826099; cv=none; b=CzdSg8zODNlhGvxsr4zupfrxHDEODyoPHYV5qdvlAAO0RWFvZi4Ha9f8uwHgQjypNRSOLGyVKR6uEo1hcSlLfjszPSbLGZRVmBEnd6gvlUrjf8SN4n67ajY4/DimLY2gSCBzMRUbRbcPB1sUygI37y7gUXccw4oAWnRZ664sPhQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740826099; c=relaxed/simple; bh=Mh8Scn9zD0vJo0No7F96OzW9299oqh4mWGc3Vb0A1ds=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=T7YqpasqZqCvNOXbEJ8BP8ZDV8y+d17dQgiQPKNlicm5kXQWl5WIDBsglDoTOkFzqx1UK7hxJKMKhdfvgHhbmYA6vZh5nO2Wm53AU84mWS35kW6xgSqMyh0ku7U6HrkR4Wt23+I4G34jWssmcIMK4dXnFhfZKmUWpnuxiTzFPIc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=gGpS1Q4g; arc=none smtp.client-ip=178.21.23.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="gGpS1Q4g" Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id E125825D26; Sat, 1 Mar 2025 11:48:16 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ABOnEt0LCSoi; Sat, 1 Mar 2025 11:48:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1740826096; bh=Mh8Scn9zD0vJo0No7F96OzW9299oqh4mWGc3Vb0A1ds=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gGpS1Q4gvX22ZL2StQFcA9v6V4lTov4KyfGyY8SbkgC9NdvsqsBrdONuWfEsXaiPq S8SS/jgo/LMV4d4A4RxetVonl8Tc2kJyugDXHIyZKAPVm2/6Si2Ho6M+TXRySYt2lo r7JHsfKeQUHjrkfsWogYwCf2ImobHxoHgO1ePmw75ZK/5rAF/7vIYaDJWvlCVRpTMh 9haiqQkQLrVIekmf6mFYIyU09N95emzVGbUSVgjHLhVKGsjETM284kSaf+uc+j7P10 97vvttQ3TCum9mi8xTj1IbF8Dcwm6dizlP+IsWzVLSzvughY7VOkNmi5ZcEAVt1PvT A6ncQ600BvgvQ== From: Yao Zi To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Michael Turquette , Stephen Boyd , Frank Wang , Shresth Prasad , Cristian Ciocaltea , Detlev Casanova , Jonas Karlman Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Yao Zi Subject: [PATCH 7/8] arm64: dts: rockchip: Add SDMMC/SDIO controllers for RK3528 Date: Sat, 1 Mar 2025 10:47:49 +0000 Message-ID: <20250301104749.36423-1-ziyao@disroot.org> In-Reply-To: <20250301104250.36295-1-ziyao@disroot.org> References: <20250301104250.36295-1-ziyao@disroot.org> Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 RK3528 features two SDIO controllers and one SD/MMC controller, describe them in devicetree. Since their sample and drive clocks are located in the VO and VPU GRFs, corresponding syscons are added to make these clocks available. Signed-off-by: Yao Zi --- arch/arm64/boot/dts/rockchip/rk3528.dtsi | 62 ++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3528.dtsi b/arch/arm64/boot/dts/rockchip/rk3528.dtsi index 5b334690356a..078c97fa1d9f 100644 --- a/arch/arm64/boot/dts/rockchip/rk3528.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3528.dtsi @@ -7,6 +7,7 @@ #include #include #include +#include / { compatible = "rockchip,rk3528"; @@ -122,6 +123,16 @@ gic: interrupt-controller@fed01000 { #interrupt-cells = <3>; }; + vpu_grf: syscon@ff340000 { + compatible = "rockchip,rk3528-vpu-grf", "syscon"; + reg = <0x0 0xff340000 0x0 0x8000>; + }; + + vo_grf: syscon@ff360000 { + compatible = "rockchip,rk3528-vo-grf", "syscon"; + reg = <0x0 0xff360000 0x0 0x10000>; + }; + cru: clock-controller@ff4a0000 { compatible = "rockchip,rk3528-cru"; reg = <0x0 0xff4a0000 0x0 0x30000>; @@ -251,5 +262,56 @@ uart7: serial@ffa28000 { reg-shift = <2>; status = "disabled"; }; + + sdio0: mmc@ffc10000 { + compatible = "rockchip,rk3528-dw-mshc", + "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xffc10000 0x0 0x4000>; + clocks = <&cru HCLK_SDIO0>, + <&cru CCLK_SRC_SDIO0>, + <&cru SCLK_SDIO0_DRV>, + <&cru SCLK_SDIO0_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + interrupts = ; + max-frequency = <150000000>; + resets = <&cru SRST_H_SDIO0>; + reset-names = "reset"; + status = "disabled"; + }; + + sdio1: mmc@ffc20000 { + compatible = "rockchip,rk3528-dw-mshc", + "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xffc20000 0x0 0x4000>; + clocks = <&cru HCLK_SDIO1>, + <&cru CCLK_SRC_SDIO1>, + <&cru SCLK_SDIO1_DRV>, + <&cru SCLK_SDIO1_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + interrupts = ; + max-frequency = <150000000>; + resets = <&cru SRST_H_SDIO1>; + reset-names = "reset"; + status = "disabled"; + }; + + sdmmc: mmc@ffc30000 { + compatible = "rockchip,rk3528-dw-mshc", + "rockchip,rk3288-dw-mshc"; + reg = <0x0 0xffc30000 0x0 0x4000>; + clocks = <&cru HCLK_SDMMC0>, + <&cru CCLK_SRC_SDMMC0>, + <&cru SCLK_SDMMC_DRV>, + <&cru SCLK_SDMMC_SAMPLE>; + clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; + fifo-depth = <0x100>; + interrupts = ; + max-frequency = <150000000>; + resets = <&cru SRST_H_SDMMC0>; + reset-names = "reset"; + status = "disabled"; + }; }; }; From patchwork Sat Mar 1 10:48:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Zi X-Patchwork-Id: 869660 Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D85EB1CB332; Sat, 1 Mar 2025 10:48:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740826139; cv=none; b=jdAPjnvR8Zt+JKogbyx3Z1k5IyInxNIbNQRRjHepyQHZx8a6khozOn963tFtW1/WWmQy4xOMeaPigTYh9Wgq/jpA4MDsY1pDOZqLq9HOF7M7CRcJa1XNa+Zcw+3yMo6hVVsCUhUuLK83tTPaLQLuFLfXbd2hSZ4ULFLIlPJI/78= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740826139; c=relaxed/simple; bh=oH6NiGwxSjELVuqZw+4pyix8JS63OndzJmq8Erv5Xlo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oXowfhYy+/0a3XLzb4jZTtkFgfsZN4YcPbVHvW0dmtRawBKPapBFygr4g6CJCswc00gqTkyMeDxm2k0fF4pgh117TmUXCA70AllYZy2mO2UQtEaYhelZikKkH2TOWBTP3S22p7b5IrvHVZkK1LoywYQ3p06FA5fWaNMZVECMNcc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=jRXEa/KY; arc=none smtp.client-ip=178.21.23.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="jRXEa/KY" Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 6472025F03; Sat, 1 Mar 2025 11:48:56 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id QwfR_2k6Scbh; Sat, 1 Mar 2025 11:48:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1740826135; bh=oH6NiGwxSjELVuqZw+4pyix8JS63OndzJmq8Erv5Xlo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jRXEa/KYzSTYx6difv4h7k7TYQziMtP99ob/mIgs3ma1mfrJ7aSoypYDqA+ilUxxZ 2il0efJ4ux/87uqcqlb2WXSXx1uIdIz9znZYAsQahMh8hU1hSgNskNs79oznvgmMjG md3sBfksXF8cX5pUiapK8RGREeIX7IsfAUJOkojtLBQyYW9HIQzhydTPdnZraW+azD 8j6/PM7ezUFXx61dDHExCsZqk21VCsx7hUXTFMi6hA0up1Nz/Vh8ygfVZn5ZXwGhjz fVbSynlyzYu12pMgt8+0c5tiX+YgHTNW6LjZqNa2Gn/t+D3TjOVkPIj2hG3u3NyVtq V+Q0uQDWRohBQ== From: Yao Zi To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Michael Turquette , Stephen Boyd , Frank Wang , Shresth Prasad , Cristian Ciocaltea , Detlev Casanova , Jonas Karlman Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Yao Zi Subject: [PATCH 8/8] arm64: dts: rockchip: Enable SD-card interface on Radxa E20C Date: Sat, 1 Mar 2025 10:48:35 +0000 Message-ID: <20250301104835.36439-1-ziyao@disroot.org> In-Reply-To: <20250301104250.36295-1-ziyao@disroot.org> References: <20250301104250.36295-1-ziyao@disroot.org> Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 SD-card is available on Radxa E20C board. Signed-off-by: Yao Zi --- arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts index d2cdb63d4a9d..473065aa4228 100644 --- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts +++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts @@ -12,6 +12,10 @@ / { model = "Radxa E20C"; compatible = "radxa,e20c", "rockchip,rk3528"; + aliases { + mmc0 = &sdmmc; + }; + chosen { stdout-path = "serial0:1500000n8"; }; @@ -20,3 +24,13 @@ chosen { &uart0 { status = "okay"; }; + +&sdmmc { + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + rockchip,default-sample-phase = <90>; + sd-uhs-sdr104; + status = "okay"; +};