set up ad7190 support for imx6sx SOM (device tree)

I need to set up an ad7190 IC connected to the system SPI bus using the device tree.

According my current linux kernel (4.1.15) the IC is supported by the ad7192.c driver (see [2]). I already checked the docu from AnalogDevices (see [1]).

I already configured my SPI bus including chip select (see [3]) and tested the interface successfully. Than I added the device tree node from [1] and edited the SPI and GPIO for interrupt (see [4]. Afterwards I am able to compile the kernel and run the system. But I fail to check the device in thy system, because /sys/bus/iio/devices/ is empty.

How can I debug what the problem is? Is my device tree misconfigured?

[1]:

https://wiki.analog.com/resources/tools-software/linux-drivers/iio-adc/ad7192

[2]:

$ grep ID_AD7190 drivers/staging/iio/adc/ad7192.c
#define ID_AD7190 0x4

[3]:

/* SPI_A implemented via ECSPI5, 1x CS */
&ecspi5 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_ecspi5>;
        fsl,spi-num-chipselects = <1>;
        cs-gpios = <&gpio4 28 0>;
        status = "okay";

        spidev@0 {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "linux,spidev";
                spi-max-frequency = <20000000>;
                reg = <0>;
        };
};

[4]:

/ {

	fragment@0 {
		target-path = "/";
		dvdd: fixedregulator@0 {
			compatible = "regulator-fixed";
			regulator-name = "fixed-supply";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			regulator-boot-on;
		};
	};

	fragment@1 {
		target-path = "/";
		avdd: fixedregulator@1 {
			compatible = "regulator-fixed";
			regulator-name = "fixed-supply2";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			regulator-boot-on;
		};
	};

	fragment@3 {
		target = <&ecspi5>; /* SPI_A */
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";

		ad7190@0 {
			compatible = "adi,ad7190";
			reg = <0>;
			spi-max-frequency = <1000000>;
			spi-cpol;
			spi-cpha;
			#interrupt-cells = <2>;
			interrupts = <23 0x2>;
			interrupt-parent = <&gpio4>;
			dvdd-supply = <&dvdd>;
			avdd-supply = <&avdd>;

			adi,reference-voltage-mv = /bits/ 16  <3300>;
			adi,clock-source-select = [02];
			adi,refin2-pins-enable;
			adi,rejection-60-Hz-enable;
			adi,chop-enable;
			adi,buffer-enable;
			adi,burnout-currents-enable;
			adi,sinc3-filter-enable;
			adi,unipolar-enable;
		};
	};
};

Parents Reply Children
No Data