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. ASP.NET MVC请求参数字符串之区分空与NULL

    开发中经常会写增删改查的功能,这里记录下在更新操作时遇到的一个问题. 假设一个模型对应数据库中某一张表,在更新时便需要区分是一次性更新全部字段还是仅更新部分字段.希望能做到传递某个参数时便更新,未传递 ...

  2. logrus 剖析之滚动日志

    在实际开发过程中,为了节省磁盘,日志需要按照时间或者大小维度进行切割分成多分,归档过期的日志,删除久远的日志.这个就是在日常开发中经常遇见的日志滚动(log rotation) 那么在 logrus ...

  3. Winform 快速开发框架,上位机开发,工控机程序开发,CS程序开发

    1.当客户让你做个CS程序时,当你手上一穷二白,所有都要重复造轮,你是不是很烦. 2.但如果有一个通用的,快速开发框架,就可以把你从这些基础的工作解救出来,你专注做业务就好了. 3.本人其中一个项目的 ...

  4. Golang --多个变量同时赋值

    编程最简单的算法之一,莫过于变量交换.交换变量的常见算法需要一个中间变量进行变量的临时保存.用传统方法编写变量交换代码如下: var a int = 100 var b int = 200 var t ...

  5. gensim快速上手教程

    1 gensim是什么?        gensim是一个Python常用的的自然语言处理开发包, 主要用于词向量训练和加载词向量,以下解释其正确使用姿势. 2 正确使用姿势 from gensim. ...

  6. TCP协议(下)

    TCP滑动窗口 发送端 LastByteAcked:第一部分和第二部分的分界线 LastByteSent:第二部分和第三部分的分界线 LastByteAcked + AdvertisedWindow: ...

  7. [unity]GPU Instance学习

    前言我们之前研究过为什么Unity的UI可以合批,是因为使用了相同的材质进行渲染,UI上不同图片渲染是通过把图片打成一张图集后,使用Image组件对顶点填充了不同的UV值实现的.那么有没有什么办法可以 ...

  8. 【阿里云开发】- 安装tomcat

    Tomcat配置过程 1.下载Tomcat 官网地址:http://tomcat.apache.org/ 这里我用的是apache-tomcat-8.5.38.tar.gz 2.通过ftp工具将下载好 ...

  9. Vue项目中遇到的问题汇总

    一.打包后的打开index.html页面空白的几种情况: 引入的css.js路径报错,此时解决方法:把vue.config.js中的增加publicPath: ‘./’ 或者把原来的baseUrl改为 ...

  10. RabbitMQ-python应用

    介绍 官方文档:https://www.rabbitmq.com/tutorials/tutorial-one-python.html RabbitMQ是一个基于AMQP协议的消息代理.它的工作就是接 ...