Re: [PATCH] spi: spi-geni-qcom: Add SPI driver support for GENI based QUP

From: Trent Piepho
Date: Fri Aug 10 2018 - 13:55:57 EST

On Fri, 2018-08-10 at 21:59 +0530, dkota@xxxxxxxxxxxxxx wrote:
> Here are my couple of cents:
> SPI controller maximum frequency can be lesser than or equal to Clock
> framework's maximum
> frequency, so should not rely on the Clock framework.

But there is probably some means, via the controller's IP block input
clock, combined with the controller's IP version (from the compatible
string and a device data table), to derive the controller's max clock.

At least, AFAICT, this has been the case for all existing master

> Now the need is, how to communicate the SPI controller maximum frequency
> to SPI core framework?
> Is it by DTSI entry or hardcoding in the SPI controller driver?
> My stand is for providing the DTSI entry.
> Why because, this keeps SPI controller driver generic across the boards
> and portable.
> Also it is not against to Device tree usage because maximum frequency
> is describing the property of the hardware.

My point is that not everything that possibly can go in the device tree
should be placed there, just because it can be. If the master driver
can figure out its max speed, let it do that.