Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp249977rdb; Sat, 17 Feb 2024 07:01:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUYUnxXa7XEOP5ozkRkWMU4H7W0Gvi8ejTI572MEoDEWgfCKA+4IJ4WpzMEzDhkJ86+OSqol/bC3RIxIJuG/uvWqOM8aNTAdn9UCiDuFw== X-Google-Smtp-Source: AGHT+IHeEU8lGeVT19BfDXNMHzFcC9gdJEwTgYhXM370H5MMTrHq66HvUKEwx6cGpESXNag61EU4 X-Received: by 2002:a17:902:ccc9:b0:1db:bbe0:9e9 with SMTP id z9-20020a170902ccc900b001dbbbe009e9mr4246807ple.58.1708182090689; Sat, 17 Feb 2024 07:01:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708182090; cv=pass; d=google.com; s=arc-20160816; b=OlZjbM+bY6A2JMFulf49UsXryZl234RkKF1A5jKPUVLNCMvEKLEyhjGuIwFDPGg5Nw bs3lJvCc8Gzqaa1hdTdxSTNHr5N6rClrsRL6kJyeWxBYeiomxgUsdUqn6ZuJl0mH29uF UW/AcH0isdHh5tcK3ULa7ZjWNii3lSCmsB0bzOvlYO2tSeEYi7PzGoucSLUn17YkNMQf TKRbH8z9mVOnJ8f482aOSu9Mml9QiuKlRBRoUwnTRrJhYRjsLTZEngLSUADXIeks865t dPNS7Q44r+CIBRr+nJ029rb6WvBsMcQzwWePETRJIDA2Ztg273I7hEExVDfnYCKD7Y2w vluQ== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=QocJvltIWVGu9Djqo68lieWAlm+pOBviuWo59gj8xwE=; fh=YW87K6Vt763fZthPFgm9WUxxgo906V8yVrhU07HdvuE=; b=kHS4i3OcFTtsQzooZQ+9qWC39+jg548+9A2lBp+EHi6YgHchNHbyvkamEEYXim6FQo cGzDkt/+YzmfnxDpcygUZoN4eICodvIff7+O8qwPepBJKYb+1frea8JmgDNf90E+o+PK UkPLGq7Ae+ZAJ9WBa2g9JI4S0C1p4kLky0vXQ9i3SU1tmzmmruxdE6b7ZI1Jw/FL0RgA cXv8isEdoSBEmOjVlvflSKWiBAUXTFC9Vh0eZR1i3gJg0lo9+7Ykd69qINl8d/Gh+XMD uqZk4fmD7FAo5fTvbgpzEAjvMDjPuHYr1Q4AlocGX8lMRQX6iyrN+8gs2GTlUGQFugGF XHKQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CtrUsh6b; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69919-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69919-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t185-20020a6381c2000000b005d72fd9d73asi1581410pgd.602.2024.02.17.07.01.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 07:01:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69919-linux.lists.archive=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=CtrUsh6b; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69919-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69919-linux.lists.archive=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 603EE2830EE for ; Sat, 17 Feb 2024 15:01:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70F097C0BA; Sat, 17 Feb 2024 15: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="CtrUsh6b" 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 744257B3D0; Sat, 17 Feb 2024 15:01:24 +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=1708182084; cv=none; b=hX2EO9niyacKZhh6gwaZ6pGAYdt0ESrwSxWAkfvnQtF0kSeDIl7Q/g28VyKQhRQ8FATaVRdIFOhnMshjqShb3LnHy8851dr2dYFS0tjUXNnmx1goAhwq91umhXyOJqADk4FxoqTtWNb1ecOA+8uY2rLTYl7EYgxxPQukry8xmGU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708182084; c=relaxed/simple; bh=IojVOTkkmUgO8R4R5BC+JvxU3MusAnoRWz5cmE/Gqjc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ROUHKwGG1uS7o5CcSzRkLZJni/Ly4zwLMsv7lflI9CxMqQZ3sYR9gBye91pM3SE3A2QwVlai3F2nNnQgBRllIilkPVBUttQyxGOsRw/XlfsYNO+EyrRLwMuLA6MLRTrWT0j9MmzSyavFXQI/PAJaqKKCGF21+kJ2EI8IRfpDgv4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CtrUsh6b; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AD4EC433F1; Sat, 17 Feb 2024 15:01:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708182083; bh=IojVOTkkmUgO8R4R5BC+JvxU3MusAnoRWz5cmE/Gqjc=; h=From:To:Cc:Subject:Date:From; b=CtrUsh6bwVqhdBGdyOuDk0xtJef3k8N8vCn7a3CH5JXonVHQxfPDLMFYZdVsQDVWk +bjGkaUhzstRRxhqn8KOlfclvoHzFFGzo67TuaoxpU8lmWHjta9QxHjyN8o/C3jf0y PjMVYo4N6IeVR9dOnA/e47OtlC4ClvurnxM7fFTS6D0nfUzgLPukjzTlGm1O7ag76A lhj0tWdeUNi2x9yXHIeHYzB/mKh4DraVWbyGjO4sUL83gBliNF7T4BXhGmXzHVrEli ZU4VJRgjOqQiF9rXK/MXwDUC8+TcX1EnGeGiIYuYkoK0ndebkMu2qVS/x4TZ/z42ey OkyO12z0GoLKQ== From: Jisheng Zhang To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Adrian Hunter Cc: linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH RFC] riscv: dts: sophgo: add sdcard support for milkv duo Date: Sat, 17 Feb 2024 22:48:26 +0800 Message-ID: <20240217144826.3944-1-jszhang@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add sdhci dt node in SoC dtsi and enable it in milkv duo dts. Signed-off-by: Jisheng Zhang --- Since cv1800b's clk support isn't in, this patch uses fixed dummy clk and just RFC, I will send formal patch after clk support is ready. .../riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts | 8 ++++++++ arch/riscv/boot/dts/sophgo/cv18xx.dtsi | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts index 3af9e34b3bc7..94e64ddce8fa 100644 --- a/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts +++ b/arch/riscv/boot/dts/sophgo/cv1800b-milkv-duo.dts @@ -33,6 +33,14 @@ &osc { clock-frequency = <25000000>; }; +&sdhci0 { + status = "okay"; + bus-width = <4>; + no-1-8-v; + no-mmc; + no-sdio; +}; + &uart0 { status = "okay"; }; diff --git a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi b/arch/riscv/boot/dts/sophgo/cv18xx.dtsi index 2d6f4a4b1e58..405f4ba18392 100644 --- a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi +++ b/arch/riscv/boot/dts/sophgo/cv18xx.dtsi @@ -4,6 +4,7 @@ * Copyright (C) 2023 Inochi Amaoto */ +#include #include / { @@ -45,6 +46,13 @@ osc: oscillator { #clock-cells = <0>; }; + sdhci_clk: sdhci-clock { + compatible = "fixed-clock"; + clock-frequency = <375000000>; + clock-output-names = "sdhci_clk"; + #clock-cells = <0>; + }; + soc { compatible = "simple-bus"; interrupt-parent = <&plic>; @@ -175,6 +183,15 @@ uart4: serial@41c0000 { status = "disabled"; }; + sdhci0: mmc@4310000 { + compatible = "sophgo,cv1800b-dwcmshc"; + reg = <0x4310000 0x1000>; + interrupts = <36 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&sdhci_clk>; + clock-names = "core"; + status = "disabled"; + }; + plic: interrupt-controller@70000000 { reg = <0x70000000 0x4000000>; interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>; -- 2.43.0