Re: MCP25xxFD Driver Error (-47)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/17/20 10:30 AM, Marc Kleine-Budde wrote:
>> The results were clear, there is some SPI issue that prevents me
>> specifying above 8.8Mhz, even if the effective speed is detected to be the same.
> 
> Probably interger arithmetics :)
> 
> 600 MHz / 8.823529 Mhz
> 
> 600000000 / 8823529 = 68.0000031733 -> 69
> 
> The SPI host driver only supports even dividers.
> 
> -> 70
> 
> 600 MHz / 70 = 8.57 MHz
> 
> but your SPI host controller selects 8.33MHz...

On the H3 it works as expected:

> [    7.937043] mcp25xxfd spi0.0 can0: MCP2518FD rev0.0 (+RX_INT -MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD c:20.00MHz m:8.82MHz r:8.82MHz e:8.57MHz) successfully initialized.

Request 8.82MHz -> Effective 8.57MHz

If you want 8.82MHz, you have to specify"spi-max-frequency = <8823530>;" in the
DT. This results in:

> [    8.074548] mcp25xxfd spi0.0 can0: MCP2518FD rev0.0 (+RX_INT -MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD c:20.00MHz m:8.82MHz r:8.82MHz e:8.82MHz) successfully initialized.

600000000 / 8823530 = 67,9999954667 -> 68

600 MHz / 68 = 8.82 MHz

regards.
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux