Jump to content

Falcounet

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by Falcounet

  1. Yes, `compatible = "spidev"` is normally not allowed but armbian is applying a patch to allow it again but that doesn't work anymore. What did you discovered exactly ? Sure. EDIT : I didn't figured out there was a 2nd page before replying. Looks like you got it. Nice done !
  2. I think it's just a workaround for now. Something seems to be broken with kernel 5.15 but I couldn't understand what. It is still better to only modify the spidev overlay, I think. This way you could still control spidev using /boot/armbianEnv.txt
  3. I actually found a better fix for this by only modifying the spidev overlay (/boot/dts/allwinner/overlays/sun50i-h5-spi-spidev.dtbo in my case). compatible = "spidev"; seems to not work anymore while compatible = "rohm,dh2228fv"; works. I have a board with an Allwinner H5 SoC so I dig a bit more and found there is spi-sun4i.c and spi-sun6i.c drivers. I found out that none of these drivers seems to be used (There are no spi-sun*i.ko in /lib/modules/5.15.32-sunxi64/kernel/drivers/spi ) while CONFIG_SPI_SUN4I and CONFIG_SPI_SUN6I are set to y, is this normal ? I also found out of_device_id are defined there (See here and here ). Should we add these IDs in the spidev_dt_ids[] list of spidev.c ?
  4. Doing what is explained in this post make it to work but spidev isn't anymore controlled through /boot/armbianEnv.conf file but the DT. I used the "quick and dirty" fix for now by using "rohm,dh2228fv" which is already in the spidev_dt_ids[] list and avoid me creating a new build with a patch to modify drivers/spi/spidev.c So basically, I used armian-config to edit the Device Tree (System => Dtc), Browse the DT over soc => spi@1c68000 And I added these lines : spi@1c68000 { ... spidev@0x00 { compatible = "rohm,dh2228fv"; spi-max-frequency = <100000000>; reg = <0x00>; }; } And the same for the second SPI controller : spi@1c69000 { ... spidev@0x00 { compatible = "rohm,dh2228fv"; spi-max-frequency = <100000000>; reg = <0x00>; }; } I also had to remove the spidev stuff from /boot/armbianEnv.conf (No spi-spidev overlay) This way, I get two SPI devices and the SBC is working again with 5.15 kernel : # ls /dev/ | grep spi spidev0.0 spidev1.0
  5. Do you have any hint on what to look at to try to fix that issue ? I might invest some time on it (and hopefully also get some more knowledge about these things)
  6. Hello, I finally found the solution: the DTB is also compiled by the kernel so the DTS file need also to be there. I'm going to use patching as it seems to be finally a better route than cloning these repos.
  7. Hello, I'm trying to get a new board working using Armbian. I'm currently working from my GIT repo so I cloned armbian/build and u-boot/u-boot I added them to the compile.sh script by using userpatches/lib.conf overrides. I added the DTS file of the board, defconfig and modified the Makefile as it can be seen on this commit On the board config side, I set: BOOTCONFIG="fly_gemini_defconfig" The image is built successfully but the board doesn't boot because the DTB file isn't present in /boot/dtb/allwinner/sun50i-h5-fly-gemini.dtb I looked in output/debug files but I didn't found any error What did I miss ? Any hint to point me where to look or what step I need to do is welcome. Thanks !
  8. Well, in fact, It might just be a misconfiguration of the software. How to find in which /dev/gpiochipX (or /sys/class/gpio/gpiochipX ) offset and line number the pin 22 on the GPIO header (GPIO1_D0) is refering to ? I can't understand how to sort out this information from the RK3399 datasheet.
  9. Hello ! I'm trying to make DuetSoftwareFirmware (software to control 3D printers boards using a SBC) working on a OrangePi4B using armbian (The software works well on raspberry pi 3 and 4). It use a SPI interface for data transfer between SBC and the board as well as an extra pin "data transfer ready". I use the pin 22 on the connector for "data transfer ready". This pin is mapped to GPIO1_D0. So GPIO pin number is 56 ( 1 * 32 + 3 * 8 + 0). For now, I'm getting errors because it seems like the pin can't be set into event mode. Below is the part of the source code (it can also be seen here) // Set up the pin gpioevent_request tr = new gpioevent_request { line_offset = (uint)pin, handle_flags = (uint)GpioHandleFlags.GPIOHANDLE_REQUEST_INPUT, event_flags = (uint)GpioEventFlags.GPIOEVENT_REQUEST_BOTH_EDGES, }; [...] int result = Interop.ioctl(_deviceFileDescriptor, GPIO_GET_LINEEVENT_IOCTL, new IntPtr(&tr)); if (result < 0) { throw new IOException($"Error {Marshal.GetLastWin32Error()}. Cannot put line into event mode."); } Is the GPIO event mode also available on RK3399 or is it a feature of BCM chipsets ? If available, what do I need to do to activate it ? Maybe the device file descriptor is not as the same location as RaspberryPi ? I know interrupts could be as well used but it would implies to change the software and obviously, I would like to avoid this. Thanks ! BTW: How to increase the number of posts per day ? I'm new on this forum and it's probably an anti-spam feature but I couldn''t even reply to this thread.
  10. Hello ! i'm trying to enable the SPI interface on a OrangePi4B board using Focal latest stable build, so I edit `/boot/armbianEnv.txt` to add these lines : overlays=spi-spidev param_spidev_spi_bus=0 But after rebooting, I'm unable to access to the board anymore (No IP address is assigned to the board by the DHCP server). What's wrong ? Is there any additionnal steps ? FYI, I also tried to enable SPI using armbian-config tool but it doesn't work neither. As this tool doesn't even specify the `param_spidev_spi_bus` parameters which is required according to the overlay README.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines