Device tree and external RTC

Bruce_Leonard at selinc.com Bruce_Leonard at selinc.com
Fri Oct 5 04:25:10 EST 2007


Peter,

Peter Korsgaard <jacmet at gmail.com> wrote on 10/04/2007 04:21:10 AM:

> >>>>> "Bruce" == Bruce Leonard <Bruce_Leonard at selinc.com> writes:
> 
> 
> You need to add #address/size-cells to the I2C node, E.G.:
> +         #address-cells = <1>;
> +         #size-cells = <0>;
> 
> 
> You need to set compatible and reg, E.G.
>          rtc at 54 {
>             device_type = "rtc";
>             compatible = "stm,m41t00";
>             reg = <54>;
>          };
> 
> And it should get picked up automatically by
> fsl_soc.c:of_find_i2c_driver().
> 
> Notice that you will need to use galak's git tree

Thanks for the info.  It's this sort of thing that isn't clearly 
documented anywhere, and until I'm REALLY familiar with the kernel knowing 
where to look is a challenge.

A follow on question though.  I've looked at the patch and it seems to be 
just adding 6 lines to an existing array in fsl_soc.c.  However, I can't 
seem to find any array in fsl_soc.c that contains lines that the patch 
indicates should already be there (i.e., there's nothing in fsl_soc.c that 
has the word "ricoh" in it which the patch indicates it should).  Is my 
fsl_soc.c already out of date?  Will the patch apply?  I've got 2.6.22.

Bruce


More information about the Linuxppc-embedded mailing list