(subset) [PATCH v9 0/6] riscv: sophgo: add clock support for Sophgo CV1800/SG2000 SoCs

Michael Opdenacker michael.opdenacker at bootlin.com
Mon Apr 15 00:44:32 PDT 2024


Hi Inochi

On 4/14/24 at 11:41, Inochi Amaoto wrote:
>> Gotcha for the CONFIG_CLK_SOPHGO_CV1800 setting. However, I'm confused. Why
>> is this setting available in linux-next, but neither in
>> git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git ("master" and
>> "for-next") nor in github.com/sophgo/linux.git ("master" and "for-next") ?
> At now, we only maintain the dts related change, but not the driver
> code. The driver code is usually applied by the subsystem maintainer.
> This is why you only see the clk changes in the linux-next.
>
>> What's the tree used to push to linux-next?
>>
> As you see, the driver code applied to the clk/for-next. That is the
> tree used to push.

It makes perfect sense, thanks!

So, I tried to boot my Milk-V Duo S board with the latest linux-next 
kernel (with CONFIG_CLK_SOPHGO_CV1800=y). Here's what I'm getting:

[    1.933301] mmc0: SDHCI controller on 4310000.mmc [4310000.mmc] using ADMA 64-bit
[    1.947274] Legacy PMU implementation is available
[    1.954001] clk: Disabling unused clocks
[    1.959283] PM: genpd: Disabling unused power domains
[    1.964840] ALSA device list:
[    1.968165]   No soundcards found.
[    1.975652] dw-apb-uart 4140000.serial: forbid DMA for kernel console
[    2.133075] mmc0: Internal clock never stabilised.
[    2.138256] mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
[    2.145082] mmc0: sdhci: Sys addr:  0x00000000 | Version:  0x00000000
[    2.151906] mmc0: sdhci: Blk size:  0x00000000 | Blk cnt:  0x00000000
[    2.158725] mmc0: sdhci: Argument:  0x00000000 | Trn mode: 0x00000000
[    2.165543] mmc0: sdhci: Present:   0x00000000 | Host ctl: 0x00000000
[    2.172362] mmc0: sdhci: Power:     0x00000000 | Blk gap:  0x00000000
[    2.179220] mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00000000
[    2.186056] mmc0: sdhci: Timeout:   0x00000000 | Int stat: 0x00000000
[    2.192878] mmc0: sdhci: Int enab:  0x00000000 | Sig enab: 0x00000000
[    2.199699] mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[    2.206520] mmc0: sdhci: Caps:      0x00000000 | Caps_1:   0x00000000
[    2.213342] mmc0: sdhci: Cmd:       0x00000000 | Max curr: 0x00000000
[    2.220162] mmc0: sdhci: Resp[0]:   0x00000000 | Resp[1]:  0x00000000
[    2.226983] mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
[    2.233798] mmc0: sdhci: Host ctl2: 0x00000000
[    2.238558] mmc0: sdhci: ADMA Err:  0x00000000 | ADMA Ptr: 0x0000000000000000
[    2.246189] mmc0: sdhci: ============================================
[    2.256290] /dev/root: Can't open blockdev
[    2.261025] VFS: Cannot open root device "/dev/mmcblk0p2" or unknown-block(0,0): error -6

Here's my device tree (compiled with the sophgo for-next) branch:

/dts-v1/;

#include "cv1812h.dtsi"

/ {
         model = "Milk-V Duo S";
         compatible = "milkv,duos", "sophgo,cv1812h";

         aliases {
                 serial0 = &uart0;
         };

         chosen {
                 stdout-path = "serial0:115200n8";
         };

         memory at 80000000 {
                 device_type = "memory";
                 reg = <0x80000000 0x20000000>;
         };
};

&osc {
         clock-frequency = <25000000>;
};

&sdhci0 {
         status = "okay";
         bus-width = <4>;
         no-mmc;
         no-sdio;
         disable-wp;
};

&uart0 {
         status = "okay";
};


What's frustrating is that I got the mmc working a few days back :-)
Hoping this helps...
Cheers
Michael.

-- 
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com




More information about the linux-riscv mailing list