reg = <0x0 0xffe05000 0x0 0x2000>;
interrupts = <0 190 1>;
- pinctrl-names = "sd_clk_cmd_pins", "sd_all_pins";
- pinctrl-0 = <&sd_clk_cmd_pins>;
- pinctrl-1 = <&sd_all_pins>;
+ pinctrl-names = "sd_all_pins",
+ "sd_clk_cmd_pins";
+ pinctrl-0 = <&sd_all_pins>;
+ pinctrl-1 = <&sd_clk_cmd_pins>;
clocks = <&clkc CLKID_SD_EMMC_B>,
<&clkc CLKID_SD_EMMC_B_P0_COMP>,
<&clkc CLKID_FCLK_DIV2>,
- <&clkc CLKID_FCLK_DIV5>;
- clock-names = "core", "clkin0", "clkin1", "clkin2";
+ <&clkc CLKID_FCLK_DIV5>,
+ <&xtal>;
+ clock-names = "core", "clkin0", "clkin1", "clkin2", "xtal";
bus-width = <4>;
cap-sd-highspeed;
cap-mmc-highspeed;
max-frequency = <100000000>;
- non-removable;
disable-wp;
sd {
pinname = "sd";
caps = "MMC_CAP_4_BIT_DATA",
"MMC_CAP_MMC_HIGHSPEED",
"MMC_CAP_SD_HIGHSPEED",
- "MMC_CAP_NONREMOVABLE",
"MMC_CAP_UHS_SDR12",
"MMC_CAP_UHS_SDR25",
- "MMC_CAP_UHS_SDR50",
- "MMC_PM_KEEP_POWER",
- "MMC_CAP_NONREMOVABLE"; /**ptm debug */
+ "MMC_CAP_UHS_SDR50";
f_min = <400000>;
f_max = <200000000>;
max_req_size = <0x20000>; /**128KB*/
+ gpio_dat3 = <&gpio GPIOC_4 GPIO_ACTIVE_HIGH>;
+ jtag_pin = <&gpio GPIOC_0 GPIO_ACTIVE_HIGH>;
+ gpio_cd = <&gpio GPIOC_6 GPIO_ACTIVE_HIGH>;
card_type = <5>;
/* 3:sdio device(ie:sdio-wifi),
* 4:SD combo (IO+mem) card
bias-pull-up;
};
};
+ sd_1bit_pins:sd_1bit_pins {
+ mux {
+ groups = "sdcard_d0_c",
+ "sdcard_cmd_c",
+ "sdcard_clk_c";
+ function = "sdcard";
+ input-enable;
+ bias-pull-up;
+ };
+ };
+
+ ao_to_sd_uart_pins:ao_to_sd_uart_pins {
+ mux {
+ groups = "uart_tx_ao_a_c4",
+ "uart_rx_ao_a_c5";
+ function = "uart_ao_a_ee";
+ bias-pull-up;
+ input-enable;
+ };
+ };
all_nand_pins: all_nand_pins {
mux {
static int aml_is_sduart(struct amlsd_host *host)
{
-#ifdef CONFIG_MESON_CPU_EMULATOR
+#ifndef SD_EMMC_DEBUG_BOARD
return 0;
#else
int in = 0, i;
/* int n=0; */
static int aml_uart_switch(struct amlsd_host *host, bool on)
{
+#ifndef SD_EMMC_DEBUG_BOARD
+ return on;
+#else
struct pinctrl *pc;
char *name[2] = {
"sd_to_ao_uart_pins",
mutex_lock(&host->pinmux_lock);
pc = aml_devm_pinctrl_get_select(host, name[on]);
mutex_unlock(&host->pinmux_lock);
+#endif
return on;
}
static void aml_jtag_switch_ao(struct amlsd_host *host)
{
+#ifndef SD_EMMC_DEBUG_BOARD
+
+#else
struct pinctrl *pc;
int i;
break;
mdelay(1);
}
+#endif
}
#endif
#include <linux/of_gpio.h>
/* ptm or pxp simulation */
-#define CONFIG_MESON_CPU_EMULATOR
+/* #define CONFIG_MESON_CPU_EMULATOR */
+/* #define SD_EMMC_DEBUG_BOARD */
/* hardcode clock, for debug or bringup */
/* #define SD_EMMC_CLK_CTRL (1) */
/* #define SD_EMMC_PIN_CTRL (1) */