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.

PROCESSOR-SDK-AM62X: Requesting to provide the linux device driver for charger (bq25622 )

Part Number: PROCESSOR-SDK-AM62X
Other Parts Discussed in Thread: BQ25622, BQ25620, BQ25750

Hi Ti,

This is Naresh , working on AM62X.

Could you please provide the linux device driver /patch for BQ25622 .

detials of my setup :

Host : ubuntu 20.04

Kernel used - 6.1

Thanks,

Naresh

  • Naresh,

    Is your registered email still valid? We may send the sample driver to you.

    Thanks a lot,

    Ning.

  • Hi Ning,

    yes my register mail id is valid.

    its naresh.nakka@tessolve.com

    Thanks,

    Naresh

  • Hi Ning,

    yes my register mail id is valid.

    its naresh.nakka@tessolve.com

    Atually  i found the patch from -> https://e2e.ti.com/support/power-management-group/power-management/f/power-management-forum/1231646/bq25620-bq256xxsw-linux-support.

    added the changes as per the patch .

    But while booting in moddle of the kernel it stuck/hanging /freez , the time when freez powe supply is down to board .

    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
    [    0.000000] Linux version 6.1.33-00001-ge4769b223d98-dirty (naresh@naresh-ThinkPad-E15-Gen-2) (aarch64-none-linux-gnu-gcc (Arm GNU Toolchain 11.3.Rel1) 11.3.1 20220712, GNU ld (Arm GNU Toolchain 11.33
    [    0.000000] Machine model: Texas Instruments 
    [    0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '')
    [    0.000000] printk: bootconsole [ns16550a0] enabled
    [    0.000000] efi: UEFI not found.
    [    0.000000] Reserved memory: created CMA memory pool at 0x00000000f7600000, size 128 MiB
    [    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009c800000, size 3 MiB
    [    0.000000] OF: reserved mem: initialized node ipc-memories@9c800000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009cb00000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node m4f-dma-memory@9cb00000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009cc00000, size 14 MiB
    [    0.000000] OF: reserved mem: initialized node m4f-memory@9cc00000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009da00000, size 1 MiB
    [    0.000000] OF: reserved mem: initialized node r5f-dma-memory@9da00000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created DMA memory pool at 0x000000009db00000, size 12 MiB
    [    0.000000] OF: reserved mem: initialized node r5f-memory@9db00000, compatible id shared-dma-pool
    [    0.000000] NUMA: No NUMA configuration found
    [    0.000000] NUMA: Faking a node at [mem 0x0000000080000000-0x00000000ffffffff]
    [    0.000000] NUMA: NODE_DATA [mem 0xf730fa00-0xf7311fff]
    [    0.000000] Zone ranges:
    [    0.000000]   DMA      [mem 0x0000000080000000-0x00000000ffffffff]
    [    0.000000]   DMA32    empty
    [    0.000000]   Normal   empty
    [    0.000000] Movable zone start for each node
    [    0.000000] Early memory node ranges
    [    0.000000]   node   0: [mem 0x0000000080000000-0x000000009c7fffff]
    [    0.000000]   node   0: [mem 0x000000009c800000-0x000000009e6fffff]
    [    0.000000]   node   0: [mem 0x000000009e700000-0x000000009e77ffff]
    [    0.000000]   node   0: [mem 0x000000009e780000-0x000000009fffffff]
    [    0.000000]   node   0: [mem 0x00000000a0000000-0x00000000ff6fffff]
    [    0.000000]   node   0: [mem 0x00000000ff700000-0x00000000fffc9fff]
    [    0.000000]   node   0: [mem 0x00000000fffca000-0x00000000ffffffff]
    [    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000ffffffff]
    [    0.000000] psci: probing for conduit method from DT.
    [    0.000000] psci: PSCIv1.1 detected in firmware.
    [    0.000000] psci: Using standard PSCI v0.2 function IDs
    [    0.000000] psci: Trusted OS migration not required
    [    0.000000] psci: SMC Calling Convention v1.2
    [    0.000000] percpu: Embedded 20 pages/cpu s44968 r8192 d28760 u81920
    [    0.000000] Detected VIPT I-cache on CPU0
    [    0.000000] CPU features: detected: GIC system register CPU interface
    [    0.000000] CPU features: detected: ARM erratum 845719
    [    0.000000] alternatives: applying boot alternatives
    [    0.000000] Fallback order for Node 0: 0 
    [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516096
    [    0.000000] Policy zone: DMA
    [    0.000000] Kernel command line: console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000 mtdparts=spi-nand0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),256k(ospi.env.backup),9t
    [    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
    [    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
    [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
    [    0.000000] Memory: 1821056K/2097152K available (16512K kernel code, 3772K rwdata, 9024K rodata, 7616K init, 617K bss, 145024K reserved, 131072K cma-reserved)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
    [    0.000000] rcu: Preemptible hierarchical RCU implementation.
    [    0.000000] rcu:     RCU event tracing is enabled.
    [    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
    [    0.000000]  Trampoline variant of Tasks RCU enabled.
    [    0.000000]  Tracing variant of Tasks RCU enabled.
    [    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
    [    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
    [    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
    [    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
    [    0.000000] GICv3: 256 SPIs implemented
    [    0.000000] GICv3: 0 Extended SPIs implemented
    [    0.000000] Root IRQ handler: gic_handle_irq
    [    0.000000] GICv3: GICv3 features: 16 PPIs
    [    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x0000000001880000
    [    0.000000] ITS [mem 0x01820000-0x0182ffff]
    [    0.000000] GIC: enabling workaround for ITS: Socionext Synquacer pre-ITS
    [    0.000000] ITS@0x0000000001820000: Devices Table too large, reduce ids 20->19
    [    0.000000] ITS@0x0000000001820000: allocated 524288 Devices @80800000 (flat, esz 8, psz 64K, shr 0)
    [    0.000000] ITS: using cache flushing for cmd queue
    [    0.000000] GICv3: using LPI property table @0x0000000080040000
    [    0.000000] GIC: using cache flushing for LPI property table
    [    0.000000] GICv3: CPU0: using allocated LPI pending table @0x0000000080050000
    [    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
    [    0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (phys).
    [    0.000000] clocksource: arch_sys_counter: mask: 0x3ffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
    [    0.000001] sched_clock: 58 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
    [    0.009685] Console: colour dummy device 80x25
    [    0.014322] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=800000)
    [    0.025006] pid_max: default: 32768 minimum: 301
    [    0.029787] LSM: Security Framework initializing
    [    0.034630] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
    [    0.042215] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
    [    0.052097] cblist_init_generic: Setting adjustable number of callback queues.
    [    0.059556] cblist_init_generic: Setting shift to 2 and lim to 1.
    [    0.065857] cblist_init_generic: Setting shift to 2 and lim to 1.
    [    0.072280] rcu: Hierarchical SRCU implementation.
    [    0.077187] rcu:     Max phase no-delay instances is 1000.
    [    0.082787] Platform MSI: msi-controller@1820000 domain created
    [    0.089115] PCI/MSI: /bus@f0000/interrupt-controller@1800000/msi-controller@1820000 domain created
    [    0.098391] fsl-mc MSI: msi-controller@1820000 domain created
    [    0.106311] EFI services will not be available.
    [    0.111259] smp: Bringing up secondary CPUs ...
    [    5.139276] CPU1: failed to come online
    [    5.143199] CPU1: failed in unknown state : 0x0
    [   10.267268] CPU2: failed to come online
    [   10.271195] CPU2: failed in unknown state : 0x0
    [   15.395265] CPU3: failed to come online
    [   15.399189] CPU3: failed in unknown state : 0x0
    [   15.403888] smp: Brought up 1 node, 1 CPU
    [   15.408003] SMP: Total of 1 processors activated.
    [   15.412827] CPU features: detected: 32-bit EL0 Support
    [   15.418083] CPU features: detected: 32-bit EL1 Support
    [   15.423342] CPU features: detected: CRC32 instructions
    [   15.428668] CPU: All CPU(s) started at EL2
    [   15.432873] alternatives: applying system-wide alternatives
    [   15.440747] devtmpfs: initialized
    [   15.453034] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
    [   15.463070] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
    [   15.474623] pinctrl core: initialized pinctrl subsystem
    [   15.482326] DMI not present or invalid.
    [   15.487011] NET: Registered PF_NETLINK/PF_ROUTE protocol family
    [   15.494049] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations
    [   15.501428] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
    [   15.509499] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
    [   15.517672] audit: initializing netlink subsys (disabled)
    [   15.524861] thermal_sys: Registered thermal governor 'step_wise'
    [   15.524876] thermal_sys: Registered thermal governor 'power_allocator'
    [   15.531077] audit: type=2000 audit(15.412:1): state=initialized audit_enabled=0 res=1
    [   15.545838] cpuidle: using governor menu
    [   15.550124] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
    [   15.557116] ASID allocator initialised with 65536 entries
    [   15.564451] Serial: AMBA PL011 UART driver
    [   15.588790] platform 30200000.dss: Fixed dependency cycle(s) with /bus@f0000/i2c@20010000/sii9022@3b
    [   15.602577] platform connector: Fixed dependency cycle(s) with /bus@f0000/i2c@20010000/sii9022@3b
    [   15.613271] KASLR disabled due to lack of seed
    [   15.626460] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
    [   15.633553] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
    [   15.639968] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
    [   15.646908] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
    [   15.653317] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
    [   15.660256] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
    [   15.666664] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
    [   15.673603] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
    [   15.682017] ACPI: Interpreter disabled.
    [   15.688097] k3-chipinfo 43000014.chipid: Family:AM62X rev:SR1.0 JTAGID[0x0bb7e02f] Detected
    [   15.698395] iommu: Default domain type: Translated 
    [   15.703433] iommu: DMA domain TLB invalidation policy: strict mode 
    [   15.710141] SCSI subsystem initialized
    [   15.714359] usbcore: registered new interface driver usbfs
    [   15.720018] usbcore: registered new interface driver hub
    [   15.725481] usbcore: registered new device driver usb
    [   15.732005] pps_core: LinuxPPS API ver. 1 registered
    [   15.737092] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [   15.746443] PTP clock support registered
    [   15.750591] EDAC MC: Ver: 3.0.0
    [   15.755662] omap-mailbox 29000000.mailbox: omap mailbox rev 0x66fc9100
    [   15.763202] FPGA manager framework
    [   15.766810] Advanced Linux Sound Architecture Driver Initialized.
    [   15.774119] vgaarb: loaded
    [   15.777423] clocksource: Switched to clocksource arch_sys_counter
    [   15.783937] VFS: Disk quotas dquot_6.6.0
    [   15.787993] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
    [   15.795217] pnp: PnP ACPI: disabled
    [   15.804056] NET: Registered PF_INET protocol family
    [   15.809358] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
    [   15.818750] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
    [   15.827573] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
    [   15.835512] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
    [   15.843716] TCP bind hash table entries: 16384 (order: 7, 524288 bytes, linear)
    [   15.851713] TCP: Hash tables configured (established 16384 bind 16384)
    [   15.858646] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
    [   15.865570] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
    [   15.873098] NET: Registered PF_UNIX/PF_LOCAL protocol family
    [   15.879403] RPC: Registered named UNIX socket transport module.
    [   15.885511] RPC: Registered udp transport module.
    [   15.890322] RPC: Registered tcp transport module.
    [   15.895130] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [   15.901721] NET: Registered PF_XDP protocol family
    [   15.906635] PCI: CLS 0 bytes, default 64
    [   15.911732] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
    [   15.920911] kvm [1]: IPA Size Limit: 40 bits
    [   15.926863] kvm [1]: vgic-v2@100010000
    [   15.930712] kvm [1]: GIC system register CPU interface enabled
    [   15.936747] kvm [1]: vgic interrupt IRQ9
    [   15.940787] kvm [1]: Hyp mode initialized successfully
    [   15.947531] Initialise system trusted keyrings
    [   15.952378] workingset: timestamp_bits=42 max_order=19 bucket_order=0
    [   15.964995] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [   15.971660] NFS: Registering the id_resolver key type
    [   15.976889] Key type id_resolver registered
    [   15.981167] Key type id_legacy registered
    [   15.985358] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
    [   15.992215] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
    [   15.999995] 9p: Installing v9fs 9p2000 file system support
    [   16.040253] Key type asymmetric registered
    [   16.044443] Asymmetric key parser 'x509' registered
    [   16.049484] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
    [   16.057231] io scheduler mq-deadline registered
    [   16.061903] io scheduler kyber registered
    [   16.075752] pinctrl-single 4084000.pinctrl: 34 pins, size 136
    [   16.082402] pinctrl-single f4000.pinctrl: 171 pins, size 684
    [   16.089311] pinctrl-single a40000.pinctrl: 512 pins, size 2048
    [   16.104302] EINJ: ACPI disabled.
    [   16.134667] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    [   16.145047] SuperH (H)SCI(F) driver initialized
    [   16.150446] msm_serial: driver initialized
    [   16.162367] loop: module loaded
    [   16.167567] megasas: 07.719.03.00-rc1
    [   16.179698] tun: Universal TUN/TAP device driver, 1.6
    [   16.185218] CAN device driver interface
    [   16.190441] thunder_xcv, ver 1.0
    [   16.193805] thunder_bgx, ver 1.0
    [   16.197125] nicpf, ver 1.0
    [   16.201632] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
    [   16.209035] hns3: Copyright (c) 2017 Huawei Corporation.
    [   16.214534] hclge is initializing
    [   16.217950] e1000: Intel(R) PRO/1000 Network Driver
    [   16.222936] e1000: Copyright (c) 1999-2006 Intel Corporation.
    [   16.228856] e1000e: Intel(R) PRO/1000 Network Driver
    [   16.233939] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
    [   16.240033] igb: Intel(R) Gigabit Ethernet Network Driver
    [   16.245554] igb: Copyright (c) 2007-2014 Intel Corporation.
    [   16.251279] igbvf: Intel(R) Gigabit Virtual Function Network Driver
    [   16.257688] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
    [   16.264234] sky2: driver version 1.30
    [   16.269673] VFIO - User Level meta-driver version: 0.3
    [   16.278047] usbcore: registered new interface driver usb-storage
    [   16.287832] i2c_dev: i2c /dev entries driver
    [   16.303803] sdhci: Secure Digital Host Controller Interface driver
    [   16.310195] sdhci: Copyright(c) Pierre Ossman
    [   16.315902] Synopsys Designware Multimedia Card Interface Driver
    [   16.323364] sdhci-pltfm: SDHCI platform and OF driver helper
    [   16.331932] ledtrig-cpu: registered to indicate activity on CPUs
    [   16.340255] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
    [   16.347794] usbcore: registered new interface driver usbhid
    [   16.353527] usbhid: USB HID core driver
    [   16.364068] optee: probing for conduit method.
    [   16.368687] optee: revision 3.20 (8e74d476)
    [   16.369028] optee: dynamic shared memory is enabled
    [   16.378561] optee: initialized driver
    [   16.383011] gnss: GNSS driver registered with major 509
    [   16.388459] usbcore: registered new interface driver gnss-usb
    [   16.398370] Initializing XFRM netlink socket
    [   16.402859] NET: Registered PF_PACKET protocol family
    [   16.408039] can: controller area network core
    [   16.412580] NET: Registered PF_CAN protocol family
    [   16.417633] 9pnet: Installing 9P2000 support
    [   16.422072] Key type dns_resolver registered
    [   16.426960] registered taskstats version 1
    [   16.431182] Loading compiled-in X.509 certificates
    [   16.486880] ti-sci 44043000.system-controller: ABI: 3.1 (firmware rev 0x0009 '9.0.5--v09.00.05 (Kool Koala)')
    [   16.576833] omap_i2c 4900000.i2c: bus 0 rev0.12 at 400 kHz
    [   16.583989] omap_i2c 2b200000.i2c: bus 1 rev0.12 at 400 kHz
    [   16.591358] omap_i2c 20000000.i2c: bus 2 rev0.12 at 400 kHz
    [   16.622176] omap_i2c 20010000.i2c: bus 3 rev0.12 at 100 kHz
    [   16.629907] omap_i2c 20020000.i2c: bus 4 rev0.12 at 400 kHz
    [   16.636443] ti-sci-intr 4210000.interrupt-controller: Interrupt Router 5 domain created
    [   16.645159] ti-sci-intr bus@f0000:interrupt-controller@a00000: Interrupt Router 3 domain created
    [   16.654721] ti-sci-inta 48000000.interrupt-controller: Interrupt Aggregator domain 28 created
    [   16.667461] ti-udma 485c0100.dma-controller: Number of rings: 82
    [   16.675751] ti-udma 485c0100.dma-controller: Channels: 48 (bchan: 18, tchan: 12, rchan: 18)
    [   16.688148] ti-udma 485c0000.dma-controller: Number of rings: 150
    [   16.698372] ti-udma 485c0000.dma-controller: Channels: 35 (tchan: 20, rchan: 15)
    [   16.711675] printk: console [ttyS2] disabled
    [   16.716233] 2800000.serial: ttyS2 at MMIO 0x2800000 (irq = 241, base_baud = 3000000) is a 8250
    [   16.725144] printk: console [ttyS2] enabled
    [   16.725144] printk: console [ttyS2] enabled
    [   16.733607] printk: bootconsole [ns16550a0] disabled
    [   16.733607] printk: bootconsole [ns16550a0] disabled
    [   16.746537] 2810000.serial: ttyS3 at MMIO 0x2810000 (irq = 243, base_baud = 3000000) is a 8250
    [   16.760572] spi-nor spi0.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
    [   16.770581] m_can_platform 20701000.can: m_can device registered (irq=246, version=32)
    [   16.783548] davinci_mdio 8000f00.mdio: Configuring MDIO in manual mode
    [   16.829461] davinci_mdio 8000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
    [   16.838883] davinci_mdio 8000f00.mdio: phy[0]: device 8000f00.mdio:00, driver unknown
    [   16.846804] davinci_mdio 8000f00.mdio: phy[1]: device 8000f00.mdio:01, driver unknown
    [   16.854716] am65-cpsw-nuss 8000000.ethernet: initializing am65 cpsw nuss version 0x6BA01103, cpsw version 0x6BA81103 Ports: 3 quirks:00000006
    [   16.867759] am65-cpsw-nuss 8000000.ethernet: Use random MAC address
    [   16.874050] am65-cpsw-nuss 8000000.ethernet: initialized cpsw ale version 1.5
    [   16.881180] am65-cpsw-nuss 8000000.ethernet: ALE Table size 512
    [   16.887667] pps pps0: new PPS source ptp0
    [   16.891927] am65-cpsw-nuss 8000000.ethernet: CPTS ver 0x4e8a010c, freq:500000000, add_val:1 pps:1
    [   16.902356] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 19
    [   16.912718] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequency: 1250000 KHz, changing to: 1000000 KHz
    [   16.936504] mmc0: CQHCI version 5.10
    [   16.945640] mmc1: CQHCI version 5.10
    [   16.953740] mmc2: CQHCI version 5.10
                   bq625x - charger 3-00x6b : battery info missing, default values will be applied
    
    
    CTRL-A Z for help | 115200 8N1 | NOR | Minicom 2.7.1 | VT102 | Offline | ttyUSB0                                                                                                                          
    
    

     DTS configuration :

    //battery charger
    bq25620: charger@6b {
    compatible = "ti,bq25622";
    reg = <0x6b>;
    pinctrl-names = "default";
    pinctrl-0 = <&main_charger_pins>;
    interrupt-parent = <&main_gpio0>;
    gpios = <&main_gpio0 49 GPIO_ACTIVE_LOW>,<&main_gpio0 50 GPIO_ACTIVE_LOW>;
    interrupts =<49 IRQ_TYPE_EDGE_FALLING>,<50 IRQ_TYPE_EDGE_FALLING>;
    ti,watchdog-timeout-ms = <40000>;
    input-current-limit-microamp = <1000000>;
    input-voltage-limit-microvolt = <4600000>;
    monitored-battery = <&bat>;

    };

    bat: battery {
    compatible = "simple-battery";
    constant-charge-current-max-microamp = <1040000>;
    constant-charge-voltage-max-microvolt = <4200000>;
    precharge-current-microamp = <100000>;
    charge-term-current-microamp = <60000>;
    };

    - if i didnt add battery info then i got this below extra message in dmesg logs 

    bq625x - charger 3-00x6b : battery info missing, default values will be applied

    - if i add battery information in dts file then its not shwoing this message but its freeziing and  power down .

    Thanks,

    Naresh

  • Naresh,

    Sent you an email. Hope it helps. The thread is considered closed.

    Thanks,

    Ning.

  • Hi Ning ,
    Thanks for sharing sample driver for battery charger .
    But while compiling  the kernel source code ,getting compilation issues.
    please find attached logs.
    Thanks,
    Naresh.
  • Hi Naresh,

    No other customer has the issue before. For test purpose, please implement and run the BQ25622 code only ( i.e. no BQ25750 etc) in your system and the code should work.

    Thanks,

    Ning.

  • Hi Ning ,

    Still getting same compilation  issues.

    i guess BQ2562X_charger.h file is missing something , could you please check once again .

    I found some macros not found in header file , actually in header file BQ25750 macros are defined so i renamed it to BQ2562X ,even though some of them are missing .

    Thanks,

    Naresh

  • Hi Naresh,

    We are checking and will get back to you.

    Thanks a lot,

    Ning

  • Hi Ning,

    any update on this ?

    Thanks,

    Naresh

  • Hi Naresh,

    Emailed the updated .h file. It should work.

    Thanks,

    Ning.

  • Hi Ning , 

    Thanks for Quick support .

    yes , its enabled in the kernel . 

    Could you please help me how to verify the values of current , voltage and some status values which present in /sys/class/power_suuply/

    how to verify theese values so that my Battery charger performed functionally well .

    Note :currently i didnt connect the battery charger 

    Thanks,

    Naresh

  • Naresh,

    Table 9-3. Charging Parameter Default Setting on the d/s provides the default charging parameter values. For your specific battery, please check with the battery vendor for the appropriate charging parameter settings.

    Thanks,

    Ning.

  • Hi Ning , 

    Actually  i connected the battery , checked the battery and charger parameters as below 

    Battery charger parameters 

    root@am62xx-evm:/sys/class/power_supply/bq2562x-charger# ls
    charge_term_current current_now input_current_limit online subsystem voltage_now
    charge_type device input_voltage_limit power type wakeup7
    constant_charge_current health manufacturer precharge_current uevent
    constant_charge_voltage hwmon0 model_name status usb_type
    root@am62xx-evm:/sys/class/power_supply/bq2562x-charger# cat charge_term_current
    60000
    root@am62xx-evm:/sys/class/power_supply/bq2562x-charger# cat current_now
    4864000
    root@am62xx-evm:/sys/class/power_supply/bq2562x-charger# cat input_current_limit
    1000000
    root@am62xx-evm:/sys/class/power_supply/bq2562x-charger# cat online
    0
    root@am62xx-evm:/sys/class/power_supply/bq2562x-charger# cat voltage_now
    5016000
    root@am62xx-evm:/sys/class/power_supply/bq2562x-charger# cat input_voltage_limit
    4600000
    root@am62xx-evm:/sys/class/power_supply/bq2562x-charger# cat constant_charge_current
    1040000
    root@am62xx-evm:/sys/class/power_supply/bq2562x-charger# cat health
    Hot
    root@am62xx-evm:/sys/class/power_supply/bq2562x-charger# cat input_voltage_limit
    4600000
    root@am62xx-evm:/sys/class/power_supply/bq2562x-charger# cat constant_charge_voltage
    4200000
    root@am62xx-evm:/sys/class/power_supply/bq2562x-charger# cat status
    Full
    root@am62xx-evm:/sys/class/power_supply/bq2562x-charger# cd ../bq2562x-battery

    Battery  Parameters


    root@am62xx-evm:/sys/class/power_supply/bq2562x-battery# ls
    constant_charge_current_max current_now hwmon1 subsystem uevent wakeup8
    constant_charge_voltage_max device power type voltage_now
    root@am62xx-evm:/sys/class/power_supply/bq2562x-battery# cat constant_charge_current_max
    1040000
    root@am62xx-evm:/sys/class/power_supply/bq2562x-battery# cat constant_charge_voltage_max
    4200000
    root@am62xx-evm:/sys/class/power_supply/bq2562x-battery# cat current_now
    0

    root@am62xx-evm:/sys/class/power_supply/bq2562x-battery# cat voltage_now
    3814000
    root@am62xx-evm:/sys/class/power_supply/bq2562x-battery#

    Jfyi , i was setting below battery & charger paraemeters in DTS file as below 

    bq25620: charger@6b {
    compatible = "ti,bq25622";
    reg = <0x6b>;
    pinctrl-names = "default";
    pinctrl-0 = <&main_charger_pins>;
    interrupt-parent = <&main_gpio0>;
    gpios = <&main_gpio0 49 GPIO_ACTIVE_LOW>,<&main_gpio0 50 GPIO_ACTIVE_LOW>;
    interrupts =<49 IRQ_TYPE_EDGE_FALLING>,<50 IRQ_TYPE_EDGE_FALLING>;
    //interrupt-cells = <2>;
    ti,watchdog-timeout-ms = <40000>;
    input-current-limit-microamp = <1000000>;
    input-voltage-limit-microvolt = <4600000>;
    monitored-battery = <&bat>;

    };

    bat: battery {
    compatible = "simple-battery";
    constant-charge-current-max-microamp = <1040000>;
    constant-charge-voltage-max-microvolt = <4200000>;
    precharge-current-microamp = <100000>;
    charge-term-current-microamp = <60000>;
    };

    How to confirm whether my battery is functional (is battery charging /discharging ) ?

    Even i conected the battery , chareger parameter "online " showing -> zero  and battery charger  "status"  always showing  -> Full.

    please help me on this .

    Thanks,

    Naresh

  • Hi Naresh,

    Have you tested the charger manually without firmware? Referring to Table 9-7. BQ25620 Registers on the d/s, the following registers shows the charger operating status and fault conditions if any.

    The EVM User's Guide at https://www.ti.com/lit/ug/sluuck2a/sluuck2a.pdf provides step-by-step test procedure and the GUI info. 

    The GUI (BQSTUDIO) is downloadable at https://www.ti.com/tool/BQSTUDIO (use BQSTUDIO-TEST version to cover more devices). After plugging in the register readings, the user may know the charger status and fault conditions easily as shown below.

    The BQ25622 GUI file is downloadable at https://e2e.ti.com/support/power-management-group/power-management/f/power-management-forum/1172288/bq25620evm-bqz-file-for-bq25620-evm

    Thanks a lot,

    Ning.

  • Hi Ning,

    Thanks for information, let me go through it.

    charger

    Could you please help me Where I can see the firmware of charger ?

    I will try manual testing of charger when firmware is not available .

    May I know What is the charger "online " value when charger in working condition ?

    Thanks,

    Naresh.

  • Hi Naresh,

    1. Not sure where you get the idea "online". For charger operating status, please check REGx1E[4:3] (see below). Please refer to 9.6 Register Maps on the d/s for all the register setting descriptions.

    2. The sample driver had provided via email earlier. You may make changes based on your specific system needs.

    Thanks,

    Ning.