All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Sven Schuchmann <schuchmann@schleissheimer.de>,
	"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: AW: AW: mcp251xfd No Oscillator (clock) defined
Date: Sun, 6 Dec 2020 21:48:36 +0100	[thread overview]
Message-ID: <95c71974-290a-89c5-2297-827a3081a84e@pengutronix.de> (raw)
In-Reply-To: <DB8P190MB0634B660BCFD655ED5D96E9FD9CF0@DB8P190MB0634.EURP190.PROD.OUTLOOK.COM>


[-- Attachment #1.1: Type: text/plain, Size: 2876 bytes --]

On 12/6/20 9:36 PM, Sven Schuchmann wrote:
>> -----Ursprüngliche Nachricht-----
>> Von: Marc Kleine-Budde <mkl@pengutronix.de>
>> Gesendet: Sonntag, 6. Dezember 2020 21:15
>>>> As it's now working in general, Sven can test from setup under Linux.
>>>
>>> if I try to load under linux with:
>>> sudo dtoverlay mcp251xfd spi0-0 interrupt=25
>>>
>>> I get:
>>> [   36.154548] CAN device driver interface
>>> [   36.158644] mcp251xfd spi0.0: No Oscillator (clock) defined.
>>
>> The clock is missing. Let's see if it is added to the DT.
>>
>> Do a diff of the DT before and after applying the overlay.
>>
>> | sudo dtc -I fs /proc/device-tree -o before
>> | sudo dtoverlay mcp251xfd spi0-0 interrupt=25
>> | sudo dtc -I fs /proc/device-tree -o after
>> | diff -u before after
>>
>> Send the output of the diff.
> Here is the diff:
> --- before	2020-12-06 20:31:40.430361119 +0000
> +++ after	2020-12-06 20:32:35.939656243 +0000
> @@ -35,6 +35,13 @@
>  			clock-frequency = < 0x337f980 >;
>  		};
>  
> +		mcp251xfd-spi0-0-osc {
> +			compatible = "fixed-clock";
> +			#clock-cells = < 0x00 >;
> +			phandle = < 0xde >;
                                  ^^^^^^^^
> +			clock-frequency = < 0x2625a00 >;
> +		};
> +
>  		clk-usb {
>  			compatible = "fixed-clock";
>  			#clock-cells = < 0x00 >;
> @@ -1029,6 +1036,12 @@
>  				brcm,function = < 0x04 >;
>  			};
>  
> +			mcp251xfd_spi0_0_pins {
> +				brcm,pins = < 0x19 >;
> +				phandle = < 0xdd >;
> +				brcm,function = < 0x00 >;
> +			};
> +
>  			uart1_pins {
>  				brcm,pins;
>  				phandle = < 0x15 >;
> @@ -1546,6 +1559,18 @@
>  			dmas = < 0x0b 0x06 0x0b 0x07 >;
>  			pinctrl-names = "default";
>  
> +			mcp251xfd@0 {
> +				compatible = "microchip,mcp251xfd";
> +				clocks = < 0xde >;
                                         ^^^^^^^^

That looks good so far.

> +				interrupt-parent = < 0x0f >;
> +				interrupts = < 0x19 0x08 >;
> +				phandle = < 0xdf >;
> +				reg = < 0x00 >;
> +				pinctrl-0 = < 0xdd >;
> +				spi-max-frequency = < 0x1312d00 >;
> +				pinctrl-names = "default";
> +			};
> +
>  			spidev@1 {
>  				compatible = "spidev";
>  				#address-cells = < 0x01 >;
> @@ -1557,6 +1582,7 @@
>  
>  			spidev@0 {
>  				compatible = "spidev";
> +				status = "disabled";
>  				#address-cells = < 0x01 >;
>  				#size-cells = < 0x00 >;
>  				phandle = < 0xa6 >;

Is the clock detcted and loaded by the clock framework?

Can you create a diff for "/sys/kernel/debug/clk/clk_summary" before and after
loading the overlay?

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-12-06 20:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-06 10:18 mcp251xfd No Oscillator (clock) defined Sven Schuchmann
2020-12-06 10:32 ` Marc Kleine-Budde
2020-12-06 12:40   ` AW: " Sven Schuchmann
2020-12-06 12:57     ` Marc Kleine-Budde
2020-12-06 14:56     ` Patrick Menschel
2020-12-06 16:28       ` AW: " Sven Schuchmann
2020-12-06 18:31       ` Marc Kleine-Budde
2020-12-06 19:15         ` Patrick Menschel
2020-12-06 19:26   ` Kurt Van Dijck
2020-12-06 19:34     ` Marc Kleine-Budde
2020-12-06 19:56       ` AW: " Sven Schuchmann
2020-12-06 20:14         ` Marc Kleine-Budde
2020-12-06 20:36           ` AW: " Sven Schuchmann
2020-12-06 20:48             ` Marc Kleine-Budde [this message]
2020-12-06 21:23               ` AW: " Sven Schuchmann
2020-12-06 22:00                 ` Marc Kleine-Budde
2020-12-07  9:35                   ` AW: " Sven Schuchmann

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=95c71974-290a-89c5-2297-827a3081a84e@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=schuchmann@schleissheimer.de \
    /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.