UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
2,649 Views
Registered: ‎03-22-2017

Linux Device Tree XADC Multplexing channel for ZC702

Hi there,

 

I just want to enable the rest of the XADC channel input of the board ZC702 of the App Note of XADC.

 

The XADC connector is this one, labeled as connector J40 at the board:

 

xadc_conn

To my understanding the XADC_VN and XADC_VP are connected to VP_0 and VN_0 inputs.

 

xadc_block

 

To enable the rest of the VAUXN/P[x], which are connected to J40, I have tried to change the DTB I'm using, as said here:

 

 

Examples:
	xadc@f8007100 {
		compatible = "xlnx,zynq-xadc-1.00.a";
		reg = <0xf8007100 0x20>;
		interrupts = <0 7 4>;
		interrupt-parent = <&gic>;
		clocks = <&pcap_clk>;

		xlnx,channels {
			#address-cells = <1>;
			#size-cells = <0>;
			channel@0 {
				reg = <0>;
			};
			channel@1 {
				reg = <1>;
			};

                       ···

			channel@8 {
				reg = <8>;
			};
		};
	};

And recompile the Linux Kernel.

 

 

This new DTB adds new inputs named as

in_voltage[X]_raw (x = 9:16)

 under "iio"

/sys/bus/iio/devices/iio\:device0/

but those inputs looks to be not routed to XADC multiplexer.

 

I have tried to add also adding new parameters under the device-tree, like this ones:

 

 

xlnx,external-mux-channel
xlnx,external-mux
xnlx,channels

 options to the DT, with little succes.

 

Anyone knows how to enable the Multiplexed channels of the ADC?

 

Thanks in advance,

 

imuguruza

0 Kudos
2 Replies
Visitor vonzep
Visitor
2,580 Views
Registered: ‎12-15-2014

Re: Linux Device Tree XADC Multplexing channel for ZC702

As far as I can tell you're going along the right path ... but the external mux is tripping you up ... unless there is an external ic mux in the circuit don't enable it.

 

What you do need to do is use the XADC Wizard IP in vivado to enable the routing of the aux analog inputs ... then change the device tree to point to the AXI address and driver 

 

ie.

 

xadc@43200000 {
		compatible = "xlnx,axi-xadc-1.00.a";
		reg = <0x43200000 0x1000>;
		interrupts = <0 53 4>;
		interrupt-parent = <&gic>;
		clocks = <&fpga1_clk>;

		xlnx,channels {
			#address-cells = <1>;
			#size-cells = <0>;
			channel@0 {
				reg = <0>;
			};
		};
	};

Where the interrupt and reg values may need to change to suit your needs, also be aware I believe in petalinux 2016.4 kernel there is a bug where the last channel is not added so you may need to add an extra channel to get past this

0 Kudos
Visitor vonzep
Visitor
2,578 Views
Registered: ‎12-15-2014

Re: Linux Device Tree XADC Multplexing channel for ZC702

0 Kudos