From: Wolfgang Grandegger <wg@grandegger.com>
To: wolfgang.netbal@sigmatek.at
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] Flexcan RT driver registration failed
Date: Tue, 05 May 2015 15:32:08 +0200 [thread overview]
Message-ID: <049c19b3633199cac11cca95cdff99ad@grandegger.com> (raw)
In-Reply-To: <5548A805.60401@sigmatek.at>
On Tue, 05 May 2015 13:22:45 +0200, Wolfgang Netbal
<wolfgang.netbal@sigmatek.at> wrote:
> Dear All,
>
> I have a custom board with an imx6dl using freescale yocto 3.10.53 with
> Xenomai 2.6.4.
> The probe function works fine while booting the kernel
>
> RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team
> rtcan: registered rtcan0
> flexcan 2090000.can: RTCAN device registered (reg_base=d0c00000,
> irq=142, clock=66000000)
> rtcan: registered rtcan1
> flexcan 2094000.can: RTCAN device registered (reg_base=d0c08000,
> irq=143, clock=66000000)
>
> After Linux started I call the function flexcan_mode_start() and get the
> following message and CAN connections doesn't work.
>
> rtcan0: Failed to softreset can module (mcr=0x5b80000f)
>
> I have a working configuration for this board using Kernel 3.0.43 and
> Xenomai 2.6.2.1
>
> RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team
> flexcan netdevice driver
> rtcan: registered rtcan0
> flexcan imx6q-flexcan.0: RTCAN device registered (reg_base=e0968000,
> irq=142, clock=30000000)
> rtcan: registered rtcan1
> flexcan imx6q-flexcan.1: RTCAN device registered (reg_base=e0970000,
> irq=143, clock=30000000)
> ...
> rtcan0: writing ctrl=0x03292005
>
> It seems that the clock is the difference so I checked the values of
> register CCM_CCGR0
> 3.0.43 address 0x20C4068 is set to 0x7fc03f
> 3.10.53 address 0x20C4068 is set to 0x4cc00f
>
> so on kernel 3.10.53 are the serial clocks for can disabled.
>
> If anyone has a hint for me how to activate the serial clock in register
> CCM_CCGR0 and change the clock to 30000000 that would be great.
Have a look into the directory "arch/arm/boot/dts" of a recent kernel tree
and execute therein "grep LEXCAN[12] *.dts*". There are various boards
setting the pins you mention below. Maybe you find some matching hardware.
> Here is the part of the devicetree used to configure flexcan.
>
>
> #include "imx6dl.dtsi"
>
> / {
>
> };
>
> /*
> * PAD settings
> */
> &iomuxc {
> flexcan1 {
> pinctrl_flexcan1_sigmatek: flexcan1grp-sigmatek {
> fsl,pins = <
> MX6QDL_PAD_SD3_CLK__FLEXCAN1_RX NO_PAD_CTRL
> MX6QDL_PAD_SD3_CMD__FLEXCAN1_TX NO_PAD_CTRL
> >;
> };
> };
>
> flexcan2 {
> pinctrl_flexcan2_sigmatek: flexcan2grp-sigmatek {
> fsl,pins = <
> MX6QDL_PAD_SD3_DAT1__FLEXCAN2_RX NO_PAD_CTRL
> MX6QDL_PAD_SD3_DAT0__FLEXCAN2_TX NO_PAD_CTRL
> >;
> };
> };
> };
>
> /*
> * CAN
> */
> &flexcan1 {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_flexcan1_sigmatek>;
> status = "okay";
> };
>
> &flexcan2 {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_flexcan2_sigmatek>;
> status = "okay";
> };
Hope that already helps.
Wolfgang.
next prev parent reply other threads:[~2015-05-05 13:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 11:22 [Xenomai] Flexcan RT driver registration failed Wolfgang Netbal
2015-05-05 13:32 ` Wolfgang Grandegger [this message]
2015-05-06 8:26 ` Wolfgang Netbal
2015-05-06 8:51 ` Wolfgang Grandegger
2015-05-06 14:16 ` Wolfgang Netbal
2015-05-06 14:33 ` Wolfgang Grandegger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=049c19b3633199cac11cca95cdff99ad@grandegger.com \
--to=wg@grandegger.com \
--cc=wolfgang.netbal@sigmatek.at \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.