[U-Boot] [PATCH v9 2/2] S5P: Exynos: Config: Enable Generic GPIO and CMD configs

Akshay Saraswat akshay.s at samsung.com
Mon Apr 21 16:25:19 CEST 2014


Enabling configs for GPIO CMD and Generic GPIO in case
of S5P and Exynos target boards.
Also, doing modifications in the config definitions
wherever required due to change in gpio macros
pin numbering enums.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s at samsung.com>
Signed-off-by: Akshay Saraswat <akshay.s at samsung.com>
---
 include/configs/arndale.h           |    1 +
 include/configs/exynos5-dt.h        |    3 +++
 include/configs/origen.h            |    1 +
 include/configs/s5p_goni.h          |    5 +++--
 include/configs/s5pc210_universal.h |   17 +++++++++--------
 include/configs/smdkc100.h          |    1 +
 include/configs/smdkv310.h          |    2 ++
 include/configs/trats.h             |    9 +++++----
 include/configs/trats2.h            |    5 +++--
 9 files changed, 28 insertions(+), 16 deletions(-)

diff --git a/include/configs/arndale.h b/include/configs/arndale.h
index 515facf..d237a83 100644
--- a/include/configs/arndale.h
+++ b/include/configs/arndale.h
@@ -249,4 +249,5 @@
 /* Enable Time Command */
 #define CONFIG_CMD_TIME
 
+#define HAVE_GENERIC_GPIO
 #endif	/* __CONFIG_H */
diff --git a/include/configs/exynos5-dt.h b/include/configs/exynos5-dt.h
index 414db42..e81b5cd 100644
--- a/include/configs/exynos5-dt.h
+++ b/include/configs/exynos5-dt.h
@@ -288,4 +288,7 @@
 
 #define CONFIG_CMD_BOOTZ
 
+#define HAVE_GENERIC_GPIO
+#define CONFIG_CMD_GPIO
+
 #endif	/* __CONFIG_H */
diff --git a/include/configs/origen.h b/include/configs/origen.h
index 8258338..8fdb5b7 100644
--- a/include/configs/origen.h
+++ b/include/configs/origen.h
@@ -95,4 +95,5 @@
 #define BL2_START_OFFSET	((CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)/512)
 #define BL2_SIZE_BLOC_COUNT	(COPY_BL2_SIZE/512)
 
+#define HAVE_GENERIC_GPIO
 #endif	/* __CONFIG_H */
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index 991c43e..80e52dd 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -214,8 +214,8 @@
 /*
  * I2C Settings
  */
-#define CONFIG_SOFT_I2C_GPIO_SCL s5pc110_gpio_get(j4, 3)
-#define CONFIG_SOFT_I2C_GPIO_SDA s5pc110_gpio_get(j4, 0)
+#define CONFIG_SOFT_I2C_GPIO_SCL s5p_gpio_get(S5PC110_GPIO_J43)
+#define CONFIG_SOFT_I2C_GPIO_SDA s5p_gpio_get(S5PC110_GPIO_J40)
 
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_I2C_SOFT		/* I2C bit-banged */
@@ -227,4 +227,5 @@
 #define CONFIG_USB_GADGET_S3C_UDC_OTG
 #define CONFIG_USB_GADGET_DUALSPEED
 
+#define HAVE_GENERIC_GPIO
 #endif	/* __CONFIG_H */
diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h
index 2da8871..06f389c 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -170,8 +170,8 @@
 /*
  * I2C Settings
  */
-#define CONFIG_SOFT_I2C_GPIO_SCL exynos4_gpio_get(1, b, 7)
-#define CONFIG_SOFT_I2C_GPIO_SDA exynos4_gpio_get(1, b, 6)
+#define CONFIG_SOFT_I2C_GPIO_SCL exynos_gpio_get(1, EXYNOS4_GPIO_B7)
+#define CONFIG_SOFT_I2C_GPIO_SDA exynos_gpio_get(1, EXYNOS4_GPIO_B6)
 
 #define CONFIG_CMD_I2C
 
@@ -196,10 +196,10 @@
  */
 #define CONFIG_SOFT_SPI
 #define CONFIG_SOFT_SPI_MODE SPI_MODE_3
-#define CONFIG_SOFT_SPI_GPIO_SCLK exynos4_gpio_get(2, y3, 1)
-#define CONFIG_SOFT_SPI_GPIO_MOSI exynos4_gpio_get(2, y3, 3)
-#define CONFIG_SOFT_SPI_GPIO_MISO exynos4_gpio_get(2, y3, 0)
-#define CONFIG_SOFT_SPI_GPIO_CS exynos4_gpio_get(2, y4, 3)
+#define CONFIG_SOFT_SPI_GPIO_SCLK exynos_gpio_get(2, EXYNOS4_GPIO_Y31)
+#define CONFIG_SOFT_SPI_GPIO_MOSI exynos_gpio_get(2, EXYNOS4_GPIO_Y33)
+#define CONFIG_SOFT_SPI_GPIO_MISO exynos_gpio_get(2, EXYNOS4_GPIO_Y30)
+#define CONFIG_SOFT_SPI_GPIO_CS exynos_gpio_get(2, EXYNOS4_GPIO_Y43)
 
 #define SPI_DELAY udelay(1)
 #undef SPI_INIT
@@ -231,8 +231,8 @@ int universal_spi_read(void);
 #define KEY_PWR_INTERRUPT_REG		MAX8998_REG_IRQ1
 #define KEY_PWR_INTERRUPT_MASK		(1 << 7)
 
-#define KEY_VOL_UP_GPIO			exynos4_gpio_get(2, x2, 0)
-#define KEY_VOL_DOWN_GPIO		exynos4_gpio_get(2, x2, 1)
+#define KEY_VOL_UP_GPIO			exynos_gpio_get(2, EXYNOS4_GPIO_X20)
+#define KEY_VOL_DOWN_GPIO		exynos_gpio_get(2, EXYNOS4_GPIO_X21)
 #endif /* __ASSEMBLY__ */
 
 /* LCD console */
@@ -253,4 +253,5 @@ int universal_spi_read(void);
 #define LCD_XRES	480
 #define LCD_YRES	800
 
+#define HAVE_GENERIC_GPIO
 #endif	/* __CONFIG_H */
diff --git a/include/configs/smdkc100.h b/include/configs/smdkc100.h
index c9a2e15..161dd9e 100644
--- a/include/configs/smdkc100.h
+++ b/include/configs/smdkc100.h
@@ -217,4 +217,5 @@
 #define CONFIG_ENV_SROM_BANK   3       /* Select SROM Bank-3 for Ethernet*/
 #endif /* CONFIG_CMD_NET */
 
+#define HAVE_GENERIC_GPIO
 #endif	/* __CONFIG_H */
diff --git a/include/configs/smdkv310.h b/include/configs/smdkv310.h
index 1388f49..61b5f35 100644
--- a/include/configs/smdkv310.h
+++ b/include/configs/smdkv310.h
@@ -12,6 +12,7 @@
 /* High Level Configuration Options */
 #define CONFIG_SAMSUNG			1	/* in a SAMSUNG core */
 #define CONFIG_S5P			1	/* S5P Family */
+#define CONFIG_EXYNOS4				/* EXYNOS4 Family */
 #define CONFIG_EXYNOS4210		1	/* which is a EXYNOS4210 SoC */
 #define CONFIG_SMDKV310			1	/* working with SMDKV310*/
 
@@ -148,4 +149,5 @@
 
 /* Enable devicetree support */
 #define CONFIG_OF_LIBFDT
+#define HAVE_GENERIC_GPIO
 #endif	/* __CONFIG_H */
diff --git a/include/configs/trats.h b/include/configs/trats.h
index 5d8bd60..7b84bd7 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -207,8 +207,8 @@
 #define CONFIG_SYS_I2C_INIT_BOARD
 
 /* I2C FG */
-#define CONFIG_SOFT_I2C_GPIO_SCL exynos4_gpio_get(2, y4, 1)
-#define CONFIG_SOFT_I2C_GPIO_SDA exynos4_gpio_get(2, y4, 0)
+#define CONFIG_SOFT_I2C_GPIO_SCL exynos_gpio_get(2, EXYNOS4_GPIO_Y41)
+#define CONFIG_SOFT_I2C_GPIO_SDA exynos_gpio_get(2, EXYNOS4_GPIO_Y40)
 
 /* POWER */
 #define CONFIG_POWER
@@ -245,8 +245,8 @@
 #define KEY_PWR_INTERRUPT_REG		MAX8997_REG_INT1
 #define KEY_PWR_INTERRUPT_MASK		(1 << 0)
 
-#define KEY_VOL_UP_GPIO			exynos4_gpio_get(2, x2, 0)
-#define KEY_VOL_DOWN_GPIO		exynos4_gpio_get(2, x2, 1)
+#define KEY_VOL_UP_GPIO			exynos_gpio_get(2, EXYNOS4_GPIO_X20)
+#define KEY_VOL_DOWN_GPIO		exynos_gpio_get(2, EXYNOS4_GPIO_X21)
 #endif /* __ASSEMBLY__ */
 
 /* LCD console */
@@ -267,4 +267,5 @@
 #define LCD_XRES	720
 #define LCD_YRES	1280
 
+#define HAVE_GENERIC_GPIO
 #endif	/* __CONFIG_H */
diff --git a/include/configs/trats2.h b/include/configs/trats2.h
index 53d449c..71f5e97 100644
--- a/include/configs/trats2.h
+++ b/include/configs/trats2.h
@@ -227,8 +227,8 @@ int get_soft_i2c_sda_pin(void);
 #define KEY_PWR_INTERRUPT_REG		MAX77686_REG_PMIC_INT1
 #define KEY_PWR_INTERRUPT_MASK		(1 << 1)
 
-#define KEY_VOL_UP_GPIO			exynos4x12_gpio_get(2, x2, 2)
-#define KEY_VOL_DOWN_GPIO		exynos4x12_gpio_get(2, x3, 3)
+#define KEY_VOL_UP_GPIO			exynos_gpio_get(2, EXYNOS4X12_GPIO_X22)
+#define KEY_VOL_DOWN_GPIO		exynos_gpio_get(2, EXYNOS4X12_GPIO_X33)
 #endif /* __ASSEMBLY__ */
 
 /* LCD console */
@@ -249,4 +249,5 @@ int get_soft_i2c_sda_pin(void);
 #define LCD_XRES	720
 #define LCD_YRES	1280
 
+#define HAVE_GENERIC_GPIO
 #endif	/* __CONFIG_H */
-- 
1.7.9.5



More information about the U-Boot mailing list