如何复用Luckfox Pico Mini B 中的SDMMC 接口为 UART串口?

  • 额图是倒着的,没有按照上传顺序来
  • 您好,如果您需要将gpio3_a7 gpio3_a6 复用为 uart5m0,请将sdmmc 的 status 修改为 disabled,然后添加

    Code: Select all

    &uart5 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart5m0_xfer>;
    }
    
    在uart1 中添加uart5m0_xfer是无法生效的
  • 问题是我的uart5已经复用为了<&uart5m1_xfer>,还有其它办法吗? :?:
  • 意思是我一共要使用4个UART,除了能够显式配置的UART3、UART4、UART5外,还有调试串口UART2外,还有剩余UARTA吗,我看芯片手册中支持UART0-UART5.
  • 一个UART控制器同一时间只能控制一组引脚,不同UART控制器连接的引脚是不一样的,所以在UART1中不能把pinctrl设置成没有连接的UART5M1引脚, RV1103虽然有6组UART 但是UART0和UART1的引脚没有从芯片引出,要用四组UART只能考虑使用GPIO模拟了
  • 那看来只能把UART2改为普通串口了,我看论坛里都是把UART2调试串口改为另一个串口,完全去除调试串口的功能是可行的吗?
  • Edit `sysdrv/source/uboot/u-boot/arch/arm/dts/rv1106-u-boot.dtsi`
    Code: Select all

    chosen {
    stdout-path = &uart2;
    u-boot,spl-boot-order = &sdmmc, &spi_nand, &emmc;
    };

    单纯禁用的话直接把uart2改成uart1就可以了吗
  • viewtopic.php?t=975
    按照论坛的方式把调试uart2改成uart1,在 重启内核前依旧会发送调试信息:
    DDR 306b9977f5 wesley.yao 23/12/21-09:28:37,fwver: v1.15
    S5P1
    4x
    fc27
    F
    DDRConf1
    DDR2, BW=16 Col=10 Bk=4 CS0 Row=13 CS=1 Size=64MB
    528MHz
    DDR bin out

    U-Boot SPL board init
    U-Boot SPL 2017.09 (Jun 05 2025 - 16:43:17)
    Trying to boot from MMC2
    MMC: no card present
    mmc_init: -123, time 2
    spl: mmc init failed with error: -123
    Trying to boot from MTD1
    ENVF: Primary 0x00000000 - 0x00040000
    No misc partition
    Trying fit image at 0x400 sector
    ## Verified-boot: 0
    ## Checking uboot 0x00200000 (lzma @0x00400000) ... sha256(93ff36cc36...) + sha256(baec9426ad...) + OK
    ## Checking fdt 0x00260998 ... sha256(9f596c5683...) + OK
    Total: 122.118/201.423 ms

    Jumping to U-Boot(0x00200000)


    U-Boot 2017.09 (Jun 05 2025 - 16:43:17 +0800)

    Model: Rockchip RV1106 EVB Board
    MPIDR: 0xf00
    PreSerial: 2, raw, 0xff4c0000
    DRAM: 64 MiB
    Sysmem: init
    Relocation Offset: 03d81000
    Relocation fdt: 02dfa778 - 02dfede0
    CR: M/C/I
    Using default environment

    Bootdev(atags): mtd 1
    ENVF: Primary 0x00000000 - 0x00040000
    PartType: ENV
    DM: v2
    No misc partition
    boot mode: normal
    RESC: 'boot', blk@0x00001f89
    resource: sha256+
    FIT: no signed, no conf required
    DTB: rk-kernel.dtb
    HASH(c): OK
    Model: Luckfox Pico Mini
    ## retrieving sd_update.txt ...
    MMC: no card present
    mmc_init: -123, time 2
    CLK: (uboot. arm: enter 816000 KHz, init 816000 KHz, kernel 0N/A)
    apll 816000 KHz
    dpll 528000 KHz
    gpll 1188000 KHz
    cpll 1000000 KHz
    aclk_peri_root 400000 KHz
    hclK_peri_root 200000 KHz
    pclk_peri_root 100000 KHz
    aclk_bus_root 300000 KHz
    pclk_top_root 100000 KHz
    pclk_pmu_root 100000 KHz
    hclk_pmu_root 200000 KHz
    Net: eth0: ethernet@ffa80000
    Hit key to stop autoboot('CTRL+C'): 0
    ## Booting FIT Image at 0x2908540 with size 0x002f1200
    Fdt Ramdisk skip relocation
    No misc partition
    ## Loading kernel from FIT Image at 02908540 ...
    Using 'conf' configuration
    ## Verified-boot: 0
    Trying 'kernel' kernel subimage
    Description: unavailable
    Type: Kernel Image
    Compression: uncompressed
    Data Start: 0x02911b40
    Data Size: 3046400 Bytes = 2.9 MiB
    Architecture: ARM
    OS: Linux
    Load Address: 0x00008000
    Entry Point: 0x00008000
    Hash algo: sha256
    Hash value: 67556d13d2f2672009ef36212f154747d9e33fddd119a64e7a8b7d2903fc4489
    Verifying Hash Integrity ... sha256+ OK
    ## Loading fdt from FIT Image at 02908540 ...
    Using 'conf' configuration
    Trying 'fdt' fdt subimage
    Description: unavailable
    Type: Flat Device Tree
    Compression: uncompressed
    Data Start: 0x02908d40
    Data Size: 35874 Bytes = 35 KiB
    Architecture: ARM
    Load Address: 0x00c00000
    Hash algo: sha256
    Hash value: fb7229121556743b1b43bbc20d6411720da760e4f383d68cc4ca9326d0abc00d
    Verifying Hash Integrity ... sha256+ OK
    Loading fdt from 0x02908540 to 0x00c00000
    Booting using the fdt blob at 0x00c00000
    Loading Kernel Image from 0x02911b40 to 0x00008000 ... OK
    kernel loaded at 0x00008000, end = 0x002efc00
    Using Device Tree in place at 00c00000, end 00c0bc21
    Adding bank: 0x00000000 - 0x04000000 (size: 0x04000000)
    Total: 552.203/758.717 ms

    Starting kernel ...

    怎么做才能把uart2改成数据串口?在其它的串口也不进行改动的情况下,因为我并不需要调试串口
  • 如果哪里配置有问题无法登录adb或者ssh调试串口就是最后可以登录终端的方案,修改起来也很复杂很多客户都会因为缺少细节导致修改失败,我们不推荐修改。
    内核前还有打印日志就是ddr.bin没有修改成功,你参考的viewtopic.php?t=975中的操作步骤我已经验证过多次,请检查5 Check if the modification was successful是否成功且烧录相关的镜像都要确定是修改后的