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.

Rock Pi S no CLK signal on SPI1

Featured Replies

I am experiencing an issue with my Rock Pi S. When using SPI1, I am not observing any CLK output signal on pin GPIO3_B3, which I have verified with an oscilloscope. Other signals such as MOSI, MISO, and CS are functioning correctly. I have found that this issue does not occur in the older kernel 4.4.143-65-rockchip-g58431d38f8f3. However, when using the latest Armbian 25.2.2 Bookworm Minimal / IOT image, this problem arises. Could someone please assist me in resolving this problem?

Edited by Martin Petrašovský

I also have the same problem, it used to work fine with an older version of armbian and the old 4.4 Kernel, but after an upgrade it just stopped working. The following should serve as a test when connection MOSI and MISO:
 

~# dd if=/dev/urandom bs=1 count=16 status=none | spi-pipe -d /dev/spidev1.0 -s 1000000 -b 16 | hexdump -C

 

Querying my MCP3008 it just returns all zeros:

~# printf '\x01\x80\x00' | spi-pipe -d /dev/spidev1.0 -s 100000 -b 3 | hexdump -C
00000000  00 00 00                                          |...|
00000003

 

I'm using the following DT:

/dts-v1/;
/plugin/;

/{
        metadata {
                title = "Enable spidev on SPI1";
                compatible = "unknown";
                category = "misc";
                exclusive = "GPOI3_B2", "GPOI3_B3", "GPOI3_B4", "GPOI3_B5";
                description = "Enable spidev on SPI1 on pin 39, 40, 41 & 42.";
        };
};

&spi1 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&spi1_clk &spi1_csn0 &spi1_miso &spi1_mosi>;
        #address-cells = <1>;
        #size-cells = <0>;

        spidev@0 {
                compatible = "rockchip,spidev", "armbian,spi-dev";
                reg = <0>;
                spi-max-frequency = <50000000>;
        };
};

 

The SPI is showing up, but it's just always producing zeros, it seems there's just something wrong with a newer SPI driver or something, maybe a new kernel upstream fix or kernel patch is needed here.

 

I sadly don't have a backup of the old image to test with, but it the same rust software I wrote that worked before, doesn't work anymore now and it can't even talk to itself anymore. I don't have an oscilloscope to see exactly whats going on, but something funky is happening with the clock signal indeed:

~# cat /sys/kernel/debug/clk/clk_spi1/clk_rate
108333334

 Max clock should be 50M as per the DTS file, but it seems the driver just ignores this. Event though spi-config shows something else (when reconfiguring it):

/dev/spidev1.0: mode=0, lsb=0, bits=8, speed=100000, spiready=0

 

I also don't find any way to build an old kernel 4.4 image anymore (the legacy branch doesn't exist anymore), so I can't do that either and the edge-based Kernel 6.18.0-rc6-edge-rockchip64 also don't bring any improvements it seems.

Edited by Cromefire_
spi-config output

How can you active spi support?I burn  " 25.11.2" image,but I can't find any overlay of spi ,uart or i2c.

This is my system status:

cat /etc/os-release
PRETTY_NAME="Armbian 25.11.2 trixie"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.2
ID=debian
HOME_URL="https://www.armbian.com"
SUPPORT_URL="https://forum.armbian.com"
BUG_REPORT_URL="https://www.armbian.com/bugs"
ARMBIAN_PRETTY_NAME="Armbian 25.11.2 trixie"
 

uname -a
Linux Pi-s 6.12.58-current-rockchip64 #3 SMP PREEMPT Thu Nov 13 20:34:41 UTC 2025 aarch64 GNU/Linux

 

ls /boot/dtb/rockchip/overlay/rk3308*
/boot/dtb/rockchip/overlay/rk3308-b@1.3ghz.dtbo   /boot/dtb/rockchip/overlay/rk3308-otg-host.dtbo
/boot/dtb/rockchip/overlay/rk3308-bs@1.3ghz.dtbo  /boot/dtb/rockchip/overlay/rk3308-s0-ext-antenna.dtbo
/boot/dtb/rockchip/overlay/rk3308-bs.dtbo
 

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.