Hi,
Custom board using Octavo OSD3358-base. I am connecting analog inputs AIN0, AIN1, AIN2, AIN3 and VREFN (VREFN_ADC). I understand I need to enable the ADC driver in the kernel. I am using an exact copy of am33xx.dtsi and a edited copy of am335x-bone-common.dtsi from BeagleBoard-DeviceTrees-4.19.x-ti.
What needs added to the device tree to enable the analog inputs?
Thank you,
Hi all,
This link answered my questions.
I added this to my common.dtsi file.
&tscadc {
status = "okay";
adc {
ti,adc-channels = <0 1 2 3 4 5 6 7>;
//ti,chan-step-avg = <16 16 16 16 16 16 16 16>;
//ti,chan-step-opendelay = <0x98 0x98 0x98 0x98 0x98 0x98 0x98 0x98>;
//ti,chan-step-sampledelay = <0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0>;
};
};
After adding &tscadc{} and booting with the new .dtb file then the iio:device0 folder showed up in the /sys/bus/iio/devices folder.
Thank you,
(you can mark this as resolved)
@jakthree that’s correct, you can simply if to:
&tscadc {
status = "okay";
adc {
ti,adc-channels = <0 1 2 3>;
};
};
Regards,