Hi Team,
While testing the OSPI and QSPI flash devices in u-boot using driver in u-boot, I found the requested frequency is not set properly.
Below are the observations made :
Reference clock = 133333333 Hz and spi-max-frequency = <50000000>; is used through out.
1) OSPI test
PHY MODE : Enabled in the dts file
Read happens in octal mode and frequency is set to 133 MHz
Write happens in SPI mode and frequency is set to 133 MHz
Note : This behaviour is when I comment out the "cdns,phy-mode" in k3-j721e-som-p0.dtsi under
&ospi0 {
.....
cdns,phy-mode
....
}
But in actual as per the clock tree diagram, when phy mode is enabled then the controller has to route the reference clock as it is to the device input clock pin, and
when we disable the phy mode, the clock divider will come in action and gives the further divided clock to the device input clock pin. Kindly check if it is a bug because
the behaviour is vice-versa i.e., when we comment out the "cdns,phy-mode" the phy mode is enabled.
2) QSPI test
PHY MODE : Disabled in the dts file
Read happens in Quad mode and frequency is set to 33 MHz
Write happens in SPI mode and frequency is set to 33 MHz
3) QSPI test
PHY MODE : Enabled in the dts file
Read happens in Quad mode but frequency is set at 33 MHz as against expected 133 MHz
Write happens in SPI mode but frequency is set at 33 MHz as against expected 133 MHz
We are unable to figure out whether there is a bug in the upstream code itself. And unable to draw a conclusion on this.
Kindly help us on this.
Regards,
Shiva Shankar K.