This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

read/write RTC with I2C0 for PMIC TPS65910

Other Parts Discussed in Thread: TPS65910, AM3352

Hello

is there source code example to read/write on I2C the RTC for PMIC TPS65910 (AM3352 custom board on linux) ?

best regards

thanks

  • Hi Trichet,

    If you want the linux kernel code, the TPS65910 kernel driver code can be found inside <linux_dir>/drivers/mfd/tps65910.c.

    If you want user space code - check here: http://elinux.org/Interfacing_with_I2C_Devices

    Or here: https://www.kernel.org/doc/Documentation/i2c/dev-interface

    Best regards,
    Miroslav

  • Hi,

    thanks for your reply

    i have registered in my boardinfo[] the TPS65910 :
            I2C_BOARD_INFO("tps65910", TPS65910_I2C_ID1),
            .platform_data  = &am335x_tps65910_info,

    and it seems to be well recognized by linux :

    [    0.138336] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz                   
    [    0.139739] tps65910 1-002d: JTAGREVNUM 0x0                                  
    [    0.142181] print_constraints: VRTC:                                         
    [    0.143676] print_constraints: VIO: at 1500 mV                               
    [    0.146026] print_constraints: VDD1: 600 <--> 1500 mV at 1100 mV normal      
    [    0.148345] print_constraints: VDD2: 600 <--> 1500 mV at 1100 mV normal      
    [    0.149414] print_constraints: VDD3: 5000 mV                                 
    [    0.150848] print_constraints: VDIG1: at 1800 mV                             
    [    0.152343] print_constraints: VDIG2: at 1800 mV                             
    [    0.153778] print_constraints: VPLL: at 1800 mV                              
    [    0.155242] print_constraints: VDAC: at 1800 mV                              
    [    0.156707] print_constraints: VAUX1: at 1800 mV                             
    [    0.158172] print_constraints: VAUX2: at 3300 mV                             
    [    0.159637] print_constraints: VAUX33: at 3300 mV                            
    [    0.161102] print_constraints: VMMC: at 3300 mV                              
    [    0.161712] tps65910 1-002d: No interrupt support, no core IRQ               

    Do you know how i can call from user space the linux driver to read/write the RTC ?

    thanks

    regards

    Christophe