Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp543453lqo; Fri, 10 May 2024 07:35:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUM2+AwnsYZUr8M1JeNYfHYVkrUvygHPNqus+f75zIYqglA9I+vZKKlTmtvqqwdSiAKPYZly42R90F0BURHyuWBnC6BRuO9W2GgYGH6cA== X-Google-Smtp-Source: AGHT+IHBMHVzO+IISrFNBNukfKZ6orZXxL7Gkd2n9X2H9BRT+o0+StogCqoMAy2W5G1pKii4E91f X-Received: by 2002:a17:902:ef46:b0:1e7:b7b7:7b44 with SMTP id d9443c01a7336-1ef43d12481mr44642455ad.15.1715351740647; Fri, 10 May 2024 07:35:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715351740; cv=pass; d=google.com; s=arc-20160816; b=vED6p4bRBsjAopW0MXt/VIDowoWgYpLs/UKfAVFwILdRRaKE+8Ie91o1JrWHmPqqBM zjEqLGVAp77m4qyLNtujLH0VrINfzdIeWqZp+krVtkfEJg5TyhuV5yYm2GZi15nhL+qp 92XGxtJGJk0wFxpt8htuBGaSnNA/PAfuXnwg0Y7f9vdC9cH8kqMKY05o0ybHzTrBiuT/ vjSYI0eLXw0Nlml+qpzrIGrf/jOCHIiNwuhqKT/llE1l/sEiEVFHaIQZq1P6Ynx/B6ic 9bum6kLH8MN0S1A1OwV11LJEALBkgxcETCls5Gyc9I7x/WI2mo77qizFkbHRiE4SsMe+ X7og== 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=+L8ioAsAchAICMfzBcWsl13awgXH6DvKJHhUEwMw4lc=; fh=Iz6URl/5poxRCm8Zyd/3NtBX7zX+poznVeXMhQuB1oU=; b=HVUngBn/F1m5b8l2age0w/hHoWXhptIa4YZMWydL7VFt2prXimwKul+8mLtjvBplz8 pzLiZUD6OuTytix8NHk3XsJGu2PVfBk9eu+PNsqgTSa4h79bspyZcIKfILOpTvqb5pFM iuEi675gMPS8yqKT5KY30qSTTJRpQBO59VqEUowW4y2IwAIDiFp/cxqhRtgOECAnBASY 9FM3xKf5nvVVg+T0bRQIxp/H9bQVSJ0zLpH9bg0M5s+3JFRvmXnoz4OJyFogT3BUVrCZ nVQ/BkJKLBJhjoDybnGpiYvB0H3SLs/HIkF3DeZCjqGAsb4H431sTw7uYXMJdJcGE7LG SIXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=OdQumhKo; 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-175905-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175905-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0b9ccda3si39595375ad.108.2024.05.10.07.35.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 07:35:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175905-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=@suse.com header.s=google header.b=OdQumhKo; 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-175905-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175905-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 BD2242866FE for ; Fri, 10 May 2024 14:35:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C77517088C; Fri, 10 May 2024 14:35:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="OdQumhKo" Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (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 4D1E2168BE for ; Fri, 10 May 2024 14:35:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715351728; cv=none; b=sPclerm0hjw5nxdW3m80yTH8TNoteipAPUpzGifOC4XIgclXm0REcuhx8tCrmMkTpcXdIo8YyllccIUK3Ou62Uytz1QhRRmSdEmganpeA0HyWUky6Hg0kySV77vx7SChrv4YT86/b1L+tOPnCVw4ckEd8bo4QaUaKovTXwNMi48= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715351728; c=relaxed/simple; bh=HmqN4Y2qfe+qiS8OCMxYIoCYYp8YoP49efyrVtxAzLg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=urMmhPulnsS2hm3O9i6lWT2ag7Xb53nT5YezQw8/Pm8HXsydQ+hSKaaIdAbdhvS3e8OIAkIiUVr7IfHaZMjGG7mujKzqyV6+u+GVOtZanmAFX01sJ4CC/hUZ6xSnEtEIK4zrg+6YfszE5FDjEpVJc/GUAjMdwA0wubkx6puy7i4= 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=OdQumhKo; arc=none smtp.client-ip=209.85.218.51 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-ej1-f51.google.com with SMTP id a640c23a62f3a-a59a8f0d941so512779066b.2 for ; Fri, 10 May 2024 07:35:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1715351725; x=1715956525; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+L8ioAsAchAICMfzBcWsl13awgXH6DvKJHhUEwMw4lc=; b=OdQumhKo8l2p94gJ8q0kX4HY9Yug/dcug8um1MvUrV0hL/xm9Q8gmzMRECkZGr1v1E oZKbljDukVQMNp4Xm8Uy6uURjaMH1X26n6su4/9SkewHtju6ZupQ9MyxUVa9tOi4c9sl x/yGgQ/Z7grAeX53vzjemadr0zFOeydDMqfnumfc8LhnwUmG7eIPBF6t5ck4nNpA/dmJ fI+1wEX/DatCaEoY7LOHvHZmimO6gTNyA52LLZQ5o/eX4p1+4z12ZbGmmss/p2porbJT 036bWZ6xyhKmZ1fqbFw9DFiQBevpTtEWE8XpmZF7Bh2YUM7vCcl2q6j/jrxACkM2xo1f D4KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715351725; x=1715956525; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+L8ioAsAchAICMfzBcWsl13awgXH6DvKJHhUEwMw4lc=; b=uGfLf4qYNEpWhwV4I6XAumijbCHIRFBKyg1QWbuqGzeGylobNW2T/4UQ87QwAqHmDS sKWtx9jbixAHoeYpFJDCxy8qu93YjJR0rdodbwKnSEASVjXDDkaY2VpT+d962wTsA5T2 3zeqzZi4LwK5ismJfch8rAsBfpsNCsd3S7CFnbLr9nXML5JtHo2zHFbyQi/qgsmvD6UB xxBeGl9ekPn6WL00wU2RmmzTQet4zfVIfRznmvR5mOpLWr/bgjfLmZyoFefz9gexnPEu r1sAi958cmSpDIO4GrZiJnhQ8+q4Ku6i8kRKBvPegTpqYnWLimhgs4KDivWZu9hkRWUV rKYA== X-Forwarded-Encrypted: i=1; AJvYcCUCzZGx8ktGZHh48ojBg4JLjEo1tsIiaksLdgfd9SrlekKtazsoQvJK2DggPE91/9NQ+uGdmxAt20z4w931K6cOYK5hk9o3+L9072mC X-Gm-Message-State: AOJu0YxUEV8hikG28gNdwNBabBTq1MHg3PQSFmMwPltKRKQDyQc1p++/ 3oxc0fTTvGICUok+4qq6P3dK0eNDsu9YuSONOHiJ8KWiMgLPxkQr+7Q4YHrncss= X-Received: by 2002:a17:906:c79a:b0:a5a:3a6c:8b57 with SMTP id a640c23a62f3a-a5a3a6c90ecmr84446166b.6.1715351724687; Fri, 10 May 2024 07:35:24 -0700 (PDT) Received: from localhost (host-95-235-217-160.retail.telecomitalia.it. [95.235.217.160]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a1781ce5dsm190002366b.42.2024.05.10.07.35.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 07:35:24 -0700 (PDT) From: Andrea della Porta To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Ulf Hansson , Adrian Hunter , Kamal Dasu , Al Cooper , Eric Anholt , Stefan Wahren , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Cc: Andrea della Porta Subject: [PATCH v2 0/4] Add minimal boot support for Raspberry Pi 5 Date: Fri, 10 May 2024 16:35:26 +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 minimal support for the Broadcom BCM2712 SoC and for the on-board SDHCI controller on Broadcom BCM2712 in order to make it possible to boot (particularly) a Raspberry Pi 5 from SD card and get a console through uart. Changes to arm64/defconfig are not needed since the actual options work as they are. This work is heavily based on downstream contributions. Tested on Tumbleweed substituting the stock kernel with upstream one, either chainloading uboot+grub+kernel or directly booting the kernel from 1st stage bootloader. Steps to reproduce: - prepare an SD card from a Raspberry enabled raw image, mount the first FAT partition. - make sure the FAT partition is big enough to contain the kernel, anything bigger than 64Mb is usually enough, depending on your kernel config options. - build the kernel and dtbs making sure that the support for your root fs type is compiled as builtin. - copy the kernel image in your FAT partition overwriting the older one (e.g. kernel*.img for Raspberry Pi OS or u-boot.bin for Tumbleweed). - copy arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb on FAT partition. - make sure you have a cmdline.txt file in FAT partition with the following content: # cat /boot/efi/cmdline.txt root=/dev/mmcblk0p3 rootwait rw console=tty ignore_loglevel earlycon console=ttyAMA10,115200 - if you experience random SD issues during boot, try to set initial_turbo=0 in config.txt. Changes in V2: - the patchshet has been considerably simplified, both in terms of dts and driver code. Notably, the pinctrl/pinmux driver (and associated binding) was not strictly needed to use the SD card so it has been dropped. - dropped the optional SD express support patch - the patches order has been revisited - pass all checks (binding, dtb, checkpatch) Many thanks, Andrea References: - Link to V1: https://lore.kernel.org/all/cover.1713036964.git.andrea.porta@suse.com/ Andrea della Porta (4): dt-bindings: arm: bcm: Add BCM2712 SoC support dt-bindings: mmc: Add support for BCM2712 SD host controller mmc: sdhci-brcmstb: Add BCM2712 support arm64: dts: broadcom: Add support for BCM2712 .../devicetree/bindings/arm/bcm/bcm2835.yaml | 6 + .../bindings/mmc/brcm,sdhci-brcmstb.yaml | 23 ++ arch/arm64/boot/dts/broadcom/Makefile | 1 + .../boot/dts/broadcom/bcm2712-rpi-5-b.dts | 62 ++++ arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 302 ++++++++++++++++++ drivers/mmc/host/sdhci-brcmstb.c | 81 +++++ 6 files changed, 475 insertions(+) create mode 100644 arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts create mode 100644 arch/arm64/boot/dts/broadcom/bcm2712.dtsi -- 2.35.3