Page MenuHomeFreeBSD

gpiospi no delay support
AbandonedPublic

Authored by yamori813_yahoo.co.jp on Feb 10 2018, 1:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 18, 1:47 PM
Unknown Object (File)
Thu, Apr 11, 7:05 PM
Unknown Object (File)
Fri, Apr 5, 5:20 AM
Unknown Object (File)
Feb 21 2024, 5:38 PM
Unknown Object (File)
Dec 20 2023, 1:16 AM
Unknown Object (File)
Dec 12 2023, 9:25 PM
Unknown Object (File)
Nov 8 2023, 1:10 AM
Unknown Object (File)
Sep 6 2023, 6:47 AM
Subscribers

Details

Reviewers
ray
adrian
mizhka
Summary

My spi lcd (T18SPI-2P) is work on no delay.
DELAY(1) is very slow on led dispay.

This modify work this.

If set over 1000000 Hz then spi is no DELAY.
If set 1000000 Hz to DELAY(1).

Test Plan

Onion Omega with spi lcd

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 14916
Build 15028: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Aug 17 2018, 2:14 PM

The description does not seem to match what the code does now.

If sc_freq is less than 1 MHz, it will have no delay
If sc_freq is 1 Mhz, it will DELAY(1)
If sc_freq is larger than 1 Mhz, it may have a higher delay.

Does the display you have use a high or a low frequency?

Can you provide a better description for the commit message?

Sorry my missing comment.

I think sc_freq is not frequency. Because of frequency is bigger then one clock is go smaller. Current logic is reverse.

I think sc_freq mean latency.

I don't have good comment now. Sorry.

I update Onion Omega to normal 12-STALBLE then LCD display is slow. I remember no this modify in source tree.

sc_freq is revers frequency. If under 1M is no delay, Over 1M divide 1M by micro sec delay.

I tested on Onion Omega(Atheros 9330) with SPI LCD at 12.2R. No DELAY work fine. Please commit this patch.

Oh I get it. DELAY(1) is delaying for one microsecond, which is too slow for what we're doing here.

I think I'll add a quirk. This can break gpiospi for devices with faster GPIO blocks by having it become potentially too fast. Lemme go poke at it. (And find an SPI display too)