All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: Robert Marko <robert.marko@sartura.hr>,
	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 <robert.marko@sartura.hr>
Subject: Re: [PATCH v2 1/2] arm64: dts: uDPU: update partition table
Date: Mon, 09 May 2022 10:47:18 +0200	[thread overview]
Message-ID: <87mtfrrt2h.fsf@BL-laptop> (raw)
In-Reply-To: <20220322105857.1107016-1-robert.marko@sartura.hr>

Robert Marko <robert.marko@sartura.hr> 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 <robert.marko@sartura.hr>
> ---
> 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

WARNING: multiple messages have this Message-ID (diff)
From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: Robert Marko <robert.marko@sartura.hr>,
	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 <robert.marko@sartura.hr>
Subject: Re: [PATCH v2 1/2] arm64: dts: uDPU: update partition table
Date: Mon, 09 May 2022 10:47:18 +0200	[thread overview]
Message-ID: <87mtfrrt2h.fsf@BL-laptop> (raw)
In-Reply-To: <20220322105857.1107016-1-robert.marko@sartura.hr>

Robert Marko <robert.marko@sartura.hr> 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 <robert.marko@sartura.hr>
> ---
> 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

  parent reply	other threads:[~2022-05-09  8:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22 10:58 [PATCH v2 1/2] arm64: dts: uDPU: update partition table Robert Marko
2022-03-22 10:58 ` Robert Marko
2022-03-22 10:58 ` [PATCH v2 2/2] arm64: dts: uDPU: correct temperature sensors Robert Marko
2022-03-22 10:58   ` Robert Marko
2022-03-22 12:19   ` Andrew Lunn
2022-03-22 12:19     ` Andrew Lunn
2022-03-22 18:48   ` Pali Rohár
2022-03-22 18:48     ` Pali Rohár
2022-03-22 12:20 ` [PATCH v2 1/2] arm64: dts: uDPU: update partition table Andrew Lunn
2022-03-22 12:20   ` Andrew Lunn
2022-03-22 18:47 ` Pali Rohár
2022-03-22 18:47   ` Pali Rohár
2022-05-09  8:47 ` Gregory CLEMENT [this message]
2022-05-09  8:47   ` Gregory CLEMENT
2022-05-10 13:56 ` Krzysztof Kozlowski
2022-05-10 13:56   ` Krzysztof Kozlowski
2022-05-10 15:17   ` Robert Marko
2022-05-10 15:17     ` Robert Marko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtfrrt2h.fsf@BL-laptop \
    --to=gregory.clement@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marek.behun@nic.cz \
    --cc=pali@kernel.org \
    --cc=robert.marko@sartura.hr \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.