Message ID | 20241025161501.485684-24-miquel.raynal@bootlin.com |
---|---|
State | Superseded |
Headers | show |
Series | spi-nand/spi-mem DTR support | expand |
On 10/25/24 5:15 PM, Miquel Raynal wrote: > Make the link between the core macros and the datasheet. > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> > --- > drivers/mtd/nand/spi/winbond.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c > index 686e872fe0ff..9e2562805d23 100644 > --- a/drivers/mtd/nand/spi/winbond.c > +++ b/drivers/mtd/nand/spi/winbond.c > @@ -18,6 +18,11 @@ > > #define W25N04KV_STATUS_ECC_5_8_BITFLIPS (3 << 4) > > +/* > + * "X2" in the core is equivalent to "dual output" in the datasheets, > + * "X4" in the core is equivalent to "quad output" in the datasheets. > + */ doesn't help great for an outsider like me. Is quad referring to cmd, addr or data? Or maybe of all? I need to read the code anyway. > + > static SPINAND_OP_VARIANTS(read_cache_dtr_variants, > SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 2, NULL, 0), > SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0),
On 11/11/24 2:38 PM, Tudor Ambarus wrote: > > > On 10/25/24 5:15 PM, Miquel Raynal wrote: >> Make the link between the core macros and the datasheet. >> >> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> >> --- >> drivers/mtd/nand/spi/winbond.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c >> index 686e872fe0ff..9e2562805d23 100644 >> --- a/drivers/mtd/nand/spi/winbond.c >> +++ b/drivers/mtd/nand/spi/winbond.c >> @@ -18,6 +18,11 @@ >> >> #define W25N04KV_STATUS_ECC_5_8_BITFLIPS (3 << 4) >> >> +/* >> + * "X2" in the core is equivalent to "dual output" in the datasheets, >> + * "X4" in the core is equivalent to "quad output" in the datasheets. >> + */ > > doesn't help great for an outsider like me. Is quad referring to cmd, > addr or data? Or maybe of all? I need to read the code anyway. more straight forward would be to use the X-Y-Z terminology in the comment, where X,Y and Z are the number of IO lines for cmd, address and data. >> + >> static SPINAND_OP_VARIANTS(read_cache_dtr_variants, >> SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 2, NULL, 0), >> SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0),
On 11/11/2024 at 14:38:53 GMT, Tudor Ambarus <tudor.ambarus@linaro.org> wrote: > On 10/25/24 5:15 PM, Miquel Raynal wrote: >> Make the link between the core macros and the datasheet. >> >> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> >> --- >> drivers/mtd/nand/spi/winbond.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c >> index 686e872fe0ff..9e2562805d23 100644 >> --- a/drivers/mtd/nand/spi/winbond.c >> +++ b/drivers/mtd/nand/spi/winbond.c >> @@ -18,6 +18,11 @@ >> >> #define W25N04KV_STATUS_ECC_5_8_BITFLIPS (3 << 4) >> >> +/* >> + * "X2" in the core is equivalent to "dual output" in the datasheets, >> + * "X4" in the core is equivalent to "quad output" in the datasheets. >> + */ > > doesn't help great for an outsider like me. Is quad referring to cmd, > addr or data? Or maybe of all? I need to read the code anyway. I also don't like these terms. IIRC "output" is referring to the data cycles, otherwise it means address (dummy) and data cycles. In single, dual or quad mode the naming is unclear but "okay". But octal DDR modes can require the opcode to be sent in octal mode as well, which is new. If we support that, I'll take care of using a more understandable naming for all macros like Xy-Xy-Xy, X being the buswidth, y being S (sdr) or D (ddr) and the three members being Command-Address-Data. I might even be tempted to include dummy cycles as well, because it is important to be clear if eg. in octal mode "1" means "1 cycle" or "8 cycles". >> + >> static SPINAND_OP_VARIANTS(read_cache_dtr_variants, >> SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 2, NULL, 0), >> SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0), Thanks, Miquèl
On 12/13/24 12:25 PM, Miquel Raynal wrote: > On 11/11/2024 at 14:38:53 GMT, Tudor Ambarus <tudor.ambarus@linaro.org> wrote: > >> On 10/25/24 5:15 PM, Miquel Raynal wrote: >>> Make the link between the core macros and the datasheet. >>> >>> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> >>> --- >>> drivers/mtd/nand/spi/winbond.c | 5 +++++ >>> 1 file changed, 5 insertions(+) >>> >>> diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c >>> index 686e872fe0ff..9e2562805d23 100644 >>> --- a/drivers/mtd/nand/spi/winbond.c >>> +++ b/drivers/mtd/nand/spi/winbond.c >>> @@ -18,6 +18,11 @@ >>> >>> #define W25N04KV_STATUS_ECC_5_8_BITFLIPS (3 << 4) >>> >>> +/* >>> + * "X2" in the core is equivalent to "dual output" in the datasheets, >>> + * "X4" in the core is equivalent to "quad output" in the datasheets. >>> + */ >> >> doesn't help great for an outsider like me. Is quad referring to cmd, >> addr or data? Or maybe of all? I need to read the code anyway. > > I also don't like these terms. IIRC "output" is referring to the data cycles, > otherwise it means address (dummy) and data cycles. > > In single, dual or quad mode the naming is unclear but "okay". But octal > DDR modes can require the opcode to be sent in octal mode as well, which > is new. If we support that, I'll take care of using a more > understandable naming for all macros like Xy-Xy-Xy, X being the > buswidth, y being S (sdr) or D (ddr) and the three members being 8d-8d-8d is common and covered by few standards, yes. > Command-Address-Data. I might even be tempted to include dummy cycles as > well, because it is important to be clear if eg. in octal mode "1" means > "1 cycle" or "8 cycles". I find the info about dummy cycles useful. I wonder if such terminology is already specified in a standard. If not, maybe we can put the dummy cycles after the mode, in parenthesis? I would refrain custom terminology.
On 18/12/2024 at 08:14:36 GMT, Tudor Ambarus <tudor.ambarus@linaro.org> wrote: > On 12/13/24 12:25 PM, Miquel Raynal wrote: >> On 11/11/2024 at 14:38:53 GMT, Tudor Ambarus <tudor.ambarus@linaro.org> wrote: >> >>> On 10/25/24 5:15 PM, Miquel Raynal wrote: >>>> Make the link between the core macros and the datasheet. >>>> >>>> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> >>>> --- >>>> drivers/mtd/nand/spi/winbond.c | 5 +++++ >>>> 1 file changed, 5 insertions(+) >>>> >>>> diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c >>>> index 686e872fe0ff..9e2562805d23 100644 >>>> --- a/drivers/mtd/nand/spi/winbond.c >>>> +++ b/drivers/mtd/nand/spi/winbond.c >>>> @@ -18,6 +18,11 @@ >>>> >>>> #define W25N04KV_STATUS_ECC_5_8_BITFLIPS (3 << 4) >>>> >>>> +/* >>>> + * "X2" in the core is equivalent to "dual output" in the datasheets, >>>> + * "X4" in the core is equivalent to "quad output" in the datasheets. >>>> + */ >>> >>> doesn't help great for an outsider like me. Is quad referring to cmd, >>> addr or data? Or maybe of all? I need to read the code anyway. >> >> I also don't like these terms. IIRC "output" is referring to the data cycles, >> otherwise it means address (dummy) and data cycles. >> >> In single, dual or quad mode the naming is unclear but "okay". But octal >> DDR modes can require the opcode to be sent in octal mode as well, which >> is new. If we support that, I'll take care of using a more >> understandable naming for all macros like Xy-Xy-Xy, X being the >> buswidth, y being S (sdr) or D (ddr) and the three members being > > 8d-8d-8d is common and covered by few standards, yes. > >> Command-Address-Data. I might even be tempted to include dummy cycles as >> well, because it is important to be clear if eg. in octal mode "1" means >> "1 cycle" or "8 cycles". > I find the info about dummy cycles useful. I wonder if such terminology > is already specified in a standard. If not, maybe we can put the dummy > cycles after the mode, in parenthesis? I would refrain custom terminology. I see you concern, but would you mind giving an example of what you have in mind? Thanks, Miquèl
On 12/18/24 9:33 AM, Miquel Raynal wrote: > On 18/12/2024 at 08:14:36 GMT, Tudor Ambarus <tudor.ambarus@linaro.org> wrote: > >> On 12/13/24 12:25 PM, Miquel Raynal wrote: >>> On 11/11/2024 at 14:38:53 GMT, Tudor Ambarus <tudor.ambarus@linaro.org> wrote: >>> >>>> On 10/25/24 5:15 PM, Miquel Raynal wrote: >>>>> Make the link between the core macros and the datasheet. >>>>> >>>>> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> >>>>> --- >>>>> drivers/mtd/nand/spi/winbond.c | 5 +++++ >>>>> 1 file changed, 5 insertions(+) >>>>> >>>>> diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c >>>>> index 686e872fe0ff..9e2562805d23 100644 >>>>> --- a/drivers/mtd/nand/spi/winbond.c >>>>> +++ b/drivers/mtd/nand/spi/winbond.c >>>>> @@ -18,6 +18,11 @@ >>>>> >>>>> #define W25N04KV_STATUS_ECC_5_8_BITFLIPS (3 << 4) >>>>> >>>>> +/* >>>>> + * "X2" in the core is equivalent to "dual output" in the datasheets, >>>>> + * "X4" in the core is equivalent to "quad output" in the datasheets. >>>>> + */ >>>> >>>> doesn't help great for an outsider like me. Is quad referring to cmd, >>>> addr or data? Or maybe of all? I need to read the code anyway. >>> >>> I also don't like these terms. IIRC "output" is referring to the data cycles, >>> otherwise it means address (dummy) and data cycles. >>> >>> In single, dual or quad mode the naming is unclear but "okay". But octal >>> DDR modes can require the opcode to be sent in octal mode as well, which >>> is new. If we support that, I'll take care of using a more >>> understandable naming for all macros like Xy-Xy-Xy, X being the >>> buswidth, y being S (sdr) or D (ddr) and the three members being >> >> 8d-8d-8d is common and covered by few standards, yes. >> >>> Command-Address-Data. I might even be tempted to include dummy cycles as >>> well, because it is important to be clear if eg. in octal mode "1" means >>> "1 cycle" or "8 cycles". >> I find the info about dummy cycles useful. I wonder if such terminology >> is already specified in a standard. If not, maybe we can put the dummy >> cycles after the mode, in parenthesis? I would refrain custom terminology. > > I see you concern, but would you mind giving an example of what you have > in mind? > on a second thought, the number of dummy cycles can vary depending on frequency, so better to stick just to the Xy-Xy-Xy, X = {1,2,4,8}, y = {S, D} terminology.
diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c index 686e872fe0ff..9e2562805d23 100644 --- a/drivers/mtd/nand/spi/winbond.c +++ b/drivers/mtd/nand/spi/winbond.c @@ -18,6 +18,11 @@ #define W25N04KV_STATUS_ECC_5_8_BITFLIPS (3 << 4) +/* + * "X2" in the core is equivalent to "dual output" in the datasheets, + * "X4" in the core is equivalent to "quad output" in the datasheets. + */ + static SPINAND_OP_VARIANTS(read_cache_dtr_variants, SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 2, NULL, 0), SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0),
Make the link between the core macros and the datasheet. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> --- drivers/mtd/nand/spi/winbond.c | 5 +++++ 1 file changed, 5 insertions(+)