[PATCH qemu 2/3] ast2400: add a rtc device on I2C bus 0
Joel Stanley
joel at jms.id.au
Thu May 19 00:06:16 AEST 2016
On Wed, May 18, 2016 at 11:16 PM, Cédric Le Goater <clg at kaod.org> wrote:
> On 05/18/2016 03:33 PM, Joel Stanley wrote:
>> Hey Cedric,
>>
>> On Wed, May 18, 2016 at 4:55 AM, Cédric Le Goater <clg at kaod.org> wrote:
>>> The palmetto platform has a ds3231 RTC device but not qemu. Let's use
>>> a ds1338 instead.
>>>
>>> The aspeed-bmc-opp-palmetto dts file needs to be changed consequently
>>> with :
>>>
>>> rtc at 68 {
>>> compatible = "dallas,ds1338";
>>> reg = <0x68>;
>>> };
>>
>> Please see my comments for the tmp device.
>>
>> How much does the register layout differ between the 1338 and the 3231?
>
> Will tell you soon.
>
> But on my palmetto running OpenBMC, I see :
>
> [ 5.630000] rtc-ds1307: probe of 0-0068 failed with error -5
>
> So do we really have a RTC available on this bus ?
The schematic I have suggests it's at 0x0e on the Palmetto. But I am
sure we've used that device tree as-is and the clock works on the
hardware. I will check tomorrow.
> root at palmetto:~# i2cdetect -y 0
> 0 1 2 3 4 5 6 7 8 9 a b c d e f
> 00: -- -- -- -- -- -- -- -- -- -- -- -- --
> 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 50: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 70: -- -- -- -- -- -- -- --
>
> There are plenty of other devices on the other busses though, but
> none with Ox68.
>
> There is also a RTC directly connected to APB bus. I guess we need a
> model for this one also.
That one in the SoC isn't battery backed. It's currently disabled in
the device tree for openbmc machines to avoid confusion with the
battery backed i2c device.
I'd suggest it's a low priority to model the internal one.
More information about the openbmc
mailing list