* [PATCH] i.MX35: Fix pad control bit positions
@ 2010-01-29 11:51 Juergen Beisert
2010-02-11 15:01 ` Juergen Beisert
0 siblings, 1 reply; 3+ messages in thread
From: Juergen Beisert @ 2010-01-29 11:51 UTC (permalink / raw)
To: barebox
Using these macros simplify the configuration for special GPIO usage. But they
should use correct bit positions for usage in the IOMUX_PAD() macro.
Note: These are the bit positions of the i.MX35 CPU. Not checked for the other
i.MX3x CPUs.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
---
arch/arm/mach-imx/include/mach/iomux-v3.h | 34 +++++++++++++++---------------
1 file changed, 17 insertions(+), 17 deletions(-)
Index: u-boot-v2/arch/arm/mach-imx/include/mach/iomux-v3.h
===================================================================
--- u-boot-v2.orig/arch/arm/mach-imx/include/mach/iomux-v3.h
+++ u-boot-v2/arch/arm/mach-imx/include/mach/iomux-v3.h
@@ -68,25 +68,25 @@ struct pad_desc {
/*
* Use to set PAD control
*/
-#define PAD_CTL_DRIVE_VOLTAGE_3_3_V 0
-#define PAD_CTL_DRIVE_VOLTAGE_1_8_V 1
+#define PAD_CTL_DRIVE_VOLTAGE_3_3_V (0)
+#define PAD_CTL_DRIVE_VOLTAGE_1_8_V (1 << 13)
-#define PAD_CTL_NO_HYSTERESIS 0
-#define PAD_CTL_HYSTERESIS 1
+#define PAD_CTL_NO_HYSTERESIS (0)
+#define PAD_CTL_HYSTERESIS (1 << 8)
-#define PAD_CTL_PULL_DISABLED 0x0
-#define PAD_CTL_PULL_KEEPER 0xa
-#define PAD_CTL_PULL_DOWN_100K 0xc
-#define PAD_CTL_PULL_UP_47K 0xd
-#define PAD_CTL_PULL_UP_100K 0xe
-#define PAD_CTL_PULL_UP_22K 0xf
-
-#define PAD_CTL_OUTPUT_CMOS 0
-#define PAD_CTL_OUTPUT_OPEN_DRAIN 1
-
-#define PAD_CTL_DRIVE_STRENGTH_NORM 0
-#define PAD_CTL_DRIVE_STRENGTH_HIGH 1
-#define PAD_CTL_DRIVE_STRENGTH_MAX 2
+#define PAD_CTL_PULL_DISABLED (0)
+#define PAD_CTL_PULL_KEEPER (0xa << 4)
+#define PAD_CTL_PULL_DOWN_100K (0xc << 4)
+#define PAD_CTL_PULL_UP_47K (0xd << 4)
+#define PAD_CTL_PULL_UP_100K (0xe << 4)
+#define PAD_CTL_PULL_UP_22K (0xf << 4)
+
+#define PAD_CTL_OUTPUT_CMOS (0)
+#define PAD_CTL_OUTPUT_OPEN_DRAIN (1 << 3)
+
+#define PAD_CTL_DRIVE_STRENGTH_NORM (0)
+#define PAD_CTL_DRIVE_STRENGTH_HIGH (1 << 1)
+#define PAD_CTL_DRIVE_STRENGTH_MAX (2 << 1)
#define PAD_CTL_SLEW_RATE_SLOW 0
#define PAD_CTL_SLEW_RATE_FAST 1
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | Phone: +49-8766-939 228 |
Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i.MX35: Fix pad control bit positions
2010-01-29 11:51 [PATCH] i.MX35: Fix pad control bit positions Juergen Beisert
@ 2010-02-11 15:01 ` Juergen Beisert
2010-02-12 8:28 ` Sascha Hauer
0 siblings, 1 reply; 3+ messages in thread
From: Juergen Beisert @ 2010-02-11 15:01 UTC (permalink / raw)
To: barebox
Hi Sascha,
as discussed at FOSDEM: *ping* ;-)
Juergen Beisert wrote:
> Using these macros simplify the configuration for special GPIO usage. But
> they should use correct bit positions for usage in the IOMUX_PAD() macro.
>
> Note: These are the bit positions of the i.MX35 CPU. Not checked for the
> other i.MX3x CPUs.
>
> Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
>
> ---
> arch/arm/mach-imx/include/mach/iomux-v3.h | 34
> +++++++++++++++--------------- 1 file changed, 17 insertions(+), 17
> deletions(-)
>
> Index: u-boot-v2/arch/arm/mach-imx/include/mach/iomux-v3.h
> ===================================================================
> --- u-boot-v2.orig/arch/arm/mach-imx/include/mach/iomux-v3.h
> +++ u-boot-v2/arch/arm/mach-imx/include/mach/iomux-v3.h
> @@ -68,25 +68,25 @@ struct pad_desc {
> /*
> * Use to set PAD control
> */
> -#define PAD_CTL_DRIVE_VOLTAGE_3_3_V 0
> -#define PAD_CTL_DRIVE_VOLTAGE_1_8_V 1
> +#define PAD_CTL_DRIVE_VOLTAGE_3_3_V (0)
> +#define PAD_CTL_DRIVE_VOLTAGE_1_8_V (1 << 13)
>
> -#define PAD_CTL_NO_HYSTERESIS 0
> -#define PAD_CTL_HYSTERESIS 1
> +#define PAD_CTL_NO_HYSTERESIS (0)
> +#define PAD_CTL_HYSTERESIS (1 << 8)
>
> -#define PAD_CTL_PULL_DISABLED 0x0
> -#define PAD_CTL_PULL_KEEPER 0xa
> -#define PAD_CTL_PULL_DOWN_100K 0xc
> -#define PAD_CTL_PULL_UP_47K 0xd
> -#define PAD_CTL_PULL_UP_100K 0xe
> -#define PAD_CTL_PULL_UP_22K 0xf
> -
> -#define PAD_CTL_OUTPUT_CMOS 0
> -#define PAD_CTL_OUTPUT_OPEN_DRAIN 1
> -
> -#define PAD_CTL_DRIVE_STRENGTH_NORM 0
> -#define PAD_CTL_DRIVE_STRENGTH_HIGH 1
> -#define PAD_CTL_DRIVE_STRENGTH_MAX 2
> +#define PAD_CTL_PULL_DISABLED (0)
> +#define PAD_CTL_PULL_KEEPER (0xa << 4)
> +#define PAD_CTL_PULL_DOWN_100K (0xc << 4)
> +#define PAD_CTL_PULL_UP_47K (0xd << 4)
> +#define PAD_CTL_PULL_UP_100K (0xe << 4)
> +#define PAD_CTL_PULL_UP_22K (0xf << 4)
> +
> +#define PAD_CTL_OUTPUT_CMOS (0)
> +#define PAD_CTL_OUTPUT_OPEN_DRAIN (1 << 3)
> +
> +#define PAD_CTL_DRIVE_STRENGTH_NORM (0)
> +#define PAD_CTL_DRIVE_STRENGTH_HIGH (1 << 1)
> +#define PAD_CTL_DRIVE_STRENGTH_MAX (2 << 1)
>
> #define PAD_CTL_SLEW_RATE_SLOW 0
> #define PAD_CTL_SLEW_RATE_FAST 1
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | Phone: +49-8766-939 228 |
Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i.MX35: Fix pad control bit positions
2010-02-11 15:01 ` Juergen Beisert
@ 2010-02-12 8:28 ` Sascha Hauer
0 siblings, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2010-02-12 8:28 UTC (permalink / raw)
To: Juergen Beisert; +Cc: barebox
Hi Juergen,
On Thu, Feb 11, 2010 at 04:01:47PM +0100, Juergen Beisert wrote:
> Hi Sascha,
>
> as discussed at FOSDEM: *ping* ;-)
This is already applied.
Sascha
>
> Juergen Beisert wrote:
> > Using these macros simplify the configuration for special GPIO usage. But
> > they should use correct bit positions for usage in the IOMUX_PAD() macro.
> >
> > Note: These are the bit positions of the i.MX35 CPU. Not checked for the
> > other i.MX3x CPUs.
> >
> > Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
> >
> > ---
> > arch/arm/mach-imx/include/mach/iomux-v3.h | 34
> > +++++++++++++++--------------- 1 file changed, 17 insertions(+), 17
> > deletions(-)
> >
> > Index: u-boot-v2/arch/arm/mach-imx/include/mach/iomux-v3.h
> > ===================================================================
> > --- u-boot-v2.orig/arch/arm/mach-imx/include/mach/iomux-v3.h
> > +++ u-boot-v2/arch/arm/mach-imx/include/mach/iomux-v3.h
> > @@ -68,25 +68,25 @@ struct pad_desc {
> > /*
> > * Use to set PAD control
> > */
> > -#define PAD_CTL_DRIVE_VOLTAGE_3_3_V 0
> > -#define PAD_CTL_DRIVE_VOLTAGE_1_8_V 1
> > +#define PAD_CTL_DRIVE_VOLTAGE_3_3_V (0)
> > +#define PAD_CTL_DRIVE_VOLTAGE_1_8_V (1 << 13)
> >
> > -#define PAD_CTL_NO_HYSTERESIS 0
> > -#define PAD_CTL_HYSTERESIS 1
> > +#define PAD_CTL_NO_HYSTERESIS (0)
> > +#define PAD_CTL_HYSTERESIS (1 << 8)
> >
> > -#define PAD_CTL_PULL_DISABLED 0x0
> > -#define PAD_CTL_PULL_KEEPER 0xa
> > -#define PAD_CTL_PULL_DOWN_100K 0xc
> > -#define PAD_CTL_PULL_UP_47K 0xd
> > -#define PAD_CTL_PULL_UP_100K 0xe
> > -#define PAD_CTL_PULL_UP_22K 0xf
> > -
> > -#define PAD_CTL_OUTPUT_CMOS 0
> > -#define PAD_CTL_OUTPUT_OPEN_DRAIN 1
> > -
> > -#define PAD_CTL_DRIVE_STRENGTH_NORM 0
> > -#define PAD_CTL_DRIVE_STRENGTH_HIGH 1
> > -#define PAD_CTL_DRIVE_STRENGTH_MAX 2
> > +#define PAD_CTL_PULL_DISABLED (0)
> > +#define PAD_CTL_PULL_KEEPER (0xa << 4)
> > +#define PAD_CTL_PULL_DOWN_100K (0xc << 4)
> > +#define PAD_CTL_PULL_UP_47K (0xd << 4)
> > +#define PAD_CTL_PULL_UP_100K (0xe << 4)
> > +#define PAD_CTL_PULL_UP_22K (0xf << 4)
> > +
> > +#define PAD_CTL_OUTPUT_CMOS (0)
> > +#define PAD_CTL_OUTPUT_OPEN_DRAIN (1 << 3)
> > +
> > +#define PAD_CTL_DRIVE_STRENGTH_NORM (0)
> > +#define PAD_CTL_DRIVE_STRENGTH_HIGH (1 << 1)
> > +#define PAD_CTL_DRIVE_STRENGTH_MAX (2 << 1)
> >
> > #define PAD_CTL_SLEW_RATE_SLOW 0
> > #define PAD_CTL_SLEW_RATE_FAST 1
>
> --
> Pengutronix e.K. | Juergen Beisert |
> Linux Solutions for Science and Industry | Phone: +49-8766-939 228 |
> Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 |
> Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-02-12 8:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-29 11:51 [PATCH] i.MX35: Fix pad control bit positions Juergen Beisert
2010-02-11 15:01 ` Juergen Beisert
2010-02-12 8:28 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox