Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:tools-software:linux-drivers:iio-pll:adf4371 [04 Sep 2019 12:56] – Adding Linux driver support Stefan Poparesources:tools-software:linux-drivers:iio-pll:adf4371 [04 Sep 2019 14:13] (current) – More Information Stefan Popa
Line 31: Line 31:
 | driver  | [[linux.github>master?drivers/iio/frequency/adf4371.c | drivers/iio/frequency/adf4371.c]] | | driver  | [[linux.github>master?drivers/iio/frequency/adf4371.c | drivers/iio/frequency/adf4371.c]] |
 | Documentation | [[linux.github>master?Documentation/devicetree/bindings/iio/frequency/adf4371.yaml | adf4371.yaml]] | | Documentation | [[linux.github>master?Documentation/devicetree/bindings/iio/frequency/adf4371.yaml | adf4371.yaml]] |
 +| ABI documentation| [[linux.github>master?Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4371 | sysfs-bus-iio-frequency-adf4371]] |
  
 Example device tree Example device tree
Line 125: Line 126:
 </code> </code>
  
 +====== Hardware configuration ======
  
 +====== Driver testing ======
 +
 +{{page>software:linux:docs:iio:iio_snippets#iio device files&noheader&firstseconly&noeditbtn}}
 +
 +<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 +<xterm>
 +analog:/sys/bus/iio/devices/iio:device0# **cd /sys/bus/iio/devices/**
 +root@analog:/sys/bus/iio/devices# **ls**
 +iio:device0  iio:device1  iio:device2  iio:device3
 +root@analog:/sys/bus/iio/devices#
 +
 +root@analog:/sys/bus/iio/devices# **cd iio\:device0**
 +root@analog:/sys/bus/iio/devices/iio:device0# **ls -l**
 +total 0
 +-r--r--r-- 1 root root 4096 sep  4 14:05 dev
 +-rw-r--r-- 1 root root 4096 sep  4 14:05 muxout_enable
 +-rw-r--r-- 1 root root 4096 sep  4 14:05 muxout_mode
 +-r--r--r-- 1 root root 4096 sep  4 14:05 name
 +lrwxrwxrwx 1 root root    0 sep  4 14:05 of_node -> ../../../../../../../../firmware/devicetree/base/soc/spi@7e204000/adf4371@0
 +-rw-r--r-- 1 root root 4096 sep  4 14:05 out_altvoltage0_frequency
 +-rw-r--r-- 1 root root 4096 sep  4 14:05 out_altvoltage0_name
 +-rw-r--r-- 1 root root 4096 sep  4 14:05 out_altvoltage0_powerdown
 +-rw-r--r-- 1 root root 4096 sep  4 14:05 out_altvoltage1_frequency
 +-rw-r--r-- 1 root root 4096 sep  4 14:05 out_altvoltage1_name
 +-rw-r--r-- 1 root root 4096 sep  4 14:05 out_altvoltage1_powerdown
 +-rw-r--r-- 1 root root 4096 sep  4 14:05 out_altvoltage2_frequency
 +-rw-r--r-- 1 root root 4096 sep  4 14:05 out_altvoltage2_name
 +-rw-r--r-- 1 root root 4096 sep  4 14:05 out_altvoltage2_powerdown
 +-rw-r--r-- 1 root root 4096 sep  4 14:05 out_altvoltage3_frequency
 +-rw-r--r-- 1 root root 4096 sep  4 14:05 out_altvoltage3_name
 +-rw-r--r-- 1 root root 4096 sep  4 14:05 out_altvoltage3_powerdown
 +-r--r--r-- 1 root root 4096 sep  4 14:05 out_altvoltage_muxout_mode_available
 +drwxr-xr-x 2 root root    0 sep  4 14:05 power
 +lrwxrwxrwx 1 root root    0 sep  2 17:46 subsystem -> ../../../../../../../../bus/iio
 +-rw-r--r-- 1 root root 4096 sep  2 17:46 uevent
 +
 +root@analog:/sys/bus/iio/devices/iio:device0#
 +</xterm></WRAP>
 +
 +===== Show device name =====
 +
 +<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 +<xterm>
 +root@analog:/sys/bus/iio/devices/iio:device0# **cat name**
 +**adf4371**
 +</xterm></WRAP>
 +
 +===== Read channel frequency =====
 +
 +<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 +<xterm>
 +root@analog:/sys/bus/iio/devices/iio:device0# **cat out_altvoltage0_frequency**
 +**8000000000**
 +</xterm></WRAP>
 +
 +===== Read channel name =====
 +
 +<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 +<xterm>
 +root@analog:/sys/bus/iio/devices/iio:device0# **cat out_altvoltage0_name**
 +**RF8x**
 +</xterm></WRAP>
 +
 +===== Set channel frequency =====
 +
 +<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 +<xterm>
 +root@analog:/sys/bus/iio/devices/iio:device0# **echo 1000000000 > out_altvoltage0_frequency**
 +root@analog:/sys/bus/iio/devices/iio:device0# **cat out_altvoltage0_frequency**
 +**1000000000**
 +</xterm></WRAP>
 +
 +===== Channel power down =====
 +
 +<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 +<xterm>
 +root@analog:/sys/bus/iio/devices/iio:device0# **cat out_altvoltage0_powerdown**
 +0
 +root@analog:/sys/bus/iio/devices/iio:device0# **echo 1 > out_altvoltage0_powerdown**
 +root@analog:/sys/bus/iio/devices/iio:device0# **cat out_altvoltage0_powerdown**
 +1
 +</xterm></WRAP>
 +
 +===== Muxout mode =====
 +
 +The mux output allows the user to access various internal points on the chip. Valid values that can be written:
 +
 +<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap>
 +<xterm>
 +root@analog:/sys/bus/iio/devices/iio:device0# **cat out_altvoltage_muxout_mode_available**
 +tristate digital_lock charge_pump_up charge_pump_down RDIV2 N_div_out VCO_test high VCO_calib_R_band VCO_calib_N_band
 +root@analog:/sys/bus/iio/devices/iio:device0# **cat muxout_mode**
 +digital_lock
 +root@analog:/sys/bus/iio/devices/iio:device0# **echo charge_pump_up > muxout_mode**
 +root@analog:/sys/bus/iio/devices/iio:device0# **cat muxout_mode**
 +charge_pump_up 
 +</xterm></WRAP>
 +====== More Information ======
 +
 +{{page>software:linux:docs:iio:iio_snippets#iio pointers&noheader&firstseconly&noeditbtn}}
  
resources/tools-software/linux-drivers/iio-pll/adf4371.1567594564.txt.gz · Last modified: 04 Sep 2019 12:56 by Stefan Popa