2022-07-19 09:20:43

by jerome Neanne

[permalink] [raw]
Subject: [PATCH v1 11/14] arm64: dts: ti: Add TI TPS65219 PMIC support for AM642 SK board.

Add support fot the TI Power Management IC TPS65219
on the AM642 SKEVM board

Signed-off-by: Jerome Neanne <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am642-sk.dts | 104 +++++++++++++++++++++++++
1 file changed, 104 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am642-sk.dts b/arch/arm64/boot/dts/ti/k3-am642-sk.dts
index 59f506cbd275..4daf55b9d61a 100644
--- a/arch/arm64/boot/dts/ti/k3-am642-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am642-sk.dts
@@ -150,6 +150,20 @@
vin-supply = <&com8_ls_en>;
gpio = <&main_gpio0 48 GPIO_ACTIVE_HIGH>;
};
+
+ vsel_sd_nddr: gpio-regulator {
+ compatible = "regulator-gpio";
+ pinctrl-names = "default";
+ pinctrl-0 = <&vsel_sd_nddr_pins_default>;
+ regulator-name = "tps65219-LDO1-SEL-SD";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ vin-supply = <&ldo1_reg>;
+ gpios = <&main_gpio0 45 GPIO_ACTIVE_HIGH>;
+ states = <1800000 0x0>,
+ <3300000 0x1>;
+ };
};

&main_pmx0 {
@@ -172,6 +186,13 @@
>;
};

+ main_i2c0_pins_default: main-i2c0-pins-default {
+ pinctrl-single,pins = <
+ AM64X_IOPAD(0x0260, PIN_INPUT_PULLUP, 0) /* (A18) I2C0_SCL */
+ AM64X_IOPAD(0x0264, PIN_INPUT_PULLUP, 0) /* (B18) I2C0_SDA */
+ >;
+ };
+
main_i2c1_pins_default: main-i2c1-pins-default {
pinctrl-single,pins = <
AM64X_IOPAD(0x0268, PIN_INPUT_PULLUP, 0) /* (C18) I2C1_SCL */
@@ -258,6 +279,12 @@
AM64X_IOPAD(0x00bc, PIN_INPUT, 7) /* (U8) GPIO0_46 */
>;
};
+
+ vsel_sd_nddr_pins_default: vsel-sd-nddr-pins-default {
+ pinctrl-single,pins = <
+ AM64X_IOPAD(0x00b8, PIN_INPUT, 7) /* (Y7) PRG1_PRU0_GPO0.GPIO0_45 */
+ >;
+ };
};

&mcu_uart0 {
@@ -301,6 +328,83 @@
status = "disabled";
};

+&main_i2c0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_i2c0_pins_default>;
+ clock-frequency = <400000>;
+ status = "okay";
+
+ tps65219: pmic@30 {
+ compatible = "ti,tps65219";
+ reg = <0x30>;
+ system-power-controller;
+
+ buck1-supply = <&vcc_3v3_sys>;
+ buck2-supply = <&vcc_3v3_sys>;
+ buck3-supply = <&vcc_3v3_sys>;
+ ldo1-supply = <&vcc_3v3_sys>;
+ ldo2-supply = <&buck2_reg>;
+ ldo3-supply = <&vcc_3v3_sys>;
+ ldo4-supply = <&vcc_3v3_sys>;
+
+ regulators {
+ buck1_reg: buck1 {
+ regulator-name = "VDD_CORE";
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <1000000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ buck2_reg: buck2 {
+ regulator-name = "VCC1V8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ buck3_reg: buck3 {
+ regulator-name = "VDD_LPDDR4";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldo1_reg: ldo1 {
+ regulator-name = "VDDSHV_SD_IO_PMIC";
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-allow-bypass;
+ };
+
+ ldo2_reg: ldo2 {
+ regulator-name = "VDDAR_CORE";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldo3_reg: ldo3 {
+ regulator-name = "VDDA_1V8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ ldo4_reg: ldo4 {
+ regulator-name = "VDD_PHY_2V5";
+ regulator-min-microvolt = <2500000>;
+ regulator-max-microvolt = <2500000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+ };
+ };
+};
&main_i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&main_i2c1_pins_default>;
--
2.17.1


2022-07-19 13:58:38

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH v1 11/14] arm64: dts: ti: Add TI TPS65219 PMIC support for AM642 SK board.

On 11:17-20220719, Jerome Neanne wrote:
> Add support fot the TI Power Management IC TPS65219
> on the AM642 SKEVM board
>
> Signed-off-by: Jerome Neanne <[email protected]>
> ---

> arch/arm64/boot/dts/ti/k3-am642-sk.dts | 104 +++++++++++++++++++++++++
> 1 file changed, 104 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/ti/k3-am642-sk.dts b/arch/arm64/boot/dts/ti/k3-am642-sk.dts
> index 59f506cbd275..4daf55b9d61a 100644
> --- a/arch/arm64/boot/dts/ti/k3-am642-sk.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am642-sk.dts
> @@ -150,6 +150,20 @@
> vin-supply = <&com8_ls_en>;
> gpio = <&main_gpio0 48 GPIO_ACTIVE_HIGH>;
> };
> +
> + vsel_sd_nddr: gpio-regulator {
> + compatible = "regulator-gpio";
> + pinctrl-names = "default";
> + pinctrl-0 = <&vsel_sd_nddr_pins_default>;
> + regulator-name = "tps65219-LDO1-SEL-SD";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-boot-on;
> + vin-supply = <&ldo1_reg>;
> + gpios = <&main_gpio0 45 GPIO_ACTIVE_HIGH>;
> + states = <1800000 0x0>,
> + <3300000 0x1>;
> + };
> };
>
> &main_pmx0 {
> @@ -172,6 +186,13 @@
> >;
> };
>
> + main_i2c0_pins_default: main-i2c0-pins-default {
> + pinctrl-single,pins = <
> + AM64X_IOPAD(0x0260, PIN_INPUT_PULLUP, 0) /* (A18) I2C0_SCL */
> + AM64X_IOPAD(0x0264, PIN_INPUT_PULLUP, 0) /* (B18) I2C0_SDA */
> + >;
> + };
> +
> main_i2c1_pins_default: main-i2c1-pins-default {
> pinctrl-single,pins = <
> AM64X_IOPAD(0x0268, PIN_INPUT_PULLUP, 0) /* (C18) I2C1_SCL */
> @@ -258,6 +279,12 @@
> AM64X_IOPAD(0x00bc, PIN_INPUT, 7) /* (U8) GPIO0_46 */
> >;
> };
> +
> + vsel_sd_nddr_pins_default: vsel-sd-nddr-pins-default {
> + pinctrl-single,pins = <
> + AM64X_IOPAD(0x00b8, PIN_INPUT, 7) /* (Y7) PRG1_PRU0_GPO0.GPIO0_45 */
> + >;
> + };
> };
>
> &mcu_uart0 {
> @@ -301,6 +328,83 @@
> status = "disabled";
> };
>
> +&main_i2c0 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&main_i2c0_pins_default>;
> + clock-frequency = <400000>;
> + status = "okay";
> +
> + tps65219: pmic@30 {

Am I missing something?
https://www.ti.com/tool/SK-AM64#design-files
https://www.ti.com/lit/df/sprr432/sprr432.pdf
Page 11:
I see TPS6521815 at address 0x24, nothing in 0x30?

> + compatible = "ti,tps65219";
> + reg = <0x30>;
> + system-power-controller;
> +
> + buck1-supply = <&vcc_3v3_sys>;
> + buck2-supply = <&vcc_3v3_sys>;
> + buck3-supply = <&vcc_3v3_sys>;
> + ldo1-supply = <&vcc_3v3_sys>;
> + ldo2-supply = <&buck2_reg>;
> + ldo3-supply = <&vcc_3v3_sys>;
> + ldo4-supply = <&vcc_3v3_sys>;
> +
> + regulators {
> + buck1_reg: buck1 {
> + regulator-name = "VDD_CORE";
> + regulator-min-microvolt = <750000>;
> + regulator-max-microvolt = <1000000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + buck2_reg: buck2 {
> + regulator-name = "VCC1V8";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + buck3_reg: buck3 {
> + regulator-name = "VDD_LPDDR4";
> + regulator-min-microvolt = <1100000>;
> + regulator-max-microvolt = <1100000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + ldo1_reg: ldo1 {
> + regulator-name = "VDDSHV_SD_IO_PMIC";
> + regulator-min-microvolt = <1000000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-allow-bypass;
> + };
> +
> + ldo2_reg: ldo2 {
> + regulator-name = "VDDAR_CORE";
> + regulator-min-microvolt = <850000>;
> + regulator-max-microvolt = <850000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + ldo3_reg: ldo3 {
> + regulator-name = "VDDA_1V8";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + ldo4_reg: ldo4 {
> + regulator-name = "VDD_PHY_2V5";
> + regulator-min-microvolt = <2500000>;
> + regulator-max-microvolt = <2500000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> + };
> + };
> +};
> &main_i2c1 {
> pinctrl-names = "default";
> pinctrl-0 = <&main_i2c1_pins_default>;
> --
> 2.17.1
>

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

2022-07-19 14:06:19

by Nishanth Menon

[permalink] [raw]
Subject: Re: [PATCH v1 11/14] arm64: dts: ti: Add TI TPS65219 PMIC support for AM642 SK board.

On 15:11-20220719, J?r?me Neanne wrote:
> > > +&main_i2c0 {
> > > + pinctrl-names = "default";
> > > + pinctrl-0 = <&main_i2c0_pins_default>;
> > > + clock-frequency = <400000>;
> > > + status = "okay";
> > > +
> > > + tps65219: pmic@30 {
> >
> > Am I missing something?
> > https://www.ti.com/tool/SK-AM64#design-files
> > https://www.ti.com/lit/df/sprr432/sprr432.pdf
> > Page 11:
> > I see TPS6521815 at address 0x24, nothing in 0x30?
> >
> TI provides me a preliminary spec for TPS65219 where it is stated:
> "7.3.8 I 2 C Serial Interface (SDA and SCL)
> The TPS65219 hosts a slave I2C interface that supports I2C-bus data
> transfers in Standard-mode (100 kbit/s),
> Fast-mode (400 kbit/s) and Fast-mode plus (1 Mbit/s).
> The default I2C-adress is 0x30, but can be changed if needed, e.g. for
> multi-PMIC-operation."
>
> Don't know when the spec will be released publically
>

Please do not top post.

https://www.ti.com/product/TPS65219 - the PMIC is public for sure. I am
not complaining about that.

What the I was commenting is that the AM64-SK device tree you are
modifying does'nt have the said PMIC. If this is a custom board, then
lets not upstream such a board. If another board is supposed to contain
it, lets enable the PMIC in the corresponding board.

That does'nt negate the entire series, just the device tree patches as
provided in this series is invalid - I have no intent of picking up
patches that will break everyone's am64-sk boards.

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