Post Go back to editing

Drivers in AD Kuiper

Before downloading Kuiper I understood that all AD drivers would be built and included to the Kuiper Linux, it seems that there are only a few available so it seems that I have to rebuild the kernel. What is then the benefit to use Kuiper over plain vanilla Raspberry distribution?

Thanks,

Kaj

Parents
  • Kuiper at its core is Raspbian but comes with many useful pre-installed applications we maintain not to mention our kernel. We try to upstream as much as possible but many drivers will only exist in our kernel. Note that RPI isn't the only platform we support and Kuiper handles many of our FPGA based systems as well.

    If you are fine with building your own kernels it shouldn't matter. Use the userspace you want and use the kernel that supports the devices you want to use.

    -Travis

  • Travis, thanks for your answer.

    Could you give a pointer to Kuiper-compatible kernel sources and instructions for building a kernel? I have done it for Raspbian but I guess Kuiper uses a patched kernel.

    Thanks,

    Kaj

Reply Children
  • I have now compiled a new kernel enabling all the IIO drivers. I am trying to control an ADF4351 synthesizer. To do that I tried to load the overlay in /boot/config.txt

    Evidently I missed something because the device did not appear in iio_info.

    What is the exact dtoverlay line in /boot/config.txt to enable this device? I am using SPI0 with default pins.

  • [all]
    dtoverlay=<name of overlay file>


    Check the dmesg log for driver errors.

    -Travis
  • I obviously tried that. No active overlays reported by dtoverlay -l. No devices in iio_info, no errors in dmesg. Also, how to specify that two ADF's are connected with different CE*s?

    Kaj

  • Can you provide your config.txt and the output of:

    vcdbg log msg

    From what I recall this device requires 3-wire SPI so you might have to add some device tree arguments for it to function with the RPI as the RPI defaults to 4-wire.

    -Travis

  • $ sudo vcdbg log msg
    001126.686: brfs: File read: /mfs/sd/config.txt
    001127.878: brfs: File read: 1930 bytes
    001229.379: brfs: File read: /mfs/sd/config.txt
    001230.493: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
    001250.350: brfs: File read: 1930 bytes
    001435.390: gpioman: gpioman_get_pin_num: pin DISPLAY_DSI_PORT not defined
    001436.717: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
    001436.771: *** Restart logging
    001477.412: HDMI0: hdmi_pixel_encoding: 162000000
    001482.734: dtb_file 'bcm2710-rpi-3-b.dtb'
    001492.480: brfs: File read: /mfs/sd/bcm2710-rpi-3-b.dtb
    001492.503: Loading 'bcm2710-rpi-3-b.dtb' to 0x100 size 0x6ee8
    001505.930: brfs: File read: 28392 bytes
    001515.779: brfs: File read: /mfs/sd/overlays/overlay_map.dtb
    001582.675: brfs: File read: 1523 bytes
    001590.733: brfs: File read: /mfs/sd/config.txt
    001591.262: dtparam: i2c_arm=on
    001599.672: dtparam: spi=on
    001607.114: dtparam: audio=on
    001618.224: brfs: File read: 1930 bytes
    001630.312: brfs: File read: /mfs/sd/overlays/rpi-adf4350-overlay.dtbo
    001637.251: Loaded overlay 'rpi-adf4350-overlay'
    001653.792: brfs: File read: 857 bytes
    001665.796: brfs: File read: /mfs/sd/overlays/spi0-2cs.dtbo
    001677.193: Loaded overlay 'spi0-2cs'
    001677.209: dtparam: cs0_pin=8
    001677.705: dtparam: cs1_pin=7
    001695.182: brfs: File read: 1045 bytes
    001701.867: brfs: File read: /mfs/sd/cmdline.txt
    001701.914: Read command line from file 'cmdline.txt':
    001701.933: 'console=serial0,115200 console=tty1 root=PARTUUID=d1099056-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait'
    003682.730: gpioman: gpioman_get_pin_num: pin EMMC_ENABLE not defined
    003738.492: brfs: File read: 121 bytes
    004167.579: brfs: File read: /mfs/sd/kernel7.img
    004167.604: Loading 'kernel7.img' to 0x8000 size 0x6072f8
    004167.636: Device tree loaded to 0x2eff8c00 (size 0x73fc)
    004170.952: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined
    008094.487: vchiq_core: vchiq_init_state: slot_zero = 0xf7580000, is_master = 1
    008099.121: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
    008105.225: TV service:host side not connected, dropping notification 0x00000002, 0x00000001, 0x00000010
    
    $ cat /boot/config.txt
    # For more options and information see
    # http://rpf.io/configtxt
    # Some settings may impact device functionality. See link above for details
    
    # uncomment if you get no picture on HDMI for a default "safe" mode
    #hdmi_safe=1
    
    # uncomment this if your display has a black border of unused pixels visible
    # and your display can output without overscan
    #disable_overscan=1
    
    # uncomment the following to adjust overscan. Use positive numbers if console
    # goes off screen, and negative if there is too much border
    #overscan_left=16
    #overscan_right=16
    #overscan_top=16
    #overscan_bottom=16
    
    # uncomment to force a console size. By default it will be display's size minus
    # overscan.
    #framebuffer_width=1280
    #framebuffer_height=720
    
    # uncomment if hdmi display is not detected and composite is being output
    hdmi_force_hotplug=1
    
    # uncomment to force a specific HDMI mode (this will force VGA)
    hdmi_group=1
    hdmi_mode=16
    
    # uncomment to force a HDMI mode rather than DVI. This can make audio work in
    # DMT (computer monitor) modes
    #hdmi_drive=2
    
    # uncomment to increase signal to HDMI, if you have interference, blanking, or
    # no display
    #config_hdmi_boost=4
    
    # uncomment for composite PAL
    #sdtv_mode=2
    
    #uncomment to overclock the arm. 700 MHz is the default.
    #arm_freq=800
    
    # Uncomment some or all of these to enable the optional hardware interfaces
    dtparam=i2c_arm=on
    #dtparam=i2s=on
    dtparam=spi=on
    
    # Uncomment this to enable infrared communication.
    #dtoverlay=gpio-ir,gpio_pin=17
    #dtoverlay=gpio-ir-tx,gpio_pin=18
    
    # Additional overlays and parameters are documented /boot/overlays/README
    
    # Enable audio (loads snd_bcm2835)
    dtparam=audio=on
    
    [pi4]
    # Enable DRM VC4 V3D driver on top of the dispmanx display stack
    dtoverlay=vc4-fkms-v3d
    max_framebuffers=2
    
    [all]
    #dtoverlay=vc4-fkms-v3d
    #dtoverlay=w1-gpio
    #dtoverlay=spi0-2cs,rpi-adf4350-overlay
    dtoverlay=rpi-adf4350-overlay
    dtoverlay=spi0-2cs,cs0_pin=8,cs1_pin=7
    #dtoverlay=rpi-adxl34
    

    The ADF4351 synth SPI is 'write-only' so there is no feedback except for the muxout for lock detect so shouldn't the device be seen in iio_info even if it was not present physically?

    It seems from vcdbg log msg that both spi and adf are loaded but why they are not visible in dtoverlay -l (they are in dtoverlay -a but without the star marking that they are active.

    Also what is mystery to me is how and where to tell which SPI port and CE/LE are used to control this particular synth? I'd expect to set that in adf4350 dtparam somehow but there seems to be little documentation on that.