2023-11-22 10:47:59

by Neha Malcom Francis

[permalink] [raw]
Subject: [PATCH v7 0/4] Add TPS6594 PMIC support on several boards

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 LP8764 are derivatives.

This series adds device tree nodes for TI TPS6594 PMICs found in the
following boards:
- J721EXSOMXEVM:
Link: https://www.ti.com/tool/J721EXSOMXEVM
- J721S2XSOMXEVM:
Link: https://www.ti.com/tool/J721S2XSOMXEVM
- J7200XSOMXEVM:
Link: https://www.ti.com/tool/J7200XSOMXEVM
- J784S4XEVM
Link: https://www.ti.com/tool/J784S4XEVM

Boot Logs:
https://gist.github.com/nehamalcom/384cf594e37739a34f8a08664830e37a

---
Changes from v6:
https://lore.kernel.org/all/[email protected]/
- Modify patch series to include only patches not merged (J7)
- Add boot logs for all affected boards

Changes from v5:
https://lore.kernel.org/all/[email protected]
- Range-diff: http://0x0.st/H_fD.diff
- Reword the patch fixing interrupt ranges for mcu domain gpio intr, and
add Fixes: tag
- Also fix interrupt ranges for main domain gpio intr in the same patch
- Change pinctrl node names to end in -pins to fix dtbs_check warnings
- (New Patch) Enable TPS6594 in defconfig

Changes from v4:
https://lore.kernel.org/all/[email protected]/
- Range-diff: https://0x0.st/H_L7.diff
- Rebased on top of linux-next
- Fix min voltage on vdd_usb_3v3 regulator (ldo2) on j721e-som
- Use 3-hex-digit format for pinctrl values

Changes from v3:
https://lore.kernel.org/all/[email protected]/
- Rebased on top of v6.5-rc1.
- Change pinctrl number for irq pin as wkup_pmx0 was split on some boards.
- Use already present wkup_i2c0 node instead of creating a new one.

Changes from v2:
https://lore.kernel.org/lkml/[email protected]/
- Change node name as per Krzysztof review.
- Add a fix for the interrupt range of wakeup gpio used by TPS6594 pmic
on J784S4.
The interruptions of the PMIC were not working before that.
- Remove dependencies on other patch series as that was a mistake, see
https://lore.kernel.org/lkml/CRYY2V3HJ0CP.96JQ18PLZB3C@burritosblues/

Changes from v1:
https://lore.kernel.org/lkml/[email protected]/
- Harmonize regulators names across the different boards.
- Adjust AVS voltage range.
- Remove some outdated comments.
- Add PMIC to J784S4 board.
- Compatible string modified to match dt-bindings.
- Add gpio-controller and gpio-cells properties.

Esteban Blanc (2):
arm64: dts: ti: k3-j7200-som-p0: Add TP6594 family PMICs
arm64: dts: ti: k3-j721s2-som-p0: Add TP6594 family PMICs

Jerome Neanne (2):
arm64: dts: ti: k3-j721e-som-p0: Add TP6594 family PMICs
arm64: dts: ti: k3-j784s4-evm: Add support for TPS6594 PMIC

arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi | 157 +++++++++++++++
arch/arm64/boot/dts/ti/k3-j721e-som-p0.dtsi | 163 +++++++++++++++
arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi | 199 +++++++++++++++++++
arch/arm64/boot/dts/ti/k3-j784s4-evm.dts | 104 ++++++++++
4 files changed, 623 insertions(+)

--
2.34.1


2023-11-22 10:48:03

by Neha Malcom Francis

[permalink] [raw]
Subject: [PATCH v7 4/4] arm64: dts: ti: k3-j784s4-evm: Add support for TPS6594 PMIC

From: Jerome Neanne <[email protected]>

This patch adds support for TPS6593 PMIC on wkup I2C0 bus.
This device provides regulators (bucks and LDOs), but also
GPIOs, a RTC, a watchdog, an ESM (Error Signal Monitor)
which monitors the SoC error output signal, and a PFSM
(Pre-configurable Finite State Machine) which manages the
operational modes of the PMIC.

Signed-off-by: Jerome Neanne <[email protected]>
Signed-off-by: Esteban Blanc <[email protected]>
Signed-off-by: Jai Luthra <[email protected]>
Signed-off-by: Neha Malcom Francis <[email protected]>
---
arch/arm64/boot/dts/ti/k3-j784s4-evm.dts | 104 +++++++++++++++++++++++
1 file changed, 104 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
index f1f4c8634ab6..dbc75af48774 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts
@@ -273,6 +273,10 @@ dp0_connector_in: endpoint {
};
};

+&wkup_gpio0 {
+ status = "okay";
+};
+
&main_pmx0 {
bootph-all;
main_uart8_pins_default: main-uart8-default-pins {
@@ -407,6 +411,17 @@ J784S4_WKUP_IOPAD(0x108, PIN_INPUT, 0) /* (Y36) MCU_ADC1_AIN7 */
};
};

+&wkup_pmx1 {
+ status = "okay";
+
+ pmic_irq_pins_default: pmic-irq-default-pins {
+ pinctrl-single,pins = <
+ /* (G33) MCU_OSPI1_CSn1.WKUP_GPIO0_39 */
+ J784S4_WKUP_IOPAD(0x028, PIN_INPUT, 7)
+ >;
+ };
+};
+
&wkup_pmx0 {
bootph-all;
mcu_fss0_ospi0_pins_default: mcu-fss0-ospi0-default-pins {
@@ -471,6 +486,95 @@ eeprom@50 {
compatible = "atmel,24c256";
reg = <0x50>;
};
+
+ tps659413: pmic@48 {
+ compatible = "ti,tps6594-q1";
+ reg = <0x48>;
+ system-power-controller;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_irq_pins_default>;
+ interrupt-parent = <&wkup_gpio0>;
+ interrupts = <39 IRQ_TYPE_EDGE_FALLING>;
+ ti,primary-pmic;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ buck12-supply = <&vsys_3v3>;
+ buck3-supply = <&vsys_3v3>;
+ buck4-supply = <&vsys_3v3>;
+ buck5-supply = <&vsys_3v3>;
+ ldo1-supply = <&vsys_3v3>;
+ ldo2-supply = <&vsys_3v3>;
+ ldo3-supply = <&vsys_3v3>;
+ ldo4-supply = <&vsys_3v3>;
+
+ regulators {
+ bucka12: buck12 {
+ regulator-name = "vdd_ddr_1v1";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka3: buck3 {
+ regulator-name = "vdd_ram_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka4: buck4 {
+ regulator-name = "vdd_io_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka5: buck5 {
+ regulator-name = "vdd_mcu_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa1: ldo1 {
+ regulator-name = "vdd_mcuio_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa2: ldo2 {
+ regulator-name = "vdd_mcuio_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa3: ldo3 {
+ regulator-name = "vds_dll_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa4: ldo4 {
+ regulator-name = "vda_mcu_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
};

&mcu_uart0 {
--
2.34.1

2023-11-23 07:24:31

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH v7 0/4] Add TPS6594 PMIC support on several boards

On 16:15-20231122, Neha Malcom Francis wrote:
> 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 LP8764 are derivatives.
>
> This series adds device tree nodes for TI TPS6594 PMICs found in the
> following boards:
> - J721EXSOMXEVM:
> Link: https://www.ti.com/tool/J721EXSOMXEVM
> - J721S2XSOMXEVM:
> Link: https://www.ti.com/tool/J721S2XSOMXEVM
> - J7200XSOMXEVM:
> Link: https://www.ti.com/tool/J7200XSOMXEVM
> - J784S4XEVM
> Link: https://www.ti.com/tool/J784S4XEVM
>
> Boot Logs:
> https://gist.github.com/nehamalcom/384cf594e37739a34f8a08664830e37a
>
> ---
> Changes from v6:
> https://lore.kernel.org/all/[email protected]/
> - Modify patch series to include only patches not merged (J7)
> - Add boot logs for all affected boards

So what changed for j721s2?
https://lore.kernel.org/all/20230810024700.4qhgygd6mma4sw2u@kobold/

And, there is no defconfig patch? Then how did the test work? if you
have done local .config changes, that should have been defconfig patch.

Also did you audit the SKs to make sure they don't need this?


--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D

2023-11-23 07:31:29

by Neha Malcom Francis

[permalink] [raw]
Subject: Re: [PATCH v7 0/4] Add TPS6594 PMIC support on several boards

Hi Nishanth,

On 23/11/23 12:54, Nishanth Menon wrote:
> On 16:15-20231122, Neha Malcom Francis wrote:
>> 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 LP8764 are derivatives.
>>
>> This series adds device tree nodes for TI TPS6594 PMICs found in the
>> following boards:
>> - J721EXSOMXEVM:
>> Link: https://www.ti.com/tool/J721EXSOMXEVM
>> - J721S2XSOMXEVM:
>> Link: https://www.ti.com/tool/J721S2XSOMXEVM
>> - J7200XSOMXEVM:
>> Link: https://www.ti.com/tool/J7200XSOMXEVM
>> - J784S4XEVM
>> Link: https://www.ti.com/tool/J784S4XEVM
>>
>> Boot Logs:
>> https://gist.github.com/nehamalcom/384cf594e37739a34f8a08664830e37a
>>
>> ---
>> Changes from v6:
>> https://lore.kernel.org/all/[email protected]/
>> - Modify patch series to include only patches not merged (J7)
>> - Add boot logs for all affected boards
>
> So what changed for j721s2?
> https://lore.kernel.org/all/20230810024700.4qhgygd6mma4sw2u@kobold/
>
> And, there is no defconfig patch? Then how did the test work? if you
> have done local .config changes, that should have been defconfig patch.

Sorry about that... sending a next version with the defconfig patch.

>
> Also did you audit the SKs to make sure they don't need this?
>

I did a test run across all SKs (although I didn't add that in the cover-letter)
but didn't double-check whether they need it, I'll do that too, thanks for
reviewing!

>

--
Thanking You
Neha Malcom Francis