diff --git a/arch/arm/boards/datamodul-edm-qmx6/board.c b/arch/arm/boards/datamodul-edm-qmx6/board.c index b0b4ae9..fd02d7a 100644 --- a/arch/arm/boards/datamodul-edm-qmx6/board.c +++ b/arch/arm/boards/datamodul-edm-qmx6/board.c @@ -121,7 +121,14 @@ switch (bootsource_get()) { case BOOTSOURCE_MMC: - of_device_enable_path("/chosen/environment-emmc"); + switch (bootsource_get_instance()) { + case 2: + of_device_enable_path("/chosen/environment-sd"); + break; + case 3: + of_device_enable_path("/chosen/environment-emmc"); + break; + } break; default: case BOOTSOURCE_SPI: diff --git a/arch/arm/dts/imx6q-dmo-edmqmx6.dts b/arch/arm/dts/imx6q-dmo-edmqmx6.dts index 9fe1284..4cd1c55 100644 --- a/arch/arm/dts/imx6q-dmo-edmqmx6.dts +++ b/arch/arm/dts/imx6q-dmo-edmqmx6.dts @@ -20,6 +20,12 @@ chosen { linux,stdout-path = "/soc/aips-bus@02100000/serial@021e8000"; + environment-sd { + compatible = "barebox,environment"; + device-path = &usdhc3, "partname:barebox-environment"; + status = "disabled"; + }; + environment-emmc { compatible = "barebox,environment"; device-path = &usdhc4, "partname:barebox-environment"; @@ -386,6 +392,18 @@ pinctrl-0 = <&pinctrl_usdhc3>; vmmc-supply = <®_3p3v>; status = "okay"; + + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "barebox"; + reg = <0x0 0x80000>; + }; + partition@1 { + label = "barebox-environment"; + reg = <0x80000 0x80000>; + }; }; &usdhc4 { @@ -395,11 +413,16 @@ non-removable; bus-width = <8>; status = "okay"; + #address-cells = <1>; #size-cells = <1>; partition@0 { - label = "barebox-environment"; + label = "barebox"; reg = <0x0 0x80000>; }; + partition@1 { + label = "barebox-environment"; + reg = <0x80000 0x80000>; + }; };