2023-07-27 13:59:31

by Esteban Blanc

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

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]>
---
arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi | 199 +++++++++++++++++++
1 file changed, 199 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 d57dd43da0ef..5348aafe3277 100644
--- a/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi
@@ -61,6 +61,15 @@ J721S2_WKUP_IOPAD(0x004, PIN_INPUT, 0) /* (E20) MCU_OSPI0_LBCLKO */
};
};

+&wkup_pmx1 {
+ pmic_irq_pins_default: pmic-irq-pins-default {
+ pinctrl-single,pins = <
+ /* (C21) MCU_OSPI1_CSn1.WKUP_GPIO0_39 */
+ J721S2_WKUP_IOPAD(0x28, PIN_INPUT, 7)
+ >;
+ };
+};
+
&wkup_pmx2 {
wkup_i2c0_pins_default: wkup-i2c0-default-pins {
pinctrl-single,pins = <
@@ -97,6 +106,196 @@ eeprom@50 {
compatible = "atmel,24c256";
reg = <0x50>;
};
+
+ tps659411: pmic@48 {
+ 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 {
+ bucka1234: buck1234 {
+ 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.38.5



2023-08-03 11:42:14

by Vaishnav Achath

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



On 03/08/23 16:01, Kumar, Udit wrote:
> Hi Esteban
>

Hi Esteban, Udit,

>> [...]
>> Signed-off-by: Esteban Blanc <[email protected]>
>> ---
>> arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi | 199 +++++++++++++++++++
>> 1 file changed, 199 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 d57dd43da0ef..5348aafe3277 100644
>> --- a/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi
>> +++ b/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi
>> @@ -61,6 +61,15 @@ J721S2_WKUP_IOPAD(0x004, PIN_INPUT, 0) /* (E20)
>> MCU_OSPI0_LBCLKO */
>> };
>> };
>>
>> +&wkup_pmx1 {
>> + pmic_irq_pins_default: pmic-irq-pins-default {
>> + pinctrl-single,pins = <
>> + /* (C21) MCU_OSPI1_CSn1.WKUP_GPIO0_39 */
>> + J721S2_WKUP_IOPAD(0x28, PIN_INPUT, 7)
>> + >;
>
> I see, this pin is getting shared with OSPI-1 .
> I think either OSPI or PMIC could be functional at one time ?
>

OSPI CS1 is not being used, so the corresponding entry under OSPI1 can be removed.

Thanks and Regards,
Vaishnav

>> + };
>> +};
>> +
>> [...]
>

2023-08-03 11:54:15

by Kumar, Udit

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

Hi Esteban

> [...]
>Signed-off-by: Esteban Blanc <[email protected]>
>---
> arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi | 199 +++++++++++++++++++
> 1 file changed, 199 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 d57dd43da0ef..5348aafe3277 100644
>--- a/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi
>+++ b/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi
>@@ -61,6 +61,15 @@ J721S2_WKUP_IOPAD(0x004, PIN_INPUT, 0) /* (E20)
>MCU_OSPI0_LBCLKO */
> };
> };
>
>+&wkup_pmx1 {
>+ pmic_irq_pins_default: pmic-irq-pins-default {
>+ pinctrl-single,pins = <
>+ /* (C21) MCU_OSPI1_CSn1.WKUP_GPIO0_39 */
>+ J721S2_WKUP_IOPAD(0x28, PIN_INPUT, 7)
>+ >;

I see, this pin is getting shared with OSPI-1 .
I think either OSPI or PMIC could be functional at one time ?

>+ };
>+};
>+
> [...]


2023-08-03 14:05:34

by Kumar, Udit

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

Thanks Vaishnav

On 8/3/2023 4:43 PM, Vaishnav Achath wrote:
>
> On 03/08/23 16:01, Kumar, Udit wrote:
>> Hi Esteban
>>
> Hi Esteban, Udit,
>
>>> [...]
>>> Signed-off-by: Esteban Blanc <[email protected]>
>>> ---
>>> arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi | 199 +++++++++++++++++++
>>> 1 file changed, 199 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 d57dd43da0ef..5348aafe3277 100644
>>> --- a/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi
>>> +++ b/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi
>>> @@ -61,6 +61,15 @@ J721S2_WKUP_IOPAD(0x004, PIN_INPUT, 0) /* (E20)
>>> MCU_OSPI0_LBCLKO */
>>> };
>>> };
>>>
>>> +&wkup_pmx1 {
>>> + pmic_irq_pins_default: pmic-irq-pins-default {
>>> + pinctrl-single,pins = <
>>> + /* (C21) MCU_OSPI1_CSn1.WKUP_GPIO0_39 */
>>> + J721S2_WKUP_IOPAD(0x28, PIN_INPUT, 7)
>>> + >;
>> I see, this pin is getting shared with OSPI-1 .
>> I think either OSPI or PMIC could be functional at one time ?
>>
> OSPI CS1 is not being used, so the corresponding entry under OSPI1 can be removed.


let me handle this in on going series

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

> Thanks and Regards,
> Vaishnav
>
>>> + };
>>> +};
>>> +
>>> [...]