Hi. I try to read ad7195 ADC. I compiled kernel module which contains
device tree patch.
After that I`m writing related dts file reding ADC over SPI. Such as:
*/* AD7192 */*
*/dts-v1/;*
*/plugin/;*
*/ {*
* compatible = "ti,beaglebone-black", "ti,am335x-bone";*
* /* identification */*
* part-number = "AD7192-SPI";*
* version = "00A0";*
* exclusive-use =*
* /* the pin header uses */*
* "P9.28", /* spi: spi1_cs0 */*
* "P9.29", /* spi: spi1_d0 */*
* "P9.30", /* spi: spi1_d1 */*
* "P9.31", /* spi: spi1_sclk */*
* "p9.27", /* spi irq: gpio3_19 */*
* /* the hardware ip uses */*
* "gpio3_19",*
* "spi1"; *
* fragment@0 {*
* target = <&am33xx_pinmux>;*
* __overlay__ {*
* beagle_spi1_pins: pinmux_beagle_spi1_pins {*
* pinctrl-single,pins = <*
* 0x190 0x33 /* mcasp0_aclkx.spi1_sclk, RX_ENABLED | PULLUP | MODE3 */*
* 0x194 0x33 /* mcasp0_fsx.spi1_d0, RX_ENABLED | PULLUP | MODE3 */*
* 0x198 0x13 /* mcasp0_axr0.spi1_d1, OUTPUT_PULLUP | MODE3 */*
* 0x19c 0x13 /* mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */*
* >;*
* };*
* beagle_ad7192_pins: pinmux_beagle_ad7192_pins {*
* pinctrl-single,pins = <*
* 0x1a4 0x17 /* mcasp0_fsr.gpio3_19, RX_ENABLED | PULLUP | MODE7 */*
* >;*
* };*
* };*
* };*
* fragment@1 {*
* target = <&spi1>; *
* __overlay__ {*
* status = "okay";*
* pinctrl-names = "default";*
* pinctrl-0 = <&beagle_spi1_pins>;*
* #address-cells = <1>;*
* #size-cells = <0>;*
* ad7192@0{*
* compatible = "ad,ad7192";*
* reg = <0>;*
* spi-max-frequency = <500000>;*
* spi-cpol;*
* spi-cpha;*
* pinctrl-names = "default";*
* pinctrl-0 = <&beagle_ad7192_pins>;*
* interrupt-parent = <&gpio3>;*
* interrupts = <19 0x0>;*
* irq-gpio = <&gpio3 19 0>;*
* adi,reference-voltage-mv = <5000>;*
* adi,clock-source-select = <2>;*
* adi,refin2-pins-enable;*
* adi,*
* #io-channel-cells = <1>;*
* };*
* };*
* };*
*};*
While applying to slots, some errors occurs and give this output:
[ 188.237248] ad7192 spi1.0: Error applying setting, reverse things back
[ 188.253865] ad7192 spi1.0: reference voltage undefined
[ 188.277796] ad7192 spi1.0: device ID query failed (0xF)
Is dtc structure and flow correct ? Any suggestions ?
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.