Adding SJA1000 to CS3 of IFC in T2080qds

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Adding SJA1000 to CS3 of IFC in T2080qds

1,380 次查看
anshulkhare
Contributor III

Hello,

I have a custom board, which is using t2080qds power pc processor. chip select 0 to 2 are used for various memory and FPGA. The address for those were given in system memory of SDK document. Now I have additional SJA1000 CAN controller connected to chip select 3 (CS3). How to add the address range for the same in device tree.

Also will it not add any conflict to add parallel CAN controller to FPGA on IFC

I am not sure what to add for reg = < 3 ? ?>

Thank you!!

P.S: Do I have to update u-boot too? As I am planning only to use CAN controller only after linux comes up in application. I am using YOCTO!

0 项奖励
5 回复数

1,234 次查看
anshulkhare
Contributor III

I have configured  CSPR,CSOR and AMASK of IFC for can controller in u-boot. I am confused about FTIM0 - FTIM3 registers.

Can anyone help, how to configure those for general ASIC devices such as SJA1000 ( can controller).

Thanks in advance!!

0 项奖励

1,234 次查看
anshulkhare
Contributor III

Thank you ufedor‌.

As I mentioned I am using SJA1000 CAN controller, I have enabled SJA1000 driver via menuconfig.

Does it support IFC interface, or I have to write a driver( can I find the driver anywhere else)!

I updated the device tree:

can1: can@3,0 {

                compatible = "nxp,sja1000";

                reg = <3 0x0 0x80>;

                interrupts = <10 8>;

                interrupt_parent = <&mpic>;

                nxp,external-clock-frequency = <8000000>;

};

Enabled SJA1000 driver!!

I am getting the below error while accessing can1 via socket commands:

    Device "can1"  does not exist

0 项奖励

1,234 次查看
ufedor
NXP Employee
NXP Employee

Does it support IFC interface

IFC interface can be used to connect the SJA1000.

or I have to write a driver

Interface is a hardware connection, while driver - software.

So driver is also required considering that hardware connection is implemented.

Please refer to the "SJA1000 Stand-alone CAN controller":

https://www.nxp.com/docs/en/application-note/AN97076.pdf 

and T2080RM, Chapter 13 Integrated Flash Controller (IFC):

https://www.nxp.com/webapp/Download?colCode=T2080RM 

Possible IFC GPCM connection to the SJA1000 is:

IFC_AD0 - AD7

...

IFC_AD7 - AD0

IFC_OE_B - /RD

IFC_WE0_B - /WR

IFC_AVD - ALE

IFC_CS3_B - /CS

SJA1000 MODE - VDD

0 项奖励

1,234 次查看
anshulkhare
Contributor III

After dmesg,

I see below error in sja1000_isa : insufficent parameters supplied.

After debugging i found mem[idx] , irq[idx] and port[idx] value is 0.

Driver has MODULE_PARAM_DESC function to pick the arguments via command line.

But my driver has to be loaded statically, so I cant pass arguments. I was expecting it would take the information from device tree.

Am I missing something?

0 项奖励

1,234 次查看
ufedor
NXP Employee
NXP Employee

will it not add any conflict to add parallel CAN controller to FPGA on IFC

You need to define correct address range for the CS3, for example, in the T2080QDS DTS ranges are as follows:

ranges = <0 0 0xf 0xe8000000 0x08000000   
          2 0 0xf 0xff800000 0x00010000
          3 0 0xf 0xffdf0000 0x00008000>;

I am not sure what to add for reg = < 3 ? ?>

The "reg" entry contains 3 cells: the chip-select number, the offset, and the length, so in the described case it has to be:

reg = 0 len>.

For the "len" value refer to the SJA1000 Data Sheet.

Do I have to update u-boot too?

This is not required.

0 项奖励