Skip to contentSkip to conversation

samsung: board: init the s2mps11 pmic during booting time

PATCH Superseded Jaehoon Chung 2 participants 3 messages Jan 29, 2018 – Jan 30, 2018 1 message not in the archive Arm Samsung Exynos

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20180129045322epcas1p46ad80065361454354b7c5488d67a83d8@epcas1p4.samsung.com

#1 lore raw

PATCH v2 1/1 samsung: board: init the s2mps11 pmic during booting time

Exynos5422 board has s2mps11 pmic.
If CONFIG_PMIC_S2MPS11 is enabled, it can initialize PMIC and Regulators during booting time.

---
Changelog on V2:
- Fix the #endif location

 board/samsung/common/exynos5-dt.c | 4 ++++
 1 file changed, 4 insertions(+)
board/samsung/common/exynos5-dt.c +4 -0
index a4eb351405..862644b00e 100644
@@ -93,6 +93,9 @@ int exynos_power_init(void)
 	struct udevice *dev;
 	int ret;
 
+#ifdef CONFIG_PMIC_S2MPS11
+	ret = pmic_get("s2mps11_pmic", &dev);
+#else
 	ret = pmic_get("max77686", &dev);
 	if (!ret) {
 		/* TODO(sjg at chromium.org): Move into the clock/pmic API */
@@ -112,6 +115,7 @@ int exynos_power_init(void)
 			s5m8767_enable_32khz_cp(dev);
 #endif
 	}
+#endif	/* CONFIG_PMIC_S2MPS11 */
 	if (ret == -ENODEV)
 		return 0;
 
Signature · 1 line
2.15.1
#2 lore raw

PATCH v2 1/1 samsung: board: init the s2mps11 pmic during booting time

Hi Jaehoon,

Quoted 18 lines

Exynos5422 board has s2mps11 pmic.
If CONFIG_PMIC_S2MPS11 is enabled, it can initialize PMIC and Regulators during booting time.

---
Changelog on V2:
- Fix the #endif location

 board/samsung/common/exynos5-dt.c | 4 ++++
 1 file changed, 4 insertions(+)
(quoted diff) +0 -0

b/board/samsung/common/exynos5-dt.c index a4eb351405..862644b00e 100644 --- a/board/samsung/common/exynos5-dt.c
+++ b/board/samsung/common/exynos5-dt.c

board/samsung/common/exynos5-dt.c int exynos_power_init(void) · line 99

Quoted 7 lines
board/samsung/common/exynos5-dt.c +3 -0
@@ -93,6 +93,9 @@ int exynos_power_init(void)
 	struct udevice *dev;
 	int ret;
 
+#ifdef CONFIG_PMIC_S2MPS11
+	ret = pmic_get("s2mps11_pmic", &dev);
+#else
 	ret = pmic_get("max77686", &dev);

Cannot this be added to DT? We use #ifdefs in a file, which is supposed to parse DT config.

board/samsung/common/exynos5-dt.c int exynos_power_init(void) · line 120

Quoted 10 lines
(quoted diff) +0 -0
 	if (!ret) {
 		/* TODO(sjg at chromium.org): Move into the clock/pmic

API */ @@ -112,6 +115,7 @@ int exynos_power_init(void)

board/samsung/common/exynos5-dt.c +1 -0
 			s5m8767_enable_32khz_cp(dev);
 #endif
 	}
+#endif	/* CONFIG_PMIC_S2MPS11 */
 	if (ret == -ENODEV)
 		return 0;

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180129/66ef2569/attachment.sig>

#3 lore raw

PATCH v2 1/1 samsung: board: init the s2mps11 pmic during booting time

Quoted 23 lines · Lukasz Majewski

Hi Jaehoon,

Quoted 21 lines

Exynos5422 board has s2mps11 pmic.
If CONFIG_PMIC_S2MPS11 is enabled, it can initialize PMIC and Regulators during booting time.

---
Changelog on V2:
- Fix the #endif location

 board/samsung/common/exynos5-dt.c | 4 ++++
 1 file changed, 4 insertions(+)
(quoted diff) +0 -0

b/board/samsung/common/exynos5-dt.c index a4eb351405..862644b00e 100644 --- a/board/samsung/common/exynos5-dt.c
+++ b/board/samsung/common/exynos5-dt.c

board/samsung/common/exynos5-dt.c +0 -0
@@ -93,6 +93,9 @@ int exynos_power_init(void)
 	struct udevice *dev;
 	int ret;
 
Quoted 7 lines

board/samsung/common/exynos5-dt.c int exynos_power_init(void) · line 99

Quoted 4 lines
board/samsung/common/exynos5-dt.c +3 -0
+#ifdef CONFIG_PMIC_S2MPS11
+	ret = pmic_get("s2mps11_pmic", &dev);
+#else
 	ret = pmic_get("max77686", &dev);

Cannot this be added to DT? We use #ifdefs in a file, which is supposed to parse DT config.

Will do.

Best Regards,
Jaehoon Chung

Quoted 23 lines

board/samsung/common/exynos5-dt.c int exynos_power_init(void) · line 120

Quoted 11 lines
(quoted diff) +0 -0
 	if (!ret) {
 		/* TODO(sjg at chromium.org): Move into the clock/pmic

API */ @@ -112,6 +115,7 @@ int exynos_power_init(void)

board/samsung/common/exynos5-dt.c +1 -0
 			s5m8767_enable_32khz_cp(dev);
 #endif
 	}
+#endif	/* CONFIG_PMIC_S2MPS11 */
 	if (ret == -ENODEV)
 		return 0;

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de