public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: "FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu)"  <fixed-term.Konstantin.Buecheler@escrypt•com>
To: Dan Murphy <dmurphy@ti•com>,
	"linux-can@vger•kernel.org" <linux-can@vger•kernel.org>,
	"netdev@vger•kernel.org" <netdev@vger•kernel.org>
Subject: AW: tcan4x5x on a Raspberry Pi
Date: Fri, 9 Aug 2019 16:46:43 +0000	[thread overview]
Message-ID: <ee351bd74b764759bb0258af3651bd4a@escrypt.com> (raw)
In-Reply-To: <d1badcdb-7635-705d-35d5-448297e8fafa@ti.com>


> Konstantin

>> On 7/29/19 6:19 AM, FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu) wrote:
>> Hi all,
>>
>> I am currently working on a project where I am trying to use the tcan4550 chip with a Raspberry PI 3B.
>> I am struggling to create a working device tree overlay file for the Raspberry Pi.
>> Has anyone here tried this already? I would appreciate any help.

> Are you using the driver from net-next?

> https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/tree/drivers/net/can/m_can

Yes, I am using the driver from net-next. 


> DT documentation here

> https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/tree/Documentation/devicetree/bindings/net/can/tcan4x5x.txt

I saw this documentation but it didn’t help much (As I said, I don’t have much experience with device trees) . My dts file currently looks like this:  

/dts-v1/;
/plugin/;

/ {
    compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709";
    fragment@0 {
        target = <&spi0>;
	__overlay__ {
            status = "okay";
	    spidev@0{
	        status = "disabled";
	    };
	};
    };

    fragment@2 {
        compatible = "bosch, m_can";
	target = <&spi0>;
	__overlay__ {
	    tcan4x5x: tcan4x5x@0 {
	             compatible = "ti,tcan4x5x";
                          reg = <0>;
		#address-cells = <1>;
                         #size-cells = <1>;
		spi-max-frequency = <10000000>;
                         bosch,mram-cfg = <0x0 0 0 32 0 0 1 1>;
		data-ready-gpios = <&gpio 23 0>;
		device-wake-gpios = <&gpio 24 1>;
				
	    };		
	};
    };
};


Checking dmesg I always see these errors:
[    5.409051] tcan4x5x spi0.0: no clock found
[    5.409064] tcan4x5x spi0.0: no CAN clock source defined
[    5.409125] tcan4x5x spi0.0: data-ready gpio not defined
[    5.409135] tcan4x5x spi0.0: Probe failed, err=-22

I already fixed the clock issue once by doing something like this:
clocks = <&can0_osc>,
              <&can0_osc>;
clock-names = "hclk", "cclk";
But that didn’t fix the " data-ready gpio not defined" error.


> I did the development on a BeagleBone Black.

> Dan

> Thanks,
> Konstantin
>

  reply	other threads:[~2019-08-09 16:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-29 11:19 tcan4x5x on a Raspberry Pi FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu)
2019-07-29 18:07 ` Dan Murphy
2019-08-09 16:46   ` FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu) [this message]
2019-08-09 19:49     ` 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=ee351bd74b764759bb0258af3651bd4a@escrypt.com \
    --to=fixed-term.konstantin.buecheler@escrypt$(echo .)com \
    --cc=dmurphy@ti$(echo .)com \
    --cc=linux-can@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox