diff mbox

[04/10] ARM: dts: Add MSHC2 dt node for Exynos3250 SoC

Message ID 1457921056-21257-5-git-send-email-cw00.choi@samsung.com (mailing list archive)
State Superseded
Headers show

Commit Message

Chanwoo Choi March 14, 2016, 2:04 a.m. UTC
This patch adds the MSHC2 (Mobile Storage Host Controller) Device Tree node for
Exynos3250 SoC.

Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 arch/arm/boot/dts/exynos3250-pinctrl.dtsi | 35 +++++++++++++++++++++++++++++++
 arch/arm/boot/dts/exynos3250.dtsi         | 13 ++++++++++++
 2 files changed, 48 insertions(+)

Comments

Krzysztof Kozlowski March 14, 2016, 6:22 a.m. UTC | #1
On 14.03.2016 11:04, Chanwoo Choi wrote:
> This patch adds the MSHC2 (Mobile Storage Host Controller) Device Tree node for
> Exynos3250 SoC.
> 
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
>  arch/arm/boot/dts/exynos3250-pinctrl.dtsi | 35 +++++++++++++++++++++++++++++++
>  arch/arm/boot/dts/exynos3250.dtsi         | 13 ++++++++++++
>  2 files changed, 48 insertions(+)


After looking at your other patch ("ARM: dts: Add initial pin
configuration for exynos3250-rinato") I have doubts. The Monk will be
affected.

Here you are configuring all the gpk2 GPIOS for EMMC2 mode. Then on
Rinato you are setting it back to default non-used state. However the
Monk board will remain with this new configuration... so you would have
to add initial-state also for Monk.

But how about doing opposite? Configure here the pins to unused state
and enable them only for Artik board?

What do you think?

Best regards,
Krzysztof
--
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
Chanwoo Choi March 14, 2016, 8:28 a.m. UTC | #2
On 2016? 03? 14? 15:22, Krzysztof Kozlowski wrote:
> On 14.03.2016 11:04, Chanwoo Choi wrote:
>> This patch adds the MSHC2 (Mobile Storage Host Controller) Device Tree node for
>> Exynos3250 SoC.
>>
>> Cc: Kukjin Kim <kgene@kernel.org>
>> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
>> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>> ---
>>  arch/arm/boot/dts/exynos3250-pinctrl.dtsi | 35 +++++++++++++++++++++++++++++++
>>  arch/arm/boot/dts/exynos3250.dtsi         | 13 ++++++++++++
>>  2 files changed, 48 insertions(+)
> 
> 
> After looking at your other patch ("ARM: dts: Add initial pin
> configuration for exynos3250-rinato") I have doubts. The Monk will be
> affected.

You're right. On monk board, this line may be not stable.

> 
> Here you are configuring all the gpk2 GPIOS for EMMC2 mode. Then on
> Rinato you are setting it back to default non-used state. However the
> Monk board will remain with this new configuration... so you would have
> to add initial-state also for Monk.

OK. I'll do it.

> 
> But how about doing opposite? Configure here the pins to unused state
> and enable them only for Artik board?
> 
> What do you think?

I think that gpk2-[0~6] pins are fixed for MMC2 device.
So, it is good to add the pin setting for gpk2-[0~6] to exynos3250-pinctrl.dtsi.

If mmc2 device is not used like rinato and monk board,
we should add the initial setting as NC (not connected) pin state
as other patch (ARM: dts: Add initial pin configuration for exynos3250-rinato).

Best Regards,
Chanwoo Choi

--
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
Krzysztof Kozlowski March 14, 2016, 9:52 a.m. UTC | #3
On 14.03.2016 17:28, Chanwoo Choi wrote:
> On 2016? 03? 14? 15:22, Krzysztof Kozlowski wrote:
>> On 14.03.2016 11:04, Chanwoo Choi wrote:
>>> This patch adds the MSHC2 (Mobile Storage Host Controller) Device Tree node for
>>> Exynos3250 SoC.
>>>
>>> Cc: Kukjin Kim <kgene@kernel.org>
>>> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>>> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
>>> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
>>> ---
>>>  arch/arm/boot/dts/exynos3250-pinctrl.dtsi | 35 +++++++++++++++++++++++++++++++
>>>  arch/arm/boot/dts/exynos3250.dtsi         | 13 ++++++++++++
>>>  2 files changed, 48 insertions(+)
>>
>>
>> After looking at your other patch ("ARM: dts: Add initial pin
>> configuration for exynos3250-rinato") I have doubts. The Monk will be
>> affected.
> 
> You're right. On monk board, this line may be not stable.
> 
>>
>> Here you are configuring all the gpk2 GPIOS for EMMC2 mode. Then on
>> Rinato you are setting it back to default non-used state. However the
>> Monk board will remain with this new configuration... so you would have
>> to add initial-state also for Monk.
> 
> OK. I'll do it.
> 
>>
>> But how about doing opposite? Configure here the pins to unused state
>> and enable them only for Artik board?
>>
>> What do you think?
> 
> I think that gpk2-[0~6] pins are fixed for MMC2 device.
> So, it is good to add the pin setting for gpk2-[0~6] to exynos3250-pinctrl.dtsi.
> 
> If mmc2 device is not used like rinato and monk board,
> we should add the initial setting as NC (not connected) pin state
> as other patch (ARM: dts: Add initial pin configuration for exynos3250-rinato).

Okay, fine to me.

BR,
Krzysztof

--
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/arch/arm/boot/dts/exynos3250-pinctrl.dtsi b/arch/arm/boot/dts/exynos3250-pinctrl.dtsi
index 54c587f27265..40ea7de44933 100644
--- a/arch/arm/boot/dts/exynos3250-pinctrl.dtsi
+++ b/arch/arm/boot/dts/exynos3250-pinctrl.dtsi
@@ -490,6 +490,41 @@ 
 		samsung,pin-drv = <3>;
 	};
 
+	sd2_clk: sd2-clk {
+		samsung,pins = "gpk2-0";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd2_cmd: sd2-cmd {
+		samsung,pins = "gpk2-1";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <0>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd2_cd: sd2-cd {
+		samsung,pins = "gpk2-2";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <3>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd2_bus1: sd2-bus-width1 {
+		samsung,pins = "gpk2-3";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <3>;
+		samsung,pin-drv = <3>;
+	};
+
+	sd2_bus4: sd2-bus-width4 {
+		samsung,pins = "gpk2-4", "gpk2-5", "gpk2-6";
+		samsung,pin-function = <2>;
+		samsung,pin-pud = <3>;
+		samsung,pin-drv = <3>;
+	};
+
 	cam_port_b_io: cam-port-b-io {
 		samsung,pins = "gpm0-0", "gpm0-1", "gpm0-2", "gpm0-3",
 				"gpm0-4", "gpm0-5", "gpm0-6", "gpm0-7",
diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
index 076677384d20..2fead5730879 100644
--- a/arch/arm/boot/dts/exynos3250.dtsi
+++ b/arch/arm/boot/dts/exynos3250.dtsi
@@ -30,6 +30,7 @@ 
 		pinctrl1 = &pinctrl_1;
 		mshc0 = &mshc_0;
 		mshc1 = &mshc_1;
+		mshc2 = &mshc_2;
 		spi0 = &spi_0;
 		spi1 = &spi_1;
 		i2c0 = &i2c_0;
@@ -371,6 +372,18 @@ 
 			status = "disabled";
 		};
 
+		mshc_2: mshc@12530000 {
+			compatible = "samsung,exynos5250-dw-mshc";
+			reg = <0x12530000 0x1000>;
+			interrupts = <0 144 0>;
+			clocks = <&cmu CLK_SDMMC2>, <&cmu CLK_SCLK_MMC2>;
+			clock-names = "biu", "ciu";
+			fifo-depth = <0x80>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
 		exynos_usbphy: exynos-usbphy@125B0000 {
 			compatible = "samsung,exynos3250-usb2-phy";
 			reg = <0x125B0000 0x100>;