On 12/6/20 10:23 PM, Sven Schuchmann wrote: >> Von: Marc Kleine-Budde >> Gesendet: Sonntag, 6. Dezember 2020 21:49 >> >> On 12/6/20 9:36 PM, Sven Schuchmann wrote: >>>> -----Ursprüngliche Nachricht----- >>>> Von: Marc Kleine-Budde >>>> 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: Hmm, is the clk framework overlay aware? I think this is not a CAN specific issue. Maybe open an issue on the linux-rpi kernel or try the latest rpi linux-5.10 kernel. If you open an issue, please add me, I'm @marckleinebudde on github. 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 |