Skip to contentSkip to conversation

TI TPS6594 PMIC support (Core, ESM, PFSM)

PATCH Superseded Julien Panis 3 participants 12 messages Mar 21, 2023 – Mar 29, 2023

Subsystems (4)

v3 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v3 cover TI TPS6594 PMIC support (Core, ESM, PFSM)

TPS6594 is a Power Management IC which provides regulators and others features like GPIOs, RTC, watchdog, ESMs (Error Signal Monitor), and PFSM (Pre-configurable Finite State Machine). The SoC and the PMIC can communicate through the I2C or SPI interfaces.
TPS6594 is the super-set device while TPS6593 and LP8764X are derivatives.

This series adds support to TI TPS6594 PMIC and its derivatives.

The features implemented in this series are:
- Core (MFD I2C and SPI entry points)
- ESM (child device)
- PFSM (child device)

- Core description:
I2C and SPI interface protocols are implemented, with and without the bit-integrity error detection feature (CRC mode). In multi-PMIC configuration, all instances share a single GPIO of the SoC to generate interrupt requests via their respective nINT output pin.

- ESM description:
This device monitors the SoC error output signal at its nERR_SOC input pin. In error condition, ESM toggles its nRSTOUT_SOC pin to reset the SoC.
Basically, ESM driver starts ESM hardware.

- PFSM description:
Strictly speaking, PFSM is not hardware. It is a piece of code. PMIC integrates a state machine which manages operational modes. Depending on the current operational mode, some voltage domains remain energized while others can be off.
PFSM driver can be used to trigger transitions between configured states.

Link to v2:
https://lore.kernel.org/all/[email protected]/

Others series will be submitted over the next few weeks, providing drivers for others child devices like GPIOs (pinctrl), RTC, and regulators. Board support will also be added (device trees).

Julien Panis (4):
dt-bindings: mfd: Add TI TPS6594 PMIC
mfd: tps6594: Add driver for TI TPS6594 PMIC
misc: tps6594-esm: Add driver for TI TPS6594 ESM
misc: tps6594-pfsm: Add driver for TI TPS6594 PFSM

 .../devicetree/bindings/mfd/ti,tps6594.yaml   |  231 ++++
 .../userspace-api/ioctl/ioctl-number.rst      |    1 +
 drivers/mfd/Kconfig                           |   32 +
 drivers/mfd/Makefile                          |    3 +
 drivers/mfd/tps6594-core.c                    |  453 ++++++++
 drivers/mfd/tps6594-i2c.c                     |  244 ++++
 drivers/mfd/tps6594-spi.c                     |  129 +++
 drivers/misc/Kconfig                          |   23 +
 drivers/misc/Makefile                         |    2 +
 drivers/misc/tps6594-esm.c                    |  132 +++
 drivers/misc/tps6594-pfsm.c                   |  304 +++++
 include/linux/mfd/tps6594.h                   | 1020 +++++++++++++++++
 include/uapi/linux/tps6594_pfsm.h             |   45 +
 13 files changed, 2619 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/ti,tps6594.yaml
 create mode 100644 drivers/mfd/tps6594-core.c
 create mode 100644 drivers/mfd/tps6594-i2c.c
 create mode 100644 drivers/mfd/tps6594-spi.c
 create mode 100644 drivers/misc/tps6594-esm.c
 create mode 100644 drivers/misc/tps6594-pfsm.c
 create mode 100644 include/linux/mfd/tps6594.h
 create mode 100644 include/uapi/linux/tps6594_pfsm.h

base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6

Signature · 1 line
2.37.3
#1 lore raw

PATCH v3 1/4 dt-bindings: mfd: Add TI TPS6594 PMIC

TPS6594 is a Power Management IC which provides regulators and others features like GPIOs, RTC, watchdog, ESMs (Error Signal Monitor), and PFSM (Pre-configurable Finite State Machine) managing the state of the device.
TPS6594 is the super-set device while TPS6593 and LP8764X are derivatives.

---
 .../devicetree/bindings/mfd/ti,tps6594.yaml   | 231 ++++++++++++++++++
 1 file changed, 231 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/ti,tps6594.yaml
Documentation/devicetree/bindings/mfd/ti,tps6594.yaml new file +231 -0
new file mode 100644
index 000000000000..4e4565a68e40
@@ -0,0 +1,231 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/ti,tps6594.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI TPS6594 Power Management Integrated Circuit
+
+maintainers:
+  - Julien Panis <[email protected]>
+
+description:
+  TPS6594 is a Power Management IC which provides regulators and others
+  features like GPIOs, RTC, watchdog, ESMs (Error Signal Monitor), and
+  PFSM (Pre-configurable Finite State Machine) managing the state of the device.
+  TPS6594 is the super-set device while TPS6593 and LP8764X are derivatives.
+
+properties:
+  compatible:
+    enum:
+      - ti,lp8764x
+      - ti,tps6593
+      - ti,tps6594
+
+  reg:
+    description: I2C slave address or SPI chip select number.
+    maxItems: 1
+
+  ti,primary-pmic:
+    type: boolean
+    description: |
+      Identify the primary PMIC on SPMI bus.
+      A multi-PMIC synchronization scheme is implemented in the PMIC device
+      to synchronize the power state changes with other PMIC devices. This is
+      accomplished through a SPMI bus: the primary PMIC is the controller
+      device on the SPMI bus, and the secondary PMICs are the target devices
+      on the SPMI bus.
+
+  system-power-controller: true
+
+  gpio-controller: true
+
+  '#gpio-cells':
+    const: 2
+    description: |
+      The first cell is the pin number, the second cell is used to specify flags.
+      See ../gpio/gpio.txt for more information.
+
+  interrupts:
+    maxItems: 1
+
+  ti,multi-phase-id:
+    description: |
+      Describes buck multi-phase configuration, if any. For instance, XY id means
+      that outputs of buck converters X and Y are combined in multi-phase mode.
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    oneOf:
+      - items:
+          - const: 12
+      - items:
+          - const: 34
+      - items:
+          - const: 12
+          - const: 34
+      - items:
+          - const: 123
+      - items:
+          - const: 1234
+
+  regulators:
+    type: object
+    description: List of regulators provided by this controller.
+
+    patternProperties:
+      "^buck([1-5]|12|34|123|1234)$":
+        type: object
+        $ref: /schemas/regulator/regulator.yaml#
+
+        unevaluatedProperties: false
+
+      "^ldo[1-4]$":
+        type: object
+        $ref: /schemas/regulator/regulator.yaml#
+
+        unevaluatedProperties: false
+
+    allOf:
+      - if:
+          required:
+            - buck12
+        then:
+          properties:
+            buck123: false
+            buck1234: false
+      - if:
+          required:
+            - buck123
+        then:
+          properties:
+            buck34: false
+      - if:
+          required:
+            - buck1234
+        then:
+          properties:
+            buck34: false
+
+    additionalProperties: false
+
+  rtc:
+    type: object
+    description: RTC provided by this controller.
+    $ref: /schemas/rtc/rtc.yaml#
+
+  watchdog:
+    type: object
+    description: Watchdog provided by this controller.
+    $ref: /schemas/watchdog/watchdog.yaml#
+
+patternProperties:
+  "^buck([1-5]|12|34|123|1234)-supply$":
+    description: Input supply phandle for each buck.
+
+  "^ldo[1-4]-supply$":
+    description: Input supply phandle for each ldo.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        tps6593: pmic@48 {
+            compatible = "ti,tps6593";
+            reg = <0x48>;
+            ti,primary-pmic;
+            system-power-controller;
+
+            gpio-controller;
+            #gpio-cells = <2>;
+
+            pinctrl-names = "default";
+            pinctrl-0 = <&pmic_irq_pins_default>;
+            interrupt-parent = <&mcu_gpio0>;
+            interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
+
+            ti,multi-phase-id = <123>;
+
+            buck123-supply = <&vcc_3v3_sys>;
+            buck4-supply = <&vcc_3v3_sys>;
+            buck5-supply = <&vcc_3v3_sys>;
+            ldo1-supply = <&vcc_3v3_sys>;
+            ldo2-supply = <&vcc_3v3_sys>;
+            ldo3-supply = <&buck5>;
+            ldo4-supply = <&vcc_3v3_sys>;
+
+            regulators {
+                buck123: buck123 {
+                    regulator-name = "vcc_core";
+                    regulator-min-microvolt = <750000>;
+                    regulator-max-microvolt = <850000>;
+                    regulator-boot-on;
+                    regulator-always-on;
+                };
+
+                buck4: buck4 {
+                    regulator-name = "vcc_1v1";
+                    regulator-min-microvolt = <1100000>;
+                    regulator-max-microvolt = <1100000>;
+                    regulator-boot-on;
+                    regulator-always-on;
+                };
+
+                buck5: buck5 {
+                    regulator-name = "vcc_1v8_sys";
+                    regulator-min-microvolt = <1800000>;
+                    regulator-max-microvolt = <1800000>;
+                    regulator-boot-on;
+                    regulator-always-on;
+                };
+
+                ldo1: ldo1 {
+                    regulator-name = "vddshv5_sdio";
+                    regulator-min-microvolt = <3300000>;
+                    regulator-max-microvolt = <3300000>;
+                    regulator-boot-on;
+                    regulator-always-on;
+                };
+
+                ldo2: ldo2 {
+                    regulator-name = "vpp_1v8";
+                    regulator-min-microvolt = <1800000>;
+                    regulator-max-microvolt = <1800000>;
+                    regulator-boot-on;
+                    regulator-always-on;
+                };
+
+                ldo3: ldo3 {
+                    regulator-name = "vcc_0v85";
+                    regulator-min-microvolt = <850000>;
+                    regulator-max-microvolt = <850000>;
+                    regulator-boot-on;
+                    regulator-always-on;
+                };
+
+                ldo4: ldo4 {
+                    regulator-name = "vdda_1v8";
+                    regulator-min-microvolt = <1800000>;
+                    regulator-max-microvolt = <1800000>;
+                    regulator-boot-on;
+                    regulator-always-on;
+                };
+            };
+
+            rtc: rtc {
+                wakeup-source;
+            };
+
+            watchdog: watchdog {
+                timeout-sec = <10>;
+            };
+        };
+    };
Signature · 1 line
2.37.3
#2 lore raw

Re: [PATCH v3 1/4] dt-bindings: mfd: Add TI TPS6594 PMIC

Quoted 29 lines · Julien Panis

TPS6594 is a Power Management IC which provides regulators and others features like GPIOs, RTC, watchdog, ESMs (Error Signal Monitor), and PFSM (Pre-configurable Finite State Machine) managing the state of the device.
TPS6594 is the super-set device while TPS6593 and LP8764X are derivatives.

---
 .../devicetree/bindings/mfd/ti,tps6594.yaml   | 231 ++++++++++++++++++
 1 file changed, 231 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/ti,tps6594.yaml
Documentation/devicetree/bindings/mfd/ti,tps6594.yaml new file +11 -0
new file mode 100644
index 000000000000..4e4565a68e40
@@ -0,0 +1,231 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/ti,tps6594.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI TPS6594 Power Management Integrated Circuit
+
+maintainers:
+  - Julien Panis <[email protected]>
+

Documentation/devicetree/bindings/mfd/ti,tps6594.yaml line 21

Quoted 10 lines
Documentation/devicetree/bindings/mfd/ti,tps6594.yaml new file +10 -0
+description:
+  TPS6594 is a Power Management IC which provides regulators and others
+  features like GPIOs, RTC, watchdog, ESMs (Error Signal Monitor), and
+  PFSM (Pre-configurable Finite State Machine) managing the state of the device.
+  TPS6594 is the super-set device while TPS6593 and LP8764X are derivatives.
+
+properties:
+  compatible:
+    enum:
+      - ti,lp8764x

Does x stand for a wildcard? If so, then fix it. Compatibles should be specific.

Quoted 25 lines
Documentation/devicetree/bindings/mfd/ti,tps6594.yaml new file +25 -0
+      - ti,tps6593
+      - ti,tps6594
+
+  reg:
+    description: I2C slave address or SPI chip select number.
+    maxItems: 1
+
+  ti,primary-pmic:
+    type: boolean
+    description: |
+      Identify the primary PMIC on SPMI bus.
+      A multi-PMIC synchronization scheme is implemented in the PMIC device
+      to synchronize the power state changes with other PMIC devices. This is
+      accomplished through a SPMI bus: the primary PMIC is the controller
+      device on the SPMI bus, and the secondary PMICs are the target devices
+      on the SPMI bus.
+
+  system-power-controller: true
+
+  gpio-controller: true
+
+  '#gpio-cells':
+    const: 2
+    description: |
+      The first cell is the pin number, the second cell is used to specify flags.

Documentation/devicetree/bindings/mfd/ti,tps6594.yaml line 56

Quoted 10 lines
Documentation/devicetree/bindings/mfd/ti,tps6594.yaml new file +10 -0
+      See ../gpio/gpio.txt for more information.
+
+  interrupts:
+    maxItems: 1
+
+  ti,multi-phase-id:
+    description: |
+      Describes buck multi-phase configuration, if any. For instance, XY id means
+      that outputs of buck converters X and Y are combined in multi-phase mode.
+    $ref: /schemas/types.yaml#/definitions/uint32-array

No improvements here. As Rob pointed out, this looks like coupled regulators.

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH v3 1/4] dt-bindings: mfd: Add TI TPS6594 PMIC

Quoted 34 lines · Krzysztof Kozlowski
Quoted 33 lines · Julien Panis

TPS6594 is a Power Management IC which provides regulators and others features like GPIOs, RTC, watchdog, ESMs (Error Signal Monitor), and PFSM (Pre-configurable Finite State Machine) managing the state of the device.
TPS6594 is the super-set device while TPS6593 and LP8764X are derivatives.

---
  .../devicetree/bindings/mfd/ti,tps6594.yaml   | 231 ++++++++++++++++++
  1 file changed, 231 insertions(+)

create mode 100644 Documentation/devicetree/bindings/mfd/ti,tps6594.yaml

Documentation/devicetree/bindings/mfd/ti,tps6594.yaml new file +15 -0
new file mode 100644
index 000000000000..4e4565a68e40
@@ -0,0 +1,231 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/ti,tps6594.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI TPS6594 Power Management Integrated Circuit
+
+maintainers:
+  - Julien Panis <[email protected]>
+
+description:
+  TPS6594 is a Power Management IC which provides regulators and others
+  features like GPIOs, RTC, watchdog, ESMs (Error Signal Monitor), and
+  PFSM (Pre-configurable Finite State Machine) managing the state of the device.
Quoted 8 lines

Documentation/devicetree/bindings/mfd/ti,tps6594.yaml line 21

Quoted 6 lines
Documentation/devicetree/bindings/mfd/ti,tps6594.yaml new file +6 -0
+  TPS6594 is the super-set device while TPS6593 and LP8764X are derivatives.
+
+properties:
+  compatible:
+    enum:
+      - ti,lp8764x

Does x stand for a wildcard? If so, then fix it. Compatibles should be specific.

OK, I will remove 'x' in next version.

Quoted 30 lines
Quoted 30 lines
Documentation/devicetree/bindings/mfd/ti,tps6594.yaml new file +29 -0
+      - ti,tps6593
+      - ti,tps6594
+
+  reg:
+    description: I2C slave address or SPI chip select number.
+    maxItems: 1
+
+  ti,primary-pmic:
+    type: boolean
+    description: |
+      Identify the primary PMIC on SPMI bus.
+      A multi-PMIC synchronization scheme is implemented in the PMIC device
+      to synchronize the power state changes with other PMIC devices. This is
+      accomplished through a SPMI bus: the primary PMIC is the controller
+      device on the SPMI bus, and the secondary PMICs are the target devices
+      on the SPMI bus.
+
+  system-power-controller: true
+
+  gpio-controller: true
+
+  '#gpio-cells':
+    const: 2
+    description: |
+      The first cell is the pin number, the second cell is used to specify flags.
+      See ../gpio/gpio.txt for more information.
+
+  interrupts:
+    maxItems: 1
Quoted 8 lines

Documentation/devicetree/bindings/mfd/ti,tps6594.yaml line 56

Quoted 6 lines
Documentation/devicetree/bindings/mfd/ti,tps6594.yaml new file +6 -0
+
+  ti,multi-phase-id:
+    description: |
+      Describes buck multi-phase configuration, if any. For instance, XY id means
+      that outputs of buck converters X and Y are combined in multi-phase mode.
+    $ref: /schemas/types.yaml#/definitions/uint32-array

No improvements here. As Rob pointed out, this looks like coupled regulators.

I used 'oneOf' logic to handle mutual exclusion. But it seems that I did not understand what you and Rob expected.
Does some generic property already exist for 'coupled regulators' ?

Quoted 4 lines

Best regards,
Krzysztof

#4 lore raw

Re: [PATCH v3 1/4] dt-bindings: mfd: Add TI TPS6594 PMIC

Quoted 11 lines · Julien Panis
Quoted 7 lines

Documentation/devicetree/bindings/mfd/ti,tps6594.yaml line 56

Quoted 5 lines
Documentation/devicetree/bindings/mfd/ti,tps6594.yaml new file +5 -0
+  ti,multi-phase-id:
+    description: |
+      Describes buck multi-phase configuration, if any. For instance, XY id means
+      that outputs of buck converters X and Y are combined in multi-phase mode.
+    $ref: /schemas/types.yaml#/definitions/uint32-array

No improvements here. As Rob pointed out, this looks like coupled regulators.

I used 'oneOf' logic to handle mutual exclusion. But it seems that I did not understand what you and Rob expected.
Does some generic property already exist for 'coupled regulators' ?

Yes, see regulator.yaml binding.

Best regards,
Krzysztof

#5 lore raw

Re: [PATCH v3 1/4] dt-bindings: mfd: Add TI TPS6594 PMIC

Quoted 6 lines · Krzysztof Kozlowski
Quoted 5 lines · Julien Panis
Quoted 5 lines
Quoted 5 lines
Documentation/devicetree/bindings/mfd/ti,tps6594.yaml new file +5 -0
+  ti,multi-phase-id:
+    description: |
+      Describes buck multi-phase configuration, if any. For instance, XY id means
+      that outputs of buck converters X and Y are combined in multi-phase mode.
+    $ref: /schemas/types.yaml#/definitions/uint32-array
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

No improvements here. As Rob pointed out, this looks like coupled regulators.

I used 'oneOf' logic to handle mutual exclusion. But it seems that I did not understand what you and Rob expected.
Does some generic property already exist for 'coupled regulators' ?

Yes, see regulator.yaml binding.

Krzysztof, I talked with the regulator API/yaml maintainer. Actually, our multiphase concept is different than coupled regulators:
https://lore.kernel.org/all/ZBr+7X3lcFdI8p%[email protected]/

We must not use the generic 'coupled regulator' property here. So, 'ti,multi-phase-id' can be kept.

Quoted 4 lines

Best regards,
Krzysztof

#6 lore raw

Re: [PATCH v3 1/4] dt-bindings: mfd: Add TI TPS6594 PMIC

Quoted 14 lines · Julien Panis
Quoted 11 lines · Krzysztof Kozlowski
Quoted 10 lines · Julien Panis
Quoted 7 lines

Documentation/devicetree/bindings/mfd/ti,tps6594.yaml line 56

Quoted 5 lines
Documentation/devicetree/bindings/mfd/ti,tps6594.yaml new file +5 -0
+  ti,multi-phase-id:
+    description: |
+      Describes buck multi-phase configuration, if any. For instance, XY id means
+      that outputs of buck converters X and Y are combined in multi-phase mode.
+    $ref: /schemas/types.yaml#/definitions/uint32-array

No improvements here. As Rob pointed out, this looks like coupled regulators.

I used 'oneOf' logic to handle mutual exclusion. But it seems that I did not understand what you and Rob expected.
Does some generic property already exist for 'coupled regulators' ?

Quoted 8 lines
Quoted 1 line

Yes, see regulator.yaml binding.

Krzysztof, I talked with the regulator API/yaml maintainer. Actually, our multiphase concept is different than coupled regulators:
https://lore.kernel.org/all/ZBr+7X3lcFdI8p%[email protected]/

We must not use the generic 'coupled regulator' property here. So, 'ti,multi-phase-id' can be kept.

Yeah. I think we do not have generic property for this.

Best regards,
Krzysztof

#7 lore raw

PATCH v3 2/4 mfd: tps6594: Add driver for TI TPS6594 PMIC

In reply to Julien Panis

This patch adds support for TPS6594 PMIC MFD core. It provides communication through the I2C and SPI interfaces, and supports protocols with embedded CRC data fields for safety applications.

---
 drivers/mfd/Kconfig         |   32 ++
 drivers/mfd/Makefile        |    3 +
 drivers/mfd/tps6594-core.c  |  453 ++++++++++++++++
 drivers/mfd/tps6594-i2c.c   |  244 +++++++++
 drivers/mfd/tps6594-spi.c   |  129 +++++
 include/linux/mfd/tps6594.h | 1020 +++++++++++++++++++++++++++++++++++
 6 files changed, 1881 insertions(+)
 create mode 100644 drivers/mfd/tps6594-core.c
 create mode 100644 drivers/mfd/tps6594-i2c.c
 create mode 100644 drivers/mfd/tps6594-spi.c
 create mode 100644 include/linux/mfd/tps6594.h
drivers/mfd/Kconfig +32 -0
index fcc141e067b9..328f160b88e2 100644
@@ -1662,6 +1662,38 @@ config MFD_TPS65912_SPI
 	  If you say yes here you get support for the TPS65912 series of
 	  PM chips with SPI interface.
 
+config MFD_TPS6594
+	tristate
+	select MFD_CORE
+	select REGMAP
+	select REGMAP_IRQ
+
+config MFD_TPS6594_I2C
+	tristate "TI TPS6594 Power Management chip with I2C"
+	select MFD_TPS6594
+	select REGMAP_I2C
+	select CRC8
+	depends on I2C
+	help
+	  If you say yes here you get support for the TPS6594 series of
+	  PM chips with I2C interface.
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called tps6594-i2c.
+
+config MFD_TPS6594_SPI
+	tristate "TI TPS6594 Power Management chip with SPI"
+	select MFD_TPS6594
+	select REGMAP_SPI
+	select CRC8
+	depends on SPI_MASTER
+	help
+	  If you say yes here you get support for the TPS6594 series of
+	  PM chips with SPI interface.
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called tps6594-spi.
+
 config TWL4030_CORE
 	bool "TI TWL4030/TWL5030/TWL6030/TPS659x0 Support"
 	depends on I2C=y
drivers/mfd/Makefile +3 -0
index 2f6c89d1e277..27d0d5c9cff9 100644
@@ -96,6 +96,9 @@ obj-$(CONFIG_MFD_TPS65910)	+= tps65910.o
 obj-$(CONFIG_MFD_TPS65912)	+= tps65912-core.o
 obj-$(CONFIG_MFD_TPS65912_I2C)	+= tps65912-i2c.o
 obj-$(CONFIG_MFD_TPS65912_SPI)  += tps65912-spi.o
+obj-$(CONFIG_MFD_TPS6594)	+= tps6594-core.o
+obj-$(CONFIG_MFD_TPS6594_I2C)	+= tps6594-i2c.o
+obj-$(CONFIG_MFD_TPS6594_SPI)	+= tps6594-spi.o
 obj-$(CONFIG_MENELAUS)		+= menelaus.o
 
 obj-$(CONFIG_TWL4030_CORE)	+= twl-core.o twl4030-irq.o twl6030-irq.o
drivers/mfd/tps6594-core.c new file +453 -0

453 lines not on this page · raw message

drivers/mfd/tps6594-i2c.c new file +244 -0

244 lines not on this page · raw message

drivers/mfd/tps6594-spi.c new file +129 -0

129 lines not on this page · raw message

include/linux/mfd/tps6594.h new file +1020 -0

1,020 lines not on this page · raw message

Signature · 1 line
2.37.3
#8 lore raw

Re: [PATCH v3 2/4] mfd: tps6594: Add driver for TI TPS6594 PMIC

Quoted 6 lines · Julien Panis

This patch adds support for TPS6594 PMIC MFD core. It provides communication through the I2C and SPI interfaces, and supports protocols with embedded CRC data fields for safety applications.

Lee, I will have to drop your ack for next version (v4). A bug will be fixed in tps6594-core (a couple of lines will be added/moved in 2 functions, it will be explained in the coverletter changelog so that you can easily see the diff).
Sorry for the disturbance.

maintainer
#9 lore raw

Re: [PATCH v3 2/4] mfd: tps6594: Add driver for TI TPS6594 PMIC

Quoted 10 lines · Julien Panis
Quoted 6 lines · Julien Panis

This patch adds support for TPS6594 PMIC MFD core. It provides communication through the I2C and SPI interfaces, and supports protocols with embedded CRC data fields for safety applications.

Quoted 6 lines

Lee, I will have to drop your ack for next version (v4). A bug will be fixed in tps6594-core (a couple of lines will be added/moved in 2 functions, it will be explained in the coverletter changelog so that you can easily see the diff).
Sorry for the disturbance.

No problem.

--
Lee Jones [李琼斯]

#10 lore raw

PATCH v3 3/4 misc: tps6594-esm: Add driver for TI TPS6594 ESM

In reply to Julien Panis

This patch adds support for TPS6594 ESM (Error Signal Monitor). This device monitors the SoC error output signal at its nERR_SOC input pin. In error condition, ESM toggles its nRSTOUT_SOC pin to reset the SoC.

---
 drivers/misc/Kconfig       |  11 ++++
 drivers/misc/Makefile      |   1 +
 drivers/misc/tps6594-esm.c | 132 +++++++++++++++++++++++++++++++++++++
 3 files changed, 144 insertions(+)
 create mode 100644 drivers/misc/tps6594-esm.c
drivers/misc/Kconfig +11 -0
index 433aa4197785..c73c02801330 100644
@@ -538,6 +538,17 @@ config TMR_INJECT
 
 	  Say N here unless you know what you are doing.
 
+config TPS6594_ESM
+	tristate "TI TPS6594 Error Signal Monitor support"
+	depends on MFD_TPS6594
+	default MFD_TPS6594
+	help
+	  Support ESM (Error Signal Monitor) on TPS6594 PMIC devices.
+	  ESM is used typically to reboot the board in error condition.
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called tps6594-esm.
+
 source "drivers/misc/c2port/Kconfig"
 source "drivers/misc/eeprom/Kconfig"
 source "drivers/misc/cb710/Kconfig"
drivers/misc/Makefile +1 -0
index 56de43943cd5..3dc69ec69912 100644
@@ -65,3 +65,4 @@ obj-$(CONFIG_GP_PCI1XXXX)	+= mchp_pci1xxxx/
 obj-$(CONFIG_VCPU_STALL_DETECTOR)	+= vcpu_stall_detector.o
 obj-$(CONFIG_TMR_MANAGER)      += xilinx_tmr_manager.o
 obj-$(CONFIG_TMR_INJECT)	+= xilinx_tmr_inject.o
+obj-$(CONFIG_TPS6594_ESM)	+= tps6594-esm.o
drivers/misc/tps6594-esm.c new file +132 -0

132 lines not on this page · raw message

Signature · 1 line
2.37.3
#11 lore raw

PATCH v3 4/4 misc: tps6594-pfsm: Add driver for TI TPS6594 PFSM

In reply to Julien Panis

This PFSM controls the operational modes of the PMIC:
- STANDBY and LP_STANDBY,
- ACTIVE state,
- MCU_ONLY state,
- RETENTION state, with or without DDR and/or GPIO retention. Depending on the current operational mode, some voltage domains remain energized while others can be off.

This PFSM is also used to trigger a firmware update, and provides R/W access to device registers.

---
 .../userspace-api/ioctl/ioctl-number.rst      |   1 +
 drivers/misc/Kconfig                          |  12 +
 drivers/misc/Makefile                         |   1 +
 drivers/misc/tps6594-pfsm.c                   | 304 ++++++++++++++++++
 include/uapi/linux/tps6594_pfsm.h             |  45 +++
 5 files changed, 363 insertions(+)
 create mode 100644 drivers/misc/tps6594-pfsm.c
 create mode 100644 include/uapi/linux/tps6594_pfsm.h
Documentation/userspace-api/ioctl/ioctl-number.rst +1 -0
index 0a1882e296ae..07ff4d619db4 100644
@@ -180,6 +180,7 @@ Code  Seq#    Include File                                           Comments
 'P'   00-0F  drivers/usb/class/usblp.c                               conflict!
 'P'   01-09  drivers/misc/pci_endpoint_test.c                        conflict!
 'P'   00-0F  xen/privcmd.h                                           conflict!
+'P'   00-03  linux/tps6594_pfsm.h                                    conflict!
 'Q'   all    linux/soundcard.h
 'R'   00-1F  linux/random.h                                          conflict!
 'R'   01     linux/rfkill.h                                          conflict!
drivers/misc/Kconfig +12 -0
index c73c02801330..75e427f124b2 100644
@@ -549,6 +549,18 @@ config TPS6594_ESM
 	  This driver can also be built as a module.  If so, the module
 	  will be called tps6594-esm.
 
+config TPS6594_PFSM
+	tristate "TI TPS6594 Pre-configurable Finite State Machine support"
+	depends on MFD_TPS6594
+	default MFD_TPS6594
+	help
+	  Support PFSM (Pre-configurable Finite State Machine) on TPS6594 PMIC devices.
+	  These devices integrate a finite state machine engine, which manages the state
+	  of the device during operating state transition.
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called tps6594-pfsm.
+
 source "drivers/misc/c2port/Kconfig"
 source "drivers/misc/eeprom/Kconfig"
 source "drivers/misc/cb710/Kconfig"
drivers/misc/Makefile +1 -0
index 3dc69ec69912..f2a4d1ff65d4 100644
@@ -66,3 +66,4 @@ obj-$(CONFIG_VCPU_STALL_DETECTOR)	+= vcpu_stall_detector.o
 obj-$(CONFIG_TMR_MANAGER)      += xilinx_tmr_manager.o
 obj-$(CONFIG_TMR_INJECT)	+= xilinx_tmr_inject.o
 obj-$(CONFIG_TPS6594_ESM)	+= tps6594-esm.o
+obj-$(CONFIG_TPS6594_PFSM)	+= tps6594-pfsm.o
drivers/misc/tps6594-pfsm.c new file +304 -0

304 lines not on this page · raw message

include/uapi/linux/tps6594_pfsm.h new file +45 -0

45 lines not on this page · raw message

Signature · 1 line
2.37.3