Page MenuHomeFreeBSD

GPIO CS support and set mode and clock
ClosedPublic

Authored by yamori813_yahoo.co.jp on Apr 30 2019, 1:54 AM.

Details

Summary

Add gpio cs support. This is dts

&spi1 {
        status = "okay";
        cs-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
        non-flash;
        spigen@0 {
                compatible = "freebsd,spigen";
                spi-max-frequency = <10000000>;
        };
};

Almost same as OpenWRT. But current code depend on flash access.
I add non-flash property by ignore.

I try RT5350 spi1 registor but not worki fo me. I am abandon.

mode and clock set on transfer.

I use this code on small lcd device.

Test Plan

RT3050 and RT5350

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

yamori813_yahoo.co.jp edited the summary of this revision. (Show Details)Apr 30 2019, 2:01 AM

This is my test environment.

adrian accepted this revision.May 19 2019, 4:03 PM

Hey this looks good! I don't have any hardware to test it on right now though so I'll take your word for it.

This revision is now accepted and ready to land.May 19 2019, 4:03 PM
This revision was automatically updated to reflect the committed changes.