Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1950596lqp; Tue, 16 Apr 2024 02:51:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWX5zzJ+AGPAUk7Vq7YHjVJ3BvYToxuXRE+5U+Ar4HN4QPOBwcwB//jEK4WCTlbzk2BlPUkIijqiLO/BfZPWlJ0p0dqs9SWFD5gOAgj9Q== X-Google-Smtp-Source: AGHT+IEvA/UFa7bzzHNyaiLRQWAIqYeSScYWuzC1T3bHjQpMjxOq5u4whMGdhUIQodJLp4ecAHvW X-Received: by 2002:a05:6808:2785:b0:3c6:9c5:7b6 with SMTP id es5-20020a056808278500b003c609c507b6mr12987766oib.23.1713261098849; Tue, 16 Apr 2024 02:51:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713261098; cv=pass; d=google.com; s=arc-20160816; b=lnvcNWGOaj/0iG+pJOjF9gGPHmtIc9AKkRmNwMwhArjm39++8pLTo/lpTpWvCcfxMo i+vDO8T73II75EIpUjhTlCjJvydI11l5UNrWCkCOFnBT0+WZsoAK5b24NHBGJ4s9GQwc eqkoZ1w5xAlwMeE6ZJHHO88gzC6RtSRpM4hLiUtO2h/VhiVL3FgsMTHSM7uDQHQZp57c WqkYNOe1QKBfXWtQu6joq1hzAUcRXYuzwO7nxgXwT8MwYZgl3QLrDqCuiERsdDrLtDJR nZGHl9D55FFwmtd2APXjK7EgRYX+mdn4SrjdL+1KJ7buH7CYiVVizYsbLk8OwABTLapD OSwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=dKVl3O7EHtWd97mA3oU7jwLqrHCbe1j887QmZeXMuow=; fh=1YsF4Ua2JMy/crPhxKAQHn/URvotY4Yx4By5nuVgqHA=; b=h3Q04x7auPPvTDEWrO283Ef7pd/Rtk938v38JdgA4X0uSMt9jj3YfXfNrE6pHgV7UP 0j0SmUcWnpebZ1waTGSGr5G0BxT6aZBRfbyZUtT7P+Co44R+juLs6CstzoxtzobTFzRs dmNscD7UKr8pje2LBzIi4Le1jj03wdARnK9Q64dOsm0bRN5VlO46ReNljmmq8glzy7gJ 1jlPQL+7EFFhKPDtqAZTFsmyFaynaUxu73gHf2Z1a/djAlvcO4ytwCczWLX+KEVcg+1K nW30wdQhX6eONfDhS+uOno1GhoeF4I+jLMO6kwdd+ql+ZC27Ok3m7FLlvV8y51OTZtLG OIKg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kKp3pUIk; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-146572-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146572-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w70-20020a638249000000b005dc505aef9asi9211575pgd.354.2024.04.16.02.51.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 02:51:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146572-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kKp3pUIk; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-146572-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146572-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 81607283495 for ; Tue, 16 Apr 2024 09:51:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1FBD686268; Tue, 16 Apr 2024 09:51:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kKp3pUIk" Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (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 E1B343FE2A; Tue, 16 Apr 2024 09:51:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713261092; cv=none; b=JXr8O4ueJIFcTKHo7jTdcH5wroUgo8hvzfrNaAnMtC9VNk43NrdEJXQY7xQ5I0a7zpYNbKDfB+fZf0wS5/7aphMjm4Mhwc+Yj2D4xruKWuirAA3v0W0WYkTAFWCam1JHneeD6dSWMxqunuPpHbiImB0Wl0AO6NCbF6Huoc+ortQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713261092; c=relaxed/simple; bh=xpvoI8aRsr4RIndXSsQx0e1Xx+6a2BKP0J1OQSqC7CU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=g3c/kW6VKiyd0E1cgnO2TINh2Wg9uH1WtzOnyS25RQPiy+wjvKZMNOdvByk3OjF52FZLhzuMbZYnm04UPkgux95g0wN53mPmLT/UX2vTVrm7vzMWpB1sUUMw9jS/7NDBRRHI1t+Ufa6Dz8IF/nB7HgYPJTPTdzJ9WdEjp58gSmY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kKp3pUIk; arc=none smtp.client-ip=209.85.210.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ot1-f52.google.com with SMTP id 46e09a7af769-6eb8ea5ac95so405990a34.2; Tue, 16 Apr 2024 02:51:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713261090; x=1713865890; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dKVl3O7EHtWd97mA3oU7jwLqrHCbe1j887QmZeXMuow=; b=kKp3pUIk67n3XTnGMmLlMBRUOugfR67E1lXgFZrAw+0cESZUr5UNrH4ZtvsicXljwt i8i2tDXhh7lpH1RddUNg564E+GENleQZ4Dr6ldlJKRgFbRRu9e6ZWtTNu/puOd6TSiWF f5sCYwKY5wmkP2O4J0GeiXylbjQkPRMVqR5g7UOhiqixCjg/bXIhzq/msW03/zhmYB1X s2dsC0lUcK5EOZKT1ZsATrbDPFMEV726YASG+sMGgSuVkdEYDtL4sYgXSjevf2L1IlJh ZIvwMr8GiqpZ995QUSxMu9ZT87jt5s3yLLc3g5Az8SHZd+B1BOXDqCu8LNhqdldddGtM 5EiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713261090; x=1713865890; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dKVl3O7EHtWd97mA3oU7jwLqrHCbe1j887QmZeXMuow=; b=SRg5IX0kPL5DkowAPHco5Hxh7RXvD05wRffc1rpLXKfunrYqqGSByYwJs++n9kFuLi ciUZ/bDTTgCKHzvpfl7EpdZ40ETDh3dJV5zs2g26gM9v9mEcLaOg5leP/FNBKn3lEkEp 0W2qCukiS4RypkkdTnqWBzXRuiQ/43UTg0GR51cacaJ1P6jhp1Mcin8z61woXOmARq2x mWjHzP9W4F9YGMTTj/EcRGUhzNYh3Ski1Db+wuuZwBfuMG3L0nzdUr+qpJAW/vEoQVSU hYWIePRvPDuMmc5c2f9Jc6rVH/YrBiTCllX6IzqKCI+mmW3wk6hsGzEy7HE7DT8cUt4N p7rA== X-Forwarded-Encrypted: i=1; AJvYcCXe0dUp4zoLHLcr1VYGY2/qYoYTpg5agruoT/JtQ57emaQX+m5ayylbO3DhfrjQH49TViLNRy3Gf5sc0qPh2v4YhHZR4WlWIgtcvhFteKC/zyd7DV9E62z/kTxmZAEzzuquRapETLcpE5KE7oZ5PKh1XXGEATTPWXLWJLYQ4vFS3qcLTQ== X-Gm-Message-State: AOJu0YwTLH/vcLycfMdhohLfsHFnQ6GnF6ifpSRR6kzA9ywlrhiZpwva Gm6aGgpBHj9uIDPuSfvqxIOagikfwDde8KeOM6gfAvn8Z44hTJ7t X-Received: by 2002:a9d:6b09:0:b0:6ea:2b0b:6171 with SMTP id g9-20020a9d6b09000000b006ea2b0b6171mr14412997otp.5.1713261089960; Tue, 16 Apr 2024 02:51:29 -0700 (PDT) Received: from localhost.localdomain ([122.8.183.87]) by smtp.gmail.com with ESMTPSA id h13-20020a9d600d000000b006ea23d8fcaasm2190528otj.32.2024.04.16.02.51.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 02:51:29 -0700 (PDT) From: Chen Wang To: adrian.hunter@intel.com, aou@eecs.berkeley.edu, conor+dt@kernel.org, guoren@kernel.org, inochiama@outlook.com, jszhang@kernel.org, krzysztof.kozlowski+dt@linaro.org, palmer@dabbelt.com, paul.walmsley@sifive.com, robh@kernel.org, ulf.hansson@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-riscv@lists.infradead.org, chao.wei@sophgo.com, haijiao.liu@sophgo.com, xiaoguang.xing@sophgo.com, tingzhu.wang@sophgo.com Cc: Chen Wang Subject: [PATCH 3/3] riscv: dts: add mmc controllers for Sophgo SG2042 SoC Date: Tue, 16 Apr 2024 17:51:17 +0800 Message-Id: <05f55d1c83b1dd6b810ec1710b38771c03112876.1713258948.git.unicorn_wang@outlook.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Chen Wang SG2042 has two MMC controller, one for emmc, another for sd-card. Signed-off-by: Chen Wang --- .../boot/dts/sophgo/sg2042-milkv-pioneer.dts | 15 +++++++++ arch/riscv/boot/dts/sophgo/sg2042.dtsi | 32 +++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts index 80cb017974d8..c4037eff5c97 100644 --- a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts +++ b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts @@ -26,6 +26,21 @@ &cgi_dpll1 { clock-frequency = <25000000>; }; +&emmc { + bus-width = <4>; + no-sdio; + no-sd; + non-removable; + status = "okay"; +}; + +&sd { + bus-width = <4>; + no-sdio; + no-mmc; + status = "okay"; +}; + &uart0 { status = "okay"; }; diff --git a/arch/riscv/boot/dts/sophgo/sg2042.dtsi b/arch/riscv/boot/dts/sophgo/sg2042.dtsi index 8aab027cf730..0b176712a43c 100644 --- a/arch/riscv/boot/dts/sophgo/sg2042.dtsi +++ b/arch/riscv/boot/dts/sophgo/sg2042.dtsi @@ -393,5 +393,37 @@ uart0: serial@7040000000 { resets = <&rstgen RST_UART0>; status = "disabled"; }; + + emmc: mmc@704002a000 { + compatible = "sophgo,sg2042-dwcmshc"; + reg = <0x70 0x4002A000 0x0 0x1000>; + interrupt-parent = <&intc>; + interrupts = <134 IRQ_TYPE_LEVEL_HIGH>; + clocks = + <&clkgen GATE_CLK_AXI_EMMC>, + <&clkgen GATE_CLK_100K_EMMC>, + <&clkgen GATE_CLK_EMMC_100M>; + clock-names = + "core", + "timer", + "card"; + status = "disabled"; + }; + + sd: mmc@704002b000 { + compatible = "sophgo,sg2042-dwcmshc"; + reg = <0x70 0x4002B000 0x0 0x1000>; + interrupt-parent = <&intc>; + interrupts = <136 IRQ_TYPE_LEVEL_HIGH>; + clocks = + <&clkgen GATE_CLK_AXI_SD>, + <&clkgen GATE_CLK_100K_SD>, + <&clkgen GATE_CLK_SD_100M>; + clock-names = + "core", + "timer", + "card"; + status = "disabled"; + }; }; }; -- 2.25.1