Implement the parallel mode in the powertrain switch TLE9104.
This allows that OUT1 and OUT2 are controlled together, as well
as OUT3 and OUT4.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Add mfd_adp5585 and gpio_adp5585 driver. This driver enables ADP5585
as an GPIO expander.
This chip is used as an GPIO expander on i.MX93 EVK. GPIO pinctrl,
read/write and interrupt is supported.
Note that ADP5585 has 2 GPIO banks with 5 pins each. The driver combines
two group into a 16-bit port. Index 0~4 correspond to R0~R4 lines, index
8~12 correspond to C0~C4 lines. Index 5~7 is reserved unavailable.
Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
Added write of strobe register after setting long press reset
configuration. This is needed to apply the new value.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
Implement a sensor for the output diagnostics of the power train
switch TLE9104.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Rename ad5592 files in dts, driver and include to ad559x and add support
for I2C bus which is required for AD5593.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Added configuration of long press reset functionality.
Includes ship/hibernate to wake debounce time and
disabled/one_button/two_button mode selection.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
Split up the driver for the PWM controller MAX31790
into a multi function device driver.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Split up the driver for the low side switch BD8LB600FS into a GPIO
and MFD part.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
1. This driver allows to configure the Low Power Flexcomm
interface as a UART, SPI or I2C device.
2. Manages the interrupts and dispatches it to the
appropriate device driver.
3. A Flexcomm interface can be configured to be used as
I2C and UART device. However a SPI device cannot be used
concurrently with I2C or UART. Add checks for this feature.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
By default N_VBUSEN signal is used by the host to define if VBUS
signal should be used for power supply (VBUS-IPSOUT).
This feature enables the possbibility to change this behaviour.
When N_VBUSEN detection is disabled, axp192 will automatically
decide to use VBUS (REG10H[7] = 1).
Please refer to datasheet for details.
Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
AXP192 features an EXTEN pin that is on output only.
This commit appends control of EXTEN pin to gpio functionality
of AXP192.
Port-Mapping is as follows:
- [0..4]: GPIO0..4
- [5]: EXTEN
Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
Use proper register mask for software reset register so
reset magic value sent to device is not malformed.
Co-authored-by: Bartosz Bilas <b.bilas@grinn-global.com>
Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
Enables setting the initialization priority of the nPM1300 independently
from other MFDs.
Signed-off-by: Bernt Johan Damslora <Bernt.Damslora@nordicsemi.no>
Enables setting the initialization priority of the nPM6001 independently
from other MFDs.
Signed-off-by: Bernt Johan Damslora <Bernt.Damslora@nordicsemi.no>
Maxim MAX20335 is a PMIC with Ultra-Low IQ Voltage Regulators and
Battery Chargers for Small Lithium Ion Systems.
Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
If an event occurs between the status registers being read and
the event being cleared, the interrupt line will remain active.
As the interrupt is edge triggered, all future interrupts
will being ignored. This problem will also occur if an I2C
transation fails in the callback.
The state of the interrupt pin is now checked at the end of the
callback, and a retry is attempted if the interrupt has not
been cleared.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
The Nuvoton NCT38xx is a multi-function device providing a TCPC
controller and a I/O expander (GPIO driver). Add a multi-function
driver to manage exclusive access to the device.
Tested with "twister -T tests/drivers/build_all/gpio".
Signed-off-by: Keith Short <keithshort@google.com>
AXP192 is a small power management IC, that also
features 5 GPIOS.
Besides GPIO driver this commit also includes needed modifications
in axp192 regulator and mfd driver as LDOIO0 functioanlity
is multiplexed with GPIO0 pin.
Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
AXP192 is a small and simple power management IC featuring different
LDOs, DCDCs, AINs and also GPIOs. It also offers functionaltiy for
battery management.
This change includes the basic regulator driver functionaltiy for
LDO2-3 and DCDC1-3 as well as the mfd driver layer. Further drivers
for GPIO and ADC will follow.
Drivers have been developed and tested on M5StackCore2, an ESP32-based
board. Support for M5StackCore2 is still in progress.
Signed-off-by: Martin Kiepfer <mrmarteng@teleschirm.org>
New reset function which performs a full power reset
New hibernate function which powers down and wakes after
specified timeout
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
Local register read/write functions have been removed and replaced
with calls to the new MFD functions.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
Added an MFD driver for the nPM1300.
This driver has register access helper functions that can be used
by subsystems. This will avoid each subsystem having to duplicate
the register access code.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
Add an API-less MFD driver for nPM6001. In this case, the MFD device
driver doesn't expose any API as plain I2C API is used within other
device drivers (regulator, GPIO, watchdog). This driver just initializes
some device properties.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Introduce the skeleton for multi-function device drivers. This driver
class is inspired by the same class found in Linux. Multi-function
devices expose multiple functionalities, for example, a LED driver,
regulator, GPIO controller, etc. The MFD driver class serves as a kind
of "parent" device where common functionality can be managed: bus
access, IRQ sharing, initialization code, etc.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>