am335x system upgrade kernel i2c rtc eeprom(六)
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
- Data transfer is initiated with a start bit (S) signaled by SDA being pulled low while SCL stays high.
- SCL is pulled low, and SDA sets the first data bit level while keeping SCL low (during blue bar time).
- 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).
- This process repeats, SDA transitioning while SCL is low, and the data being read while SCL is high (B2, ...Bn).
- The final bit is followed by a clock pulse, during which SDA is pulled low in preparation for the stop bit.
- 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(六)的更多相关文章
- am335x system upgrade kernel f-ram fm25l16b(十六)
1 Scope of Document This document describes SPI F-RAM hardware design 2 Requiremen 2.1 ...
- am335x system upgrade kernel tf(五)
1 Scope of Document This document describes TF hardware design 2 Requiremen 2.1 Functi ...
- am335x system upgrade kernel ethernet(四)
1 Scope of Document This document describes ethernet hardware design and porting KZS8081 to ubo ...
- am335x system upgrade kernel gpio(九)
1 Hardware Overview gpio interface,pin map: AM335X_I2C0_W_C----------------------MCASP0_AXR1 /* ...
- am335x system upgrade kernel can(八)
1 Scope of Document This document describes can bus hardware design and can bus driver developm ...
- am335x system upgrade kernel uart(七)
1 Scope of Document This document describes UART hardware design, uart driver porting 2 Re ...
- am335x system upgrade kernel ec20 simcom7600ce(十一)
1 Scope of Document This document describes 4G hardware design, support quectel ec20 4G module/ ...
- am335x system upgrade kernel usb stroage(十)
1 Scope of Document This document describes USB hardware design, support stardard usb2.0 port o ...
- am335x system upgrade kernel emmc(十八)
1 Scope of Document This document describes EMMC hardware design 2 Requiremen 2.1 Func ...
随机推荐
- java8之lambda表达式(默认方法)
[推荐]2019 Java 开发者跳槽指南.pdf(吐血整理)>>> 许多开发语言都将函数表达式集成到了其集合库中.这样比循环方式所需的代码更少,并且更加容易理解.以下面的循环为例: ...
- Matlab M文件变量检测与传递
M文件中变量的检测与传递 可变数量的输入输出变量(varargin,vararout): Matlab的输入输出变量数量可变,并具有以下特点: 可变输入输出变量必须在正常变量之后 varargin和v ...
- dubbo源码阅读之负载均衡
负载均衡 在之前集群的文章中,我们分析了通过监听注册中心可以获取到多个服务提供者,并创建多个Invoker,然后通过集群类如FailoverClusterInvoker将多个Invoker封装在一起, ...
- 安恒pwn魔法
魔法这是比较基础的一道栈溢出: 首先看下开启的防护机制 Checksec magicc发现只有nx防护 我们载入ida发现溢出点 Buf实际溢出空间为0x16,构造exp import time fr ...
- Tomcat启动时一闪而过,看不多错误信息解决方案
转自:https://wangxh89.iteye.com/blog/1824806 有时Tomcat的启动窗口一闪而过,根本就看不出启动过程中发生了什么错误.这中间的原因有好多种,最常见的解决办法就 ...
- iOS ANE植入流程
来源:http://www.adsmogo.com/help/iosANE 一.iOS ANE植入流程 Step 1:创建Flex工程 1.1 启动Flash Builder 4.6.0, 选择“Fi ...
- 【新手可看懂】ubuntu配置appium环境
1.node安装: 在node官网:https://nodejs.org/en/download/ 下载对应的安装包(这里建议下载最新的版本)下载好后放在liunx指定路径下 我这里放到opt这个文件 ...
- python使用tkinter无法获取输入框的值
如果遇到:使用tkinter无法获取输入框Entty()的值的问题,需要检查一下,是否在定义Entry()时立即进行了pack() 会出现使用entryname.get()报错 解决方法:把定义和pa ...
- 一段让人瑟瑟发抖的ABAP代码
昨天11月1日是万圣节,Jerry在继续忙着调研SAP Commerce Cloud里的产品主数据管理.晚上回家到SAP国外的社交媒体上一看,好热闹啊.国外的SAP从业者们纷纷以各种各样的方式庆祝万圣 ...
- WinServer-开关机日志
开关机日志正常1074, 6006, 13, 12, 6005,41,60081074 记录某用户在某计划下重启6006 日志服务关闭13 OS关闭时间按12 OS启动时间6005 日志服务开启 异常 ...