RTC interrupt num problem

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

RTC interrupt num problem

2,140件の閲覧回数
muaxi8
Contributor V

lx2080 Custom board.

I have mounted an RTC device under I2C-2, but how do I determine its interrupt number, which I need

to configure in the device tree。

&i2c2 {
status = "okay";
rx8111@32 {
compatible = "epson,rx8111";
reg = <0x32>;
//interrupts = <0 150 0x4>;
 };

The interrupt number is incorrectly configured, causing device loading failure,kernel log:

root@TinyLinux:~# dmesg|grep rtc
[ 4.035145] ftm-alarm 2800000.timer: registered as rtc1
[ 4.045506] rtc-rx8111 2-0032: i2c_smbus_write_byte_data over rx8111_init_client
[ 4.056099] rtc-rx8111 2-0032: Init Success
[ 4.060279] rtc-rx8111 2-0032: IRQ supplied fail
[ 4.066136] rtc-rx8111 2-0032: registered as rtc0
[ 5.355119] fsl_dpaa2_ptp dprtc.0: Adding to iommu group 6
[ 6.090951] rtc-rx8111 2-0032: setting system clock to 2020-12-10T20:08:56 UTC (1607630936)
root@TinyLinux:~#

Circuit schematic diagram:

muaxi8_1-1637638513076.png

 

muaxi8_0-1637638481262.png

 

0 件の賞賛
返信
3 返答(返信)

2,128件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the following definition in fsl-ls1046a-rdb.dts, it seems that no need to specify the interrupt number.

&i2c3 {
status = "okay";

rtc@51 {
compatible = "nxp,pcf2129";
reg = <0x51>;
};
};

0 件の賞賛
返信

2,112件の閲覧回数
muaxi8
Contributor V

If the interrupt number is not specified, the driver will load an error。

root@localhost:~# dmesg|grep rtc
[ 3.708537] ftm-alarm 2800000.timer: registered as rtc1
[ 3.718904] rtc-rx8111 2-0032: i2c_smbus_write_byte_data over rx8111_init_client
[ 3.729490] rtc-rx8111 2-0032: Init Success
[ 3.733668] rtc-rx8111 2-0032: IRQ supplied fail
[ 3.739523] rtc-rx8111 2-0032: registered as rtc0
[ 5.047704] fsl_dpaa2_ptp dprtc.0: Adding to iommu group 6
[ 5.781579] rtc-rx8111 2-0032: setting system clock to 2020-12-10T20:20:29 UTC (1607631629)

 

 now , RTC interrupt  connected to the IRQ05 pin of the CPU, what's the interrupt

number of this pin, is it 5 ?

muaxi8_0-1637818614254.png

 

0 件の賞賛
返信

2,073件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

The following is defined in fsl-lx2160a-rdb.dts in LSDK 21.08.

&i2c4 {
status = "okay";

rtc@51 {
compatible = "nxp,pcf2129";
reg = <0x51>;
/* IRQ_RTC_B -> IRQ08, active low */
interrupts-extended = <&extirq 8 IRQ_TYPE_LEVEL_LOW>;
};
};

Please define your dts as the following.

&i2c2 {
status = "okay";
rx8111@32 {
compatible = "epson,rx8111";
reg = <0x32>;
interrupts-extended = <&extirq 5 IRQ_TYPE_LEVEL_LOW>;
 };

 

0 件の賞賛
返信