Hi all, Following one of the xilinx forum posts here -- https://forums.xilinx.com/t5/Embedded-Processor-System-Design/Zynq-zc706-XADC-Reading-External-Voltages/td-p/593620 -- I wanted to plug in external sources for the xadc to monitor, so I made a patch like so:
https://github.com/kratsg/meta-l1calo/blob/patch/externalXADC/recipes-bsp/u-boot/files/0001-add-external-xadc-to-device-tree.patch diff --git a/arch/arm/dts/zynq-7000.dtsi b/arch/arm/dts/zynq-7000.dtsi index 57a7474..8d136af 100644 --- a/arch/arm/dts/zynq-7000.dtsi +++ b/arch/arm/dts/zynq-7000.dtsi @@ -76,6 +76,23 @@ interrupts = <0 7 4>; interrupt-parent = <&intc>; clocks = <&clkc 12>; + + xlnx,channels { + #address-cells = <1>; + #size-cells = <0>; + channel@0{ + reg = <0>; + }; + channel@1{ + reg = <1>; + }; + channel@2{ + reg = <2>; + }; + channel@8{ + reg = <8>; + }; + }; }; can0: can@e0008000 { which is patched via u-boot-xlnx recipe SRC_URI_append_zc702-zynq7 += "file://0001-add-external-xadc-to-device-tree.patch" Part of me is a little suspicious that I patch it through u-boot-xlnx instead of device-tree, but I guess part of that is because the dtsi files are actually part of upstream u-boot by now... In any case, a core-image builds just fine, however the kernel doesn't seem to indicate that it's changed: root@zc702-zynq7:~# ls /proc/device-tree/amba/adc@f8007100/ clocks compatible interrupt-parent interrupts name reg root@zc702-zynq7:~# ls /sys/devices/soc0/amba/f8007100.adc/iio\:device0/ dev in_temp0_raw in_voltage0_vccint_scale in_voltage2_vccbram_raw in_voltage3_vccpint_scale in_voltage5_vccoddr_raw in_voltage6_vrefp_scale name sampling_frequency events in_temp0_scale in_voltage1_vccaux_raw in_voltage2_vccbram_scale in_voltage4_vccpaux_raw in_voltage5_vccoddr_scale in_voltage7_vrefn_raw of_node subsystem in_temp0_offset in_voltage0_vccint_raw in_voltage1_vccaux_scale in_voltage3_vccpint_raw in_voltage4_vccpaux_scale in_voltage6_vrefp_raw in_voltage7_vrefn_scale power uevent where I expect to be able to see something like in_voltage8 or something new -- but I don't. Have I messed up the counting somehow? Thanks, Giordon -- Giordon Stark
-- _______________________________________________ meta-xilinx mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-xilinx
