This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
hi
sdk version:
mcu_plus_sdk_am62ax_08_06_00_18
ti-processor-sdk-linux-am62axx-evm-08.06.00.45
we follow below link to use can on linux to test,but there has a problem,can't not receive data from remote (it can send some data to remote)
we send data successful ,but the tx count has not update,
then I check the code,the reason should be the irq has not generate
below is my test dts
--- a/ti-processor-sdk-linux-am62axx-evm-08.06.00.45/board-support/linux-kernel/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi +++ b/ti-processor-sdk-linux-am62axx-evm-08.06.00.45/board-support/linux-kernel/arch/arm64/boot/dts/ti/k3-am62a-mcu.dtsi @@ -25,7 +25,6 @@ mcu_pmx0: pinctrl@4084000 { #pinctrl-cells = <1>; pinctrl-single,register-width = <32>; pinctrl-single,function-mask = <0xffffffff>; - status = "disabled"; }; mcu_uart0: serial@4a00000 { @@ -124,4 +123,32 @@ mcu_gpio0: gpio@4201000 { clock-names = "gpio"; status = "disabled"; }; + + mcu_mcan0: can@4e00000 { + compatible = "bosch,m_can"; + reg = <0x00 0x4e00000 0x00 0x8000>, + <0x00 0x4e08000 0x00 0x200>; + reg-names = "message_ram", "m_can"; + power-domains = <&k3_pds 188 TI_SCI_PD_EXCLUSIVE>; + clocks = <&k3_clks 188 6>, <&k3_clks 188 1>; + clock-names = "hclk", "cclk"; + bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>,<GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "int0", "int1"; + status = "okay"; + }; + mcu_mcan1: can@4e10000 { + compatible = "bosch,m_can"; + reg = <0x00 0x4e10000 0x00 0x8000>, + <0x00 0x4e18000 0x00 0x200>; + reg-names = "message_ram", "m_can"; + power-domains = <&k3_pds 189 TI_SCI_PD_EXCLUSIVE>; + clocks = <&k3_clks 189 6>, <&k3_clks 189 1>; + clock-names = "hclk", "cclk"; + bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + interrupts = <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>,<GIC_SPI 248 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "int0", "int1"; + status = "okay"; + + }; }; --- a/ti-processor-sdk-linux-am62axx-evm-08.06.00.45/board-support/linux-kernel/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +++ b/ti-processor-sdk-linux-am62axx-evm-08.06.00.45/board-support/linux-kernel/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts @@ -233,6 +233,28 @@ hdmi_connector_in: endpoint { }; }; }; + transceiver1: can-phy0 { + compatible = "ti,tcan1042";//"bosch,m_can"; + #phy-cells = <0>; + max-bitrate = <5000000>; + }; + transceiver2: can-phy1 { + compatible = "ti,tcan1042";//"bosch,m_can"; + #phy-cells = <0>; + max-bitrate = <5000000>; + // pinctrl-names = "default"; + // pinctrl-0 = <&main_mcan0_gpio_pins_default>; + // standby-gpios = <&main_gpio0 65 GPIO_ACTIVE_HIGH>; + }; + + transceiver3: can-phy2 { + compatible = "ti,tcan1042";//"bosch,m_can"; + #phy-cells = <0>; + max-bitrate = <5000000>; + // pinctrl-names = "default"; + // pinctrl-0 = <&main_mcan5_gpio_pins_default>; + // standby-gpios = <&main_gpio0 66 GPIO_ACTIVE_HIGH>; + }; }; &main_pmx0 { @@ -412,7 +434,20 @@ AM62AX_IOPAD(0x164,PIN_OUTPUT, 7)/*(Y19) SCO-CAM_ERROR */ >; }; }; - +&mcu_pmx0 { + mcu_mcan0_pins_default: mcu-mcan0-pins-default { + pinctrl-single,pins = < + AM62AX_MCU_IOPAD(0x034, PIN_OUTPUT, 0) /* (C7) MCU_MCAN0_TX */ + AM62AX_MCU_IOPAD(0x038, PIN_INPUT, 0) /* (E8) MCU_MCAN0_RX */ + >; + }; + mcu_mcan1_pins_default: mcu-mcan1-pins-default { + pinctrl-single,pins = < + AM62AX_MCU_IOPAD(0x03c, PIN_OUTPUT, 0) /* (D7) MCU_MCAN1_TX*/ + AM62AX_MCU_IOPAD(0x040, PIN_INPUT, 0) /* (B9) MCU_MCAN1_RX */ + >; + }; +}; &main_gpio1 { status = "okay"; }; @@ -657,6 +692,8 @@ cpsw3g_phy1: ethernet-phy@1 { ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; ti,min-output-impedance; + /* On - Link, Blink - Activity, Off - No Link - Dual LED mode*/ + marvell,reg-init = <3 0x10 0 0x101e>; compatible = "ethernet-phy-id0141.0DD1", "ethernet-phy-ieee802.3-c22"; }; }; @@ -802,3 +839,25 @@ partition@7fc0000 { }; }; }; +&mcu_mcan0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&mcu_mcan0_pins_default>; +// phys = <&transceiver2>; + +}; +&mcu_mcan1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&mcu_mcan1_pins_default>; + // phys = <&transceiver3>; + +}; + + +&main_mcan0 { + status = "disabled"; + pinctrl-names = "default"; + pinctrl-0 = <&main_mcan0_pins_default>; + // phys = <&transceiver1>; +};
also I change the irq num like below a or b,Testing didn't work either
a
b
so why irq has not generate,irq domain? and how to connect interrupt routes
Hi,
Thank you for your query!
Our concerned expert will get back to you soon.
Regards,
Aparna
Hi,
The MCU MCAN devices are not connected to an interrupt internally. Is possible to switch to the 9.0 SDK? There is driver support to overcome this interrupt issue.
Best Regards,
Schuyler
Hi,
Interrupts are not used for the MCU domain MCAN interfaces. Is the issue that interrupts not being registered on MCU interfaces or are the frames not being received by the destination?
Best Regards,
Schuyler
interrupts not being registered on MCU interfaces
beause I send data to peer from PC,the irq on tx compelete has not update,so It's interrupts's problem
Since there is no activity for more than 6 months, please let us know whether this is still a problem.
Br, Tommy
Hi,
There is no interrupt routed to A53 from the MCU MCANs.
Hence interrupt will not be registered for MCU instances.
However, the MCU MCANs are supported from Linux. A polling technique is used to schedule the driver to run. A kernel timer(hr_timer) is used, and the driver sets this up.
So MCAN communication is possible, let us know if the customer still cannot send or receive data.
Regards,
Aparna