Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default SPI speed is much too slow #4

Open
martinayotte opened this issue Aug 11, 2016 · 1 comment
Open

Default SPI speed is much too slow #4

martinayotte opened this issue Aug 11, 2016 · 1 comment

Comments

@martinayotte
Copy link

(I've also open issue to original author : OLIMEX/OLINUXINO#39 )

Default SPI speed is much too slow !

I've an SPI LCD that was working fine in kernel 4.4.5, and suddenly was way too slow when I've upgraded to 4.5.x or 4.6.x. After some debugging, I've figured out that kernel was now using "transfer-speed" instead of "spi-device-max-speed", the first been set during ioctrl, but ignored/not-used in older kernels.

Here is the commit merge in Mainline 9 months ago :

https://github.com/megous/linux/commit/47284e3e0f3c427c93f8583549b6c938e8a18015

I've finally figured out that guilty code was in pyA20 providing a wrong default ioctrl value for the "transfer-speed" of 100kHz, while we all know that SPI default should be 10MHz :

diff pyA20-0.2.1/pyA20/spi/spi.c~ pyA20-0.2.1/pyA20/spi/spi.c
238c238
<     config.speed = 100000;

---
>     config.speed = 10000000;
@duxingkei33
Copy link
Owner

I'm sorry ,the spi device ,i have not test on board!

You can read the source to solve your question,Thanks.

------------------ 原始邮件 ------------------
发件人: "martinayotte";[email protected];
发送时间: 2016年8月11日(星期四) 上午10:06
收件人: "duxingkei33/orangepi_PC_gpio_pyH3"[email protected];

主题: [duxingkei33/orangepi_PC_gpio_pyH3] Default SPI speed is much tooslow (#4)

(I've also open issue to original author : OLIMEX/OLINUXINO#39 )

Default SPI speed is much too slow !

I've an SPI LCD that was working fine in kernel 4.4.5, and suddenly was way too slow when I've upgraded to 4.5.x or 4.6.x. After some debugging, I've figured out that kernel was now using "transfer-speed" instead of "spi-device-max-speed", the first been set during ioctrl, but ignored/not-used in older kernels.

Here is the commit merge in Mainline 9 months ago :

megous/linux@47284e3

I've finally figured out that guilty code was in pyA20 providing a wrong default ioctrl value for the "transfer-speed" of 100kHz, while we all know that SPI default should be 10MHz :
diff pyA20-0.2.1/pyA20/spi/spi.c~ pyA20-0.2.1/pyA20/spi/spi.c 238c238 < config.speed = 100000; --- > config.speed = 10000000;

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants