[Letux-kernel] X1600 / LX16 support - here: adding MMC

Andreas Kemnade andreas at kemnade.info
Fri Feb 9 22:59:49 CET 2024


On Fri, 9 Feb 2024 22:51:37 +0100
"H. Nikolaus Schaller" <hns at goldelico.com> wrote:

> > Am 09.02.2024 um 22:27 schrieb Andreas Kemnade <andreas at kemnade.info>:
> > 
> > On Fri, 9 Feb 2024 21:53:04 +0100
> > Andreas Kemnade <andreas at kemnade.info> wrote:
> >   
> >> On Fri, 9 Feb 2024 18:10:49 +0100
> >> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> >>   
> >>>> I have debugged several other emmc/sd problems on other boards this way.      
> >>> 
> >>> I agree that it can work but IMHO setting it up is quite a distraction
> >>> and in the saved time the problem can be analysed by different methods.
> >>> 
> >>> But we can of course work in parallel - and one method will find the bugs.
> >>>   
> >> something interesting seen:
> >> while typing in commands in the shell.
> >> 
> >> ke[    0.000191] mmc0: host does not support reading read-only switch, assuming 
> >> write-enable
> >> [    0.000191] mmc0: new high speed SDHC card at address 59b4
> >> [    0.000191] mmcblk0: mmc0:59b4 SN32G 29.7 GiB
> >> [    0.000191]  mmcblk0: unable to read partition table
> >> [    0.000191] mmc0: card 59b4 removed
> >> r[    0.000191] mmc0: host does not support reading read-only switch, assuming write-enable
> >> [    0.000191] mmc0: error -145 whilst initialising SD card
> >> 
> >> and endless errors again...
> >>   
> > but only for mmc1.
> > 
> > tried again with setting bus-width to 1 and I got immediately:
> > [    0.000192] jz4740-mmc 13460000.mmc: Ingenic SD/MMC card driver registered
> > [    0.000192] jz4740-mmc 13460000.mmc: Using DMA, 4-bit mode
> > [    0.000192] Freeing unused kernel image (initmem) memory: 1316K
> > [    0.000192] This architecture does not have kernel memory protection.
> > [    0.000192] Run /sbin/init as init process
> > [    0.000192]   with arguments:
> > [    0.000192]     /sbin/init
> > [    0.000192]   with environment:
> > [    0.000192]     HOME=/
> > [    0.000192]     TERM=linux
> > [    0.000192] process '/bin/busybox' started with executable stack
> > ^Mcan't run '/etc/init.d/rcS': No such file or directory
> > 
> > Please press Enter to activa[    0.000192] jz4740-mmc 13460000.mmc: no support for card's volts
> > te this console. [    0.000192] mmc1: error -22 whilst initialising SDIO card
> > [    0.000192] mmc0: host does not support reading read-only switch, assuming write-enable
> > [    0.000192] mmc0: new high speed SDHC card at address 59b4
> > [    0.000192] mmcblk0: mmc0:59b4 SN32G 29.7 GiB  
> 
> That is good!
> 
> > [    0.000192]  mmcblk0: unable to read partition table
> > [    0.000192] mmc0: card 59b4 removed
> > 
> > and silence besides of mmc1 errors.  
> 
> What I have as a theory is that the clocks are wrong and outside of specs. Some SD card
> and some x1600 MSC may handle this well - and in some cases not.
>
well, what I know about clocks:
date
shows something incrementing in a same way.
the [....] in console do only increment in the beginning, and now I have suddenly seen 0.000193.

if that helps:
from debugfs (/sys/kernel/debug/clk/clk_summary):

                                 enable  prepare  protect                                duty  hardware                            connection
   clock                          count    count    count        rate   accuracy phase  cycle    enable   consumer                         id
---------------------------------------------------------------------------------------------------------------------------------------------
 clk12m                              0       0        0        12000000    0          0     50000      Y   clock-controller at 10000000       clk12m                   
                                                                                                           deviceless                      no_connection_id         
    otg_phy                          0       0        0        12000000    0          0     50000      Y      deviceless                      no_connection_id         
 rtc                                 0       0        0        32768       0          0     50000      Y   clock-controller at 10000000       rtc                      
                                                                                                           deviceless                      no_connection_id         
    wdt                              0       0        0        32768       0          0     50000      N      deviceless                      no_connection_id         
 ext                                 15      15       0        24000000    0          0     50000      Y   10033000.serial                 baud                     
                                                                                                           10032000.serial                 baud                     
                                                                                                           10031000.serial                 baud                     
                                                                                                           10030000.serial                 baud                     
                                                                                                           timer at 12000000                  ost                      
                                                                                                           clock-controller at 10000000       ext                      
                                                                                                           deviceless                      no_connection_id         
    percpu timer                     1       1        0        24000000    0          0     50000      Y      deviceless                      of_clk_get_from_provider 
                                                                                                              deviceless                      no_connection_id         
    global timer                     1       1        0        24000000    0          0     50000      Y      deviceless                      of_clk_get_from_provider 
                                                                                                              deviceless                      no_connection_id         
    timer7                           0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    timer6                           0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    timer5                           0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    timer4                           0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    timer3                           0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    timer2                           0       0        0        24000000    0          0     50000      N      deviceless                      no_connection_id         
    timer1                           1       1        0        24000000    0          0     50000      Y      deviceless                      of_clk_get_from_provider 
                                                                                                              deviceless                      no_connection_id         
    timer0                           1       1        0        24000000    0          0     50000      Y      deviceless                      of_clk_get_from_provider 
                                                                                                              deviceless                      no_connection_id         
    uart3                            1       1        0        24000000    0          0     50000      Y      10033000.serial                 module                   
                                                                                                              deviceless                      no_connection_id         
    uart2                            1       1        0        24000000    0          0     50000      Y      10032000.serial                 module                   
                                                                                                              deviceless                      no_connection_id         
    uart1                            1       1        0        24000000    0          0     50000      Y      10031000.serial                 module                   
                                                                                                              deviceless                      no_connection_id         
    uart0                            1       1        0        24000000    0          0     50000      Y      10030000.serial                 module                   
                                                                                                              deviceless                      no_connection_id         
    sadc                             0       0        0        24000000    0          0     50000      Y      deviceless                      no_connection_id         
    exclk_div512                     0       0        0        46875       0          0     50000      Y      deviceless                      no_connection_id      
       rtc_ercs                      0       0        0        46875       0          0     50000      Y         deviceless                      no_connection_id         
    mpll                             4       4        0        140000000   0          0     50000      Y      deviceless                      no_connection_id         
       cim_mclk                      0       0        0        8750000     0          0     50000      N         deviceless                      no_connection_id         
       ssi                           0       0        0        8750000     0          0     50000      N         deviceless                      no_connection_id         
       msc1                          1       1        0        35000000    0          0     50000      Y         13460000.mmc                    mmc                      
                                                                                                                 deviceless                      no_connection_id         
       msc0                          1       1        0        35000000    0          0     50000      Y         13450000.mmc                    mmc                      
                                                                                                                 deviceless                      no_connection_id         
       mac                           0       0        0        5000000     0          0     50000      Y         deviceless                      no_connection_id         
       lcd0pixclk                    0       0        0        8750000     0          0     50000      N         deviceless                      no_connection_id         
       ddr                           1       1        0        35000000    0          0     50000      Y         deviceless                      no_connection_id         
       ahb2_apb_mux                  1       1        0        140000000   0          0     50000      Y         deviceless                      no_connection_id         
          pclk                       0       0        0        14000000    0          0     50000      Y            deviceless                      no_connection_id         
             smb1                    0       0        0        14000000    0          0     50000      N               deviceless                      no_connection_id         
             smb0                    0       0        0        14000000    0          0     50000      N               deviceless                      no_connection_id         
          ahb2                       1       1        0        28000000    0          0     50000      Y            deviceless                      no_connection_id         
             aes                     0       0        0        28000000    0          0     50000      N               deviceless                      no_connection_id         
             pdma                    1       1        0        28000000    0          0     50000      Y               13420000.dma                    no_connection_id         
                                                                                                                       deviceless                      no_connection_id         
             aic                     0       0        0        28000000    0          0     50000      N               deviceless                      no_connection_id         
             otg0                    0       0        0        28000000    0          0     50000      Y               deviceless                      no_connection_id         
             nemc                    0       0        0        28000000    0          0     50000      Y               deviceless                      no_connection_id         
       ahb0                          0       0        0        28000000    0          0     50000      Y         deviceless                 [    0.000193] mmc1: Card stuck being busy! __mmc_poll_for_busy
     no_connection_id         
    epll                             0       0        0        60000000    0          0     50000      Y      deviceless                      no_connection_id         
       i2s1                          0       0        0        0           0          0     50000      Y         deviceless                      no_connection_id         
       i2s0[    0.000193] jz4740-mmc 13460000.mmc: no support for card's volts
                          0       0        0        0           [    0.000193] mmc1: error -22 whilst initialising SDIO card
0          0     50000      Y         deviceless                      no_connection_id         
    apll                             1       1        0        110400000   0          0     50000      Y      deviceless                      no_connection_id         
       sclk_a                        1       1        0        110400000   0          0     50000      Y         deviceless                      no_connection_id         
          cpumux                     2       2        0        110400000   0          0     50000      Y            deviceless                      no_connection_id         
             l2cache                 1       1        0        55200000    0          0     50000      Y               deviceless                      no_connection_id         
             cpu                     1       1        0        110400000   0          0  
> BR,
> Nikolaus
> 
> 



More information about the Letux-kernel mailing list