tiny4412 --Uboot移植(4) 串口
开发环境:win10 64位 + VMware12 + Ubuntu14.04 32位
工具链:linaro提供的gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabi
要移植的u-boot版本:u-boot-2016-11
Tiny4412开发板硬件版本为:
底板: Tiny4412SDK 1312B
核心板:Tiny4412 - 1306
1,原理图
查看tiny4412SDK-1312B -Schematic.pdf
可看出,底板使用UART0作为外接串口
2、uart0初始化步骤
- 选择UART的时钟源
- 将所涉及的UART通道管脚设为UART功能
- 设置波特率:UBRDIVn寄存器(UART BAUD RATE DIVISOR)、UFRACVALn寄存器
- 设置传输格式:ULCONn寄存器(UART LINE CONTROL)
- 设置UART工作模式:UCONn寄存器(UART CONTROL)
- UFCONn寄存器(UART FIFO CONTROL)、UFSTATn寄存器(UART FIFO STATUS)
3、使用Tiny4412 Debug 串口uart0代码设置
diff --git a/arch/arm/dts/exynos4412-tiny4412.dts b/arch/arm/dts/exynos4412-tiny
index ..3e057dc
--- a/arch/arm/dts/exynos4412-tiny4412.dts
+++ b/arch/arm/dts/exynos4412-tiny4412.dts
@@ -, +, @@
model = "Tiny4412 based on Exynos4412";
compatible = "samsung,tiny4412", "samsung,exynos4412"; - aliases {
- i2c0 = "/i2c@13860000";
- i2c1 = "/i2c@13870000";
- i2c2 = "/i2c@13880000";
- i2c3 = "/i2c@13890000";
- i2c4 = "/i2c@138a0000";
- i2c5 = "/i2c@138b0000";
- i2c6 = "/i2c@138c0000";
- i2c7 = "/i2c@138d0000";
- serial0 = "/serial@13800000";
- console = "/serial@13810000";
- mmc2 = "/sdhci@12530000";
- mmc4 = "/dwmmc@12550000";
- };
-
- i2c@ {
- samsung,i2c-sda-delay = <>;
- samsung,i2c-slave-addr = <0x10>;
- samsung,i2c-max-bus-freq = <>;
- status = "okay";
+ chosen {
+ stdout-path = "serial0";
+ }; + aliases {
+ serial0 = "/serial@13800000";
+ console = "/serial@13800000";
}; - serial@ {
+ serial0:serial@ {
status = "okay";
};
-
- sdhci@ {
- status = "disabled";
- };
-
- sdhci@ {
- status = "disabled";
- };
-
- sdhci@ {
- samsung,bus-width = <>;
- samsung,timing = < >;
- cd-gpios = <&gpk2 >;
- };
-
- sdhci@ {
- status = "disabled";
- };
-
- dwmmc@ {
- samsung,bus-width = <>;
- samsung,timing = < >;
- samsung,removable = <>;
- fifoth_val = <0x203f0040>;
- bus_hz = <>;
- div = <0x3>;
- index = <>;
- };
-
- ehci@ {
- compatible = "samsung,exynos-ehci";
- reg = <0x12580000 0x100>;
- #address-cells = <>;
- #size-cells = <>;
- phy {
- compatible = "samsung,exynos-usb-phy";
- reg = <0x125B0000 0x100>;
- };
- };
-
- emmc-reset {
- compatible = "samsung,emmc-reset";
- reset-gpio = <&gpk1 >;
- };
}; diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index ..5575adf
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -, +, @@ ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_EXYNOS5) += clock_init_exynos5.o
obj-$(CONFIG_EXYNOS5) += dmc_common.o dmc_init_ddr3.o
obj-$(CONFIG_EXYNOS4210)+= dmc_init_exynos4.o clock_init_exynos4.o
-obj-$(CONFIG_EXYNOS4412)+= dmc_init_exynos4412.o clock_init_exynos4412.o
+obj-$(CONFIG_EXYNOS4412)+= dmc_init_exynos4.o clock_init_exynos4412.o obj-y += spl_boot.o tzpc.o
obj-y += lowlevel_init.o diff --git a/arch/arm/mach-exynos/lowlevel_init.c b/arch/arm/mach-exynos/lowleve
index 1e090fd..c69be57
--- a/arch/arm/mach-exynos/lowlevel_init.c
+++ b/arch/arm/mach-exynos/lowlevel_init.c
@@ -, +, @@ int do_lowlevel_init(void)
#ifdef CONFIG_DEBUG_UART
#if (defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_SERIAL_SUPPORT)) || \
!defined(CONFIG_SPL_BUILD)
- exynos_pinmux_config(PERIPH_ID_UART3, PINMUX_FLAG_NONE);
- debug_uart_init();
+
+ #ifdef TINY4412
+ exynos_pinmux_config(PERIPH_ID_UART0, PINMUX_FLAG_NONE);
+ #else
+ exynos_pinmux_config(PERIPH_ID_UART3, PINMUX_FLAG_NONE);
+ #endif
+ debug_uart_init();
#endif
+ printascii("UART0 init ... OK !!!\n\r");
#endif
mem_ctrl_init(actions & DO_MEM_RESET);
tzpc_init(); diff --git a/configs/tiny4412_defconfig b/configs/tiny4412_defconfig
index ccc9fab..25c6bfb
--- a/configs/tiny4412_defconfig
+++ b/configs/tiny4412_defconfig
@@ -, +, @@ CONFIG_OF_CONTROL=y
#CONFIG_G_DNL_MANUFACTURER="Samsung"
#CONFIG_G_DNL_VENDOR_NUM=0x04e8
#CONFIG_G_DNL_PRODUCT_NUM=0x6601
+
+#DEBUG UART
+#
+CONFIG_DEBUG_UART=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_GPIO_SUPPORT=y
+CONFIG_DEBUG_UART_S5P=y
+CONFIG_DEBUG_UART_BASE=0x13800000
+CONFIG_DEBUG_UART_CLOCK=
+
+#
tiny4412 --Uboot移植(4) 串口的更多相关文章
- X-007 FriendlyARM tiny4412 u-boot移植之内存初始化
<<<<<<<<<<<<<<<<<<<<<<<<< ...
- tiny4412 --Uboot移植(5) DDR3内存
开发环境:win10 64位 + VMware12 + Ubuntu14.04 32位 工具链:linaro提供的gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-g ...
- X-004 FriendlyARM tiny4412 uboot移植之点亮指路灯
<<<<<<<<<<<<<<<<<<<<<<<<< ...
- X-003 FriendlyARM tiny4412 uboot移植之添加相应目录文件
X-003 FriendlyARM tiny4412 uboot移植之添加相应目录文件 <<<<<<<<<<<<<< ...
- Tiny4412 U-BOOT移植(转)
http://blog.csdn.net/eshing/article/details/37520291(转) 一.移植前说明: 1. 特别声明:此文档是我的学习文档,里面肯定有错误地方,仅供参考! ...
- 第一章、Tiny4412 U-BOOT移植一 说明【转】
本文转载自:http://blog.csdn.net/eshing/article/details/37520291 一.移植前说明: 1. 特别声明:此文档是我的学习文档,里面肯定有错误地方,仅供 ...
- X-010 FriendlyARM tiny4412 uboot移植之移植网卡驱动TFTP用起来
<<<<<<<<<<<<<<<<<<<<<<<<< ...
- 第四章、TIny4412 U-BOOT移植四 配置时钟频率源码分析【转】
本文转载自:http://blog.csdn.net/eshing/article/details/37542459 版权声明:本文为博主原创文章,未经博主允许不得转载. 目录(?)[+] 上 ...
- X-006 FriendlyARM tiny4412 u-boot移植之Debug串口用起来
<<<<<<<<<<<<<<<<<<<<<<<<< ...
随机推荐
- Java中的升序和降序
package ah; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; impo ...
- TestNG实现日志输出
这里介绍的是TestNG中的Report类来实现简单的log输出这个很简单直接看例子吧 package com.rrx.test; import java.io.IOException; import ...
- 从零开始学习python:demo2.5
for 循环语句 1.单个for循环: s1 = 'Python'for s2 in s1: print(s2) ------------------------- Python ------- ...
- DatetimeHelper,时间帮助类
public static class DateTimeEx { /// <summary> /// 得到中文形式的日期 /// </summary> /// <para ...
- 批量查杀该死的VBscript “svchost.exe” 脚本挂马
今天写代码突然发现HTML文件最后多了一段VBscript代码: <SCRIPT Language=VBScript><!-- DropFileName = "svchos ...
- 三、Python-列表
一.序列:是一块用于存放多个值的连续内存空间,并且按一定顺序排列,可以通过索引取值 索引:从左到右的索引从0开始依次增加的正整数:从右到左的索引为-1开始的复数 切片(分片):一中获取序列中的元素的方 ...
- loadrunner代理录制脚本
1.打开loadrunner录制脚本选项: 2.start recording弹窗选择options: 3.设置loadrunner端口,可自定义:后面的浏览器设置代理需要用到此处设置的端口号: 4 ...
- 嵌入式linux——汇编、C语言基础(一)
一.汇编语言基础 (断断续续的记录自己的笔记...2018-10-11) 1. mov指令 基本用法: mov r0, #0 mov指令是赋值指令,用法如上,把立即数0放入到寄存器r0中. 2. bl ...
- Linux部署笔记分享
# Linux部署 ## 安装lrzsz1. 安装lrzsz: yum -y install lrzsz2. 进入tmp目录3. rz 上传安装文件 jdk-8u65-linux-x64.tar.gz ...
- redis数据转移随笔
生产环境有一批版本比较老的redis主从架构,是一主多从,版本是2.8 由于想迁移到阿里云上,那么问题来了,怎么把redis数据转移到阿里云上 为了省事,阿里云也是和生产环境一样的版本,架构也一致,其 ...