ARM: dts: Add dra7 iodelay configuration and use it for MMC
diff mbox

Message ID 20161230184914.GC3940@atomide.com
State New
Headers show

Commit Message

Tony Lindgren Dec. 30, 2016, 6:49 p.m. UTC
Add dra7 iodelay configuration and use it for MMC.

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 21 ++++++++++++++++++++-
 arch/arm/boot/dts/dra7.dtsi                     |  8 ++++++++
 include/dt-bindings/pinctrl/dra.h               |  4 ++++
 3 files changed, 32 insertions(+), 1 deletion(-)
---

And ere are the related dts changes.

Comments

Linus Walleij Jan. 9, 2017, 6:47 p.m. UTC | #1
On Fri, Dec 30, 2016 at 7:49 PM, Tony Lindgren <tony@atomide.com> wrote:

> Add dra7 iodelay configuration and use it for MMC.
>
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Pls take this through the OMAP tree to ARM SoC.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tony Lindgren Feb. 14, 2017, 6:51 p.m. UTC | #2
Nishanth,

* Tony Lindgren <tony@atomide.com> [161230 10:50]:
> Add dra7 iodelay configuration and use it for MMC.

I just noticed that this patch should probably be:

From: Nishanth Menon <nm@ti.com>

I think I just added the description to the patch.

Can you please confirm and reply with your Signed-off-by
if that's the case?

Regards,

Tony


> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 21 ++++++++++++++++++++-
>  arch/arm/boot/dts/dra7.dtsi                     |  8 ++++++++
>  include/dt-bindings/pinctrl/dra.h               |  4 ++++
>  3 files changed, 32 insertions(+), 1 deletion(-)
> ---
> 
> And ere are the related dts changes.
> 
> diff --git a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
> --- a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
> +++ b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
> @@ -190,6 +190,25 @@
>  		>;
>  	};
>  };
> +
> +&dra7_iodelay_core
> +{
> +	mmc2_iodelay_3v3_conf: mmc2_iodelay_3v3_conf {
> +		pinctrl-pin-array = <
> +			0x18c A_DELAY_PS(0) G_DELAY_PS(120)	/* CFG_GPMC_A19_IN */
> +			0x1a4 A_DELAY_PS(265) G_DELAY_PS(360)	/* CFG_GPMC_A20_IN */
> +			0x1b0 A_DELAY_PS(0) G_DELAY_PS(120)	/* CFG_GPMC_A21_IN */
> +			0x1bc A_DELAY_PS(0) G_DELAY_PS(120)	/* CFG_GPMC_A22_IN */
> +			0x1c8 A_DELAY_PS(287) G_DELAY_PS(420)	/* CFG_GPMC_A23_IN */
> +			0x1d4 A_DELAY_PS(144) G_DELAY_PS(240)	/* CFG_GPMC_A24_IN */
> +			0x1e0 A_DELAY_PS(0) G_DELAY_PS(0)	/* CFG_GPMC_A25_IN */
> +			0x1ec A_DELAY_PS(120) G_DELAY_PS(0)	/* CFG_GPMC_A26_IN */
> +			0x1f8 A_DELAY_PS(120) G_DELAY_PS(180)	/* CFG_GPMC_A27_IN */
> +			0x360 A_DELAY_PS(0) G_DELAY_PS(0)	/* CFG_GPMC_CS1_IN */
> +		>;
> +	};
> +};
> +
>  &i2c1 {
>  	status = "okay";
>  	clock-frequency = <400000>;
> @@ -452,7 +471,7 @@
>  	status = "okay";
>  
>  	pinctrl-names = "default";
> -	pinctrl-0 = <&mmc2_pins_default>;
> +	pinctrl-0 = <&mmc2_pins_default &mmc2_iodelay_3v3_conf>;
>  
>  	vmmc-supply = <&vdd_3v3>;
>  	bus-width = <8>;
> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
> --- a/arch/arm/boot/dts/dra7.dtsi
> +++ b/arch/arm/boot/dts/dra7.dtsi
> @@ -401,6 +401,14 @@
>  			reg = <0x40d00000 0x100>;
>  		};
>  
> +		dra7_iodelay_core: padconf@4844a000 {
> +			compatible = "ti,dra7-iodelay";
> +			reg = <0x4844a000 0x0d1c>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			#pinctrl-cells = <2>;
> +		};
> +
>  		sdma: dma-controller@4a056000 {
>  			compatible = "ti,omap4430-sdma";
>  			reg = <0x4a056000 0x1000>;
> diff --git a/include/dt-bindings/pinctrl/dra.h b/include/dt-bindings/pinctrl/dra.h
> --- a/include/dt-bindings/pinctrl/dra.h
> +++ b/include/dt-bindings/pinctrl/dra.h
> @@ -73,5 +73,9 @@
>   */
>  #define DRA7XX_CORE_IOPAD(pa, val)	(((pa) & 0xffff) - 0x3400) (val)
>  
> +/* DRA7 IODELAY configuration parameters */
> +#define A_DELAY_PS(val)		((val) & 0xffff)
> +#define G_DELAY_PS(val)		((val) & 0xffff)
> +
>  #endif
>  
> -- 
> 2.11.0
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Nishanth Menon Feb. 14, 2017, 6:57 p.m. UTC | #3
On 02/14/2017 12:51 PM, Tony Lindgren wrote:
> Nishanth,
>
> * Tony Lindgren <tony@atomide.com> [161230 10:50]:
>> Add dra7 iodelay configuration and use it for MMC.
>
> I just noticed that this patch should probably be:
>
> From: Nishanth Menon <nm@ti.com>
>
> I think I just added the description to the patch.
>
> Can you please confirm and reply with your Signed-off-by
> if that's the case?
>

Though I had introduced the node [ 
http://git.ti.com/ti-linux-kernel/ti-linux-kernel/commit/34661cbccc679bb8d91768bc78495e94e6d40f1f 
], the x15 values were first introduced by Kishon.

http://git.ti.com/ti-linux-kernel/ti-linux-kernel/commit/1463b1e8facb7180f5679b373411b3fbeb1608fd

personally, From or not really does'nt matter as long as we can get 
the solution in.

So, as long as it helps..
Signed-off-by: Nishanth Menon <nm@ti.com>

>
>
>> Signed-off-by: Tony Lindgren <tony@atomide.com>
>> ---
>>  arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 21 ++++++++++++++++++++-
>>  arch/arm/boot/dts/dra7.dtsi                     |  8 ++++++++
>>  include/dt-bindings/pinctrl/dra.h               |  4 ++++
>>  3 files changed, 32 insertions(+), 1 deletion(-)
>> ---
>>
>> And ere are the related dts changes.
>>
>> diff --git a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
>> --- a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
>> +++ b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
>> @@ -190,6 +190,25 @@
>>  		>;
>>  	};
>>  };
>> +
>> +&dra7_iodelay_core
>> +{
>> +	mmc2_iodelay_3v3_conf: mmc2_iodelay_3v3_conf {
>> +		pinctrl-pin-array = <
>> +			0x18c A_DELAY_PS(0) G_DELAY_PS(120)	/* CFG_GPMC_A19_IN */
>> +			0x1a4 A_DELAY_PS(265) G_DELAY_PS(360)	/* CFG_GPMC_A20_IN */
>> +			0x1b0 A_DELAY_PS(0) G_DELAY_PS(120)	/* CFG_GPMC_A21_IN */
>> +			0x1bc A_DELAY_PS(0) G_DELAY_PS(120)	/* CFG_GPMC_A22_IN */
>> +			0x1c8 A_DELAY_PS(287) G_DELAY_PS(420)	/* CFG_GPMC_A23_IN */
>> +			0x1d4 A_DELAY_PS(144) G_DELAY_PS(240)	/* CFG_GPMC_A24_IN */
>> +			0x1e0 A_DELAY_PS(0) G_DELAY_PS(0)	/* CFG_GPMC_A25_IN */
>> +			0x1ec A_DELAY_PS(120) G_DELAY_PS(0)	/* CFG_GPMC_A26_IN */
>> +			0x1f8 A_DELAY_PS(120) G_DELAY_PS(180)	/* CFG_GPMC_A27_IN */
>> +			0x360 A_DELAY_PS(0) G_DELAY_PS(0)	/* CFG_GPMC_CS1_IN */
>> +		>;
>> +	};
>> +};
>> +
>>  &i2c1 {
>>  	status = "okay";
>>  	clock-frequency = <400000>;
>> @@ -452,7 +471,7 @@
>>  	status = "okay";
>>
>>  	pinctrl-names = "default";
>> -	pinctrl-0 = <&mmc2_pins_default>;
>> +	pinctrl-0 = <&mmc2_pins_default &mmc2_iodelay_3v3_conf>;
>>
>>  	vmmc-supply = <&vdd_3v3>;
>>  	bus-width = <8>;
>> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
>> --- a/arch/arm/boot/dts/dra7.dtsi
>> +++ b/arch/arm/boot/dts/dra7.dtsi
>> @@ -401,6 +401,14 @@
>>  			reg = <0x40d00000 0x100>;
>>  		};
>>
>> +		dra7_iodelay_core: padconf@4844a000 {
>> +			compatible = "ti,dra7-iodelay";
>> +			reg = <0x4844a000 0x0d1c>;
>> +			#address-cells = <1>;
>> +			#size-cells = <0>;
>> +			#pinctrl-cells = <2>;
>> +		};
>> +
>>  		sdma: dma-controller@4a056000 {
>>  			compatible = "ti,omap4430-sdma";
>>  			reg = <0x4a056000 0x1000>;
>> diff --git a/include/dt-bindings/pinctrl/dra.h b/include/dt-bindings/pinctrl/dra.h
>> --- a/include/dt-bindings/pinctrl/dra.h
>> +++ b/include/dt-bindings/pinctrl/dra.h
>> @@ -73,5 +73,9 @@
>>   */
>>  #define DRA7XX_CORE_IOPAD(pa, val)	(((pa) & 0xffff) - 0x3400) (val)
>>
>> +/* DRA7 IODELAY configuration parameters */
>> +#define A_DELAY_PS(val)		((val) & 0xffff)
>> +#define G_DELAY_PS(val)		((val) & 0xffff)
>> +
>>  #endif
>>
>> --
>> 2.11.0
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kishon Vijay Abraham I Feb. 15, 2017, 12:35 p.m. UTC | #4
Hi,

On Wednesday 15 February 2017 12:27 AM, Nishanth Menon wrote:
> On 02/14/2017 12:51 PM, Tony Lindgren wrote:
>> Nishanth,
>>
>> * Tony Lindgren <tony@atomide.com> [161230 10:50]:
>>> Add dra7 iodelay configuration and use it for MMC.
>>
>> I just noticed that this patch should probably be:
>>
>> From: Nishanth Menon <nm@ti.com>
>>
>> I think I just added the description to the patch.
>>
>> Can you please confirm and reply with your Signed-off-by
>> if that's the case?
>>
> 
> Though I had introduced the node [
> http://git.ti.com/ti-linux-kernel/ti-linux-kernel/commit/34661cbccc679bb8d91768bc78495e94e6d40f1f
> ], the x15 values were first introduced by Kishon.
> 
> http://git.ti.com/ti-linux-kernel/ti-linux-kernel/commit/1463b1e8facb7180f5679b373411b3fbeb1608fd
> 
> 
> personally, From or not really does'nt matter as long as we can get the
> solution in.
> 
> So, as long as it helps..
> Signed-off-by: Nishanth Menon <nm@ti.com>
> 
>>
>>
>>> Signed-off-by: Tony Lindgren <tony@atomide.com>
>>> ---
>>>  arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi | 21 ++++++++++++++++++++-
>>>  arch/arm/boot/dts/dra7.dtsi                     |  8 ++++++++
>>>  include/dt-bindings/pinctrl/dra.h               |  4 ++++
>>>  3 files changed, 32 insertions(+), 1 deletion(-)
>>> ---
>>>
>>> And ere are the related dts changes.
>>>
>>> diff --git a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
>>> b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
>>> --- a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
>>> +++ b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
>>> @@ -190,6 +190,25 @@
>>>          >;
>>>      };
>>>  };
>>> +
>>> +&dra7_iodelay_core
>>> +{
>>> +    mmc2_iodelay_3v3_conf: mmc2_iodelay_3v3_conf {
>>> +        pinctrl-pin-array = <
>>> +            0x18c A_DELAY_PS(0) G_DELAY_PS(120)    /* CFG_GPMC_A19_IN */
>>> +            0x1a4 A_DELAY_PS(265) G_DELAY_PS(360)    /* CFG_GPMC_A20_IN */
>>> +            0x1b0 A_DELAY_PS(0) G_DELAY_PS(120)    /* CFG_GPMC_A21_IN */
>>> +            0x1bc A_DELAY_PS(0) G_DELAY_PS(120)    /* CFG_GPMC_A22_IN */
>>> +            0x1c8 A_DELAY_PS(287) G_DELAY_PS(420)    /* CFG_GPMC_A23_IN */
>>> +            0x1d4 A_DELAY_PS(144) G_DELAY_PS(240)    /* CFG_GPMC_A24_IN */
>>> +            0x1e0 A_DELAY_PS(0) G_DELAY_PS(0)    /* CFG_GPMC_A25_IN */
>>> +            0x1ec A_DELAY_PS(120) G_DELAY_PS(0)    /* CFG_GPMC_A26_IN */
>>> +            0x1f8 A_DELAY_PS(120) G_DELAY_PS(180)    /* CFG_GPMC_A27_IN */
>>> +            0x360 A_DELAY_PS(0) G_DELAY_PS(0)    /* CFG_GPMC_CS1_IN */
>>> +        >;
>>> +    };
>>> +};
>>> +
>>>  &i2c1 {
>>>      status = "okay";
>>>      clock-frequency = <400000>;
>>> @@ -452,7 +471,7 @@
>>>      status = "okay";
>>>
>>>      pinctrl-names = "default";
>>> -    pinctrl-0 = <&mmc2_pins_default>;
>>> +    pinctrl-0 = <&mmc2_pins_default &mmc2_iodelay_3v3_conf>;

I had to remove the iodelay added here based on datasheet (patch [1]).

I also wanted to confirm if "MODE_SELECT" should be added in pinctrl values
like [2] for adding manual mode iodelay because that seems to be missing in
this patch.

Thanks
Kishon

[1] ->
http://git.ti.com/cgit/cgit.cgi/ti-linux-kernel/ti-linux-kernel.git/commit/?h=ti-linux-4.9.y&id=441f799d2d15a1ed2f0a89024bf3f2fd82816dbd

[2] ->
http://git.ti.com/cgit/cgit.cgi/ti-linux-kernel/ti-linux-kernel.git/commit/?h=ti-linux-4.9.y&id=decd3b433d6485d9176ce069bd66b109fb82fe07
>>>
>>>      vmmc-supply = <&vdd_3v3>;
>>>      bus-width = <8>;
>>> diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
>>> --- a/arch/arm/boot/dts/dra7.dtsi
>>> +++ b/arch/arm/boot/dts/dra7.dtsi
>>> @@ -401,6 +401,14 @@
>>>              reg = <0x40d00000 0x100>;
>>>          };
>>>
>>> +        dra7_iodelay_core: padconf@4844a000 {
>>> +            compatible = "ti,dra7-iodelay";
>>> +            reg = <0x4844a000 0x0d1c>;
>>> +            #address-cells = <1>;
>>> +            #size-cells = <0>;
>>> +            #pinctrl-cells = <2>;
>>> +        };
>>> +
>>>          sdma: dma-controller@4a056000 {
>>>              compatible = "ti,omap4430-sdma";
>>>              reg = <0x4a056000 0x1000>;
>>> diff --git a/include/dt-bindings/pinctrl/dra.h
>>> b/include/dt-bindings/pinctrl/dra.h
>>> --- a/include/dt-bindings/pinctrl/dra.h
>>> +++ b/include/dt-bindings/pinctrl/dra.h
>>> @@ -73,5 +73,9 @@
>>>   */
>>>  #define DRA7XX_CORE_IOPAD(pa, val)    (((pa) & 0xffff) - 0x3400) (val)
>>>
>>> +/* DRA7 IODELAY configuration parameters */
>>> +#define A_DELAY_PS(val)        ((val) & 0xffff)
>>> +#define G_DELAY_PS(val)        ((val) & 0xffff)
>>> +
>>>  #endif
>>>
>>> -- 
>>> 2.11.0
>>> -- 
>>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tony Lindgren Feb. 15, 2017, 3:50 p.m. UTC | #5
* Kishon Vijay Abraham I <kishon@ti.com> [170215 04:36]:
> On Wednesday 15 February 2017 12:27 AM, Nishanth Menon wrote:
> > On 02/14/2017 12:51 PM, Tony Lindgren wrote:
> >> Nishanth,
> >>
> >> * Tony Lindgren <tony@atomide.com> [161230 10:50]:
> >>> Add dra7 iodelay configuration and use it for MMC.
> >>
> >> I just noticed that this patch should probably be:
> >>
> >> From: Nishanth Menon <nm@ti.com>
> >>
> >> I think I just added the description to the patch.
> >>
> >> Can you please confirm and reply with your Signed-off-by
> >> if that's the case?
> >>
> > 
> > Though I had introduced the node [
> > http://git.ti.com/ti-linux-kernel/ti-linux-kernel/commit/34661cbccc679bb8d91768bc78495e94e6d40f1f
> > ], the x15 values were first introduced by Kishon.
> > 
> > http://git.ti.com/ti-linux-kernel/ti-linux-kernel/commit/1463b1e8facb7180f5679b373411b3fbeb1608fd
> > 
> > 
> > personally, From or not really does'nt matter as long as we can get the
> > solution in.
> > 
> > So, as long as it helps..
> > Signed-off-by: Nishanth Menon <nm@ti.com>
...
> I had to remove the iodelay added here based on datasheet (patch [1]).

OK thanks for the info. So we have multiple authors and as Kishon added
the working values I suggest we credit the patch for Kishon.

> I also wanted to confirm if "MODE_SELECT" should be added in pinctrl values
> like [2] for adding manual mode iodelay because that seems to be missing in
> this patch.

Oh OK. If it's needed then yeah let's update it for that too. Can you
please check it? And then send an updated version of this patch with
"From" credited to you? Just update the description to say "Based on
earlier patches in TI Linux kernel tree done by Nishanth Menon and
Kishon Vijay Abraham I".

Regards,

Tony

> [1] ->
> http://git.ti.com/cgit/cgit.cgi/ti-linux-kernel/ti-linux-kernel.git/commit/?h=ti-linux-4.9.y&id=441f799d2d15a1ed2f0a89024bf3f2fd82816dbd
> 
> [2] ->
> http://git.ti.com/cgit/cgit.cgi/ti-linux-kernel/ti-linux-kernel.git/commit/?h=ti-linux-4.9.y&id=decd3b433d6485d9176ce069bd66b109fb82fe07
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kishon Vijay Abraham I Feb. 16, 2017, 1:58 p.m. UTC | #6
Hi,

On Wednesday 15 February 2017 09:20 PM, Tony Lindgren wrote:
> * Kishon Vijay Abraham I <kishon@ti.com> [170215 04:36]:
>> On Wednesday 15 February 2017 12:27 AM, Nishanth Menon wrote:
>>> On 02/14/2017 12:51 PM, Tony Lindgren wrote:
>>>> Nishanth,
>>>>
>>>> * Tony Lindgren <tony@atomide.com> [161230 10:50]:
>>>>> Add dra7 iodelay configuration and use it for MMC.
>>>>
>>>> I just noticed that this patch should probably be:
>>>>
>>>> From: Nishanth Menon <nm@ti.com>
>>>>
>>>> I think I just added the description to the patch.
>>>>
>>>> Can you please confirm and reply with your Signed-off-by
>>>> if that's the case?
>>>>
>>>
>>> Though I had introduced the node [
>>> http://git.ti.com/ti-linux-kernel/ti-linux-kernel/commit/34661cbccc679bb8d91768bc78495e94e6d40f1f
>>> ], the x15 values were first introduced by Kishon.
>>>
>>> http://git.ti.com/ti-linux-kernel/ti-linux-kernel/commit/1463b1e8facb7180f5679b373411b3fbeb1608fd
>>>
>>>
>>> personally, From or not really does'nt matter as long as we can get the
>>> solution in.
>>>
>>> So, as long as it helps..
>>> Signed-off-by: Nishanth Menon <nm@ti.com>
> ...
>> I had to remove the iodelay added here based on datasheet (patch [1]).
> 
> OK thanks for the info. So we have multiple authors and as Kishon added
> the working values I suggest we credit the patch for Kishon.
> 
>> I also wanted to confirm if "MODE_SELECT" should be added in pinctrl values
>> like [2] for adding manual mode iodelay because that seems to be missing in
>> this patch.
> 
> Oh OK. If it's needed then yeah let's update it for that too. Can you
> please check it? And then send an updated version of this patch with
> "From" credited to you? Just update the description to say "Based on
> earlier patches in TI Linux kernel tree done by Nishanth Menon and
> Kishon Vijay Abraham I".

Sure, I'll send it along with adding UHS mode support patches.

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

Patch
diff mbox

diff --git a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
--- a/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
+++ b/arch/arm/boot/dts/am57xx-beagle-x15-common.dtsi
@@ -190,6 +190,25 @@ 
 		>;
 	};
 };
+
+&dra7_iodelay_core
+{
+	mmc2_iodelay_3v3_conf: mmc2_iodelay_3v3_conf {
+		pinctrl-pin-array = <
+			0x18c A_DELAY_PS(0) G_DELAY_PS(120)	/* CFG_GPMC_A19_IN */
+			0x1a4 A_DELAY_PS(265) G_DELAY_PS(360)	/* CFG_GPMC_A20_IN */
+			0x1b0 A_DELAY_PS(0) G_DELAY_PS(120)	/* CFG_GPMC_A21_IN */
+			0x1bc A_DELAY_PS(0) G_DELAY_PS(120)	/* CFG_GPMC_A22_IN */
+			0x1c8 A_DELAY_PS(287) G_DELAY_PS(420)	/* CFG_GPMC_A23_IN */
+			0x1d4 A_DELAY_PS(144) G_DELAY_PS(240)	/* CFG_GPMC_A24_IN */
+			0x1e0 A_DELAY_PS(0) G_DELAY_PS(0)	/* CFG_GPMC_A25_IN */
+			0x1ec A_DELAY_PS(120) G_DELAY_PS(0)	/* CFG_GPMC_A26_IN */
+			0x1f8 A_DELAY_PS(120) G_DELAY_PS(180)	/* CFG_GPMC_A27_IN */
+			0x360 A_DELAY_PS(0) G_DELAY_PS(0)	/* CFG_GPMC_CS1_IN */
+		>;
+	};
+};
+
 &i2c1 {
 	status = "okay";
 	clock-frequency = <400000>;
@@ -452,7 +471,7 @@ 
 	status = "okay";
 
 	pinctrl-names = "default";
-	pinctrl-0 = <&mmc2_pins_default>;
+	pinctrl-0 = <&mmc2_pins_default &mmc2_iodelay_3v3_conf>;
 
 	vmmc-supply = <&vdd_3v3>;
 	bus-width = <8>;
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -401,6 +401,14 @@ 
 			reg = <0x40d00000 0x100>;
 		};
 
+		dra7_iodelay_core: padconf@4844a000 {
+			compatible = "ti,dra7-iodelay";
+			reg = <0x4844a000 0x0d1c>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			#pinctrl-cells = <2>;
+		};
+
 		sdma: dma-controller@4a056000 {
 			compatible = "ti,omap4430-sdma";
 			reg = <0x4a056000 0x1000>;
diff --git a/include/dt-bindings/pinctrl/dra.h b/include/dt-bindings/pinctrl/dra.h
--- a/include/dt-bindings/pinctrl/dra.h
+++ b/include/dt-bindings/pinctrl/dra.h
@@ -73,5 +73,9 @@ 
  */
 #define DRA7XX_CORE_IOPAD(pa, val)	(((pa) & 0xffff) - 0x3400) (val)
 
+/* DRA7 IODELAY configuration parameters */
+#define A_DELAY_PS(val)		((val) & 0xffff)
+#define G_DELAY_PS(val)		((val) & 0xffff)
+
 #endif