mbox series

[v2,0/3] Enable serial NOR flash on RZ/G2UL SMARC EVK

Message ID 20240703145851.204306-1-biju.das.jz@bp.renesas.com (mailing list archive)
Headers show
Series Enable serial NOR flash on RZ/G2UL SMARC EVK | expand

Message

Biju Das July 3, 2024, 2:58 p.m. UTC
This patch series aims to enable serial NOR flash on RZ/G2UL SMARC EVK.

The RZ/{G2L,G2LC,V2L} SMARC EVK uses Micron MT25QU412A flash and RZ/G2UL
SMARC EVK uses Renesas AT25QL128A flash. With current pin setting for
IOVF pin, 4-bit flash write fails for AT25QL128A flash. Use Hi-Z state
as the default for IOVF pins, so that spi controller driver in linux will
be independent of flash type.

To support this, during board production, the bit 4 of the NV config
register must be cleared by the bootloader for Micron flash.

Output from u-boot after clearing bit4 of NVCR register.
=> renesas_micron_flash_nvcr
SF: Detected mt25qu512a with page size 256 Bytes, erase size 64 KiB, total 64 MiB

Update partition table for spi-nor flash, so that we can flash bootloaders
in Linux by executing the below commands:
flash_erase /dev/mtd0  0 0
flash_erase /dev/mtd1  0 0
mtd_debug write /dev/mtd0 0 ${BL2_FILE_SIZE} ${BL2_IMAGE}
mtd_debug write /dev/mtd1 512 ${FIP_FILE_SIZE} ${FIP_IMAGE}

RFC->v1:
 * Dropped patches related to set_iofv() callback
 * Used Hi-Z state as the default for IOVF pin state.
 * Enabled Serial NOR flash on RZ/G2UL SMARC EVK
 * Updated partition table on RZ/{G2L,G2LC,V2L} SMARC EVK in order to
   flash bootloader images from Linux.
 
RFC: https://lore.kernel.org/linux-renesas-soc/e8ed909b39b5a7de46a07d2b57c0393a@walle.cc/T/#t

Biju Das (3):
  memory: renesas-rpc-if: Use Hi-Z state as the default for IOVF pin
  arm64: dts: renesas: rzg2ul-smarc-som: Enable serial NOR flash
  arm64: dts: renesas: rz{g2l,g2lc}-smarc-som: Update partition table
    for spi-nor flash

 .../boot/dts/renesas/rzg2l-smarc-som.dtsi     | 15 ++++--
 .../boot/dts/renesas/rzg2lc-smarc-som.dtsi    | 15 ++++--
 .../boot/dts/renesas/rzg2ul-smarc-som.dtsi    | 48 +++++++++++++++++++
 drivers/memory/renesas-rpc-if.c               |  2 +-
 4 files changed, 71 insertions(+), 9 deletions(-)