Skip to contentSkip to conversation

ARM: EXYNOS: Add support for Trats board using device tree

PATCH New Tomasz Figa 6 participants 27 messages Sep 4, 2012 – Sep 20, 2012

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

v2 cover ARM: EXYNOS: Add support for Trats board using device tree

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
Signature · 1 line
1.7.12
#1 lore raw

PATCH v2 1/5 mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

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 <[email protected]>
Cc Chris Ball <[email protected]>
CC linux-mmc at vger.kernel.org
---
 Documentation/devicetree/bindings/mmc/mmc.txt | 1 +
 drivers/mmc/host/sdhci-s3c.c                  | 3 +++
 2 files changed, 4 insertions(+)
Documentation/devicetree/bindings/mmc/mmc.txt +1 -0
index 8a6811f..ecbde68 100644
@@ -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:
 
drivers/mmc/host/sdhci-s3c.c +3 -0
index 445910e..39715b8 100644
@@ -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;
Signature · 1 line
1.7.12
maintainer
#2 lore raw

PATCH v2 1/5 mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

Quoted 41 lines · Tomasz Figa

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 <[email protected]>
Cc Chris Ball <[email protected]>
CC linux-mmc at vger.kernel.org
---
 Documentation/devicetree/bindings/mmc/mmc.txt | 1 +
 drivers/mmc/host/sdhci-s3c.c                  | 3 +++
 2 files changed, 4 insertions(+)
Documentation/devicetree/bindings/mmc/mmc.txt +1 -0
index 8a6811f..ecbde68 100644
@@ -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:
 
drivers/mmc/host/sdhci-s3c.c +3 -0
index 445910e..39715b8 100644
@@ -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;
#3 lore raw

PATCH v2 1/5 mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

In reply to Tomasz Figa

Hi,

Quoted 31 lines · Tomasz Figa

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.

---
 Documentation/devicetree/bindings/mmc/mmc.txt | 1 +
 drivers/mmc/host/sdhci-s3c.c                  | 3 +++
 2 files changed, 4 insertions(+)
Documentation/devicetree/bindings/mmc/mmc.txt +1 -0
index 8a6811f..ecbde68 100644
@@ -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:
 
drivers/mmc/host/sdhci-s3c.c +0 -0
index 445910e..39715b8 100644

drivers/mmc/host/sdhci-s3c.c static int __devinit sdhci_s3c_parse_dt(struct device *dev, · line 451

Quoted 9 lines
drivers/mmc/host/sdhci-s3c.c +3 -0
@@ -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.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
#4 lore raw

PATCH v2 1/5 mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

Hi Chris,

Quoted 6 lines · On Wednesday 19 of September 2012 01:42:01 Chris Ball wrote:
Quoted 4 lines · Tomasz Figa

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,

Signature · 2 lines
Tomasz Figa
Samsung Poland R&D Center
#5 lore raw

PATCH v2 1/5 mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

Hi Tomasz,

Quoted 8 lines · Tomasz Figa

Hi Chris,

Quoted 5 lines · On Wednesday 19 of September 2012 01:42:01 Chris Ball wrote:
Quoted 4 lines · Tomasz Figa

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.

Quoted 7 lines
Quoted 1 line

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.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
#6 lore raw

PATCH v2 1/5 mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

Hi Chris,

Quoted 28 lines · On Wednesday 19 of September 2012 06:24:46 Chris Ball wrote:

Hi Tomasz,

Quoted 10 lines · Tomasz Figa

Hi Chris,

Quoted 7 lines · On Wednesday 19 of September 2012 01:42:01 Chris Ball wrote:
Quoted 5 lines · Tomasz Figa

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.

Quoted 8 lines
Quoted 2 lines

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.

Quoted 5 lines

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,

Signature · 2 lines
Tomasz Figa
Samsung Poland R&D Center
#7 lore raw

PATCH v2 1/5 mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

Hi,

Quoted 7 lines · Tomasz Figa

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.

drivers/mmc/core/core.c +1 -1
index 044cd01..a3cc740 100644
@@ -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)
Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
#8 lore raw

PATCH v2 1/5 mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

hi,

Quoted 6 lines · On Wednesday 19 of September 2012 06:47:02 Chris Ball wrote:

Hi,

Quoted 3 lines · Tomasz Figa

We could just check if the regulator provides the capability to change the voltage.

Quoted 8 lines
Quoted 5 lines

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,

Signature · 2 lines
Tomasz Figa
Samsung Poland R&D Center
maintainer
#9 lore raw

PATCH v2 1/5 mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

In reply to Chris Ball

Hi,

Quoted 11 lines · Chris Ball

Hi,

Quoted 7 lines · Tomasz Figa

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.

Quoted 6 lines

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

Quoted 16 lines
drivers/mmc/core/core.c +1 -1
index 044cd01..a3cc740 100644
@@ -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)
#10 lore raw

PATCH v2 1/5 mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

Hi,

Quoted 12 lines · Jaehoon Chung
Quoted 12 lines · Tomasz Figa
Quoted 7 lines

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?

Quoted 6 lines
Quoted 3 lines

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.

---
 drivers/mmc/core/core.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/mmc/core/core.c +6 -4
index 044cd01..6612163 100644
@@ -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)
Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
maintainer
#11 lore raw

PATCH v2 1/5 mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

Quoted 19 lines · Chris Ball

Hi,

Quoted 16 lines · Jaehoon Chung
Quoted 15 lines · Tomasz Figa
Quoted 7 lines

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.

Quoted 6 lines
Quoted 2 lines

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

Quoted 55 lines

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.

---
 drivers/mmc/core/core.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/mmc/core/core.c +6 -4
index 044cd01..6612163 100644
@@ -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)
#12 lore raw

PATCH v2 2/5 ARM: Exynos4: dts: Specify address and size cells for i2c controllers

In reply to Tomasz Figa
---
 arch/arm/boot/dts/exynos4.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm/boot/dts/exynos4.dtsi +16 -0
index 9b71b61..718e3d2 100644
@@ -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>;
Signature · 1 line
1.7.12
#13 lore raw

PATCH v2 2/5 ARM: Exynos4: dts: Specify address and size cells for i2c controllers

Quoted 5 lines · Tomasz Figa
---
 arch/arm/boot/dts/exynos4.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
Quoted 80 lines
arch/arm/boot/dts/exynos4.dtsi +16 -1
index 9b71b61..718e3d2 100644
@@ -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

#14 lore raw

PATCH v2 2/5 ARM: Exynos4: dts: Specify address and size cells for i2c controllers

Quoted 10 lines · Thomas Abraham
Quoted 5 lines · Tomasz Figa
---
 arch/arm/boot/dts/exynos4.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Looks OK to me, will apply.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#15 lore raw

PATCH v2 3/5 ARM: Exynos4: Add OF compatibility lookups for Exynos4 i2c adapters

In reply to Tomasz Figa
---
 arch/arm/mach-exynos/mach-exynos4-dt.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/mach-exynos/mach-exynos4-dt.c +14 -0
index 8dad4ec..5f805b4 100644
@@ -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,
Signature · 1 line
1.7.12
#16 lore raw

PATCH v2 3/5 ARM: Exynos4: Add OF compatibility lookups for Exynos4 i2c adapters

Quoted 5 lines · Tomasz Figa
---
 arch/arm/mach-exynos/mach-exynos4-dt.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
Quoted 29 lines
arch/arm/mach-exynos/mach-exynos4-dt.c +14 -1
index 8dad4ec..5f805b4 100644
@@ -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

#17 lore raw

PATCH v2 3/5 ARM: Exynos4: Add OF compatibility lookups for Exynos4 i2c adapters

Quoted 10 lines · Thomas Abraham
Quoted 5 lines · Tomasz Figa
---
 arch/arm/mach-exynos/mach-exynos4-dt.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

OK, will apply.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#18 lore raw

PATCH v2 4/5 ARM: EXYNOS: Increase maximum possible memory bank size to 512MiB

In reply to Tomasz Figa

Some boards have larger memory banks than 256MiB. This patch increses maximum bank size for Exynos-based boards to 512MiB.

---
 arch/arm/mach-exynos/include/mach/memory.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-exynos/include/mach/memory.h +2 -2
index 374ef2c..d4db508 100644
@@ -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 */
Signature · 1 line
1.7.12
#19 lore raw

PATCH v2 4/5 ARM: EXYNOS: Increase maximum possible memory bank size to 512MiB

Quoted 4 lines · Tomasz Figa

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 <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

Quoted 24 lines
---
 arch/arm/mach-exynos/include/mach/memory.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach- renamed from arch/arm/mach-exynos/include/mach/memory.h +0 -0

exynos/include/mach/memory.h
index 374ef2c..d4db508 100644

arch/arm/mach-exynos/include/mach/memory.h +2 -3
@@ -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

#20 lore raw

PATCH v2 4/5 ARM: EXYNOS: Increase maximum possible memory bank size to 512MiB

Hi Kgene,

Quoted 10 lines · On Saturday 08 of September 2012 11:41:31 Kukjin Kim wrote:
Quoted 2 lines · Tomasz Figa

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

#21 lore raw

PATCH v2 5/5 ARM: Exynos: Add basic dts file for Samsung Trats board

In reply to Tomasz Figa

This commit adds basic device tree for Exynos4210-based Trats board.

Currently it provides support for eMMC over sdhci and MAX8997 PMIC.

---
 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
arch/arm/boot/dts/exynos4210-trats.dts new file +237 -0
new file mode 100644
index 0000000..73567b8
@@ -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;
+				};
+			};
+		};
+	};
+};
arch/arm/mach-exynos/Makefile.boot +1 -1
index 31bd181..a79d999 100644
@@ -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
Signature · 1 line
1.7.12
#22 lore raw

PATCH v2 5/5 ARM: Exynos: Add basic dts file for Samsung Trats board

Quoted 33 lines · Tomasz Figa

This commit adds basic device tree for Exynos4210-based Trats board.

Currently it provides support for eMMC over sdhci and MAX8997 PMIC.

---
 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
arch/arm/boot/dts/exynos4210-trats.dts new file +15 -0
new file mode 100644
index 0000000..73567b8
@@ -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/;

arch/arm/boot/dts/exynos4210-trats.dts line 25

Quoted 10 lines
arch/arm/boot/dts/exynos4210-trats.dts new file +10 -0
+/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?

Quoted 50 lines
arch/arm/boot/dts/exynos4210-trats.dts new file +50 -0
+
+       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>;

arch/arm/boot/dts/exynos4210-trats.dts line 85

Quoted 10 lines
arch/arm/boot/dts/exynos4210-trats.dts new file +10 -0
+               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.

Quoted 164 lines
arch/arm/boot/dts/exynos4210-trats.dts new file +152 -0
+
+                       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;
+                               };
+                       };
+               };
+       };
+};
arch/arm/mach-exynos/Makefile.boot +1 -2
index 31bd181..a79d999 100644
@@ -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
--
Quoted 2 lines

1.7.12

#23 lore raw

PATCH v2 5/5 ARM: Exynos: Add basic dts file for Samsung Trats board

Hi,

Thanks for reviewing the patch.

Quoted 8 lines · On Wednesday 05 of September 2012 09:35:49 Thomas Abraham wrote:

arch/arm/boot/dts/exynos4210-trats.dts line 25

Quoted 5 lines
arch/arm/boot/dts/exynos4210-trats.dts new file +5 -0
+
+       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).

Quoted 8 lines

arch/arm/boot/dts/exynos4210-trats.dts line 85

Quoted 4 lines
arch/arm/boot/dts/exynos4210-trats.dts new file +4 -0
+               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

#24 lore raw

PATCH v2 5/5 ARM: Exynos: Add basic dts file for Samsung Trats board

Quoted 12 lines · Tomasz Figa

Hi,

Thanks for reviewing the patch.

Quoted 6 lines · On Wednesday 05 of September 2012 09:35:49 Thomas Abraham wrote:
Quoted 5 lines
arch/arm/boot/dts/exynos4210-trats.dts new file +5 -0
+
+       memory {
+               reg =  <0x40000000 0x20000000
+                       0x60000000 0x20000000>;
+       };
Quoted 6 lines
Quoted 2 lines

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...

Quoted 4 lines

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>;
};
Quoted 10 lines

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).

Quoted 5 lines
Quoted 4 lines
arch/arm/boot/dts/exynos4210-trats.dts new file +4 -0
+               max8997_pmic at 66 {
+                       compatible = "maxim,max8997-pmic";
+
+                       reg = <0x66>;
Quoted 6 lines
Quoted 3 lines

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 <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

#25 lore raw

PATCH v2 5/5 ARM: Exynos: Add basic dts file for Samsung Trats board

Hi Kgene,

Quoted 17 lines · On Saturday 08 of September 2012 11:47:15 Kukjin Kim wrote:
Quoted 10 lines
Quoted 7 lines

arch/arm/boot/dts/exynos4210-trats.dts line 25

Quoted 4 lines
arch/arm/boot/dts/exynos4210-trats.dts new file +4 -0
+       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...

Quoted 3 lines

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.

Quoted 5 lines

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.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

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

#26 lore raw

PATCH v2 5/5 ARM: Exynos: Add basic dts file for Samsung Trats board

Quoted 22 lines · Tomasz Figa

Hi Kgene,

Quoted 5 lines · On Saturday 08 of September 2012 11:47:15 Kukjin Kim wrote:
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
arch/arm/boot/dts/exynos4210-trats.dts new file +4 -0
+       memory {
+               reg =  <0x40000000 0x20000000
+                       0x60000000 0x20000000>;
+       };
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines

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...

Quoted 1 line

I've been talking with Kyungmin about this. Originally bootloaders

used

Quoted 3 lines
Quoted 2 lines

to report 4 banks of 256 MiB, but it turned out that real bank configuration on Trats is 2 banks of 512 MiB.

Quoted 9 lines
Quoted 5 lines

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 <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.