1      Scope of Document

This document describes TF hardware design

2      Requiremen

2.1     Function Requirement

Enumerate tf card , support boot from tf and can mount in rootfs when nand boot.

2.2     Performance Requirement

Support common capacity tf card

3      Hardware Overview

tf interface,pin map:

// data signal

AM335X_MMC0_DAT3----------MMC0_DAT3

AM335X_MMC0_DAT2----------MMC0_DAT2

AM335X_MMC0_DAT1----------MMC0_DAT1

AM335X_MMC0_DAT0----------MMC0_DAT0

// clk/cmd signal

AM335X_MMC0_CLK-----------MMC0_CLK

AM335X_MMC0_CMD----------MMC0_CMD

// card detect signal

AM335X_MCASP0_ACLK-----MCASP0_ACLKR (gpio3_18)

Figure 1 tf interface block diagram

4      Functional Description

4.1     Functional Block Diagram

Figure 2  inter block diagram

4.2     TF

4.2.1 Overview

AM335x has 3 instances MMC/SD/SDIO host controller, which provides an interface between microprocessor and either MMC, SD memory cards, or SDIO cards.

The MMC/SD driver is implemented as a block driver on top of host controller as a HSMMC controller driver and supports SD, SD High Speed and SDHC cards. The driver only supports for 4 bit modes(no SPI mode, 1/8 Bit). Both DMA & polled mode of data transfer is supported.

5      Porting

5.1     Uboot porting

Index: u-boot-2018.01/include/configs/am335x_evm.h

===================================================================

--- am335x_evm.h     (revision 4)

+++ am335x_evm.h  (revision 5)

@@ -17,6 +17,7 @@

#define __CONFIG_AM335X_EVM_H

#include <configs/ti_am335x_common.h>

+#define CONFIG_SD_BOOT

#ifndef CONFIG_SPL_BUILD

# define CONFIG_TIMESTAMPKernel porting

Nand to do pin mux in board/ti/am335x/mux.c

configure_module_pin_mux(mmc0_pin_mux_sk_evm);

 

5.2     Kernel porting

Device Drivers --->

<*> MMC/SD/SDIO card support --->

<*> MMC block device driver

<*> TI OMAP High Speed Multimedia Card Interface support

<M> MMC/SD/SDIO card support --->
<M> MMC block device driver
<M> TI OMAP High Speed Multimedia Card Interface support

Dts file change:

regulators {

compatible = "simple-bus";

vcc3v3: fixedregulator1 {

compatible =
"regulator-fixed";

regulator-name = "vcc3v3";

regulator-min-microvolt
= <3300000>;

regulator-max-microvolt
= <3300000>;

regulator-boot-on;

};

};

mmc1_pins: pinmux_mmc1_pins {

pinctrl-single,pins = <

AM33XX_IOPAD(0x8fc,
PIN_INPUT_PULLUP | MUX_MODE0)       /*
mmc0_dat0.mmc0_dat0 */

AM33XX_IOPAD(0x8f8,
PIN_INPUT_PULLUP | MUX_MODE0)       /*
mmc0_dat1.mmc0_dat1 */

AM33XX_IOPAD(0x8f4,
PIN_INPUT_PULLUP | MUX_MODE0)       /*
mmc0_dat2.mmc0_dat2 */

AM33XX_IOPAD(0x8f0,
PIN_INPUT_PULLUP | MUX_MODE0)       /*
mmc0_dat3.mmc0_dat3 */

AM33XX_IOPAD(0x904,
PIN_INPUT_PULLUP | MUX_MODE0)       /*
mmc0_cmd.mmc0_cmd */

AM33XX_IOPAD(0x900,
PIN_INPUT_PULLUP | MUX_MODE0)       /*
mmc0_clk.mmc0_clk */

AM33XX_IOPAD(0x9a0,
PIN_INPUT_PULLUP | MUX_MODE7)       /*
mcasp0_aclkr.mmc0_sdwp */

>;

};

&mmc1
{

status = "okay";

/*vmmc-supply =
<&vmmc_reg>;*/

vmmc-supply = <&vcc3v3>;

bus-width = <4>;

pinctrl-names = "default";

pinctrl-0 = <&mmc1_pins>;

cd-gpios = <&gpio3 18
GPIO_ACTIVE_LOW>;

};

[   
1.272256] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup

[   
1.272266] omap_hsmmc 48060000.mmc: lookup for GPIO wp failed

[   
1.513463] mmc0: host does not support reading read-only switch, assuming
write-enable

[   
1.532796] mmc0: new high speed SDHC card at address 0007

[   
1.542753] mmcblk0: mmc0:0007 SD16G 14.5 GiB

[   
1.554116]  mmcblk0: p1

6     
Follow-up

We can do some optimize: for example fs check
function

Manual fs check :

root@am335x-evm:~# fsck /dev/mmcblk0p1

fsck from util-linux 2.30

CP437: Invalid argument

fsck.fat 4.1 (2017-01-24)

0x41: Dirty bit is set. Fs was not properly
unmounted and some data may be corrupt.

1) Remove dirty bit

2) No action

? 1

Perform changes ? (y/n) y

/dev/mmcblk0p1: 10 files, 35768/1901241 clusters

Auto fs check:

root@am335x-evm:/etc# vi   /etc/fstab

# stock fstab - you probably want to override this
with a machine specific one

/dev/root           
/                    auto       defaults              1  1

proc                
/proc                proc       defaults              0 
0

devpts              
/dev/pts             devpts     mode=0620,gid=5       0 
0

usbdevfs            
/proc/bus/usb        usbdevfs   noauto                0  0

tmpfs                /run                 tmpfs      mode=0755,nodev,nosuid,strictatime 0  0

tmpfs               
/var/volatile        tmpfs      defaults,size=50M     0  0

tmpfs               
/media/ram           tmpfs      defaults,size=16M     0  0

# uncomment this if your device has a
SD/MMC/Transflash slot

/dev/mmcblk0p1       /media/card          auto       defaults,sync,noauto  0  1

am335x system upgrade kernel tf(五)的更多相关文章

  1. am335x system upgrade kernel i2c rtc eeprom(六)

    1      Scope of Document This document describes i2c bus hardware design and support i2c-devices: ee ...

  2. am335x system upgrade kernel ethernet(四)

    1      Scope of Document This document describes ethernet hardware design and porting KZS8081 to ubo ...

  3. am335x system upgrade kernel gpio(九)

    1      Hardware Overview gpio interface,pin map: AM335X_I2C0_W_C----------------------MCASP0_AXR1 /* ...

  4. am335x system upgrade kernel can(八)

    1      Scope of Document This document describes can bus hardware design and can bus driver developm ...

  5. am335x system upgrade kernel uart(七)

    1      Scope of Document This document describes UART hardware design, uart driver porting 2      Re ...

  6. am335x system upgrade kernel ec20 simcom7600ce(十一)

    1      Scope of Document This document describes 4G hardware design, support quectel ec20 4G module/ ...

  7. am335x system upgrade kernel usb stroage(十)

    1      Scope of Document This document describes USB hardware design, support stardard usb2.0 port o ...

  8. am335x system upgrade kernel f-ram fm25l16b(十六)

    1      Scope of Document This document describes SPI F-RAM hardware design 2      Requiremen 2.1     ...

  9. am335x system upgrade kernel emmc(十八)

    1      Scope of Document This document describes EMMC hardware design 2      Requiremen 2.1     Func ...

随机推荐

  1. Django开发之登陆和登出

    使用django自带的验证模块 1.首先使用python manage.py startapp models为当前项目添加一个应用. 2.在setting.py中INSTALLED_APPS后面添加' ...

  2. python_协程

    协程 问题一: 生成器与函数的区别?生成器分阶段的返回多个值,相当于有多个出口(结果): yield ''' yield # 中断.返回函数值 1.只能在函数中使用 2.会暂停函数执行并且返回表达式结 ...

  3. SpringCloud整合sleuth,使用zipkin时不显示服务

    转载于:https://www.cnblogs.com/Dandwj/p/11179141.html 原文地址:https://blog.csdn.net/weixin_30416497/articl ...

  4. C#字符串基础

    C#字符串基础 1.    字符串的两种创建形式 (1)String A=”cat”; (2)String B=new string{‘a’,4}  .调用类方法,创建一个“aaaa”的字符串 (3) ...

  5. [转]Sublime Text 3安装Json格式化插件

    1.安装Package control 首先需要安装Package control,如果已经安装请跳过此步骤.按Ctrl+Shift+p打开命令搜索框,输入PC,点击图中条目安装,如下图:   成功后 ...

  6. Golang slice和map的申明和初始化

    1 前言 仅供记录使用. 2 代码 /** * @Author: FB * @Description: * @File: SliceMapInit.go * @Version: 1.0.0 * @Da ...

  7. Java 之 Cookie

    Cookie 一.会话概述 1.会话:一次会话中包含多次请求和响应.       一次会话:浏览器第一次给服务器资源发送请求,会话建立,直到有一方断开为止. 2.功能: 在一次会话的范围内的多次请求间 ...

  8. php和mysql交互 面向对象

    不返回结果集 <?php //使用对象属性和方法来插入数据 header('Content-type:text/html;carset=utf8'); $con=new mysqli('loca ...

  9. day 06 预科

    目录 if判断 if判断习题 for循环 for循环习题 微信机器人 if判断 # 一条狗朝你过来了,你会干吗? 判断: 如果狗是大长腿牵来的狗--->打招呼:如果是条疯狗,跑. # if:如果 ...

  10. docker中基于centos镜像部署lnmp环境 php7.3 mysql8.0 最新版

    Docker是一个开源的应用容器引擎,基于Go语言并遵从Apache2.0协议开源. Docker可以让开发者打包他们的应用以及依赖包到一个轻量级.可移植的容器中,然后发布到任何流行的Linux机器上 ...