Patchwork [U-Boot] misc:pmic:samsung Enable PMIC driver at C210 Universal target

login
register
mail settings
Submitter Łukasz Majewski
Date Oct. 27, 2011, 8:33 a.m.
Message ID <1319704397-8048-1-git-send-email-l.majewski@samsung.com>
Download mbox | patch
Permalink /patch/122078/
State Accepted
Commit 2427f5d511f9f7a8758de986191ec1e2176892f3
Delegated to: Minkyu Kang
Headers show

Comments

Łukasz Majewski - Oct. 27, 2011, 8:33 a.m.
Enable support for PMIC driver at C210 Universal reference target.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
---
Depend on: "New generic PMIC framework"

http://patchwork.ozlabs.org/patch/118071/
http://patchwork.ozlabs.org/patch/117565/
http://patchwork.ozlabs.org/patch/117563/

 ./tools/checkpatch.pl -
total: 0 errors, 0 warnings, 38 lines checked
---
 board/samsung/universal_c210/universal.c |    5 +++++
 include/configs/s5pc210_universal.h      |   17 +++++++++++++++++
 2 files changed, 22 insertions(+), 0 deletions(-)
Minkyu Kang - Oct. 28, 2011, 8:10 a.m.
Dear Lukasz Majewski,

On 10/27/2011 05:33 PM, Lukasz Majewski wrote:
> Enable support for PMIC driver at C210 Universal reference target.
> 
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Minkyu Kang <mk7.kang@samsung.com>
> ---
> Depend on: "New generic PMIC framework"
> 
> http://patchwork.ozlabs.org/patch/118071/
> http://patchwork.ozlabs.org/patch/117565/
> http://patchwork.ozlabs.org/patch/117563/
> 
>  ./tools/checkpatch.pl -
> total: 0 errors, 0 warnings, 38 lines checked
> ---
>  board/samsung/universal_c210/universal.c |    5 +++++
>  include/configs/s5pc210_universal.h      |   17 +++++++++++++++++
>  2 files changed, 22 insertions(+), 0 deletions(-)
> 

applied to u-boot-samsung.

Thanks.
Minkyu Kang.

Patch

diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
index 1b27e8b..d767eaa 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -27,6 +27,7 @@ 
 #include <asm/arch/adc.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/mmc.h>
+#include <pmic.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -57,6 +58,10 @@  int board_init(void)
 	check_hw_revision();
 	printf("HW Revision:\t0x%x\n", board_rev);
 
+#if defined(CONFIG_PMIC)
+	pmic_init();
+#endif
+
 	return 0;
 }
 
diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h
index ff85ade..cc14f97 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -245,4 +245,21 @@ 
 
 #define CONFIG_SYS_CACHELINE_SIZE       32
 
+#include <asm/arch/gpio.h>
+/*
+ * I2C Settings
+ */
+#define CONFIG_SOFT_I2C_GPIO_SCL s5pc210_gpio_part1_get_nr(b, 7)
+#define CONFIG_SOFT_I2C_GPIO_SDA s5pc210_gpio_part1_get_nr(b, 6)
+
+#define CONFIG_SOFT_I2C
+#define CONFIG_SOFT_I2C_READ_REPEATED_START
+#define CONFIG_SYS_I2C_SPEED	50000
+#define CONFIG_I2C_MULTI_BUS
+#define CONFIG_SYS_MAX_I2C_BUS	7
+
+#define CONFIG_PMIC
+#define CONFIG_PMIC_I2C
+#define CONFIG_PMIC_MAX8998
+
 #endif	/* __CONFIG_H */