1 2 Previous Next 20 Replies Latest reply on Aug 26, 2016 12:42 PM by shopen

    Edison RTC backup battery charging parameters

    Itstechpro

      I've seen numerous posts on this topic but have not seen a response indicating anyone was successful in modifying the charge voltage and charge current parameters from the default of 2.5 volts and 100uA, essentially intended for use with a supercap short term backup.

       

      If anyone has successfully changed the BBCHGRCFG register from the default parameters, please post here with details.

       

      I need 3.3 volts and 500uA for use with a rechargeable 11mAH Li coin cell ....    which requires BBCHGRCFG register bit pattern       0x1F

       

      Thanks,

      JM

        • 1. Re: Edison RTC backup battery charging parameters
          CMata_Intel

          Hi Jules,

           

          We are working on some tests for changing the parameters with the BBCHGRCFG register and build the image again. There is another thread related to this: Changing V_VBAT_BCKP Voltage and Ampere Setting As soon as we finish our tests, I will post in here the our results on which is the best way to change this register.

           

          Kind regards,

          Charlie

          • 2. Re: Edison RTC backup battery charging parameters
            Itstechpro

            Charlie,

            Thank you ..

             

            Jules

            • 3. Re: Edison RTC backup battery charging parameters
              bbrotherton

              I have a patch for the edison source build that creates a sysfs file that allows you to change this register, I have verified with a multimeter that it works for changing the voltage I have not done testing to verify the current but that should work.

               

              The patch can be found on github.

               

              LGSInnovations/edison-bbcharge-patch · GitHub

              • 4. Re: Edison RTC backup battery charging parameters
                ab-tools

                Hello bbrotherton,

                 

                first thanks a lot for posting your solution here!

                 

                I'm trying to find a way to change this register now for almost two weeks. It's really unbelievable if that is so easy to do from the Linux bash after your change and Intel did not include this into their stock images themselves directly, but let us go through such an extensive process - just to change a single setting!

                 

                I'm currently running the build with your changes to test again and really looking forward to finally got this change done then.

                Therefore thanks again a lot!

                 

                But I have one question:

                in your GitHub patch file I see several changes which seem to be not related to this register change. I may be wrong with that as I really don't have any experience with Linux kernel compilation, but if that's the case and there are also other changes done with your patch, could you please explain what else you have changed - just that we know?

                 

                Best regards and again thank you

                Andreas

                • 5. Re: Edison RTC backup battery charging parameters
                  bbrotherton

                  Hi Andreas,

                   

                  You are correct,  I didn't have time to clean up my patch file.  This does enable some kernel modules that I needed for my project that are not enabled by default.  These changes are not needed just for the RTC current/voltage setting.  I believe you could remove the first part of the patch file that patches defconfig and it should still work.

                   

                  The Chnages to Makefile.mk are not necessary and can be removed as well, they just add a new option to easily run the kernel menuconfig that I was using during my development.

                  • 6. Re: Edison RTC backup battery charging parameters
                    ab-tools

                    Hello bbrotherton,

                     

                    thank you very much for your quick reply!

                     

                    According to your explanation I created attached new patch file:

                    that should include now only the changes needed for the register change, right?

                     

                    Sorry to ask that, but I really don't have much clue about the whole kernel compilation task - I'm just forced to do that for this register change...

                     

                    Best regards and again thank you for your support

                    Andreas

                    • 7. Re: Edison RTC backup battery charging parameters
                      CMata_Intel

                      Hi Andreas,

                       

                      We can provide a patch for the file intel_scu_pmic.c and that will allow you to set the charging value one time only at boot and if you need to change the value again then you have to change it in the patch and rebuild the image. There is a second option, we can provide a patch for the file pmic_ccsm.c and that will allow you to change the value using the Linux echo command. Do you have any preference?

                       

                      Kind regards,

                      • 8. Re: Edison RTC backup battery charging parameters
                        Itstechpro

                        For Andreas .... I'd opt for the ability to change settings via the shell echo command ...

                        Jules

                         

                        Thanks to everyone for the effort on this ... I think it will be very useful to the general user community....

                        • 9. Re: Edison RTC backup battery charging parameters
                          ab-tools

                          Hello everybody,

                           

                          I can confirm now that the modified patch from bbrotherton I posted above works correctly:

                          changing the setting from the shell via the echo command works perfectly now.

                           

                          @CMata_Intel: no need to provide a patch anymore as bbrotherton did that already, but I would highly appreciate if Intel would include this change in all upcoming official images directly that we don't need to re-compile the whole kernel again if we want to change this setting (and keep our Edison with the latest image version)!

                           

                          Thanks again, bbrotherton, for your time and efforts posting your solution here!

                           

                          Best regards

                          Andreas

                          • 10. Re: Edison RTC backup battery charging parameters
                            ab-tools

                            Hello bbrotherton,

                             

                            ah, sorry, I mixed up the names in my previous post:

                            all the acclamation for your effort building this patch and posting it here goes to you, bbrotherton, of course!

                             

                            But, Jules (and this time I really mean you ), as I got the patched image working correctly now I want to provide you as promised with the patched image. I just uploaded it to my DropBox here:

                            Dropbox - edison-image-ww25.5-15-patched.zip

                            You can change the setting now very easily from the shell like bbrotherton wrote; I'm using it with 3.3 V and 500 µA with this command:

                            echo 31 > /sys/devices/platform/pmic_ccsm/backup_battery_charge

                             

                            Best regards

                            Andreas

                            • 11. Re: Edison RTC backup battery charging parameters
                              Itstechpro

                              Andreas, you're a man of your word ... thank you

                              I've outfitted my Arduino breakout board with Radio Controlled model style polarized 2 pin connectors for the RTC coin cell to avoid 'accidents'.  I'll also use those on the main battery connection and will post images of the mod when completed.

                               

                              bbrotherton, your effort and contribution to the community is greatly appreciated

                               

                              CMata_Intel ... great suggestion; should be included in the image

                               

                              Best regards,

                              Jules

                              • 12. Re: Edison RTC backup battery charging parameters
                                nullptr2this

                                I know this post is pretty old, but do you know if any kind of a patch was ever created to change the backup battery charge setting once at boot only rather than setting it via echo?  I need to use a non-rechargable backup battery (for reasons having to do with temperature that I won't go into) and don't need to be able to change the settings on the fly.  Just curious if that was ever created.

                                 

                                Thanks!

                                 

                                --Jon

                                • 13. Re: Edison RTC backup battery charging parameters
                                  nullptr2this

                                  Also, I have been unable to get the "echo" approach described above to work.  I have patched my image configuration with the cleaned up patch file provided by Andreas.  I do not see a backup_battery_charge file nor am I able to create one.  I'm curious as to whether or not the following kernel configuration modification found in the not so cleaned up patch file referenced earlier is required for this to work: +CONFIG_I2C_PMIC=y

                                  • 14. Re: Edison RTC backup battery charging parameters
                                    CMata_Intel

                                    Hi Jon,

                                     

                                    Attached is the patch for this.

                                    You need to edit the file linux-yocto_3.10.bbappend, this file has a line with SRC_URI += "file://upstream_to_edison.patch", create a new line similar under that line for the PMIC patch, then copy the patch to the files folder where the upstream_to_edison.patch file reside

                                    Which source files are you using?

                                     

                                    Regards,

                                    Charlie

                                    1 2 Previous Next