hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/mmc/host/sdhci-esdhc.h
....@@ -1,14 +1,12 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Freescale eSDHC controller driver generics for OF and pltfm.
34 *
45 * Copyright (c) 2007 Freescale Semiconductor, Inc.
56 * Copyright (c) 2009 MontaVista Software, Inc.
67 * Copyright (c) 2010 Pengutronix e.K.
7
- * Author: Wolfram Sang <w.sang@pengutronix.de>
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2 of the License.
8
+ * Copyright 2020 NXP
9
+ * Author: Wolfram Sang <kernel@pengutronix.de>
1210 */
1311
1412 #ifndef _DRIVERS_MMC_SDHCI_ESDHC_H
....@@ -34,6 +32,7 @@
3432
3533 /* Present State Register */
3634 #define ESDHC_PRSSTAT 0x24
35
+#define ESDHC_CLOCK_GATE_OFF 0x00000080
3736 #define ESDHC_CLOCK_STABLE 0x00000008
3837
3938 /* Protocol Control Register */
....@@ -54,12 +53,52 @@
5453 #define ESDHC_CLOCK_HCKEN 0x00000002
5554 #define ESDHC_CLOCK_IPGEN 0x00000001
5655
56
+/* System Control 2 Register */
57
+#define ESDHC_SYSTEM_CONTROL_2 0x3c
58
+#define ESDHC_SMPCLKSEL 0x00800000
59
+#define ESDHC_EXTN 0x00400000
60
+
5761 /* Host Controller Capabilities Register 2 */
5862 #define ESDHC_CAPABILITIES_1 0x114
5963
6064 /* Tuning Block Control Register */
6165 #define ESDHC_TBCTL 0x120
66
+#define ESDHC_HS400_WNDW_ADJUST 0x00000040
67
+#define ESDHC_HS400_MODE 0x00000010
6268 #define ESDHC_TB_EN 0x00000004
69
+#define ESDHC_TB_MODE_MASK 0x00000003
70
+#define ESDHC_TB_MODE_SW 0x00000003
71
+#define ESDHC_TB_MODE_3 0x00000002
72
+
73
+#define ESDHC_TBSTAT 0x124
74
+
75
+#define ESDHC_TBPTR 0x128
76
+#define ESDHC_WNDW_STRT_PTR_SHIFT 8
77
+#define ESDHC_WNDW_STRT_PTR_MASK (0x7f << 8)
78
+#define ESDHC_WNDW_END_PTR_MASK 0x7f
79
+
80
+/* SD Clock Control Register */
81
+#define ESDHC_SDCLKCTL 0x144
82
+#define ESDHC_LPBK_CLK_SEL 0x80000000
83
+#define ESDHC_CMD_CLK_CTL 0x00008000
84
+
85
+/* SD Timing Control Register */
86
+#define ESDHC_SDTIMNGCTL 0x148
87
+#define ESDHC_FLW_CTL_BG 0x00008000
88
+
89
+/* DLL Config 0 Register */
90
+#define ESDHC_DLLCFG0 0x160
91
+#define ESDHC_DLL_ENABLE 0x80000000
92
+#define ESDHC_DLL_RESET 0x40000000
93
+#define ESDHC_DLL_FREQ_SEL 0x08000000
94
+
95
+/* DLL Config 1 Register */
96
+#define ESDHC_DLLCFG1 0x164
97
+#define ESDHC_DLL_PD_PULSE_STRETCH_SEL 0x80000000
98
+
99
+/* DLL Status 0 Register */
100
+#define ESDHC_DLLSTAT0 0x170
101
+#define ESDHC_DLL_STS_SLV_LOCK 0x08000000
63102
64103 /* Control Register for DMA transfer */
65104 #define ESDHC_DMA_SYSCTL 0x40c