[PATCH] ARM: dts: state-example: fix use with Phytec phyFLEX i.MX6

Sascha Hauer sha at pengutronix.de
Thu Jun 8 23:44:45 PDT 2023


On Thu, Jun 08, 2023 at 08:58:05AM +0200, Ahmad Fatoum wrote:
> The state-example.dtsi was added 5 years ago and while the binding is
> still applicable, the imx6q-phytec-pbab01.dts device tree that it
> extends when USE_STATE_EXAMPLE is defined has changed in a way that
> breaks use of the state nodes.
> 
> Do the necessary to restore the examples to working order:
> 
>   - Reference the NOR partition inside of the fixed-partition container
>     it's inside now
> 
>   - Resize the NAND, so the last 1M of the barebox 16M partition can
>     be used for state. Also use the fixed-partition container that
>     has been added in the meantime.
> 
>   - Use phandles or label-relative paths, so we get build errors
>     if the path changes again in future
> 
> There's still a WARNING: state_nor: Failed to initialize desired amount
> of buckets, only 2 of 3 succeeded, but that can be fixed separately.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
> I don't know how to fix the warning. Setting backend-stridesize = <64>
> didn't help. I've CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
> ---
>  arch/arm/dts/state-example.dtsi | 41 +++++++++++++++++----------------
>  1 file changed, 21 insertions(+), 20 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/dts/state-example.dtsi b/arch/arm/dts/state-example.dtsi
> index 490ee7840b24..4572168336ae 100644
> --- a/arch/arm/dts/state-example.dtsi
> +++ b/arch/arm/dts/state-example.dtsi
> @@ -89,28 +89,29 @@ state_eeprom: state_eeprom {
>  
>  };
>  
> -&ecspi3 {
> -	flash at 0 {
> -		backend_state_nor: partition at 120000 {
> -		};
> +backend_state_nor: &{ecspi3/flash at 0/partitions/partition at 120000} {
> +};
> +
> +/* Reduce barebox partition size from 16M to 15M */
> +&{gpmi/partitions/partition at 0} {
> +	reg = <0x0 0xf00000>;
> +};
> +
> +&{gpmi/partitions} {
> +	backend_state_nand: partition at f00000 {
> +		label = "barebox-state";
> +		reg = <0xf00000 0x100000>;
>  	};
>  };
>  
> -&gpmi {
> -	backend_state_nand: partition at 500000 {
> -	};
> -};
> -
> -&i2c1 {
> -	eeprom at 50 {
> -		partitions {
> -			compatible = "fixed-partitions";
> -			#size-cells = <1>;
> -			#address-cells = <1>;
> -			backend_state_eeprom: state at 400 {
> -				reg = <0x400 0x400>;
> -				label = "state-eeprom";
> -			};
> +&som_eeprom { /* On I2C1 */
> +	partitions {
> +		compatible = "fixed-partitions";
> +		#size-cells = <1>;
> +		#address-cells = <1>;
> +		backend_state_eeprom: state at 400 {
> +			reg = <0x400 0x400>;
> +			label = "state-eeprom";
>  		};
>  	};
>  };
> @@ -125,4 +126,4 @@ backend_state_usdhc: state at 0x80000 {
>  			label = "state-sd";
>  		};
>  	};
> -};
> \ No newline at end of file
> +};
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list