PHYTEC
Page 29
The option
ensures that the command waits until the eMMC device has erased all blocks.
--secure
SPI Master
Ea
The i.MX 8M Plus controller has a FlexSPI and an ECSPI IP core included. The FlexSPI host controller supports two SPI channels with up to 4 devices.
ch channel supports Single/Dual/Quad/Octal mode data transfer (1/2/4/8 bidirectional data lines). The ECSPI controller supports 3 SPI interfaces with one
dedicated chip select for each interface. As chip selects should be realized with GPIOs, more than one device on each channel is possible.
SPI NOR flash
phyCORE-i.MX 8M Plus is equipped with a QSPI NOR Flash which connects to the i.MX 8M Plus's FlexSPI interface. The QSPI NOR Flash is suitable for
booting. However, this is not supported in the current hardware revision. From
userspace, the NOR Flash partitions are accessible via /dev/mtd<N>
Linux
devices where <N> is the MTD device number associated with the NOR flash partition to access. To find the correct MTD device number for a partition,
run on the target:
mtdinfo --all
It lists all MTD devices and the corresponding partition names. The
node is defined inside of the SPI master node in the module DTS. The SPI node
flash
contains all devices connected to this SPI bus which is in this case only the SPI NOR Flash.
Definition of the SPI master node in
:
imx8mp-phycore-som.dtsi
/* spi-nor */
&flexspi {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flexspi0>;
status = "okay";
flash0: mt25qu256aba@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
spi-max-frequency = <80000000>;
spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>;
status = "disabled";
};
};
[...]
&iomuxc {
pinctrl-names = "default";
[...]
pinctrl_flexspi0: flexspi0grp {
fsl,pins = <
MX8MP_IOMUXC_NAND_ALE__FLEXSPI_A_SCLK 0x1c2
MX8MP_IOMUXC_NAND_CE0_B__FLEXSPI_A_SS0_B 0x82
MX8MP_IOMUXC_NAND_DATA00__FLEXSPI_A_DATA00 0x82
MX8MP_IOMUXC_NAND_DATA01__FLEXSPI_A_DATA01 0x82
MX8MP_IOMUXC_NAND_DATA02__FLEXSPI_A_DATA02 0x82
MX8MP_IOMUXC_NAND_DATA03__FLEXSPI_A_DATA03 0x82
>;
};
[...]
};
Tip
also destroys all information on the device, but this command is bad for wear leveling and takes much longer!
dd if=/dev/zero of=/dev/mmcblk0