IIO node for power-Pc architecture(T1024RDB)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

IIO node for power-Pc architecture(T1024RDB)

ソリューションへジャンプ
1,580件の閲覧回数
Kasturi_s
Contributor III

Dear Team,

I am using AD7689 power monitoring ADC on the T1024rdb processor(powerpc-based architecture), and I cannot get node iio in rootfs (/sys/bus/).

I have enabled iio related configuration in menuconfig, attached for reference.

Will iio node in /sys/bus/ be created in PowerPC architecture ?

Kasturi_s_0-1665466852111.png

 

Thanks in advance,

Kasturi.

0 件の賞賛
返信
1 解決策
1,377件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Please upgrade Linux Kernel to version 5.0 or above which includes AD7949 driver.

元の投稿で解決策を見る

0 件の賞賛
返信
15 返答(返信)
1,569件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to Documentation/devicetree/bindings/iio/adc/ad7949.txt for dts definition.

For example:

spi@110000 {

 

adc@3{

                                              #address-cells = <0x1>;

                                              #size-cells = <0x1>;

                                              compatible = "adi,ad7689";

                                              reg = <0x3>;

                                              spi-max-frequency = <16000000>;

                               };

};

 

In Linux Kernel configuration file, please define CONFIG_AD7949.

0 件の賞賛
返信
1,564件の閲覧回数
Kasturi_s
Contributor III

Thanks yipingwang for your quick response.

DTS is configured as below,

Kasturi_s_1-1665568663726.png

Kconfig is configured as below,

Kasturi_s_0-1665568537990.png

Enabled it in menuconfig as below,

Kasturi_s_2-1665580552310.png

But still not able to get iio node in rootfs(/sys/bus)

Kasturi_s_3-1665580703012.png

Please let me know if anything else has to be configured.

Thanks in advance,

Kasturi.

0 件の賞賛
返信
1,544件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Would you please provide your Linux Kernel booting up log and dts file?

0 件の賞賛
返信
1,534件の閲覧回数
Kasturi_s
Contributor III

Hello yipingwang,

Please find attached the kernel boot log and DTS file.

What I suspect is that driver is searching for the iio node, since the iio node is not there, the driver is not inserted.

Thanks.

0 件の賞賛
返信
1,531件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Please modify the following in dts file.

ad7949@1 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "adi,ad7689";
reg = <0x3>;
spi-max-frequency = <16000000>;
};

Modify to:

ad7949@1 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "adi,ad7689";
reg = <0x1>;
spi-max-frequency = <16000000>;
};

0 件の賞賛
返信
1,526件の閲覧回数
Kasturi_s
Contributor III

Hello yipingwang,

I could not see any difference in the behavior after changing the reg = <0x1>; 

Attached is the log for reference.

0 件の賞賛
返信
1,518件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Please check the following on your target board.

cat /sys/bus/spi/devices/spi32766.1/of_node/compatible

Please check your Linux Kernel source code drivers/iio/adc/ad7949.c whether "adi,ad7689" is valid.

0 件の賞賛
返信
1,514件の閲覧回数
Kasturi_s
Contributor III

Hello yipingwang,

In linux Kernel source code drivers/iio/adc/ad7949.c , "adi,ad7689" is valid.

Attaching the driver source code for your reference.

Kasturi_s_0-1666272023377.png

Thank you.

0 件の賞賛
返信
1,479件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Please check the following on your target board.

cat /sys/bus/spi/devices/spi32766.1/of_node/compatible

0 件の賞賛
返信
1,472件の閲覧回数
Kasturi_s
Contributor III

Below is the log.

root@t1024rdb:/sys/firmware/devicetree/base/soc@ffe000000/spi@110000/ad7949@1# cat compatible
adi,ad7689

root@t1024rdb:/sys/firmware/devicetree/base/soc@ffe000000/spi@110000/ad7949@1# cat name
ad7949

 

When I build the driver as a module and try to insert it in the kernel, I get the below error.

==============================================================

root@t1024rdb:~# modprobe ad7949.ko
modprobe: module ad7949.ko not found in modules.dep
root@t1024rdb:~# insmod ad7949.ko
[ 184.015140] ad7949: Unknown symbol devm_iio_device_alloc (err 0)
[ 184.021239] ad7949: Unknown symbol iio_device_unregister (err 0)
[ 184.027274] ad7949: Unknown symbol iio_device_register (err 0)
insmod: can't insert 'ad7949.ko': unknown symbol in module, or unknown parameter
root@t1024rdb:~# 

=============================================================

0 件の賞賛
返信
1,470件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Would you please check whether following and let me know the result?

cat /sys/bus/spi/devices/spi32766.1/of_node/compatible

0 件の賞賛
返信
1,466件の閲覧回数
Kasturi_s
Contributor III
root@t1024rdb:~# cat /sys/bus/spi/devices/spi32766.1/of_node/compatible
adi,ad7689
0 件の賞賛
返信
1,425件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Please run the following command in Linux and let me know the result.

 zcat /proc/config.gz | grep CONFIG_AD7949

In your booting up log, it seems that your Linux Kernel image is built on 2019-12-26.

0 件の賞賛
返信
1,380件の閲覧回数
Kasturi_s
Contributor III

Hello yipingwang,

I could get the below output,

**********************************************************
root@t1024rdb:~# zcat /proc/config.gz | grep CONFIG_AD7949
CONFIG_AD7949=m
**********************************************************

The image does not boot completely when the module is built with the image. Attached is the boot log for the same. So built it as a module and tried to modprobe it. That shows the "module ad7949.ko not found in modules. dep" error.

For Information:
The Kernel version that I am using is 4.1.
But the AD7949 driver support was found from kernel version 5.0 and above.
Will that be the reason, it is not working straightforwardly?
Do I need to include any dependencies?

 

0 件の賞賛
返信
1,378件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Please upgrade Linux Kernel to version 5.0 or above which includes AD7949 driver.

0 件の賞賛
返信