summaryrefslogtreecommitdiffstats
path: root/src/soc/intel/baytrail/include/soc/xhci.h
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2014-10-07 16:42:17 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-04-07 18:23:21 +0200
commit18ea2d3fbdf89f60a74dc8aabfdb2aa4d3475754 (patch)
tree875739d499ccc1fa84b03507f8bee699fb86eb95 /src/soc/intel/baytrail/include/soc/xhci.h
parent26de1126363218cd19524050d80acc8ed1ce3e53 (diff)
downloadcoreboot-18ea2d3fbdf89f60a74dc8aabfdb2aa4d3475754.tar.gz
coreboot-18ea2d3fbdf89f60a74dc8aabfdb2aa4d3475754.tar.bz2
coreboot-18ea2d3fbdf89f60a74dc8aabfdb2aa4d3475754.zip
baytrail: Change all SoC headers to <soc/headername.h> system
This patch aligns baytrail to the new SoC header include scheme. BUG=None TEST=Tested with whole series. Compiled Rambi. Change-Id: I0f0a894f6f33449756582eefa0b50bae545220db Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 1216a86538517c03a7e5bca547d08ff3dbcaa083 Original-Change-Id: If5d2a609354b3d773aa3d482e682ab97422fd9d5 Original-Signed-off-by: Julius Werner <jwerner@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/222026 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/9363 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Aaron Durbin <adurbin@google.com>
Diffstat (limited to 'src/soc/intel/baytrail/include/soc/xhci.h')
-rw-r--r--src/soc/intel/baytrail/include/soc/xhci.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/soc/intel/baytrail/include/soc/xhci.h b/src/soc/intel/baytrail/include/soc/xhci.h
new file mode 100644
index 000000000000..b317361c0888
--- /dev/null
+++ b/src/soc/intel/baytrail/include/soc/xhci.h
@@ -0,0 +1,56 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2013 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef BAYTRAIL_XHCI_H
+#define BAYTRAIL_XHCI_H
+
+/* XHCI PCI Registers */
+#define XHCI_PWR_CTL_STS 0x74
+#define XHCI_USB2PR 0xd0
+#define XHCI_USB2PRM 0xd4
+#define XHCI_USB3PR 0xd8
+#define XHCI_USB3PRM 0xdc
+#define XHCI_USB2PDO 0xe4
+#define XHCI_USB3PDO 0xe8
+
+/* XHCI Memory Registers */
+#define XHCI_USB3_PORTSC(port) (0x4e0 + (port * 0x10))
+# define XHCI_USB3_PORTSC_CHST (0x7f << 17)
+# define XHCI_USB3_PORTSC_WCE (1 << 25) /* Wake on Connect */
+# define XHCI_USB3_PORTSC_WDE (1 << 26) /* Wake on Disconnect */
+# define XHCI_USB3_PORTSC_WOE (1 << 27) /* Wake on Overcurrent */
+# define XHCI_USB3_PORTSC_WRC (1 << 19) /* Warm Reset Complete */
+# define XHCI_USB3_PORTSC_LWS (1 << 16) /* Link Write Strobe */
+# define XHCI_USB3_PORTSC_PED (1 << 1) /* Port Enabled/Disabled */
+# define XHCI_USB3_PORTSC_WPR (1 << 31) /* Warm Port Reset */
+# define XHCI_USB3_PORTSC_PLS (0xf << 5) /* Port Link State */
+# define XHCI_PLSR_DISABLED (4 << 5) /* Port is disabled */
+# define XHCI_PLSR_RXDETECT (5 << 5) /* Port is disconnected */
+# define XHCI_PLSR_POLLING (7 << 5) /* Port is polling */
+# define XHCI_PLSW_ENABLE (5 << 5) /* Enable port */
+
+/* The Fuse register is incorrect for Baytrail-M so use hardcoded values */
+#define BYTM_USB2_PORT_COUNT 4
+#define BYTM_USB2_PORT_MAP 0xf
+#define BYTM_USB3_PORT_COUNT 1
+#define BYTM_USB3_PORT_MAP 0x1
+
+#define XHCI_RESET_TIMEOUT 100000 /* 100ms */
+
+#endif /* BAYTRAIL_XHCI_H */