This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM335X: PROCESSOR-SDK-AM335X

Part Number: PROCESSOR-SDK-AM335X


Hello, I'm experimenting with the ADC on a Beaglebone board (am335X) and Yocto, I can't see the devices under /sys/bus/iio/devices/iio\ after I inserted the kernel modules

I followed these steps but I wasn't lucky. 
I can insert the kernel modules on Linux but I don't understand what I'm doing wrong
Here is my system output, any help I will appreciate a lot! Thanks!!
 
######### Here I inserted the modules on Linux ################
insmod /lib/modules/5.4.58-yocto-standard/kernel/drivers/iio/industrialio.ko
insmod /lib/modules/5.4.58-yocto-standard/kernel/drivers/iio/buffer/kfifo_buf.ko
insmod /lib/modules/5.4.58-yocto-standard/kernel/drivers/mfd/ti_am335x_tscadc.ko
insmod /lib/modules/5.4.58-yocto-standard/kernel/drivers/iio/adc/ti_am335x_adc.ko

##### the info from kernel module ########
root@beaglebone-yocto:/# modinfo /lib/modules/5.4.58-yocto-standard/kernel/drivers/iio/adc/ti_am335x_adc.ko                                    
filename:       /lib/modules/5.4.58-yocto-standard/kernel/drivers/iio/adc/ti_am335x_adc.ko
license:        GPL
author:         Rachna Patil <rachna@ti.com>
description:    TI ADC controller driver
alias:          of:N*T*Cti,am3359-adcC*
alias:          of:N*T*Cti,am3359-adc
depends:        industrialio,kfifo_buf,ti_am335x_tscadc
intree:         Y
name:           ti_am335x_adc
vermagic:       5.4.58-yocto-standard preempt mod_unload ARMv7 p2v8
#### here are my modules inserted ######
root@beaglebone-yocto:/# lsmod
Module                  Size  Used by
ti_am335x_adc          16384  0
ti_am335x_tscadc       16384  1 ti_am335x_adc
kfifo_buf              16384  1 ti_am335x_adc
industrialio           61440  2 ti_am335x_adc,kfifo_buf
qcserial               16384  0
usb_wwan               20480  1 qcserial
qmi_wwan               28672  0
cdc_wdm                20480  1 qmi_wwan
usbnet                 32768  1 qmi_wwan
usbserial              36864  2 qcserial,usb_wwan
snd_soc_simple_card    20480  0
snd_soc_simple_card_utils    20480  1 snd_soc_simple_card
snd_soc_davinci_mcasp    28672  2
snd_soc_ti_edma        16384  1 snd_soc_davinci_mcasp
snd_soc_ti_sdma        16384  1 snd_soc_davinci_mcasp
snd_soc_hdmi_codec     16384  1
snd_soc_core          176128  6 snd_soc_davinci_mcasp,snd_soc_hdmi_codec,snd_soc_simple_card_utils,snd_soc_ti_sdma,snd_soc_ti_edma,snd_soc_simd
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_pcm                94208  4 snd_soc_davinci_mcasp,snd_pcm_dmaengine,snd_soc_hdmi_codec,snd_soc_core
snd_timer              32768  1 snd_pcm
snd                    61440  4 snd_soc_hdmi_codec,snd_timer,snd_soc_core,snd_pcm
soundcore              16384  1 snd
leds_gpio              16384  0
led_class              16384  1 leds_gpio
uio_pdrv_genirq        16384  0
uio                    20480  1 uio_pdrv_genirq
sch_fq_codel           20480  2
#### This is my customized linux using the kernel 5.4 using Yocto ######
root@beaglebone-yocto:/# uname -a
Linux beaglebone-yocto 5.4.58-yocto-standard #1 PREEMPT Tue Oct 18 16:30:03 UTC 2022 armv7l GNU/Linux
##### More CPU Info ######
root@beaglebone-yocto:/# cat /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 2 (v7l)
BogoMIPS        : 996.14
Features        : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc08
CPU revision    : 2

Hardware        : Generic AM33XX (Flattened Device Tree)
Revision        : 0000
Serial          : 4218BBBK1232
  • Hello Jesus,

    We use the yocto tool to build AM335x Linux Processor SDK, but I am not familiar with a "beagleboard yocto" Linux build. Please note that support will be limited if you are not using a TI SDK.

    1) What version of Linux are you running?

    2) Please show the part of your Linux devicetree where the ADC is enabled

    Regards,

    Nick

  • Hi Nick! thanks for your replay, actually I'm using the SDK, the "beaglebone-yocto" is only the hostname.

    systemd[1]: Set hostname to <beaglebone-yocto>.

    1) What version of Linux are you running?  [Answer]:: Linux: 5.4.58

    2) Please show the part of your Linux devicetree where the ADC is enabled. [Answer]:: I added this lines in my dts, I tested including these lines on am335x-boneblack.dts and am335x-evm.dts on arch/arm/dts/

    arch/arm/dts/am335x-boneblack.dts
    
    &tscadc {
        status = "okay";
        adc {
        ti,adc-channels = <0 1 2 3 4 5 6 7>;
        ti,chan-step-opendelay = <152 152 152 152 152 152 152 152>;
        ti,chan-step-avg = <16 16 16 16 16 16 16 16>;
        ti,chan-step-sampledelay = <0 0 0 0 0 0 0 0>;
        };
    };

    In the documentation says that it is need to apply voltage to the ADC terminal, do you know if the ADC needs some kind of power to be attached and detected by the board?

    Any feedback or advice I will appreciate!

  • Hello Jesus,

    I am able to replicate your observations on both AM335x Linux Processor SDK 7.3 (kernel 5.4) and SDK 8.2 (kernel 5.10).

    This documentation has not been updated in many years, but by sheer chance the developers are updating the ADC documentation this week (e.g., changing modprobe ti_am335x_adc.ko --> modprobe ti_am335x_adc). I am double-checking with them to see what else we need to change.

    Please ping the thread if I have not provided another update by the middle of next week. It is holiday time in India, so depending on where in the world these developers are it might be a while before I get a response.

    Regards,

    Nick

  • Hello Nick! any update regarding this topic? Thanks!!