aboutsummaryrefslogtreecommitdiff
path: root/src/soc/nvidia/tegra
diff options
context:
space:
mode:
authorKen Chang <kenc@nvidia.com>2014-04-21 17:54:28 +0800
committerMarc Jones <marc.jones@se-eng.com>2014-12-17 20:48:39 +0100
commit41359bd230942bea9cea234e147e629a78cbf794 (patch)
tree81bc8e781a946609145151a382b64b49ae04a986 /src/soc/nvidia/tegra
parentf6e17c04e9bd8521d734bced097616aa04150a0b (diff)
nyan*: enable CLAMP_INPUTS
Enable pinmux clamp function to avoid pinmux conflict. For pins which are configured to tristate enabled, the inputs to the controller will be clamped to zero. This can be used to avoid pinmux conflicts since the tristate bit is set to 1 in the power-on-reset pinmux setting. With pinmux clamp enabled, we need to configure all the input pins to tristate disabled. BUG=chrome-os-partner:27091 BRANCH=None TEST=built and booted successfully, display worked fine. Original-Change-Id: Id79a717f2025c812908c7152d439351208aee8d2 Original-Signed-off-by: Ken Chang <kenc@nvidia.com> Original-Reviewed-on: https://chromium-review.googlesource.com/194060 Original-Reviewed-by: Gabe Black <gabeblack@chromium.org> (cherry picked from commit c95d6fe79810612cfad721667657cdcb87068d23) Signed-off-by: Marc Jones <marc.jones@se-eng.com> Change-Id: I1b23df8b90f83ea2b2c08c4364d90fe71533a5a0 Reviewed-on: http://review.coreboot.org/7775 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/soc/nvidia/tegra')
-rw-r--r--src/soc/nvidia/tegra/apbmisc.c8
-rw-r--r--src/soc/nvidia/tegra/apbmisc.h6
-rw-r--r--src/soc/nvidia/tegra/gpio.c2
3 files changed, 14 insertions, 2 deletions
diff --git a/src/soc/nvidia/tegra/apbmisc.c b/src/soc/nvidia/tegra/apbmisc.c
index fea10b5dbe..5983d546d2 100644
--- a/src/soc/nvidia/tegra/apbmisc.c
+++ b/src/soc/nvidia/tegra/apbmisc.c
@@ -22,8 +22,14 @@
#include "apbmisc.h"
+static struct apbmisc *misc = (struct apbmisc *)TEGRA_APB_MISC_BASE;
+
void enable_jtag(void)
{
- struct apbmisc *misc = (struct apbmisc *)TEGRA_APB_MISC_BASE;
write32(PP_CONFIG_CTL_JTAG, &misc->pp_config_ctl);
}
+
+void clamp_tristate_inputs(void)
+{
+ write32(PP_PINMUX_CLAMP_INPUTS, &misc->pp_pinmux_global);
+}
diff --git a/src/soc/nvidia/tegra/apbmisc.h b/src/soc/nvidia/tegra/apbmisc.h
index 805d0bf18b..2f1811a1dd 100644
--- a/src/soc/nvidia/tegra/apbmisc.h
+++ b/src/soc/nvidia/tegra/apbmisc.h
@@ -25,11 +25,17 @@
struct apbmisc {
u32 reserved0[9]; /* ABP_MISC_PP_ offsets 00-20 */
u32 pp_config_ctl; /* _CONFIG_CTL_0, offset 24 */
+ u32 reserved1[6]; /* APB_MISC_PP_ offsets 28-3C */
+ u32 pp_pinmux_global; /* _PINMUX_GLOBAL_0, offset 40 */
};
#define PP_CONFIG_CTL_TBE (1 << 7)
#define PP_CONFIG_CTL_JTAG (1 << 6)
+#define PP_PINMUX_CLAMP_INPUTS (1 << 0)
+
+
void enable_jtag(void);
+void clamp_tristate_inputs(void);
#endif /* __SOC_NVIDIA_TEGRA_APBMISC_H__ */
diff --git a/src/soc/nvidia/tegra/gpio.c b/src/soc/nvidia/tegra/gpio.c
index ac0fc3f986..b10cded12d 100644
--- a/src/soc/nvidia/tegra/gpio.c
+++ b/src/soc/nvidia/tegra/gpio.c
@@ -29,7 +29,7 @@
void __gpio_input(gpio_t gpio, u32 pull)
{
- u32 pinmux_config = PINMUX_INPUT_ENABLE | PINMUX_TRISTATE | pull;
+ u32 pinmux_config = PINMUX_INPUT_ENABLE | pull;
gpio_set_int_enable(gpio, 0);
gpio_set_out_enable(gpio, 0);