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 70C89C433F5 for ; Mon, 9 May 2022 08:48:37 +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:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=m3SBJA/fG5fmKIo80y1blt0MSkXF6AbdwgHcLwgdK74=; b=DR1i58ByQu7CmC pXpaS0/+2pBbYtzzZl9/grIOCKpMG0xjEZvIEftIFq2umv1QQAHL5ziaCIEaRc9tbKzZ1D+TVXh6U 1C26NEPdrA8HhNOwpz+MDH/jSo5za6D+j51xjGprlFa+HPyj3WcP8VHueMSr5aM0OclYLKKHj8B9j hFjLct+RA5Ej8QmnoF0gmBqUWNN3Dz0UXjftuaxDM66C7wEXlyoshiEwCXzZtFB13TmRjlKhDTkRV yDddrO59CsTvRCTosEsIwIMPLv1qs/uSXp8HZoYCvMj7COs8bQc2Z3SAqYF9kcf4HbuuU/3lbn6Fy KQ6N7Cfuzjk0Na8oy1bQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nnz3F-00DCTN-Nh; Mon, 09 May 2022 08:47:33 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nnz3C-00DCR8-VT for linux-arm-kernel@lists.infradead.org; Mon, 09 May 2022 08:47:32 +0000 Received: (Authenticated sender: gregory.clement@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 1050240007; Mon, 9 May 2022 08:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1652086045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ivoK15iFFrCyokd4/a45dZRdTsG0bp4wFqdXqPeAM7k=; b=L+gPH//MEtnEnPB2S1YMtTVv5CEds3o+9pQNMRNwd3Unh17uEomiSh3BUwXgPTpTUxf0Dt 49guFFmxTUU+2rqXdBlDOzrVC0g1rpe50N70z04SiHxB/ZREv5OZbGyXxBYeCxNtFEZ0UE Cablq2dqsLtAQCwAPcXAsLbVKnVnWIDhMgTPnH0MksYm8/OntgDPUFD7s9UY6qrjPoh1Q6 nzGM/iIdld711XjfVFIw8O9G4gjHWvm6XFdq1suGGT/D7fFKebNnSm6t+RD452gO/IkHGG U0kXhck429GabN3N4WKAtnSEIbvAxOJc3NikFYbSIILE/7aIVmHFOTYon75M2A== From: Gregory CLEMENT To: Robert Marko , andrew@lunn.ch, sebastian.hesselbarth@gmail.com, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, pali@kernel.org, marek.behun@nic.cz Cc: Robert Marko Subject: Re: [PATCH v2 1/2] arm64: dts: uDPU: update partition table In-Reply-To: <20220322105857.1107016-1-robert.marko@sartura.hr> References: <20220322105857.1107016-1-robert.marko@sartura.hr> Date: Mon, 09 May 2022 10:47:18 +0200 Message-ID: <87mtfrrt2h.fsf@BL-laptop> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220509_014731_185851_36928779 X-CRM114-Status: GOOD ( 21.54 ) 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 Robert Marko writes: > Partition currently called "uboot" does not only contain U-boot, but > rather it contains TF-A, U-boot and U-boot environment. > > So, to avoid accidentally deleting the U-boot environment which is > located at 0x180000 split the partition. > > "uboot" is not the correct name as you can't boot these boards with U-boot > only, TF-A must be present as well, so rename the "uboot" partition to > "firmware". > > While we are here, describe the NOR node as "spi-flash@0" instead of > "m25p80@0" which is the old SPI-NOR driver name. > > This won't break booting for existing devices as the SoC-s BootROM is not > partition aware at all, it will simply try booting from 0x0 of the > boot device that is set by bootstrap pins. > > This will however prevent accidental or automated flashing of just U-boot > to the partition. > > Signed-off-by: Robert Marko > --- > Changes in v2: > * Update the commit description by adressing ABI breaking concerns Applied on mvebu/dt64 Thanks, Gregory > --- > arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts > index 95d46e8d081c..ac64949bb53e 100644 > --- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts > +++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts > @@ -99,7 +99,7 @@ &spi0 { > pinctrl-names = "default"; > pinctrl-0 = <&spi_quad_pins>; > > - m25p80@0 { > + spi-flash@0 { > compatible = "jedec,spi-nor"; > reg = <0>; > spi-max-frequency = <54000000>; > @@ -108,10 +108,15 @@ partitions { > compatible = "fixed-partitions"; > #address-cells = <1>; > #size-cells = <1>; > - /* only bootloader is located on the SPI */ > + > partition@0 { > - label = "uboot"; > - reg = <0 0x400000>; > + label = "firmware"; > + reg = <0x0 0x180000>; > + }; > + > + partition@180000 { > + label = "u-boot-env"; > + reg = <0x180000 0x10000>; > }; > }; > }; > -- > 2.35.1 > -- Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C1E8C3527C for ; Mon, 9 May 2022 09:30:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237238AbiEIJdZ (ORCPT ); Mon, 9 May 2022 05:33:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237362AbiEII60 (ORCPT ); Mon, 9 May 2022 04:58:26 -0400 Received: from mslow1.mail.gandi.net (mslow1.mail.gandi.net [217.70.178.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41FDF1FB2CD; Mon, 9 May 2022 01:54:33 -0700 (PDT) Received: from relay2-d.mail.gandi.net (unknown [IPv6:2001:4b98:dc4:8::222]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 49986CA961; Mon, 9 May 2022 08:47:29 +0000 (UTC) Received: (Authenticated sender: gregory.clement@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 1050240007; Mon, 9 May 2022 08:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1652086045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ivoK15iFFrCyokd4/a45dZRdTsG0bp4wFqdXqPeAM7k=; b=L+gPH//MEtnEnPB2S1YMtTVv5CEds3o+9pQNMRNwd3Unh17uEomiSh3BUwXgPTpTUxf0Dt 49guFFmxTUU+2rqXdBlDOzrVC0g1rpe50N70z04SiHxB/ZREv5OZbGyXxBYeCxNtFEZ0UE Cablq2dqsLtAQCwAPcXAsLbVKnVnWIDhMgTPnH0MksYm8/OntgDPUFD7s9UY6qrjPoh1Q6 nzGM/iIdld711XjfVFIw8O9G4gjHWvm6XFdq1suGGT/D7fFKebNnSm6t+RD452gO/IkHGG U0kXhck429GabN3N4WKAtnSEIbvAxOJc3NikFYbSIILE/7aIVmHFOTYon75M2A== From: Gregory CLEMENT To: Robert Marko , andrew@lunn.ch, sebastian.hesselbarth@gmail.com, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, pali@kernel.org, marek.behun@nic.cz Cc: Robert Marko Subject: Re: [PATCH v2 1/2] arm64: dts: uDPU: update partition table In-Reply-To: <20220322105857.1107016-1-robert.marko@sartura.hr> References: <20220322105857.1107016-1-robert.marko@sartura.hr> Date: Mon, 09 May 2022 10:47:18 +0200 Message-ID: <87mtfrrt2h.fsf@BL-laptop> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Robert Marko writes: > Partition currently called "uboot" does not only contain U-boot, but > rather it contains TF-A, U-boot and U-boot environment. > > So, to avoid accidentally deleting the U-boot environment which is > located at 0x180000 split the partition. > > "uboot" is not the correct name as you can't boot these boards with U-boot > only, TF-A must be present as well, so rename the "uboot" partition to > "firmware". > > While we are here, describe the NOR node as "spi-flash@0" instead of > "m25p80@0" which is the old SPI-NOR driver name. > > This won't break booting for existing devices as the SoC-s BootROM is not > partition aware at all, it will simply try booting from 0x0 of the > boot device that is set by bootstrap pins. > > This will however prevent accidental or automated flashing of just U-boot > to the partition. > > Signed-off-by: Robert Marko > --- > Changes in v2: > * Update the commit description by adressing ABI breaking concerns Applied on mvebu/dt64 Thanks, Gregory > --- > arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts > index 95d46e8d081c..ac64949bb53e 100644 > --- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts > +++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts > @@ -99,7 +99,7 @@ &spi0 { > pinctrl-names = "default"; > pinctrl-0 = <&spi_quad_pins>; > > - m25p80@0 { > + spi-flash@0 { > compatible = "jedec,spi-nor"; > reg = <0>; > spi-max-frequency = <54000000>; > @@ -108,10 +108,15 @@ partitions { > compatible = "fixed-partitions"; > #address-cells = <1>; > #size-cells = <1>; > - /* only bootloader is located on the SPI */ > + > partition@0 { > - label = "uboot"; > - reg = <0 0x400000>; > + label = "firmware"; > + reg = <0x0 0x180000>; > + }; > + > + partition@180000 { > + label = "u-boot-env"; > + reg = <0x180000 0x10000>; > }; > }; > }; > -- > 2.35.1 > -- Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com