[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CH2PR12MB4264DD83557D759B8EC8EAD8DB799@CH2PR12MB4264.namprd12.prod.outlook.com>
Date: Tue, 30 Aug 2022 10:22:08 +0000
From: "Potthuri, Sai Krishna" <sai.krishna.potthuri@....com>
To: Michael Walle <michael@...le.cc>
CC: Tudor Ambarus <tudor.ambarus@...rochip.com>,
Pratyush Yadav <pratyush@...nel.org>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"saikrishna12468@...il.com" <saikrishna12468@...il.com>,
"git (AMD-Xilinx)" <git@....com>
Subject: RE: [PATCH 2/2] mtd: spi-nor: Add support for flash reset
Hi Michael,
> -----Original Message-----
> From: Michael Walle <michael@...le.cc>
> Sent: Tuesday, August 30, 2022 12:40 PM
> To: Potthuri, Sai Krishna <sai.krishna.potthuri@....com>
> Cc: Tudor Ambarus <tudor.ambarus@...rochip.com>; Pratyush Yadav
> <pratyush@...nel.org>; Miquel Raynal <miquel.raynal@...tlin.com>;
> Richard Weinberger <richard@....at>; Vignesh Raghavendra
> <vigneshr@...com>; Rob Herring <robh+dt@...nel.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt@...aro.org>; devicetree@...r.kernel.org; linux-
> mtd@...ts.infradead.org; linux-kernel@...r.kernel.org;
> saikrishna12468@...il.com; git (AMD-Xilinx) <git@....com>
> Subject: Re: [PATCH 2/2] mtd: spi-nor: Add support for flash reset
>
> Hi,
>
> Am 2022-08-30 08:32, schrieb Potthuri, Sai Krishna:
>
> >> > + if (ret)
> >> > + return ret;
> >> > +
> >> > + /*
> >> > + * Experimental Minimum Chip select high to Reset delay value
> >> > + * based on the flash device spec.
> >> > + */
> >>
> >> Which flash device spec?
> > I referred some of the qspi, ospi flash vendors datasheets like
> > Micron, Macronix, ISSI, gigadevice, spansion.
>
> Please mention here that you've looked at datasheets of different vendors.
> And maybe instead of doing three comments, just one and then the reset
> sequence.
Ok, I will update in v2.
>
> >>
> >> > + usleep_range(1, 5);
> >> > + gpiod_set_value(reset, 0);
> >>
> >> Mh, is your logic inverted here? If I read the code correctly, you
> >> should use a value of 1 to take the device into reset. The device
> >> tree should then have a flag "active low", which will
> > Reset Sequence which I implemented here is high(1)->low(0)->high(1).
> > By doing this sequence (active low), flash device is getting reset,
> > this sequence is tested using Octal SPI flash device.
>
> How does the device tree property for your look like?
> Has it the GPIO_ACTIVE_LOW flag set?
Sorry, I misunderstand your initial ask, This logic is developed by keeping
the GPIO_ACTIVE_HIGH flag set in the device-tree. Agree this will violate the
flash reset sequence (active low reset).
I will update the sequence in v2 to match with the "active low" flag in the
device tree.
Regards
Sai Krishna
>
> -michael
Powered by blists - more mailing lists