netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* tcan4x5x on a Raspberry Pi
@ 2019-07-29 11:19 FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu)
  2019-07-29 18:07 ` Dan Murphy
  0 siblings, 1 reply; 4+ messages in thread
From: FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu) @ 2019-07-29 11:19 UTC (permalink / raw)
  To: linux-can, netdev; +Cc: dmurphy

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. 

Thanks,
Konstantin


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: tcan4x5x on a Raspberry Pi
  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   ` AW: " FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu)
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Murphy @ 2019-07-29 18:07 UTC (permalink / raw)
  To: FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu), linux-can, netdev

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

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 did the development on a BeagleBone Black.

Dan

> Thanks,
> Konstantin
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* AW: tcan4x5x on a Raspberry Pi
  2019-07-29 18:07 ` Dan Murphy
@ 2019-08-09 16:46   ` FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu)
  2019-08-09 19:49     ` Wolfgang Grandegger
  0 siblings, 1 reply; 4+ messages in thread
From: FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu) @ 2019-08-09 16:46 UTC (permalink / raw)
  To: Dan Murphy, linux-can, netdev


> 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
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: tcan4x5x on a Raspberry Pi
  2019-08-09 16:46   ` AW: " FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu)
@ 2019-08-09 19:49     ` Wolfgang Grandegger
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Grandegger @ 2019-08-09 19:49 UTC (permalink / raw)
  To: FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu),
	Dan Murphy, linux-can, netdev

Hello Konstantin,

m 09.08.19 um 18:46 schrieb FIXED-TERM Buecheler Konstantin
(ETAS-SEC/ECT-Mu):
> 
>> 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.

Before fiddling with the dynamic device tree, I would try to patch
normal device tree source files first.

Wolfgang

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-08-09 19:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` AW: " FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu)
2019-08-09 19:49     ` Wolfgang Grandegger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).