1 /* 2 * Copyright (c) 2022-2023, Intel Corporation. All rights reserved. 3 * Copyright (c) 2025, Altera Corporation. All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-3-Clause 6 */ 7 8 #ifndef COMBOPHY_H 9 #define COMBOPHY_H 10 11 #include <lib/mmio.h> 12 13 #include "socfpga_handoff.h" 14 15 #define PERIPHERAL_SDMMC_MASK 0x60 16 #define PERIPHERAL_SDMMC_OFFSET 6 17 #define DFI_INTF_MASK 0x1 18 19 /* Peripheral configuration, power gate enable bit masks */ 20 #define POWER_GATE_EN_USB2_X BIT(0) 21 #define POWER_GATE_EN_USB3_X BIT(1) 22 #define POWER_GATE_EN_EMAC0 BIT(2) 23 #define POWER_GATE_EN_EMAC1 BIT(3) 24 #define POWER_GATE_EN_EMAC2 BIT(4) 25 #define POWER_GATE_EN_NAND BIT(5) 26 #define POWER_GATE_EN_SDEMMC BIT(6) 27 #define POWER_GATE_EN_CORESIGHT BIT(7) 28 29 #define DFI_CTRL_SEL_HPNFC 0x00 /* Non-volatile flash controller */ 30 #define DFI_CTRL_SEL_SDEMMC 0x01 /* SDMMC controller */ 31 32 /* FUNCTION DEFINATION */ 33 /* 34 * @brief Nand controller initialization function 35 * 36 * @hoff_ptr: Pointer to the hand-off data 37 * Return: 0 on success, a negative errno on failure 38 */ 39 int combo_phy_init(handoff *hoff_ptr); 40 int dfi_select(handoff *hoff_ptr); 41 42 #endif