linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: dts: igep00x0: Add SD card-detect.
@ 2016-05-06 21:02 Enric Balletbo i Serra
  2016-05-06 21:02 ` [PATCH 2/2] ARM: dts: igep0020: Add SD card write-protect pin Enric Balletbo i Serra
  2016-05-06 21:07 ` [PATCH 1/2] ARM: dts: igep00x0: Add SD card-detect Javier Martinez Canillas
  0 siblings, 2 replies; 9+ messages in thread
From: Enric Balletbo i Serra @ 2016-05-06 21:02 UTC (permalink / raw)
  To: linux-kernel, devicetree, linux-arm-kernel, linux-omap
  Cc: Javier Martinez Canillas, Tony Lindgren, Ladislav Michl

Fix SD card remove/insert detection by adding the correct card-detect
pin. All IGEP OMAP3 based boards use the same card-detect pin.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 arch/arm/boot/dts/omap3-igep.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/omap3-igep.dtsi b/arch/arm/boot/dts/omap3-igep.dtsi
index 41f5d38..f4f2ce4 100644
--- a/arch/arm/boot/dts/omap3-igep.dtsi
+++ b/arch/arm/boot/dts/omap3-igep.dtsi
@@ -188,6 +188,7 @@
 	vmmc-supply = <&vmmc1>;
 	vmmc_aux-supply = <&vsim>;
 	bus-width = <4>;
+	cd-gpios = <&twl_gpio 0 GPIO_ACTIVE_LOW>;
 };
 
 &mmc3 {
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] ARM: dts: igep0020: Add SD card write-protect pin.
  2016-05-06 21:02 [PATCH 1/2] ARM: dts: igep00x0: Add SD card-detect Enric Balletbo i Serra
@ 2016-05-06 21:02 ` Enric Balletbo i Serra
  2016-05-06 21:07   ` Javier Martinez Canillas
  2016-05-13 12:37   ` Ladislav Michl
  2016-05-06 21:07 ` [PATCH 1/2] ARM: dts: igep00x0: Add SD card-detect Javier Martinez Canillas
  1 sibling, 2 replies; 9+ messages in thread
From: Enric Balletbo i Serra @ 2016-05-06 21:02 UTC (permalink / raw)
  To: linux-kernel, devicetree, linux-arm-kernel, linux-omap
  Cc: Javier Martinez Canillas, Tony Lindgren

A host device that supports write protection should refuse to write to
an SD card that is designated read-only when write-protect is set. This
is an optional feature of the SD specification.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
 arch/arm/boot/dts/omap3-igep0020-common.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-igep0020-common.dtsi b/arch/arm/boot/dts/omap3-igep0020-common.dtsi
index d6f839c..b697106 100644
--- a/arch/arm/boot/dts/omap3-igep0020-common.dtsi
+++ b/arch/arm/boot/dts/omap3-igep0020-common.dtsi
@@ -194,6 +194,12 @@
 			OMAP3630_CORE2_IOPAD(0x25f8, PIN_OUTPUT | MUX_MODE4) /* etk_d14.gpio_28 */
 		>;
 	};
+
+	mmc1_wp_pins: pinmux_mmc1_cd_pins {
+		pinctrl-single,pins = <
+			OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT | MUX_MODE4)   /* etk_d15.gpio_29 */
+		>;
+	};
 };
 
 &i2c3 {
@@ -250,3 +256,8 @@
 		};
 	};
 };
+
+&mmc1 {
+	pinctrl-0 = <&mmc1_pins &mmc1_wp_pins>;
+	wp-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;	/* gpio_29 */
+};
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] ARM: dts: igep00x0: Add SD card-detect.
  2016-05-06 21:02 [PATCH 1/2] ARM: dts: igep00x0: Add SD card-detect Enric Balletbo i Serra
  2016-05-06 21:02 ` [PATCH 2/2] ARM: dts: igep0020: Add SD card write-protect pin Enric Balletbo i Serra
@ 2016-05-06 21:07 ` Javier Martinez Canillas
  2016-05-06 21:22   ` Enric Balletbo i Serra
  1 sibling, 1 reply; 9+ messages in thread
From: Javier Martinez Canillas @ 2016-05-06 21:07 UTC (permalink / raw)
  To: Enric Balletbo i Serra
  Cc: Linux Kernel, devicetree, linux-arm-kernel, linux-omap,
	Tony Lindgren, Ladislav Michl

Hello Enric,

On Fri, May 6, 2016 at 5:02 PM, Enric Balletbo i Serra
<enric.balletbo@collabora.com> wrote:
> Fix SD card remove/insert detection by adding the correct card-detect
> pin. All IGEP OMAP3 based boards use the same card-detect pin.
>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>

Shouldn't his be Suggested-by: Ladislav Michl <ladis@linux-mips.org> instead?

Or if the patch was originally from Ladis, then he should remain the
author with your S-o-B after his.

Patch looks good to me though.

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
Javier

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] ARM: dts: igep0020: Add SD card write-protect pin.
  2016-05-06 21:02 ` [PATCH 2/2] ARM: dts: igep0020: Add SD card write-protect pin Enric Balletbo i Serra
@ 2016-05-06 21:07   ` Javier Martinez Canillas
  2016-05-13 12:37   ` Ladislav Michl
  1 sibling, 0 replies; 9+ messages in thread
From: Javier Martinez Canillas @ 2016-05-06 21:07 UTC (permalink / raw)
  To: Enric Balletbo i Serra
  Cc: Linux Kernel, devicetree, linux-arm-kernel, linux-omap, Tony Lindgren

Hello Enric,

On Fri, May 6, 2016 at 5:02 PM, Enric Balletbo i Serra
<enric.balletbo@collabora.com> wrote:
> A host device that supports write protection should refuse to write to
> an SD card that is designated read-only when write-protect is set. This
> is an optional feature of the SD specification.
>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> ---

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
Javier

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] ARM: dts: igep00x0: Add SD card-detect.
  2016-05-06 21:07 ` [PATCH 1/2] ARM: dts: igep00x0: Add SD card-detect Javier Martinez Canillas
@ 2016-05-06 21:22   ` Enric Balletbo i Serra
  2016-05-06 21:27     ` Javier Martinez Canillas
  0 siblings, 1 reply; 9+ messages in thread
From: Enric Balletbo i Serra @ 2016-05-06 21:22 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Linux Kernel, devicetree, linux-arm-kernel, linux-omap,
	Tony Lindgren, Ladislav Michl

Hi Javier,

On 06/05/16 23:07, Javier Martinez Canillas wrote:
> Hello Enric,
> 
> On Fri, May 6, 2016 at 5:02 PM, Enric Balletbo i Serra
> <enric.balletbo@collabora.com> wrote:
>> Fix SD card remove/insert detection by adding the correct card-detect
>> pin. All IGEP OMAP3 based boards use the same card-detect pin.
>>
>> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
>> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> 
> Shouldn't his be Suggested-by: Ladislav Michl <ladis@linux-mips.org> instead?
> 
> Or if the patch was originally from Ladis, then he should remain the
> author with your S-o-B after his.
> 

Well Ladis sent the same patch as I had in my local repository for long
time, so to be strict the correct is have two authors and two S-o-B. My bad
is not send the patch before.

> Patch looks good to me though.
> 
> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
> 
> Best regards,
> Javier
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] ARM: dts: igep00x0: Add SD card-detect.
  2016-05-06 21:22   ` Enric Balletbo i Serra
@ 2016-05-06 21:27     ` Javier Martinez Canillas
  2016-05-12 20:53       ` Tony Lindgren
  0 siblings, 1 reply; 9+ messages in thread
From: Javier Martinez Canillas @ 2016-05-06 21:27 UTC (permalink / raw)
  To: Enric Balletbo i Serra
  Cc: Linux Kernel, devicetree, linux-arm-kernel, linux-omap,
	Tony Lindgren, Ladislav Michl

Hello Enric,

On Fri, May 6, 2016 at 5:22 PM, Enric Balletbo i Serra
<enric.balletbo@collabora.com> wrote:
> Hi Javier,
>
> On 06/05/16 23:07, Javier Martinez Canillas wrote:
>> Hello Enric,
>>
>> On Fri, May 6, 2016 at 5:02 PM, Enric Balletbo i Serra
>> <enric.balletbo@collabora.com> wrote:
>>> Fix SD card remove/insert detection by adding the correct card-detect
>>> pin. All IGEP OMAP3 based boards use the same card-detect pin.
>>>
>>> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
>>> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
>>
>> Shouldn't his be Suggested-by: Ladislav Michl <ladis@linux-mips.org> instead?
>>
>> Or if the patch was originally from Ladis, then he should remain the
>> author with your S-o-B after his.
>>
>
> Well Ladis sent the same patch as I had in my local repository for long
> time, so to be strict the correct is have two authors and two S-o-B. My bad
> is not send the patch before.
>

Got it, then I think is correct to have both S-o-B. Thanks for the
clarification.

Best regards,
Javier

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] ARM: dts: igep00x0: Add SD card-detect.
  2016-05-06 21:27     ` Javier Martinez Canillas
@ 2016-05-12 20:53       ` Tony Lindgren
  0 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2016-05-12 20:53 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Enric Balletbo i Serra, Linux Kernel, devicetree,
	linux-arm-kernel, linux-omap, Ladislav Michl

* Javier Martinez Canillas <javier@dowhile0.org> [160506 14:28]:
> Hello Enric,
> 
> On Fri, May 6, 2016 at 5:22 PM, Enric Balletbo i Serra
> <enric.balletbo@collabora.com> wrote:
> > Hi Javier,
> >
> > On 06/05/16 23:07, Javier Martinez Canillas wrote:
> >> Hello Enric,
> >>
> >> On Fri, May 6, 2016 at 5:02 PM, Enric Balletbo i Serra
> >> <enric.balletbo@collabora.com> wrote:
> >>> Fix SD card remove/insert detection by adding the correct card-detect
> >>> pin. All IGEP OMAP3 based boards use the same card-detect pin.
> >>>
> >>> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> >>> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
> >>
> >> Shouldn't his be Suggested-by: Ladislav Michl <ladis@linux-mips.org> instead?
> >>
> >> Or if the patch was originally from Ladis, then he should remain the
> >> author with your S-o-B after his.
> >>
> >
> > Well Ladis sent the same patch as I had in my local repository for long
> > time, so to be strict the correct is have two authors and two S-o-B. My bad
> > is not send the patch before.
> 
> Got it, then I think is correct to have both S-o-B. Thanks for the
> clarification.

OK thanks for checking, applying both into omap-for-v4.7/dt.

Tony

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] ARM: dts: igep0020: Add SD card write-protect pin.
  2016-05-06 21:02 ` [PATCH 2/2] ARM: dts: igep0020: Add SD card write-protect pin Enric Balletbo i Serra
  2016-05-06 21:07   ` Javier Martinez Canillas
@ 2016-05-13 12:37   ` Ladislav Michl
  2016-05-17  8:06     ` Enric Balletbo Serra
  1 sibling, 1 reply; 9+ messages in thread
From: Ladislav Michl @ 2016-05-13 12:37 UTC (permalink / raw)
  To: Enric Balletbo i Serra
  Cc: linux-kernel, devicetree, linux-arm-kernel, linux-omap,
	Javier Martinez Canillas, Tony Lindgren

Hi Enric!

On Fri, May 06, 2016 at 11:02:34PM +0200, Enric Balletbo i Serra wrote:
> A host device that supports write protection should refuse to write to
> an SD card that is designated read-only when write-protect is set. This
> is an optional feature of the SD specification.

Does it ever work on any IGEPv2? I have similar patch in my repo and there
is no difference when enabling write protection on SD card. Also schemantics
shows GPIO29 constantly pulled up with a resistor. Is there any board
revision with working WP? I'm just curious as patch is of course correct.

Best regards,
	ladis

> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> ---
>  arch/arm/boot/dts/omap3-igep0020-common.dtsi | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/omap3-igep0020-common.dtsi b/arch/arm/boot/dts/omap3-igep0020-common.dtsi
> index d6f839c..b697106 100644
> --- a/arch/arm/boot/dts/omap3-igep0020-common.dtsi
> +++ b/arch/arm/boot/dts/omap3-igep0020-common.dtsi
> @@ -194,6 +194,12 @@
>  			OMAP3630_CORE2_IOPAD(0x25f8, PIN_OUTPUT | MUX_MODE4) /* etk_d14.gpio_28 */
>  		>;
>  	};
> +
> +	mmc1_wp_pins: pinmux_mmc1_cd_pins {
> +		pinctrl-single,pins = <
> +			OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT | MUX_MODE4)   /* etk_d15.gpio_29 */
> +		>;
> +	};
>  };
>  
>  &i2c3 {
> @@ -250,3 +256,8 @@
>  		};
>  	};
>  };
> +
> +&mmc1 {
> +	pinctrl-0 = <&mmc1_pins &mmc1_wp_pins>;
> +	wp-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;	/* gpio_29 */
> +};

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] ARM: dts: igep0020: Add SD card write-protect pin.
  2016-05-13 12:37   ` Ladislav Michl
@ 2016-05-17  8:06     ` Enric Balletbo Serra
  0 siblings, 0 replies; 9+ messages in thread
From: Enric Balletbo Serra @ 2016-05-17  8:06 UTC (permalink / raw)
  To: Ladislav Michl
  Cc: Enric Balletbo i Serra, linux-kernel, devicetree,
	linux-arm-kernel, linux-omap, Javier Martinez Canillas,
	Tony Lindgren

Hi Ladislav,

2016-05-13 14:37 GMT+02:00 Ladislav Michl <ladis@linux-mips.org>:
> Hi Enric!
>
> On Fri, May 06, 2016 at 11:02:34PM +0200, Enric Balletbo i Serra wrote:
>> A host device that supports write protection should refuse to write to
>> an SD card that is designated read-only when write-protect is set. This
>> is an optional feature of the SD specification.
>
> Does it ever work on any IGEPv2? I have similar patch in my repo and there
> is no difference when enabling write protection on SD card. Also schemantics
> shows GPIO29 constantly pulled up with a resistor. Is there any board
> revision with working WP? I'm just curious as patch is of course correct.
>

Note that the microSD formats do not support a write protection
switch, a host device that supports write protection should refuse to
write to an SD card that is designated read-only in this way, which is
an optional feature of the SD specification. As far as I know there is
only a use case for the IGEPv2, the TP close to the SD card can be
used as a write-protection switch, this is not an usual use case and
of course, this needs some wiring, but it's a feature used by someone.

> Best regards,
>         ladis
>
>> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
>> ---
>>  arch/arm/boot/dts/omap3-igep0020-common.dtsi | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/omap3-igep0020-common.dtsi b/arch/arm/boot/dts/omap3-igep0020-common.dtsi
>> index d6f839c..b697106 100644
>> --- a/arch/arm/boot/dts/omap3-igep0020-common.dtsi
>> +++ b/arch/arm/boot/dts/omap3-igep0020-common.dtsi
>> @@ -194,6 +194,12 @@
>>                       OMAP3630_CORE2_IOPAD(0x25f8, PIN_OUTPUT | MUX_MODE4) /* etk_d14.gpio_28 */
>>               >;
>>       };
>> +
>> +     mmc1_wp_pins: pinmux_mmc1_cd_pins {
>> +             pinctrl-single,pins = <
>> +                     OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT | MUX_MODE4)   /* etk_d15.gpio_29 */
>> +             >;
>> +     };
>>  };
>>
>>  &i2c3 {
>> @@ -250,3 +256,8 @@
>>               };
>>       };
>>  };
>> +
>> +&mmc1 {
>> +     pinctrl-0 = <&mmc1_pins &mmc1_wp_pins>;
>> +     wp-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>; /* gpio_29 */
>> +};

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-05-17  8:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-06 21:02 [PATCH 1/2] ARM: dts: igep00x0: Add SD card-detect Enric Balletbo i Serra
2016-05-06 21:02 ` [PATCH 2/2] ARM: dts: igep0020: Add SD card write-protect pin Enric Balletbo i Serra
2016-05-06 21:07   ` Javier Martinez Canillas
2016-05-13 12:37   ` Ladislav Michl
2016-05-17  8:06     ` Enric Balletbo Serra
2016-05-06 21:07 ` [PATCH 1/2] ARM: dts: igep00x0: Add SD card-detect Javier Martinez Canillas
2016-05-06 21:22   ` Enric Balletbo i Serra
2016-05-06 21:27     ` Javier Martinez Canillas
2016-05-12 20:53       ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).