* [PATCH v2 0/5] ARM: EXYNOS: Add support for Trats board using device tree
@ 2012-09-04 8:50 Tomasz Figa
2012-09-04 8:50 ` [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk Tomasz Figa
` (4 more replies)
0 siblings, 5 replies; 27+ messages in thread
From: Tomasz Figa @ 2012-09-04 8:50 UTC (permalink / raw)
To: linux-arm-kernel
This patch series adds basic device tree support for Samsung Trats board
along with any necessary prerequisites.
In addition it refactors Exynos4 dts include files to split parts common to
the whole Exynos4 part from parts specific to Exynos4210 to allow further
extension of Exynos4210 dts include file and addition of include files for
other SoCs from Exynos4 line.
Changes since v1:
- Split into two series, general Exynos4 DT reorganization and this one.
- Addressed comments from v1.
Dependencies:
-> [PATCH v5] mmc: sdhci-s3c: Add device tree support
http://www.spinics.net/lists/linux-samsung-soc/msg12056.html
-> [PATCH v5 2/2] regulator: add device tree support for max8997
http://www.spinics.net/lists/kernel/msg1328117.html
-> [PATCH 0/3] ARM: dts: Exynos4 dts reorganization
http://www.spinics.net/lists/arm-kernel/msg192237.html
Tomasz Figa (5):
mmc: host: sdhci-s3c: Add broken-voltage DT property for broken
voltage quirk
ARM: Exynos4: dts: Specify address and size cells for i2c controllers
ARM: Exynos4: Add OF compatibility lookups for Exynos4 i2c adapters
ARM: EXYNOS: Increase maximum possible memory bank size to 512MiB
ARM: Exynos: Add basic dts file for Samsung Trats board
Documentation/devicetree/bindings/mmc/mmc.txt | 1 +
arch/arm/boot/dts/exynos4.dtsi | 16 ++
arch/arm/boot/dts/exynos4210-trats.dts | 237 ++++++++++++++++++++++++++
arch/arm/mach-exynos/Makefile.boot | 2 +-
arch/arm/mach-exynos/include/mach/memory.h | 4 +-
arch/arm/mach-exynos/mach-exynos4-dt.c | 14 ++
drivers/mmc/host/sdhci-s3c.c | 3 +
7 files changed, 274 insertions(+), 3 deletions(-)
create mode 100644 arch/arm/boot/dts/exynos4210-trats.dts
--
1.7.12
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk
2012-09-04 8:50 [PATCH v2 0/5] ARM: EXYNOS: Add support for Trats board using device tree Tomasz Figa
@ 2012-09-04 8:50 ` Tomasz Figa
2012-09-05 8:36 ` Jaehoon Chung
2012-09-19 5:42 ` Chris Ball
2012-09-04 8:50 ` [PATCH v2 2/5] ARM: Exynos4: dts: Specify address and size cells for i2c controllers Tomasz Figa
` (3 subsequent siblings)
4 siblings, 2 replies; 27+ messages in thread
From: Tomasz Figa @ 2012-09-04 8:50 UTC (permalink / raw)
To: linux-arm-kernel
Some boards use fixed voltage regulator for vmmc supply (e.g. for eMMC
memories). MMC_CAP2_BROKEN_VOLTAGE must be enabled for them to operate
correctly.
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Chris Ball <cjb@laptop.org>
CC: linux-mmc at vger.kernel.org
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
Documentation/devicetree/bindings/mmc/mmc.txt | 1 +
drivers/mmc/host/sdhci-s3c.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt
index 8a6811f..ecbde68 100644
--- a/Documentation/devicetree/bindings/mmc/mmc.txt
+++ b/Documentation/devicetree/bindings/mmc/mmc.txt
@@ -16,6 +16,7 @@ Optional properties:
- wp-inverted: when present, polarity on the wp gpio line is inverted
- non-removable: non-removable slot (like eMMC)
- max-frequency: maximum operating clock frequency
+- broken-voltage: vmmc regulator does not allow voltage control
Example:
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index 445910e..39715b8 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -443,6 +443,9 @@ static int __devinit sdhci_s3c_parse_dt(struct device *dev,
if (!ourhost->gpios)
return -ENOMEM;
+ if (of_get_property(node, "broken-voltage", 0))
+ pdata->host_caps2 |= MMC_CAP2_BROKEN_VOLTAGE;
+
/* get the card detection method */
if (of_get_property(node, "broken-cd", 0)) {
pdata->cd_type = S3C_SDHCI_CD_NONE;
--
1.7.12
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v2 2/5] ARM: Exynos4: dts: Specify address and size cells for i2c controllers
2012-09-04 8:50 [PATCH v2 0/5] ARM: EXYNOS: Add support for Trats board using device tree Tomasz Figa
2012-09-04 8:50 ` [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk Tomasz Figa
@ 2012-09-04 8:50 ` Tomasz Figa
2012-09-05 3:58 ` Thomas Abraham
2012-09-04 8:50 ` [PATCH v2 3/5] ARM: Exynos4: Add OF compatibility lookups for Exynos4 i2c adapters Tomasz Figa
` (2 subsequent siblings)
4 siblings, 1 reply; 27+ messages in thread
From: Tomasz Figa @ 2012-09-04 8:50 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/boot/dts/exynos4.dtsi | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index 9b71b61..718e3d2 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -122,6 +122,8 @@
};
i2c at 13860000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "samsung,s3c2440-i2c";
reg = <0x13860000 0x100>;
interrupts = <0 58 0>;
@@ -129,6 +131,8 @@
};
i2c at 13870000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "samsung,s3c2440-i2c";
reg = <0x13870000 0x100>;
interrupts = <0 59 0>;
@@ -136,6 +140,8 @@
};
i2c at 13880000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "samsung,s3c2440-i2c";
reg = <0x13880000 0x100>;
interrupts = <0 60 0>;
@@ -143,6 +149,8 @@
};
i2c at 13890000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "samsung,s3c2440-i2c";
reg = <0x13890000 0x100>;
interrupts = <0 61 0>;
@@ -150,6 +158,8 @@
};
i2c at 138A0000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "samsung,s3c2440-i2c";
reg = <0x138A0000 0x100>;
interrupts = <0 62 0>;
@@ -157,6 +167,8 @@
};
i2c at 138B0000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "samsung,s3c2440-i2c";
reg = <0x138B0000 0x100>;
interrupts = <0 63 0>;
@@ -164,6 +176,8 @@
};
i2c at 138C0000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "samsung,s3c2440-i2c";
reg = <0x138C0000 0x100>;
interrupts = <0 64 0>;
@@ -171,6 +185,8 @@
};
i2c at 138D0000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "samsung,s3c2440-i2c";
reg = <0x138D0000 0x100>;
interrupts = <0 65 0>;
--
1.7.12
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v2 3/5] ARM: Exynos4: Add OF compatibility lookups for Exynos4 i2c adapters
2012-09-04 8:50 [PATCH v2 0/5] ARM: EXYNOS: Add support for Trats board using device tree Tomasz Figa
2012-09-04 8:50 ` [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk Tomasz Figa
2012-09-04 8:50 ` [PATCH v2 2/5] ARM: Exynos4: dts: Specify address and size cells for i2c controllers Tomasz Figa
@ 2012-09-04 8:50 ` Tomasz Figa
2012-09-05 3:59 ` Thomas Abraham
2012-09-04 8:50 ` [PATCH v2 4/5] ARM: EXYNOS: Increase maximum possible memory bank size to 512MiB Tomasz Figa
2012-09-04 8:50 ` [PATCH v2 5/5] ARM: Exynos: Add basic dts file for Samsung Trats board Tomasz Figa
4 siblings, 1 reply; 27+ messages in thread
From: Tomasz Figa @ 2012-09-04 8:50 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/mach-exynos4-dt.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c
index 8dad4ec..5f805b4 100644
--- a/arch/arm/mach-exynos/mach-exynos4-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos4-dt.c
@@ -55,6 +55,20 @@ static const struct of_dev_auxdata exynos4_auxdata_lookup[] __initconst = {
"exynos4-sdhci.3", NULL),
OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(0),
"s3c2440-i2c.0", NULL),
+ OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(1),
+ "s3c2440-i2c.1", NULL),
+ OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(2),
+ "s3c2440-i2c.2", NULL),
+ OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(3),
+ "s3c2440-i2c.3", NULL),
+ OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(4),
+ "s3c2440-i2c.4", NULL),
+ OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(5),
+ "s3c2440-i2c.5", NULL),
+ OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(6),
+ "s3c2440-i2c.6", NULL),
+ OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(7),
+ "s3c2440-i2c.7", NULL),
OF_DEV_AUXDATA("samsung,exynos4210-spi", EXYNOS4_PA_SPI0,
"exynos4210-spi.0", NULL),
OF_DEV_AUXDATA("samsung,exynos4210-spi", EXYNOS4_PA_SPI1,
--
1.7.12
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v2 4/5] ARM: EXYNOS: Increase maximum possible memory bank size to 512MiB
2012-09-04 8:50 [PATCH v2 0/5] ARM: EXYNOS: Add support for Trats board using device tree Tomasz Figa
` (2 preceding siblings ...)
2012-09-04 8:50 ` [PATCH v2 3/5] ARM: Exynos4: Add OF compatibility lookups for Exynos4 i2c adapters Tomasz Figa
@ 2012-09-04 8:50 ` Tomasz Figa
2012-09-08 2:41 ` Kukjin Kim
2012-09-04 8:50 ` [PATCH v2 5/5] ARM: Exynos: Add basic dts file for Samsung Trats board Tomasz Figa
4 siblings, 1 reply; 27+ messages in thread
From: Tomasz Figa @ 2012-09-04 8:50 UTC (permalink / raw)
To: linux-arm-kernel
Some boards have larger memory banks than 256MiB. This patch increses
maximum bank size for Exynos-based boards to 512MiB.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/include/mach/memory.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-exynos/include/mach/memory.h b/arch/arm/mach-exynos/include/mach/memory.h
index 374ef2c..d4db508 100644
--- a/arch/arm/mach-exynos/include/mach/memory.h
+++ b/arch/arm/mach-exynos/include/mach/memory.h
@@ -15,8 +15,8 @@
#define PLAT_PHYS_OFFSET UL(0x40000000)
-/* Maximum of 256MiB in one bank */
+/* Maximum of 512MiB in one bank */
#define MAX_PHYSMEM_BITS 32
-#define SECTION_SIZE_BITS 28
+#define SECTION_SIZE_BITS 29
#endif /* __ASM_ARCH_MEMORY_H */
--
1.7.12
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v2 5/5] ARM: Exynos: Add basic dts file for Samsung Trats board
2012-09-04 8:50 [PATCH v2 0/5] ARM: EXYNOS: Add support for Trats board using device tree Tomasz Figa
` (3 preceding siblings ...)
2012-09-04 8:50 ` [PATCH v2 4/5] ARM: EXYNOS: Increase maximum possible memory bank size to 512MiB Tomasz Figa
@ 2012-09-04 8:50 ` Tomasz Figa
2012-09-05 4:05 ` Thomas Abraham
4 siblings, 1 reply; 27+ messages in thread
From: Tomasz Figa @ 2012-09-04 8:50 UTC (permalink / raw)
To: linux-arm-kernel
This commit adds basic device tree for Exynos4210-based Trats board.
Currently it provides support for eMMC over sdhci and MAX8997 PMIC.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/boot/dts/exynos4210-trats.dts | 237 +++++++++++++++++++++++++++++++++
arch/arm/mach-exynos/Makefile.boot | 2 +-
2 files changed, 238 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/boot/dts/exynos4210-trats.dts
diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts
new file mode 100644
index 0000000..73567b8
--- /dev/null
+++ b/arch/arm/boot/dts/exynos4210-trats.dts
@@ -0,0 +1,237 @@
+/*
+ * Samsung's Exynos4210 based Trats board device tree source
+ *
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * Device tree source file for Samsung's Trats board which is based on
+ * Samsung's Exynos4210 SoC.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+/dts-v1/;
+/include/ "exynos4210.dtsi"
+
+/ {
+ model = "Samsung Trats based on Exynos4210";
+ compatible = "samsung,trats", "samsung,exynos4210";
+
+ memory {
+ reg = <0x40000000 0x20000000
+ 0x60000000 0x20000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttySAC2,115200N8 root=/dev/mmcblk0p5 rootwait earlyprintk panic=5";
+ };
+
+ vemmc_reg: voltage-regulator at 0 {
+ compatible = "regulator-fixed";
+ regulator-name = "VMEM_VDD_2.8V";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ gpio = <&gpk0 2 1 0 0>;
+ enable-active-high;
+ };
+
+ sdhci_emmc: sdhci at 12510000 {
+ bus-width = <8>;
+ non-removable;
+ broken-voltage;
+ gpios = <&gpk0 0 2 0 3>,
+ <&gpk0 1 2 0 3>,
+ <&gpk0 3 2 2 3>,
+ <&gpk0 4 2 2 3>,
+ <&gpk0 5 2 2 3>,
+ <&gpk0 6 2 2 3>,
+ <&gpk1 3 3 3 3>,
+ <&gpk1 4 3 3 3>,
+ <&gpk1 5 3 3 3>,
+ <&gpk1 6 3 3 3>;
+ vmmc-supply = <&vemmc_reg>;
+ status = "okay";
+ };
+
+ serial at 13800000 {
+ status = "okay";
+ };
+
+ serial at 13810000 {
+ status = "okay";
+ };
+
+ serial at 13820000 {
+ status = "okay";
+ };
+
+ serial at 13830000 {
+ status = "okay";
+ };
+
+ i2c at 138B0000 {
+ samsung,i2c-sda-delay = <100>;
+ samsung,i2c-slave-addr = <0x10>;
+ samsung,i2c-max-bus-freq = <100000>;
+ gpios = <&gpb 6 3 3 0>,
+ <&gpb 7 3 3 0>;
+ status = "okay";
+
+ max8997_pmic at 66 {
+ compatible = "maxim,max8997-pmic";
+
+ reg = <0x66>;
+
+ max8997,pmic-buck1-uses-gpio-dvs;
+ max8997,pmic-buck2-uses-gpio-dvs;
+ max8997,pmic-buck5-uses-gpio-dvs;
+
+ max8997,pmic-ignore-gpiodvs-side-effect;
+ max8997,pmic-buck125-default-dvs-idx = <0>;
+
+ max8997,pmic-buck125-dvs-gpios = <&gpx0 5 1 0 0>,
+ <&gpx0 6 1 0 0>,
+ <&gpl0 0 1 0 0>;
+
+ max8997,pmic-buck1-dvs-voltage = <1350000>, <1300000>,
+ <1250000>, <1200000>,
+ <1150000>, <1100000>,
+ <1000000>, <950000>;
+
+ max8997,pmic-buck2-dvs-voltage = <1100000>, <1000000>,
+ <950000>, <900000>,
+ <1100000>, <1000000>,
+ <950000>, <900000>;
+
+ max8997,pmic-buck5-dvs-voltage = <1200000>, <1200000>,
+ <1200000>, <1200000>,
+ <1200000>, <1200000>,
+ <1200000>, <1200000>;
+
+ regulators {
+ valive_reg: LDO2 {
+ regulator-name = "VALIVE_1.1V_C210";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-always-on;
+ };
+
+ vusb_reg: LDO3 {
+ regulator-name = "VUSB_1.1V_C210";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ };
+
+ vmipi_reg: LDO4 {
+ regulator-name = "VMIPI_1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ vpda_reg: LDO6 {
+ regulator-name = "VCC_1.8V_PDA";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+
+ vcam_reg: LDO7 {
+ regulator-name = "CAM_ISP_1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ vusbdac_reg: LDO8 {
+ regulator-name = "VUSB/VDAC_3.3V_C210";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ vccpda_reg: LDO9 {
+ regulator-name = "VCC_2.8V_PDA";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-always-on;
+ };
+
+ vpll_reg: LDO10 {
+ regulator-name = "VPLL_1.1V_C210";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-always-on;
+ };
+
+ vcclcd_reg: LDO13 {
+ regulator-name = "VCC_3.3V_LCD";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ vlcd_reg: LDO15 {
+ regulator-name = "VLCD_2.2V";
+ regulator-min-microvolt = <2200000>;
+ regulator-max-microvolt = <2200000>;
+ };
+
+ camsensor_reg: LDO16 {
+ regulator-name = "CAM_SENSOR_IO_1.8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ vddq_reg: LDO21 {
+ regulator-name = "VDDQ_M1M2_1.2V";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-always-on;
+ };
+
+ varm_breg: BUCK1 {
+ regulator-name = "VARM_1.2V_C210";
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-always-on;
+ };
+
+ vint_breg: BUCK2 {
+ regulator-name = "VINT_1.1V_C210";
+ regulator-min-microvolt = <900000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-always-on;
+ };
+
+ camisp_breg: BUCK4 {
+ regulator-name = "CAM_ISP_CORE_1.2V";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ };
+
+ vmem_breg: BUCK5 {
+ regulator-name = "VMEM_1.2V_C210";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-always-on;
+ };
+
+ vccsub_breg: BUCK7 {
+ regulator-name = "VCC_SUB_2.0V";
+ regulator-min-microvolt = <2000000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-always-on;
+ };
+
+ safe1_sreg: ESAFEOUT1 {
+ regulator-name = "SAFEOUT1";
+ regulator-always-on;
+ };
+
+ safe2_sreg: ESAFEOUT2 {
+ regulator-name = "SAFEOUT2";
+ regulator-boot-on;
+ };
+ };
+ };
+ };
+};
diff --git a/arch/arm/mach-exynos/Makefile.boot b/arch/arm/mach-exynos/Makefile.boot
index 31bd181..a79d999 100644
--- a/arch/arm/mach-exynos/Makefile.boot
+++ b/arch/arm/mach-exynos/Makefile.boot
@@ -1,5 +1,5 @@
zreladdr-y += 0x40008000
params_phys-y := 0x40000100
-dtb-$(CONFIG_MACH_EXYNOS4_DT) += exynos4210-origen.dtb exynos4210-smdkv310.dtb
+dtb-$(CONFIG_MACH_EXYNOS4_DT) += exynos4210-origen.dtb exynos4210-smdkv310.dtb exynos4210-trats.dtb
dtb-$(CONFIG_MACH_EXYNOS5_DT) += exynos5250-smdk5250.dtb
--
1.7.12
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v2 2/5] ARM: Exynos4: dts: Specify address and size cells for i2c controllers
2012-09-04 8:50 ` [PATCH v2 2/5] ARM: Exynos4: dts: Specify address and size cells for i2c controllers Tomasz Figa
@ 2012-09-05 3:58 ` Thomas Abraham
2012-09-08 2:37 ` Kukjin Kim
0 siblings, 1 reply; 27+ messages in thread
From: Thomas Abraham @ 2012-09-05 3:58 UTC (permalink / raw)
To: linux-arm-kernel
On 4 September 2012 14:20, Tomasz Figa <t.figa@samsung.com> wrote:
> Signed-off-by: Tomasz Figa <t.figa@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> arch/arm/boot/dts/exynos4.dtsi | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
Acked-by: Thomas Abraham <thomas.abraham@linaro.org>
>
> diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
> index 9b71b61..718e3d2 100644
> --- a/arch/arm/boot/dts/exynos4.dtsi
> +++ b/arch/arm/boot/dts/exynos4.dtsi
> @@ -122,6 +122,8 @@
> };
>
> i2c at 13860000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> compatible = "samsung,s3c2440-i2c";
> reg = <0x13860000 0x100>;
> interrupts = <0 58 0>;
> @@ -129,6 +131,8 @@
> };
>
> i2c at 13870000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> compatible = "samsung,s3c2440-i2c";
> reg = <0x13870000 0x100>;
> interrupts = <0 59 0>;
> @@ -136,6 +140,8 @@
> };
>
> i2c at 13880000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> compatible = "samsung,s3c2440-i2c";
> reg = <0x13880000 0x100>;
> interrupts = <0 60 0>;
> @@ -143,6 +149,8 @@
> };
>
> i2c at 13890000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> compatible = "samsung,s3c2440-i2c";
> reg = <0x13890000 0x100>;
> interrupts = <0 61 0>;
> @@ -150,6 +158,8 @@
> };
>
> i2c at 138A0000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> compatible = "samsung,s3c2440-i2c";
> reg = <0x138A0000 0x100>;
> interrupts = <0 62 0>;
> @@ -157,6 +167,8 @@
> };
>
> i2c at 138B0000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> compatible = "samsung,s3c2440-i2c";
> reg = <0x138B0000 0x100>;
> interrupts = <0 63 0>;
> @@ -164,6 +176,8 @@
> };
>
> i2c at 138C0000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> compatible = "samsung,s3c2440-i2c";
> reg = <0x138C0000 0x100>;
> interrupts = <0 64 0>;
> @@ -171,6 +185,8 @@
> };
>
> i2c at 138D0000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> compatible = "samsung,s3c2440-i2c";
> reg = <0x138D0000 0x100>;
> interrupts = <0 65 0>;
> --
> 1.7.12
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 3/5] ARM: Exynos4: Add OF compatibility lookups for Exynos4 i2c adapters
2012-09-04 8:50 ` [PATCH v2 3/5] ARM: Exynos4: Add OF compatibility lookups for Exynos4 i2c adapters Tomasz Figa
@ 2012-09-05 3:59 ` Thomas Abraham
2012-09-08 2:38 ` Kukjin Kim
0 siblings, 1 reply; 27+ messages in thread
From: Thomas Abraham @ 2012-09-05 3:59 UTC (permalink / raw)
To: linux-arm-kernel
On 4 September 2012 14:20, Tomasz Figa <t.figa@samsung.com> wrote:
> Signed-off-by: Tomasz Figa <t.figa@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> arch/arm/mach-exynos/mach-exynos4-dt.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
Acked-by: Thomas Abraham <thomas.abraham@linaro.org>
>
> diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c
> index 8dad4ec..5f805b4 100644
> --- a/arch/arm/mach-exynos/mach-exynos4-dt.c
> +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c
> @@ -55,6 +55,20 @@ static const struct of_dev_auxdata exynos4_auxdata_lookup[] __initconst = {
> "exynos4-sdhci.3", NULL),
> OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(0),
> "s3c2440-i2c.0", NULL),
> + OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(1),
> + "s3c2440-i2c.1", NULL),
> + OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(2),
> + "s3c2440-i2c.2", NULL),
> + OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(3),
> + "s3c2440-i2c.3", NULL),
> + OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(4),
> + "s3c2440-i2c.4", NULL),
> + OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(5),
> + "s3c2440-i2c.5", NULL),
> + OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(6),
> + "s3c2440-i2c.6", NULL),
> + OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(7),
> + "s3c2440-i2c.7", NULL),
> OF_DEV_AUXDATA("samsung,exynos4210-spi", EXYNOS4_PA_SPI0,
> "exynos4210-spi.0", NULL),
> OF_DEV_AUXDATA("samsung,exynos4210-spi", EXYNOS4_PA_SPI1,
> --
> 1.7.12
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 5/5] ARM: Exynos: Add basic dts file for Samsung Trats board
2012-09-04 8:50 ` [PATCH v2 5/5] ARM: Exynos: Add basic dts file for Samsung Trats board Tomasz Figa
@ 2012-09-05 4:05 ` Thomas Abraham
2012-09-05 5:53 ` Tomasz Figa
0 siblings, 1 reply; 27+ messages in thread
From: Thomas Abraham @ 2012-09-05 4:05 UTC (permalink / raw)
To: linux-arm-kernel
On 4 September 2012 14:20, Tomasz Figa <t.figa@samsung.com> wrote:
> This commit adds basic device tree for Exynos4210-based Trats board.
>
> Currently it provides support for eMMC over sdhci and MAX8997 PMIC.
>
> Signed-off-by: Tomasz Figa <t.figa@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> arch/arm/boot/dts/exynos4210-trats.dts | 237 +++++++++++++++++++++++++++++++++
> arch/arm/mach-exynos/Makefile.boot | 2 +-
> 2 files changed, 238 insertions(+), 1 deletion(-)
> create mode 100644 arch/arm/boot/dts/exynos4210-trats.dts
>
> diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts
> new file mode 100644
> index 0000000..73567b8
> --- /dev/null
> +++ b/arch/arm/boot/dts/exynos4210-trats.dts
> @@ -0,0 +1,237 @@
> +/*
> + * Samsung's Exynos4210 based Trats board device tree source
> + *
> + * Copyright (c) 2012 Samsung Electronics Co., Ltd.
> + * http://www.samsung.com
> + *
> + * Device tree source file for Samsung's Trats board which is based on
> + * Samsung's Exynos4210 SoC.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> +*/
> +
> +/dts-v1/;
> +/include/ "exynos4210.dtsi"
> +
> +/ {
> + model = "Samsung Trats based on Exynos4210";
> + compatible = "samsung,trats", "samsung,exynos4210";
> +
> + memory {
> + reg = <0x40000000 0x20000000
> + 0x60000000 0x20000000>;
> + };
Why does this have to be split. Why not have a single entry with the
size as 0x40000000?
> +
> + chosen {
> + bootargs = "console=ttySAC2,115200N8 root=/dev/mmcblk0p5 rootwait earlyprintk panic=5";
> + };
> +
> + vemmc_reg: voltage-regulator at 0 {
> + compatible = "regulator-fixed";
> + regulator-name = "VMEM_VDD_2.8V";
> + regulator-min-microvolt = <2800000>;
> + regulator-max-microvolt = <2800000>;
> + gpio = <&gpk0 2 1 0 0>;
> + enable-active-high;
> + };
> +
> + sdhci_emmc: sdhci at 12510000 {
> + bus-width = <8>;
> + non-removable;
> + broken-voltage;
> + gpios = <&gpk0 0 2 0 3>,
> + <&gpk0 1 2 0 3>,
> + <&gpk0 3 2 2 3>,
> + <&gpk0 4 2 2 3>,
> + <&gpk0 5 2 2 3>,
> + <&gpk0 6 2 2 3>,
> + <&gpk1 3 3 3 3>,
> + <&gpk1 4 3 3 3>,
> + <&gpk1 5 3 3 3>,
> + <&gpk1 6 3 3 3>;
> + vmmc-supply = <&vemmc_reg>;
> + status = "okay";
> + };
> +
> + serial at 13800000 {
> + status = "okay";
> + };
> +
> + serial at 13810000 {
> + status = "okay";
> + };
> +
> + serial at 13820000 {
> + status = "okay";
> + };
> +
> + serial at 13830000 {
> + status = "okay";
> + };
> +
> + i2c at 138B0000 {
> + samsung,i2c-sda-delay = <100>;
> + samsung,i2c-slave-addr = <0x10>;
> + samsung,i2c-max-bus-freq = <100000>;
> + gpios = <&gpb 6 3 3 0>,
> + <&gpb 7 3 3 0>;
> + status = "okay";
> +
> + max8997_pmic at 66 {
> + compatible = "maxim,max8997-pmic";
> +
> + reg = <0x66>;
Probably, the interrupts can be listed when we have pinctrl driver
merged in Samsung tree.
> +
> + max8997,pmic-buck1-uses-gpio-dvs;
> + max8997,pmic-buck2-uses-gpio-dvs;
> + max8997,pmic-buck5-uses-gpio-dvs;
> +
> + max8997,pmic-ignore-gpiodvs-side-effect;
> + max8997,pmic-buck125-default-dvs-idx = <0>;
> +
> + max8997,pmic-buck125-dvs-gpios = <&gpx0 5 1 0 0>,
> + <&gpx0 6 1 0 0>,
> + <&gpl0 0 1 0 0>;
> +
> + max8997,pmic-buck1-dvs-voltage = <1350000>, <1300000>,
> + <1250000>, <1200000>,
> + <1150000>, <1100000>,
> + <1000000>, <950000>;
> +
> + max8997,pmic-buck2-dvs-voltage = <1100000>, <1000000>,
> + <950000>, <900000>,
> + <1100000>, <1000000>,
> + <950000>, <900000>;
> +
> + max8997,pmic-buck5-dvs-voltage = <1200000>, <1200000>,
> + <1200000>, <1200000>,
> + <1200000>, <1200000>,
> + <1200000>, <1200000>;
> +
> + regulators {
> + valive_reg: LDO2 {
> + regulator-name = "VALIVE_1.1V_C210";
> + regulator-min-microvolt = <1100000>;
> + regulator-max-microvolt = <1100000>;
> + regulator-always-on;
> + };
> +
> + vusb_reg: LDO3 {
> + regulator-name = "VUSB_1.1V_C210";
> + regulator-min-microvolt = <1100000>;
> + regulator-max-microvolt = <1100000>;
> + };
> +
> + vmipi_reg: LDO4 {
> + regulator-name = "VMIPI_1.8V";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + };
> +
> + vpda_reg: LDO6 {
> + regulator-name = "VCC_1.8V_PDA";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-always-on;
> + };
> +
> + vcam_reg: LDO7 {
> + regulator-name = "CAM_ISP_1.8V";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + };
> +
> + vusbdac_reg: LDO8 {
> + regulator-name = "VUSB/VDAC_3.3V_C210";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + };
> +
> + vccpda_reg: LDO9 {
> + regulator-name = "VCC_2.8V_PDA";
> + regulator-min-microvolt = <2800000>;
> + regulator-max-microvolt = <2800000>;
> + regulator-always-on;
> + };
> +
> + vpll_reg: LDO10 {
> + regulator-name = "VPLL_1.1V_C210";
> + regulator-min-microvolt = <1100000>;
> + regulator-max-microvolt = <1100000>;
> + regulator-always-on;
> + };
> +
> + vcclcd_reg: LDO13 {
> + regulator-name = "VCC_3.3V_LCD";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + };
> +
> + vlcd_reg: LDO15 {
> + regulator-name = "VLCD_2.2V";
> + regulator-min-microvolt = <2200000>;
> + regulator-max-microvolt = <2200000>;
> + };
> +
> + camsensor_reg: LDO16 {
> + regulator-name = "CAM_SENSOR_IO_1.8V";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + };
> +
> + vddq_reg: LDO21 {
> + regulator-name = "VDDQ_M1M2_1.2V";
> + regulator-min-microvolt = <1200000>;
> + regulator-max-microvolt = <1200000>;
> + regulator-always-on;
> + };
> +
> + varm_breg: BUCK1 {
> + regulator-name = "VARM_1.2V_C210";
> + regulator-min-microvolt = <900000>;
> + regulator-max-microvolt = <1350000>;
> + regulator-always-on;
> + };
> +
> + vint_breg: BUCK2 {
> + regulator-name = "VINT_1.1V_C210";
> + regulator-min-microvolt = <900000>;
> + regulator-max-microvolt = <1100000>;
> + regulator-always-on;
> + };
> +
> + camisp_breg: BUCK4 {
> + regulator-name = "CAM_ISP_CORE_1.2V";
> + regulator-min-microvolt = <1200000>;
> + regulator-max-microvolt = <1200000>;
> + };
> +
> + vmem_breg: BUCK5 {
> + regulator-name = "VMEM_1.2V_C210";
> + regulator-min-microvolt = <1200000>;
> + regulator-max-microvolt = <1200000>;
> + regulator-always-on;
> + };
> +
> + vccsub_breg: BUCK7 {
> + regulator-name = "VCC_SUB_2.0V";
> + regulator-min-microvolt = <2000000>;
> + regulator-max-microvolt = <2000000>;
> + regulator-always-on;
> + };
> +
> + safe1_sreg: ESAFEOUT1 {
> + regulator-name = "SAFEOUT1";
> + regulator-always-on;
> + };
> +
> + safe2_sreg: ESAFEOUT2 {
> + regulator-name = "SAFEOUT2";
> + regulator-boot-on;
> + };
> + };
> + };
> + };
> +};
> diff --git a/arch/arm/mach-exynos/Makefile.boot b/arch/arm/mach-exynos/Makefile.boot
> index 31bd181..a79d999 100644
> --- a/arch/arm/mach-exynos/Makefile.boot
> +++ b/arch/arm/mach-exynos/Makefile.boot
> @@ -1,5 +1,5 @@
> zreladdr-y += 0x40008000
> params_phys-y := 0x40000100
>
> -dtb-$(CONFIG_MACH_EXYNOS4_DT) += exynos4210-origen.dtb exynos4210-smdkv310.dtb
> +dtb-$(CONFIG_MACH_EXYNOS4_DT) += exynos4210-origen.dtb exynos4210-smdkv310.dtb exynos4210-trats.dtb
> dtb-$(CONFIG_MACH_EXYNOS5_DT) += exynos5250-smdk5250.dtb
> --
> 1.7.12
>
Reviewed-by: Thomas Abraham <thomas.abraham@linaro.org>
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 5/5] ARM: Exynos: Add basic dts file for Samsung Trats board
2012-09-05 4:05 ` Thomas Abraham
@ 2012-09-05 5:53 ` Tomasz Figa
2012-09-08 2:47 ` Kukjin Kim
0 siblings, 1 reply; 27+ messages in thread
From: Tomasz Figa @ 2012-09-05 5:53 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Thanks for reviewing the patch.
On Wednesday 05 of September 2012 09:35:49 Thomas Abraham wrote:
> > +
> > + memory {
> > + reg = <0x40000000 0x20000000
> > + 0x60000000 0x20000000>;
> > + };
>
> Why does this have to be split. Why not have a single entry with the
> size as 0x40000000?
The memory node corresponds to struct meminfo and each entry (with two
values) makes one struct membank defining a memory bank.
I've been talking with Kyungmin about this. Originally bootloaders used to
report 4 banks of 256 MiB, but it turned out that real bank configuration
on Trats is 2 banks of 512 MiB.
I'm not into memory management internals, so I don't know if this has any
significance, but I defined the node to represent the real configuration
(otherwise I would have probably used 4 banks of 256 MiB and drop the 4th
patch).
> > + max8997_pmic at 66 {
> > + compatible = "maxim,max8997-pmic";
> > +
> > + reg = <0x66>;
>
> Probably, the interrupts can be listed when we have pinctrl driver
> merged in Samsung tree.
>
Right.
--
Best regards,
Tomasz Figa
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk
2012-09-04 8:50 ` [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk Tomasz Figa
@ 2012-09-05 8:36 ` Jaehoon Chung
2012-09-19 5:42 ` Chris Ball
1 sibling, 0 replies; 27+ messages in thread
From: Jaehoon Chung @ 2012-09-05 8:36 UTC (permalink / raw)
To: linux-arm-kernel
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
On 09/04/2012 05:50 PM, Tomasz Figa wrote:
> Some boards use fixed voltage regulator for vmmc supply (e.g. for eMMC
> memories). MMC_CAP2_BROKEN_VOLTAGE must be enabled for them to operate
> correctly.
>
> Cc: Ben Dooks <ben-linux@fluff.org>
> Cc: Chris Ball <cjb@laptop.org>
> CC: linux-mmc at vger.kernel.org
> Signed-off-by: Tomasz Figa <t.figa@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> Documentation/devicetree/bindings/mmc/mmc.txt | 1 +
> drivers/mmc/host/sdhci-s3c.c | 3 +++
> 2 files changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt
> index 8a6811f..ecbde68 100644
> --- a/Documentation/devicetree/bindings/mmc/mmc.txt
> +++ b/Documentation/devicetree/bindings/mmc/mmc.txt
> @@ -16,6 +16,7 @@ Optional properties:
> - wp-inverted: when present, polarity on the wp gpio line is inverted
> - non-removable: non-removable slot (like eMMC)
> - max-frequency: maximum operating clock frequency
> +- broken-voltage: vmmc regulator does not allow voltage control
>
> Example:
>
> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> index 445910e..39715b8 100644
> --- a/drivers/mmc/host/sdhci-s3c.c
> +++ b/drivers/mmc/host/sdhci-s3c.c
> @@ -443,6 +443,9 @@ static int __devinit sdhci_s3c_parse_dt(struct device *dev,
> if (!ourhost->gpios)
> return -ENOMEM;
>
> + if (of_get_property(node, "broken-voltage", 0))
> + pdata->host_caps2 |= MMC_CAP2_BROKEN_VOLTAGE;
> +
> /* get the card detection method */
> if (of_get_property(node, "broken-cd", 0)) {
> pdata->cd_type = S3C_SDHCI_CD_NONE;
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 2/5] ARM: Exynos4: dts: Specify address and size cells for i2c controllers
2012-09-05 3:58 ` Thomas Abraham
@ 2012-09-08 2:37 ` Kukjin Kim
0 siblings, 0 replies; 27+ messages in thread
From: Kukjin Kim @ 2012-09-08 2:37 UTC (permalink / raw)
To: linux-arm-kernel
Thomas Abraham wrote:
>
> On 4 September 2012 14:20, Tomasz Figa <t.figa@samsung.com> wrote:
> > Signed-off-by: Tomasz Figa <t.figa@samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > ---
> > arch/arm/boot/dts/exynos4.dtsi | 16 ++++++++++++++++
> > 1 file changed, 16 insertions(+)
>
> Acked-by: Thomas Abraham <thomas.abraham@linaro.org>
>
Looks OK to me, will apply.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 3/5] ARM: Exynos4: Add OF compatibility lookups for Exynos4 i2c adapters
2012-09-05 3:59 ` Thomas Abraham
@ 2012-09-08 2:38 ` Kukjin Kim
0 siblings, 0 replies; 27+ messages in thread
From: Kukjin Kim @ 2012-09-08 2:38 UTC (permalink / raw)
To: linux-arm-kernel
Thomas Abraham wrote:
>
> On 4 September 2012 14:20, Tomasz Figa <t.figa@samsung.com> wrote:
> > Signed-off-by: Tomasz Figa <t.figa@samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > ---
> > arch/arm/mach-exynos/mach-exynos4-dt.c | 14 ++++++++++++++
> > 1 file changed, 14 insertions(+)
>
> Acked-by: Thomas Abraham <thomas.abraham@linaro.org>
>
OK, will apply.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 4/5] ARM: EXYNOS: Increase maximum possible memory bank size to 512MiB
2012-09-04 8:50 ` [PATCH v2 4/5] ARM: EXYNOS: Increase maximum possible memory bank size to 512MiB Tomasz Figa
@ 2012-09-08 2:41 ` Kukjin Kim
2012-09-08 8:15 ` Tomasz Figa
0 siblings, 1 reply; 27+ messages in thread
From: Kukjin Kim @ 2012-09-08 2:41 UTC (permalink / raw)
To: linux-arm-kernel
Tomasz Figa wrote:
>
> Some boards have larger memory banks than 256MiB. This patch increses
> maximum bank size for Exynos-based boards to 512MiB.
>
Well...the meaning of SECTION_SIZE_BITS is a little bit different you know.
Please refer to following thread.
http://lists.infradead.org/pipermail/linux-arm-kernel/2010-July/020184.html
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
> Signed-off-by: Tomasz Figa <t.figa@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> arch/arm/mach-exynos/include/mach/memory.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/include/mach/memory.h b/arch/arm/mach-
> exynos/include/mach/memory.h
> index 374ef2c..d4db508 100644
> --- a/arch/arm/mach-exynos/include/mach/memory.h
> +++ b/arch/arm/mach-exynos/include/mach/memory.h
> @@ -15,8 +15,8 @@
>
> #define PLAT_PHYS_OFFSET UL(0x40000000)
>
> -/* Maximum of 256MiB in one bank */
> +/* Maximum of 512MiB in one bank */
> #define MAX_PHYSMEM_BITS 32
> -#define SECTION_SIZE_BITS 28
> +#define SECTION_SIZE_BITS 29
>
> #endif /* __ASM_ARCH_MEMORY_H */
> --
> 1.7.12
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 5/5] ARM: Exynos: Add basic dts file for Samsung Trats board
2012-09-05 5:53 ` Tomasz Figa
@ 2012-09-08 2:47 ` Kukjin Kim
2012-09-08 8:21 ` Tomasz Figa
0 siblings, 1 reply; 27+ messages in thread
From: Kukjin Kim @ 2012-09-08 2:47 UTC (permalink / raw)
To: linux-arm-kernel
Tomasz Figa wrote:
>
> Hi,
>
> Thanks for reviewing the patch.
>
> On Wednesday 05 of September 2012 09:35:49 Thomas Abraham wrote:
> > > +
> > > + memory {
> > > + reg = <0x40000000 0x20000000
> > > + 0x60000000 0x20000000>;
> > > + };
> >
> > Why does this have to be split. Why not have a single entry with the
> > size as 0x40000000?
>
> The memory node corresponds to struct meminfo and each entry (with two
> values) makes one struct membank defining a memory bank.
>
Well...
> I've been talking with Kyungmin about this. Originally bootloaders used to
> report 4 banks of 256 MiB, but it turned out that real bank configuration
> on Trats is 2 banks of 512 MiB.
>
I think, following should ok here.
memory {
reg = <0x40000000 0x40000000>;
};
> I'm not into memory management internals, so I don't know if this has any
> significance, but I defined the node to represent the real configuration
> (otherwise I would have probably used 4 banks of 256 MiB and drop the 4th
> patch).
>
> > > + max8997_pmic at 66 {
> > > + compatible = "maxim,max8997-pmic";
> > > +
> > > + reg = <0x66>;
> >
> > Probably, the interrupts can be listed when we have pinctrl driver
> > merged in Samsung tree.
> >
>
> Right.
>
Note, you can do it on top of samsung tree :-)
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 4/5] ARM: EXYNOS: Increase maximum possible memory bank size to 512MiB
2012-09-08 2:41 ` Kukjin Kim
@ 2012-09-08 8:15 ` Tomasz Figa
0 siblings, 0 replies; 27+ messages in thread
From: Tomasz Figa @ 2012-09-08 8:15 UTC (permalink / raw)
To: linux-arm-kernel
Hi Kgene,
On Saturday 08 of September 2012 11:41:31 Kukjin Kim wrote:
> Tomasz Figa wrote:
> > Some boards have larger memory banks than 256MiB. This patch increses
> > maximum bank size for Exynos-based boards to 512MiB.
>
> Well...the meaning of SECTION_SIZE_BITS is a little bit different you
> know.
>
> Please refer to following thread.
> http://lists.infradead.org/pipermail/linux-arm-kernel/2010-July/020184.ht
> ml
Well, I agree, but the effect of this patch is that it is possible to have
first bank (or rather section) up to 512MiB, in case of CONFIG_SPARSEMEM.
Still, we could go the other way and just define more smaller sections
instead and simply drop this patch. (Assuming that the correspondence of
sections and memory banks is irrelevant.)
--
Best regards,
Tomasz Figa
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 5/5] ARM: Exynos: Add basic dts file for Samsung Trats board
2012-09-08 2:47 ` Kukjin Kim
@ 2012-09-08 8:21 ` Tomasz Figa
2012-09-19 23:49 ` Kukjin Kim
0 siblings, 1 reply; 27+ messages in thread
From: Tomasz Figa @ 2012-09-08 8:21 UTC (permalink / raw)
To: linux-arm-kernel
Hi Kgene,
On Saturday 08 of September 2012 11:47:15 Kukjin Kim wrote:
> > > > + memory {
> > > > + reg = <0x40000000 0x20000000
> > > > + 0x60000000 0x20000000>;
> > > > + };
> > >
> > > Why does this have to be split. Why not have a single entry with the
> > > size as 0x40000000?
> >
> > The memory node corresponds to struct meminfo and each entry (with two
> > values) makes one struct membank defining a memory bank.
>
> Well...
>
> > I've been talking with Kyungmin about this. Originally bootloaders used
> > to report 4 banks of 256 MiB, but it turned out that real bank
> > configuration on Trats is 2 banks of 512 MiB.
>
> I think, following should ok here.
>
> memory {
> reg = <0x40000000 0x40000000>;
> };
This will not boot with CONFIG_SPARSEMEM, unless maximum section size is
increased to 1024MiB.
> > > Probably, the interrupts can be listed when we have pinctrl driver
> > > merged in Samsung tree.
> >
> > Right.
>
> Note, you can do it on top of samsung tree :-)
OK.
--
Best regards,
Tomasz Figa
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk
2012-09-04 8:50 ` [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk Tomasz Figa
2012-09-05 8:36 ` Jaehoon Chung
@ 2012-09-19 5:42 ` Chris Ball
2012-09-19 10:13 ` Tomasz Figa
1 sibling, 1 reply; 27+ messages in thread
From: Chris Ball @ 2012-09-19 5:42 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tue, Sep 04 2012, Tomasz Figa wrote:
> Some boards use fixed voltage regulator for vmmc supply (e.g. for eMMC
> memories). MMC_CAP2_BROKEN_VOLTAGE must be enabled for them to operate
> correctly.
>
> Cc: Ben Dooks <ben-linux@fluff.org>
> Cc: Chris Ball <cjb@laptop.org>
> CC: linux-mmc at vger.kernel.org
> Signed-off-by: Tomasz Figa <t.figa@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> Documentation/devicetree/bindings/mmc/mmc.txt | 1 +
> drivers/mmc/host/sdhci-s3c.c | 3 +++
> 2 files changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt
> index 8a6811f..ecbde68 100644
> --- a/Documentation/devicetree/bindings/mmc/mmc.txt
> +++ b/Documentation/devicetree/bindings/mmc/mmc.txt
> @@ -16,6 +16,7 @@ Optional properties:
> - wp-inverted: when present, polarity on the wp gpio line is inverted
> - non-removable: non-removable slot (like eMMC)
> - max-frequency: maximum operating clock frequency
> +- broken-voltage: vmmc regulator does not allow voltage control
>
> Example:
>
> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> index 445910e..39715b8 100644
> --- a/drivers/mmc/host/sdhci-s3c.c
> +++ b/drivers/mmc/host/sdhci-s3c.c
> @@ -443,6 +443,9 @@ static int __devinit sdhci_s3c_parse_dt(struct device *dev,
> if (!ourhost->gpios)
> return -ENOMEM;
>
> + if (of_get_property(node, "broken-voltage", 0))
> + pdata->host_caps2 |= MMC_CAP2_BROKEN_VOLTAGE;
> +
> /* get the card detection method */
> if (of_get_property(node, "broken-cd", 0)) {
> pdata->cd_type = S3C_SDHCI_CD_NONE;
Is there a reason we can't make this a property on the regulator instead?
Thanks,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk
2012-09-19 5:42 ` Chris Ball
@ 2012-09-19 10:13 ` Tomasz Figa
2012-09-19 10:24 ` Chris Ball
0 siblings, 1 reply; 27+ messages in thread
From: Tomasz Figa @ 2012-09-19 10:13 UTC (permalink / raw)
To: linux-arm-kernel
Hi Chris,
On Wednesday 19 of September 2012 01:42:01 Chris Ball wrote:
> On Tue, Sep 04 2012, Tomasz Figa wrote:
> > Some boards use fixed voltage regulator for vmmc supply (e.g. for eMMC
> > memories). MMC_CAP2_BROKEN_VOLTAGE must be enabled for them to operate
> > correctly.
>>
> Is there a reason we can't make this a property on the regulator instead?
Is there a reason we can't make this a property of the mmc subsystem? ;)
Now, seriously, could you elaborate on this a bit more? Do you mean that a
regulator should provide a dummy set voltage operation that would accept
any voltage?
Best regards,
--
Tomasz Figa
Samsung Poland R&D Center
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk
2012-09-19 10:13 ` Tomasz Figa
@ 2012-09-19 10:24 ` Chris Ball
2012-09-19 10:34 ` Tomasz Figa
0 siblings, 1 reply; 27+ messages in thread
From: Chris Ball @ 2012-09-19 10:24 UTC (permalink / raw)
To: linux-arm-kernel
Hi Tomasz,
On Wed, Sep 19 2012, Tomasz Figa wrote:
> Hi Chris,
>
> On Wednesday 19 of September 2012 01:42:01 Chris Ball wrote:
>> On Tue, Sep 04 2012, Tomasz Figa wrote:
>> > Some boards use fixed voltage regulator for vmmc supply (e.g. for eMMC
>> > memories). MMC_CAP2_BROKEN_VOLTAGE must be enabled for them to operate
>> > correctly.
>>>
>> Is there a reason we can't make this a property on the regulator instead?
>
> Is there a reason we can't make this a property of the mmc subsystem? ;)
>
> Now, seriously, could you elaborate on this a bit more? Do you mean that a
> regulator should provide a dummy set voltage operation that would accept
> any voltage?
Sorry for the terseness.
It seems like we're encoding exactly the same information twice in two
different subsystems -- I don't see the point, so I'd like to think
about how we could do better.
For example, if we're only concerned about fixed regulators, could we
just detect a fixed regulator in the driver and avoid the failing call
to regulator_set_voltage() directly, without needing to go via this
capability? Seems like the capability doesn't tell us anything we
couldn't already have known.
Thanks,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk
2012-09-19 10:24 ` Chris Ball
@ 2012-09-19 10:34 ` Tomasz Figa
2012-09-19 10:47 ` Chris Ball
0 siblings, 1 reply; 27+ messages in thread
From: Tomasz Figa @ 2012-09-19 10:34 UTC (permalink / raw)
To: linux-arm-kernel
Hi Chris,
On Wednesday 19 of September 2012 06:24:46 Chris Ball wrote:
> Hi Tomasz,
>
> On Wed, Sep 19 2012, Tomasz Figa wrote:
> > Hi Chris,
> >
> > On Wednesday 19 of September 2012 01:42:01 Chris Ball wrote:
> >> On Tue, Sep 04 2012, Tomasz Figa wrote:
> >> > Some boards use fixed voltage regulator for vmmc supply (e.g. for
> >> > eMMC
> >> > memories). MMC_CAP2_BROKEN_VOLTAGE must be enabled for them to
> >> > operate
> >> > correctly.
> >>
> >> Is there a reason we can't make this a property on the regulator
> >> instead?>
> > Is there a reason we can't make this a property of the mmc subsystem?
> > ;)
> >
> > Now, seriously, could you elaborate on this a bit more? Do you mean
> > that a regulator should provide a dummy set voltage operation that
> > would accept any voltage?
>
> Sorry for the terseness.
>
> It seems like we're encoding exactly the same information twice in two
> different subsystems -- I don't see the point, so I'd like to think
> about how we could do better.
>
> For example, if we're only concerned about fixed regulators, could we
> just detect a fixed regulator in the driver and avoid the failing call
> to regulator_set_voltage() directly, without needing to go via this
> capability? Seems like the capability doesn't tell us anything we
> couldn't already have known.
We could just check if the regulator provides the capability to change the
voltage.
I don't see any direct way of querying the regulator for provided
capabilities (correct me if I'm just blind), but calling
regulator_count_voltages() on the regulator and checking if the returned
value is 1 should be enough to assume that the regulator is fixed.
What do you think?
Best regards,
--
Tomasz Figa
Samsung Poland R&D Center
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk
2012-09-19 10:34 ` Tomasz Figa
@ 2012-09-19 10:47 ` Chris Ball
2012-09-19 10:49 ` Tomasz Figa
2012-09-19 11:02 ` Jaehoon Chung
0 siblings, 2 replies; 27+ messages in thread
From: Chris Ball @ 2012-09-19 10:47 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Wed, Sep 19 2012, Tomasz Figa wrote:
> We could just check if the regulator provides the capability to change the
> voltage.
>
> I don't see any direct way of querying the regulator for provided
> capabilities (correct me if I'm just blind), but calling
> regulator_count_voltages() on the regulator and checking if the returned
> value is 1 should be enough to assume that the regulator is fixed.
Sounds good, I agree. Are you able to test that the obvious patch below
works on your fixed-regulator board?
Jaehoon and Adrian, can you think of any reason why we shouldn't replace
MMC_CAP2_BROKEN_VOLTAGE with the regulator_count_voltages() call below?
Thanks.
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 044cd01..a3cc740 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1132,7 +1132,7 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
*/
voltage = regulator_get_voltage(supply);
- if (mmc->caps2 & MMC_CAP2_BROKEN_VOLTAGE)
+ if (regulator_count_voltages(supply) == 1)
min_uV = max_uV = voltage;
if (voltage < 0)
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk
2012-09-19 10:47 ` Chris Ball
@ 2012-09-19 10:49 ` Tomasz Figa
2012-09-19 11:02 ` Jaehoon Chung
1 sibling, 0 replies; 27+ messages in thread
From: Tomasz Figa @ 2012-09-19 10:49 UTC (permalink / raw)
To: linux-arm-kernel
hi,
On Wednesday 19 of September 2012 06:47:02 Chris Ball wrote:
> Hi,
>
> On Wed, Sep 19 2012, Tomasz Figa wrote:
> > We could just check if the regulator provides the capability to change
> > the voltage.
> >
> > I don't see any direct way of querying the regulator for provided
> > capabilities (correct me if I'm just blind), but calling
> > regulator_count_voltages() on the regulator and checking if the
> > returned
> > value is 1 should be enough to assume that the regulator is fixed.
>
> Sounds good, I agree. Are you able to test that the obvious patch below
> works on your fixed-regulator board?
Yes. I will report the result as soon as I test it.
Best regards,
--
Tomasz Figa
Samsung Poland R&D Center
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk
2012-09-19 10:47 ` Chris Ball
2012-09-19 10:49 ` Tomasz Figa
@ 2012-09-19 11:02 ` Jaehoon Chung
2012-09-19 14:39 ` Chris Ball
1 sibling, 1 reply; 27+ messages in thread
From: Jaehoon Chung @ 2012-09-19 11:02 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On 09/19/2012 07:47 PM, Chris Ball wrote:
> Hi,
>
> On Wed, Sep 19 2012, Tomasz Figa wrote:
>> We could just check if the regulator provides the capability to change the
>> voltage.
>>
>> I don't see any direct way of querying the regulator for provided
>> capabilities (correct me if I'm just blind), but calling
>> regulator_count_voltages() on the regulator and checking if the returned
>> value is 1 should be enough to assume that the regulator is fixed.
>
> Sounds good, I agree. Are you able to test that the obvious patch below
> works on your fixed-regulator board?
>
> Jaehoon and Adrian, can you think of any reason why we shouldn't replace
> MMC_CAP2_BROKEN_VOLTAGE with the regulator_count_voltages() call below?
> Thanks.
I think this is better than using MMC_CAP2_BROKEN_VOLTAGE.
I tested with this..and working fine.
Best Regards,
Jaehoon Chung
>
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 044cd01..a3cc740 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -1132,7 +1132,7 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
> */
> voltage = regulator_get_voltage(supply);
>
> - if (mmc->caps2 & MMC_CAP2_BROKEN_VOLTAGE)
> + if (regulator_count_voltages(supply) == 1)
> min_uV = max_uV = voltage;
>
> if (voltage < 0)
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk
2012-09-19 11:02 ` Jaehoon Chung
@ 2012-09-19 14:39 ` Chris Ball
2012-09-20 5:57 ` Jaehoon Chung
0 siblings, 1 reply; 27+ messages in thread
From: Chris Ball @ 2012-09-19 14:39 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Wed, Sep 19 2012, Jaehoon Chung wrote:
>> On Wed, Sep 19 2012, Tomasz Figa wrote:
>>> We could just check if the regulator provides the capability to change the
>>> voltage.
>>>
>>> I don't see any direct way of querying the regulator for provided
>>> capabilities (correct me if I'm just blind), but calling
>>> regulator_count_voltages() on the regulator and checking if the returned
>>> value is 1 should be enough to assume that the regulator is fixed.
>>
>> Sounds good, I agree. Are you able to test that the obvious patch below
>> works on your fixed-regulator board?
>>
>> Jaehoon and Adrian, can you think of any reason why we shouldn't replace
>> MMC_CAP2_BROKEN_VOLTAGE with the regulator_count_voltages() call below?
>> Thanks.
>
> I think this is better than using MMC_CAP2_BROKEN_VOLTAGE.
> I tested with this..and working fine.
Great, here's the patch. Jaehoon, once this is merged, maybe you could
help remove the uses of MMC_CAP2_BROKEN_VOLTAGE from arch/arm/mach-exynos
and arch/arm/mach-s5pv210 now that they're no longer needed?
Thanks,
- Chris.
Subject: [PATCH] mmc: core: Replace MMC_CAP2_BROKEN_VOLTAGE with test for fixed regulator
Before this patch, we were using MMC_CAP2_BROKEN_VOLTAGE as a way to
avoid calling regulator_set_voltage() on a fixed regulator, but that's
just duplicating information that already exists -- we should test
whether the regulator is fixed directly, instead of via a capability.
This patch implements that test. We can't reclaim the capability bit
just yet, since there are still boards in arch/arm/ that reference it;
those references can be removed now.
Reported-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
---
drivers/mmc/core/core.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 044cd01..6612163 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1113,7 +1113,8 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
int tmp;
int voltage;
- /* REVISIT mmc_vddrange_to_ocrmask() may have set some
+ /*
+ * REVISIT mmc_vddrange_to_ocrmask() may have set some
* bits this regulator doesn't quite support ... don't
* be too picky, most cards and regulators are OK with
* a 0.1V range goof (it's a small error percentage).
@@ -1127,12 +1128,13 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
max_uV = min_uV + 100 * 1000;
}
- /* avoid needless changes to this voltage; the regulator
- * might not allow this operation
+ /*
+ * If we're using a fixed/static regulator, don't call
+ * regulator_set_voltage; it would fail.
*/
voltage = regulator_get_voltage(supply);
- if (mmc->caps2 & MMC_CAP2_BROKEN_VOLTAGE)
+ if (regulator_count_voltages(supply) == 1)
min_uV = max_uV = voltage;
if (voltage < 0)
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v2 5/5] ARM: Exynos: Add basic dts file for Samsung Trats board
2012-09-08 8:21 ` Tomasz Figa
@ 2012-09-19 23:49 ` Kukjin Kim
0 siblings, 0 replies; 27+ messages in thread
From: Kukjin Kim @ 2012-09-19 23:49 UTC (permalink / raw)
To: linux-arm-kernel
Tomasz Figa wrote:
>
> Hi Kgene,
>
> On Saturday 08 of September 2012 11:47:15 Kukjin Kim wrote:
> > > > > + memory {
> > > > > + reg = <0x40000000 0x20000000
> > > > > + 0x60000000 0x20000000>;
> > > > > + };
> > > >
> > > > Why does this have to be split. Why not have a single entry with the
> > > > size as 0x40000000?
> > >
> > > The memory node corresponds to struct meminfo and each entry (with two
> > > values) makes one struct membank defining a memory bank.
> >
> > Well...
> >
> > > I've been talking with Kyungmin about this. Originally bootloaders
> used
> > > to report 4 banks of 256 MiB, but it turned out that real bank
> > > configuration on Trats is 2 banks of 512 MiB.
> >
> > I think, following should ok here.
> >
> > memory {
> > reg = <0x40000000 0x40000000>;
> > };
>
> This will not boot with CONFIG_SPARSEMEM, unless maximum section size is
> increased to 1024MiB.
>
Well, see other Origen board. As I know, it works well under environment you
said but I'm not sure about its boot-loader environment. Anyway, please
check one more and let me know. Then, if you still have same problem, let's
use double entries for memory temporary.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk
2012-09-19 14:39 ` Chris Ball
@ 2012-09-20 5:57 ` Jaehoon Chung
0 siblings, 0 replies; 27+ messages in thread
From: Jaehoon Chung @ 2012-09-20 5:57 UTC (permalink / raw)
To: linux-arm-kernel
On 09/19/2012 11:39 PM, Chris Ball wrote:
> Hi,
>
> On Wed, Sep 19 2012, Jaehoon Chung wrote:
>>> On Wed, Sep 19 2012, Tomasz Figa wrote:
>>>> We could just check if the regulator provides the capability to change the
>>>> voltage.
>>>>
>>>> I don't see any direct way of querying the regulator for provided
>>>> capabilities (correct me if I'm just blind), but calling
>>>> regulator_count_voltages() on the regulator and checking if the returned
>>>> value is 1 should be enough to assume that the regulator is fixed.
>>>
>>> Sounds good, I agree. Are you able to test that the obvious patch below
>>> works on your fixed-regulator board?
>>>
>>> Jaehoon and Adrian, can you think of any reason why we shouldn't replace
>>> MMC_CAP2_BROKEN_VOLTAGE with the regulator_count_voltages() call below?
>>> Thanks.
>>
>> I think this is better than using MMC_CAP2_BROKEN_VOLTAGE.
>> I tested with this..and working fine.
>
> Great, here's the patch. Jaehoon, once this is merged, maybe you could
> help remove the uses of MMC_CAP2_BROKEN_VOLTAGE from arch/arm/mach-exynos
> and arch/arm/mach-s5pv210 now that they're no longer needed?
Right, I will remove them and send the patch.
Best Regards,
Jaehoon Chung
>
> Thanks,
>
> - Chris.
>
>
> Subject: [PATCH] mmc: core: Replace MMC_CAP2_BROKEN_VOLTAGE with test for fixed regulator
>
> Before this patch, we were using MMC_CAP2_BROKEN_VOLTAGE as a way to
> avoid calling regulator_set_voltage() on a fixed regulator, but that's
> just duplicating information that already exists -- we should test
> whether the regulator is fixed directly, instead of via a capability.
>
> This patch implements that test. We can't reclaim the capability bit
> just yet, since there are still boards in arch/arm/ that reference it;
> those references can be removed now.
>
> Reported-by: Tomasz Figa <t.figa@samsung.com>
> Signed-off-by: Chris Ball <cjb@laptop.org>
> ---
> drivers/mmc/core/core.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 044cd01..6612163 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -1113,7 +1113,8 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
> int tmp;
> int voltage;
>
> - /* REVISIT mmc_vddrange_to_ocrmask() may have set some
> + /*
> + * REVISIT mmc_vddrange_to_ocrmask() may have set some
> * bits this regulator doesn't quite support ... don't
> * be too picky, most cards and regulators are OK with
> * a 0.1V range goof (it's a small error percentage).
> @@ -1127,12 +1128,13 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
> max_uV = min_uV + 100 * 1000;
> }
>
> - /* avoid needless changes to this voltage; the regulator
> - * might not allow this operation
> + /*
> + * If we're using a fixed/static regulator, don't call
> + * regulator_set_voltage; it would fail.
> */
> voltage = regulator_get_voltage(supply);
>
> - if (mmc->caps2 & MMC_CAP2_BROKEN_VOLTAGE)
> + if (regulator_count_voltages(supply) == 1)
> min_uV = max_uV = voltage;
>
> if (voltage < 0)
>
^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2012-09-20 5:57 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-04 8:50 [PATCH v2 0/5] ARM: EXYNOS: Add support for Trats board using device tree Tomasz Figa
2012-09-04 8:50 ` [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk Tomasz Figa
2012-09-05 8:36 ` Jaehoon Chung
2012-09-19 5:42 ` Chris Ball
2012-09-19 10:13 ` Tomasz Figa
2012-09-19 10:24 ` Chris Ball
2012-09-19 10:34 ` Tomasz Figa
2012-09-19 10:47 ` Chris Ball
2012-09-19 10:49 ` Tomasz Figa
2012-09-19 11:02 ` Jaehoon Chung
2012-09-19 14:39 ` Chris Ball
2012-09-20 5:57 ` Jaehoon Chung
2012-09-04 8:50 ` [PATCH v2 2/5] ARM: Exynos4: dts: Specify address and size cells for i2c controllers Tomasz Figa
2012-09-05 3:58 ` Thomas Abraham
2012-09-08 2:37 ` Kukjin Kim
2012-09-04 8:50 ` [PATCH v2 3/5] ARM: Exynos4: Add OF compatibility lookups for Exynos4 i2c adapters Tomasz Figa
2012-09-05 3:59 ` Thomas Abraham
2012-09-08 2:38 ` Kukjin Kim
2012-09-04 8:50 ` [PATCH v2 4/5] ARM: EXYNOS: Increase maximum possible memory bank size to 512MiB Tomasz Figa
2012-09-08 2:41 ` Kukjin Kim
2012-09-08 8:15 ` Tomasz Figa
2012-09-04 8:50 ` [PATCH v2 5/5] ARM: Exynos: Add basic dts file for Samsung Trats board Tomasz Figa
2012-09-05 4:05 ` Thomas Abraham
2012-09-05 5:53 ` Tomasz Figa
2012-09-08 2:47 ` Kukjin Kim
2012-09-08 8:21 ` Tomasz Figa
2012-09-19 23:49 ` Kukjin Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).