Received: by 2002:a05:7208:2202:b0:86:316c:7444 with SMTP id s2csp865747rbb; Sat, 1 Jun 2024 01:18:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUQO9Gq17kXU78R8QOifzarr83vWidGSiWL+biUO3J9KpOH+6UFvlCZ96wExKfmXg+TJy1sTX4GpzgAXB1CwFPw4EObooZP0TuEPlTb3Q== X-Google-Smtp-Source: AGHT+IGwFv0R9W6BdHOJ/JiSCpFPjp56T1N+CuheJVN9E16SObwOBpwp8IATkvYftco132Rq1w39 X-Received: by 2002:a05:6214:3f85:b0:6ad:754a:e501 with SMTP id 6a1803df08f44-6aecd69fe25mr64177426d6.23.1717229900962; Sat, 01 Jun 2024 01:18:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717229900; cv=pass; d=google.com; s=arc-20160816; b=yqGUFoE309XliHDwYnuQjhKCuJVs3s+MuhRyaVGeD94wj22yqA/OsX0bdlsI4pK0EM RvQuQRwh6hxAA+DXGZZT49jII6Yim0HlLhHVT1uBkYfHM+nP+kW1XoI5/4eWXT0fWgQi yDDTHqXa4IEOmMJcuqhDdGul9Iqc9ZaphDttFzZFQVG9UqRk0rhul7tD83bRkqizCtlI 1e+x6LAV6M8FDwvl96TbxHE2xWtrjz182vKNHWXbGU2vlvVv1flUDpSw2T4zbv+lr0AN f0Pyu/GX4NlCJ6jKBGwvO9w1/Lgvf8hq19mT7JsmD6zDuJ8HtK/4Ztry2Vy3gfM9jU/W GCzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :content-language:references:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=9g8i1E4J9Qgk8VQ+f5MzIOoR/utW2DTqj5vifxeAFu0=; fh=a82d8BFlXo27tpOvEhyhZhHZ5gKIUnx1UDxliSdOxv0=; b=AR8geD0g/Ok20JkV5227o4COO5NJVx+wIc/MADdheWb/4/6QLfboAszPkAYZ57uaKo o3LXd5WwBfMvYeWI+H4febxKKls8DpK72ym5ZzvARG6AcRU0/VEVjonR/Zjk4If/KZTe o2boL9L8CmHKNs0E0f7Xoin7ReCRAuAfY3Y/65zk9bqaj8urIRwzlUe6gqP8nLmx7KRm 6UhHCXkA2JOYXTwdLOtIgmz7qEdndCIrWzGwgAbXDi5be7W7BqMUvWlS/k68SeXStxvq 3qMEYWpU8Y17ttN+/XhOqZTyZc6IcPYsFL1qT1Q3NOCnAxwAKpVBcCll5l4X1L1TQloZ PCAw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmx.net header.s=s31663417 header.b=s6bYa9xp; arc=pass (i=1 spf=pass spfdomain=gmx.net dkim=pass dkdomain=gmx.net dmarc=pass fromdomain=gmx.net); spf=pass (google.com: domain of linux-kernel+bounces-197759-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197759-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.net Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4b415071si39466156d6.342.2024.06.01.01.18.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 01:18:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197759-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=s31663417 header.b=s6bYa9xp; arc=pass (i=1 spf=pass spfdomain=gmx.net dkim=pass dkdomain=gmx.net dmarc=pass fromdomain=gmx.net); spf=pass (google.com: domain of linux-kernel+bounces-197759-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197759-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.net 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4741B1C23E4C for ; Sat, 1 Jun 2024 08:18:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B692FED8; Sat, 1 Jun 2024 08:17:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b="s6bYa9xp" Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (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 75247134BC; Sat, 1 Jun 2024 08:17:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717229870; cv=none; b=YlkCWx7B4xtMjc05lUqXha4p4vgjwjn7+I4ztHYoXLBHr+qJ2MCuU/eNQDgc9BbkiO8MAHIXO1ns8SVIhodo6/P3cHVbE/d1iBHUNZd0aj5bw138quCLhxsPRLVXThb1Cc1vRmgPGkSg8kpHxxQX9mRfoHnH/YCQ1h5PDGb6k9E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717229870; c=relaxed/simple; bh=7eeatt4CcPmiwk7FadqALe+uBEk9RzdNLVP4oBfTTKE=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=bfyJIzG1PJRzJfFaCGj3gsqeNi4K1AIqw+mq2v+pIl7GVK7eDTEs2TGaUgRxp/zYmtfQ9YCsqq+DD3zVi5gzsN4weXib4QOJZlKpd55oE53izmrb/J5ctb0sUoxUSfirBhFxY3s3SDfxYXxIv2PotjMcK06jYJfhrtjXxKJTUAg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net; spf=pass smtp.mailfrom=gmx.net; dkim=pass (2048-bit key) header.d=gmx.net header.i=wahrenst@gmx.net header.b=s6bYa9xp; arc=none smtp.client-ip=212.227.17.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1717229848; x=1717834648; i=wahrenst@gmx.net; bh=9g8i1E4J9Qgk8VQ+f5MzIOoR/utW2DTqj5vifxeAFu0=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=s6bYa9xp91jDDnaO2Kpu+8DRegMiTGOgaXKB5Mhg5+c0CxhX6N+KZEnbOhs284yb 201Qihxzh59QbT6NLof7RVxYhmL4pyuH7gaBq4AsthocxoV14DKBRLF4tUs3WOLKf WEkW7PPdZx3/ipknLGdkZbrfqYlMEfiMg22lJJ0g+zcaJb90vbZKJFjMiF5ElEpMy q/jie6giETFV+PLeGydIgqlfu/HfaEFb5HLttNT9V6JhuprZEFpMc1GymbxLRPMR+ VVB4wufjQ+f/hC9SwsS2T0SZXS0K9Ic+kqvghAuiikIb2zbzu4mXp4AY4+cJ+1MNN fIT0Jm0KATg9WbhHlw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.1.127] ([37.4.248.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N6bfq-1sXTkM0R6U-01528i; Sat, 01 Jun 2024 10:17:28 +0200 Message-ID: <0a041812-875b-42e3-b303-4d984b0f9a54@gmx.net> Date: Sat, 1 Jun 2024 10:17:26 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 0/4] Add minimal boot support for Raspberry Pi 5 To: Andrea della Porta , 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 , 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 References: <36642bd8-c981-4190-9f44-072ac3c97c6b@gmx.net> Content-Language: en-US From: Stefan Wahren In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:goG2aefWUGM6HYTd+wn1rjaTrNzvf9I4cz3NFvFZ99ncYKSE6rO iJQzkald9qRVqEJ2oEE2aeOE0fxuGQfDjplO0NPDzwkzUisk2+SS0IcrfHLc/bV4Ii1yKsf i9ZV5Jb5zcumld0v0rACFuw8a/vtP1ZfF1j6fzo9zY6RlJdmUrDzmjmDJlyeBO7slxHXPbj ZHpwb5QMnwYkjDcqWGmtQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:f4k/wUKkgVI=;4dC/SJSfIquim+tu6BbxkI3Fa50 3mHopelSNKrGAnz6sAKWy+wmGFFdSoy5ZplfsfOF5qQXnZ5L9KbZfiZ8Ogm3/kMcFnBzd03ai OymQOumXnn98K93p1s1DvwQD5Y+Do/lZNywUqzjt1T+dwiqHffiZqUExRyk6T2ttfi6rgZFJl crBjYOLZU9PnwFxtnEYxdDsNxU0CwPzbttfoF0m/8XWrdNdg3dGdqbPrkw0Qi5jVrbkQfZeCg mNd3njO/3t7g4FyRBZVzVsVxaceCqMxP1iJqRZlrD7Gqogb1BVqFa6dYa2qcY0+/DXnSH0nEa ewvLP3kNv8dMyTYrf8p+52SzLV6KC5t0NIgd8IzRVSX4eo2vp7dzsKxfJYQjgIgUnSsySnwZ0 f/Ws409+fdIr8qWx0/FinFJlWN4HmxcpxApcEPlrxi/bmOoL3199H9f56bFWfcJ5L8aRRspus cA6epR/LQxUNy0XHF7amOH9HXsBQbcpZNO1H+YE2XTdgrjggZtm1Ws/Lh6H9dJUFi5zKWyPgH Pw8jnMNfpUvyCeApCUfDhhK9+6BC0annUnkfc3B6nUIJdOz3cklfDQCoVeK7N76+mADDYpbE/ qxGWSM87tkkUbW5T8iZjhhmrAI0VK4w2xpx9mr0s7PdQ3j2Scf+AhMnGFtplGBoRxW40/tzLe CBWTsaPyyDPebTSNyotf1ALh+Kd63qISh2hWXLsM73ZxNo4+uy6tzh7BIIv7+MLUvt3Uq9xQH LVVBi20eUDmQG99rWSqnzXQ4U6+z8lus8ad2ads3YjbV+z6AYGLoGkC8yY3XEV1r7evEAlAIO LckLuCpPucU7wz4uGz0o7BVaZahYsfiAG6UZZNVzz6eio= Hi Andrea, Am 31.05.24 um 14:59 schrieb Andrea della Porta: > Hi Stefan, > > On 12:00 Fri 31 May , Stefan Wahren wrote: >> Hi Andrea, >> >> Am 30.05.24 um 12:11 schrieb Andrea della Porta: >>> Hi, >>> >>> This patchset adds minimal support for the Broadcom BCM2712 SoC and fo= r >>> 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 wor= k >>> 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 fir= st >>> FAT partition. >>> - make sure the FAT partition is big enough to contain the kernel, >>> anything bigger than 64Mb is usually enough, depending on your ker= nel >>> 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 on= e >>> (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 partiti= on. >>> - make sure you have a cmdline.txt file in FAT partition with the >>> following content: >>> # cat /boot/efi/cmdline.txt >>> root=3D/dev/mmcblk0p3 rootwait rw console=3Dtty ignore_loglevel ea= rlycon >>> console=3DttyAMA10,115200 >>> - if you experience random SD issues during boot, try to set >>> initial_turbo=3D0 in config.txt. >> was this an issue since the beginning of this series? >> > I experienced this even during early testing, using the complete downstr= eam > driver. It seems that when initual_turbo !=3D 0, the fw can throttle the= clock > to reduce the boot time and it (directly or indirectly) may affect SD fu= nctionality. > I believe that the probability of this to happen is likely a function of= SD > card speed, whether it requires timing tuning, initial_turbo exact value= and whether > you are booting the kernel directly or chainloading u-boot + grub (or > whatever combination of secondary stage bootloader). For example, your > boot setup may have a timeout in the grub boot menu that is large enough= for the clocks > to settle and the boot process to end successfully, while faster boot ti= me can lead > to the issue described. Since this behaviour seems to depend on all of t= his factors and > does not necessarily arise in practice, disabling initial_turbo is just = a suggestion > in case things go haywire. yes in case the VPU changes the SD clock or one of the parent while the ARM cores tries to boot, they won't be informed about these changes which could ends up with the wrong SD clock frequency. Thanks for your explanations > >> What kind of SD issues? >> > I wasn't able to boot from SD card due to clock issues. > >> Is there a downstream reference? > Some (old) reference e.g.: > https://forums.raspberrypi.com/viewtopic.php?t=3D112480#:~:text=3DIt%20s= ets%20turbo%20mode%20from,have%20turbo%20during%20the%20boot. > > but there are probably more. > > Many thanks, > Andrea