From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 126BBFF8860 for ; Mon, 27 Apr 2026 06:23:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=I/Qf+Jt8jBH61yX/14Jp1btkMWzHWiNR5UF+Cn43c64=; b=wEZEcdXRtcpSUlM60nYj5cKeGf 8fH61QuxKlFzwCps4aZqtDaiOqgMxvbvqVp+0emh1n4MuVBdqrUnwEkD0fs9Nn12IKYwcpJY3hoaw VFO997xuQAGEMV1VO9YmuhOQlVse6l2Msaf3F8QT6+cDHlVOsFYSKnbBjCeCf60NHZgVzxG9BfBNS xqGJlsAiAxciJAqJrdLolaQXNo/ykCuFG91ghu1JKIKZfWcoUVeCYiT1AN0mJwZvWJKsLNvakt9Un 7MGJWXcI/lybjo2PQJxddn01r3XzJDWzSQY9vJK14rmChrrM4xSZC8X8wuHOWkuYo1lh71fUzYC7X cU6jWZDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1wHFNc-0000000GFok-3sIx; Mon, 27 Apr 2026 06:23:40 +0000 Received: from mail-m1973181.qiye.163.com ([220.197.31.81]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1wHFNV-0000000GFlq-36HT for linux-arm-kernel@lists.infradead.org; Mon, 27 Apr 2026 06:23:34 +0000 Received: from albert-OptiPlex-7080.. (unknown [112.65.126.162]) by smtp.qiye.163.com (Hmail) with ESMTP id 3c40fa9e6; Mon, 27 Apr 2026 14:23:27 +0800 (GMT+08:00) From: Albert Yang To: gordon.ge@bst.ai, krzk@kernel.org, krzk+dt@kernel.org, robh@kernel.org, conor+dt@kernel.org, arnd@arndb.de, catalin.marinas@arm.com, will@kernel.org Cc: bst-upstream@bstai.top, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v8 1/2] arm64: dts: bst: enable eMMC controller in C1200 CDCU1.0 board Date: Mon, 27 Apr 2026 14:23:24 +0800 Message-ID: <20260427062326.3715732-2-yangzh0906@thundersoft.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260427062326.3715732-1-yangzh0906@thundersoft.com> References: <20260427062326.3715732-1-yangzh0906@thundersoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Tid: 0a9dcd9b696e09cckunm8f7dadf41a30ac X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVlDT0pCVh5JSUxMTRhKTUtITlYVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlKSklVTU5VSklNVUpNSVlXWRYaDxIVHRRZQVlPS0hVSk tJT09PSFVKS0tVSkJLS1kG DKIM-Signature: a=rsa-sha256; b=dUkLNg4bBJdd4jvIx6m6lYRzxha71NN9rvvOO3g42oQs1IT+FXjxyAgjbh+AMo5PcVCmX0aQSwSlcxm5rEA1+RyRJVVQD9wI4ZSxAtK8rbYFM17Ssdw6EuC20ZwoUhCI46PTr3qvx57/kmmNoiTNf3c5mt2kQAF84rVI/tgI8kw=; c=relaxed/relaxed; s=default; d=thundersoft.com; v=1; bh=I/Qf+Jt8jBH61yX/14Jp1btkMWzHWiNR5UF+Cn43c64=; h=date:mime-version:subject:message-id:from; X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260426_232333_945232_F866AFBB X-CRM114-Status: UNSURE ( 9.72 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add eMMC controller support to the BST C1200 device tree: - bstc1200.dtsi: Add mmc0 node for the DWCMSHC SDHCI controller with basic configuration (disabled by default) - bstc1200.dtsi: Add fixed clock definition for MMC controller - bstc1200-cdcu1.0-adas_4c2g.dts: Enable mmc0 with board-specific configuration including 8-bit bus width and reserved SRAM buffer The bounce buffer in reserved SRAM addresses hardware constraints where the eMMC controller cannot access main system memory through SMMU due to a hardware bug, and all DRAM is located outside the 4GB boundary. Signed-off-by: Albert Yang Acked-by: Gordon Ge --- Changes for v8: - Collected Acked-by: Gordon Ge - Rebased onto v7.1-rc1 - No code changes Changes for v7: - No code changes; resend with corrected recipients Changes for v5: - Split from platform series per Arnd's feedback Changes for v4: - Change compatible to bst,c1200-sdhci - Move bus-width and non-removable to board dts Changes for v3: - Split defconfig into dedicated patch Changes for v2: - Reorganize memory map, standardize interrupt definitions --- .../dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts | 19 +++++++++++++++++++ arch/arm64/boot/dts/bst/bstc1200.dtsi | 18 ++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts b/arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts index 5eb9ef369d8c..178ad4bf4f0a 100644 --- a/arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts +++ b/arch/arm64/boot/dts/bst/bstc1200-cdcu1.0-adas_4c2g.dts @@ -17,6 +17,25 @@ memory@810000000 { <0x8 0xc0000000 0x1 0x0>, <0xc 0x00000000 0x0 0x40000000>; }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + mmc0_reserved: mmc0-reserved@5160000 { + compatible = "shared-dma-pool"; + reg = <0x0 0x5160000 0x0 0x10000>; + no-map; + }; + }; +}; + +&mmc0 { + bus-width = <8>; + memory-region = <&mmc0_reserved>; + non-removable; + status = "okay"; }; &uart0 { diff --git a/arch/arm64/boot/dts/bst/bstc1200.dtsi b/arch/arm64/boot/dts/bst/bstc1200.dtsi index dd13c6bfc3c8..9660d8396e27 100644 --- a/arch/arm64/boot/dts/bst/bstc1200.dtsi +++ b/arch/arm64/boot/dts/bst/bstc1200.dtsi @@ -7,6 +7,12 @@ / { #address-cells = <2>; #size-cells = <2>; + clk_mmc: clock-4000000 { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <4000000>; + }; + cpus { #address-cells = <1>; #size-cells = <0>; @@ -72,6 +78,18 @@ uart0: serial@20008000 { status = "disabled"; }; + mmc0: mmc@22200000 { + compatible = "bst,c1200-sdhci"; + reg = <0x0 0x22200000 0x0 0x1000>, + <0x0 0x23006000 0x0 0x1000>; + clocks = <&clk_mmc>; + clock-names = "core"; + dma-coherent; + interrupts = ; + max-frequency = <200000000>; + status = "disabled"; + }; + gic: interrupt-controller@32800000 { compatible = "arm,gic-v3"; reg = <0x0 0x32800000 0x0 0x10000>, -- 2.43.0