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 E9DB2C25B75 for ; Fri, 31 May 2024 13:00:15 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eOXrADs0wX8M+xcZ8r5HWU5R+Ci5aXXRjzGhDh48Hi4=; b=pkgS+x03vjGbOL gK3pWND+LhIbPgwVWdSmOu3NbS5008LrQP8Mo8x/9OYQPm72bwPe49hNhPkhK1A3SEgmXoTW2Eux0 bWJvTOgloZDmvQEiA1HKCY4rhKXZKalIQVkwjXO1g39iSzjGZbpWHv883DJVUy0XE/FdNS0nmI1Bh 5LLtobEuolXn3i5tu4U8ro7iH+YAfc4ymSE1akXjcVCDlD29caCiDpME2N9yNdZ/4HAIHm4eSb+bh sVPWy+jlMBWxY8f7QRFeSWvlAJnF8cwscRIcxgg/ux9jp8w/s/QqhfPK4qwhz9jwlCJOj5Dbz0k3p BkVlIiHqTp+vpDH/L3mw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sD1rQ-0000000AGVD-3rAF; Fri, 31 May 2024 12:59:58 +0000 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sD1rL-0000000AGTt-40st for linux-arm-kernel@lists.infradead.org; Fri, 31 May 2024 12:59:55 +0000 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-52b7ebb2668so2379193e87.2 for ; Fri, 31 May 2024 05:59:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1717160385; x=1717765185; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=YgAedokl3gRs935zOQgIriLiKTu9cIN2F2d3LZv5g+w=; b=YBe7d16GNmZPwVOW6JgEqpMmxoaQxeXjtKi3z6xAkSyCCE31spUS05NNEqTq+lCA2e /J9TiaZSdO5EYdOPqzMOc1gAjcblQoa7MPPSRz1o+5Dz4GjDU2ZuTPHWdn0cIUbuZugn Xp+l10XNrcQmckCiKpJFzr87UPKQ6lRvq6sfJOM3Q7Za2WUCbhp7z+8FqfxanrFK1K7G a+hOoWlLi8uHbkmqvKZKcfrJZDOwb8xgBbd4qnXhtxeKrEIOFddHMOj0Y3qRcrN21yGa jpChoTyXzNu88j4aaH7Piu4YwDMZ2IjIPrmEXG2Nu9SKiQA8bCjmiPiOkWnUKVnZ0AZ2 y1Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717160385; x=1717765185; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YgAedokl3gRs935zOQgIriLiKTu9cIN2F2d3LZv5g+w=; b=NCwRLnj6cEGjlEQYRxAXab8TQJNzra4S2HdY7MWcoNPsy8jR1Hc/9Vf2LTIJlawc6J ppZhEa4cB2mGoVp3ZybFT4hScqNOp+Rm/JVf7LTp/PusWtClL0jWqSHdiNLKWVacesL5 ZKLPMFqGAQEASbrhVdWJP9SNRo+zds2etc4RABwwT8vDoVxlJ+3P/7Z+bKiwuRow0Luc idM2aE/HClby7HSXHT42uXFLKTZCstihF5MGHGD7DATs2cT/CeyGsr0D/9TdOqHPTedc +espCuGX25UBN05F/TFghLFyOLaSDoOstgYoNKfLfX53FBlYkRLs4HV/kLaxvrkyfGOr W4Nw== X-Forwarded-Encrypted: i=1; AJvYcCUohAaJMPktA/kO/sg23E3tTk3OqrkY8PMBoC1+kycxEgXaU1Fxa1QTvHUNonCmdT59faNFXUw0wdyh6u9DmJnUr+l26zDN6NmDmGh0AUsRrZDP3qA= X-Gm-Message-State: AOJu0Yy4naGOutD780Q/YS5Fvd7H8ONVR9UE6cWfYgLTSZpVDlADMbzX Q3rtwGAosfeF0jwh/tm8pDrG99mTPhALwovrv0L/IezwAhZGs/9wREihk7rVHr0= X-Google-Smtp-Source: AGHT+IHlzlusjyEOgZJnGuSuPZL0kGHD+/XX/Cx4GjQtie8rM3SZ6VVnGyuOMCLAHH96a+kEylXvFA== X-Received: by 2002:ac2:5332:0:b0:52a:5551:5606 with SMTP id 2adb3069b0e04-52b895a3e7amr1619090e87.50.1717160384912; Fri, 31 May 2024 05:59:44 -0700 (PDT) Received: from localhost (host-87-16-233-11.retail.telecomitalia.it. [87.16.233.11]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a67e6f03728sm84644066b.20.2024.05.31.05.59.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 05:59:44 -0700 (PDT) From: Andrea della Porta X-Google-Original-From: Andrea della Porta Date: Fri, 31 May 2024 14:59:58 +0200 To: Stefan Wahren Cc: 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 Subject: Re: [PATCH v5 0/4] Add minimal boot support for Raspberry Pi 5 Message-ID: Mail-Followup-To: Stefan Wahren , 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <36642bd8-c981-4190-9f44-072ac3c97c6b@gmx.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240531_055952_032771_211EFD5C X-CRM114-Status: GOOD ( 31.35 ) 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 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 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. > was this an issue since the beginning of this series? > I experienced this even during early testing, using the complete downstream driver. It seems that when initual_turbo != 0, the fw can throttle the clock to reduce the boot time and it (directly or indirectly) may affect SD functionality. 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 time can lead to the issue described. Since this behaviour seems to depend on all of this factors and does not necessarily arise in practice, disabling initial_turbo is just a suggestion in case things go haywire. > 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=112480#:~:text=It%20sets%20turbo%20mode%20from,have%20turbo%20during%20the%20boot. but there are probably more. Many thanks, Andrea _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel