07-21-2020 03:30 AM
Hello, I use petalinux to build a linux-system in zynq-Borad, and i also want to add a xadc to read external channel,but I have a problem.
When i'm using XADC in ZYNQ-Board. The Sequence-Register value in pl.dtsi are not same as in Board.
The value in devicetree:
xadc_wiz_0: xadc_wiz@43c00000 {
clock-names = "s_axis_aclk", "s_axi_aclk";
clocks = <&clkc 15>, <&clkc 15>;
compatible = "xlnx,xadc-wiz-3.3", "xlnx,axi-xadc-1.00.a";
interrupt-names = "ip2intc_irpt";
interrupt-parent = <&intc>;
interrupts = <0 32 4>;
reg = <0x43c00000 0x10000>;
xlnx,sequence-r0 = <0x0>;
};
I use devmem2 to read value in sequence register 0 and the value in Board:
root@dma-alt:~# ./devmem2 0x43c00320
/dev/mem opened.
Memory mapped at address 0xb6f72000.
Value at address 0x43C00320 (0xb6f72320): 0x77E1
I dont know what wrong with the devicetree.
Can anyone help me?
Thx
07-22-2020 05:05 AM
07-21-2020 04:02 AM
What do you see if you do a dmesg | grep xadc?
Based on the driver compatibility:
https://github.com/Xilinx/linux-xlnx/blob/master/drivers/iio/adc/xilinx-xadc-core.c
Can you you try add this to the system-user.dtsi:
&xadc_wiz_0 { compatible = "xlnx,axi-xadc-1.00.a"; clocks = <&clkc 15>; };
Once this is done can you try a dmesg | grep xadc
07-22-2020 01:40 AM
07-22-2020 05:05 AM