lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220726103355.17684-1-jneanne@baylibre.com>
Date:   Tue, 26 Jul 2022 12:33:44 +0200
From:   Jerome Neanne <jneanne@...libre.com>
To:     lgirdwood@...il.com, broonie@...nel.org, robh+dt@...nel.org,
        nm@...com, kristo@...nel.org
Cc:     khilman@...libre.com, narmstrong@...libre.com, msp@...libre.com,
        j-keerthy@...com, lee.jones@...aro.org, jneanne@...libre.com,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org
Subject: [PATCH v2 00/11] Add support for TI TPS65219 PMIC.

Not implemented
- DVS

1-Regulators:
Full implementation and test
Visual check: cat /sys/kernel/debug/regulator/regulator_summary
Full validation requires userspace-consumer and virtual-regulator
LDO1 is not used and output can be probbed on TP84.

2-Reset WARM/COLD
test procedure: launch reboot on the console and check visually

warm vs. cold can be configured on the kernel command-line at boot time.
Default is cold, but adding `reboot=w`
to kernel command allow testing warm reboot.

Alternative:
`# echo warm > /sys/kernel/reboot/mode` 

3-SW Shutdown
test procedure: launch halt on the console and check visually

Note: enters in competition with other source during probe

Board Test Points can be used to check voltage after system shutdown.
baseport is not handling wakeup.
A power OFF/ON cycle is needed to recover.

4-Interrupt Pin (nINT):

Interrupt occurring on PMIC TPS65219 is propagated to SOC
through EXTINTn pin connected to gic500 interrupt controller

Interrupt lines for TPS65219 shows-up on console:
cat /proc/interrupts

Validation:
Create a Residual Voltage interrupt and handling and interrupt source is cleared.
`tps65219 0-0030: Registered residual voltage for LDO1`
`533:          1          0  tps65219_irq  35 Edge      LDO1_RV`

Mapped to power button (use TP90 to GND to emulate a physical button)

5-PB Startup and Shutdown:
New implementation to support both rising and falling edge.

TPS65219 has different interrupts compared to other TPS6521* chips.
TPS65219 defines two interrupts for the powerbutton one for push and one
for release.


Interrupt support: cat proc/interrupts
`557:          0          0  tps65219_irq  47 Edge      tps65219-pwrbutton.1.auto`
`558:          0          0  tps65219_irq  48 Edge      tps65219-pwrbutton.1.auto`

TPS65219 has a multipurpose pin called EN/PB/VSENSE that can be either:
- EN in which case it functions as an enable pin.
- VSENSE which compares the voltages and triggers an automatic on/off request.
- PB in which case it can be configured to trigger an interrupt to the SoC.
ti,power-button reflects the last one of those options
where the board has a button wired to the pin and triggers
an interrupt on pressing it.

6-Changes vs v1:

6.1- Regulators:
- Further to Mark Brown review:
Use standard regmap helpers for set_voltage, enable and disable.
tps65219_set_mode, return -EINVAL in default statement for clarity.
Reshaped irq handler to report events through the notification API:
regulator_notifier_call_chain().
Use standard regulator events (consumer.h).

6.2- Device tree
- Further to Nishanth Menon review:
add tag DONOTMERGE
Board support is pending waiting for TI commitment.
This device tree is needed for driver test purpose but should not go upstream.

6.3- Bindings
- Further to Rob Herring review:
Squash interrupt commit into regulator dt-binding.
Squash pwrbutton commit into regulator dt-binding.
Remove interrupt-controller/cells properties because no consumer for those interrupts.

- Further to Mark Brown review:
Remove constraints on regulator-name.

- Pending for decision from Lee Jones further to Mark Brown review
The entire binding document should probably be in MFD if it's going to
have properties for other functions added to it.

6.4- Misc
- Further to Mark Brown review:
Use C++ (//) formatting for file header block including SPDX License
in mfd, regulator and pwrbutton.

Jerome Neanne (7):
  DONOTMERGE: arm64: dts: ti: Add TI TPS65219 PMIC support for AM642 SK
    board.
  DONOTMERGE: arm64: dts: ti: Add pinmux and irq mapping for TPS65219
    external interrupts
  regulator: dt-bindings: Add TI TPS65219 PMIC bindings
  mfd: drivers: Add TI TPS65219 PMIC support
  mfd: drivers: Add interrupts support to TI TPS65219 PMIC
  regulator: drivers: Add TI TPS65219 PMIC regulators support
  arm64: defconfig: Add tps65219 as modules

Markus Schneider-Pargmann (4):
  DONOTMERGE: arm64: dts: ti: k3-am642-sk: Enable tps65219 power-button
  MAINTAINERS: OMAP2+ support, add tps65218-pwrbutton
  mfd: tps65219: Add power-button support
  Input: Add tps65219 interrupt driven powerbutton

 .../bindings/regulator/ti,tps65219.yaml       | 164 +++++++
 MAINTAINERS                                   |   4 +
 arch/arm64/boot/dts/ti/k3-am642-sk.dts        | 115 +++++
 arch/arm64/configs/defconfig                  |   3 +
 drivers/input/misc/Kconfig                    |  10 +
 drivers/input/misc/Makefile                   |   1 +
 drivers/input/misc/tps65219-pwrbutton.c       | 150 ++++++
 drivers/mfd/Kconfig                           |  15 +
 drivers/mfd/Makefile                          |   1 +
 drivers/mfd/tps65219.c                        | 437 ++++++++++++++++++
 drivers/regulator/Kconfig                     |   9 +
 drivers/regulator/Makefile                    |   1 +
 drivers/regulator/tps65219-regulator.c        | 416 +++++++++++++++++
 include/linux/mfd/tps65219.h                  | 364 +++++++++++++++
 14 files changed, 1690 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/ti,tps65219.yaml
 create mode 100644 drivers/input/misc/tps65219-pwrbutton.c
 create mode 100644 drivers/mfd/tps65219.c
 create mode 100644 drivers/regulator/tps65219-regulator.c
 create mode 100644 include/linux/mfd/tps65219.h

-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ