Jump to content

Cromefire_

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Cromefire_

  1. 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.
  2. Tried to get it running on the Rock PI S, which has the same chip, but it somehow doesn't seem to work... I think it has different conflicts maybe? It's kinda hard to debug. Originally I used the following (on 24.*): /dts-v1/; /plugin/; / { compatible = "rockchip,rk3308"; fragment@0 { target = <&spi1>; __overlay__ { #address-cells = <1>; #size-cells = <0>; status = "okay"; spidev@0 { compatible = "rockchip,spidev"; status = "okay"; reg = <0>; spi-max-frequency = <10000000>; }; }; }; }; But it stopped working on upgrade to 25.11. I was able to get it to load again until I adjusted the compatible field to "armbian,spi-dev". But the the connected chip just wouldn't answer. I now tried rk3308-spi1-spidev.dts from this thread, with the codec modification and then even tried to fix the correct conflicts for the Rock PI S' different pinout: /dts-v1/; /plugin/; /{ metadata { title = "Enable spidev on SPI1"; compatible = "radxa,rockpis", "radxa,rock-s0"; category = "misc"; exclusive = "GPIO2_B1", "GPIO2_A4", "GPIO2_A5", "GPIO2_A7"; description = "Enable spidev on SPI1."; }; fragment@0 { target = <&spi1>; __overlay__ { 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 = <10000000>; }; }; }; fragment@1 { target = <&i2c3>; __overlay__ { status = "disabled"; }; }; fragment@2 { target = <&uart3>; __overlay__ { status = "disabled"; }; }; }; But it still doesn't communicate. It's there, but not receiving any data from my chip like it did in the past. I can't find anything in dmesg, so I'm not sure how one can find out what's wrong with it.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines