关键词:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
开发环境:win7 64位 + VMware12 + Ubuntu14.04 64位
工具链:linaro提供的gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabi
要移植的u-boot版本:u-boot-2016-11
Tiny4412开发板硬件版本为:
底板: Tiny4412/Super4412SDK 1506
核心板:Tiny4412 - 1412
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
在上一节中我们可以通过点亮tiny4412核心板上的LED灯开始调试u-boot。接下来要做的是初始化exynos4412的时钟。
1、Exynos4412的时钟体系
exynos4412芯片时钟体系的介绍在《Exynos 4412 SCP_Users Manual_Ver.0.10.00_Preliminary.pdf》的第七章节。
Exynos4412有3个初始时钟源:
① XRTCXTI引脚 :接 32KHz的晶振,用于实时钟 (RTC) 。
② XXTI引脚 :接12M ~50 MHz的晶振, 用于向系统提供时钟,也可以不接。
③ XUSBXTI引脚 :接24MHz的晶振 ,用于向系统提供时钟。
在友善之臂tiny4412的开发板中, XRTCXTI 上没有外接晶振,系统时钟来源是XUSBXTI引脚上接的24MH 晶振,如下图所示:
2、Exynos4412的时钟设置
相关的设置结果如下:
3、Exynos4412的时钟设置代码
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index ac47ab2..f2cd76d 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@ -15,7 +15,7 @@ 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_exynos4.o clock_init_exynos4.o +obj-$(CONFIG_EXYNOS4412)+= dmc_init_exynos4412.o clock_init_exynos4412.o obj-y += spl_boot.o tzpc.o obj-y += lowlevel_init.o endif diff --git a/arch/arm/mach-exynos/clock_init_exynos4412.c b/arch/arm/mach-exynos/clock_init_exynos4412.c new file mode 100644 index 0000000..cd70185 --- /dev/null +++ b/arch/arm/mach-exynos/clock_init_exynos4412.c @@ -0,0 +1,554 @@ +/* + * Clock Initialization for board based on EXYNOS4412 + * + * 2016 + * Modified by AP0904225 <ap0904225@qq.com> + * + * Copyright (C) 2013 Samsung Electronics + * Rajeshwari Shinde <rajeshwari.s@samsung.com> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include <common.h> +#include <config.h> +#include <asm/io.h> +#include <asm/arch/cpu.h> +#include <asm/arch/clk.h> +#include <asm/arch/clock.h> +#include "common_setup.h" + +#include "exynos4412_setup.h" + +/* + * system_clock_init: Initialize core clock and bus clock. + * void system_clock_init(void) + */ +void system_clock_init(void) +{ + unsigned int set, clr, clr_src_cpu, clr_pll_con0, clr_src_dmc; + struct exynos4x12_clock *clk =(struct exynos4x12_clock *) + samsung_get_base_clock(); + + /* + * APLL= 1400 MHz + * MPLL=800 MHz + * EPLL=96 MHz + * VPLL=108 MHz + * freq (ARMCLK) = 1400 MHz at 1.3 V + * freq (ACLK_COREM0) = 350 MHz at 1.3V + * freq (ACLK_COREM1) = 188 MHz at 1.3 V + * freq (PERIPHCLK) = 1400 MHz at 1.3 V + * freq (ATCLK) = 214 MHz at 1.3 V + * freq (PCLK_DBG) = 107 MHz at 1.3 V + * freq (SCLK_DMC) = 400 MHz at 1.0 V + * freq (ACLK_DMCD) = 200 MHz at 1.0 V + * freq (ACLK_DMCP) = 100 MHz at 1.0 V + * freq (ACLK_ACP) = 200 MHz at 1.0 V + * freq (PCLK_ACP) = 100 MHz at 1.0 V + * freq (SCLK_C2C) = 400 MHz at 1.0 V + * freq (ACLK_C2C) = 200 MHz at 1.0 V + * freq (ACLK_GDL) = 200 MHz at 1.0 V + * freq (ACLK_GPL) = 100 MHz at 1.0 V + * freq (ACLK_GDR) = 200 MHz at 1.0 V + * freq (ACLK_GPR) = 100 MHz at 1.0 V + * freq (ACLK_400_MCUISP) = 400 MHz at 1.0 V + * freq (ACLK_200) = 160 MHz at 1.0 V + * freq (ACLK_100) = 100 MHz at 1.0 V + * freq (ACLK_160) = 160 MHz at 1.0 V + * freq (ACLK_133) = 133 MHz at 1.0 V + * freq (SCLK_ONENAND) = 160 MHz at 1.0 V + */ + + /* + *before set system clocks,we switch system clocks src to FINpll + */ 查看详情 x-006friendlyarmtiny4412u-boot移植之debug串口用起来<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<&l 查看详情 x-004friendlyarmtiny4412uboot移植之点亮指路灯<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<&l 查看详情 x-003friendlyarmtiny4412uboot移植之添加相应目录文件<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 查看详情 x-009friendlyarmtiny4412uboot移植之sdcard用起来kernelboot起来<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 查看详情 x-002exyson4412芯片启动过程分析移植u-boot到FriendlyARMTiny4412开发板上,首先我们需要对SamsungExyson4412芯片的启动方式、系统时钟初始化、串口初始化、内存初始化以及开发板的内存地址空间分配有一个清楚的认识。下面是一些参考资料:1>、技术部落(这... 查看详情 itop-4412开发板运行linuxqt系统,怎么挂接u盘参考技术A如果是iTop-4412的android4.0系统,可以这样来实现:linuxQT系统下挂载u盘,首先用命令mknod/dev/sda1b81创建U盘的设备节点,然后使用命令mount/dev/sda1/mnt/udisk/挂载u盘即可。 查看详情 tiny4412u-boot分析u-boot配置流程分析参考Friendlyarm的文档,编译uboot的流程为maketiny4412_configmake这个过程主要涉及到两个文件,顶层的Makefile文件和mkconfig文件,makeconfig文件是一个脚本,通过文件的注释可以了解到它的作用#Scripttocreateheaderfilesandlinkstoconfigure#U-Bootforasp... 查看详情 u-boot启动流程详解-基于itop4412开发板...(NAND,NORFLASH,SD,MMC等)拷贝到DDR中,最后启动linux内核。4412u-boot启动流程:A.开机运行iRom中代码B.BL1阶段(E4412_N.bl1.xxxxG. 查看详情 tiny4412-1312__uboot移植(代码片段)...16.08-x86_64_arm-linux-gnueabi要移植的u-boot版本:u-boot-2016-11Tiny4412开发板硬件版本为: 底板: Tiny4412SDK1312B 核心板:Tiny4412-1306 1.获取U-BOOT源码从FTP站点下载: ftp://ftp.denx.de/pub/u-bootuboot-2016-09.tar.bz22.交... 查看详情 tiny4412u-boot分析u-boot引导内核流程在u-boot中,通过bootm命令启动内核。bootm命令的作用是将内核加载到指定的内存地址,然后通过R0、R1、R2寄存器传递启动参数之后启动内核。在启动内核之前需要对环境做一些初始化工作,主要有如下几个方面:(1)、cpu寄存器设... 查看详情 tiny4412u-boot分析u-boot启动流程从大方面来说,u-boot的启动分成两个阶段,第一个阶段主要的职责是准备初始化的环境,主要有以下几点①设置异常向量表②把CPU的工作模式设置为SVC32模式③关闭中断、MMU和cache④关闭看门狗⑤初始化内存、时钟、串口⑥设置... 查看详情 第二章tiny4412u-boot移植二启动分析本文转载自:http://blog.csdn.net/eshing/article/details/37521481版权声明:本文为博主原创文章,未经博主允许不得转载。一、启动过程说明 讲解启动过程,首先的源头就是打开电源,这个相信没人人不知道。CPU... 查看详情 tiny4412学习杂记1.Android挂载NFS使用busyboxmount来替代mount命令2.修改Uboot中fastboot最大buff 使用U-boot烧写Android5.0的时候出现remote:datatoolarge将 include/configs/tiny4412.h 改大一点3.tiny4412内核中trustzone配置开关tiny4412 trust 查看详情 tiny4412u-boot烧写及根文件系统制作(不进入终端问题)...tails?id=51400196(转) VMware12环境:ubuntu12.4开发板:tiny4412首先烧写bootloader,我用一个8G的内存卡,现在不说sd卡的制作过程了,网上可以参考。现在就把我给arm的emmc烧写过程开始说。用sd卡启动,开发板的右下角有个开关控制... 查看详情 uboot移植前奏Tiny4412开发板硬件版本为: 底板: Tiny4412/Super4412SDK1506 核心板:Tiny4412-1412 1、下载u-boot源代码,建立u-boot代码仓库 参考:h 查看详情 tiny4412--uboot移植串口(代码片段)...16.08-x86_64_arm-linux-gnueabi要移植的u-boot版本:u-boot-2016-11Tiny4412开发板硬件版本为: 底板: Tiny4412SDK1312B 核心板:Tiny4412-1306 1,原理图查看tiny4412SDK-1312B-Schematic.pdf 可看出,底板使用UART0作... 查看详情 tiny4412裸机程序说明...自己想学点东西,过于求成,又过于自信,直接买了Tiny4412的板子,但网上关于4412的资料太少,我一直没办法啃动,只能尽可能找来各种相关资料进行参考分析。我想在U-Boot程序中加入LCD显示功能,但始终都没有正常点亮LCD,放... 查看详情 |