public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] tegra: pinmux: fix FUNCMUX_NDFLASH_KBC_8_BIT
@ 2015-03-24 12:29 Marcel Ziswiler
  2015-03-24 15:21 ` Stephen Warren
  0 siblings, 1 reply; 9+ messages in thread
From: Marcel Ziswiler @ 2015-03-24 12:29 UTC (permalink / raw)
  To: u-boot

From: Lucas Stach <dev@lynxeye.de>

Even the 8-bit case needs KBCB configured, as pin D7 is located in this
pingroup. Also pingroup ATC seems to come out of reset with config set
to NAND, so we need to explictly configure some other function to this
group in order to avoid clashing settings.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
Tested-by: Marcel Ziswiler <marcel@ziswiler.com>
---
 arch/arm/mach-tegra/tegra20/funcmux.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/mach-tegra/tegra20/funcmux.c b/arch/arm/mach-tegra/tegra20/funcmux.c
index 0df4a07..f9b6214 100644
--- a/arch/arm/mach-tegra/tegra20/funcmux.c
+++ b/arch/arm/mach-tegra/tegra20/funcmux.c
@@ -252,17 +252,25 @@ int funcmux_select(enum periph_id id, int config)
 			break;
 		case FUNCMUX_NDFLASH_KBC_8_BIT:
 			pinmux_set_func(PMUX_PINGRP_KBCA, PMUX_FUNC_NAND);
+			pinmux_set_func(PMUX_PINGRP_KBCB, PMUX_FUNC_NAND);
 			pinmux_set_func(PMUX_PINGRP_KBCC, PMUX_FUNC_NAND);
 			pinmux_set_func(PMUX_PINGRP_KBCD, PMUX_FUNC_NAND);
 			pinmux_set_func(PMUX_PINGRP_KBCE, PMUX_FUNC_NAND);
 			pinmux_set_func(PMUX_PINGRP_KBCF, PMUX_FUNC_NAND);
 
 			pinmux_tristate_disable(PMUX_PINGRP_KBCA);
+			pinmux_tristate_disable(PMUX_PINGRP_KBCB);
 			pinmux_tristate_disable(PMUX_PINGRP_KBCC);
 			pinmux_tristate_disable(PMUX_PINGRP_KBCD);
 			pinmux_tristate_disable(PMUX_PINGRP_KBCE);
 			pinmux_tristate_disable(PMUX_PINGRP_KBCF);
 
+			/*
+			 * configure pingroup ATC to something unrelated to
+			 * avoid ATC overriding KBC
+			 */
+			pinmux_set_func(PMUX_PINGRP_ATC, PMUX_FUNC_GMI);
+
 			bad_config = 0;
 			break;
 		}
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [U-Boot] [PATCH] tegra: pinmux: fix FUNCMUX_NDFLASH_KBC_8_BIT
@ 2013-01-22  0:20 Lucas Stach
  2013-01-22 16:24 ` Stephen Warren
  0 siblings, 1 reply; 9+ messages in thread
From: Lucas Stach @ 2013-01-22  0:20 UTC (permalink / raw)
  To: u-boot

Even the 8bit case needs KBCB configured, as pin D7 is located in this
pingroup. Also pingroup ATC seems to come out of reset with config set
to NAND, so we need to explictly configure some other function to this
group in order to avoid clashing settings.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 arch/arm/cpu/tegra20-common/funcmux.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/cpu/tegra20-common/funcmux.c b/arch/arm/cpu/tegra20-common/funcmux.c
index a1c55a6..30fdf1c 100644
--- a/arch/arm/cpu/tegra20-common/funcmux.c
+++ b/arch/arm/cpu/tegra20-common/funcmux.c
@@ -266,17 +266,25 @@ int funcmux_select(enum periph_id id, int config)
 			break;
 		case FUNCMUX_NDFLASH_KBC_8_BIT:
 			pinmux_set_func(PINGRP_KBCA, PMUX_FUNC_NAND);
+			pinmux_set_func(PINGRP_KBCB, PMUX_FUNC_NAND);
 			pinmux_set_func(PINGRP_KBCC, PMUX_FUNC_NAND);
 			pinmux_set_func(PINGRP_KBCD, PMUX_FUNC_NAND);
 			pinmux_set_func(PINGRP_KBCE, PMUX_FUNC_NAND);
 			pinmux_set_func(PINGRP_KBCF, PMUX_FUNC_NAND);
 
 			pinmux_tristate_disable(PINGRP_KBCA);
+			pinmux_tristate_disable(PINGRP_KBCB);
 			pinmux_tristate_disable(PINGRP_KBCC);
 			pinmux_tristate_disable(PINGRP_KBCD);
 			pinmux_tristate_disable(PINGRP_KBCE);
 			pinmux_tristate_disable(PINGRP_KBCF);
 
+			/*
+			 * configure pingroup ATC to something unrelated to
+			 * avoid ATC overriding KBC
+			 */
+			pinmux_set_func(PINGRP_ATC, PMUX_FUNC_GMI);
+
 			bad_config = 0;
 			break;
 		}
-- 
1.8.0.2

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

end of thread, other threads:[~2015-03-25 18:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-24 12:29 [U-Boot] [PATCH] tegra: pinmux: fix FUNCMUX_NDFLASH_KBC_8_BIT Marcel Ziswiler
2015-03-24 15:21 ` Stephen Warren
2015-03-25  7:42   ` Marcel Ziswiler
2015-03-25 17:46   ` Marcel Ziswiler
2015-03-25 18:08     ` Stephen Warren
  -- strict thread matches above, loose matches on Subject: below --
2013-01-22  0:20 Lucas Stach
2013-01-22 16:24 ` Stephen Warren
2013-01-22 22:27   ` Lucas Stach
2013-01-23  1:55     ` Allen Martin

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