【问题标题】:Beaglebone Black: RTC DS1307/DS1338 gives error in Android at bootupBeaglebone Black:RTC DS1307/DS1338 在 Android 启动时出现错误
【发布时间】:2014-08-05 07:55:25
【问题描述】:

我正在使用 TI-Android-JB-4.2.2-DevKit-4.1.1 为 Beaglebone Black 构建一个运行良好的 Android。我尝试使用 RTC-Cape (http://elinux.org/CircuitCo:RTC_Cape)。通过 BBB 上的“板载”Angström,我能够手动设置和读取 RTC,因此我认为硬件没问题。

为了让 RTC 在 Android 上运行,我在结构体中添加了 kernel/arch/arm/mach-omap2/board-am335xevm.c 文件

static struct i2c_board_info __initdata am335x_i2c0_boardinfo[]

最后

{
    I2C_BOARD_INFO("ds1338", 0x68),
},

kernel/arch/arm/configs/am335x_evm_android_defconfig 中,我激活了CONFIG_RTC_DRV_DS1307 (CONFIG_RTC_DRV_DS1307=y) 并停用了CONFIG_RTC_DRV_OMAP

开机时显示

<4>[    1.880767] rtc-ds1307: probe of 1-0068 failed with error -5
<6>[    1.886779] i2c /dev entries driver

<3>[    2.306884] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

我尝试调整来自此 Beaglebone/Linux 邮件列表的更改:https://groups.google.com/forum/#!msg/beagleboard/DegreEdtI-Q/ZEdFLNnuTvMJ

我是 Android/Linux 内核配置的新手。如何在内核中正确包含和配置 RTC 以使其在启动时可用?

问候

马蒂亚斯

更新

事实证明,Beaglebone Black Cape 上的 DS1338 实际上连接到 P9 上的 17 和 18,即 Android 上的 I2C1 或 i2c-2。默认情况下,此总线在 Android 中处于停用状态。作为一个简短的解决方法,我切断了印刷的电路路径并将其连接到 P9 上的 19 和 20(I2C2 或 i2c-3)。

然后我将I2C_BOARD_INFO 块移动到

static struct i2c_board_info am335x_i2c2_boardinfo[]

编译后的内核现在会在启动时从 RTC 读取时间。

非常感谢 user3926077 的提示。

正确的解决方案是在 Android 内核中激活 i2c-2 并将 I2C-BOARD_INFO 块放入 static struct i2c_board_info am335x_i2c1_boardinfo[]。不幸的是,我目前不知道如何实现这一点,我们只需要 RTC 进行调试,所以焊接解决方案对我们有用。

【问题讨论】:

    标签: android android-source i2c beagleboneblack real-time-clock


    【解决方案1】:

    static struct i2c_board_info __initdata am335x_i2c0_boardinfo[] 正在访问内部 i2c 总线 /dev/i2c-1 但您会将 rtc 插入 p9 上的 19 和 20,即 /dev/i2c-3

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-02-05
      • 2013-07-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多