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

> Von: Marc Kleine-Budde <mkl@pengutronix.de>
> Gesendet: Sonntag, 6. Dezember 2020 21:49
> 
> 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?

The diff shows no difference, the output is always:
                                 enable  prepare  protect                                duty
   clock                          count    count    count        rate   accuracy phase  cycle
---------------------------------------------------------------------------------------------
 fw-clk-m2mc                          0        0        0   120000000          0     0  50000
 fw-clk-v3d                           0        0        0   250000000          0     0  50000
 fw-clk-core                          0        0        0   200000000          0     0  50000
 fw-clk-arm                           0        0        0   600000000          0     0  50000
 108MHz-clock                         0        0        0   108000000          0     0  50000
 otg                                  0        0        0   480000000          0     0  50000
 osc                                  3        3        0    54000000          0     0  50000
    tsens                             0        0        0     3375000          0     0  50000
    otp                               0        0        0    13500000          0     0  50000
    timer                             0        0        0     1000000          0     0  50000
    plld                              5        5        0  3000000091          0     0  50000
       plld_dsi1                      1        1        0    11718751          0     0  50000
       plld_dsi0                      1        1        0    11718751          0     0  50000
       plld_per                       2        2        0   750000023          0     0  50000
          emmc2                       1        1        0   100000003          0     0  50000
          emmc                        0        0        0   250000007          0     0  50000
          uart                        0        0        0    48000001          0     0  50000
       plld_core                      1        1        0   600000019          0     0  50000
    pllc                              3        3        0  2999999988          0     0  50000
       pllc_per                       1        1        0   599999998          0     0  50000
       pllc_core2                     0        0        0    11718750          0     0  50000
       pllc_core1                     0        0        0    11718750          0     0  50000
       pllc_core0                     2        2        0   999999996          0     0  50000
          vpu                         3        3        0   500000000          0     0  50000
             aux_spi2                 0        0        0   500000000          0     0  50000
             aux_spi1                 0        0        0   500000000          0     0  50000
             aux_uart                 0        0        0   500000000          0     0  50000
             peri_image               0        0        0   500000000          0     0  50000
    plla                              2        2        0  2999999988          0     0  50000
       plla_ccp2                      0        0        0    11718750          0     0  50000
       plla_dsi0                      0        0        0    11718750          0     0  50000
       plla_core                      1        1        0   499999998          0     0  50000
          h264                        0        0        0   499999998          0     0  50000
          isp                         0        0        0   499999998          0     0  50000
 dsi1p                                0        0        0           0          0     0  50000
 dsi0p                                0        0        0           0          0     0  50000
 dsi1e                                0        0        0           0          0     0  50000
 dsi0e                                0        0        0           0          0     0  50000
 cam1                                 0        0        0           0          0     0  50000
 cam0                                 0        0        0           0          0     0  50000
 dpi                                  0        0        0           0          0     0  50000
 tec                                  0        0        0           0          0     0  50000
 smi                                  0        0        0           0          0     0  50000
 slim                                 0        0        0           0          0     0  50000
 gp2                                  0        0        0           0          0     0  50000
 gp1                                  0        0        0           0          0     0  50000
 gp0                                  0        0        0           0          0     0  50000
 dft                                  0        0        0           0          0     0  50000
 aveo                                 0        0        0           0          0     0  50000
 pcm                                  0        0        0           0          0     0  50000
 pwm                                  0        0        0           0          0     0  50000
 sdram                                0        0        0           0          0     0  50000
 hsm                                  0        0        0           0          0     0  50000
 vec                                  0        0        0           0          0     0  50000

  Sven

--
Sven Schuchmann
Schleißheimer Soft- und
Hardwareentwicklung GmbH
Am Kalkofen 10
61206 Nieder-Wöllstadt
GERMANY
Phone: +49 6034 9148 711
Fax: +49 6034 9148 91
Email: schuchmann@schleissheimer.de

  reply	other threads:[~2020-12-06 21:25 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
2020-12-06 21:23               ` Sven Schuchmann [this message]
2020-12-06 22:00                 ` AW: " 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=DB8P190MB06345524F4EB1E411B4CE3D1D9CF0@DB8P190MB0634.EURP190.PROD.OUTLOOK.COM \
    --to=schuchmann@schleissheimer.de \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.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.