mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
feat(sdmmc): supported sd2.0 on esp32p4
This commit is contained in:

committed by
Armando (Dou Yiwen)

parent
1685dbc985
commit
70314b56d5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -286,7 +286,52 @@ typedef volatile struct sdmmc_dev_s {
|
||||
|
||||
uint32_t usrid; ///< user ID
|
||||
uint32_t verid; ///< IP block version
|
||||
uint32_t hcon; ///< compile-time IP configuration
|
||||
|
||||
union {
|
||||
struct {
|
||||
/** card_type_reg : RO; bitpos: [0]; default: 1;
|
||||
* Hardware support SDIO and MMC.
|
||||
*/
|
||||
uint32_t card_type_reg:1;
|
||||
/** card_num_reg : RO; bitpos: [5:1]; default: 1;
|
||||
* Support card number is 2.
|
||||
*/
|
||||
uint32_t card_num_reg:5;
|
||||
/** bus_type_reg : RO; bitpos: [6]; default: 1;
|
||||
* Register config is APB bus.
|
||||
*/
|
||||
uint32_t bus_type_reg:1;
|
||||
/** data_width_reg : RO; bitpos: [9:7]; default: 1;
|
||||
* Regisger data widht is 32.
|
||||
*/
|
||||
uint32_t data_width_reg:3;
|
||||
/** addr_width_reg : RO; bitpos: [15:10]; default: 19;
|
||||
* Register address width is 32.
|
||||
*/
|
||||
uint32_t addr_width_reg:6;
|
||||
uint32_t reserved_16:2;
|
||||
/** dma_width_reg : RO; bitpos: [20:18]; default: 1;
|
||||
* DMA data witdth is 32.
|
||||
*/
|
||||
uint32_t dma_width_reg:3;
|
||||
/** ram_indise_reg : RO; bitpos: [21]; default: 0;
|
||||
* Inside RAM in SDMMC module.
|
||||
*/
|
||||
uint32_t ram_indise_reg:1;
|
||||
/** hold_reg : RO; bitpos: [22]; default: 1;
|
||||
* Have a hold regiser in data path .
|
||||
*/
|
||||
uint32_t hold_reg:1;
|
||||
uint32_t reserved_23:1;
|
||||
/** num_clk_div_reg : RO; bitpos: [25:24]; default: 3;
|
||||
* Have 4 clk divider in design .
|
||||
*/
|
||||
uint32_t num_clk_div_reg:2;
|
||||
uint32_t reserved_26:6;
|
||||
};
|
||||
uint32_t val;
|
||||
} hcon;
|
||||
|
||||
union {
|
||||
struct {
|
||||
uint32_t voltage: 16; ///< voltage control for slots; no-op on ESP32.
|
||||
|
@@ -1,16 +1,8 @@
|
||||
// Copyright 2015-2018 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "soc/sdmmc_periph.h"
|
||||
|
||||
@@ -55,3 +47,30 @@ const sdmmc_slot_io_info_t sdmmc_slot_gpio_num[SOC_SDMMC_NUM_SLOTS] = {
|
||||
.d7 = -1,
|
||||
}
|
||||
};
|
||||
|
||||
const sdmmc_slot_io_info_t sdmmc_slot_gpio_sig[SOC_SDMMC_NUM_SLOTS] = {
|
||||
{
|
||||
.clk = -1,
|
||||
.cmd = -1,
|
||||
.d0 = -1,
|
||||
.d1 = -1,
|
||||
.d2 = -1,
|
||||
.d3 = -1,
|
||||
.d4 = -1,
|
||||
.d5 = -1,
|
||||
.d6 = -1,
|
||||
.d7 = -1,
|
||||
},
|
||||
{
|
||||
.clk = -1,
|
||||
.cmd = -1,
|
||||
.d0 = -1,
|
||||
.d1 = -1,
|
||||
.d2 = -1,
|
||||
.d3 = -1,
|
||||
.d4 = -1,
|
||||
.d5 = -1,
|
||||
.d6 = -1,
|
||||
.d7 = -1,
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user