2023-12-05 09:36:21

by Neha Malcom Francis

[permalink] [raw]
Subject: [PATCH v9 0/7] 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
- SK-AM69
Link: https://www.ti.com/tool/SK-AM69
- SK-TDA4VM (J721E-SK)
Link: https://www.ti.com/tool/SK-TDA4VM

Boot Logs with required config (DONOTMERGE patch) enabled:
https://gist.github.com/nehamalcom/f47fcd6183360ed8a146c9ba456202c3
Boot Logs without config enabled:
https://gist.github.com/nehamalcom/58217b100e614ae55726f314e02b5001

---
Changes from v8:
https://lore.kernel.org/all/[email protected]/
- added bootph-pre-ram to AVS regulator (Udit)
- keeping boot logs and Tested-by tags the same (no effect to kernel)

Changes from v7:
https://lore.kernel.org/all/[email protected]/
- (New Patches) Add support for SK boards that have TPS6594xx PMIC
present (J721E-SK and AM69-SK) (Nishanth)
- Add DONOTMERGE defconfig patch to show test logs

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

Neha Malcom Francis (3):
arm64: dts: ti: k3-am69-sk: Add support for TPS6594 PMIC
arm64: dts: ti: k3-j721e-sk: Add TPS6594 family PMICs
DONOTMERGE: arm64: defconfig: Enable TPS6594 PMIC for J7 devices

arch/arm64/boot/dts/ti/k3-am69-sk.dts | 100 +++++++++
arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi | 161 +++++++++++++++
arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 158 +++++++++++++++
arch/arm64/boot/dts/ti/k3-j721e-som-p0.dtsi | 167 +++++++++++++++
arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi | 203 +++++++++++++++++++
arch/arm64/boot/dts/ti/k3-j784s4-evm.dts | 104 ++++++++++
arch/arm64/configs/defconfig | 2 +-
7 files changed, 894 insertions(+), 1 deletion(-)

--
2.34.1


2023-12-05 09:36:22

by Neha Malcom Francis

[permalink] [raw]
Subject: [PATCH v9 2/7] arm64: dts: ti: k3-j721s2-som-p0: Add TP6594 family PMICs

From: Esteban Blanc <[email protected]>

This patch adds support for TPS6594 PMIC family on wakup I2C0 bus.
Theses devices 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: 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-j721s2-som-p0.dtsi | 203 +++++++++++++++++++
1 file changed, 203 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi
index dcad372620b1..86f2416dfc02 100644
--- a/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi
@@ -172,6 +172,16 @@ J721S2_WKUP_IOPAD(0x004, PIN_INPUT, 0) /* (E20) MCU_OSPI0_LBCLKO */
};
};

+&wkup_pmx1 {
+ pmic_irq_pins_default: pmic-irq-default-pins {
+ bootph-pre-ram;
+ pinctrl-single,pins = <
+ /* (C21) MCU_OSPI1_CSn1.WKUP_GPIO0_39 */
+ J721S2_WKUP_IOPAD(0x028, PIN_INPUT, 7)
+ >;
+ };
+};
+
&wkup_pmx2 {
wkup_i2c0_pins_default: wkup-i2c0-default-pins {
pinctrl-single,pins = <
@@ -208,6 +218,199 @@ eeprom@50 {
compatible = "atmel,24c256";
reg = <0x50>;
};
+
+ tps659411: pmic@48 {
+ bootph-pre-ram;
+ compatible = "ti,tps6594-q1";
+ reg = <0x48>;
+ ti,primary-pmic;
+ system-power-controller;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_irq_pins_default>;
+ interrupt-parent = <&wkup_gpio0>;
+ interrupts = <39 IRQ_TYPE_EDGE_FALLING>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ buck1234-supply = <&vsys_3v3>;
+ buck5-supply = <&vsys_3v3>;
+ ldo1-supply = <&vsys_3v3>;
+ ldo2-supply = <&vsys_3v3>;
+ ldo3-supply = <&vsys_3v3>;
+ ldo4-supply = <&vsys_3v3>;
+
+ regulators {
+ bootph-pre-ram;
+ bucka1234: buck1234 {
+ bootph-pre-ram;
+ regulator-name = "vdd_cpu_avs";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <900000>;
+ 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_mcuwk_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa2: ldo2 {
+ regulator-name = "vdd_mcu_gpioret_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa3: ldo3 {
+ regulator-name = "vdd_mcuio_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ 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;
+ };
+ };
+ };
+
+ tps659414: pmic@4c {
+ compatible = "ti,tps6594-q1";
+ reg = <0x4c>;
+ system-power-controller;
+ interrupt-parent = <&wkup_gpio0>;
+ interrupts = <39 IRQ_TYPE_EDGE_FALLING>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ buck1-supply = <&vsys_3v3>;
+ buck2-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 {
+ buckb1: buck1 {
+ regulator-name = "vdd_io_1v8_reg";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ buckb2: buck2 {
+ regulator-name = "vdd_fpd_1v1";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ buckb3: buck3 {
+ regulator-name = "vdd_phy_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ buckb4: buck4 {
+ regulator-name = "vdd_ddr_1v1";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ buckb5: buck5 {
+ regulator-name = "vdd_ram_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob1: ldo1 {
+ regulator-name = "vdd_wk_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob2: ldo2 {
+ regulator-name = "vdd_gpioret_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob3: ldo3 {
+ regulator-name = "vda_dll_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob4: ldo4 {
+ regulator-name = "vda_pll_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
+
+ lp876411: pmic@58 {
+ compatible = "ti,lp8764-q1";
+ reg = <0x58>;
+ system-power-controller;
+ interrupt-parent = <&wkup_gpio0>;
+ interrupts = <39 IRQ_TYPE_EDGE_FALLING>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ buck1234-supply = <&vsys_3v3>;
+
+ regulators {
+ buckc1234: buck1234 {
+ regulator-name = "vdd_core_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
};

&main_i2c0 {
--
2.34.1

2023-12-05 09:36:24

by Neha Malcom Francis

[permalink] [raw]
Subject: [PATCH v9 4/7] 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-12-05 09:36:27

by Neha Malcom Francis

[permalink] [raw]
Subject: [PATCH v9 6/7] arm64: dts: ti: k3-j721e-sk: Add TPS6594 family PMICs

This patch adds support for TPS6594 PMIC family on wakeup I2C0 bus.
These devices provide 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: Neha Malcom Francis <[email protected]>
---
arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 158 +++++++++++++++++++++++++
1 file changed, 158 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
index 42fe8eee9ec8..e600825f7e78 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
@@ -459,6 +459,13 @@ J721E_IOPAD(0x234, PIN_INPUT, 7) /* (U3) EXT_REFCLK1.GPIO1_12 */
};

&wkup_pmx0 {
+ pmic_irq_pins_default: pmic-irq-default-pins {
+ bootph-pre-ram;
+ pinctrl-single,pins = <
+ J721E_WKUP_IOPAD(0x0cc, PIN_INPUT, 7) /* (G28) WKUP_GPIO0_7 */
+ >;
+ };
+
mcu_cpsw_pins_default: mcu-cpsw-default-pins {
pinctrl-single,pins = <
J721E_WKUP_IOPAD(0x84, PIN_INPUT, 0) /* (B24) MCU_RGMII1_RD0 */
@@ -560,6 +567,157 @@ eeprom@51 {
compatible = "atmel,24c512";
reg = <0x51>;
};
+
+ tps659413: pmic@48 {
+ bootph-pre-ram;
+ compatible = "ti,tps6594-q1";
+ reg = <0x48>;
+ system-power-controller;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_irq_pins_default>;
+ interrupt-parent = <&wkup_gpio0>;
+ interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
+ ti,primary-pmic;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ buck123-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 {
+ bootph-pre-ram;
+ bucka123: buck123 {
+ bootph-pre-ram;
+ regulator-name = "vdd_cpu_avs";
+ regulator-min-microvolt = <600000>;
+ regulator-max-microvolt = <900000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka4: buck4 {
+ regulator-name = "vdd_mcu_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ bucka5: buck5 {
+ regulator-name = "vdd_phyio_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa1: ldo1 {
+ regulator-name = "vdd1_lpddr4_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa2: ldo2 {
+ regulator-name = "vdd_mcuio_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldoa3: ldo3 {
+ regulator-name = "vdda_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;
+ };
+ };
+ };
+
+ tps659411: pmic@4c {
+ compatible = "ti,tps6594-q1";
+ reg = <0x4c>;
+ system-power-controller;
+ interrupt-parent = <&wkup_gpio0>;
+ interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ buck1234-supply = <&vsys_3v3>;
+ buck5-supply = <&vsys_3v3>;
+ ldo1-supply = <&vsys_3v3>;
+ ldo2-supply = <&vsys_3v3>;
+ ldo3-supply = <&vsys_3v3>;
+ ldo4-supply = <&vsys_3v3>;
+
+ regulators {
+ buckb1234: buck1234 {
+ regulator-name = "vdd_core_0v8";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ buckb5: buck5 {
+ regulator-name = "vdd_ram_0v85";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob1: ldo1 {
+ regulator-name = "vdd_sd_dv";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob2: ldo2 {
+ regulator-name = "vdd_usb_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob3: ldo3 {
+ regulator-name = "vdd_io_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldob4: ldo4 {
+ regulator-name = "vda_pll_1v8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
};

&mcu_uart0 {
--
2.34.1

2023-12-05 09:36:28

by Neha Malcom Francis

[permalink] [raw]
Subject: [PATCH v9 7/7] DONOTMERGE: arm64: defconfig: Enable TPS6594 PMIC for J7 devices

J7 (J721E-EVM, J721E-SK, J721S2, AM68-SK, J784S4, AM69-SK) devices use
TPS6594x PMIC (interfaced over I2C) to power the SoC and various other
peripherals on the board [1].

Signed-off-by: Neha Malcom Francis <[email protected]>
---
arch/arm64/configs/defconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index b60aa1f89343..682251135267 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -727,7 +727,7 @@ CONFIG_MFD_SEC_CORE=y
CONFIG_MFD_SL28CPLD=y
CONFIG_RZ_MTU3=y
CONFIG_MFD_TPS65219=y
-CONFIG_MFD_TPS6594_I2C=m
+CONFIG_MFD_TPS6594_I2C=y
CONFIG_MFD_TI_AM335X_TSCADC=m
CONFIG_MFD_ROHM_BD718XX=y
CONFIG_MFD_WCD934X=m
--
2.34.1

2023-12-05 15:17:19

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH v9 6/7] arm64: dts: ti: k3-j721e-sk: Add TPS6594 family PMICs

On 15:04-20231205, Neha Malcom Francis wrote:
> This patch adds support for TPS6594 PMIC family on wakeup I2C0 bus.
> These devices provide 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: Neha Malcom Francis <[email protected]>
> ---
> arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 158 +++++++++++++++++++++++++
> 1 file changed, 158 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
> index 42fe8eee9ec8..e600825f7e78 100644
> --- a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
> +++ b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
> @@ -459,6 +459,13 @@ J721E_IOPAD(0x234, PIN_INPUT, 7) /* (U3) EXT_REFCLK1.GPIO1_12 */
> };
>
> &wkup_pmx0 {
> + pmic_irq_pins_default: pmic-irq-default-pins {
> + bootph-pre-ram;
> + pinctrl-single,pins = <
> + J721E_WKUP_IOPAD(0x0cc, PIN_INPUT, 7) /* (G28) WKUP_GPIO0_7 */
> + >;
> + };
> +
> mcu_cpsw_pins_default: mcu-cpsw-default-pins {
> pinctrl-single,pins = <
> J721E_WKUP_IOPAD(0x84, PIN_INPUT, 0) /* (B24) MCU_RGMII1_RD0 */
> @@ -560,6 +567,157 @@ eeprom@51 {
> compatible = "atmel,24c512";
> reg = <0x51>;
> };
> +
> + tps659413: pmic@48 {
> + bootph-pre-ram;

only for the leaf nodes. See
https://libera.irclog.whitequark.org/armlinux/2023-10-19

> + compatible = "ti,tps6594-q1";
> + reg = <0x48>;
> + system-power-controller;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pmic_irq_pins_default>;
> + interrupt-parent = <&wkup_gpio0>;
> + interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
> + ti,primary-pmic;
> +
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + buck123-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 {
> + bootph-pre-ram;
> + bucka123: buck123 {
> + bootph-pre-ram;
> + regulator-name = "vdd_cpu_avs";
> + regulator-min-microvolt = <600000>;
> + regulator-max-microvolt = <900000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + bucka4: buck4 {
> + regulator-name = "vdd_mcu_0v85";
> + regulator-min-microvolt = <850000>;
> + regulator-max-microvolt = <850000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + bucka5: buck5 {
> + regulator-name = "vdd_phyio_1v8";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + ldoa1: ldo1 {
> + regulator-name = "vdd1_lpddr4_1v8";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + ldoa2: ldo2 {
> + regulator-name = "vdd_mcuio_1v8";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + ldoa3: ldo3 {
> + regulator-name = "vdda_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;
> + };
> + };
> + };
> +
> + tps659411: pmic@4c {
> + compatible = "ti,tps6594-q1";
> + reg = <0x4c>;
> + system-power-controller;
> + interrupt-parent = <&wkup_gpio0>;
> + interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
> +
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + buck1234-supply = <&vsys_3v3>;
> + buck5-supply = <&vsys_3v3>;
> + ldo1-supply = <&vsys_3v3>;
> + ldo2-supply = <&vsys_3v3>;
> + ldo3-supply = <&vsys_3v3>;
> + ldo4-supply = <&vsys_3v3>;
> +
> + regulators {
> + buckb1234: buck1234 {
> + regulator-name = "vdd_core_0v8";
> + regulator-min-microvolt = <800000>;
> + regulator-max-microvolt = <800000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + buckb5: buck5 {
> + regulator-name = "vdd_ram_0v85";
> + regulator-min-microvolt = <850000>;
> + regulator-max-microvolt = <850000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + ldob1: ldo1 {
> + regulator-name = "vdd_sd_dv";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + ldob2: ldo2 {
> + regulator-name = "vdd_usb_3v3";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + ldob3: ldo3 {
> + regulator-name = "vdd_io_1v8";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + ldob4: ldo4 {
> + regulator-name = "vda_pll_1v8";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> + };
> + };
> };
>
> &mcu_uart0 {
> --
> 2.34.1
>

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

2023-12-07 04:43:28

by Kumar, Udit

[permalink] [raw]
Subject: Re: [PATCH v9 6/7] arm64: dts: ti: k3-j721e-sk: Add TPS6594 family PMICs


On 12/5/2023 8:46 PM, Nishanth Menon wrote:
> On 15:04-20231205, Neha Malcom Francis wrote:
>> This patch adds support for TPS6594 PMIC family on wakeup I2C0 bus.
>> These devices provide 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: Neha Malcom Francis <[email protected]>
>> ---
>> arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 158 +++++++++++++++++++++++++
>> 1 file changed, 158 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
>> index 42fe8eee9ec8..e600825f7e78 100644
>> --- a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
>> +++ b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
>> @@ -459,6 +459,13 @@ J721E_IOPAD(0x234, PIN_INPUT, 7) /* (U3) EXT_REFCLK1.GPIO1_12 */
>> };
>>
>> &wkup_pmx0 {
>> + pmic_irq_pins_default: pmic-irq-default-pins {
>> + bootph-pre-ram;
>> + pinctrl-single,pins = <
>> + J721E_WKUP_IOPAD(0x0cc, PIN_INPUT, 7) /* (G28) WKUP_GPIO0_7 */
>> + >;
>> + };
>> +
>> mcu_cpsw_pins_default: mcu-cpsw-default-pins {
>> pinctrl-single,pins = <
>> J721E_WKUP_IOPAD(0x84, PIN_INPUT, 0) /* (B24) MCU_RGMII1_RD0 */
>> @@ -560,6 +567,157 @@ eeprom@51 {
>> compatible = "atmel,24c512";
>> reg = <0x51>;
>> };
>> +
>> + tps659413: pmic@48 {
>> + bootph-pre-ram;
> only for the leaf nodes. See
> https://libera.irclog.whitequark.org/armlinux/2023-10-19


AFAIK, please correct me, u-boot still needs in all nodes ?

>
>> + compatible = "ti,tps6594-q1";
>> + reg = <0x48>;
>> + system-power-controller;
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&pmic_irq_pins_default>;
>> + interrupt-parent = <&wkup_gpio0>;
>> + interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
>> + ti,primary-pmic;
>> +
>> + gpio-controller;
>> + #gpio-cells = <2>;
>> +
>> + buck123-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 {
>> + bootph-pre-ram;
>> + bucka123: buck123 {
>> + bootph-pre-ram;
>> + regulator-name = "vdd_cpu_avs";
>> + regulator-min-microvolt = <600000>;
>> + regulator-max-microvolt = <900000>;
>> + regulator-boot-on;
>> + regulator-always-on;
>> + };
>> +
>> + bucka4: buck4 {
>> + regulator-name = "vdd_mcu_0v85";
>> + regulator-min-microvolt = <850000>;
>> + regulator-max-microvolt = <850000>;
>> + regulator-boot-on;
>> + regulator-always-on;
>> + };
>> +
>> + bucka5: buck5 {
>> + regulator-name = "vdd_phyio_1v8";
>> + regulator-min-microvolt = <1800000>;
>> + regulator-max-microvolt = <1800000>;
>> + regulator-boot-on;
>> + regulator-always-on;
>> + };
>> +
>> + ldoa1: ldo1 {
>> + regulator-name = "vdd1_lpddr4_1v8";
>> + regulator-min-microvolt = <1800000>;
>> + regulator-max-microvolt = <1800000>;
>> + regulator-boot-on;
>> + regulator-always-on;
>> + };
>> +
>> + ldoa2: ldo2 {
>> + regulator-name = "vdd_mcuio_1v8";
>> + regulator-min-microvolt = <1800000>;
>> + regulator-max-microvolt = <1800000>;
>> + regulator-boot-on;
>> + regulator-always-on;
>> + };
>> +
>> + ldoa3: ldo3 {
>> + regulator-name = "vdda_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;
>> + };
>> + };
>> + };
>> +
>> + tps659411: pmic@4c {
>> + compatible = "ti,tps6594-q1";
>> + reg = <0x4c>;
>> + system-power-controller;
>> + interrupt-parent = <&wkup_gpio0>;
>> + interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
>> +
>> + gpio-controller;
>> + #gpio-cells = <2>;
>> +
>> + buck1234-supply = <&vsys_3v3>;
>> + buck5-supply = <&vsys_3v3>;
>> + ldo1-supply = <&vsys_3v3>;
>> + ldo2-supply = <&vsys_3v3>;
>> + ldo3-supply = <&vsys_3v3>;
>> + ldo4-supply = <&vsys_3v3>;
>> +
>> + regulators {
>> + buckb1234: buck1234 {
>> + regulator-name = "vdd_core_0v8";
>> + regulator-min-microvolt = <800000>;
>> + regulator-max-microvolt = <800000>;
>> + regulator-boot-on;
>> + regulator-always-on;
>> + };
>> +
>> + buckb5: buck5 {
>> + regulator-name = "vdd_ram_0v85";
>> + regulator-min-microvolt = <850000>;
>> + regulator-max-microvolt = <850000>;
>> + regulator-boot-on;
>> + regulator-always-on;
>> + };
>> +
>> + ldob1: ldo1 {
>> + regulator-name = "vdd_sd_dv";
>> + regulator-min-microvolt = <1800000>;
>> + regulator-max-microvolt = <3300000>;
>> + regulator-boot-on;
>> + regulator-always-on;
>> + };
>> +
>> + ldob2: ldo2 {
>> + regulator-name = "vdd_usb_3v3";
>> + regulator-min-microvolt = <3300000>;
>> + regulator-max-microvolt = <3300000>;
>> + regulator-boot-on;
>> + regulator-always-on;
>> + };
>> +
>> + ldob3: ldo3 {
>> + regulator-name = "vdd_io_1v8";
>> + regulator-min-microvolt = <1800000>;
>> + regulator-max-microvolt = <1800000>;
>> + regulator-boot-on;
>> + regulator-always-on;
>> + };
>> +
>> + ldob4: ldo4 {
>> + regulator-name = "vda_pll_1v8";
>> + regulator-min-microvolt = <1800000>;
>> + regulator-max-microvolt = <1800000>;
>> + regulator-boot-on;
>> + regulator-always-on;
>> + };
>> + };
>> + };
>> };
>>
>> &mcu_uart0 {
>> --
>> 2.34.1
>>

2023-12-07 05:32:01

by Neha Malcom Francis

[permalink] [raw]
Subject: Re: [PATCH v9 6/7] arm64: dts: ti: k3-j721e-sk: Add TPS6594 family PMICs

Hi Nishanth, Udit,

On 07/12/23 10:12, Kumar, Udit wrote:
>
> On 12/5/2023 8:46 PM, Nishanth Menon wrote:
>> On 15:04-20231205, Neha Malcom Francis wrote:
>>> This patch adds support for TPS6594 PMIC family on wakeup I2C0 bus.
>>> These devices provide 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: Neha Malcom Francis <[email protected]>
>>> ---
>>>   arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 158 +++++++++++++++++++++++++
>>>   1 file changed, 158 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
>>> b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
>>> index 42fe8eee9ec8..e600825f7e78 100644
>>> --- a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
>>> +++ b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
>>> @@ -459,6 +459,13 @@ J721E_IOPAD(0x234, PIN_INPUT, 7) /* (U3)
>>> EXT_REFCLK1.GPIO1_12 */
>>>   };
>>>   &wkup_pmx0 {
>>> +    pmic_irq_pins_default: pmic-irq-default-pins {
>>> +        bootph-pre-ram;
>>> +        pinctrl-single,pins = <
>>> +            J721E_WKUP_IOPAD(0x0cc, PIN_INPUT, 7) /* (G28) WKUP_GPIO0_7 */
>>> +        >;
>>> +    };
>>> +
>>>       mcu_cpsw_pins_default: mcu-cpsw-default-pins {
>>>           pinctrl-single,pins = <
>>>               J721E_WKUP_IOPAD(0x84, PIN_INPUT, 0) /* (B24) MCU_RGMII1_RD0 */
>>> @@ -560,6 +567,157 @@ eeprom@51 {
>>>           compatible = "atmel,24c512";
>>>           reg = <0x51>;
>>>       };
>>> +
>>> +    tps659413: pmic@48 {
>>> +        bootph-pre-ram;
>> only for the leaf nodes. See
>> https://libera.irclog.whitequark.org/armlinux/2023-10-19
>
>
> AFAIK, please correct me, u-boot still needs in all nodes ?
>

That's what I believe as well, is it better to have only the leaf nodes in
kernel and have U-Boot DTSI handle the parent bootph properties? If so I'll send
out v10 making change accordingly.

>>
>>> +        compatible = "ti,tps6594-q1";
>>> +        reg = <0x48>;
>>> +        system-power-controller;
>>> +        pinctrl-names = "default";
>>> +        pinctrl-0 = <&pmic_irq_pins_default>;
>>> +        interrupt-parent = <&wkup_gpio0>;
>>> +        interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
>>> +        ti,primary-pmic;
>>> +
>>> +        gpio-controller;
>>> +        #gpio-cells = <2>;
>>> +
>>> +        buck123-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 {
>>> +            bootph-pre-ram;
>>> +            bucka123: buck123 {
>>> +                bootph-pre-ram;
>>> +                regulator-name = "vdd_cpu_avs";
>>> +                regulator-min-microvolt = <600000>;
>>> +                regulator-max-microvolt = <900000>;
>>> +                regulator-boot-on;
>>> +                regulator-always-on;
>>> +            };
>>> +
>>> +            bucka4: buck4 {
>>> +                regulator-name = "vdd_mcu_0v85";
>>> +                regulator-min-microvolt = <850000>;
>>> +                regulator-max-microvolt = <850000>;
>>> +                regulator-boot-on;
>>> +                regulator-always-on;
>>> +            };
>>> +
>>> +            bucka5: buck5 {
>>> +                regulator-name = "vdd_phyio_1v8";
>>> +                regulator-min-microvolt = <1800000>;
>>> +                regulator-max-microvolt = <1800000>;
>>> +                regulator-boot-on;
>>> +                regulator-always-on;
>>> +            };
>>> +
>>> +            ldoa1: ldo1 {
>>> +                regulator-name = "vdd1_lpddr4_1v8";
>>> +                regulator-min-microvolt = <1800000>;
>>> +                regulator-max-microvolt = <1800000>;
>>> +                regulator-boot-on;
>>> +                regulator-always-on;
>>> +            };
>>> +
>>> +            ldoa2: ldo2 {
>>> +                regulator-name = "vdd_mcuio_1v8";
>>> +                regulator-min-microvolt = <1800000>;
>>> +                regulator-max-microvolt = <1800000>;
>>> +                regulator-boot-on;
>>> +                regulator-always-on;
>>> +            };
>>> +
>>> +            ldoa3: ldo3 {
>>> +                regulator-name = "vdda_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;
>>> +            };
>>> +        };
>>> +    };
>>> +
>>> +    tps659411: pmic@4c {
>>> +        compatible = "ti,tps6594-q1";
>>> +        reg = <0x4c>;
>>> +        system-power-controller;
>>> +        interrupt-parent = <&wkup_gpio0>;
>>> +        interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
>>> +
>>> +        gpio-controller;
>>> +        #gpio-cells = <2>;
>>> +
>>> +        buck1234-supply = <&vsys_3v3>;
>>> +        buck5-supply = <&vsys_3v3>;
>>> +        ldo1-supply = <&vsys_3v3>;
>>> +        ldo2-supply = <&vsys_3v3>;
>>> +        ldo3-supply = <&vsys_3v3>;
>>> +        ldo4-supply = <&vsys_3v3>;
>>> +
>>> +        regulators {
>>> +            buckb1234: buck1234 {
>>> +                regulator-name = "vdd_core_0v8";
>>> +                regulator-min-microvolt = <800000>;
>>> +                regulator-max-microvolt = <800000>;
>>> +                regulator-boot-on;
>>> +                regulator-always-on;
>>> +            };
>>> +
>>> +            buckb5: buck5 {
>>> +                regulator-name = "vdd_ram_0v85";
>>> +                regulator-min-microvolt = <850000>;
>>> +                regulator-max-microvolt = <850000>;
>>> +                regulator-boot-on;
>>> +                regulator-always-on;
>>> +            };
>>> +
>>> +            ldob1: ldo1 {
>>> +                regulator-name = "vdd_sd_dv";
>>> +                regulator-min-microvolt = <1800000>;
>>> +                regulator-max-microvolt = <3300000>;
>>> +                regulator-boot-on;
>>> +                regulator-always-on;
>>> +            };
>>> +
>>> +            ldob2: ldo2 {
>>> +                regulator-name = "vdd_usb_3v3";
>>> +                regulator-min-microvolt = <3300000>;
>>> +                regulator-max-microvolt = <3300000>;
>>> +                regulator-boot-on;
>>> +                regulator-always-on;
>>> +            };
>>> +
>>> +            ldob3: ldo3 {
>>> +                regulator-name = "vdd_io_1v8";
>>> +                regulator-min-microvolt = <1800000>;
>>> +                regulator-max-microvolt = <1800000>;
>>> +                regulator-boot-on;
>>> +                regulator-always-on;
>>> +            };
>>> +
>>> +            ldob4: ldo4 {
>>> +                regulator-name = "vda_pll_1v8";
>>> +                regulator-min-microvolt = <1800000>;
>>> +                regulator-max-microvolt = <1800000>;
>>> +                regulator-boot-on;
>>> +                regulator-always-on;
>>> +            };
>>> +        };
>>> +    };
>>>   };
>>>   &mcu_uart0 {
>>> --
>>> 2.34.1
>>>

--
Thanking You
Neha Malcom Francis

2023-12-07 13:49:42

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH v9 6/7] arm64: dts: ti: k3-j721e-sk: Add TPS6594 family PMICs

On 11:01-20231207, Neha Malcom Francis wrote:
> Hi Nishanth, Udit,
>
> On 07/12/23 10:12, Kumar, Udit wrote:
> >
> > On 12/5/2023 8:46 PM, Nishanth Menon wrote:
> > > On 15:04-20231205, Neha Malcom Francis wrote:
> > > > This patch adds support for TPS6594 PMIC family on wakeup I2C0 bus.
> > > > These devices provide 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: Neha Malcom Francis <[email protected]>
> > > > ---
> > > > ? arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 158 +++++++++++++++++++++++++
> > > > ? 1 file changed, 158 insertions(+)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
> > > > b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
> > > > index 42fe8eee9ec8..e600825f7e78 100644
> > > > --- a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
> > > > +++ b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
> > > > @@ -459,6 +459,13 @@ J721E_IOPAD(0x234, PIN_INPUT, 7) /* (U3)
> > > > EXT_REFCLK1.GPIO1_12 */
> > > > ? };
> > > > ? &wkup_pmx0 {
> > > > +??? pmic_irq_pins_default: pmic-irq-default-pins {
> > > > +??????? bootph-pre-ram;
> > > > +??????? pinctrl-single,pins = <
> > > > +??????????? J721E_WKUP_IOPAD(0x0cc, PIN_INPUT, 7) /* (G28) WKUP_GPIO0_7 */
> > > > +??????? >;
> > > > +??? };
> > > > +
> > > > ????? mcu_cpsw_pins_default: mcu-cpsw-default-pins {
> > > > ????????? pinctrl-single,pins = <
> > > > ????????????? J721E_WKUP_IOPAD(0x84, PIN_INPUT, 0) /* (B24) MCU_RGMII1_RD0 */
> > > > @@ -560,6 +567,157 @@ eeprom@51 {
> > > > ????????? compatible = "atmel,24c512";
> > > > ????????? reg = <0x51>;
> > > > ????? };
> > > > +
> > > > +??? tps659413: pmic@48 {
> > > > +??????? bootph-pre-ram;
> > > only for the leaf nodes. See
> > > https://libera.irclog.whitequark.org/armlinux/2023-10-19
> >
> >
> > AFAIK, please correct me, u-boot still needs in all nodes ?
> >
>
> That's what I believe as well, is it better to have only the leaf nodes in
> kernel and have U-Boot DTSI handle the parent bootph properties? If so I'll
> send out v10 making change accordingly.
>

Yes, u-boot today needs it in all nodes. BUT, u-boot needs to be fixed in
line to obey the rules of the schema convention that Rob clarified in
the discussion above.

The other choice is NOT to introduce new bootph properties till u-boot
is fixed up (this is also why I haven't sent out further updates for
bootph properties for kernel in this cycle).

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

2023-12-08 05:40:30

by Neha Malcom Francis

[permalink] [raw]
Subject: Re: [PATCH v9 6/7] arm64: dts: ti: k3-j721e-sk: Add TPS6594 family PMICs

Hi Nishanth

On 07/12/23 19:19, Nishanth Menon wrote:
> On 11:01-20231207, Neha Malcom Francis wrote:
>> Hi Nishanth, Udit,
>>
>> On 07/12/23 10:12, Kumar, Udit wrote:
>>>
>>> On 12/5/2023 8:46 PM, Nishanth Menon wrote:
>>>> On 15:04-20231205, Neha Malcom Francis wrote:
>>>>> This patch adds support for TPS6594 PMIC family on wakeup I2C0 bus.
>>>>> These devices provide 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: Neha Malcom Francis <[email protected]>
>>>>> ---
>>>>>   arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 158 +++++++++++++++++++++++++
>>>>>   1 file changed, 158 insertions(+)
>>>>>
>>>>> diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
>>>>> b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
>>>>> index 42fe8eee9ec8..e600825f7e78 100644
>>>>> --- a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
>>>>> +++ b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
>>>>> @@ -459,6 +459,13 @@ J721E_IOPAD(0x234, PIN_INPUT, 7) /* (U3)
>>>>> EXT_REFCLK1.GPIO1_12 */
>>>>>   };
>>>>>   &wkup_pmx0 {
>>>>> +    pmic_irq_pins_default: pmic-irq-default-pins {
>>>>> +        bootph-pre-ram;
>>>>> +        pinctrl-single,pins = <
>>>>> +            J721E_WKUP_IOPAD(0x0cc, PIN_INPUT, 7) /* (G28) WKUP_GPIO0_7 */
>>>>> +        >;
>>>>> +    };
>>>>> +
>>>>>       mcu_cpsw_pins_default: mcu-cpsw-default-pins {
>>>>>           pinctrl-single,pins = <
>>>>>               J721E_WKUP_IOPAD(0x84, PIN_INPUT, 0) /* (B24) MCU_RGMII1_RD0 */
>>>>> @@ -560,6 +567,157 @@ eeprom@51 {
>>>>>           compatible = "atmel,24c512";
>>>>>           reg = <0x51>;
>>>>>       };
>>>>> +
>>>>> +    tps659413: pmic@48 {
>>>>> +        bootph-pre-ram;
>>>> only for the leaf nodes. See
>>>> https://libera.irclog.whitequark.org/armlinux/2023-10-19
>>>
>>>
>>> AFAIK, please correct me, u-boot still needs in all nodes ?
>>>
>>
>> That's what I believe as well, is it better to have only the leaf nodes in
>> kernel and have U-Boot DTSI handle the parent bootph properties? If so I'll
>> send out v10 making change accordingly.
>>
>
> Yes, u-boot today needs it in all nodes. BUT, u-boot needs to be fixed in
> line to obey the rules of the schema convention that Rob clarified in
> the discussion above.
>
> The other choice is NOT to introduce new bootph properties till u-boot
> is fixed up (this is also why I haven't sent out further updates for
> bootph properties for kernel in this cycle).
>

I think we can have it following kernel convention here and fix up in the U-Boot
DTSI for this series since PMIC nodes are needed. Thanks!

--
Thanking You
Neha Malcom Francis