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 064DBC25B5F for ; Fri, 10 May 2024 14:35:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=A7g+Y4lfZKeY41njxkMF62Z/GTgw9COtJBgdJk1z77g=; b=Yy3kSFuoqGFVN2 /TC+7PloTBWTHGtn4DWcq/iaS4vKzQKacBTLEKiq2z0lMGhPYaft/veOjMr0MUaBpsbyrOljoEPFl 7JR7IkOqpTll4YL4fGmOT8KOzqoPCyLB+9apavdZ+zcDzIcy7dfyIdbJjWUcnwukAeUbMG+enFAaY 8Z/BuE0bWXtphlf00NuGFuTvndpnzU2yugSzlWwKuiXbK0nWbirMS1BXIRcdPAKxTIjKflEpnRbGd sGcsb2z/kgWwRsxtHAHzR4oB5MvSWZHg17RtFH6V8folx2N+3z6WXssuC7RUHlftJqP1MC6AElZ8q 7wGYACexcO0ASTZwj1kA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s5RLT-00000005ZlS-1F7Z; Fri, 10 May 2024 14:35:35 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s5RLN-00000005ZhL-2ox5 for linux-arm-kernel@lists.infradead.org; Fri, 10 May 2024 14:35:31 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a59a8f0d941so512778866b.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=lists.infradead.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=BUNwnFF7kFv0Aio+pX3F5JJDPxKroFpHnP9zjBLDiV0OYOxZxDDT7VyEDfCOhf8Pem JvklNBnph9wG7iib5jkwM/3b3SCBlbcKKEsB0WTqC7VO7TIBXn1t6ufHKGDI45KBaeTa 0HXfN4v6a4pUbuhmOuAM4NCzTNF7j0UeTXox7/vAayLutIpszLE8qVeKNMh9ujboXuAW 4vquzSOPH1JQ32AwutA1pRqpPDhbmn1yopdiEmPqQdgFrPepAHABwoRpPZeL112hSMgx CRW9XiOyQs26abxBlxavc0VaD5bezDcHbPEApqPMoi4YM6b1qEJaHiClAQJWPi65t8Nd tHjQ== 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=BD6B15ei/qwFEQyqapVDU1JmhN8tETsQTQY0X2ilrAupzLz2KxuVLW/KvsaLCixJwb eZllYs+4NSBmjvZ6S8a6hp7E4o6iqWweRPgAYliaSTZhYcGapBrRqM9C/fTh5x/5hPWF cDJ7y9uo3ChCWJv74N5ZR6dvAD2Qvxt2yxP5bKD2N6no7iqcPnP6o+GpTnRvAFmHjg4J 55KWF3pHarAmz/3jFwvS3wG4lK0V6RBMrYug6wbK+JBP9CERcL5R8cSD+a/fVtCOJ0aF VBIv1themJD2Z1dT/fbNt7FAttaZTQUi62qLKxr1MGyVEQoUYr1HnFmG23SGEQA2otd0 jNGA== X-Forwarded-Encrypted: i=1; AJvYcCVcr8q5bZxytzkg3fsg0k1zn1XNZq2Mpw4eZcjxEYMiTUbI5vFFk1Ty36oOGZ8gPJIwkC9kmfkai/Fjcwyn6HQnWpPtPxtz6Qftp1o4Ba8mltO5ChQ= X-Gm-Message-State: AOJu0Yy43D4eYX4tiNizmijjfIHGVKDLjZHawV8xLTg6EdCam6OF/LqH 5wKIU8VN9Uo/e3L3AMmi2fBtXE6nAbkYTRi3Zzr6J6w7Fk9d1kFWR3ken1r/fy8= X-Google-Smtp-Source: AGHT+IEfB00TSyx2m8PYgYVtXx6zGkM7eP4zIy2ysPMoUokR5lQDpc/14tsnYvzn3fDHx3nAmbCz1w== 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 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240510_073529_766660_1C8D50C7 X-CRM114-Status: GOOD ( 21.43 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel