2023-12-05 09:36:19

by Neha Malcom Francis

[permalink] [raw]
Subject: [PATCH v9 5/7] arm64: dts: ti: k3-am69-sk: Add support for TPS6594 PMIC

This patch adds support for TPS6594 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: Neha Malcom Francis <[email protected]>
Tested-by: Manorit Chawdhry <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am69-sk.dts | 100 ++++++++++++++++++++++++++
1 file changed, 100 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am69-sk.dts b/arch/arm64/boot/dts/ti/k3-am69-sk.dts
index 9868c7049bfb..dec27acb4e96 100644
--- a/arch/arm64/boot/dts/ti/k3-am69-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am69-sk.dts
@@ -431,6 +431,17 @@ J784S4_IOPAD(0x000, PIN_INPUT, 7) /* (AN35) EXTINTN.GPIO0_0 */
};
};

+&wkup_pmx1 {
+ status = "okay";
+
+ pmic_irq_pins_default: pmic-irq-default-pins {
+ pinctrl-single,pins = <
+ /* (AA37) MCU_ADC1_AIN4.WKUP_GPIO0_83 */
+ J784S4_WKUP_IOPAD(0x12c, PIN_INPUT, 7)
+ >;
+ };
+};
+
&wkup_pmx2 {
bootph-all;
wkup_uart0_pins_default: wkup-uart0-default-pins {
@@ -631,6 +642,95 @@ eeprom@51 {
compatible = "atmel,24c512";
reg = <0x51>;
};
+
+ 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;
+ };
+ };
+ };
};

&wkup_gpio0 {
--
2.34.1


2023-12-07 04:59:33

by Kumar, Udit

[permalink] [raw]
Subject: Re: [PATCH v9 5/7] arm64: dts: ti: k3-am69-sk: Add support for TPS6594 PMIC


On 12/5/2023 3:04 PM, Neha Malcom Francis wrote:
> This patch adds support for TPS6594 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: Neha Malcom Francis <[email protected]>
> Tested-by: Manorit Chawdhry <[email protected]>
> ---
> arch/arm64/boot/dts/ti/k3-am69-sk.dts | 100 ++++++++++++++++++++++++++
> 1 file changed, 100 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/ti/k3-am69-sk.dts b/arch/arm64/boot/dts/ti/k3-am69-sk.dts
> index 9868c7049bfb..dec27acb4e96 100644
> --- a/arch/arm64/boot/dts/ti/k3-am69-sk.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am69-sk.dts
> @@ -431,6 +431,17 @@ J784S4_IOPAD(0x000, PIN_INPUT, 7) /* (AN35) EXTINTN.GPIO0_0 */
> };
> };
>
> +&wkup_pmx1 {
> + status = "okay";
> +
> + pmic_irq_pins_default: pmic-irq-default-pins {
> + pinctrl-single,pins = <
> + /* (AA37) MCU_ADC1_AIN4.WKUP_GPIO0_83 */
> + J784S4_WKUP_IOPAD(0x12c, PIN_INPUT, 7)
> + >;
> + };
> +};

Could you re check this pin mux

wkup_pmx1 is defined as reg = <0x00 0x4301c038 0x00 0x02c>;

LTM, this is above wrt given size


> +
> &wkup_pmx2 {
> bootph-all;
> wkup_uart0_pins_default: wkup-uart0-default-pins {
> @@ -631,6 +642,95 @@ eeprom@51 {
> compatible = "atmel,24c512";
> reg = <0x51>;
> };
> +
> + 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;
> + };
> + };
> + };
> };
>
> &wkup_gpio0 {

2023-12-07 05:11:58

by Neha Malcom Francis

[permalink] [raw]
Subject: Re: [PATCH v9 5/7] arm64: dts: ti: k3-am69-sk: Add support for TPS6594 PMIC

Hi Udit,

On 07/12/23 10:29, Kumar, Udit wrote:
>
> On 12/5/2023 3:04 PM, Neha Malcom Francis wrote:
>> This patch adds support for TPS6594 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: Neha Malcom Francis <[email protected]>
>> Tested-by: Manorit Chawdhry <[email protected]>
>> ---
>>   arch/arm64/boot/dts/ti/k3-am69-sk.dts | 100 ++++++++++++++++++++++++++
>>   1 file changed, 100 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/ti/k3-am69-sk.dts
>> b/arch/arm64/boot/dts/ti/k3-am69-sk.dts
>> index 9868c7049bfb..dec27acb4e96 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am69-sk.dts
>> +++ b/arch/arm64/boot/dts/ti/k3-am69-sk.dts
>> @@ -431,6 +431,17 @@ J784S4_IOPAD(0x000, PIN_INPUT, 7) /* (AN35)
>> EXTINTN.GPIO0_0 */
>>       };
>>   };
>> +&wkup_pmx1 {
>> +    status = "okay";
>> +
>> +    pmic_irq_pins_default: pmic-irq-default-pins {
>> +        pinctrl-single,pins = <
>> +            /* (AA37) MCU_ADC1_AIN4.WKUP_GPIO0_83 */
>> +            J784S4_WKUP_IOPAD(0x12c, PIN_INPUT, 7)
>> +        >;
>> +    };
>> +};
>
> Could you re check this pin mux
>
> wkup_pmx1 is defined as reg = <0x00 0x4301c038 0x00 0x02c>;
>
> LTM, this is above wrt given size
>

You're right it must be in wkup_pmx2. Thanks for catching this!

>
>> +
>>   &wkup_pmx2 {
>>       bootph-all;
>>       wkup_uart0_pins_default: wkup-uart0-default-pins {
>> @@ -631,6 +642,95 @@ eeprom@51 {
>>           compatible = "atmel,24c512";
>>           reg = <0x51>;
>>       };
>> +
>> +    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;
>> +            };
>> +        };
>> +    };
>>   };
>>   &wkup_gpio0 {

--
Thanking You
Neha Malcom Francis