View: 1094|Reply: 0

SPI problem

[Copy link]

5

threads

6

posts

45

credits

Novice

Rank: 1

credits
45
Published in 2022-9-20 19:19:47 | Show all floors |Read mode
This post was finally edited by john7 at 2022-9-20 19:23

I have Orange Pi PC 2.

I enable SPI
armbian-config->System->Hardware->spidev

in boot/armbianEnv.txt
overlays=spi-spidev
param_spidev_spi_bus=0

Now I see the device - ls -l /dev
spidev0.0

But when I try to send nothing heppens, I don't see any clock on SPI0_CLK pin.

So I check
dtc -i dtb -o dts boot/overlay/sun50i-h5-spi-spidev.dtbo
And I see
  1. /dts-v1/;

  2. / {
  3.         compatible = "allwinner,sun50i-h5";

  4.         fragment@0 {
  5.                 target-path = "/aliases";

  6.                 __overlay__ {
  7.                         spi0 = "/soc/spi@1c68000";
  8.                         spi1 = "/soc/spi@1c69000";
  9.                 };
  10.         };

  11.         fragment@1 {
  12.                 target = <0xffffffff>;

  13.                 __overlay__ {
  14.                         #address-cells = <0x01>;
  15.                         #size-cells = <0x00>;

  16.                         spidev@0 {
  17.                                 compatible = "armbian,spi-dev";
  18.                                 status = "disabled";
  19.                                 reg = <0x00>;
  20.                                 spi-max-frequency = <0xf4240>;
  21.                         };
  22.                 };
  23.         };

  24.         fragment@2 {
  25.                 target = <0xffffffff>;

  26.                 __overlay__ {
  27.                         #address-cells = <0x01>;
  28.                         #size-cells = <0x00>;

  29.                         spidev@0 {
  30.                                 compatible = "armbian,spi-dev";
  31.                                 status = "disabled";
  32.                                 reg = <0x00>;
  33.                                 spi-max-frequency = <0xf4240>;
  34.                         };
  35.                 };
  36.         };

  37.         __fixups__ {
  38.                 spi0 = "/fragment@1:target:0";
  39.                 spi1 = "/fragment@2:target:0";
  40.         };
  41. };
Copy code

status = "disabled"; ? It means the device is disabled? Why?




You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list