[PATCH v7 00/14] mtd: spi-nor: Add support for Cypress s25hl-t/s25hs-t

2021-04-26 Thread tkuw584924
From: Takahiro Kuwano The S25HL-T/S25HS-T family is the Cypress Semper Flash with Quad SPI. The summary datasheets can be found in the following links. https://www.cypress.com/file/424146/download (256Mb/512Mb/1Gb, single die) https://www.cypress.com/file/499246/download (2Gb/4Gb, dual/quad

[PATCH v6 14/14] mtd: spi-nor-tiny: Add fixups for Cypress s25hl-t/s25hs-t

2021-04-06 Thread tkuw584924
From: Takahiro Kuwano Fixes mode clocks for SPINOR_OP_READ_FAST_4B in tiny. Signed-off-by: Takahiro Kuwano --- Changes in v6: - Remove spansion_quad_enable_volatile() per comment in

[PATCH v6 13/14] mtd: spi-nor-core: Add fixups for Cypress s25hl-t/s25hs-t

2021-04-06 Thread tkuw584924
From: Takahiro Kuwano The nor->ready() and spansion_sr_ready() introduced earlier in this series are used for multi-die package parts. The nor->quad_enable() sets the volatile QE bit on each die. The nor->erase() is hooked if the device is not configured to uniform sectors, assuming it has 32

[PATCH v6 12/14] mtd: spi-nor-core: Add Cypress manufacturer ID in set_4byte

2021-04-06 Thread tkuw584924
From: Takahiro Kuwano Cypress chips support SPINOR_OP_EN4B(B7h) to enable 4-byte addressing mode. Cypress chips support B8h to disable 4-byte addressing mode instead of SPINOR_OP_EX4B(E9h). This patch defines new opcode and updates set_4byte() to support enable/disable 4-byte addressing mode

[PATCH v6 11/14] mtd: spi-nor-core: Read status by Read Any Register

2021-04-06 Thread tkuw584924
From: Takahiro Kuwano The spansion_sr_ready() reads status register 1 by Read Any Register commnad. This function is called from Flash specific hook with die address and dummy cycles to support multi-die package parts from Spansion/Cypress. Signed-off-by: Takahiro Kuwano Reviewed-by: Pratyush

[PATCH v6 10/14] mtd: spi-nor-core: Add the ->ready() hook

2021-04-06 Thread tkuw584924
From: Takahiro Kuwano For dual/quad die package devices from Spansion/Cypress, the device's status needs to be checked by reading status registers in all dies, by using Read Any Register command. To support this, a Flash specific hook that can overwrite the legacy status check is needed.

[PATCH v6 09/14] mtd: spi-nor-core: Add support for volatile QE bit

2021-04-06 Thread tkuw584924
From: Takahiro Kuwano Some of Spansion/Cypress chips support volatile version of configuration registers and it is recommended to update volatile registers in the field application due to a risk of the non-volatile registers corruption by power interrupt. This patch adds a function to set Quad

[PATCH v6 08/14] mtd: spi-nor-core: Add support for Read/Write Any Register

2021-04-06 Thread tkuw584924
From: Takahiro Kuwano Some of Spansion/Cypress chips support Read/Write Any Register commands. These commands are mainly used to write volatile registers and access to the registers in second and subsequent die for multi-die package parts. The Read Any Register instruction (65h) is followed by

[PATCH v6 05/14] mtd: spi-nor-core: Add non-uniform erase for Spansion/Cypress

2021-04-06 Thread tkuw584924
From: Takahiro Kuwano Some of Spansion/Cypress chips have overlaid 4KB sectors at top and/or bottom, depending on the device configuration, while U-Boot supports uniform sector layout only. The spansion_erase_non_uniform() erases overlaid 4KB sectors, non-overlaid portion of normal sector, and

[PATCH v6 07/14] mtd: spi-nor-ids: Add Cypress s25hl-t/s25hs-t

2021-04-06 Thread tkuw584924
From: Takahiro Kuwano The S25HL-T/S25HS-T family is the Cypress Semper Flash with Quad SPI. https://www.cypress.com/file/424146/download (256Mb/512Mb/1Gb, single die) https://www.cypress.com/file/499246/download (2Gb/4Gb, dual/quad die) The full version can be found in the following links

[PATCH v6 03/14] mtd: spi-nor-core: Introduce flash-specific fixup hooks

2021-04-06 Thread tkuw584924
From: Pratyush Yadav Sometimes the information in a flash's SFDP tables is wrong. Sometimes some information just can't be expressed in the SFDP table. So, introduce the fixup hooks to allow tailoring settings for a specific flash. Three hooks are added: default_init, post_sfdp, and post_bfpt.

[PATCH v6 06/14] mtd: spi-nor: Add Cypress manufacturer ID

2021-04-06 Thread tkuw584924
From: Takahiro Kuwano This patch adds Cypress manufacturer ID (34h) definition. Signed-off-by: Takahiro Kuwano Reviewed-by: Pratyush Yadav --- include/linux/mtd/spi-nor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index

[PATCH v6 04/14] mtd: spi-nor-core: allow truncated erases

2021-04-06 Thread tkuw584924
From: Pratyush Yadav On devices with non-uniform sector sizes like Spansion S25 or S28 family of flashes the sector under erase does not necessarily have to be mtd->erasesize bytes long. For example, on S28 flashes the first 128 KiB region is composed of 32 4 KiB sectors, then a 128 KiB sector,

[PATCH v6 02/14] mtd: spi-nor-core: Move SFDP related declarations to top

2021-04-06 Thread tkuw584924
From: Pratyush Yadav These structures will be used in a later commit inside another structure definition. Also take the declarations out of the ifdef since they won't affect the final binary anyway and will be used in a later commit. Signed-off-by: Pratyush Yadav --- Taken from Pratyush's

[PATCH v6 01/14] mtd: spi-nor-core: Add a ->setup() hook

2021-04-06 Thread tkuw584924
From: Pratyush Yadav nor->setup() can be used by flashes to configure settings in case they have any peculiarities that can't be easily expressed by the generic spi-nor framework. This includes things like different opcodes, dummy cycles, page size, uniform/non-uniform sector sizes, etc. Move

[PATCH v6 00/14] mtd: spi-nor: Add support for Cypress s25hl-t/s25hs-t

2021-04-06 Thread tkuw584924
From: Takahiro Kuwano The S25HL-T/S25HS-T family is the Cypress Semper Flash with Quad SPI. The summary datasheets can be found in the following links. https://www.cypress.com/file/424146/download (256Mb/512Mb/1Gb, single die) https://www.cypress.com/file/499246/download (2Gb/4Gb, dual/quad

[PATCH v5 10/10] mtd: spi-nor-tiny: Add fixups for Cypress s25hl-t/s25hs-t

2021-02-18 Thread tkuw584924
From: Takahiro Kuwano Fixes mode clocks for SPINOR_OP_READ_FAST_4B and volatile QE bit in tiny. The volatile QE bit function, spansion_quad_enable_volatile() supports dual/quad die package parts, by taking 'die_size' parameter that is used to iterate register update for all dies in the device.

[PATCH v5 09/10] mtd: spi-nor-core: Add fixups for Cypress s25hl-t/s25hs-t

2021-02-18 Thread tkuw584924
From: Takahiro Kuwano This patch adds Flash specific fixups and hooks for Cypress S25HL-T/S25HS-T family, based on the features introduced in [0][1][2]. The nor->ready() and spansion_sr_ready() introduced in #5 and #6 in this series are used for multi-die package parts. The nor->quad_enable()

[PATCH v5 08/10] mtd: spi-nor-core: Add Cypress manufacturer ID in set_4byte

2021-02-18 Thread tkuw584924
From: Takahiro Kuwano Cypress chips support SPINOR_OP_EN4B(B7h)/SPINOR_OP_EX4B(E9h) to enable/disable 4-byte addressing mode. Signed-off-by: Takahiro Kuwano --- drivers/mtd/spi/spi-nor-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/spi/spi-nor-core.c

[PATCH v5 06/10] mtd: spi-nor-core: Read status by Read Any Register

2021-02-18 Thread tkuw584924
From: Takahiro Kuwano The spansion_sr_ready() reads status register 1 by Read Any Register commnad. This function is called from Flash specific hook with die address and dummy cycles to support multi-die package parts from Spansion/Cypress. Signed-off-by: Takahiro Kuwano --- Changes in v5: -

[PATCH v5 07/10] mtd: spi-nor-core: Add non-uniform erase for Spansion/Cypress

2021-02-18 Thread tkuw584924
From: Takahiro Kuwano Some of Spansion/Cypress chips have overlaid 4KB sectors at top and/or bottom, depending on the device configuration, while U-Boot supports uniform sector layout only. The spansion_erase_non_uniform() erases overlaid 4KB sectors, non-overlaid portion of normal sector, and

[PATCH v5 05/10] mtd: spi-nor-core: Add the ->ready() hook

2021-02-18 Thread tkuw584924
From: Takahiro Kuwano For dual/quad die package devices from Spansion/Cypress, the device's status needs to be checked by reading status registers in all dies, by using Read Any Register command. To support this, a Flash specific hook that can overwrite the legacy status check is needed. The

[PATCH v5 04/10] mtd: spi-nor-core: Add support for volatile QE bit

2021-02-18 Thread tkuw584924
From: Takahiro Kuwano Some of Spansion/Cypress chips support volatile version of configuration registers and it is recommended to update volatile registers in the field application due to a risk of the non-volatile registers corruption by power interrupt. This patch adds a function to set Quad

[PATCH v5 03/10] mtd: spi-nor-core: Add support for Read/Write Any Register

2021-02-18 Thread tkuw584924
From: Takahiro Kuwano Some of Spansion/Cypress chips support Read/Write Any Register commands. These commands are mainly used to write volatile registers and access to the registers in second and subsequent die for multi-die package parts. The Read Any Register instruction (65h) is followed by

[PATCH v5 02/10] mtd: spi-nor-ids: Add Cypress s25hl-t/s25hs-t

2021-02-18 Thread tkuw584924
From: Takahiro Kuwano The S25HL-T/S25HS-T family is the Cypress Semper Flash with Quad SPI. https://www.cypress.com/file/424146/download (256Mb/512Mb/1Gb, single die) https://www.cypress.com/file/499246/download (2Gb/4Gb, dual/quad die) The full version can be found in the following links

[PATCH v5 01/10] mtd: spi-nor: Add Cypress manufacturer ID

2021-02-18 Thread tkuw584924
From: Takahiro Kuwano This patch adds Cypress manufacturer ID (34h) definition. Signed-off-by: Takahiro Kuwano Reviewed-by: Pratyush Yadav --- include/linux/mtd/spi-nor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index

[PATCH v5 00/10] mtd: spi-nor: Add support for Cypress s25hl-t/s25hs-t

2021-02-18 Thread tkuw584924
From: Takahiro Kuwano The S25HL-T/S25HS-T family is the Cypress Semper Flash with Quad SPI. The summary datasheets can be found in the following links. https://www.cypress.com/file/424146/download (256Mb/512Mb/1Gb, single die) https://www.cypress.com/file/499246/download (2Gb/4Gb, dual/quad

[PATCH v4 9/9] mtd: spi-nor-tiny: Add fixups for Cypress s25hl-t/s25hs-t

2021-01-27 Thread tkuw584924
From: Takahiro Kuwano Fixes mode clocks for SPINOR_OP_READ_FAST_4B and volatile QE bit in tiny. The volatile QE bit function, spansion_quad_enable_volatile() supports dual/quad die package parts, by taking 'die_size' parameter that is used to iterate register update for all dies in the device.

[PATCH v4 8/9] mtd: spi-nor-core: Add fixups for Cypress s25hl-t/s25hs-t

2021-01-27 Thread tkuw584924
From: Takahiro Kuwano Add nor->setup() and fixup hooks to overwrite: - volatile QE bit - the ->ready() hook for dual/quad die package parts - overlaid erase - spi_nor_flash_parameter - mtd_info Signed-off-by: Takahiro Kuwano --- drivers/mtd/spi/spi-nor-core.c | 108

[PATCH v4 7/9] mtd: spi-nor-core: Add Cypress manufacturer ID in set_4byte

2021-01-27 Thread tkuw584924
From: Takahiro Kuwano Cypress chips support SPINOR_OP_EN4B(B7h)/SPINOR_OP_EX4B(E9h) to enable/disable 4-byte addressing mode. Signed-off-by: Takahiro Kuwano --- drivers/mtd/spi/spi-nor-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/spi/spi-nor-core.c

[PATCH v4 6/9] mtd: spi-nor-core: Add overlaid sector erase feature

2021-01-27 Thread tkuw584924
From: Takahiro Kuwano Some of Spansion/Cypress chips have overlaid 4KB sectors at top and/or bottom, depending on the device configuration, while U-Boot supports uniform sector layout only. This patch adds an erase hook that emulates uniform sector layout. Signed-off-by: Takahiro Kuwano ---

[PATCH v4 5/9] mtd: spi-nor-core: Add the ->ready() hook

2021-01-27 Thread tkuw584924
From: Takahiro Kuwano For dual/quad die package devices from Spansion/Cypress, the device's status needs to be checked by reading status registers in all dies, by using Read Any Register command. To support this, a Flash specific hook that can overwrite the legacy status check is needed. The

[PATCH v4 4/9] mtd: spi-nor-core: Add support for volatile QE bit

2021-01-27 Thread tkuw584924
From: Takahiro Kuwano Some of Spansion/Cypress chips support volatile version of configuration registers and it is recommended to update volatile registers in the field application due to a risk of the non-volatile registers corruption by power interrupt. This patch adds a function to set Quad

[PATCH v4 3/9] mtd: spi-nor-core: Add support for Read/Write Any Register

2021-01-27 Thread tkuw584924
From: Takahiro Kuwano Some of Spansion/Cypress chips support Read/Write Any Register commands. These commands are mainly used to write volatile registers and access to the registers in second and subsequent die for multi-die package parts. The Read Any Register instruction (65h) is followed by

[PATCH v4 2/9] mtd: spi-nor-ids: Add Cypress s25hl-t/s25hs-t

2021-01-27 Thread tkuw584924
From: Takahiro Kuwano The S25HL-T/S25HS-T family is the Cypress Semper Flash with Quad SPI. The datasheets can be found in the following links. https://www.cypress.com/file/424146/download (256Mb/512Mb/1Gb, single die) https://www.cypress.com/file/499246/download (2Gb/4Gb, dual/quad die)

[PATCH v4 1/9] mtd: spi-nor: Add Cypress manufacturer ID

2021-01-27 Thread tkuw584924
From: Takahiro Kuwano This patch adds Cypress manufacturer ID (34h) definition. Signed-off-by: Takahiro Kuwano --- include/linux/mtd/spi-nor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index 5842e9d6ee..89e7a4fdcd 100644 ---

[PATCH v4 0/9] mtd: spi-nor: Add support for Cypress s25hl-t/s25hs-t

2021-01-27 Thread tkuw584924
From: Takahiro Kuwano The S25HL-T/S25HS-T family is the Cypress Semper Flash with Quad SPI. The datasheets can be found in the following links. https://www.cypress.com/file/424146/download (256Mb/512Mb/1Gb, single die) https://www.cypress.com/file/499246/download (2Gb/4Gb, dual/quad die)

[PATCH v3 7/7] mtd: spi-nor-tiny: Add fixups for Cypress s25hl-t/s25hs-t

2020-11-04 Thread tkuw584924
From: Takahiro Kuwano Fixes mode clocks for SPINOR_OP_READ_FAST_4B and volatile QE bit in tiny. Signed-off-by: Takahiro Kuwano --- drivers/mtd/spi/spi-nor-tiny.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/mtd/spi/spi-nor-tiny.c b/drivers/mtd/spi/spi-nor-tiny.c

[PATCH v3 4/7] mtd: spi-nor-core: Add Cypress manufacturer ID in set_4byte

2020-11-04 Thread tkuw584924
From: Takahiro Kuwano Cypress chips support SPINOR_OP_EN4B(B7h)/SPINOR_OP_EX4B(E9h) to enable/disable 4-byte addressing mode. Signed-off-by: Takahiro Kuwano --- drivers/mtd/spi/spi-nor-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/spi/spi-nor-core.c

[PATCH v3 2/7] mtd: spi-nor-ids: Add Cypress s25hl-t/s25hs-t

2020-11-04 Thread tkuw584924
From: Takahiro Kuwano The S25HL-T/S25HS-T family is the Cypress Semper Flash with Quad SPI. The datasheet can be found in https://community.cypress.com/docs/DOC-15165 Signed-off-by: Takahiro Kuwano --- drivers/mtd/spi/spi-nor-ids.c | 24 1 file changed, 24

[PATCH v3 3/7] mtd: spi-nor: Add support for volatile QE bit

2020-11-04 Thread tkuw584924
From: Takahiro Kuwano Some of Spansion/Cypress chips support volatile version of configuration registers and it is recommended to update volatile registers in the field application due to a risk of the non-volatile registers corruption by power interrupt. This patch adds a function to set Quad

[PATCH v3 0/7] mtd: spi-nor: Add support for Cypress s25hl-t/s25hs-t

2020-11-04 Thread tkuw584924
From: Takahiro Kuwano The S25HL-T/S25HS-T family is the Cypress Semper Flash with Quad SPI. The datasheet can be found in https://community.cypress.com/docs/DOC-15165 Tested on Xilinx Zynq-7000 FPGA board. Takahiro Kuwano (7): mtd: spi-nor: Add Cypress manufacturer ID mtd: spi-nor-ids: Add

[PATCH v3 6/7] mtd: spi-nor-core: Add fixups for Cypress s25hl-t/s25hs-t

2020-11-04 Thread tkuw584924
From: Takahiro Kuwano Add nor->setup() and fixup hooks for volatile QE bit, overlaid erase, spi_nor_flash_parameter and mtd_info. Signed-off-by: Takahiro Kuwano --- Depends on the following patches: https://patchwork.ozlabs.org/project/uboot/patch/20200904153500.3569-7-p.ya...@ti.com/

[PATCH v3 5/7] mtd: spi-nor-core: Add overlaid sector erase feature

2020-11-04 Thread tkuw584924
From: Takahiro Kuwano Some of Spansion/Cypress chips have overlaid 4KB sectors at top and/or bottom, depending on the device configuration, while U-Boot supports uniform sector layout only. This patch adds an erase hook that emulates uniform sector layout. Signed-off-by: Takahiro Kuwano ---

[PATCH v3 1/7] mtd: spi-nor: Add Cypress manufacturer ID

2020-11-04 Thread tkuw584924
From: Takahiro Kuwano This patch adds Cypress manufacturer ID (34h) definition. Signed-off-by: Takahiro Kuwano --- include/linux/mtd/spi-nor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index 5842e9d6ee..89e7a4fdcd 100644 ---

[PATCH v2] mtd: spi-nor: Add support for Cypress s25hl-t/s25hs-t

2020-10-01 Thread tkuw584924
From: Takahiro Kuwano The S25HL-T/S25HS-T family is the Cypress Semper Flash with Quad SPI. The datasheet can be found in https://community.cypress.com/docs/DOC-15165 This device family can be configured to non-uniform sector layout, while U-Boot does not support it. To handle this, an erase

[PATCH] mtd: spi-nor: Add support for Cypress s25hl-t/s25hs-t

2020-09-24 Thread tkuw584924
From: Takahiro Kuwano The S25HL-T/S25HS-T family is the Cypress Semper Flash with Quad SPI. The datasheet can be found in https://community.cypress.com/docs/DOC-15165 This device family can be configured to non-uniform sector layout, while U-Boot does not support it. To handle this, an erase

<    1   2