I am attempting to get first time access to my AD74412 on an i.MX8 variant hardware. I have added the AD74412 to the device tree but the AD74412 is not available under /sys/bus/iio/devices. Is there a problem with my device tree configuration or is there something else going wrong?
I am using kernel version 5.15. Here are some relevant device tree section for the SPI port and the attached AD74412 in my code:
regulators {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <0>;
...
ad74412_refin: regulator@7 {
compatible = "regulator-fixed";
reg = <7>;
regulator-name = "ad74412_refin";
regulator-min-microvolt = <2500000>;
regulator-max-microvolt = <2500000>;
enable-active-high;
regulator-always-on;
};
};
...
&ecspi3 {
#address-cells = <1>;
#size-cells = <0>;
num-cs = <1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi3>;
cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>;
status = "okay";
ad74412:ad74412@0 {
compatible = "adi,ad74412r";
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <1000000>;
spi-cpol;
refin-supply = <&ad74412_refin>;
status = "okay";
channel@0 {
reg = <0>;
adi,ch-func = <CH_FUNC_VOLTAGE_OUTPUT>;
};
channel@1 {
reg = <1>;
adi,ch-func = <CH_FUNC_VOLTAGE_OUTPUT>;
};
channel@2 {
reg = <2>;
adi,ch-func = <CH_FUNC_VOLTAGE_OUTPUT>;
};
channel@3 {
reg = <3>;
adi,ch-func = <CH_FUNC_VOLTAGE_OUTPUT>;
};
};
};
I see the ad74412 device tree configuration in the /proc/device-tree, but the ad74412 does not show up under /sys/bus/iio/devices section. Did I miss something in the device tree configuration, or is there something else I may have missed?