public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] ot1200: add feature pads
@ 2014-10-23 11:46 Christian Gmeiner
  2014-10-23 11:46 ` [U-Boot] [PATCH 2/3] ot1200: add support for usdhc4 Christian Gmeiner
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Christian Gmeiner @ 2014-10-23 11:46 UTC (permalink / raw)
  To: u-boot

The older 'mr' variant and the generic variant of the
OT1200 differ in some places. As the name suggests the
generic variant supports more boot devices.

In order to be compatible with the 'mr' variant we define
some 'feature' GPIOs. On the 'mr' variant this pads are
not connected so we define their state with the help
of the internal pullups.

On the generic variant this GPIOs are connected and
represent the state of the hardware.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
---
 board/bachmann/ot1200/ot1200.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c
index acf95cb..a2fb3cf 100644
--- a/board/bachmann/ot1200/ot1200.c
+++ b/board/bachmann/ot1200/ot1200.c
@@ -104,10 +104,25 @@ int board_spi_cs_gpio(unsigned bus, unsigned cs)
 	return (bus == 2 && cs == 0) ? (IMX_GPIO_NR(1, 3)) : -1;
 }
 
+static iomux_v3_cfg_t const feature_pads[] = {
+	/* SD card detect */
+	MX6_PAD_GPIO_4__GPIO1_IO04 | MUX_PAD_CTRL(PAD_CTL_PUS_100K_DOWN),
+
+	/* eMMC soldered? */
+	MX6_PAD_GPIO_19__GPIO4_IO05 | MUX_PAD_CTRL(PAD_CTL_PUS_100K_UP),
+};
+
+static void setup_iomux_features(void)
+{
+	imx_iomux_v3_setup_multiple_pads(feature_pads,
+		ARRAY_SIZE(feature_pads));
+}
+
 int board_early_init_f(void)
 {
 	setup_iomux_uart();
 	setup_iomux_spi();
+	setup_iomux_features();
 
 	return 0;
 }
-- 
1.9.3

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

end of thread, other threads:[~2014-10-30  9:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-23 11:46 [U-Boot] [PATCH 1/3] ot1200: add feature pads Christian Gmeiner
2014-10-23 11:46 ` [U-Boot] [PATCH 2/3] ot1200: add support for usdhc4 Christian Gmeiner
2014-10-30  9:47   ` Stefano Babic
2014-10-23 11:46 ` [U-Boot] [PATCH 3/3] ot1200: rework card detect for eMMC Christian Gmeiner
2014-10-30  9:47   ` Stefano Babic
2014-10-30  9:47 ` [U-Boot] [PATCH 1/3] ot1200: add feature pads Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox