1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <soc/pcr_ids.h>
5 #define PMCR_D0_MASK 0xFFFC
6 #define PMCR_D3_MASK 0x0003
11 * Clear register 0x1C20/0x4820
14 Method(SCSC, 1, Serialized)
16 PCRA (Arg0, 0x1C20, 0x0)
17 PCRA (Arg0, 0x4820, 0x0)
22 Name(_ADR, 0x001A0000)
23 Name (_DDN, "eMMC Controller")
26 OperationRegion(SCSR, PCI_Config, 0x00, 0x100)
27 Field(SCSR, WordAcc, NoLock, Preserve) {
28 Offset (0x84), /* PMECTRLSTATUS */
30 Offset (0xA2), /* PG_CONFIG */
32 PGEN, 1, /* PG_ENABLE */
37 * Clear eMMC timeout registers. _PS0 is not called by kernel when
38 * boot source is not eMMC, but OS still initializes eMMC. So disable
39 * timeout registers when boot source is not eMMC. Ported from CB:25290.
44 Method(_PS0, 0, Serialized) {
45 Stall (50) /* Sleep 50 us */
47 PGEN = 0 /* Disable PG */
49 /* Clear register 0x1C20/0x4820 */
52 /* Set Power State to D0 */
54 /* Additional config read to eMMC controller. Ported from CB:23312 */
58 Method(_PS3, 0, Serialized) {
59 PGEN = 1 /* Enable PG */
61 /* Set Power State to D3 */
63 /* Additional config read to eMMC controller. Ported from CB:23312 */
69 Name (_ADR, 0x00000008)
70 Method (_RMV, 0, NotSerialized)