diff mbox

[V5] ARM: dts: Add dwmmc DT nodes for exynos5420 SOC

Message ID 1377691386-7085-1-git-send-email-yuvaraj.cd@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Yuvaraj CD Aug. 28, 2013, 12:03 p.m. UTC
This patch adds the device tree node entries for exynos5420 SOC.
Exynos5420 has a different version of DWMMC controller,so a new
compatible string is used to distinguish it from the prior SOC's.

This patch depends on
	mmc: dw_mmc: exynos: Add a new compatible string for exynos5420

changes since v4:
	1.Droppped the bypass-smu binding property.
	2.Used compatible string "samsung,exynos5250-dw-mshc"
	  for controller instance which does not have SMU.

changes since V3:
	1.change fifo-depth size from 0x80 to 0x40
	2.Move the below properties
		a.card-detect-delay
		b.samsung,dw-mshc-ciu-div
		c.samsung,dw-mshc-sdr-timing
		d.samsung,dw-mshc-ddr-timing
	from SOC dts to board dts file as suggested by Doug Anderson

changes since V2:
	1.dropped num-slots property from node as its not required
	  if number of card slots available is 1.

	2.Move the below properties
		a.fifo-depth
		b.card-detect-delay
		c.samsung,dw-mshc-ciu-div
		d.samsung,dw-mshc-sdr-timing
		e.samsung,dw-mshc-ddr-timing
	from board dts to SOC dts,as these are not board specific properties.

	3.Updated the binding document exynos-dw-mshc.txt.

changes since V1:
	1.disable node by status = disabled in SOC file
	2.enable node by status = okay in board specific file

Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com>
---
 .../devicetree/bindings/mmc/exynos-dw-mshc.txt     |    2 +
 arch/arm/boot/dts/exynos5420-smdk5420.dts          |   33 +++++++++++++++++
 arch/arm/boot/dts/exynos5420.dtsi                  |   39 ++++++++++++++++++++
 3 files changed, 74 insertions(+)

Comments

Tomasz Figa Aug. 28, 2013, 12:22 p.m. UTC | #1
Hi Yuvaraj,

On Wednesday 28 of August 2013 17:33:06 Yuvaraj Kumar C D wrote:
> This patch adds the device tree node entries for exynos5420 SOC.
> Exynos5420 has a different version of DWMMC controller,so a new
> compatible string is used to distinguish it from the prior SOC's.
> 
> This patch depends on
> 	mmc: dw_mmc: exynos: Add a new compatible string for exynos5420
> 
> changes since v4:
> 	1.Droppped the bypass-smu binding property.
> 	2.Used compatible string "samsung,exynos5250-dw-mshc"
> 	  for controller instance which does not have SMU.
> 
> changes since V3:
> 	1.change fifo-depth size from 0x80 to 0x40
> 	2.Move the below properties
> 		a.card-detect-delay
> 		b.samsung,dw-mshc-ciu-div
> 		c.samsung,dw-mshc-sdr-timing
> 		d.samsung,dw-mshc-ddr-timing
> 	from SOC dts to board dts file as suggested by Doug Anderson
> 
> changes since V2:
> 	1.dropped num-slots property from node as its not required
> 	  if number of card slots available is 1.
> 
> 	2.Move the below properties
> 		a.fifo-depth
> 		b.card-detect-delay
> 		c.samsung,dw-mshc-ciu-div
> 		d.samsung,dw-mshc-sdr-timing
> 		e.samsung,dw-mshc-ddr-timing
> 	from board dts to SOC dts,as these are not board specific properties.
> 
> 	3.Updated the binding document exynos-dw-mshc.txt.
> 
> changes since V1:
> 	1.disable node by status = disabled in SOC file
> 	2.enable node by status = okay in board specific file
> 
> Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com>
> ---
>  .../devicetree/bindings/mmc/exynos-dw-mshc.txt     |    2 +
>  arch/arm/boot/dts/exynos5420-smdk5420.dts          |   33
> +++++++++++++++++ arch/arm/boot/dts/exynos5420.dtsi                  |  
> 39 ++++++++++++++++++++ 3 files changed, 74 insertions(+)

This patch looks good to me now, except some minor comments below.

> diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
> b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt index
> 6d1c098..84cd56f 100644
> --- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
> +++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
> @@ -16,6 +16,8 @@ Required Properties:
>  	  specific extensions.
>  	- "samsung,exynos5250-dw-mshc": for controllers with Samsung Exynos5250
> specific extensions.
> +	- "samsung,exynos5420-dw-mshc": for controllers with Samsung Exynos5420
> +	  specific extensions.
> 
>  * samsung,dw-mshc-ciu-div: Specifies the divider value for the card
> interface unit (ciu) clock. This property is applicable only for Exynos5
> SoC's and diff --git a/arch/arm/boot/dts/exynos5420-smdk5420.dts
> b/arch/arm/boot/dts/exynos5420-smdk5420.dts index bafba25..3ce5c97
> 100644
> --- a/arch/arm/boot/dts/exynos5420-smdk5420.dts
> +++ b/arch/arm/boot/dts/exynos5420-smdk5420.dts
> @@ -31,6 +31,39 @@
>  		};
>  	};
> 
> +	dwmmc0@12200000 {

Node name should not contain instance index. Instead, according to ePAPR 
recommendation, I would opt for a generic name such as mmc, mshc or sdio-
host. mshc is already used on Exynos 4 so it might be a good idea to use it 
for consistency.

[Adding DT maintainers on CC]

Best regards,
Tomasz

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yuvaraj CD Aug. 30, 2013, 6:59 a.m. UTC | #2
On Wed, Aug 28, 2013 at 5:52 PM, Tomasz Figa <t.figa@samsung.com> wrote:
> Hi Yuvaraj,
>
> On Wednesday 28 of August 2013 17:33:06 Yuvaraj Kumar C D wrote:
>> This patch adds the device tree node entries for exynos5420 SOC.
>> Exynos5420 has a different version of DWMMC controller,so a new
>> compatible string is used to distinguish it from the prior SOC's.
>>
>> This patch depends on
>>       mmc: dw_mmc: exynos: Add a new compatible string for exynos5420
>>
>> changes since v4:
>>       1.Droppped the bypass-smu binding property.
>>       2.Used compatible string "samsung,exynos5250-dw-mshc"
>>         for controller instance which does not have SMU.
>>
>> changes since V3:
>>       1.change fifo-depth size from 0x80 to 0x40
>>       2.Move the below properties
>>               a.card-detect-delay
>>               b.samsung,dw-mshc-ciu-div
>>               c.samsung,dw-mshc-sdr-timing
>>               d.samsung,dw-mshc-ddr-timing
>>       from SOC dts to board dts file as suggested by Doug Anderson
>>
>> changes since V2:
>>       1.dropped num-slots property from node as its not required
>>         if number of card slots available is 1.
>>
>>       2.Move the below properties
>>               a.fifo-depth
>>               b.card-detect-delay
>>               c.samsung,dw-mshc-ciu-div
>>               d.samsung,dw-mshc-sdr-timing
>>               e.samsung,dw-mshc-ddr-timing
>>       from board dts to SOC dts,as these are not board specific properties.
>>
>>       3.Updated the binding document exynos-dw-mshc.txt.
>>
>> changes since V1:
>>       1.disable node by status = disabled in SOC file
>>       2.enable node by status = okay in board specific file
>>
>> Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com>
>> ---
>>  .../devicetree/bindings/mmc/exynos-dw-mshc.txt     |    2 +
>>  arch/arm/boot/dts/exynos5420-smdk5420.dts          |   33
>> +++++++++++++++++ arch/arm/boot/dts/exynos5420.dtsi                  |
>> 39 ++++++++++++++++++++ 3 files changed, 74 insertions(+)
>
> This patch looks good to me now, except some minor comments below.
>
>> diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
>> b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt index
>> 6d1c098..84cd56f 100644
>> --- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
>> +++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
>> @@ -16,6 +16,8 @@ Required Properties:
>>         specific extensions.
>>       - "samsung,exynos5250-dw-mshc": for controllers with Samsung Exynos5250
>> specific extensions.
>> +     - "samsung,exynos5420-dw-mshc": for controllers with Samsung Exynos5420
>> +       specific extensions.
>>
>>  * samsung,dw-mshc-ciu-div: Specifies the divider value for the card
>> interface unit (ciu) clock. This property is applicable only for Exynos5
>> SoC's and diff --git a/arch/arm/boot/dts/exynos5420-smdk5420.dts
>> b/arch/arm/boot/dts/exynos5420-smdk5420.dts index bafba25..3ce5c97
>> 100644
>> --- a/arch/arm/boot/dts/exynos5420-smdk5420.dts
>> +++ b/arch/arm/boot/dts/exynos5420-smdk5420.dts
>> @@ -31,6 +31,39 @@
>>               };
>>       };
>>
>> +     dwmmc0@12200000 {
>
> Node name should not contain instance index. Instead, according to ePAPR
> recommendation, I would opt for a generic name such as mmc, mshc or sdio-
> host. mshc is already used on Exynos 4 so it might be a good idea to use it
> for consistency.
If we change node name's to mshc, debug statements are look like below:
dwmmc_exynos 12200000.mshc: num-slots property not found, assuming 1
slot is available
dwmmc_exynos 12200000.mshc: no vmmc regulator found: -19
dwmmc_exynos 12200000.mshc: Using internal DMA controller.
dwmmc_exynos 12200000.mshc: Version ID is 250a
dwmmc_exynos 12200000.mshc: DW MMC controller at irq 107, 64 bit host
data width, 64 deep fifo

"dwmmc_exynos" is platform driver name and "12200000.mshc" from dt
node.Is'nt it look like bit confusing?

>
> [Adding DT maintainers on CC]
>
> Best regards,
> Tomasz
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yuvaraj CD Sept. 2, 2013, 11:15 a.m. UTC | #3
On Fri, Aug 30, 2013 at 12:29 PM, Yuvaraj Kumar <yuvaraj.cd@gmail.com> wrote:
> On Wed, Aug 28, 2013 at 5:52 PM, Tomasz Figa <t.figa@samsung.com> wrote:
>> Hi Yuvaraj,
>>
>> On Wednesday 28 of August 2013 17:33:06 Yuvaraj Kumar C D wrote:
>>> This patch adds the device tree node entries for exynos5420 SOC.
>>> Exynos5420 has a different version of DWMMC controller,so a new
>>> compatible string is used to distinguish it from the prior SOC's.
>>>
>>> This patch depends on
>>>       mmc: dw_mmc: exynos: Add a new compatible string for exynos5420
>>>
>>> changes since v4:
>>>       1.Droppped the bypass-smu binding property.
>>>       2.Used compatible string "samsung,exynos5250-dw-mshc"
>>>         for controller instance which does not have SMU.
>>>
>>> changes since V3:
>>>       1.change fifo-depth size from 0x80 to 0x40
>>>       2.Move the below properties
>>>               a.card-detect-delay
>>>               b.samsung,dw-mshc-ciu-div
>>>               c.samsung,dw-mshc-sdr-timing
>>>               d.samsung,dw-mshc-ddr-timing
>>>       from SOC dts to board dts file as suggested by Doug Anderson
>>>
>>> changes since V2:
>>>       1.dropped num-slots property from node as its not required
>>>         if number of card slots available is 1.
>>>
>>>       2.Move the below properties
>>>               a.fifo-depth
>>>               b.card-detect-delay
>>>               c.samsung,dw-mshc-ciu-div
>>>               d.samsung,dw-mshc-sdr-timing
>>>               e.samsung,dw-mshc-ddr-timing
>>>       from board dts to SOC dts,as these are not board specific properties.
>>>
>>>       3.Updated the binding document exynos-dw-mshc.txt.
>>>
>>> changes since V1:
>>>       1.disable node by status = disabled in SOC file
>>>       2.enable node by status = okay in board specific file
>>>
>>> Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com>
>>> ---
>>>  .../devicetree/bindings/mmc/exynos-dw-mshc.txt     |    2 +
>>>  arch/arm/boot/dts/exynos5420-smdk5420.dts          |   33
>>> +++++++++++++++++ arch/arm/boot/dts/exynos5420.dtsi                  |
>>> 39 ++++++++++++++++++++ 3 files changed, 74 insertions(+)
>>
>> This patch looks good to me now, except some minor comments below.
>>
>>> diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
>>> b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt index
>>> 6d1c098..84cd56f 100644
>>> --- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
>>> +++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
>>> @@ -16,6 +16,8 @@ Required Properties:
>>>         specific extensions.
>>>       - "samsung,exynos5250-dw-mshc": for controllers with Samsung Exynos5250
>>> specific extensions.
>>> +     - "samsung,exynos5420-dw-mshc": for controllers with Samsung Exynos5420
>>> +       specific extensions.
>>>
>>>  * samsung,dw-mshc-ciu-div: Specifies the divider value for the card
>>> interface unit (ciu) clock. This property is applicable only for Exynos5
>>> SoC's and diff --git a/arch/arm/boot/dts/exynos5420-smdk5420.dts
>>> b/arch/arm/boot/dts/exynos5420-smdk5420.dts index bafba25..3ce5c97
>>> 100644
>>> --- a/arch/arm/boot/dts/exynos5420-smdk5420.dts
>>> +++ b/arch/arm/boot/dts/exynos5420-smdk5420.dts
>>> @@ -31,6 +31,39 @@
>>>               };
>>>       };
>>>
>>> +     dwmmc0@12200000 {
>>
>> Node name should not contain instance index. Instead, according to ePAPR
>> recommendation, I would opt for a generic name such as mmc, mshc or sdio-
>> host. mshc is already used on Exynos 4 so it might be a good idea to use it
>> for consistency.
> If we change node name's to mshc, debug statements are look like below:
> dwmmc_exynos 12200000.mshc: num-slots property not found, assuming 1
> slot is available
> dwmmc_exynos 12200000.mshc: no vmmc regulator found: -19
> dwmmc_exynos 12200000.mshc: Using internal DMA controller.
> dwmmc_exynos 12200000.mshc: Version ID is 250a
> dwmmc_exynos 12200000.mshc: DW MMC controller at irq 107, 64 bit host
> data width, 64 deep fifo
>
> "dwmmc_exynos" is platform driver name and "12200000.mshc" from dt
> node.Is'nt it look like bit confusing?
Any comments on this?
>
>>
>> [Adding DT maintainers on CC]
>>
>> Best regards,
>> Tomasz
>>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tomasz Figa Sept. 2, 2013, 12:21 p.m. UTC | #4
On Monday 02 of September 2013 16:45:41 Yuvaraj Kumar wrote:
> On Fri, Aug 30, 2013 at 12:29 PM, Yuvaraj Kumar <yuvaraj.cd@gmail.com> 
wrote:
> > On Wed, Aug 28, 2013 at 5:52 PM, Tomasz Figa <t.figa@samsung.com> 
wrote:
> >> Hi Yuvaraj,
> >> 
> >> On Wednesday 28 of August 2013 17:33:06 Yuvaraj Kumar C D wrote:
> >>> This patch adds the device tree node entries for exynos5420 SOC.
> >>> Exynos5420 has a different version of DWMMC controller,so a new
> >>> compatible string is used to distinguish it from the prior SOC's.
> >>> 
> >>> This patch depends on
> >>> 
> >>>       mmc: dw_mmc: exynos: Add a new compatible string for exynos5420
> >>> 
> >>> changes since v4:
> >>>       1.Droppped the bypass-smu binding property.
> >>>       2.Used compatible string "samsung,exynos5250-dw-mshc"
> >>>       
> >>>         for controller instance which does not have SMU.
> >>> 
> >>> changes since V3:
> >>>       1.change fifo-depth size from 0x80 to 0x40
> >>>       2.Move the below properties
> >>>       
> >>>               a.card-detect-delay
> >>>               b.samsung,dw-mshc-ciu-div
> >>>               c.samsung,dw-mshc-sdr-timing
> >>>               d.samsung,dw-mshc-ddr-timing
> >>>       
> >>>       from SOC dts to board dts file as suggested by Doug Anderson
> >>> 
> >>> changes since V2:
> >>>       1.dropped num-slots property from node as its not required
> >>>       
> >>>         if number of card slots available is 1.
> >>>       
> >>>       2.Move the below properties
> >>>       
> >>>               a.fifo-depth
> >>>               b.card-detect-delay
> >>>               c.samsung,dw-mshc-ciu-div
> >>>               d.samsung,dw-mshc-sdr-timing
> >>>               e.samsung,dw-mshc-ddr-timing
> >>>       
> >>>       from board dts to SOC dts,as these are not board specific
> >>>       properties.
> >>>       
> >>>       3.Updated the binding document exynos-dw-mshc.txt.
> >>> 
> >>> changes since V1:
> >>>       1.disable node by status = disabled in SOC file
> >>>       2.enable node by status = okay in board specific file
> >>> 
> >>> Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com>
> >>> ---
> >>> 
> >>>  .../devicetree/bindings/mmc/exynos-dw-mshc.txt     |    2 +
> >>>  arch/arm/boot/dts/exynos5420-smdk5420.dts          |   33
> >>> 
> >>> +++++++++++++++++ arch/arm/boot/dts/exynos5420.dtsi                 
> >>> |
> >>> 39 ++++++++++++++++++++ 3 files changed, 74 insertions(+)
> >> 
> >> This patch looks good to me now, except some minor comments below.
> >> 
> >>> diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
> >>> b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt index
> >>> 6d1c098..84cd56f 100644
> >>> --- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
> >>> +++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
> >>> 
> >>> @@ -16,6 +16,8 @@ Required Properties:
> >>>         specific extensions.
> >>>       
> >>>       - "samsung,exynos5250-dw-mshc": for controllers with Samsung
> >>>       Exynos5250
> >>> 
> >>> specific extensions.
> >>> +     - "samsung,exynos5420-dw-mshc": for controllers with Samsung
> >>> Exynos5420 +       specific extensions.
> >>> 
> >>>  * samsung,dw-mshc-ciu-div: Specifies the divider value for the card
> >>> 
> >>> interface unit (ciu) clock. This property is applicable only for
> >>> Exynos5
> >>> SoC's and diff --git a/arch/arm/boot/dts/exynos5420-smdk5420.dts
> >>> b/arch/arm/boot/dts/exynos5420-smdk5420.dts index bafba25..3ce5c97
> >>> 100644
> >>> --- a/arch/arm/boot/dts/exynos5420-smdk5420.dts
> >>> +++ b/arch/arm/boot/dts/exynos5420-smdk5420.dts
> >>> @@ -31,6 +31,39 @@
> >>> 
> >>>               };
> >>>       
> >>>       };
> >>> 
> >>> +     dwmmc0@12200000 {
> >> 
> >> Node name should not contain instance index. Instead, according to
> >> ePAPR
> >> recommendation, I would opt for a generic name such as mmc, mshc or
> >> sdio- host. mshc is already used on Exynos 4 so it might be a good
> >> idea to use it for consistency.
> > 
> > If we change node name's to mshc, debug statements are look like below:
> > dwmmc_exynos 12200000.mshc: num-slots property not found, assuming 1
> > slot is available
> > dwmmc_exynos 12200000.mshc: no vmmc regulator found: -19
> > dwmmc_exynos 12200000.mshc: Using internal DMA controller.
> > dwmmc_exynos 12200000.mshc: Version ID is 250a
> > dwmmc_exynos 12200000.mshc: DW MMC controller at irq 107, 64 bit host
> > data width, 64 deep fifo
> > 
> > "dwmmc_exynos" is platform driver name and "12200000.mshc" from dt
> > node.Is'nt it look like bit confusing?

Well, device tree should be written in an OS-agnostic way, so it's not a 
valid reason to use node names not complying to the recommendations.

Also, I don't see anything wrong in this name. There is a lot of devices 
named this way, like 13920000.spi, 139d0000.pwm or 13800000.serial.

Looking at other dts(i) files around the kernel, mmc is the most commonly 
used node name for MMC controllers (after sdhci, but it's used for the 
whole class of controllers compatible with standard SDHCI).

So, for me, just go with "mmc" and it should be fine.

Best regards,
Tomasz

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yuvaraj CD Sept. 4, 2013, 5:53 a.m. UTC | #5
On Mon, Sep 2, 2013 at 5:51 PM, Tomasz Figa <t.figa@samsung.com> wrote:
> On Monday 02 of September 2013 16:45:41 Yuvaraj Kumar wrote:
>> On Fri, Aug 30, 2013 at 12:29 PM, Yuvaraj Kumar <yuvaraj.cd@gmail.com>
> wrote:
>> > On Wed, Aug 28, 2013 at 5:52 PM, Tomasz Figa <t.figa@samsung.com>
> wrote:
>> >> Hi Yuvaraj,
>> >>
>> >> On Wednesday 28 of August 2013 17:33:06 Yuvaraj Kumar C D wrote:
>> >>> This patch adds the device tree node entries for exynos5420 SOC.
>> >>> Exynos5420 has a different version of DWMMC controller,so a new
>> >>> compatible string is used to distinguish it from the prior SOC's.
>> >>>
>> >>> This patch depends on
>> >>>
>> >>>       mmc: dw_mmc: exynos: Add a new compatible string for exynos5420
>> >>>
>> >>> changes since v4:
>> >>>       1.Droppped the bypass-smu binding property.
>> >>>       2.Used compatible string "samsung,exynos5250-dw-mshc"
>> >>>
>> >>>         for controller instance which does not have SMU.
>> >>>
>> >>> changes since V3:
>> >>>       1.change fifo-depth size from 0x80 to 0x40
>> >>>       2.Move the below properties
>> >>>
>> >>>               a.card-detect-delay
>> >>>               b.samsung,dw-mshc-ciu-div
>> >>>               c.samsung,dw-mshc-sdr-timing
>> >>>               d.samsung,dw-mshc-ddr-timing
>> >>>
>> >>>       from SOC dts to board dts file as suggested by Doug Anderson
>> >>>
>> >>> changes since V2:
>> >>>       1.dropped num-slots property from node as its not required
>> >>>
>> >>>         if number of card slots available is 1.
>> >>>
>> >>>       2.Move the below properties
>> >>>
>> >>>               a.fifo-depth
>> >>>               b.card-detect-delay
>> >>>               c.samsung,dw-mshc-ciu-div
>> >>>               d.samsung,dw-mshc-sdr-timing
>> >>>               e.samsung,dw-mshc-ddr-timing
>> >>>
>> >>>       from board dts to SOC dts,as these are not board specific
>> >>>       properties.
>> >>>
>> >>>       3.Updated the binding document exynos-dw-mshc.txt.
>> >>>
>> >>> changes since V1:
>> >>>       1.disable node by status = disabled in SOC file
>> >>>       2.enable node by status = okay in board specific file
>> >>>
>> >>> Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com>
>> >>> ---
>> >>>
>> >>>  .../devicetree/bindings/mmc/exynos-dw-mshc.txt     |    2 +
>> >>>  arch/arm/boot/dts/exynos5420-smdk5420.dts          |   33
>> >>>
>> >>> +++++++++++++++++ arch/arm/boot/dts/exynos5420.dtsi
>> >>> |
>> >>> 39 ++++++++++++++++++++ 3 files changed, 74 insertions(+)
>> >>
>> >> This patch looks good to me now, except some minor comments below.
>> >>
>> >>> diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
>> >>> b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt index
>> >>> 6d1c098..84cd56f 100644
>> >>> --- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
>> >>> +++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
>> >>>
>> >>> @@ -16,6 +16,8 @@ Required Properties:
>> >>>         specific extensions.
>> >>>
>> >>>       - "samsung,exynos5250-dw-mshc": for controllers with Samsung
>> >>>       Exynos5250
>> >>>
>> >>> specific extensions.
>> >>> +     - "samsung,exynos5420-dw-mshc": for controllers with Samsung
>> >>> Exynos5420 +       specific extensions.
>> >>>
>> >>>  * samsung,dw-mshc-ciu-div: Specifies the divider value for the card
>> >>>
>> >>> interface unit (ciu) clock. This property is applicable only for
>> >>> Exynos5
>> >>> SoC's and diff --git a/arch/arm/boot/dts/exynos5420-smdk5420.dts
>> >>> b/arch/arm/boot/dts/exynos5420-smdk5420.dts index bafba25..3ce5c97
>> >>> 100644
>> >>> --- a/arch/arm/boot/dts/exynos5420-smdk5420.dts
>> >>> +++ b/arch/arm/boot/dts/exynos5420-smdk5420.dts
>> >>> @@ -31,6 +31,39 @@
>> >>>
>> >>>               };
>> >>>
>> >>>       };
>> >>>
>> >>> +     dwmmc0@12200000 {
>> >>
>> >> Node name should not contain instance index. Instead, according to
>> >> ePAPR
>> >> recommendation, I would opt for a generic name such as mmc, mshc or
>> >> sdio- host. mshc is already used on Exynos 4 so it might be a good
>> >> idea to use it for consistency.
>> >
>> > If we change node name's to mshc, debug statements are look like below:
>> > dwmmc_exynos 12200000.mshc: num-slots property not found, assuming 1
>> > slot is available
>> > dwmmc_exynos 12200000.mshc: no vmmc regulator found: -19
>> > dwmmc_exynos 12200000.mshc: Using internal DMA controller.
>> > dwmmc_exynos 12200000.mshc: Version ID is 250a
>> > dwmmc_exynos 12200000.mshc: DW MMC controller at irq 107, 64 bit host
>> > data width, 64 deep fifo
>> >
>> > "dwmmc_exynos" is platform driver name and "12200000.mshc" from dt
>> > node.Is'nt it look like bit confusing?
>
> Well, device tree should be written in an OS-agnostic way, so it's not a
> valid reason to use node names not complying to the recommendations.
>
> Also, I don't see anything wrong in this name. There is a lot of devices
> named this way, like 13920000.spi, 139d0000.pwm or 13800000.serial.
>
> Looking at other dts(i) files around the kernel, mmc is the most commonly
> used node name for MMC controllers (after sdhci, but it's used for the
> whole class of controllers compatible with standard SDHCI).
>
> So, for me, just go with "mmc" and it should be fine.
I have renamed the node from "mshc" to "mmc" in next version and posted
[PATCH V7] ARM: dts: Add dwmmc DT nodes for exynos5420 SOC
>
> Best regards,
> Tomasz
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
index 6d1c098..84cd56f 100644
--- a/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
+++ b/Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
@@ -16,6 +16,8 @@  Required Properties:
 	  specific extensions.
 	- "samsung,exynos5250-dw-mshc": for controllers with Samsung Exynos5250
 	  specific extensions.
+	- "samsung,exynos5420-dw-mshc": for controllers with Samsung Exynos5420
+	  specific extensions.
 
 * samsung,dw-mshc-ciu-div: Specifies the divider value for the card interface
   unit (ciu) clock. This property is applicable only for Exynos5 SoC's and
diff --git a/arch/arm/boot/dts/exynos5420-smdk5420.dts b/arch/arm/boot/dts/exynos5420-smdk5420.dts
index bafba25..3ce5c97 100644
--- a/arch/arm/boot/dts/exynos5420-smdk5420.dts
+++ b/arch/arm/boot/dts/exynos5420-smdk5420.dts
@@ -31,6 +31,39 @@ 
 		};
 	};
 
+	dwmmc0@12200000 {
+		status = "okay";
+		broken-cd;
+		supports-highspeed;
+		card-detect-delay = <200>;
+		samsung,dw-mshc-ciu-div = <3>;
+		samsung,dw-mshc-sdr-timing = <0 4>;
+		samsung,dw-mshc-ddr-timing = <0 2>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>;
+
+		slot@0 {
+			reg = <0>;
+			bus-width = <8>;
+		};
+	};
+
+	dwmmc2@12220000 {
+		status = "okay";
+		supports-highspeed;
+		card-detect-delay = <200>;
+		samsung,dw-mshc-ciu-div = <3>;
+		samsung,dw-mshc-sdr-timing = <2 3>;
+		samsung,dw-mshc-ddr-timing = <1 2>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>;
+
+		slot@0 {
+			reg = <0>;
+			bus-width = <4>;
+		};
+	};
+
 	dp-controller@145B0000 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&dp_hpd>;
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index d537cd7..ccfa235 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -22,6 +22,9 @@ 
 	compatible = "samsung,exynos5420";
 
 	aliases {
+		mshc0 = &dwmmc_0;
+		mshc1 = &dwmmc_1;
+		mshc2 = &dwmmc_2;
 		pinctrl0 = &pinctrl_0;
 		pinctrl1 = &pinctrl_1;
 		pinctrl2 = &pinctrl_2;
@@ -84,6 +87,42 @@ 
 		clock-names = "mfc";
 	};
 
+	dwmmc_0: dwmmc0@12200000 {
+		compatible = "samsung,exynos5420-dw-mshc";
+		interrupts = <0 75 0>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		reg = <0x12200000 0x2000>;
+		clocks = <&clock 351>, <&clock 132>;
+		clock-names = "biu", "ciu";
+		fifo-depth = <0x40>;
+		status = "disabled";
+	};
+
+	dwmmc_1: dwmmc1@12210000 {
+		compatible = "samsung,exynos5420-dw-mshc";
+		interrupts = <0 76 0>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		reg = <0x12210000 0x2000>;
+		clocks = <&clock 352>, <&clock 133>;
+		clock-names = "biu", "ciu";
+		fifo-depth = <0x40>;
+		status = "disabled";
+	};
+
+	dwmmc_2: dwmmc2@12220000 {
+		compatible = "samsung,exynos5250-dw-mshc";
+		interrupts = <0 77 0>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		reg = <0x12220000 0x2000>;
+		clocks = <&clock 353>, <&clock 134>;
+		clock-names = "biu", "ciu";
+		fifo-depth = <0x40>;
+		status = "disabled";
+	};
+
 	mct@101C0000 {
 		compatible = "samsung,exynos4210-mct";
 		reg = <0x101C0000 0x800>;