Hi Cédric,

> Subject: Re: [PATCH] hw/block/m25p80: Fix Winbond Fast Read dummy cycles
> 
> Hello Joel,
> 
> + Jamin, who spent time on aspeed_smc and m25p80 models.
> 

We currently do not have a dedicated owner for any specific model.
I’m willing to help analyze the issue once a bug report has been created.
At the moment, I am focusing on the following high-priority tasks:

1. Updating the functional tests to ASPEED SDK v11.01
2. Implementing 64-bit support for the platform USB EHCI model to enable 
AST2700 support.

Thanks,
Jamin 

> 
> On 2/20/26 11:09, Joel Bueno wrote:
> > Hi Cédric, thanks for the detailed response and your time; I should've run 
> > the
> tests prior to the submission; apologies for the oversight!
> >
> > I've been eyeing the aspeed_smc.c file and it seems to "inflate" the dummy
> clock phases:
> >
> > static int aspeed_smc_flash_dummies(const AspeedSMCFlash *fl) {
> >      const AspeedSMCState *s = fl->controller;
> >      uint32_t r_ctrl0 = s->regs[s->r_ctrl0 + fl->cs];
> >      uint32_t dummy_high = (r_ctrl0 >> CTRL_DUMMY_HIGH_SHIFT) &
> 0x1;
> >      uint32_t dummy_low = (r_ctrl0 >> CTRL_DUMMY_LOW_SHIFT) &
> 0x3;
> >      uint32_t dummies = ((dummy_high << 2) | dummy_low) * 8;
> >
> >      if (r_ctrl0 & CTRL_IO_DUAL_ADDR_DATA) {
> >          dummies /= 2;
> >      }
> >
> >      return dummies;
> > }
> >
> > As you can see, it basically multiplies the number of "dummies" (Which is
> gathered by obtaining the full value of the register) by 8.
> > That is, in turn, used on "aspeed_smc_flash_setup" (Only
> if aspeed_smc_flash_mode(fl) == CTRL_FREADMODE) to decide how much
> dummy data to push with "ssi_transfer()".
> >
> > It's a bit confusing for me to compare what the actual Winbond datasheet
> we have (Also cross-referenced similar product's datasheets just in case)
> expects in terms of needed_bytes (Which, as per datasheet, would be just 1,
> matching what, for instance, SST ones have; for reference).
> >
> > The Designware SPI controller QEMU device we have sends a single byte (8
> cycles in SPI) to the flash (Again, matching both Designware's and Winbond's
> datasheet).
> >
> > Would it be interesting to have a second set of patch series trying to 
> > address
> the inconsistencies (Whilst addressing aspeed too) and making the Winbond
> model with what SST currently does in terms of "naming" convention?
> >
> > Thanks again for everyone's time.
> Could you please open an issue on gitlab with all the information you 
> gathered ?
> Please cc @legoater and @jamin-aspeed.
> 
> See https://gitlab.com/qemu-project/qemu/-/issues/3290 for an example.
> 
> Thanks for the time you have dedicated to this problem.
> 
> C.
> 
> 
> 
> >
> >
> > El vie, 20 feb 2026 a las 9:56, Cédric Le Goater (<[email protected]
> <mailto:[email protected]>>) escribió:
> >
> >     Hello,
> >
> >     +Marcin,
> >
> >     On 2/19/26 21:01, Peter Maydell wrote:
> >      > On Wed, 7 Jan 2026 at 11:30, Joel Bueno
> <[email protected] <mailto:[email protected]>>
> wrote:
> >      >>
> >      >> Is there any feedback on this patch series?
> >      >
> >      > Which board model(s) does this affect? You might have
> >      > some luck cc'ing their maintainers.
> >     AFAIR (10y ago ...), the dummy cycles in m25p80 are modeled as
> >     extra "dummy bytes" consumed before data phase begins. So,
> >     in QEMU : 8 cycles = 1 dummy byte.
> >
> >     There could be bugs in this area, but this case was supposedly
> >     fixed by commit 3830c7a460b8 ("m25p80: Fix WINBOND fast read
> >     command handling") and given the number of QEMU boards booting
> >     from a Winbond flash device :
> >
> >         tests/functional/aarch64/test_aspeed_ast2700a1.py:        se
> lf.vm.set_machine('ast2700a1-evb,fmc-model=w25q512jv')
> >         tests/functional/aarch64/test_aspeed_ast2700a2.py:        se
> lf.vm.set_machine('ast2700a2-evb,fmc-model=w25q512jv')
> >         hw/arm/aspeed_ast10x0_evb.c:    amc->fmc_model =
> "w25q80bl";
> >         hw/arm/aspeed_ast10x0_evb.c:    amc->spi_model =
> "w25q256";
> >         hw/arm/aspeed_ast10x0_evb.c:    amc->fmc_model =
> "w25q80bl";
> >         hw/arm/aspeed_ast10x0_evb.c:    amc->spi_model =
> "w25q02jvm";
> >         hw/arm/aspeed_ast2600_bletchley.c:    amc->fmc_model =
> "w25q01jvq";
> >         hw/arm/aspeed_ast2600_catalina.c:    amc->fmc_model =
> "w25q01jvq";
> >         hw/arm/aspeed_ast2600_evb.c:    amc->fmc_model =
> "w25q512jv";
> >         hw/arm/aspeed_ast2600_evb.c:    amc->spi_model =
> "w25q512jv";
> >         hw/arm/aspeed_ast27x0_evb.c:    amc->fmc_model =
> "w25q01jvq";
> >         hw/arm/aspeed_ast27x0_evb.c:    amc->spi_model =
> "w25q512jv";
> >         hw/arm/aspeed_ast27x0_evb.c:    amc->fmc_model =
> "w25q01jvq";
> >         hw/arm/aspeed_ast27x0_evb.c:    amc->spi_model =
> "w25q512jv";
> >         hw/arm/aspeed_ast27x0-fc.c:#define AST2700FC_FMC_MODEL
> "w25q01jvq"
> >         hw/arm/aspeed_ast27x0-fc.c:#define AST2700FC_SPI_MODEL
> "w25q512jv"
> >         hw/arm/npcm7xx_boards.c:    npcm7xx_connect_flash(&soc->f
> iu[0], 0, "w25q256", drive_get(IF_MTD, 0, 0));
> >         hw/arm/npcm8xx_boards.c:
> > npcm8xx_connect_flash(&soc->fiu[0], 0, "w25q256", drive_get(IF_MTD, 0,
> > 0));
> >
> >     I doubt this change is correct or the issue is more complex
> >     than it seems. Please try to run the functional tests, all
> >     ast2600 machines seem to fail to boot with this patch.
> >
> >
> >     Thanks,
> >
> >     C.
> >
> >
> >     For the records, fast read commands are used in the tests. See below.
> >
> >         [0x406c0641] : The second byte '6c' is the SPI operation.
> >
> >
> >
> aarch64/test_aspeed_ast2600_sdk.AST2600Machine.test_arm_ast2600_evb_s
> dk/console.log:2026-02-11 13:22:45,545: [    0.510414] spi-aspeed-smc
> 1e620000.spi: CE0 read buswidth: 4 [0x406c0641]
> >
> aarch64/test_aspeed_ast2600_sdk.AST2600Machine.test_arm_ast2600_evb_s
> dk/console.log:2026-02-11 13:22:45,713: [    0.650635] spi-aspeed-smc
> 1e630000.spi: CE0 read buswidth: 4 [0x406c0641]
> >
> aarch64/test_aspeed_ast2700a1.AST2x00MachineSDK.test_aarch64_ast2700a
> 1_evb_sdk_v11_00/console.log:2026-02-13 11:49:30,173: [    1.517517]
> spi-aspeed-smc 14000000.spi: CE0 read buswidth: 4 [0x406c0641]
> >
> aarch64/test_aspeed_ast2700a1.AST2x00MachineSDK.test_aarch64_ast2700a
> 1_evb_sdk_v11_00/console.log:2026-02-13 11:49:30,320: [    1.608993]
> spi-aspeed-smc 14000000.spi: CE1 read buswidth: 4 [0x406c0641]
> >
> aarch64/test_aspeed_ast2700a1.AST2x00MachineSDK.test_aarch64_ast2700a
> 1_evb_sdk_v11_00/console.log:2026-02-13 11:49:30,346: [    1.625580]
> spi-aspeed-smc 14010000.spi: CE0 read buswidth: 2 [0x203c0641]
> >
> aarch64/test_aspeed_ast2700a2.AST2x00MachineSDK.test_aarch64_ast2700a
> 2_evb_ioexp_v11_00/console.log:2026-02-13 15:50:03,329: [    4.852499]
> spi-aspeed-smc 14000000.spi: CE0 read buswidth: 4 [0x406c0041]
> >
> aarch64/test_aspeed_ast2700a2.AST2x00MachineSDK.test_aarch64_ast2700a
> 2_evb_ioexp_v11_00/console.log:2026-02-13 15:50:03,850: [    5.178221]
> spi-aspeed-smc 14010000.spi: CE0 read buswidth: 1 [0x000c0041]
> >
> aarch64/test_aspeed_ast2700a2.AST2x00MachineSDK.test_aarch64_ast2700a
> 2_evb_sdk_v11_00/console.log:2026-02-13 11:49:31,247: [    1.275618]
> spi-aspeed-smc 14000000.spi: CE0 read buswidth: 4 [0x406c0641]
> >
> aarch64/test_aspeed_ast2700a2.AST2x00MachineSDK.test_aarch64_ast2700a
> 2_evb_sdk_v11_00/console.log:2026-02-13 11:49:31,369: [    1.352064]
> spi-aspeed-smc 14000000.spi: CE1 read buswidth: 4 [0x406c0641]
> >
> aarch64/test_aspeed_ast2700a2.AST2x00MachineSDK.test_aarch64_ast2700a
> 2_evb_sdk_v11_00/console.log:2026-02-13 11:49:31,385: [    1.361942]
> spi-aspeed-smc 14010000.spi: CE0 read buswidth: 2 [0x203c0641]
> >
> aarch64/test_aspeed_ast2700.AST2x00MachineSDK.test_aarch64_ast2700_ev
> b_ioexp_v11_00/console.log:2026-02-10 16:47:50,922: [    3.123120]
> spi-aspeed-smc 14000000.spi: CE0 read buswidth: 4 [0x406c0041]
> >
> aarch64/test_aspeed_ast2700.AST2x00MachineSDK.test_aarch64_ast2700_ev
> b_ioexp_v11_00/console.log:2026-02-10 16:47:51,224: [    3.312014]
> spi-aspeed-smc 14010000.spi: CE0 read buswidth: 1 [0x000c0041]
> >
> aarch64/test_aspeed_ast2700.AST2x00MachineSDK.test_aarch64_ast2700_ev
> b_sdk_v11_00/console.log:2026-02-10 16:49:00,279: [    1.264763]
> spi-aspeed-smc 14000000.spi: CE0 read buswidth: 4 [0x406c0641]
> >
> aarch64/test_aspeed_ast2700.AST2x00MachineSDK.test_aarch64_ast2700_ev
> b_sdk_v11_00/console.log:2026-02-10 16:49:00,408: [    1.345588]
> spi-aspeed-smc 14000000.spi: CE1 read buswidth: 4 [0x406c0641]
> >
> aarch64/test_aspeed_ast2700.AST2x00MachineSDK.test_aarch64_ast2700_ev
> b_sdk_v11_00/console.log:2026-02-10 16:49:00,424: [    1.355559]
> spi-aspeed-smc 14010000.spi: CE0 read buswidth: 2 [0x203c0641]
> >
> aarch64/test_aspeed_ast2700fc.AST2x00MachineSDK.test_aarch64_ast2700fc
> _sdk_vbootrom_v11_00/console.log:2026-02-13 11:49:40,859: [    1.568162]
> spi-aspeed-smc 14000000.spi: CE0 read buswidth: 4 [0x406c0641]
> >
> aarch64/test_aspeed_ast2700fc.AST2x00MachineSDK.test_aarch64_ast2700fc
> _sdk_vbootrom_v11_00/console.log:2026-02-13 11:49:41,032: [    1.676511]
> spi-aspeed-smc 14000000.spi: CE1 read buswidth: 4 [0x406c0641]
> >
> aarch64/test_aspeed_ast2700fc.AST2x00MachineSDK.test_aarch64_ast2700fc
> _sdk_vbootrom_v11_00/console.log:2026-02-13 11:49:41,069: [    1.699459]
> spi-aspeed-smc 14010000.spi: CE0 read buswidth: 2 [0x203c0641]
> >
> arm/test_aspeed_ast2500_buildroot.AST2500Machine.test_arm_ast2500_evb
> _buildroot/console.log:2026-02-13 15:50:25,370: [    1.333537]
> spi-aspeed-smc 1e620000.spi: CE0 read buswidth:2 [0x203b0641]
> >
> arm/test_aspeed_ast2500_buildroot.AST2500Machine.test_arm_ast2500_evb
> _buildroot/console.log:2026-02-13 15:50:25,659: [    1.625199]
> spi-aspeed-smc 1e630000.spi: CE0 read buswidth:2 [0x203c0041]
> >
> arm/test_aspeed_ast2500_sdk.AST2500Machine.test_arm_ast2500_evb_sdk/c
> onsole.log:2026-02-13 15:50:22,593: [    1.287417] spi-aspeed-smc
> 1e620000.spi: CE0 read buswidth: 2 [0x203b0641]
> >
> arm/test_aspeed_ast2500_sdk.AST2500Machine.test_arm_ast2500_evb_sdk/c
> onsole.log:2026-02-13 15:50:23,319: [    2.013603] spi-aspeed-smc
> 1e630000.spi: CE0 read buswidth: 2 [0x203c0741]
> >
> arm/test_aspeed_ast2600_buildroot.AST2600Machine.test_arm_ast2600_evb
> _buildroot/console.log:2026-02-13 15:50:35,593: [    2.848343]
> spi-aspeed-smc 1e620000.spi: CE0 read buswidth:4 [0x406c0641]
> >
> arm/test_aspeed_ast2600_buildroot.AST2600Machine.test_arm_ast2600_evb
> _buildroot/console.log:2026-02-13 15:50:35,876: [    3.086504]
> spi-aspeed-smc 1e630000.spi: CE0 read buswidth:4 [0x406c0041]
> >
> arm/test_aspeed_ast2600_buildroot_tpm.AST2600Machine.test_arm_ast2600
> _evb_buildroot_tpm/console.log:2026-02-13 15:51:11,310: [    1.769397]
> spi-aspeed-smc 1e620000.spi: CE0 read buswidth:4 [0x406c0641]
> >
> arm/test_aspeed_ast2600_buildroot_tpm.AST2600Machine.test_arm_ast2600
> _evb_buildroot_tpm/console.log:2026-02-13 15:51:11,400: [    1.844341]
> spi-aspeed-smc 1e630000.spi: CE0 read buswidth:4 [0x406c0041]
> >
> arm/test_aspeed_ast2600_sdk.AST2600Machine.test_arm_ast2600_evb_sdk/c
> onsole.log:2026-02-13 15:50:31,578: [    4.177582] spi-aspeed-smc
> 1e620000.spi: CE0 read buswidth: 4 [0x406c0641]
> >
> arm/test_aspeed_ast2600_sdk.AST2600Machine.test_arm_ast2600_evb_sdk/c
> onsole.log:2026-02-13 15:50:32,052: [    4.571849] spi-aspeed-smc
> 1e630000.spi: CE0 read buswidth: 4 [0x406c0641]
> >
> arm/test_aspeed_ast2600_sdk_otp.AST2600Machine.test_arm_ast2600_otp_b
> lockdev_device/console.log:2026-02-13 15:50:27,134: [    2.312565]
> spi-aspeed-smc 1e620000.spi: CE0 read buswidth: 4 [0x406c0641]
> >
> arm/test_aspeed_ast2600_sdk_otp.AST2600Machine.test_arm_ast2600_otp_b
> lockdev_device/console.log:2026-02-13 15:50:27,533: [    2.644716]
> spi-aspeed-smc 1e630000.spi: CE0 read buswidth: 4 [0x406c0641]
> >
> arm/test_aspeed_bletchley.BletchleyMachine.test_arm_ast2600_bletchley_op
> enbmc/console.log:2026-02-13 15:50:39,306: [    2.488488] spi-aspeed-smc
> 1e620000.spi: CE0 read buswidth:2 [0x203c0641]
> >
> arm/test_aspeed_bletchley.BletchleyMachine.test_arm_ast2600_bletchley_op
> enbmc/console.log:2026-02-13 15:50:46,183: [    8.220262] spi-aspeed-smc
> 1e620000.spi: CE1 read buswidth:2 [0x203c0041]
> >
> arm/test_aspeed_catalina.CatalinaMachine.test_arm_ast2600_catalina_open
> bmc/console.log:2026-02-13 15:50:34,667: [    1.470919] spi-aspeed-smc
> 1e620000.spi: CE0 read buswidth:2 [0x203c0641]
> >
> arm/test_aspeed_catalina.CatalinaMachine.test_arm_ast2600_catalina_open
> bmc/console.log:2026-02-13 15:50:41,745: [    7.369080] spi-aspeed-smc
> 1e620000.spi: CE1 read buswidth:2 [0x203c0041]
> >
> arm/test_aspeed_gb200nvl_bmc.GB200Machine.test_arm_aspeed_gb200_op
> enbmc/console.log:2026-02-13 15:50:22,255: [    1.277601] spi-aspeed-smc
> 1e620000.spi: CE0 read buswidth:4 [0x406c0641]
> >
> arm/test_aspeed_gb200nvl_bmc.GB200Machine.test_arm_aspeed_gb200_op
> enbmc/console.log:2026-02-13 15:50:22,589: [    1.558898] spi-aspeed-smc
> 1e630000.spi: CE0 read buswidth:4 [0x406c0041]
> >
> arm/test_aspeed_palmetto.PalmettoMachine.test_arm_ast2400_palmetto_op
> enbmc/console.log:2026-02-13 15:50:31,164: [    0.840722] spi-aspeed-smc
> 1e620000.spi: CE0 read buswidth:2 [0x203b0641]
> >
> arm/test_aspeed_palmetto.PalmettoMachine.test_arm_ast2400_palmetto_op
> enbmc/console.log:2026-02-13 15:50:31,405: [    1.082523] spi-aspeed-smc
> 1e630000.spi: CE0 read buswidth:2 [0x203c2041]
> >
> arm/test_aspeed_romulus.RomulusMachine.test_arm_ast2500_romulus_open
> bmc/console.log:2026-02-13 15:50:35,622: [    1.281889] spi-aspeed-smc
> 1e620000.spi: CE0 read buswidth:2 [0x203b0641]
> >
> arm/test_aspeed_romulus.RomulusMachine.test_arm_ast2500_romulus_open
> bmc/console.log:2026-02-13 15:50:35,832: [    1.491569] spi-aspeed-smc
> 1e630000.spi: CE0 read buswidth:2 [0x203c0041]
> >
> arm/test_aspeed_witherspoon.WitherspoonMachine.test_arm_ast2500_wither
> spoon_openbmc/console.log:2026-02-13 15:50:44,149: [    0.885126]
> spi-aspeed-smc 1e620000.spi: CE0 read buswidth:2 [0x203c0641]
> >
> arm/test_aspeed_witherspoon.WitherspoonMachine.test_arm_ast2500_wither
> spoon_openbmc/console.log:2026-02-13 15:50:44,193: [    0.932894]
> spi-aspeed-smc 1e620000.spi: CE1 read buswidth:2 [0x203c0041]
> >
> >
> arm/test_aspeed_witherspoon.WitherspoonMachine.test_arm_ast2500_wither
> > spoon_openbmc/console.log:2026-02-13 15:50:44,242: [    0.982561]
> > spi-aspeed-smc 1e630000.spi: CE0 read buswidth:2 [0x203c0041]
> >

Reply via email to