Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/rockchip Set drive strength and output tap delay
details: https://anonhg.NetBSD.org/src/rev/6b30fdf9b194
branches: trunk
changeset: 997572:6b30fdf9b194
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Mar 13 10:28:37 2019 +0000
description:
Set drive strength and output tap delay
diffstat:
sys/arch/arm/rockchip/rk_emmcphy.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 2a33be9e9c19 -r 6b30fdf9b194 sys/arch/arm/rockchip/rk_emmcphy.c
--- a/sys/arch/arm/rockchip/rk_emmcphy.c Wed Mar 13 10:08:02 2019 +0000
+++ b/sys/arch/arm/rockchip/rk_emmcphy.c Wed Mar 13 10:28:37 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_emmcphy.c,v 1.2 2019/03/10 19:47:03 jmcneill Exp $ */
+/* $NetBSD: rk_emmcphy.c,v 1.3 2019/03/13 10:28:37 jmcneill Exp $ */
/*-
* Copyright (c) 2019 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rk_emmcphy.c,v 1.2 2019/03/10 19:47:03 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk_emmcphy.c,v 1.3 2019/03/13 10:28:37 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -139,6 +139,18 @@
syscon_lock(sc->sc_syscon);
+ if (enable) {
+ /* Drive strength */
+ mask = PHYCTRL_DR_TY;
+ val = __SHIFTIN(0, PHYCTRL_DR_TY);
+ WR4(sc, GRF_EMMCPHY_CON6, (mask << 16) | val);
+
+ /* Enable output tap delay */
+ mask = PHYCTRL_OTAPDLYENA | PHYCTRL_OTAPDLYSEL;
+ val = PHYCTRL_OTAPDLYENA | __SHIFTIN(4, PHYCTRL_OTAPDLYSEL);
+ WR4(sc, GRF_EMMCPHY_CON0, (mask << 16) | val);
+ }
+
/* Power down PHY and disable DLL before making changes */
mask = PHYCTRL_ENDLL | PHYCTRL_PDB;
val = 0;
Home |
Main Index |
Thread Index |
Old Index