Hello,
i'm working on SAM5D31 base board and according on my custom carrier board pinout i need PD20,21,22,23 only as adc line. In my carrier board pinout PD19 is used as GPIO for enabling LTE modem.
I tried to modify a device tree in at91-sama5d3_xplained.dts in order to select only the proper adc line (PD20,21,22,23) and avoi to set pinctrl_adc0_adtrg that use PD19 but the situation on /sys/devices/platform/ahb/ahb:apb/f8018000.adc/iio:device0# remain the same:
drwxr-xr-x 6 root root 0 Jan 1 00:05 .
drwxr-xr-x 4 root root 0 Jan 1 00:05 ..
drwxr-xr-x 2 root root 0 Jan 1 00:12 buffer
-rw-r--r-- 1 root root 4096 Jan 1 00:12 current_timestamp_clock
-r--r--r-- 1 root root 4096 Jan 1 00:05 dev
-rw-r--r-- 1 root root 4096 Jan 1 00:12 in_voltage1_raw
-rw-r--r-- 1 root root 4096 Jan 1 00:12 in_voltage2_raw
-rw-r--r-- 1 root root 4096 Jan 1 00:12 in_voltage3_raw
-rw-r--r-- 1 root root 4096 Jan 1 00:12 in_voltage4_raw
-rw-r--r-- 1 root root 4096 Jan 1 00:12 in_voltage5_raw
-rw-r--r-- 1 root root 4096 Jan 1 00:12 in_voltage6_raw
-rw-r--r-- 1 root root 4096 Jan 1 00:12 in_voltage7_raw
-rw-r--r-- 1 root root 4096 Jan 1 00:12 in_voltage_scale
-r--r--r-- 1 root root 4096 Jan 1 00:12 name
lrwxrwxrwx 1 root root 0 Jan 1 00:12 of_node -> ../../../../../../firmware/devicetree/base/ahb/apb/adc@f8018000
drwxr-xr-x 2 root root 0 Jan 1 00:12 power
drwxr-xr-x 2 root root 0 Jan 1 00:12 scan_elements
lrwxrwxrwx 1 root root 0 Jan 1 00:12 subsystem -> ../../../../../../bus/iio
drwxr-xr-x 2 root root 0 Jan 1 00:12 trigger
-rw-r--r-- 1 root root 4096 Jan 1 00:05 uevent
the situation is the same even if i put the ADC in "disabled" in device tree.
The link https://www.linux4sam.org/bin/view/Linu ... oAdcDriver Pin Muxing suggest to perform some driver modification in order to change adc line pin but software driver reference point provided seems not present in 4.19.78-linux4sam-6.2.
Could you please provide some suggestion ?
Thanks in advance
Best Regards
Fabio
sama5d3xplained ADC line on 4.19.78-linux4sam-6.2
Moderator: nferre
- blue_z
- Location: USA
Post
Why aren't you using a custom dts file for a custom board?
Second, what information are you getting from that subdirectory listing?
I glean nothing about your configuration "tries" relating to pin PD19.
And it looks like you haven't even reconfigured the ADC down to just the four analog inputs you wanted.
Are you sure you are examining something that would actually reflect the modifications that you are trying to make?
It is also poorly worded; the pins are ADC inputs, not "ADC outputs".
There's debugfs, e.g. /sys/kernel/debug/pinctrl/pinctrl-handles (which lists all registered pin states) and /sys/kernel/debug/gpio.
Regards
Re: sama5d3xplained ADC line on 4.19.78-linux4sam-6.2
That DT file is for the Xplained board with a SAMA5D36, yet you claim to use SAMA5D31. That doesn't make sense.queifaro wrote: ↑i'm working on SAM5D31 base board ...
I tried to modify a device tree in at91-sama5d3_xplained.dts ...
Why aren't you using a custom dts file for a custom board?
Only stating that you "tried" and neglecting to describe exactly how you modified the DT is not the way to ask for help..queifaro wrote: ↑ ... in order to select only the proper adc line (PD20,21,22,23) and avoi to set pinctrl_adc0_adtrg that use PD19
First, that does not seem to be a valid path.queifaro wrote: ↑ but the situation on /sys/devices/platform/ahb/ahb:apb/f8018000.adc/iio:device0# remain the same:
...
Second, what information are you getting from that subdirectory listing?
I glean nothing about your configuration "tries" relating to pin PD19.
And it looks like you haven't even reconfigured the ADC down to just the four analog inputs you wanted.
What "situation" are you referring to?queifaro wrote: ↑ the situation is the same even if i put the ADC in "disabled" in device tree.
Are you sure you are examining something that would actually reflect the modifications that you are trying to make?
Much information in that section is now outdated, as it refers to a "platform_data structure" in "board files". Configuration by board file has been replaced with the Device Tree.queifaro wrote: ↑The link https://www.linux4sam.org/bin/view/Linu ... oAdcDriver Pin Muxing suggest to perform some driver modification in order to change adc line pin but software driver reference point provided seems not present in 4.19.78-linux4sam-6.2.
It is also poorly worded; the pins are ADC inputs, not "ADC outputs".
Use the proper tool(s) to confirm pin configuration/multiplexing.queifaro wrote: ↑Could you please provide some suggestion ?
There's debugfs, e.g. /sys/kernel/debug/pinctrl/pinctrl-handles (which lists all registered pin states) and /sys/kernel/debug/gpio.
Regards
Who is online
Users browsing this forum: No registered users and 8 guests