Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    解决 T113 修改 UART3 后 Uboot 有输出但是 Kernel 无法启动

    其它全志芯片讨论区
    3
    4
    2475
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Y
      YterAA LV 7 last edited by

      请按照如下步骤依次验证是否配置正确

      使用UART3,需要从UART0改为UART3(PB6,PB7)

      1. 修改sys_config.fex(BOOT0与Uboot的串口)

      sys_config.fex 的路径是 device/config/chips/t113/configs/evb1/sys_config.fex 中的 uart_debug_port

      修改前:

      [uart_para]
      uart_debug_port = 0
      uart_debug_tx   = port:PF02<3><1><default><default>
      uart_debug_rx   = port:PF04<3><1><default><default>
      

      修改后

      [uart_para]
      uart_debug_port = 0
      uart_debug_tx   = port:PB06<7><1><default><default>
      uart_debug_rx   = port:PB07<7><1><default><default>
      
      1. 修改设备树(Linux使用的串口输出)

      路径:device/config/chips/t113/configs/evb1/board.dts

      修改前

      uart3_pins_a: uart3_pins@0 {
      	pins = "PC6", "PC7";
      	function = "uart0";
      	drive-strength = <10>;
      	allwinner,muxsel = <4>;
      	bias-pull-up;
      };
      
      uart3_pins_b: uart3_pins@1 {
      	pins = "PC6", "PC7";
      	function = "gpio_in";
      };
      
      &uart0 {
      	pinctrl-names = "default", "sleep";
      	pinctrl-0 = <&uart0_pins_a>;
      	pinctrl-1 = <&uart0_pins_b>; 
      	status = "okay"; 
      };
      
      &uart3 {
      	pinctrl-names = "default", "sleep";
      	pinctrl-0 = <&uart3_pins_a>;
      	pinctrl-1 = <&uart3_pins_b>;
      	status = "disabled"; 
      };
      

      修改后

      uart3_pins_a: uart3_pins@0 {
      	pins = "PB6", "PB7";
      	function = "uart0";
      	drive-strength = <10>;
      	allwinner,muxsel = <7>;
      	bias-pull-up;
      };
      
      uart3_pins_b: uart3_pins@1 {
      	pins = "PB6", "PB7";
      	function = "gpio_in";
      };
      
      &uart0 {
      	pinctrl-names = "default", "sleep";
      	pinctrl-0 = <&uart0_pins_a>;
      	pinctrl-1 = <&uart0_pins_b>; 
      	status = "disabled";                               # 关闭UART0
      };
      
      &uart3 {
      	pinctrl-names = "default", "sleep";
      	pinctrl-0 = <&uart3_pins_a>;
      	pinctrl-1 = <&uart3_pins_b>;
      	status = "okay";                                   # 开启UART3
      };
      
      1. 修改UBOOT CONSOLE INDEX

      路径:brandy/brandy-2.0/u-boot-2018/configs/sun8iw20p1_defconfig
      增加下列内容

      CONFIG_SPECIFY_CONSOLE_INDEX=y
      CONFIG_CONS_INDEX=4                            # UART 3+1 = 4 
      
      1. 修改启动bootargs

      路径:device/config/chips/t113/configs/evb1/env.cfg

      修改前

      earlyprintk=sunxi-uart,0x02500000
      initcall_debug=0
      console=ttyS0,115200
      

      修改后
      earlyprintk=sunxi-uart,0x02500000 需要修改为 UART3 的地址,查阅手册可知为 0x02500C00
      12849b33-3786-417e-b2fe-7736c04d4b38-image.png

      earlyprintk=sunxi-uart,0x02500C00
      initcall_debug=0
      console=ttyS3,115200
      
      1. 修改 DEBUG_LL的地址
        make kernel_menuconfig 找到 Kernel low-level debugging functions,修改寄存器地址

      79bf0af2-3b08-48fb-810d-fc2b492209d0-image.png

      S 1 Reply Last reply Reply Quote Share 0
      • S
        shz18877605430 LV 6 @YterAA last edited by

        @yteraa 我也遇到了这个问题,还没解决。

        L 1 Reply Last reply Reply Quote Share 0
        • L
          lucky123456 LV 4 @shz18877605430 last edited by

          @shz18877605430 059308cd-a314-41ff-9f47-997f5438fa73-1681696444090.png
          这里面应该也要改

          S 1 Reply Last reply Reply Quote Share 0
          • S
            shz18877605430 LV 6 @lucky123456 last edited by

            @lucky123456 改了的,https://bbs.aw-ol.com/topic/3339/芒果t113-s3-uart0改为uart1-uboot无法启动?_=1681694893355

            1 Reply Last reply Reply Quote Share 0
            • 1 / 1
            • First post
              Last post

            Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

            行为准则 | 用户协议 | 隐私权政策