[PATCH v2 3/4] arm/dts: OMAP4: Add mmc controller nodes and board data

2012-03-12 Thread Rajendra Nayak
Add omap mmc related device tree data for OMAP4.
Currenly limited to only omap4-panda and omap4-sdp
boards.

Signed-off-by: Rajendra Nayak rna...@ti.com
---
 arch/arm/boot/dts/omap4-panda.dts |   22 ++
 arch/arm/boot/dts/omap4-sdp.dts   |   24 
 arch/arm/boot/dts/omap4.dtsi  |   31 +++
 3 files changed, 77 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/omap4-panda.dts 
b/arch/arm/boot/dts/omap4-panda.dts
index 29646dc..ea6f5bb 100644
--- a/arch/arm/boot/dts/omap4-panda.dts
+++ b/arch/arm/boot/dts/omap4-panda.dts
@@ -52,3 +52,25 @@
 i2c4 {
clock-frequency = 40;
 };
+
+mmc1 {
+   vmmc-supply = vmmc;
+   ti,bus-width = 8;
+};
+
+mmc2 {
+   status = disable;
+};
+
+mmc3 {
+   status = disable;
+};
+
+mmc4 {
+   status = disable;
+};
+
+mmc5 {
+   ti,non-removable;
+   ti,bus-width = 4;
+};
diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
index 01db8b7..852657a 100644
--- a/arch/arm/boot/dts/omap4-sdp.dts
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -70,3 +70,27 @@
reg = 0x1e;
};
 };
+
+mmc1 {
+   vmmc-supply = vmmc;
+   ti,bus-width = 8;
+};
+
+mmc2 {
+   vmmc-supply = vaux1;
+   ti,bus-width = 8;
+   ti,non-removable;
+};
+
+mmc3 {
+   status = disable;
+};
+
+mmc4 {
+   status = disable;
+};
+
+mmc5 {
+   ti,bus-width = 4;
+   ti,non-removable;
+};
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 29f4589..9226543 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -155,5 +155,36 @@
#size-cells = 0;
ti,hwmods = i2c4;
};
+
+   mmc1: mmc@1 {
+   compatible = ti,omap4-hsmmc;
+   ti,hwmods = mmc1;
+   ti,dual-volt;
+   ti,needs-special-reset;
+   };
+
+   mmc2: mmc@2 {
+   compatible = ti,omap4-hsmmc;
+   ti,hwmods = mmc2;
+   ti,needs-special-reset;
+   };
+
+   mmc3: mmc@3 {
+   compatible = ti,omap4-hsmmc;
+   ti,hwmods = mmc3;
+   ti,needs-special-reset;
+   };
+
+   mmc4: mmc@4 {
+   compatible = ti,omap4-hsmmc;
+   ti,hwmods = mmc4;
+   ti,needs-special-reset;
+   };
+
+   mmc5: mmc@5 {
+   compatible = ti,omap4-hsmmc;
+   ti,hwmods = mmc5;
+   ti,needs-special-reset;
+   };
};
 };
-- 
1.7.1

--
To unsubscribe from this list: send the line unsubscribe linux-mmc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 3/4] arm/dts: OMAP4: Add mmc controller nodes and board data

2012-03-09 Thread Grant Likely
On Fri, 24 Feb 2012 15:56:52 +0530, Rajendra Nayak rna...@ti.com wrote:
 On Friday 24 February 2012 03:46 PM, T Krishnamoorthy, Balaji wrote:
  diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
  index 29f4589..9204f60 100644
  --- a/arch/arm/boot/dts/omap4.dtsi
  +++ b/arch/arm/boot/dts/omap4.dtsi
  @@ -25,6 +25,11 @@
  serial1 =uart2;
  serial2 =uart3;
  serial3 =uart4;
  +   mmc1 =mmc1;
  +   mmc2 =mmc2;
  +   mmc3 =mmc3;
  +   mmc4 =mmc4;
  +   mmc5 =mmc5;
  };
 
  cpus {
  @@ -155,5 +160,31 @@
  #size-cells =0;
  ti,hwmods = i2c4;
  };
  +
  +   mmc1: mmc@1 {
  +   compatible = ti,omap4-hsmmc;
  +   ti,hwmods = mmc1;
  +   ti,dual-volt;
  +   };
  +
  +   mmc2: mmc@2 {
  +   compatible = ti,omap4-hsmmc;
  +   ti,hwmods = mmc2;
  +   };
 
  Hi Rajendra,
  Is there a way to control the device registration order,
  eMMC connected to mmc2 needs to be registered as /dev/mmcblk0p ...
  irrespective of whether SD card is mount or not on mmc1 card slot.
  So that bootargs would not have to be modified when filesystem is on eMMC.
 
 I don't know if we can, but even if we could, we take care of the same
 bootargs working on two boards (say sdp and panda) *if* on sdp I have my
 filesystem on eMMC and on panda I have it on external card.
 What happens if I want to use my filesystem on both boards on external
 card?

of_alias_get_id() may be able to help you here.  It will extract the id
numbering from the /aliases node.  That is the safe way to do global
enumeration of devices in the device tree (instead of 'cell-index' which
is strongly discouraged)

g.

 
 
  +
  +   mmc3: mmc@3 {
  +   compatible = ti,omap4-hsmmc;
  +   ti,hwmods = mmc3;
  +   };
  +
  +   mmc4: mmc@4 {
  +   compatible = ti,omap4-hsmmc;
  +   ti,hwmods = mmc4;
  +   };
  +
  +   mmc5: mmc@5 {
  +   compatible = ti,omap4-hsmmc;
  +   ti,hwmods = mmc5;
  +   };
  };
};
  --
  1.7.1
 
 
 
 ___
 linux-arm-kernel mailing list
 linux-arm-ker...@lists.infradead.org
 http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies,Ltd.
--
To unsubscribe from this list: send the line unsubscribe linux-mmc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 3/4] arm/dts: OMAP4: Add mmc controller nodes and board data

2012-02-24 Thread T Krishnamoorthy, Balaji
 diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
 index 29f4589..9204f60 100644
 --- a/arch/arm/boot/dts/omap4.dtsi
 +++ b/arch/arm/boot/dts/omap4.dtsi
 @@ -25,6 +25,11 @@
                serial1 = uart2;
                serial2 = uart3;
                serial3 = uart4;
 +               mmc1 = mmc1;
 +               mmc2 = mmc2;
 +               mmc3 = mmc3;
 +               mmc4 = mmc4;
 +               mmc5 = mmc5;
        };

        cpus {
 @@ -155,5 +160,31 @@
                        #size-cells = 0;
                        ti,hwmods = i2c4;
                };
 +
 +               mmc1: mmc@1 {
 +                       compatible = ti,omap4-hsmmc;
 +                       ti,hwmods = mmc1;
 +                       ti,dual-volt;
 +               };
 +
 +               mmc2: mmc@2 {
 +                       compatible = ti,omap4-hsmmc;
 +                       ti,hwmods = mmc2;
 +               };

Hi Rajendra,
Is there a way to control the device registration order,
eMMC connected to mmc2 needs to be registered as /dev/mmcblk0p ...
irrespective of whether SD card is mount or not on mmc1 card slot.
So that bootargs would not have to be modified when filesystem is on eMMC.

 +
 +               mmc3: mmc@3 {
 +                       compatible = ti,omap4-hsmmc;
 +                       ti,hwmods = mmc3;
 +               };
 +
 +               mmc4: mmc@4 {
 +                       compatible = ti,omap4-hsmmc;
 +                       ti,hwmods = mmc4;
 +               };
 +
 +               mmc5: mmc@5 {
 +                       compatible = ti,omap4-hsmmc;
 +                       ti,hwmods = mmc5;
 +               };
        };
  };
 --
 1.7.1

--
To unsubscribe from this list: send the line unsubscribe linux-mmc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 3/4] arm/dts: OMAP4: Add mmc controller nodes and board data

2012-02-24 Thread Rajendra Nayak

On Friday 24 February 2012 03:46 PM, T Krishnamoorthy, Balaji wrote:

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 29f4589..9204f60 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -25,6 +25,11 @@
serial1 =uart2;
serial2 =uart3;
serial3 =uart4;
+   mmc1 =mmc1;
+   mmc2 =mmc2;
+   mmc3 =mmc3;
+   mmc4 =mmc4;
+   mmc5 =mmc5;
};

cpus {
@@ -155,5 +160,31 @@
#size-cells =0;
ti,hwmods = i2c4;
};
+
+   mmc1: mmc@1 {
+   compatible = ti,omap4-hsmmc;
+   ti,hwmods = mmc1;
+   ti,dual-volt;
+   };
+
+   mmc2: mmc@2 {
+   compatible = ti,omap4-hsmmc;
+   ti,hwmods = mmc2;
+   };


Hi Rajendra,
Is there a way to control the device registration order,
eMMC connected to mmc2 needs to be registered as /dev/mmcblk0p ...
irrespective of whether SD card is mount or not on mmc1 card slot.
So that bootargs would not have to be modified when filesystem is on eMMC.


I don't know if we can, but even if we could, we take care of the same
bootargs working on two boards (say sdp and panda) *if* on sdp I have my
filesystem on eMMC and on panda I have it on external card.
What happens if I want to use my filesystem on both boards on external
card?




+
+   mmc3: mmc@3 {
+   compatible = ti,omap4-hsmmc;
+   ti,hwmods = mmc3;
+   };
+
+   mmc4: mmc@4 {
+   compatible = ti,omap4-hsmmc;
+   ti,hwmods = mmc4;
+   };
+
+   mmc5: mmc@5 {
+   compatible = ti,omap4-hsmmc;
+   ti,hwmods = mmc5;
+   };
};
  };
--
1.7.1



--
To unsubscribe from this list: send the line unsubscribe linux-mmc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 3/4] arm/dts: OMAP4: Add mmc controller nodes and board data

2012-02-24 Thread Russell King - ARM Linux
On Fri, Feb 24, 2012 at 03:56:52PM +0530, Rajendra Nayak wrote:
 I don't know if we can, but even if we could, we take care of the same
 bootargs working on two boards (say sdp and panda) *if* on sdp I have my
 filesystem on eMMC and on panda I have it on external card.
 What happens if I want to use my filesystem on both boards on external
 card?

This is why the bootargs should be part of the information the boot
loader passes to the kernel, and not part of the kernel configuration
or DT.
--
To unsubscribe from this list: send the line unsubscribe linux-mmc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 3/4] arm/dts: OMAP4: Add mmc controller nodes and board data

2012-02-24 Thread T Krishnamoorthy, Balaji
On Fri, Feb 24, 2012 at 3:56 PM, Rajendra Nayak rna...@ti.com wrote:
 On Friday 24 February 2012 03:46 PM, T Krishnamoorthy, Balaji wrote:

 diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
 index 29f4589..9204f60 100644
 --- a/arch/arm/boot/dts/omap4.dtsi
 +++ b/arch/arm/boot/dts/omap4.dtsi
 @@ -25,6 +25,11 @@
                serial1 =uart2;
                serial2 =uart3;
                serial3 =uart4;
 +               mmc1 =mmc1;
 +               mmc2 =mmc2;
 +               mmc3 =mmc3;
 +               mmc4 =mmc4;
 +               mmc5 =mmc5;
        };

        cpus {
 @@ -155,5 +160,31 @@
                        #size-cells =0;
                        ti,hwmods = i2c4;
                };
 +
 +               mmc1: mmc@1 {
 +                       compatible = ti,omap4-hsmmc;
 +                       ti,hwmods = mmc1;
 +                       ti,dual-volt;
 +               };
 +
 +               mmc2: mmc@2 {
 +                       compatible = ti,omap4-hsmmc;
 +                       ti,hwmods = mmc2;
 +               };


 Hi Rajendra,
 Is there a way to control the device registration order,
 eMMC connected to mmc2 needs to be registered as /dev/mmcblk0p ...
 irrespective of whether SD card is mount or not on mmc1 card slot.
 So that bootargs would not have to be modified when filesystem is on eMMC.


 I don't know if we can, but even if we could, we take care of the same
 bootargs working on two boards (say sdp and panda) *if* on sdp I have my
 filesystem on eMMC and on panda I have it on external card.
 What happens if I want to use my filesystem on both boards on external
 card?

While booting if SD card is present in the card slot, SD is detected
as /dev/mmcblk0
and eMMC as /dev/mmcblk1
If SD card is not present, then eMMC is detected as /dev/mmcblk0
When filesystem is in eMMC then bootargs has to switch between mmcblk0
or mmcblk1
depending on whether SD is present or not.

By changing the device order, eMMC will always be mmcblk0 independent
of SD card status.




 +
 +               mmc3: mmc@3 {
 +                       compatible = ti,omap4-hsmmc;
 +                       ti,hwmods = mmc3;
 +               };
 +
 +               mmc4: mmc@4 {
 +                       compatible = ti,omap4-hsmmc;
 +                       ti,hwmods = mmc4;
 +               };
 +
 +               mmc5: mmc@5 {
 +                       compatible = ti,omap4-hsmmc;
 +                       ti,hwmods = mmc5;
 +               };
        };
  };
 --
 1.7.1


--
To unsubscribe from this list: send the line unsubscribe linux-mmc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 3/4] arm/dts: OMAP4: Add mmc controller nodes and board data

2012-02-23 Thread Rajendra Nayak
Add omap mmc related device tree data for OMAP4.
Currenly limited to only omap4-panda and omap4-sdp
boards.

Signed-off-by: Rajendra Nayak rna...@ti.com
---
 arch/arm/boot/dts/omap4-panda.dts |   10 ++
 arch/arm/boot/dts/omap4-sdp.dts   |   16 
 arch/arm/boot/dts/omap4.dtsi  |   31 +++
 3 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/omap4-panda.dts 
b/arch/arm/boot/dts/omap4-panda.dts
index 29646dc..9fe51b9 100644
--- a/arch/arm/boot/dts/omap4-panda.dts
+++ b/arch/arm/boot/dts/omap4-panda.dts
@@ -52,3 +52,13 @@
 i2c4 {
clock-frequency = 40;
 };
+
+mmc1 {
+   vmmc-supply = vmmc;
+   ti,bus-width = 8;
+};
+
+mmc5 {
+   ti,non-removable;
+   ti,bus-width = 4;
+};
diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
index 01db8b7..2fca7a3 100644
--- a/arch/arm/boot/dts/omap4-sdp.dts
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -70,3 +70,19 @@
reg = 0x1e;
};
 };
+
+mmc1 {
+   vmmc-supply = vmmc;
+   ti,bus-width = 8;
+};
+
+mmc2 {
+   vmmc-supply = vaux1;
+   ti,bus-width = 8;
+   ti,non-removable;
+};
+
+mmc5 {
+   ti,bus-width = 4;
+   ti,non-removable;
+};
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 29f4589..9204f60 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -25,6 +25,11 @@
serial1 = uart2;
serial2 = uart3;
serial3 = uart4;
+   mmc1 = mmc1;
+   mmc2 = mmc2;
+   mmc3 = mmc3;
+   mmc4 = mmc4;
+   mmc5 = mmc5;
};
 
cpus {
@@ -155,5 +160,31 @@
#size-cells = 0;
ti,hwmods = i2c4;
};
+
+   mmc1: mmc@1 {
+   compatible = ti,omap4-hsmmc;
+   ti,hwmods = mmc1;
+   ti,dual-volt;
+   };
+
+   mmc2: mmc@2 {
+   compatible = ti,omap4-hsmmc;
+   ti,hwmods = mmc2;
+   };
+
+   mmc3: mmc@3 {
+   compatible = ti,omap4-hsmmc;
+   ti,hwmods = mmc3;
+   };
+
+   mmc4: mmc@4 {
+   compatible = ti,omap4-hsmmc;
+   ti,hwmods = mmc4;
+   };
+
+   mmc5: mmc@5 {
+   compatible = ti,omap4-hsmmc;
+   ti,hwmods = mmc5;
+   };
};
 };
-- 
1.7.1

--
To unsubscribe from this list: send the line unsubscribe linux-mmc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html