From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0969A53E32 for ; Wed, 13 Dec 2023 17:21:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Dgzs/7s9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA5D1C433C7; Wed, 13 Dec 2023 17:21:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702488102; bh=aiLJX18EHnNlc58Nl7TVW6wT31DfUmZ5+HYW3HyEo0M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dgzs/7s9bNVI0V+kTZZnnbrWARALhf9Ix6cxo8lmrXq5Bak/55iLBsHXlebwRHFGl 0p+3b3pIA6v9IvNp572md58NhuB5ubafr3y5HAjdyXxDu/siiJT3PE2t6n5ucIcDs4 RnYWkiZQdSstMHpODZrXeXoTviJHQix+Q5pWs5Q4wfwXBNfhgYsTJvR5qLwMARN73I qjF7URA8B5ymTpPA8r6N789Y5j9WZf33YgmRG7tpkbnZ54rEkUb3vLlWuUd918Zfaa PLw/uzFY2yJ0dMlrPRoRPiZ6QvawQf9fZpMdAwhim+x2OM9XBHMs+ckFM2LDer3KUO RTYns1u9CL2tQ== From: Michael Walle To: haibo.chen@nxp.com Cc: broonie@kernel.org, han.xu@nxp.com, linux-imx@nxp.com, linux-spi@vger.kernel.org, yogeshgaur.83@gmail.com, Michael Walle Subject: Re: [PATCH 4/5] spi: spi-nxp-fspi: add function to select sample clock source for flash reading Date: Wed, 13 Dec 2023 18:21:13 +0100 Message-Id: <20231213172113.2774476-1-mwalle@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231213091346.956789-4-haibo.chen@nxp.com> References: <20231213091346.956789-4-haibo.chen@nxp.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit > From: Haibo Chen > > fspi define four mode for sample clock source selection. > > Here is the list of modes: > mode 0: Dummy Read strobe generated by FlexSPI Controller and loopback internally > mode 1: Dummy Read strobe generated by FlexSPI Controller and loopback from DQS pad > mode 2: Reserved > mode 3: Flash provided Read strobe and input from DQS pad > > In default, fspi use mode 0 after reset. > For 8-8-8-DTR mode, need to use mode 3, otherwise 8-8-8-DTR read always > get incorrect data. I'd say this is board dependant, right? If you now hardcode 8d8d8d to always use mode 3. I'm not sure how a board which doesn't have the DQS connected to the flash can change this to another mode again. Looks like we'd need a (DT) property which tells you if there is actually a DQS line connected to the flash. Btw you don't check buswidth, so you'll enable that mode for any DTR mode. -michael