Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp688125lqp; Sat, 13 Apr 2024 15:15:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXZPHLLzx3C1vhlCo4jWaZ2tzwIX0Yjzi3ZpKVmTyMQES7ie0Y2XD7nf+XWH5+97z29Tpw/Y04EEh49hnu0TdZaiI+2s+vkLntdZu+Xug== X-Google-Smtp-Source: AGHT+IFoCiOpNSDJ2mJ+9NEUMMHSJTMvrVB0bdtGR+zMJaAJyXKjMj5EE/dNR+cIVQSjxNqCRtXJ X-Received: by 2002:a05:6358:90c9:b0:17e:89bb:e545 with SMTP id e9-20020a05635890c900b0017e89bbe545mr7473247rwe.19.1713046500595; Sat, 13 Apr 2024 15:15:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713046500; cv=pass; d=google.com; s=arc-20160816; b=0lknMAX2phLRE8ThhV0gPT/byV44fZk6dCvyw5OBNzDz45g1A+TDjmfOABiHOnpE7k Gu3dm+yUFfM8TjS2MSIswoQ0OM2p5etviwkOWLIReo8HHl1REapJXMcyx4wnGBXqL9mG 9iAxSPHF/heJeYpgsqiDavImbDyyIorsW2FqQkgHQX6p8Jt9IWwETWZGlYW+wfQdC2/8 Iils8r+7CsHo3zy9mU1+hV25HRPcJe0wj+sIB8Us1CbavyhB4WBiBvidDouS5NGou+/q AdQPgz/Mud6vZHGAlIWHiQY7yp6SK85JBbtK8J7F1TSvp4/2nkg1h2dQols4QMPy/DAB ouUg== 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:to:from :dkim-signature; bh=bxFqmOp3HshWN+SgF1tbY2QlrStlEk1IWrM1mFhMRAI=; fh=5bpoO9EGkZC/gwgO7joSzzXUo8fc8xgDkHDMpLFqFbU=; b=xFmX93V1+hjAVdrCo+4fuMY/sCmU9h7H6tk/1vXX4mpy0TIBHLpZAXKg0pha9pbhaZ x2zhX8GuJS00ikRwdafnMV22MgpQ3cXll/TJxBkivUQtoGa1zEEBR4znCjHk2w9Rpalx Y6iiAWmPTQx8zRJO8tCZjWZTNApFZklkY4me8eljIgWMPfm6p7GzVE1kYhLhvTVsh/jF HvR7mgAvRQbvR9WH3WyWaWH1Iluyx3K92veUL1kg0dpVwSaYCJ/PmZ0wSzAzogr+nPks 7yVg5VHEWVBjEnf3KvwzQLNOG6rJ6yNIlmvPxpKKLVyYcdtCwWYTVVDfc1CUR6av1dTR gVuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=cYmGkNLk; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-143909-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143909-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d5-20020a634f05000000b005f401cd20f7si5410966pgb.631.2024.04.13.15.15.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 15:15:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143909-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=@suse.com header.s=google header.b=cYmGkNLk; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-143909-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143909-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.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 3DBFA281F22 for ; Sat, 13 Apr 2024 22:15:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 48CA957874; Sat, 13 Apr 2024 22:14:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="cYmGkNLk" Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (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 00BD156471 for ; Sat, 13 Apr 2024 22:14:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713046486; cv=none; b=mPLtq/1fXQ1faHj3xXFGSe+5s0RoGj+/xojRbRRsn1Xi8iPxI912tx/8KZKvhTvcM5MVZgRhrbkaE6yKARA6CrvSV414spGIBlHTiQwEVpxh5P1h/HwcQyeY7QVy1HulQV/WVKgVcu7n51G4tnwYXTwm3xSr7HtGywl8tnWKLUY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713046486; c=relaxed/simple; bh=D4cHZTrBFs9Y8i1w0bHj0gtliPoYKudctyXTaCkiaCo=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=L4BYN0PGw+3WXdj97OQ/b4z4Lov+2aRppGRjGdxGUCLU3kvQkfDSHzPIT+PUgiNUZ1kX/BqVTAy2HGKoccD+2x7hmbfACSm0w76e3/nvdI39h/vv4AuOhFPg8Bp8XWSeoKK2DQitqnZfWLp893NJ9bHDrhWADF5fT2IfEyTfSYA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=cYmGkNLk; arc=none smtp.client-ip=209.85.208.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-56fffb1d14bso2735960a12.1 for ; Sat, 13 Apr 2024 15:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1713046481; x=1713651281; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=bxFqmOp3HshWN+SgF1tbY2QlrStlEk1IWrM1mFhMRAI=; b=cYmGkNLkC/Pyi3/rbbEMfKfekynsdQwk3Co/A5dhbkyMNnT0Z5H/5lsRIZFuny3eBN jrZue4RrcDj+/EsgV4e8bYDwuMcx6DPPBj6z70PPmRLyi3jop/4XyFbBNiosbf+B+6q1 Ii1Mc2akZMWOi9eKsWifK98WWL0B2bQ7JwNdYDc7AxaHPruFfSZeaWsUQUBMPdxMe7e/ zHK32zJSnTywMhA6QxEJC6cLh2gSOeWsc+QGEqWgz9n2WUjm0R7A1z9hxN4BQY0nQGOF D+5v0AwbB+LtXwUqQMddR2rQyS5cgLfAYmohwMh4tAeB0EDespvqvzkD9fizIx7k4Ult X5Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713046481; x=1713651281; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bxFqmOp3HshWN+SgF1tbY2QlrStlEk1IWrM1mFhMRAI=; b=wz/7y8gMv+xK2Ro74tGnZYseb7y6FUx/j6EBDoJFeSYwAylQB4Zn43pavEe2whJ9/S YM9v/W/dD8BFQc1qyjhWpfnX+JmVN8X9g3Ll4lRy475aWC+Hj4PIC6E7P9jPZGMfmbqV Amo/Kb5sXSC3wAx1e6MoR0X3CqEHso3IalbDhX9RDA+0/tsbX2aqXiyqLuRIOnkEncLE sFQvg+2NoqjdY6pS7vnmgDQYGdBnpG/C3UIN7wbc4CmxtInbD3s+21utvNh5bmgm8LVk rVSd+DwIYG/MaEOA3DY+pP9FnYRK8IK8ieGhhWgKglpo79Pr4RZmx0w02V00MLPe6rKM 9cow== X-Forwarded-Encrypted: i=1; AJvYcCV3a+Ryyoh2SQckncEZ47xcjtdwOGDDxUBX+UwLGJLLD1bit/5ZlbYF6B0ueo6V8dG0DUD/YQFC0SCPzp3bXzYfMrU8gPEnYfeZP5+d X-Gm-Message-State: AOJu0Yzx/sccnS7Az84MljiMacpheVJaHsSh4+xaAeo8JUdZ4z/LWV6W JeoJmbDA5K5MYNSQ4XBJNu2BVEcAWHM3eHPlNKPbZ/H2iQV1EDuiR/pG5P4wJMo= X-Received: by 2002:a05:6402:3895:b0:56f:db50:f2ca with SMTP id fd21-20020a056402389500b0056fdb50f2camr8490302edb.4.1713046481310; Sat, 13 Apr 2024 15:14:41 -0700 (PDT) Received: from localhost (host-87-4-160-102.retail.telecomitalia.it. [87.4.160.102]) by smtp.gmail.com with ESMTPSA id b11-20020aa7c6cb000000b0056e7ba0497dsm2976956eds.28.2024.04.13.15.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 15:14:41 -0700 (PDT) From: Andrea della Porta To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Linus Walleij , Adrian Hunter , Kamal Dasu , Al Cooper , della Porta , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Jonathan Bell , Phil Elwell Subject: [PATCH 0/6] Add support for BCM2712 SD card controller Date: Sun, 14 Apr 2024 00:14:22 +0200 Message-ID: X-Mailer: git-send-email 2.44.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 Hi, This patchset adds support for the SDHCI controller on Broadcom BCM2712 SoC in order to make it possible to boot (particularly) Raspberry Pi 5 from SD card. This work is heavily based on downstream contributions. Patch #1 and 2: introduce the dt binding definitions for, respectively, the new pin cfg/mux controller and the SD host controller as a preparatory step for the upcoming dts. Patch #3: add a somewhat reasonable (*almost* bare-minimum) dts to be used to boot Rpi5 boards. Since till now there was no support at all for any 2712 based chipset, both the SoC and board dts plus definitions for the new Pin and SD host controller have been added. Patch #4: the driver supporting the pin controller. Based on [1] and successive fix commits. Patch #5: add SDHCI support. Based on [2] and the next 2 fix commits. Drop the SD Express implementation for now, that will be added by patch #6. Patch #6: this patch offers SD Express support and can be considered totally optional. The callback plumbing is slightly different w.r.t. the downstream approach (see [3]), as explained in the patch comment. Not sure what is the best, any comment is highly appreciated. Tested succesfully on Raspberry Pi 5 using an SDxC card as the boot device. Still untested: - SD Express due to the lack of an Express capable card. Also, it will need PCIe support first. - card detection pin, since the sd was the booting and root fs device. Many thanks, Andrea Links: [1] - https://github.com/raspberrypi/linux/commit/d9b655314a826724538867bf9b6c229d04c25d84 [2] - https://github.com/raspberrypi/linux/commit/e3aa070496e840e72a4dc384718690ea4125fa6a [3] - https://github.com/raspberrypi/linux/commit/eb1df34db2a9a5b752eba40ee298c4ae87e26e87 Andrea della Porta (6): dt-bindings: pinctrl: Add support for BCM2712 pin controller dt-bindings: mmc: Add support for BCM2712 SD host controller arm64: dts: broadcom: Add support for BCM2712 pinctrl: bcm: Add pinconf/pinmux controller driver for BCM2712 mmc: sdhci-brcmstb: Add BCM2712 support mmc: sdhci-brcmstb: Add BCM2712 SD Express support .../bindings/mmc/brcm,sdhci-brcmstb.yaml | 51 +- .../pinctrl/brcm,bcm2712-pinctrl.yaml | 99 ++ arch/arm64/boot/dts/broadcom/Makefile | 1 + .../boot/dts/broadcom/bcm2712-rpi-5-b.dts | 313 +++++ arch/arm64/boot/dts/broadcom/bcm2712-rpi.dtsi | 81 ++ arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 841 +++++++++++ drivers/mmc/host/Kconfig | 1 + drivers/mmc/host/sdhci-brcmstb.c | 275 ++++ drivers/pinctrl/bcm/Kconfig | 9 + drivers/pinctrl/bcm/Makefile | 1 + drivers/pinctrl/bcm/pinctrl-bcm2712.c | 1247 +++++++++++++++++ 11 files changed, 2918 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm2712-pinctrl.yaml create mode 100644 arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts create mode 100644 arch/arm64/boot/dts/broadcom/bcm2712-rpi.dtsi create mode 100644 arch/arm64/boot/dts/broadcom/bcm2712.dtsi create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm2712.c -- 2.35.3