Skip to contentSkip to conversation

samsung: Use common config files with Samsung boards

PATCH Superseded Simon Glass 2 participants 22 messages Oct 2, 2014 – Oct 8, 2014

Subsystems (3)

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v5 cover samsung: Use common config files with Samsung boards

This series tries to unify the Samsung board configs into a few header files for exynos5 and exynos4.

The purpose is to make it easier to move to driver model. In that case I would like things like the GPIO drivers and serial drivers to work in a standard way, and not need to support device tree and platform data at the same time. That would be quite painful.

Another reason is that the Chrome OS EC drivers are currently included in boards that don't have a Chrome OS EC. This concern was raised by the Samsung maintainer (Minkyu) a while back.

There are still a few boards that don't use CONFIG_OF_CONTROL so I have updated these rudimentary of device tree files based on feedback.

This series has the side-effect of getting the EC interface working properly on Pit, so the keyboard works. It also provides access to the TPS65090 PMIC, which means that the backlight is enabled.

Changes in v5:
- Rebase on top of samsung/master

Changes in v4:
- Address review nits from Minkyu
- Make this driver more like the one it came from
- Rebase on top of master (CONFIG_OF settings moved to Kconfig)
- Remove special FET_ERR_NOT_READY etc. as use standard errors

Changes in v3:
- Adjust device tree file based on Robert Baldyga's example

Changes in v2:
- Add new patch to enable keyboard on pit
- Add new patch to split out cros_ec drivers
- Add new patch to use 900MHz ARM frequeny in SPL for peach_pit
- Avoid using a common file, and just add a device tree
- Don't enable the cros_ec on smdk5420
- Fix 'cashe' typo in commit subject
- Fix device tree base addresses
- Leave CONFIG_SERIAL3 in the individual board files
- Leave in a few configs which are not in fact common to all boards
- Reduce the number of common elements to avoid needing #undefs later
- Slightly reword the commit message

Simon Glass (15):
Exynos: Use 900MHz ARM frequency in SPL for peach_pit
exynos5: Enable data cache
cros_ec: power: Add a tunnelled version of the tps65090 driver
cros_ec: exynos: Use the correct tps65090 driver in each case
dm: exynos: Split out the cros_ec drivers
exynos: dts: Add device tree node for cros_ec keyboard
exynos: Rename -dt config files to -common
exynos: Move common exynos settings into a common file
exynos: Move common smdk5420 things to common file
exynos: config: Move cros_ec and tps65090 out of smdk boards
config: Move arndale to use common exynos5250 file
config: Move smdkv310 to use common exynos4 file
samsung: Enable device tree for s5p_goni
samsung: Enable device tree for smdkc100
exynos: Enable pre-relocation malloc()

 arch/arm/Kconfig                                   |  13 +-
 arch/arm/cpu/armv7/s5pc1xx/Kconfig                 |  24 +++
 arch/arm/dts/Makefile                              |   3 +
 arch/arm/dts/exynos4210-smdkv310.dts               |  21 ++
 arch/arm/dts/exynos5420-peach-pit.dts              |  57 +++++-
 arch/arm/dts/s5pc1xx-goni.dts                      |  28 +++
 arch/arm/dts/s5pc1xx-smdkc100.dts                  |  29 +++
 arch/arm/include/asm/arch-s5pc1xx/periph.h         |  61 ++++++
 arch/arm/include/asm/arch-s5pc1xx/pinmux.h         |  50 +++++
 configs/s5p_goni_defconfig                         |   1 +
 configs/smdkc100_defconfig                         |   1 +
 drivers/mmc/s5p_sdhci.c                            |   2 -
 drivers/power/pmic/Makefile                        |   3 +-
 drivers/power/pmic/pmic_tps65090_ec.c              | 218 +++++++++++++++++++++
 include/configs/arndale.h                          | 197 +------------------
 include/configs/{exynos4-dt.h => exynos-common.h}  | 110 +++--------
 include/configs/exynos4-common.h                   |  71 +++++++
 include/configs/{exynos5-dt.h => exynos5-common.h} | 126 ++----------
 include/configs/exynos5-dt-common.h                |  35 ++++
 .../{exynos5250-dt.h => exynos5250-common.h}       |   7 +-
 .../configs/{exynos5420.h => exynos5420-common.h}  |  22 ++-
 include/configs/odroid.h                           |   4 +-
 include/configs/origen.h                           |   5 +-
 include/configs/peach-pit.h                        |  16 +-
 include/configs/s5p_goni.h                         |  12 +-
 include/configs/s5pc210_universal.h                |   5 +-
 include/configs/smdk5250.h                         |  23 ++-
 include/configs/smdk5420.h                         |   5 +-
 include/configs/smdkc100.h                         |   9 +
 include/configs/smdkv310.h                         |  63 ++----
 include/configs/snow.h                             |  25 ++-
 include/configs/trats.h                            |   6 +-
 include/configs/trats2.h                           |   6 +-
 33 files changed, 764 insertions(+), 494 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/s5pc1xx/Kconfig
 create mode 100644 arch/arm/dts/exynos4210-smdkv310.dts
 create mode 100644 arch/arm/dts/s5pc1xx-goni.dts
 create mode 100644 arch/arm/dts/s5pc1xx-smdkc100.dts
 create mode 100644 arch/arm/include/asm/arch-s5pc1xx/periph.h
 create mode 100644 arch/arm/include/asm/arch-s5pc1xx/pinmux.h
 create mode 100644 drivers/power/pmic/pmic_tps65090_ec.c
 rename include/configs/{exynos4-dt.h => exynos-common.h} (50%)
 create mode 100644 include/configs/exynos4-common.h
 rename include/configs/{exynos5-dt.h => exynos5-common.h} (65%)
 create mode 100644 include/configs/exynos5-dt-common.h
 rename include/configs/{exynos5250-dt.h => exynos5250-common.h} (88%)
 rename include/configs/{exynos5420.h => exynos5420-common.h} (71%)
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#1 lore raw

PATCH v5 1/15 Exynos: Use 900MHz ARM frequency in SPL for peach_pit

The device seems to hang in SPL if the full speed is used when booting from USB, perhaps because the PMIC has not been set to the maximum ARM core voltage yet. Slow it down to a reliable speed.

---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- Add new patch to use 900MHz ARM frequeny in SPL for peach_pit

 arch/arm/dts/exynos5420-peach-pit.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/exynos5420-peach-pit.dts +1 -1
index 3ed70a8..207782e 100644
@@ -32,7 +32,7 @@
 		mem-manuf = "samsung";
 		mem-type = "ddr3";
 		clock-frequency = <800000000>;
-		arm-frequency = <1700000000>;
+		arm-frequency = <900000000>;
 	};
 
 	tmu at 10060000 {
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#2 lore raw

PATCH v5 2/15 exynos5: Enable data cache

In reply to Simon Glass

Things run faster when the data cache is enabled, so turn it on along with the 'dcache' command.

---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- Fix 'cashe' typo in commit subject

 include/configs/exynos5-dt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/exynos5-dt.h +1 -1
index a7c6292..8ee5268 100644
@@ -37,8 +37,8 @@
 #define CONFIG_TRACE_EARLY_ADDR		0x50000000
 
 /* Keep L2 Cache Disabled */
-#define CONFIG_SYS_DCACHE_OFF
 #define CONFIG_SYS_CACHELINE_SIZE	64
+#define CONFIG_CMD_CACHE
 
 /* Enable ACE acceleration for SHA1 and SHA256 */
 #define CONFIG_EXYNOS_ACE_SHA
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#3 lore raw

PATCH v5 3/15 cros_ec: power: Add a tunnelled version of the tps65090 driver

In reply to Simon Glass

Unfortunately on Pit the AP has no direct access to the tps65090 but must talk through the EC (over SPI) to the EC's I2C bus.

When driver model supports PMICs this will be relatively easy. In the meantime the best approach is to duplicate the driver. It will be refactored once driver model support is expanded.

---

Changes in v5: None
Changes in v4:
- Address review nits from Minkyu
- Make this driver more like the one it came from
- Remove special FET_ERR_NOT_READY etc. as use standard errors

Changes in v3: None
Changes in v2: None

 drivers/power/pmic/Makefile           |   1 +
 drivers/power/pmic/pmic_tps65090_ec.c | 218 ++++++++++++++++++++++++++++++++++
 2 files changed, 219 insertions(+)
 create mode 100644 drivers/power/pmic/pmic_tps65090_ec.c
drivers/power/pmic/Makefile +1 -0
index a472f61..0b76611 100644
@@ -12,6 +12,7 @@ obj-$(CONFIG_POWER_MUIC_MAX8997) += muic_max8997.o
 obj-$(CONFIG_POWER_MAX77686) += pmic_max77686.o
 obj-$(CONFIG_POWER_PFUZE100) += pmic_pfuze100.o
 obj-$(CONFIG_POWER_TPS65090) += pmic_tps65090.o
+obj-$(CONFIG_POWER_TPS65090_EC) += pmic_tps65090_ec.o
 obj-$(CONFIG_POWER_TPS65217) += pmic_tps65217.o
 obj-$(CONFIG_POWER_TPS65218) += pmic_tps65218.o
 obj-$(CONFIG_POWER_TPS65910) += pmic_tps65910.o
drivers/power/pmic/pmic_tps65090_ec.c new file +218 -0

218 lines not on this page · raw message

Signature · 1 line
2.1.0.rc2.206.gedb03e5
#4 lore raw

PATCH v5 4/15 cros_ec: exynos: Use the correct tps65090 driver in each case

In reply to Simon Glass

Exynos 5250 boards (snow, spring) use the I2C driver but Exynos 5420 boards cannot due to a hardware design decision. Select the correct driver to use in each case.

---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- Don't enable the cros_ec on smdk5420
- Slightly reword the commit message

 drivers/power/pmic/Makefile     | 2 +-
 include/configs/exynos5250-dt.h | 1 +
 include/configs/peach-pit.h     | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)
drivers/power/pmic/Makefile +1 -1
index 0b76611..e7b07eb 100644
@@ -11,7 +11,7 @@ obj-$(CONFIG_POWER_MAX8997) += pmic_max8997.o
 obj-$(CONFIG_POWER_MUIC_MAX8997) += muic_max8997.o
 obj-$(CONFIG_POWER_MAX77686) += pmic_max77686.o
 obj-$(CONFIG_POWER_PFUZE100) += pmic_pfuze100.o
-obj-$(CONFIG_POWER_TPS65090) += pmic_tps65090.o
+obj-$(CONFIG_POWER_TPS65090_I2C) += pmic_tps65090.o
 obj-$(CONFIG_POWER_TPS65090_EC) += pmic_tps65090_ec.o
 obj-$(CONFIG_POWER_TPS65217) += pmic_tps65217.o
 obj-$(CONFIG_POWER_TPS65218) += pmic_tps65218.o
include/configs/exynos5250-dt.h +1 -0
index c24984b..5504515 100644
@@ -42,6 +42,7 @@
 
 /* PMIC */
 #define CONFIG_POWER_MAX77686
+#define CONFIG_POWER_TPS65090_I2C
 
 /* Sound */
 #define CONFIG_CMD_SOUND
include/configs/peach-pit.h +2 -0
index 88c093f..0892bd0 100644
@@ -32,4 +32,6 @@
 #define LCD_BPP			LCD_COLOR16
 #endif
 
+#define CONFIG_POWER_TPS65090_EC
+
 #endif	/* __CONFIG_PEACH_PIT_H */
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#5 lore raw

PATCH v5 5/15 dm: exynos: Split out the cros_ec drivers

In reply to Simon Glass

With the driver model conversion we are going to be using driver model for SPI and not for I2C. This works OK so long as a board doesn't need both dm and non-dm versions of the cros_ec driver. Since pit uses SPI and snow uses I2C we need to split the configs so that only one driver is compiled for each platform.

We can fix this later when driver model supports I2C.

---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- Add new patch to split out cros_ec drivers
- Don't enable the cros_ec on smdk5420

 include/configs/exynos5-dt.h    | 2 --
 include/configs/exynos5250-dt.h | 2 ++
 include/configs/peach-pit.h     | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)
include/configs/exynos5-dt.h +0 -2
index 8ee5268..89de989 100644
@@ -73,8 +73,6 @@
 
 /* Enable keyboard */
 #define CONFIG_CROS_EC		/* CROS_EC protocol */
-#define CONFIG_CROS_EC_SPI		/* Support CROS_EC over SPI */
-#define CONFIG_CROS_EC_I2C		/* Support CROS_EC over I2C */
 #define CONFIG_CROS_EC_KEYB	/* CROS_EC keyboard input */
 #define CONFIG_CMD_CROS_EC
 #define CONFIG_KEYBOARD
include/configs/exynos5250-dt.h +2 -0
index 5504515..05d33a7 100644
@@ -22,6 +22,8 @@
 
 #define CONFIG_SPL_MAX_FOOTPRINT	(14 * 1024)
 
+#define CONFIG_CROS_EC_I2C		/* Support CROS_EC over I2C */
+
 /* USB */
 #define CONFIG_CMD_USB
 #define CONFIG_USB_XHCI
include/configs/peach-pit.h +1 -0
index 0892bd0..d93bf46 100644
@@ -33,5 +33,6 @@
 #endif
 
 #define CONFIG_POWER_TPS65090_EC
+#define CONFIG_CROS_EC_SPI		/* Support CROS_EC over SPI */
 
 #endif	/* __CONFIG_PEACH_PIT_H */
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#6 lore raw

PATCH v5 6/15 exynos: dts: Add device tree node for cros_ec keyboard

In reply to Simon Glass

Add a keyboard definition so that the keyboard can be used on pit.

---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- Add new patch to enable keyboard on pit

 arch/arm/dts/exynos5420-peach-pit.dts | 55 +++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)
arch/arm/dts/exynos5420-peach-pit.dts +55 -0
index 207782e..995e62b 100644
@@ -28,6 +28,61 @@
 		pmic = "/i2c at 12ca0000";
 	};
 
+	cros-ec-keyb {
+		compatible = "google,cros-ec-keyb";
+		google,key-rows = <8>;
+		google,key-columns = <13>;
+		google,repeat-delay-ms = <240>;
+		google,repeat-rate-ms = <30>;
+		google,ghost-filter;
+		/*
+		 * Keymap entries take the form of 0xRRCCKKKK where
+		 * RR=Row CC=Column KKKK=Key Code
+		 * The values below are for a US keyboard layout and
+		 * are taken from the Linux driver. Note that the
+		 * 102ND key is not used for US keyboards.
+		 */
+		linux,keymap = <
+			/* CAPSLCK F1         B          F10     */
+			0x0001003a 0x0002003b 0x00030030 0x00040044
+			/* N       =          R_ALT      ESC     */
+			0x00060031 0x0008000d 0x000a0064 0x01010001
+			/* F4      G          F7         H       */
+			0x0102003e 0x01030022 0x01040041 0x01060023
+			/* '       F9         BKSPACE    L_CTRL  */
+			0x01080028 0x01090043 0x010b000e 0x0200001d
+			/* TAB     F3         T          F6      */
+			0x0201000f 0x0202003d 0x02030014 0x02040040
+			/* ]       Y          102ND      [       */
+			0x0205001b 0x02060015 0x02070056 0x0208001a
+			/* F8      GRAVE      F2         5       */
+			0x02090042 0x03010029 0x0302003c 0x03030006
+			/* F5      6          -          \       */
+			0x0304003f 0x03060007 0x0308000c 0x030b002b
+			/* R_CTRL  A          D          F       */
+			0x04000061 0x0401001e 0x04020020 0x04030021
+			/* S       K          J          ;       */
+			0x0404001f 0x04050025 0x04060024 0x04080027
+			/* L       ENTER      Z          C       */
+			0x04090026 0x040b001c 0x0501002c 0x0502002e
+			/* V       X          ,          M       */
+			0x0503002f 0x0504002d 0x05050033 0x05060032
+			/* L_SHIFT /          .          SPACE   */
+			0x0507002a 0x05080035 0x05090034 0x050B0039
+			/* 1       3          4          2       */
+			0x06010002 0x06020004 0x06030005 0x06040003
+			/* 8       7          0          9       */
+			0x06050009 0x06060008 0x0608000b 0x0609000a
+			/* L_ALT   DOWN       RIGHT      Q       */
+			0x060a0038 0x060b006c 0x060c006a 0x07010010
+			/* E       R          W          I       */
+			0x07020012 0x07030013 0x07040011 0x07050017
+			/* U       R_SHIFT    P          O       */
+			0x07060016 0x07070036 0x07080019 0x07090018
+			/* UP      LEFT    */
+			0x070b0067 0x070c0069>;
+	};
+
 	dmc {
 		mem-manuf = "samsung";
 		mem-type = "ddr3";
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#7 lore raw

PATCH v5 7/15 exynos: Rename -dt config files to -common

In reply to Simon Glass

We want exynos5250-dt.h to be a board which can support any exynos5250 device. This matches the naming used by Linux. As a first step, rename the existing -dt files to -common to make it clear they are common files, and not specific boards.

---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 include/configs/{exynos4-dt.h => exynos4-common.h}       | 6 +++---
 include/configs/{exynos5-dt.h => exynos5-common.h}       | 6 +++---
 include/configs/{exynos5250-dt.h => exynos5250-common.h} | 2 +-
 include/configs/odroid.h                                 | 2 +-
 include/configs/origen.h                                 | 2 +-
 include/configs/peach-pit.h                              | 2 +-
 include/configs/s5pc210_universal.h                      | 2 +-
 include/configs/smdk5250.h                               | 2 +-
 include/configs/smdk5420.h                               | 2 +-
 include/configs/snow.h                                   | 2 +-
 include/configs/trats.h                                  | 2 +-
 include/configs/trats2.h                                 | 2 +-
 12 files changed, 16 insertions(+), 16 deletions(-)
 rename include/configs/{exynos4-dt.h => exynos4-common.h} (97%)
 rename include/configs/{exynos5-dt.h => exynos5-common.h} (98%)
 rename include/configs/{exynos5250-dt.h => exynos5250-common.h} (97%)
include/configs/exynos4-common.h renamed from include/configs/exynos4-dt.h +3 -3
similarity index 97%
rename from include/configs/exynos4-dt.h
rename to include/configs/exynos4-common.h
index 7dac1a3..ef0df9c 100644
@@ -6,8 +6,8 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
-#ifndef __CONFIG_H
-#define __CONFIG_H
+#ifndef __CONFIG_EXYNOS4_COMMON_H
+#define __CONFIG_EXYNOS4_COMMON_H
 
 /* High Level Configuration Options */
 #define CONFIG_SAMSUNG			/* in a SAMSUNG core */
@@ -140,4 +140,4 @@
 /* Enable devicetree support */
 #define CONFIG_OF_LIBFDT
 
-#endif	/* __CONFIG_H */
+#endif	/* __CONFIG_EXYNOS4_COMMON_H */
include/configs/exynos5-common.h renamed from include/configs/exynos5-dt.h +3 -3
similarity index 98%
rename from include/configs/exynos5-dt.h
rename to include/configs/exynos5-common.h
index 89de989..91c0f00 100644
@@ -6,8 +6,8 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
-#ifndef __CONFIG_H
-#define __CONFIG_H
+#ifndef __CONFIG_EXYNOS5_COMMON_H
+#define __CONFIG_EXYNOS5_COMMON_H
 
 /* High Level Configuration Options */
 #define CONFIG_SAMSUNG			/* in a SAMSUNG core */
@@ -293,4 +293,4 @@
 #define EXYNOS_USB_SECONDARY_BOOT	0xfeed0002
 #define EXYNOS_IRAM_SECONDARY_BASE	0x02020018
 
-#endif	/* __CONFIG_H */
+#endif	/* __CONFIG_EXYNOS5_COMMON_H */
include/configs/exynos5250-common.h renamed from include/configs/exynos5250-dt.h +1 -1
similarity index 97%
rename from include/configs/exynos5250-dt.h
rename to include/configs/exynos5250-common.h
index 05d33a7..b4c1ccf 100644
@@ -10,7 +10,7 @@
 #ifndef __CONFIG_5250_H
 #define __CONFIG_5250_H
 
-#include <configs/exynos5-dt.h>
+#include <configs/exynos5-common.h>
 #define CONFIG_EXYNOS5250
 
 #define CONFIG_SYS_SDRAM_BASE		0x40000000
include/configs/odroid.h +1 -1
index 29dcc4a..3309469 100644
@@ -12,7 +12,7 @@
 #ifndef __CONFIG_ODROID_U3_H
 #define __CONFIG_ODROID_U3_H
 
-#include <configs/exynos4-dt.h>
+#include <configs/exynos4-common.h>
 
 #define CONFIG_SYS_PROMPT	"Odroid # "	/* Monitor Command Prompt */
 
include/configs/origen.h +1 -1
index 5d24916..469183e 100644
@@ -9,7 +9,7 @@
 #ifndef __CONFIG_ORIGEN_H
 #define __CONFIG_ORIGEN_H
 
-#include <configs/exynos4-dt.h>
+#include <configs/exynos4-common.h>
 
 #define CONFIG_SYS_PROMPT		"ORIGEN # "
 
include/configs/peach-pit.h +1 -1
index d93bf46..a652ec1 100644
@@ -9,7 +9,7 @@
 #ifndef __CONFIG_PEACH_PIT_H
 #define __CONFIG_PEACH_PIT_H
 
-#include <configs/exynos5-dt.h>
+#include <configs/exynos5-common.h>
 
 #include <configs/exynos5420.h>
 
include/configs/s5pc210_universal.h +1 -1
index 20985da..066fc02 100644
@@ -10,7 +10,7 @@
 #ifndef __CONFIG_UNIVERSAL_H
 #define __CONFIG_UNIVERSAL_H
 
-#include <configs/exynos4-dt.h>
+#include <configs/exynos4-common.h>
 
 #define CONFIG_SYS_PROMPT	"Universal # "	/* Monitor Command Prompt */
 
include/configs/smdk5250.h +1 -1
index 66fa179..751b5eb 100644
@@ -9,7 +9,7 @@
 #ifndef __CONFIG_SMDK_H
 #define __CONFIG_SMDK_H
 
-#include <configs/exynos5250-dt.h>
+#include <configs/exynos5250-common.h>
 
 #undef CONFIG_DEFAULT_DEVICE_TREE
 #define CONFIG_DEFAULT_DEVICE_TREE	exynos5250-smdk5250
include/configs/smdk5420.h +1 -1
index 606739b..43c9808 100644
@@ -9,7 +9,7 @@
 #ifndef __CONFIG_SMDK5420_H
 #define __CONFIG_SMDK5420_H
 
-#include <configs/exynos5-dt.h>
+#include <configs/exynos5-common.h>
 
 #include <configs/exynos5420.h>
 
include/configs/snow.h +1 -1
index 673fa14..78adca8 100644
@@ -9,7 +9,7 @@
 #ifndef __CONFIG_SNOW_H
 #define __CONFIG_SNOW_H
 
-#include <configs/exynos5250-dt.h>
+#include <configs/exynos5250-common.h>
 
 #undef CONFIG_DEFAULT_DEVICE_TREE
 #define CONFIG_DEFAULT_DEVICE_TREE	exynos5250-snow
include/configs/trats.h +1 -1
index 6fa646b..ec9cf6f 100644
@@ -10,7 +10,7 @@
 #ifndef __CONFIG_TRATS_H
 #define __CONFIG_TRATS_H
 
-#include <configs/exynos4-dt.h>
+#include <configs/exynos4-common.h>
 
 #define CONFIG_SYS_PROMPT	"Trats # "	/* Monitor Command Prompt */
 
include/configs/trats2.h +1 -1
index 1450865..b3ad718 100644
@@ -11,7 +11,7 @@
 #ifndef __CONFIG_TRATS2_H
 #define __CONFIG_TRATS2_H
 
-#include <configs/exynos4-dt.h>
+#include <configs/exynos4-common.h>
 
 #define CONFIG_SYS_PROMPT	"Trats2 # "	/* Monitor Command Prompt */
 
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#8 lore raw

PATCH v5 8/15 exynos: Move common exynos settings into a common file

In reply to Simon Glass

Since exynos4 and exyno5 share many settings, we should move these into a common file to avoid duplication.

In effect the changes are that all exynos boards now have EXT4 and FAT write support. This affects exynos5250 and exynos5420 which previously did not. This also disables the ext2 commands which are equivalent to ext4 anyway.

---

Changes in v5: None
Changes in v4:
- Rebase on top of master (CONFIG_OF settings moved to Kconfig)

Changes in v3: None
Changes in v2:
- Reduce the number of common elements to avoid needing #undefs later

 include/configs/exynos-common.h     | 91 +++++++++++++++++++++++++++++++++++++
 include/configs/exynos4-common.h    | 77 +------------------------------
 include/configs/exynos5-common.h    | 86 +++++------------------------------
 include/configs/origen.h            |  3 --
 include/configs/s5pc210_universal.h |  3 --
 include/configs/smdk5250.h          |  4 --
 include/configs/snow.h              |  4 --
 include/configs/trats.h             |  4 --
 include/configs/trats2.h            |  4 --
 9 files changed, 105 insertions(+), 171 deletions(-)
 create mode 100644 include/configs/exynos-common.h
include/configs/exynos-common.h new file +91 -0
new file mode 100644
index 0000000..7b9eda4
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ *
+ * Common configuration settings for the SAMSUNG EXYNOS boards.
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#ifndef __EXYNOS_COMMON_H
+#define __EXYNOS_COMMON_H
+
+/* High Level Configuration Options */
+#define CONFIG_SAMSUNG			/* in a SAMSUNG core */
+#define CONFIG_S5P			/* S5P Family */
+
+#include <asm/arch/cpu.h>		/* get chip and board defs */
+#include <linux/sizes.h>
+
+#define CONFIG_SYS_GENERIC_BOARD
+#define CONFIG_ARCH_CPU_INIT
+#define CONFIG_DISPLAY_CPUINFO
+#define CONFIG_DISPLAY_BOARDINFO
+#define CONFIG_BOARD_COMMON
+#define CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_BOARD_EARLY_INIT_F
+
+/* Enable fdt support */
+#define CONFIG_OF_LIBFDT
+
+/* Keep L2 Cache Disabled */
+#define CONFIG_CMD_CACHE
+
+/* input clock of PLL: 24MHz input clock */
+#define CONFIG_SYS_CLK_FREQ		24000000
+
+#define CONFIG_SETUP_MEMORY_TAGS
+#define CONFIG_CMDLINE_TAG
+#define CONFIG_INITRD_TAG
+#define CONFIG_CMDLINE_EDITING
+#define CONFIG_ENV_OVERWRITE
+
+/* Size of malloc() pool */
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (80 * SZ_1M))
+
+/* select serial console configuration */
+#define CONFIG_BAUDRATE			115200
+
+/* SD/MMC configuration */
+#define CONFIG_GENERIC_MMC
+#define CONFIG_MMC
+#define CONFIG_S5P_SDHCI
+#define CONFIG_SDHCI
+#define CONFIG_DWMMC
+#define CONFIG_EXYNOS_DWMMC
+#define CONFIG_BOUNCE_BUFFER
+
+#define CONFIG_BOOTDELAY		3
+#define CONFIG_ZERO_BOOTDELAY_CHECK
+
+/* PWM */
+#define CONFIG_PWM
+
+/* Command definition*/
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_MMC
+#define CONFIG_CMD_EXT4
+#define CONFIG_CMD_EXT4_WRITE
+#define CONFIG_CMD_FAT
+#define CONFIG_FAT_WRITE
+
+#define CONFIG_DOS_PARTITION
+#define CONFIG_EFI_PARTITION
+#define CONFIG_CMD_PART
+#define CONFIG_PARTITION_UUIDS
+
+/* Miscellaneous configurable options */
+#define CONFIG_SYS_LONGHELP		/* undef to save memory */
+#define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser	*/
+#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size */
+#define CONFIG_SYS_PBSIZE		384	/* Print Buffer Size */
+#define CONFIG_SYS_MAXARGS		16	/* max number of command args */
+
+/* Boot Argument Buffer Size */
+#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
+
+/* FLASH and environment organization */
+#define CONFIG_SYS_NO_FLASH
+#undef CONFIG_CMD_IMLS
+
+#endif	/* __CONFIG_H */
include/configs/exynos4-common.h +2 -75

120 lines not on this page · raw message

include/configs/exynos5-common.h +12 -74

166 lines not on this page · raw message

include/configs/origen.h +0 -3
index 469183e..e24d5b6 100644
@@ -37,9 +37,6 @@
 
 #define CONFIG_MACH_TYPE		MACH_TYPE_ORIGEN
 
-/* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (80 * SZ_1M))
-
 /* select serial console configuration */
 #define CONFIG_SERIAL2
 #define CONFIG_BAUDRATE			115200
include/configs/s5pc210_universal.h +0 -3
index 066fc02..cd4cdfe 100644
@@ -29,9 +29,6 @@
 
 #define SDRAM_BANK_SIZE			(256 << 20)	/* 256 MB */
 
-/* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (80 * SZ_1M))
-
 /* select serial console configuration */
 #define CONFIG_SERIAL2
 #define CONFIG_BAUDRATE			115200
include/configs/smdk5250.h +0 -4
index 751b5eb..37dc092 100644
@@ -14,8 +14,4 @@
 #undef CONFIG_DEFAULT_DEVICE_TREE
 #define CONFIG_DEFAULT_DEVICE_TREE	exynos5250-smdk5250
 
-/* Enable FIT support and comparison */
-#define CONFIG_FIT
-#define CONFIG_FIT_BEST_MATCH
-
 #endif	/* __CONFIG_SMDK_H */
include/configs/snow.h +0 -4
index 78adca8..58b011d 100644
@@ -14,8 +14,4 @@
 #undef CONFIG_DEFAULT_DEVICE_TREE
 #define CONFIG_DEFAULT_DEVICE_TREE	exynos5250-snow
 
-/* Enable FIT support and comparison */
-#define CONFIG_FIT
-#define CONFIG_FIT_BEST_MATCH
-
 #endif	/* __CONFIG_SNOW_H */
include/configs/trats.h +0 -4
index ec9cf6f..80ab96c 100644
@@ -41,10 +41,6 @@
 
 #define CONFIG_SYS_TEXT_BASE		0x63300000
 
-#include <linux/sizes.h>
-/* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (80 * SZ_1M))
-
 /* select serial console configuration */
 #define CONFIG_SERIAL2
 #define CONFIG_BAUDRATE			115200
include/configs/trats2.h +0 -4
index b3ad718..998dabf 100644
@@ -38,10 +38,6 @@
 
 #define CONFIG_SYS_TEXT_BASE		0x43e00000
 
-#include <linux/sizes.h>
-/* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (80 * SZ_1M))
-
 /* select serial console configuration */
 #define CONFIG_SERIAL2
 #define CONFIG_BAUDRATE			115200
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#9 lore raw

PATCH v5 9/15 exynos: Move common smdk5420 things to common file

In reply to Simon Glass

A few things are common but are not in the common file. Fix this and rename the file to fit with the other exynos*-common files.

---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- Leave CONFIG_SERIAL3 in the individual board files
- Reduce the number of common elements to avoid needing #undefs later

 include/configs/{exynos5420.h => exynos5420-common.h} | 8 +++-----
 include/configs/peach-pit.h                           | 4 +---
 include/configs/smdk5420.h                            | 4 +---
 3 files changed, 5 insertions(+), 11 deletions(-)
 rename include/configs/{exynos5420.h => exynos5420-common.h} (88%)
include/configs/exynos5420-common.h renamed from include/configs/exynos5420.h +3 -5
similarity index 88%
rename from include/configs/exynos5420.h
rename to include/configs/exynos5420-common.h
index d2a9556..27e7edc 100644
@@ -9,7 +9,9 @@
 #ifndef __CONFIG_EXYNOS5420_H
 #define __CONFIG_EXYNOS5420_H
 
-#define CONFIG_EXYNOS5420		/* which is in a Exynos5 Family */
+#define CONFIG_EXYNOS5420
+
+#include <configs/exynos5-common.h>
 
 #define MACH_TYPE_SMDK5420	8002
 #define CONFIG_MACH_TYPE	MACH_TYPE_SMDK5420
@@ -31,10 +33,6 @@
 
 #define CONFIG_MAX_I2C_NUM	11
 
-/* Enable FIT support and comparison */
-#define CONFIG_FIT
-#define CONFIG_FIT_BEST_MATCH
-
 #define CONFIG_BOARD_REV_GPIO_COUNT	2
 
 #define CONFIG_BOOTCOMMAND	"mmc read 20007000 451 2000; bootm 20007000"
include/configs/peach-pit.h +1 -3
index a652ec1..455c03a 100644
@@ -9,9 +9,7 @@
 #ifndef __CONFIG_PEACH_PIT_H
 #define __CONFIG_PEACH_PIT_H
 
-#include <configs/exynos5-common.h>
-
-#include <configs/exynos5420.h>
+#include <configs/exynos5420-common.h>
 
 #undef CONFIG_DEFAULT_DEVICE_TREE
 #define CONFIG_DEFAULT_DEVICE_TREE	exynos5420-peach-pit
include/configs/smdk5420.h +1 -3
index 43c9808..2eaff21 100644
@@ -9,9 +9,7 @@
 #ifndef __CONFIG_SMDK5420_H
 #define __CONFIG_SMDK5420_H
 
-#include <configs/exynos5-common.h>
-
-#include <configs/exynos5420.h>
+#include <configs/exynos5420-common.h>
 
 #define CONFIG_SMDK5420			/* which is in a SMDK5420 */
 
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#10 lore raw

PATCH v5 10/15 exynos: config: Move cros_ec and tps65090 out of smdk boards

In reply to Simon Glass

These boards do not in fact have a Chrome OS EC, nor a TPS565090 PMIC, so move the settings into a separate common file to be used by those that need it.

---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 include/configs/exynos5-common.h    | 18 +++---------------
 include/configs/exynos5-dt-common.h | 35 +++++++++++++++++++++++++++++++++++
 include/configs/exynos5250-common.h |  3 ---
 include/configs/peach-pit.h         |  1 +
 include/configs/snow.h              |  4 ++++
 5 files changed, 43 insertions(+), 18 deletions(-)
 create mode 100644 include/configs/exynos5-dt-common.h
include/configs/exynos5-common.h +3 -15
index b7d6f9c..3f93549 100644
@@ -52,17 +52,10 @@
 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
 #define CONFIG_CONSOLE_MUX
 
-/* Enable keyboard */
-#define CONFIG_CROS_EC		/* CROS_EC protocol */
-#define CONFIG_CROS_EC_KEYB	/* CROS_EC keyboard input */
-#define CONFIG_CMD_CROS_EC
-#define CONFIG_KEYBOARD
-
-/* Console configuration */
 #define EXYNOS_DEVICE_SETTINGS \
-		"stdin=serial,cros-ec-keyb\0" \
-		"stdout=serial,lcd\0" \
-		"stderr=serial,lcd\0"
+		"stdin=serial\0" \
+		"stdout=serial\0" \
+		"stderr=serial\0"
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	EXYNOS_DEVICE_SETTINGS
@@ -189,11 +182,6 @@
 #define CONFIG_ENV_SPI_MAX_HZ	50000000
 #endif
 
-/* PMIC */
-#define CONFIG_POWER
-#define CONFIG_POWER_I2C
-#define CONFIG_POWER_TPS65090
-
 /* Ethernet Controllor Driver */
 #ifdef CONFIG_CMD_NET
 #define CONFIG_SMC911X
include/configs/exynos5-dt-common.h new file +35 -0
new file mode 100644
index 0000000..66547fa
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2014 Google, Inc
+ *
+ * Configuration settings for generic Exynos 5 board
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#ifndef __CONFIG_EXYNOS5_DT_COMMON_H
+#define __CONFIG_EXYNOS5_DT_COMMON_H
+
+#include "exynos5-common.h"
+
+/* PMIC */
+#define CONFIG_POWER
+#define CONFIG_POWER_I2C
+#define CONFIG_POWER_TPS65090
+
+/* Enable keyboard */
+#define CONFIG_CROS_EC		/* CROS_EC protocol */
+#define CONFIG_CROS_EC_KEYB	/* CROS_EC keyboard input */
+#define CONFIG_CMD_CROS_EC
+#define CONFIG_KEYBOARD
+
+/* Console configuration */
+#undef EXYNOS_DEVICE_SETTINGS
+#define EXYNOS_DEVICE_SETTINGS \
+		"stdin=serial,cros-ec-keyb\0" \
+		"stdout=serial,lcd\0" \
+		"stderr=serial,lcd\0"
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+	EXYNOS_DEVICE_SETTINGS
+
+#endif
include/configs/exynos5250-common.h +0 -3
index b4c1ccf..987eb15 100644
@@ -22,8 +22,6 @@
 
 #define CONFIG_SPL_MAX_FOOTPRINT	(14 * 1024)
 
-#define CONFIG_CROS_EC_I2C		/* Support CROS_EC over I2C */
-
 /* USB */
 #define CONFIG_CMD_USB
 #define CONFIG_USB_XHCI
@@ -44,7 +42,6 @@
 
 /* PMIC */
 #define CONFIG_POWER_MAX77686
-#define CONFIG_POWER_TPS65090_I2C
 
 /* Sound */
 #define CONFIG_CMD_SOUND
include/configs/peach-pit.h +1 -0
index 455c03a..6cf8c74 100644
@@ -10,6 +10,7 @@
 #define __CONFIG_PEACH_PIT_H
 
 #include <configs/exynos5420-common.h>
+#include <configs/exynos5-dt-common.h>
 
 #undef CONFIG_DEFAULT_DEVICE_TREE
 #define CONFIG_DEFAULT_DEVICE_TREE	exynos5420-peach-pit
include/configs/snow.h +4 -0
index 58b011d..93a03b1 100644
@@ -10,8 +10,12 @@
 #define __CONFIG_SNOW_H
 
 #include <configs/exynos5250-common.h>
+#include <configs/exynos5-dt-common.h>
 
 #undef CONFIG_DEFAULT_DEVICE_TREE
 #define CONFIG_DEFAULT_DEVICE_TREE	exynos5250-snow
 
+#define CONFIG_CROS_EC_I2C		/* Support CROS_EC over I2C */
+#define CONFIG_POWER_TPS65090_I2C
+
 #endif	/* __CONFIG_SNOW_H */
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#11 lore raw

PATCH v5 11/15 config: Move arndale to use common exynos5250 file

In reply to Simon Glass

Most of the arndale features are common with other exynos5250 boards. To permit easier addition of driver model support, use the common file.

---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- Reduce the number of common elements to avoid needing #undefs later

 include/configs/arndale.h           | 197 +-----------------------------------
 include/configs/exynos-common.h     |   1 -
 include/configs/exynos4-common.h    |   1 +
 include/configs/exynos5-common.h    |  12 ---
 include/configs/exynos5250-common.h |   5 -
 include/configs/exynos5420-common.h |  14 +++
 include/configs/peach-pit.h         |  10 ++
 include/configs/smdk5250.h          |  19 ++++
 include/configs/smdk5420.h          |   3 +
 include/configs/snow.h              |  17 ++++
 10 files changed, 65 insertions(+), 214 deletions(-)
include/configs/arndale.h +1 -196
index 75f9933..d1a26f1 100644
@@ -9,111 +9,19 @@
 #ifndef __CONFIG_ARNDALE_H
 #define __CONFIG_ARNDALE_H
 
-/* High Level Configuration Options */
-#define CONFIG_SAMSUNG			/* in a SAMSUNG core */
-#define CONFIG_S5P			/* S5P Family */
-#define CONFIG_EXYNOS5			/* which is in a Exynos5 Family */
-#define CONFIG_EXYNOS5250
-
-#include <asm/arch/cpu.h>		/* get chip and board defs */
-
-#define CONFIG_SYS_GENERIC_BOARD
-#define CONFIG_ARCH_CPU_INIT
-#define CONFIG_DISPLAY_CPUINFO
-#define CONFIG_DISPLAY_BOARDINFO
-
-#define CONFIG_OF_CONTROL
-#define CONFIG_OF_SEPARATE
-
-/* Allow tracing to be enabled */
-#define CONFIG_TRACE
-#define CONFIG_CMD_TRACE
-#define CONFIG_TRACE_BUFFER_SIZE	(16 << 20)
-#define CONFIG_TRACE_EARLY_SIZE		(8 << 20)
-#define CONFIG_TRACE_EARLY
-#define CONFIG_TRACE_EARLY_ADDR		0x50000000
-
-/* Keep L2 Cache Disabled */
-#define CONFIG_SYS_DCACHE_OFF
-
-#define CONFIG_SYS_SDRAM_BASE		0x40000000
-#define CONFIG_SYS_TEXT_BASE		0x43E00000
-
-/* input clock of PLL: SMDK5250 has 24MHz input clock */
-#define CONFIG_SYS_CLK_FREQ		24000000
-
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_INITRD_TAG
-#define CONFIG_CMDLINE_EDITING
-
-/* Power Down Modes */
-#define S5P_CHECK_SLEEP			0x00000BAD
-#define S5P_CHECK_DIDLE			0xBAD00000
-#define S5P_CHECK_LPA			0xABAD0000
-
-/* Offset for inform registers */
-#define INFORM0_OFFSET			0x800
-#define INFORM1_OFFSET			0x804
-
-/* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (4 << 20))
-
-/* select serial console configuration */
-#define CONFIG_BAUDRATE			115200
-#define EXYNOS5_DEFAULT_UART_OFFSET	0x010000
-#define CONFIG_SILENT_CONSOLE
-
-/* Console configuration */
-#define CONFIG_CONSOLE_MUX
-#define CONFIG_SYS_CONSOLE_IS_IN_ENV
-#define EXYNOS_DEVICE_SETTINGS \
-		"stdin=serial\0" \
-		"stdout=serial\0" \
-		"stderr=serial\0"
-
-#define CONFIG_EXTRA_ENV_SETTINGS \
-	EXYNOS_DEVICE_SETTINGS
+#include "exynos5250-common.h"
 
 /* SD/MMC configuration */
-#define CONFIG_GENERIC_MMC
-#define CONFIG_MMC
-#define CONFIG_SDHCI
-#define CONFIG_S5P_SDHCI
-#define CONFIG_DWMMC
-#define CONFIG_EXYNOS_DWMMC
 #define CONFIG_SUPPORT_EMMC_BOOT
-#define CONFIG_BOUNCE_BUFFER
-
-
-#define CONFIG_BOARD_EARLY_INIT_F
-#define CONFIG_SKIP_LOWLEVEL_INIT
-
-/* PWM */
-#define CONFIG_PWM
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
 
-/* Command definition*/
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_ELF
-#define CONFIG_CMD_MMC
 #define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
-#define CONFIG_CMD_NET
-#define CONFIG_CMD_HASH
-
-#define CONFIG_BOOTDELAY		3
-#define CONFIG_ZERO_BOOTDELAY_CHECK
 
 /* USB */
-#define CONFIG_CMD_USB
 #define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_EXYNOS
-#define CONFIG_USB_STORAGE
 
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS	3
 #define CONFIG_USB_HOST_ETHER
@@ -121,106 +29,23 @@
 
 /* MMC SPL */
 #define CONFIG_EXYNOS_SPL
-#define COPY_BL2_FNPTR_ADDR	0x02020030
-
-#define CONFIG_SPL_LIBCOMMON_SUPPORT
-
-/* specific .lds file */
-#define CONFIG_SPL_LDSCRIPT	"board/samsung/common/exynos-uboot-spl.lds"
-#define CONFIG_SPL_TEXT_BASE	0x02023400
-#define CONFIG_SPL_MAX_FOOTPRINT	(14 * 1024)
-
-#define CONFIG_BOOTCOMMAND	"mmc read 40007000 451 2000; bootm 40007000"
 
 /* Miscellaneous configurable options */
-#define CONFIG_SYS_LONGHELP		/* undef to save memory */
-#define CONFIG_SYS_HUSH_PARSER		/* use "hush" command parser	*/
 #define CONFIG_SYS_PROMPT		"ARNDALE # "
-#define CONFIG_SYS_CBSIZE		256	/* Console I/O Buffer Size */
-#define CONFIG_SYS_PBSIZE		384	/* Print Buffer Size */
-#define CONFIG_SYS_MAXARGS		16	/* max number of command args */
 #define CONFIG_DEFAULT_CONSOLE		"console=ttySAC2,115200n8\0"
-/* Boot Argument Buffer Size */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-/* memtest works on */
-#define CONFIG_SYS_MEMTEST_START	CONFIG_SYS_SDRAM_BASE
-#define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_SDRAM_BASE + 0x5E00000)
-#define CONFIG_SYS_LOAD_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x3E00000)
-
-#define CONFIG_RD_LVL
 
 #define CONFIG_NR_DRAM_BANKS	8
 #define SDRAM_BANK_SIZE		(256UL << 20UL)	/* 256 MB */
-#define PHYS_SDRAM_1		CONFIG_SYS_SDRAM_BASE
-#define PHYS_SDRAM_1_SIZE	SDRAM_BANK_SIZE
-#define PHYS_SDRAM_2		(CONFIG_SYS_SDRAM_BASE + SDRAM_BANK_SIZE)
-#define PHYS_SDRAM_2_SIZE	SDRAM_BANK_SIZE
-#define PHYS_SDRAM_3		(CONFIG_SYS_SDRAM_BASE + (2 * SDRAM_BANK_SIZE))
-#define PHYS_SDRAM_3_SIZE	SDRAM_BANK_SIZE
-#define PHYS_SDRAM_4		(CONFIG_SYS_SDRAM_BASE + (3 * SDRAM_BANK_SIZE))
-#define PHYS_SDRAM_4_SIZE	SDRAM_BANK_SIZE
-#define PHYS_SDRAM_5		(CONFIG_SYS_SDRAM_BASE + (4 * SDRAM_BANK_SIZE))
-#define PHYS_SDRAM_5_SIZE	SDRAM_BANK_SIZE
-#define PHYS_SDRAM_6		(CONFIG_SYS_SDRAM_BASE + (5 * SDRAM_BANK_SIZE))
-#define PHYS_SDRAM_6_SIZE	SDRAM_BANK_SIZE
-#define PHYS_SDRAM_7		(CONFIG_SYS_SDRAM_BASE + (6 * SDRAM_BANK_SIZE))
-#define PHYS_SDRAM_7_SIZE	SDRAM_BANK_SIZE
-#define PHYS_SDRAM_8		(CONFIG_SYS_SDRAM_BASE + (7 * SDRAM_BANK_SIZE))
-#define PHYS_SDRAM_8_SIZE	SDRAM_BANK_SIZE
 
-#define CONFIG_SYS_MONITOR_BASE	0x00000000
-
-/* FLASH and environment organization */
-#define CONFIG_SYS_NO_FLASH
-#undef CONFIG_CMD_IMLS
 #define CONFIG_IDENT_STRING		" for ARNDALE"
 
-#define CONFIG_SYS_MMC_ENV_DEV		0
-
 #define CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SECURE_BL1_ONLY
-
-/* Secure FW size configuration */
-#ifdef	CONFIG_SECURE_BL1_ONLY
-#define	CONFIG_SEC_FW_SIZE		(8 << 10)	/* 8KB */
-#else
-#define	CONFIG_SEC_FW_SIZE		0
-#endif
-
-/* Configuration of BL1, BL2, ENV Blocks on mmc */
-#define CONFIG_RES_BLOCK_SIZE	(512)
-#define CONFIG_BL1_SIZE		(16 << 10) /*16 K reserved for BL1*/
-#define	CONFIG_BL2_SIZE		(512UL << 10UL)	/* 512 KB */
-#define CONFIG_ENV_SIZE		(16 << 10)	/* 16 KB */
-
-#define CONFIG_BL1_OFFSET	(CONFIG_RES_BLOCK_SIZE + CONFIG_SEC_FW_SIZE)
-#define CONFIG_BL2_OFFSET	(CONFIG_BL1_OFFSET + CONFIG_BL1_SIZE)
 #define CONFIG_ENV_OFFSET	(CONFIG_BL2_OFFSET + CONFIG_BL2_SIZE)
 
-/* U-boot copy size from boot Media to DRAM.*/
-#define BL2_START_OFFSET	(CONFIG_BL2_OFFSET/512)
-#define BL2_SIZE_BLOC_COUNT	(CONFIG_BL2_SIZE/512)
-
-#define CONFIG_DOS_PARTITION
-#define CONFIG_EFI_PARTITION
-#define CONFIG_CMD_PART
-#define CONFIG_PARTITION_UUIDS
-
-
 #define CONFIG_IRAM_STACK	0x02050000
 
 #define CONFIG_SYS_INIT_SP_ADDR	CONFIG_IRAM_STACK
 
-/* I2C */
-#define CONFIG_SYS_I2C_INIT_BOARD
-#define CONFIG_SYS_I2C
-#define CONFIG_CMD_I2C
-#define CONFIG_SYS_I2C_S3C24X0_SPEED	100000		/* 100 Kbps */
-#define CONFIG_SYS_I2C_S3C24X0
-#define CONFIG_MAX_I2C_NUM	8
-#define CONFIG_SYS_I2C_S3C24X0_SLAVE    0x0
-#define CONFIG_I2C_EDID
-
 /* PMIC */
 #define CONFIG_PMIC
 #define CONFIG_POWER_I2C
@@ -230,26 +55,6 @@
 
 #define CONFIG_PREBOOT
 
-/* Ethernet Controllor Driver */
-#ifdef CONFIG_CMD_NET
-#define CONFIG_SMC911X
-#define CONFIG_SMC911X_BASE		0x5000000
-#define CONFIG_SMC911X_16_BIT
-#define CONFIG_ENV_SROM_BANK		1
-#endif /*CONFIG_CMD_NET*/
-
-/* Enable PXE Support */
-#ifdef CONFIG_CMD_NET
-#define CONFIG_CMD_PXE
-#define CONFIG_MENU
-#endif
-
-/* Enable devicetree support */
-#define CONFIG_OF_LIBFDT
-
-/* Enable Time Command */
-#define CONFIG_CMD_TIME
-
 #define CONFIG_S5P_PA_SYSRAM	0x02020000
 #define CONFIG_SMP_PEN_ADDR	CONFIG_S5P_PA_SYSRAM
 
include/configs/exynos-common.h +0 -1
index 7b9eda4..54b61d7 100644
@@ -20,7 +20,6 @@
 #define CONFIG_ARCH_CPU_INIT
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
-#define CONFIG_BOARD_COMMON
 #define CONFIG_SKIP_LOWLEVEL_INIT
 #define CONFIG_BOARD_EARLY_INIT_F
 
include/configs/exynos4-common.h +1 -0
index faf98dd..0795da7 100644
@@ -16,6 +16,7 @@
 /* Enable fdt support */
 #define CONFIG_OF_CONTROL
 #define CONFIG_OF_SEPARATE
+#define CONFIG_BOARD_COMMON
 
 #define CONFIG_SYS_CACHELINE_SIZE	32
 #define CONFIG_REVISION_TAG
include/configs/exynos5-common.h +0 -12
index 3f93549..ff7a366 100644
@@ -14,7 +14,6 @@
 #include "exynos-common.h"
 
 #define CONFIG_SYS_CACHELINE_SIZE	64
-#define CONFIG_ARCH_EARLY_INIT_R
 #define CONFIG_EXYNOS_SPL
 
 /* Enable fdt support for Exynos5250 */
@@ -87,8 +86,6 @@
 /* specific .lds file */
 #define CONFIG_SPL_LDSCRIPT	"board/samsung/common/exynos-uboot-spl.lds"
 
-/* Miscellaneous configurable options */
-#define CONFIG_DEFAULT_CONSOLE		"console=ttySAC1,115200n8\0"
 /* Boot Argument Buffer Size */
 /* memtest works on */
 #define CONFIG_SYS_MEMTEST_START	CONFIG_SYS_SDRAM_BASE
@@ -136,15 +133,10 @@
 #define CONFIG_BL1_OFFSET	(CONFIG_RES_BLOCK_SIZE + CONFIG_SEC_FW_SIZE)
 #define CONFIG_BL2_OFFSET	(CONFIG_BL1_OFFSET + CONFIG_BL1_SIZE)
 
-/* Store environment@the end of a 4 MB SPI flash */
-#define FLASH_SIZE		(0x4 << 20)
-#define CONFIG_ENV_OFFSET	(FLASH_SIZE - CONFIG_BL2_SIZE)
-
 /* U-boot copy size from boot Media to DRAM.*/
 #define BL2_START_OFFSET	(CONFIG_BL2_OFFSET/512)
 #define BL2_SIZE_BLOC_COUNT	(CONFIG_BL2_SIZE/512)
 
-#define CONFIG_SPI_BOOTING
 #define EXYNOS_COPY_SPI_FNPTR_ADDR	0x02020058
 #define SPI_FLASH_UBOOT_POS	(CONFIG_SEC_FW_SIZE + CONFIG_BL1_SIZE)
 
@@ -159,10 +151,6 @@
 #define CONFIG_I2C_EDID
 
 /* SPI */
-#define CONFIG_ENV_IS_IN_SPI_FLASH
-#define CONFIG_SPI_FLASH
-#define CONFIG_ENV_SPI_BASE	0x12D30000
-
 #ifdef CONFIG_SPI_FLASH
 #define CONFIG_EXYNOS_SPI
 #define CONFIG_CMD_SF
include/configs/exynos5250-common.h +0 -5
index 987eb15..713614f 100644
@@ -24,8 +24,6 @@
 
 /* USB */
 #define CONFIG_CMD_USB
-#define CONFIG_USB_XHCI
-#define CONFIG_USB_XHCI_EXYNOS
 #define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS	2
 #define CONFIG_USB_STORAGE
 
@@ -33,9 +31,6 @@
 
 #define CONFIG_BOOTCOMMAND	"mmc read 40007000 451 2000; bootm 40007000"
 
-#define CONFIG_SYS_PROMPT		"SMDK5250 # "
-#define CONFIG_IDENT_STRING		" for SMDK5250"
-
 #define CONFIG_IRAM_STACK	0x02050000
 
 #define CONFIG_SYS_INIT_SP_ADDR	CONFIG_IRAM_STACK
include/configs/exynos5420-common.h +14 -0
index 27e7edc..b0f940c 100644
@@ -11,8 +11,17 @@
 
 #define CONFIG_EXYNOS5420
 
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_SPI_FLASH
+#define CONFIG_ENV_SPI_BASE	0x12D30000
+#define FLASH_SIZE		(0x4 << 20)
+#define CONFIG_ENV_OFFSET	(FLASH_SIZE - CONFIG_BL2_SIZE)
+#define CONFIG_SPI_BOOTING
+
 #include <configs/exynos5-common.h>
 
+#define CONFIG_ARCH_EARLY_INIT_R
+
 #define MACH_TYPE_SMDK5420	8002
 #define CONFIG_MACH_TYPE	MACH_TYPE_SMDK5420
 
@@ -37,6 +46,8 @@
 
 #define CONFIG_BOOTCOMMAND	"mmc read 20007000 451 2000; bootm 20007000"
 
+#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS	2
+
 /*
  * Put the initial stack pointer 1KB below this to allow room for the
  * SPL marker. This value is arbitrary, but gd_t is placed starting here.
@@ -47,4 +58,7 @@
 #define CONFIG_NR_DRAM_BANKS	7
 #define SDRAM_BANK_SIZE		(512UL << 20UL)	/* 512 MB */
 
+/* Miscellaneous configurable options */
+#define CONFIG_DEFAULT_CONSOLE		"console=ttySAC1,115200n8\0"
+
 #endif	/* __CONFIG_EXYNOS5420_H */
include/configs/peach-pit.h +10 -0
index 6cf8c74..a113ce5 100644
@@ -9,11 +9,18 @@
 #ifndef __CONFIG_PEACH_PIT_H
 #define __CONFIG_PEACH_PIT_H
 
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_SPI_FLASH
+#define CONFIG_ENV_SPI_BASE	0x12D30000
+#define FLASH_SIZE		(0x4 << 20)
+#define CONFIG_ENV_OFFSET	(FLASH_SIZE - CONFIG_BL2_SIZE)
+
 #include <configs/exynos5420-common.h>
 #include <configs/exynos5-dt-common.h>
 
 #undef CONFIG_DEFAULT_DEVICE_TREE
 #define CONFIG_DEFAULT_DEVICE_TREE	exynos5420-peach-pit
+#define CONFIG_BOARD_COMMON
 
 /* select serial console configuration */
 #define CONFIG_SERIAL3		/* use SERIAL 3 */
@@ -34,4 +41,7 @@
 #define CONFIG_POWER_TPS65090_EC
 #define CONFIG_CROS_EC_SPI		/* Support CROS_EC over SPI */
 
+#define CONFIG_USB_XHCI
+#define CONFIG_USB_XHCI_EXYNOS
+
 #endif	/* __CONFIG_PEACH_PIT_H */
include/configs/smdk5250.h +19 -0
index 37dc092..71d8480 100644
@@ -9,9 +9,28 @@
 #ifndef __CONFIG_SMDK_H
 #define __CONFIG_SMDK_H
 
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_SPI_FLASH
+#define CONFIG_ENV_SPI_BASE	0x12D30000
+#define FLASH_SIZE		(0x4 << 20)
+#define CONFIG_ENV_OFFSET	(FLASH_SIZE - CONFIG_BL2_SIZE)
+#define CONFIG_SPI_BOOTING
+
 #include <configs/exynos5250-common.h>
 
 #undef CONFIG_DEFAULT_DEVICE_TREE
 #define CONFIG_DEFAULT_DEVICE_TREE	exynos5250-smdk5250
 
+#define CONFIG_BOARD_COMMON
+#define CONFIG_ARCH_EARLY_INIT_R
+
+#define CONFIG_USB_XHCI
+#define CONFIG_USB_XHCI_EXYNOS
+
+#define CONFIG_SYS_PROMPT		"SMDK5250 # "
+#define CONFIG_IDENT_STRING		" for SMDK5250"
+
+/* Miscellaneous configurable options */
+#define CONFIG_DEFAULT_CONSOLE		"console=ttySAC1,115200n8\0"
+
 #endif	/* __CONFIG_SMDK_H */
include/configs/smdk5420.h +3 -0
index 2eaff21..56f3c02 100644
@@ -11,6 +11,8 @@
 
 #include <configs/exynos5420-common.h>
 
+#define CONFIG_BOARD_COMMON
+
 #define CONFIG_SMDK5420			/* which is in a SMDK5420 */
 
 #undef CONFIG_DEFAULT_DEVICE_TREE
@@ -21,5 +23,6 @@
 
 #define CONFIG_SYS_PROMPT	"SMDK5420 # "
 #define CONFIG_IDENT_STRING	" for SMDK5420"
+#define CONFIG_DEFAULT_CONSOLE		"console=ttySAC1,115200n8\0"
 
 #endif	/* __CONFIG_SMDK5420_H */
include/configs/snow.h +17 -0
index 93a03b1..246e958 100644
@@ -9,6 +9,13 @@
 #ifndef __CONFIG_SNOW_H
 #define __CONFIG_SNOW_H
 
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_SPI_FLASH
+#define CONFIG_ENV_SPI_BASE	0x12D30000
+#define FLASH_SIZE		(0x4 << 20)
+#define CONFIG_ENV_OFFSET	(FLASH_SIZE - CONFIG_BL2_SIZE)
+#define CONFIG_SPI_BOOTING
+
 #include <configs/exynos5250-common.h>
 #include <configs/exynos5-dt-common.h>
 
@@ -18,4 +25,14 @@
 #define CONFIG_CROS_EC_I2C		/* Support CROS_EC over I2C */
 #define CONFIG_POWER_TPS65090_I2C
 
+#define CONFIG_BOARD_COMMON
+#define CONFIG_ARCH_EARLY_INIT_R
+
+#define CONFIG_USB_XHCI
+#define CONFIG_USB_XHCI_EXYNOS
+
+#define CONFIG_SYS_PROMPT		"snow # "
+#define CONFIG_IDENT_STRING		" for snow"
+#define CONFIG_DEFAULT_CONSOLE		"console=ttySAC1,115200n8\0"
+
 #endif	/* __CONFIG_SNOW_H */
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#12 lore raw

PATCH v5 12/15 config: Move smdkv310 to use common exynos4 file

In reply to Simon Glass

Most of the smdkv310 features are common with other exynos4 boards. To permit easier addition of driver model support, use the common file and add a device tree file.

---

Changes in v5: None
Changes in v4:
- Rebase on top of master (CONFIG_OF settings moved to Kconfig)

Changes in v3: None
Changes in v2:
- Leave in a few configs which are not in fact common to all boards

 arch/arm/dts/Makefile                |  1 +
 arch/arm/dts/exynos4210-smdkv310.dts | 21 ++++++++++++
 include/configs/smdkv310.h           | 63 +++++++-----------------------------
 3 files changed, 34 insertions(+), 51 deletions(-)
 create mode 100644 arch/arm/dts/exynos4210-smdkv310.dts
arch/arm/dts/Makefile +1 -0
index 1ccd827..f72207d 100644
@@ -1,4 +1,5 @@
 dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \
+	exynos4210-smdkv310.dtb \
 	exynos4210-universal_c210.dtb \
 	exynos4210-trats.dtb \
 	exynos4412-trats2.dtb \
arch/arm/dts/exynos4210-smdkv310.dts new file +21 -0
new file mode 100644
index 0000000..c390c8f
@@ -0,0 +1,21 @@
+/*
+ * Samsung's Exynos4210-based SMDKV310 board device tree source
+ *
+ * Copyright (c) 2014 Google, Inc
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+/dts-v1/;
+/include/ "exynos4.dtsi"
+
+/ {
+	model = "Samsung SMDKV310 on Exynos4210";
+	compatible = "samsung,smdkv310", "samsung,exynos4210";
+
+	aliases {
+		serial0 = "/serial at 13800000";
+		console = "/serial at 13820000";
+	};
+
+};
include/configs/smdkv310.h +12 -51

119 lines not on this page · raw message

Signature · 1 line
2.1.0.rc2.206.gedb03e5
#13 lore raw

PATCH v5 13/15 samsung: Enable device tree for s5p_goni

In reply to Simon Glass

Change this board to add a device tree.

This also adds a pinmux header file although it is not used as yet.

---

Changes in v5: None
Changes in v4:
- Rebase on top of master (CONFIG_OF settings moved to Kconfig)

Changes in v3:
- Adjust device tree file based on Robert Baldyga's example

Changes in v2:
- Avoid using a common file, and just add a device tree
- Fix device tree base addresses

 arch/arm/Kconfig                           |  9 +++--
 arch/arm/cpu/armv7/s5pc1xx/Kconfig         | 19 ++++++++++
 arch/arm/dts/Makefile                      |  1 +
 arch/arm/dts/s5pc1xx-goni.dts              | 28 ++++++++++++++
 arch/arm/include/asm/arch-s5pc1xx/periph.h | 61 ++++++++++++++++++++++++++++++
 arch/arm/include/asm/arch-s5pc1xx/pinmux.h | 50 ++++++++++++++++++++++++
 configs/s5p_goni_defconfig                 |  1 +
 drivers/mmc/s5p_sdhci.c                    |  2 -
 include/configs/s5p_goni.h                 |  7 +++-
 9 files changed, 171 insertions(+), 7 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/s5pc1xx/Kconfig
 create mode 100644 arch/arm/dts/s5pc1xx-goni.dts
 create mode 100644 arch/arm/include/asm/arch-s5pc1xx/periph.h
 create mode 100644 arch/arm/include/asm/arch-s5pc1xx/pinmux.h
arch/arm/Kconfig +5 -4
index 22f0f09..c12a9a3 100644
@@ -334,6 +334,9 @@ config TARGET_BCM958622HR
 config ARCH_EXYNOS
 	bool "Samsung EXYNOS"
 
+config ARCH_S5PC1XX
+	bool "Samsung S5PC1XX"
+
 config ARCH_HIGHBANK
 	bool "Calxeda Highbank"
 
@@ -424,9 +427,6 @@ config OMAP54XX
 config RMOBILE
 	bool "Renesas ARM SoCs"
 
-config TARGET_S5P_GONI
-	bool "Support s5p_goni"
-
 config TARGET_SMDKC100
 	bool "Support smdkc100"
 
@@ -533,6 +533,8 @@ source "arch/arm/cpu/arm926ejs/orion5x/Kconfig"
 
 source "arch/arm/cpu/armv7/rmobile/Kconfig"
 
+source "arch/arm/cpu/armv7/s5pc1xx/Kconfig"
+
 source "arch/arm/cpu/armv7/tegra-common/Kconfig"
 
 source "arch/arm/cpu/arm926ejs/versatile/Kconfig"
@@ -635,7 +637,6 @@ source "board/raspberrypi/rpi_b/Kconfig"
 source "board/ronetix/pm9261/Kconfig"
 source "board/ronetix/pm9263/Kconfig"
 source "board/ronetix/pm9g45/Kconfig"
-source "board/samsung/goni/Kconfig"
 source "board/samsung/smdk2410/Kconfig"
 source "board/samsung/smdkc100/Kconfig"
 source "board/sandisk/sansa_fuze_plus/Kconfig"
arch/arm/cpu/armv7/s5pc1xx/Kconfig new file +19 -0
new file mode 100644
index 0000000..7919cf8
@@ -0,0 +1,19 @@
+if ARCH_S5PC1XX
+
+choice
+	prompt "S5PC1XX board select"
+
+config TARGET_S5P_GONI
+	bool "S5P Goni board"
+
+endchoice
+
+config SYS_CPU
+	default "armv7"
+
+config SYS_SOC
+	default "s5pc1xx"
+
+source "board/samsung/goni/Kconfig"
+
+endif
arch/arm/dts/Makefile +1 -0
index f72207d..8a8ee56 100644
@@ -1,3 +1,4 @@
+dtb-$(CONFIG_S5PC110) += s5pc1xx-goni.dtb
 dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \
 	exynos4210-smdkv310.dtb \
 	exynos4210-universal_c210.dtb \
arch/arm/dts/s5pc1xx-goni.dts new file +28 -0
new file mode 100644
index 0000000..2e671bb
@@ -0,0 +1,28 @@
+/*
+ * Samsung's S5PC110-based Goni board device tree source
+ *
+ * Copyright (c) 2014 Google, Inc
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+/dts-v1/;
+
+#include "skeleton.dtsi"
+
+/ {
+	model = "Samsung Goni based on S5PC110";
+	compatible = "samsung,goni", "samsung,s5pc110";
+
+	aliases {
+		serial2 = "/serial at e2900800";
+		console = "/serial at e2900800";
+	};
+
+	serial at e2900800 {
+		compatible = "samsung,exynos4210-uart";
+		reg = <0xe2900800 0x400>;
+		id = <2>;
+	};
+
+};
arch/arm/include/asm/arch-s5pc1xx/periph.h new file +61 -0

61 lines not on this page · raw message

arch/arm/include/asm/arch-s5pc1xx/pinmux.h new file +50 -0

50 lines not on this page · raw message

configs/s5p_goni_defconfig +1 -0
index c0c3509..da1800f 100644
@@ -1,2 +1,3 @@
 CONFIG_ARM=y
+CONFIG_ARCH_S5PC1XX=y
 CONFIG_TARGET_S5P_GONI=y
drivers/mmc/s5p_sdhci.c +0 -2
index 2ff0ec2..637dd97 100644
@@ -14,9 +14,7 @@
 #include <asm/arch/mmc.h>
 #include <asm/arch/clk.h>
 #include <errno.h>
-#ifdef CONFIG_OF_CONTROL
 #include <asm/arch/pinmux.h>
-#endif
 
 static char *S5P_NAME = "SAMSUNG SDHCI";
 static void s5p_sdhci_set_control_reg(struct sdhci_host *host)
include/configs/s5p_goni.h +6 -1
index a51215d..7bba3c5 100644
@@ -53,6 +53,7 @@
 #define CONFIG_MMC
 #define CONFIG_SDHCI
 #define CONFIG_S5P_SDHCI
+#define SDHCI_MAX_HOSTS		4
 
 /* PWM */
 #define CONFIG_PWM			1
@@ -106,7 +107,6 @@
 				",12m(modem)"\
 				",60m(qboot)\0"
 
-#define CONFIG_BOOTDELAY		1
 #define CONFIG_ZERO_BOOTDELAY_CHECK
 
 /* partitions definitions */
@@ -283,4 +283,9 @@
 #define CONFIG_CMD_USB_MASS_STORAGE
 #define CONFIG_USB_GADGET_MASS_STORAGE
 
+#define CONFIG_OF_LIBFDT
+#define CONFIG_OF_CONTROL
+#define CONFIG_OF_SEPARATE
+#define CONFIG_DEFAULT_DEVICE_TREE	s5pc1xx-goni
+
 #endif	/* __CONFIG_H */
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#14 lore raw

PATCH v5 14/15 samsung: Enable device tree for smdkc100

In reply to Simon Glass

Change this board to add a device tree.

---

Changes in v5:
- Rebase on top of samsung/master

Changes in v4:
- Rebase on top of master (CONFIG_OF settings moved to Kconfig)

Changes in v3: None
Changes in v2:
- Avoid using a common file, and just add a device tree
- Fix device tree base addresses

 arch/arm/Kconfig                   |  4 ----
 arch/arm/cpu/armv7/s5pc1xx/Kconfig |  5 +++++
 arch/arm/dts/Makefile              |  1 +
 arch/arm/dts/s5pc1xx-smdkc100.dts  | 29 +++++++++++++++++++++++++++++
 configs/smdkc100_defconfig         |  1 +
 include/configs/smdkc100.h         |  5 +++++
 6 files changed, 41 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm/dts/s5pc1xx-smdkc100.dts
arch/arm/Kconfig +0 -4
index c12a9a3..ed89ec2 100644
@@ -427,9 +427,6 @@ config OMAP54XX
 config RMOBILE
 	bool "Renesas ARM SoCs"
 
-config TARGET_SMDKC100
-	bool "Support smdkc100"
-
 config TARGET_SOCFPGA_CYCLONE5
 	bool "Support socfpga_cyclone5"
 
@@ -638,7 +635,6 @@ source "board/ronetix/pm9261/Kconfig"
 source "board/ronetix/pm9263/Kconfig"
 source "board/ronetix/pm9g45/Kconfig"
 source "board/samsung/smdk2410/Kconfig"
-source "board/samsung/smdkc100/Kconfig"
 source "board/sandisk/sansa_fuze_plus/Kconfig"
 source "board/scb9328/Kconfig"
 source "board/schulercontrol/sc_sps_1/Kconfig"
arch/arm/cpu/armv7/s5pc1xx/Kconfig +5 -0
index 7919cf8..4ee52b2 100644
@@ -6,6 +6,10 @@ choice
 config TARGET_S5P_GONI
 	bool "S5P Goni board"
 
+config TARGET_SMDKC100
+	bool "Support smdkc100 board"
+	select OF_CONTROL if !SPL_BUILD
+
 endchoice
 
 config SYS_CPU
@@ -15,5 +19,6 @@ config SYS_SOC
 	default "s5pc1xx"
 
 source "board/samsung/goni/Kconfig"
+source "board/samsung/smdkc100/Kconfig"
 
 endif
arch/arm/dts/Makefile +1 -0
index 8a8ee56..0e6830d 100644
@@ -1,3 +1,4 @@
+dtb-$(CONFIG_S5PC100) += s5pc1xx-smdkc100.dtb
 dtb-$(CONFIG_S5PC110) += s5pc1xx-goni.dtb
 dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \
 	exynos4210-smdkv310.dtb \
arch/arm/dts/s5pc1xx-smdkc100.dts new file +29 -0
new file mode 100644
index 0000000..42754ce
@@ -0,0 +1,29 @@
+/*
+ * Samsung's Exynos4210-based SMDKV310 board device tree source
+ *
+ * Copyright (c) 2014 Google, Inc
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+/dts-v1/;
+
+#include "skeleton.dtsi"
+
+/ {
+	model = "Samsung SMDKC100 based on S5PC100";
+	compatible = "samsung,smdkc100", "samsung,s5pc100";
+
+	aliases {
+		serial0 = "/serial at ec000000";
+		console = "/serial at ec000000";
+	};
+
+	serial at ec000000 {
+		compatible = "samsung,exynos4210-uart";
+		reg = <0xec000000 0x100>;
+		interrupts = <0 51 0>;
+		id = <0>;
+	};
+
+};
configs/smdkc100_defconfig +1 -0
index 7455235..5bbba1a 100644
@@ -1,2 +1,3 @@
 CONFIG_ARM=y
 CONFIG_TARGET_SMDKC100=y
+CONFIG_ARCH_S5PC1XX=y
include/configs/smdkc100.h +5 -0
index c9a2e15..eebe378 100644
@@ -217,4 +217,9 @@
 #define CONFIG_ENV_SROM_BANK   3       /* Select SROM Bank-3 for Ethernet*/
 #endif /* CONFIG_CMD_NET */
 
+#define CONFIG_OF_LIBFDT
+#define CONFIG_OF_CONTROL
+#define CONFIG_OF_SEPARATE
+#define CONFIG_DEFAULT_DEVICE_TREE	s5pc1xx-smdkc100
+
 #endif	/* __CONFIG_H */
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#15 lore raw

PATCH v5 15/15 exynos: Enable pre-relocation malloc()

In reply to Simon Glass

Enable this feature to support driver model before relocation.

---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 include/configs/exynos-common.h | 5 +++--
 include/configs/odroid.h        | 2 --
 include/configs/s5p_goni.h      | 5 +++--
 include/configs/smdkc100.h      | 4 ++++
 4 files changed, 10 insertions(+), 6 deletions(-)
include/configs/exynos-common.h +3 -2
index 54b61d7..371f32d 100644
@@ -38,8 +38,9 @@
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_ENV_OVERWRITE
 
-/* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (80 * SZ_1M))
+/* Size of malloc() pool before and after relocation */
+#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (80 << 20))
 
 /* select serial console configuration */
 #define CONFIG_BAUDRATE			115200
include/configs/odroid.h +0 -2
index 3309469..cecee68 100644
@@ -39,8 +39,6 @@
 #define CONFIG_SYS_TEXT_BASE		0x43e00000
 
 #include <linux/sizes.h>
-/* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (80 * SZ_1M))
 
 /* select serial console configuration */
 #define CONFIG_SERIAL1
include/configs/s5p_goni.h +3 -2
index 7bba3c5..197afc6 100644
@@ -39,8 +39,9 @@
 #define CONFIG_INITRD_TAG
 #define CONFIG_CMDLINE_EDITING
 
-/* Size of malloc() pool.*/
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 80 * SZ_1M)
+/* Size of malloc() pool before and after relocation */
+#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (80 << 20))
 
 /*
  * select serial console configuration
include/configs/smdkc100.h +4 -0
index eebe378..dc83812 100644
@@ -47,6 +47,10 @@
  * 1MB = 0x100000, 0x100000 = 1024 * 1024
  */
 #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + (1 << 20))
+
+/* Small malloc pool before relocation */
+#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
+
 /*
  * select serial console configuration
  */
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#16 lore raw

v5 cover samsung: Use common config files with Samsung boards

In reply to Simon Glass

Hi Minkyu,

Quoted 15 lines · Simon Glass

This series tries to unify the Samsung board configs into a few header files for exynos5 and exynos4.

The purpose is to make it easier to move to driver model. In that case I would like things like the GPIO drivers and serial drivers to work in a standard way, and not need to support device tree and platform data at the same time. That would be quite painful.

Another reason is that the Chrome OS EC drivers are currently included in boards that don't have a Chrome OS EC. This concern was raised by the Samsung maintainer (Minkyu) a while back.

There are still a few boards that don't use CONFIG_OF_CONTROL so I have updated these rudimentary of device tree files based on feedback.

Quoted 6 lines

This series has the side-effect of getting the EC interface working properly on Pit, so the keyboard works. It also provides access to the TPS65090 PMIC, which means that the backlight is enabled.

Changes in v5:
- Rebase on top of samsung/master

Please check this and see if it works for what you need.

I suppose the merge will be Albert's problem, but I will do a patch once I know the detla.

Regards,
Simon

#17 lore raw

v5 cover samsung: Use common config files with Samsung boards

Hi Minkyu,

Quoted 22 lines · Simon Glass

Hi Minkyu,

Quoted 19 lines · Simon Glass

This series tries to unify the Samsung board configs into a few header files for exynos5 and exynos4.

The purpose is to make it easier to move to driver model. In that case I would like things like the GPIO drivers and serial drivers to work in a standard way, and not need to support device tree and platform data at the same time. That would be quite painful.

Another reason is that the Chrome OS EC drivers are currently included in boards that don't have a Chrome OS EC. This concern was raised by the Samsung maintainer (Minkyu) a while back.

There are still a few boards that don't use CONFIG_OF_CONTROL so I have updated these rudimentary of device tree files based on feedback.

This series has the side-effect of getting the EC interface working properly on Pit, so the keyboard works. It also provides access to the TPS65090 PMIC, which means that the backlight is enabled.

Quoted 7 lines
Quoted 2 lines

Changes in v5:
- Rebase on top of samsung/master

Please check this and see if it works for what you need.

I suppose the merge will be Albert's problem, but I will do a patch once I know the detla.

Actually I see that Albert has pulled this in. So v4 should work for you now. I just tried applying it on u-boot-arm/master and it worked OK.

Regards,
Simon

#18 lore raw

v5 cover samsung: Use common config files with Samsung boards

Dear Simon Glass,

Quoted 33 lines · Simon Glass

Hi Minkyu,

Quoted 22 lines · Simon Glass

Hi Minkyu,

Quoted 19 lines · Simon Glass

This series tries to unify the Samsung board configs into a few header files for exynos5 and exynos4.

The purpose is to make it easier to move to driver model. In that case I would like things like the GPIO drivers and serial drivers to work in a standard way, and not need to support device tree and platform data at the same time. That would be quite painful.

Another reason is that the Chrome OS EC drivers are currently included in boards that don't have a Chrome OS EC. This concern was raised by the Samsung maintainer (Minkyu) a while back.

There are still a few boards that don't use CONFIG_OF_CONTROL so I have updated these rudimentary of device tree files based on feedback.

This series has the side-effect of getting the EC interface working properly on Pit, so the keyboard works. It also provides access to the TPS65090 PMIC, which means that the backlight is enabled.

Quoted 7 lines
Quoted 2 lines

Changes in v5:
- Rebase on top of samsung/master

Please check this and see if it works for what you need.

I suppose the merge will be Albert's problem, but I will do a patch once I know the detla.

Quoted 7 lines

Actually I see that Albert has pulled this in. So v4 should work for you now. I just tried applying it on u-boot-arm/master and it worked OK.

Regards,
Simon

Hm, I tried to apply. but failed..

Applying: Exynos: Use 900MHz ARM frequency in SPL for peach_pit
Applying: exynos5: Enable data cache
Applying: cros_ec: power: Add a tunnelled version of the tps65090 driver
Applying: cros_ec: exynos: Use the correct tps65090 driver in each case
Applying: dm: exynos: Split out the cros_ec drivers
Applying: exynos: dts: Add device tree node for cros_ec keyboard
Applying: exynos: Rename -dt config files to -common
Applying: exynos: Move common exynos settings into a common file
Applying: exynos: Move common smdk5420 things to common file
Applying: exynos: config: Move cros_ec and tps65090 out of smdk boards
Applying: config: Move arndale to use common exynos5250 file
Applying: config: Move smdkv310 to use common exynos4 file
Applying: samsung: Enable device tree for s5p_goni
error: patch failed: arch/arm/Kconfig:547
error: arch/arm/Kconfig: patch does not apply
Patch failed at 0013 samsung: Enable device tree for s5p_goni

Thanks,
Minkyu Kang.

#19 lore raw

v5 cover samsung: Use common config files with Samsung boards

Hi Minkyu,

Quoted 46 lines · Minkyu Kang

Dear Simon Glass,

Quoted 33 lines · Simon Glass

Hi Minkyu,

Quoted 22 lines · Simon Glass

Hi Minkyu,

Quoted 19 lines · Simon Glass

This series tries to unify the Samsung board configs into a few header files for exynos5 and exynos4.

The purpose is to make it easier to move to driver model. In that case I would like things like the GPIO drivers and serial drivers to work in a standard way, and not need to support device tree and platform data at the same time. That would be quite painful.

Another reason is that the Chrome OS EC drivers are currently included in boards that don't have a Chrome OS EC. This concern was raised by the Samsung maintainer (Minkyu) a while back.

There are still a few boards that don't use CONFIG_OF_CONTROL so I have updated these rudimentary of device tree files based on feedback.

This series has the side-effect of getting the EC interface working properly on Pit, so the keyboard works. It also provides access to the TPS65090 PMIC, which means that the backlight is enabled.

Quoted 7 lines
Quoted 2 lines

Changes in v5:
- Rebase on top of samsung/master

Please check this and see if it works for what you need.

I suppose the merge will be Albert's problem, but I will do a patch once I know the detla.

Quoted 7 lines

Actually I see that Albert has pulled this in. So v4 should work for you now. I just tried applying it on u-boot-arm/master and it worked OK.

Regards,
Simon

Hm, I tried to apply. but failed..

Quoted 17 lines

Applying: Exynos: Use 900MHz ARM frequency in SPL for peach_pit
Applying: exynos5: Enable data cache
Applying: cros_ec: power: Add a tunnelled version of the tps65090 driver
Applying: cros_ec: exynos: Use the correct tps65090 driver in each case
Applying: dm: exynos: Split out the cros_ec drivers
Applying: exynos: dts: Add device tree node for cros_ec keyboard
Applying: exynos: Rename -dt config files to -common
Applying: exynos: Move common exynos settings into a common file
Applying: exynos: Move common smdk5420 things to common file
Applying: exynos: config: Move cros_ec and tps65090 out of smdk boards
Applying: config: Move arndale to use common exynos5250 file
Applying: config: Move smdkv310 to use common exynos4 file
Applying: samsung: Enable device tree for s5p_goni
error: patch failed: arch/arm/Kconfig:547
error: arch/arm/Kconfig: patch does not apply
Patch failed at 0013 samsung: Enable device tree for s5p_goni

It looks like you still haven't synced up with the ARM tree?

In particular there are these patches there that are needed:

f1ef2b6 kconfig: move CONFIG_DEFAULT_DEVICE_TREE to kconfig 783e6a7 kconfig: move CONFIG_OF_* to Kconfig

I put a bundle here:

http://patchwork.ozlabs.org/bundle/sjg/pitv4/

This should apply OK once you sync up with arm again. If you still have problems then, please let me know.

Regards,
Simon

#20 lore raw

v5 cover samsung: Use common config files with Samsung boards

Quoted 74 lines · Simon Glass

Hi Minkyu,

Quoted 46 lines · Minkyu Kang

Dear Simon Glass,

Quoted 33 lines · Simon Glass

Hi Minkyu,

Quoted 22 lines · Simon Glass

Hi Minkyu,

Quoted 19 lines · Simon Glass

This series tries to unify the Samsung board configs into a few header files for exynos5 and exynos4.

The purpose is to make it easier to move to driver model. In that case I would like things like the GPIO drivers and serial drivers to work in a standard way, and not need to support device tree and platform data at the same time. That would be quite painful.

Another reason is that the Chrome OS EC drivers are currently included in boards that don't have a Chrome OS EC. This concern was raised by the Samsung maintainer (Minkyu) a while back.

There are still a few boards that don't use CONFIG_OF_CONTROL so I have updated these rudimentary of device tree files based on feedback.

This series has the side-effect of getting the EC interface working properly on Pit, so the keyboard works. It also provides access to the TPS65090 PMIC, which means that the backlight is enabled.

Quoted 7 lines
Quoted 2 lines

Changes in v5:
- Rebase on top of samsung/master

Please check this and see if it works for what you need.

I suppose the merge will be Albert's problem, but I will do a patch once I know the detla.

Quoted 7 lines

Actually I see that Albert has pulled this in. So v4 should work for you now. I just tried applying it on u-boot-arm/master and it worked OK.

Regards,
Simon

Hm, I tried to apply. but failed..

Quoted 17 lines

Applying: Exynos: Use 900MHz ARM frequency in SPL for peach_pit
Applying: exynos5: Enable data cache
Applying: cros_ec: power: Add a tunnelled version of the tps65090 driver
Applying: cros_ec: exynos: Use the correct tps65090 driver in each case
Applying: dm: exynos: Split out the cros_ec drivers
Applying: exynos: dts: Add device tree node for cros_ec keyboard
Applying: exynos: Rename -dt config files to -common
Applying: exynos: Move common exynos settings into a common file
Applying: exynos: Move common smdk5420 things to common file
Applying: exynos: config: Move cros_ec and tps65090 out of smdk boards
Applying: config: Move arndale to use common exynos5250 file
Applying: config: Move smdkv310 to use common exynos4 file
Applying: samsung: Enable device tree for s5p_goni
error: patch failed: arch/arm/Kconfig:547
error: arch/arm/Kconfig: patch does not apply
Patch failed at 0013 samsung: Enable device tree for s5p_goni

It looks like you still haven't synced up with the ARM tree?

In particular there are these patches there that are needed:

f1ef2b6 kconfig: move CONFIG_DEFAULT_DEVICE_TREE to kconfig 783e6a7 kconfig: move CONFIG_OF_* to Kconfig

Quoted 7 lines

I put a bundle here:

http://patchwork.ozlabs.org/bundle/sjg/pitv4/

This should apply OK once you sync up with arm again. If you still have problems then, please let me know.

No. I've sync with arm tree but it failed.
and I tried to apply on arm tree directly, it also failed. Please test it.

Thanks,
Minkyu Kang.

#21 lore raw

v5 cover samsung: Use common config files with Samsung boards

Hi Minkyu,

Quoted 79 lines · Minkyu Kang
Quoted 78 lines · Simon Glass

Hi Minkyu,

Quoted 46 lines · Minkyu Kang

Dear Simon Glass,

Quoted 33 lines · Simon Glass

Hi Minkyu,

Quoted 22 lines · Simon Glass

Hi Minkyu,

Quoted 19 lines · Simon Glass

This series tries to unify the Samsung board configs into a few header files for exynos5 and exynos4.

The purpose is to make it easier to move to driver model. In that case I would like things like the GPIO drivers and serial drivers to work in a standard way, and not need to support device tree and platform data at the same time. That would be quite painful.

Another reason is that the Chrome OS EC drivers are currently included in boards that don't have a Chrome OS EC. This concern was raised by the Samsung maintainer (Minkyu) a while back.

There are still a few boards that don't use CONFIG_OF_CONTROL so I have updated these rudimentary of device tree files based on feedback.

This series has the side-effect of getting the EC interface working properly on Pit, so the keyboard works. It also provides access to the TPS65090 PMIC, which means that the backlight is enabled.

Quoted 7 lines
Quoted 2 lines

Changes in v5:
- Rebase on top of samsung/master

Please check this and see if it works for what you need.

I suppose the merge will be Albert's problem, but I will do a patch once I know the detla.

Quoted 7 lines

Actually I see that Albert has pulled this in. So v4 should work for you now. I just tried applying it on u-boot-arm/master and it worked OK.

Regards,
Simon

Hm, I tried to apply. but failed..

Quoted 17 lines

Applying: Exynos: Use 900MHz ARM frequency in SPL for peach_pit
Applying: exynos5: Enable data cache
Applying: cros_ec: power: Add a tunnelled version of the tps65090 driver
Applying: cros_ec: exynos: Use the correct tps65090 driver in each case
Applying: dm: exynos: Split out the cros_ec drivers
Applying: exynos: dts: Add device tree node for cros_ec keyboard
Applying: exynos: Rename -dt config files to -common
Applying: exynos: Move common exynos settings into a common file
Applying: exynos: Move common smdk5420 things to common file
Applying: exynos: config: Move cros_ec and tps65090 out of smdk boards
Applying: config: Move arndale to use common exynos5250 file
Applying: config: Move smdkv310 to use common exynos4 file
Applying: samsung: Enable device tree for s5p_goni
error: patch failed: arch/arm/Kconfig:547
error: arch/arm/Kconfig: patch does not apply
Patch failed at 0013 samsung: Enable device tree for s5p_goni

It looks like you still haven't synced up with the ARM tree?

In particular there are these patches there that are needed:

f1ef2b6 kconfig: move CONFIG_DEFAULT_DEVICE_TREE to kconfig 783e6a7 kconfig: move CONFIG_OF_* to Kconfig

I put a bundle here:

http://patchwork.ozlabs.org/bundle/sjg/pitv4/

Quoted 7 lines
Quoted 3 lines

This should apply OK once you sync up with arm again. If you still have problems then, please let me know.

No. I've sync with arm tree but it failed.
and I tried to apply on arm tree directly, it also failed. Please test it.

Having a bit of a guess at what you are doing, since samsung/master still is not synced with arm/master.

I tried this:

git checkout -b try-samsung samsung/master
git pull upstream-arm master

and then applied the patches on top of this without errors. Maybe git is automatically fixing them up?

I'll send a v6 second with the resulting patches, If that doesn't work, can I ask you please to push your branch to samsung/master so I can be sure of what your base is?

Regards,
Simon