Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

how to connect 2 mrfc522 on orangepi 3b

Featured Replies

hello guys, i hawe question, 
my device: orangepi 3b 8gb OS: 1.0.6 Jammy with Linux 5.10.160-rockchip-rk356x

 

3.3V → 3.3V → PIN 1

GND → GND → PIN 6

SCK → SPI SCK → PIN 23

MOSI → SPI MOSI → PIN 19

MISO → SPI MISO → PIN 21

SDA →  CS → SPI CE0 → PIN 24
 

===========================

 

/boot/orangepiEnv.txt

```
verbosity=1
bootlogo=true
extraargs=cma=128M
overlay_prefix=rk356x
rootdev=UUID=4b3309b6-9bbe-431d-8609-82360b5b6154
rootfstype=ext4
overlays=spi3-m0-cs0-spidev spi3-m0-cs1-spidev

```

orangepi@orangepi3b:~$ ls /dev/spidev*
/dev/spidev3.0                                                                                <================= only one...

cant add new spidev 3.1 and more.. for connect another mrfc522

 

how to fix?

Solved by Илья Бовсунов

  • Author
  • Solution

ok how i fix it?

 

go next: 

sudo find /boot -type f -name '*cs0*dtbo'

 

i see on  next: 

 

rk356x-spi<BUS>-m<MUX>-cs<CS>-spidev.dtbo
│  │      │           │
│  │      │           └─ номер Chip-Select (0 или 1)
│  │      └─ «mux» — какие именно ноги вывели наружу (m0, m1…)
│  └─ номер аппаратного SPI-контроллера (spi0…spi5)
└─ серия SoC (rk3566 / rk3568 = rk356x, rk3588 …)

 

next setup instruction:

 

| Шаг                                                     | Команды (копируйте строка-в-строку)                                                    | Что должно получиться                            |                                          |
| ------------------------------------------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------ | ---------------------------------------- |
| 1. Перейти в домашний каталог                           | `cd ~`                                                                                 |                                                  |                                          |
| 2. Создать исходник DTS                                 | `nano rk356x-spi3-m0-cs1-spidev.dts`                                                   | вставьте текст снизу → **Ctrl-O, Enter, Ctrl-X** |                                          |
| 3. Скомпилировать в DTBO                                | `dtc -@ -I dts -O dtb -o rk356x-spi3-m0-cs1-spidev.dtbo rk356x-spi3-m0-cs1-spidev.dts` | файл *.dtbo* рядом                               |                                          |
| 4. Узнать каталог оверлеев                              | `export OVR=/boot/dtb/rockchip/overlay`                                                | (у вас именно такой путь)                        |                                          |
| 5. Скопировать файл                                     | `sudo cp rk356x-spi3-m0-cs1-spidev.dtbo $OVR/`                                         |                                                  |                                          |
| 6. Проверить                                            | \`ls \$OVR                                                                             | grep cs1\`                                       | увидите *rk356x-spi3-m0-cs1-spidev.dtbo* |
| 7. Убедиться, что в `/boot/orangepiEnv.txt` есть строка | `overlays=spi3-m0-cs0-spidev spi3-m0-cs1-spidev`                                       | если всё ок — дальше                             |                                          |
| 8. Перезагрузить                                        | `sudo reboot`                                                                          |                                                  |                                          |
| 9. После ребута                                         | `ls /dev/spidev3.*`                                                                    | **/dev/spidev3.0  /dev/spidev3.1**               |                                          |

 

#6  can be ignored.

 

at #2 next: rk356x-spi3-m0-cs1-spidev.dts  <=== name

code:

/dts-v1/;
/plugin/;

/ {
    compatible = "rockchip,rk3566";

    fragment@0 {
        target = <&spi3>;
        __overlay__ {
            #address-cells = <1>;
            #size-cells = <0>;
            status = "okay";

            spidev@1 {          /* CS1 = регистр 1 */
                compatible = "spidev";
                reg = <1>;
                spi-max-frequency = <10000000>;
            };
        };
    };
};

 

sudo reboot

 

after this: ls /dev/spidev3.*

 

orangepi@orangepi3b:~$ ls /dev/spidev3.*
/dev/spidev3.0  /dev/spidev3.1

 

make like ;)

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.