The xSPI IP found on RZ/G3E SoC similar to RPC-IF interface, but it can support writes on memory-mapped area. Even though the registers are different, the rpcif driver code can be reused for xSPI by adding wrapper function to it. This patch series tested on RZ/G2L and RZ/G3E by overwriting boot partitions. v3->v4: * Added a definition for the spi core clock in the R9A09G047 CPG bindings header file. * Updated the example with spi core clock * Retained Rb tag from Rob as these changes are trivial. * Fixed the duplicate most outer set of parentheses in patch#2. * Updated commit description for patch{#4,#7,#8}. * Renamed the functions *_helper()->*_impl(). * Replaced ssize_t->size_t as the return data type for rpcif_dirmap_read_impl(). * Renamed the local variable length->read and it's data type ssize_t->size_t. * Added comment for addr_nbytes in struct rpcif_priv. * Added struct rpcif_impl for holding the function pointers and data to handle the differences between xspi and rpc-if interface and added suffix _impl() for functions. * The enabling/disabling of spi/spix2 clocks at runtime leading to flash write failure. So, enable these clocks during probe() and disable it in remove(). * Collected tags. v2->v3: * Fixed RPCIF_DRENR_CDB macro error. v1->v2: * As rz-xspi is too generic, replaced file name rz-xspi->rzg3e-xspi and dropped generic compatible rz-xspi. * Dropped prefix spi from interrupt names. * Updated the example with above changes. * Retained Rb tag from Rob as these changes are trivial. * Fixed the build error reported by bot by dropping EXPORT_SYMBOL(xspi_dirmap_read) and restoring EXPORT_SYMBOL(rpcif_dirmap_read). * Replaced enum XSPI_RZ->XSPI_RZ_G3E. * Replaced compatible rz-xspi->r9a09g047-xspi and device data xspi_info_rz->xspi_info_r9a09g047. Biju Das (9): dt-bindings: memory: Document RZ/G3E support memory: renesas-rpc-if: Fix RPCIF_DRENR_CDB macro error memory: renesas-rpc-if: Move rpc-if reg definitions memory: renesas-rpc-if: Use devm_reset_control_array_get_exclusive() memory: renesas-rpc-if: Move rpcif_info definitions near to the user memory: renesas-rpc-if: Add regmap to struct rpcif_info memory: renesas-rpc-if: Add wrapper functions memory: renesas-rpc-if: Add RZ/G3E xSPI support spi: rpc-if: Add write support for memory-mapped area .../renesas,rzg3e-xspi.yaml | 135 ++++ drivers/memory/renesas-rpc-if-regs.h | 147 ++++ drivers/memory/renesas-rpc-if.c | 703 +++++++++++++----- drivers/memory/renesas-xspi-if-regs.h | 105 +++ drivers/spi/spi-rpc-if.c | 16 +- .../dt-bindings/clock/renesas,r9a09g047-cpg.h | 1 + include/memory/renesas-rpc-if.h | 4 + 7 files changed, 919 insertions(+), 192 deletions(-) create mode 100644 Documentation/devicetree/bindings/memory-controllers/renesas,rzg3e-xspi.yaml create mode 100644 drivers/memory/renesas-rpc-if-regs.h create mode 100644 drivers/memory/renesas-xspi-if-regs.h -- 2.43.0