1      Scope of Document

This document describes i2c bus hardware design and support i2c-devices: eeprom(at24c08) rtc(rx8025).

2      Requiremen

2.1     Function Requirement

Enumerate i2c bus eeprom and rtc i2c-device, load corresponding drivers

2.2     Performance Requirement

NA

3      Hardware Overview

i2c interface,pin map:

AM335X_I2C0_SCL------------------I2C0_SCL

AM335X_I2C0_SDA------------------I2C0_SDA

Figure 1 tf interface block diagram

4      Functional Description

4.1     I2C

4.1.1 Overview

Figure 2  timing diagram

  1. Data transfer is initiated with a start bit (S) signaled by SDA being pulled low while SCL stays high.
  2. SCL is pulled low, and SDA sets the first data bit level while keeping SCL low (during blue bar time).
  3. The data are sampled (received) when SCL rises for the first bit (B1). For a bit to be valid, SDA must not change between a rising edge of SCL and the subsequent falling edge (the entire green bar time).
  4. This process repeats, SDA transitioning while SCL is low, and the data being read while SCL is high (B2, ...Bn).
  5. The final bit is followed by a clock pulse, during which SDA is pulled low in preparation for the stop bit.
  6. A stop bit (P) is signaled when SCL rises, followed by SDA rising.

5      Porting

5.1     Kernel porting

Dts file :

i2c0_pins: pinmux_i2c0_pins {

pinctrl-single,pins = <

AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0)

AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0)

>;

};

&i2c0 {

pinctrl-names = "default";

pinctrl-0 = <&i2c0_pins>;

status = "okay";

clock-frequency = <400000>;

at24c08@50 {

compatible = "atmel,24c08";

     pagesize = <16>

reg = <0x50>;

};

rtc@32 {

compatible = "epson,rx8025";

reg = <0x32>;

};

};

[    1.795430] at24 0-0050: 1024 byte 24c08 EEPROM, writable, 16 bytes/write

[    1.803203] rtc-rx8025 0-0032: rx8025_get_time: read 0x09 0x01 0x06 0x06 0x16 0x11 0x18

[    1.803220] rtc-rx8025 0-0032: rx8025_get_time: date 9s 1m 6h 16md 10m 118y

[    1.803504] rtc rtc0: rx8025: dev (253:0)

[    1.803534] rtc-rx8025 0-0032: rtc core: registered rx8025 as rtc0

[    1.809854] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz

[    3.179312] rtc-rx8025 0-0032: rx8025_get_time: read 0x10 0x01 0x06 0x06 0x16 0x11 0x18

[    3.179330] rtc-rx8025 0-0032: rx8025_get_time: date 10s 1m 6h 16md 10m 118y

[    3.179373] rtc-rx8025 0-0032: setting system clock to 2018-11-16 06:01:10 UTC (1542348070)

6      Follow-up

Read rtc:

Write rtc:

test rtc:

eeprom access dir:

/sys/bus/i2c/devices/0-0050

am335x system upgrade kernel i2c rtc eeprom(六)的更多相关文章

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

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

  2. am335x system upgrade kernel tf(五)

    1      Scope of Document This document describes TF hardware design 2      Requiremen 2.1     Functi ...

  3. am335x system upgrade kernel ethernet(四)

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

  4. am335x system upgrade kernel gpio(九)

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

  5. am335x system upgrade kernel can(八)

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

  6. am335x system upgrade kernel uart(七)

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

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

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

  8. am335x system upgrade kernel usb stroage(十)

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

  9. am335x system upgrade kernel emmc(十八)

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

随机推荐

  1. 【转】基于FPGA的Sobel边缘检测的实现

    前面我们实现了使用PC端上位机串口发送图像数据到VGA显示,通过MATLAB处理的图像数据直接是灰度图像,后面我们在此基础上修改,从而实现,基于FPGA的动态图片的Sobel边缘检测.中值滤波.Can ...

  2. 使用lxml解析HTML代码

    做个参考,转自:https://blog.csdn.net/qq_42281053/article/details/80658018

  3. Java 枚举和抽象类添加状态值

    枚举: public enum CourseTypeEnum { VIDEO_COURSE(1,"录制课程"), LIVE_COURSE(2,"直播课程"), ...

  4. Linux用户组笔记整理

    一.Linux用户组概念 Linux用户组(group)就是具有相同操作权限范围的Linux用户管理起来: 比如有时我们要让同一类用户具有相同的权限,比如查看.修改某一文件或执行某个命令, 这时我们需 ...

  5. 5_PHP数组_3_数组处理函数及其应用_3_数组指针函数

    以下为学习孔祥盛主编的<PHP编程基础与实例教程>(第二版)所做的笔记. 数组指针函数 1. key() 函数 程序: <?php $interests[2] = "mus ...

  6. iOS 打包静态库.a文件(真机版 + 虚拟机)

    我们以打包IOS开发中封装的高地地图基础功能包 GDMap为例. 1>我们需要准备好需要打包的GDMap     2>接下来我们开始新建一个工程文件取名GDMap     3>删掉无 ...

  7. 如何使用NPM?CNPM又是什么?

    背景介绍 什么是npm? npm(node package manager)是nodejs的包管理器,用于node插件管理(包括安装.卸载.管理依赖等), NPM是随同NodeJS一起安装的包管理工具 ...

  8. Jmeter学习笔记(十三)——xpath断言

    1.什么是XPath断言 XPath即为XML路径语言,它是一种用来确定XML(标准通用标记语言的子集)文档中某部分位置的语言.XPath基于XML的树状结构,提供在数据结构树中找寻节点的能力. Ap ...

  9. 【Redis】基本数据类型及命令操作(超详细)

    一.String 1.1 概述 1.2 相关命令列表 1.3 命令示例 二.List 2.1 概述: 2.2 相关命令列表: 2.3 命令示例: 2.4 链表结构的小技巧: 三.Hashes 3.1 ...

  10. VSCode - Beautify插件配置

    注: 本文摘自 黑火巨雷 - 简书 1. 在工作目录下建立.jsbeautifyrc文件 官方文档 { "brace_style": "none,preserve-inl ...