linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/13] power-suppy/i2c/extcon: Add support for cht-wc PMIC without USB-PD support
@ 2021-10-30 18:28 Hans de Goede
  2021-10-30 18:28 ` [PATCH 01/13] platform/x86: Rename touchscreen_dmi to dmi_device_properties Hans de Goede
                   ` (12 more replies)
  0 siblings, 13 replies; 35+ messages in thread
From: Hans de Goede @ 2021-10-30 18:28 UTC (permalink / raw)
  To: Mark Gross, Andy Shevchenko, Wolfram Sang, Sebastian Reichel,
	MyungJoo Ham, Chanwoo Choi, Ard Biesheuvel
  Cc: Hans de Goede, Yauhen Kharuzhy, Tsuchiya Yuto,
	platform-driver-x86, linux-i2c, linux-pm, linux-kernel,
	linux-efi

On many X86 devices with a Cherry Trail SoC the PMIC / battery charger
support is not fully handled by ACPI. Instead we need to load native
drivers for the PMIC and various chips surrounding the PMIC like the
charger IC. So far we mostly support the AXP288 PMIC this way, as well
as the Intel Whiskey Cove PMIC with a FUSB302 Type-C controller + other
ICs for a USB-PD, USB-3 (superspeed) and DP-altmode capable Type-C
connector, as found on the GPD win and GPD pocket mini laptops.

On the Xiaomi Mi Pad 2 tablet the Whiskey Cove PMIC is used in
a different setup then on the GPD devices, supporting only USB-2 with
BC1.2 spec charger detection on its USB connector.

This series adds support for the charger IC in this setup and for having
the extcon-intel-cht-wc code control the 5V Vbus boost converter and
the USB role-switch, which is done by the FUSB302 Type-C controller driver
in the GPD case.

This fixes the tablet not charging under Linux, host-mode only working
when booted in host-mode, as well as device-mode not working. Note
device-mode still does not work when plugged into a CDP port. I have
identified the cause for this and I plan to submit a fix later.

This series consists of the following parts:

Patch 1 + 2: Add a "intel,cht-wc-setup" device property to the Whiskey Cove
i2c-client so that various WC drivers can use this to identify which setup
they are dealing with.

Patch 3 + 4: bq25890 psy driver bug-fixes

Patch 5 - 8: bq25890 psy support for non-devicetree devices

Patch 9 + 10: bq25890 psy support for registering the builtin Vbus boost
converter as a regulator

Patch 11: Add support to the i2c-cht-wc I2C-controller driver to
instantiate an i2c-client for the attached bq25890 charger

Patch 12 + 13: extcon-intel-cht-wc add support for the USB-2 only with
BC1.2 charger detection setup

Assuming everybody is ok with this series, we need to talk about how
to merge this.

Patch 1 makes some very small changes (just a rename) to
drivers/firmware/efi code, I would like to merging this + patch 2 through
the pdx86 tree (where the real changes are). Ard, can I have your ack
for this please ?

Patch 11 depends on a header file added by patch 10, since the
i2c-cht-wc.c code otherwise sees very little changes I believe it makes
sense for patch 11 to be merged into linux-power-supply.git/for-next
together with patches 3-10. Wolfram can we have you ack for this?

Patch 12 + 13 can be merged through the extcon tree, these have no
(compile time) dependencies on the other patches.

This is all 5.17 material, and I will make sure the pdx86 patches
adding the new property will land in 5.17-rc1, hopefully the rest
will land then too, but if other bits land later that is fine too,
as long as the new property is there behavior won't change on the
GPD win/pocket and we won't get any regressions.

Regards,

Hans

p.s.

Patch 3 and 4 are pure bq25890 bugfixes and should probably be picked up
right away independent of the rest of the series.


Hans de Goede (13):
  platform/x86: Rename touchscreen_dmi to dmi_device_properties
  platform/x86: dmi_device_properties: Add setup info for boards with a
    CHT Whiskey Cove PMIC
  power: supply: bq25890: Fix race causing oops at boot
  power: supply: bq25890: Fix initial setting of the F_CONV_RATE field
  power: supply: bq25890: Add a bq25890_rw_init_data() helper
  power: supply: bq25890: Add support for skipping initialization
  power: supply: bq25890: Enable charging on boards where we skip reset
  power: supply: bq25890: Drop dev->platform_data == NULL check
  power: supply: bq25890: Add bq25890_set_otg_cfg() helper
  power: supply: bq25890: Add support for registering the Vbus boost
    converter as a regulator
  i2c: cht-wc: Add support for devices using a bq25890 charger
  extcon: intel-cht-wc: Check new "intel,cht-wc-setup" device-property
  extcon: intel-cht-wc: Add support for devices with an USB-micro-B
    connector

 MAINTAINERS                                   |   2 +-
 drivers/extcon/extcon-intel-cht-wc.c          | 119 ++++++++--
 drivers/firmware/efi/embedded-firmware.c      |   4 +-
 drivers/i2c/busses/i2c-cht-wc.c               |  77 ++++--
 drivers/platform/x86/Kconfig                  |  20 +-
 drivers/platform/x86/Makefile                 |   2 +-
 ...chscreen_dmi.c => dmi_device_properties.c} |  54 ++++-
 drivers/power/supply/bq25890_charger.c        | 223 ++++++++++++------
 include/linux/efi_embedded_fw.h               |   2 +-
 include/linux/power/bq25890_charger.h         |  15 ++
 10 files changed, 400 insertions(+), 118 deletions(-)
 rename drivers/platform/x86/{touchscreen_dmi.c => dmi_device_properties.c} (96%)
 create mode 100644 include/linux/power/bq25890_charger.h

-- 
2.31.1


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2021-11-08 16:06 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-30 18:28 [PATCH 00/13] power-suppy/i2c/extcon: Add support for cht-wc PMIC without USB-PD support Hans de Goede
2021-10-30 18:28 ` [PATCH 01/13] platform/x86: Rename touchscreen_dmi to dmi_device_properties Hans de Goede
2021-10-30 19:07   ` Randy Dunlap
2021-10-30 18:28 ` [PATCH 02/13] platform/x86: dmi_device_properties: Add setup info for boards with a CHT Whiskey Cove PMIC Hans de Goede
2021-10-30 21:56   ` Andy Shevchenko
2021-11-08 15:48     ` Hans de Goede
2021-10-30 18:28 ` [PATCH 03/13] power: supply: bq25890: Fix race causing oops at boot Hans de Goede
2021-11-02 16:28   ` Sebastian Reichel
2021-10-30 18:28 ` [PATCH 04/13] power: supply: bq25890: Fix initial setting of the F_CONV_RATE field Hans de Goede
2021-11-02 16:29   ` Sebastian Reichel
2021-10-30 18:28 ` [PATCH 05/13] power: supply: bq25890: Add a bq25890_rw_init_data() helper Hans de Goede
2021-10-30 18:28 ` [PATCH 06/13] power: supply: bq25890: Add support for skipping initialization Hans de Goede
2021-10-30 22:07   ` Andy Shevchenko
2021-11-08 15:57     ` Hans de Goede
2021-10-30 18:28 ` [PATCH 07/13] power: supply: bq25890: Enable charging on boards where we skip reset Hans de Goede
2021-11-07 18:32   ` Yauhen Kharuzhy
2021-10-30 18:28 ` [PATCH 08/13] power: supply: bq25890: Drop dev->platform_data == NULL check Hans de Goede
2021-10-30 18:28 ` [PATCH 09/13] power: supply: bq25890: Add bq25890_set_otg_cfg() helper Hans de Goede
2021-10-30 22:10   ` Andy Shevchenko
2021-11-08 15:59     ` Hans de Goede
2021-11-07 18:49   ` Yauhen Kharuzhy
2021-11-07 19:47     ` Hans de Goede
2021-10-30 18:28 ` [PATCH 10/13] power: supply: bq25890: Add support for registering the Vbus boost converter as a regulator Hans de Goede
2021-10-30 22:13   ` Andy Shevchenko
2021-11-08 16:06     ` Hans de Goede
2021-10-30 18:28 ` [PATCH 11/13] i2c: cht-wc: Add support for devices using a bq25890 charger Hans de Goede
2021-10-31 17:58   ` Wolfram Sang
2021-11-08 16:03     ` Hans de Goede
2021-11-07 19:07   ` Yauhen Kharuzhy
2021-11-07 19:35     ` Yauhen Kharuzhy
2021-11-07 19:51     ` Hans de Goede
2021-10-30 18:28 ` [PATCH 12/13] extcon: intel-cht-wc: Check new "intel,cht-wc-setup" device-property Hans de Goede
2021-10-30 18:28 ` [PATCH 13/13] extcon: intel-cht-wc: Add support for devices with an USB-micro-B connector Hans de Goede
2021-10-31 12:52   ` Andy Shevchenko
2021-11-08 15:44     ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).