- Jun 18, 2019
-
-
Enric Balletbo i Serra authored
Writing a '1' to this attribute should trigger a reset on battery status and return the battery to its default values. This attribute is used to init a battery after replacement. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
-
- Mar 21, 2019
-
-
Sjoerd Simons authored
The audio routing for produced V7+ devices is going to be reverted back to the same setup as it was on earlier devices. So drop the differentiation in the device tree. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
- Dec 05, 2018
-
-
Sjoerd Simons authored
As the microphone is wired differently on V7+ it should really be a different card, so userspace can configure it differently as well. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
- Dec 03, 2018
-
-
Sjoerd Simons authored
On V7 and newer SL50's the onboard microphone input is now a differential input into the Line2 L. So adjust the audio routing in the dts and the card driver to cope with that. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
- Nov 07, 2018
-
-
Sjoerd Simons authored
Up until a battery voltage of 3.5V the SL50 operates properly; going lower that might make it less reliable. So configure the minimal battery voltage to that level Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
- Nov 05, 2018
-
-
Sjoerd Simons authored
Both the V8 boards and newer batches of V5 boards have different eMMC then earlier V5 boards. These new eMMCs seem to be eMMC version 5.0 as opposed to 4.4, which mean they feature caching commands. Unfortunately there seem to some issues booting after a hard reset when enabling the eMMC cache, which takes quite a bit longer then the expected timeout. Add some extra diagnostics around the caching time and quadruple the timeout which hopefully will be enough. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
commit e2bf08d6 ("omap_hsmmc: set a large data timeout for commands with busy signal") sets an arbitrary timeout value (100ms) for commands like CMD6 (MMC SWITCH). However extended CSD register defined in the eMMC standard has a field for GENERIC_CMD6_TIME which indicates the default maximum timeout for a SWITCH command. Use busy_timeout of cmd structure (populated with GENERIC_CMD6_TIME in the case of SWITCH command) to program the data timeout value in omap_hsmmc driver. SWITCH command to turn the cache on took more than 100ms to complete with MICRON eMMC card present in AM572x IDK REV 1.3A resulting in timeout and failed enumeration. It is fixed here by programming the timeout with the value advertised in GENERIC_CMD6_TIME. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Ravikumar Kattekola <rk@ti.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
- Oct 31, 2018
-
-
Sjoerd Simons authored
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
Sjoerd Simons authored
The irq of the bq27532 can notify the cpu when the capacity level changes, when the charger fault state changes (to detect ac connectivity) and various other things. Enable it in dt Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
Sjoerd Simons authored
While the bq27532 is controlling the charger directly, it's still possible to read out the chargers registers via bq27532 commands. Use those to read out whether the charge indicates the system online and register a second power supply (mains) for exposing the information to userspace Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
Sjoerd Simons authored
The datasheet is confusing and has two section for internal temperature with different values. However the second one (0x32, 0x33) overlaps with the charger registers and isn't listed in the overall table of standard commands, so it seems a datasheet error. Change the register to use the correct register offset. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
Sjoerd Simons authored
Due to unreliability at 400khz some device might have gotten the block holding the design capacity flash value corrupted. This can be detected by checking the model name which is also in that block is sane; If it's not repair the block by resetting it to default values and resetting the cycle count to 0. Furthermore when setting an updated design capacity do also adjust the qmax0 to match, reset the cycle count and update the cycle count threshold. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
Sjoerd Simons authored
Communications with the bq27532 don't seem to work entirely reliably when using 400khz as the i2c bus speed. Lower to 200khz to avoid issues. This shouldn't impact other functionality of the device as there aren't any peripherals on that bus that really need a high-speed bus for their functionality. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
- Oct 30, 2018
-
-
Sjoerd Simons authored
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
- Oct 09, 2018
-
-
Sjoerd Simons authored
Don't set defaults for volatile registers, i makes no sense. Also use the page select register as a dummy rather then reset just to be on the safe side and remove some spurious cache flips Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
Sjoerd Simons authored
-
The RESET register only have one self clearing bit and it should not be cached. If it is cached, when we sync the registers back to the chip we will initiate a software reset as well, which is not desirable. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 63c3194b)
-
Sjoerd Simons authored
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
- Oct 07, 2018
-
-
checksyscalls.sh is run at every "make" run while building the kernel, even if no files have changed. I looked at where we spend time in a trivial empty rebuild and found checksyscalls.sh to be a source of noticeable overhead, as it spawns a lot of child processes just to call 'cat' copying from stdin to stdout, once for each of the over 400 x86 syscalls. Using a shell-builtin (echo) instead of the external command gives us a 13x speedup: Before After real 0m1.018s real 0m0.077s user 0m0.068s user 0m0.048s sys 0m0.156s sys 0m0.024s The time it took to rebuild a single file on my machine dropped from 5.5 seconds to 4.5 seconds. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> (cherry picked from commit d21832e2)
-
- Sep 24, 2018
-
-
Sjoerd Simons authored
Starting with v8.1 boards (and modded V8 ones) we can use a gpio to keep the audio codec in reset state. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
Sjoerd Simons authored
Keep the reset line of the audio codec low when the codec isn't in use. This allows it to recover from issues triggered by ESD after being idle for a while Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
- Aug 24, 2018
-
-
Sjoerd Simons authored
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
- Aug 23, 2018
-
-
Sjoerd Simons authored
Enable support for update the BM configuraton of bq27xxx BMs Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
Sjoerd Simons authored
Newer SL50 boards have a bq27532 battery monitor instead of a custom BM, but not other changes. Add a dtb for these newer board versions Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
Sjoerd Simons authored
Newer SL50 boards will feature a different BM/charger, split out everything else into a common dtsi leaving only the parts that will be different between board revisions in the dts. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
Sjoerd Simons authored
This adds basic support to write various key field in the bq27532 configuration based on the device-tree values. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
Sjoerd Simons authored
Not all bq27xxx BM have a design energy configuration failed field (e.g. the bq27532-g1 does not). Add support for the code to ignore the field in that case. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
Sjoerd Simons authored
According to the datasheets the BM should be sealed after reset have been called to ensure the updated values are applied Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
Sjoerd Simons authored
Add basic support for the TI bq27532-g1 battery monitor Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
Sjoerd Simons authored
The bq27xxx BM can be integrated in two ways, either the BM is unpowered as long as there is no battery or powered as long as the system has power (e.g. on AC). For the latter case to be able to detect battery presence the BATDET flag should be monitored. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
-
The URL of bq27441-g1 and bq27426 are missing and bq27520-g4 is duplicated. Signed-off-by: Liu Xiang <liu.xiang6@zte.com.cn> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Acked-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> (cherry picked from commit 3d779180c69261f5c713832e46763e38589c18d3)
-
This device is software similar to the BQ27426 except it has different data memory offsets. Add support here. Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> (cherry picked from commit 5ef6a16033b47afbc578c7ef8754da5ae7b198d7)
-
power_supply_am_i_supplied() can return negative error codes. In this case we should assume, that no charger is connected and the battery should be marked as DISCHARGING instead of NOT_CHARGING. Reported-by: Merlijn Wajer <merlijn@wizzup.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> (cherry picked from commit f72c14ad8c6631a0a42115e74164f9b5faf4c724)
-
This adds basic support for BQ27521 battery monitor, used in Nokia N9 and N950. In particular, battery voltage is important to be able to tell when the battery is almost empty. Emptying battery on N950 is pretty painful, as flasher needs to be used to recover phone in such case. Signed-off-by: Pavel Machek <pavel@ucw.cz> Acked-by: Andrew F. Davis <afd@ti.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> (cherry picked from commit 70a39e1075019eef753649ac01ed594ac9016be6)
-
Tested on Pyra prototype with bq27421. Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> (cherry picked from commit 5d01fd38)
-
BQ2751X & BQ27510G3 have identical regs & props. BQ2750X & BQ27510G3 have identical props. BQ27500 & BQ27510G1 & BQ27510G2 have identical regs & props. BQ27500 & BQ27520G2 have identical props. Remove the duplicate arrays. No functional changes to the driver. Signed-off-by: Liam Breck <kernel@networkimprov.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> (cherry picked from commit 1059361f)
-
Support data memory update on BQ27425. Parameters from TI datasheets are also provided for BQ27500, 545, 421, 441, 621; however these are commented out, as they are not tested. Add BQ27XXX_O_CFGUP & _O_RAM for use in bq27xxx_chip_data[n].opts and by data memory update functions. Signed-off-by: Liam Breck <kernel@networkimprov.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> (cherry picked from commit 05045379)
-
For the existing features, these chips act like others already ID'd, so they had false but functional IDs. We will be adding features which require correct IDs, so the following IDs are added: BQ2752X, 531, 542, 546, 742, 425, 441, 621 Chip-specific features are now tracked by BQ27XXX_O_* flags in di->opts. No functional changes to the driver. Signed-off-by: Liam Breck <kernel@networkimprov.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> (cherry picked from commit 3a731c64)
-
To support new features which require different data for each chip, we unify the bq27xxx_regs and bq27xxx_battery_props tables into a single one. No functional changes to the driver. Signed-off-by: Liam Breck <kernel@networkimprov.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> (cherry picked from commit 9aade6d8)
-
Previously there was no way to configure these chips in the event that the defaults didn't match the battery in question. For chips with RAM data memory (and also those with flash/NVM data memory if CONFIG_BATTERY_BQ27XXX_DT_UPDATES_NVM is defined and the user has not set module param dt_monitored_battery_updates_nvm=0) we now call power_supply_get_battery_info(), check its values, and write battery properties to chip data memory if there is a dm_regs table for the chip. Signed-off-by: Matt Ranostay <matt@ranostay.consulting> Signed-off-by: Liam Breck <kernel@networkimprov.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> (cherry picked from commit ccce4409)
-