Jump to content

spi-gpio


tantal

Recommended Posts

Neo has one SPI port and I need two, so would like to add another spi using spi-gpio, but no success (I think).

I am using Armbian 23.02.2 Bullseye, default kernel does not enable it, recompiled using linux-source-5.15.93-sunxi.tar.xz, enabled spi-gpio as module.

Digged around forum, prepared below dts and armbian-add-overlay succeeded.

But there is no message arrived when loading (dmesg shows nothing about spi) and no /dev/spi* created.  Is it OK or there must be something?

Please advise....

 

/ {
        compatible = "allwinner,sun8i-h3";

        fragment@0 {
                target-path = "/";
                __overlay__ {
                        softspi: spi_gpio {
                                compatible = "spi-gpio";
                                #address-cells = <1>;
                                #size-cells = <0>;
                                ranges;
                                sck-gpios  = <&pio 0 15 0>; /* PG6 */
                                mosi-gpios = <&pio 0 16 0>; /* PG7 */
                                miso-gpios = <&pio 0  1 0>; /* PA6 */
                                num-chipselects = <0>;
                                status = "okay";
                                spidev {
                                        compatible = "linux,spidev";
                                        reg = <0>;
                                        spi-max-frequency = <10000000>;
                                        status = "okay";
                                };
                        };
                };
        };
};
 

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines