arm: dts: tl1: config device on portB with dts [1/1]

PD#172587

Problem:
configuration for portB in dtsi can not support
the sdcard and sdio at same time.

Solution:
move the device configuration into dts.
SKT->SDCARD
REF->SDIO

Verify:
test pass on tl1 skt and ref board

Signed-off-by: Ruixuan Li <ruixuan.li@amlogic.com>
Change-Id: I6d1da7a8d0d8d901c4a40a74f04973c155188ade

Conflicts:
	arch/arm/boot/dts/amlogic/tl1_pxp.dts
	arch/arm/boot/dts/amlogic/tl1_t962x2_skt.dts
	arch/arm/boot/dts/amlogic/tl1_t962x2_x301.dts
	drivers/amlogic/mmc/amlsd.c
This commit is contained in:
Ruixuan Li
2018-11-26 15:16:55 +08:00
committed by Dongjin Kim
parent f5c42df116
commit 2fdbf349bd
4 changed files with 50 additions and 41 deletions

View File

@@ -599,7 +599,6 @@
f_min = <400000>;
f_max = <200000000>;
max_req_size = <0x20000>; /**128KB*/
no_sduart = <1>;
gpio_dat3 = <&gpio GPIOC_3 GPIO_ACTIVE_HIGH>;
jtag_pin = <&gpio GPIOC_0 GPIO_ACTIVE_HIGH>;
gpio_cd = <&gpio GPIOC_10 GPIO_ACTIVE_HIGH>;
@@ -609,7 +608,6 @@
*/
};
};
}; /* end of / */
&audiobus {

View File

@@ -1016,14 +1016,7 @@
tuner_xtal_cap_0 = <25>; /* when tuner_xtal_mode = 3, set 25 */
};
bt-dev{
compatible = "amlogic, bt-dev";
status = "okay";
gpio_reset = <&gpio GPIOC_13 GPIO_ACTIVE_HIGH>;
};
wifi{
compatible = "amlogic, aml_wifi";
sd_emmc_b: sd@ffe05000 {
status = "okay";
compatible = "amlogic, meson-mmc-tl1";
reg = <0xffe05000 0x800>;
@@ -1058,7 +1051,6 @@
f_min = <400000>;
f_max = <200000000>;
max_req_size = <0x20000>; /**128KB*/
no_sduart = <1>;
gpio_dat3 = <&gpio GPIOC_3 GPIO_ACTIVE_HIGH>;
jtag_pin = <&gpio GPIOC_0 GPIO_ACTIVE_HIGH>;
gpio_cd = <&gpio GPIOC_10 GPIO_ACTIVE_HIGH>;
@@ -1461,18 +1453,6 @@
};
};
&sd_emmc_b {
status = "okay";
sd {
caps = "MMC_CAP_4_BIT_DATA",
"MMC_CAP_MMC_HIGHSPEED",
"MMC_CAP_SD_HIGHSPEED",
"MMC_CAP_NONREMOVABLE"; /**ptm debug */
f_min = <400000>;
f_max = <200000000>;
};
};
&spifc {
status = "disabled";
spi-nor@0 {
@@ -1633,10 +1613,6 @@
};
};
&pwm_ab {
status = "okay";
};
&efuse {
status = "okay";
};

View File

@@ -1096,6 +1096,51 @@
};
};
sd_emmc_b: sdio@ffe05000 {
status = "okay";
compatible = "amlogic, meson-mmc-tl1";
reg = <0xffe05000 0x800>;
interrupts = <0 190 4>;
pinctrl-names = "sdio_all_pins",
"sdio_clk_cmd_pins";
pinctrl-0 = <&sdio_all_pins>;
pinctrl-1 = <&sdio_clk_cmd_pins>;
clocks = <&clkc CLKID_SD_EMMC_B>,
<&clkc CLKID_SD_EMMC_B_P0_COMP>,
<&clkc CLKID_FCLK_DIV2>,
<&clkc CLKID_FCLK_DIV5>,
<&xtal>;
clock-names = "core", "clkin0", "clkin1", "clkin2", "xtal";
bus-width = <4>;
cap-sd-highspeed;
cap-mmc-highspeed;
max-frequency = <100000000>;
disable-wp;
sdio {
pinname = "sdio";
ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
caps = "MMC_CAP_4_BIT_DATA",
"MMC_CAP_MMC_HIGHSPEED",
"MMC_CAP_SD_HIGHSPEED",
"MMC_CAP_NONREMOVABLE", /**ptm debug */
"MMC_CAP_UHS_SDR12",
"MMC_CAP_UHS_SDR25",
"MMC_CAP_UHS_SDR50",
"MMC_CAP_UHS_SDR104",
"MMC_PM_KEEP_POWER",
"MMC_CAP_SDIO_IRQ";
f_min = <400000>;
f_max = <200000000>;
max_req_size = <0x20000>; /**128KB*/
card_type = <3>;
/* 3:sdio device(ie:sdio-wifi),
* 4:SD combo (IO+mem) card
*/
};
};
}; /* end of / */
&i2c0 {
@@ -1547,17 +1592,6 @@
};
};
&sd_emmc_b {
status = "okay";
sd {
caps = "MMC_CAP_4_BIT_DATA",
"MMC_CAP_MMC_HIGHSPEED",
"MMC_CAP_SD_HIGHSPEED",
"MMC_CAP_NONREMOVABLE"; /**ptm debug */
f_min = <400000>;
f_max = <200000000>;
};
};
&spifc {
status = "disabled";

View File

@@ -861,7 +861,8 @@ int aml_sd_uart_detect(struct amlsd_platform *pdata)
return 1;
pdata->is_in = true;
pdata->gpio_cd_sta = true;
if (aml_is_sduart(pdata)) {
if ((host->data->chip_type < MMC_CHIP_TL1)
&& aml_is_sduart(pdata)) {
aml_uart_switch(pdata, 1);
pr_info("Uart in\n");
mmc->caps &= ~MMC_CAP_4_BIT_DATA;
@@ -876,7 +877,7 @@ int aml_sd_uart_detect(struct amlsd_platform *pdata)
}
} else {
pr_info("normal card in\n");
if (!pdata->no_sduart) {
if (host->data->chip_type < MMC_CHIP_TL1) {
aml_uart_switch(pdata, 0);
aml_jtag_switch_ao(pdata);
}
@@ -901,7 +902,7 @@ int aml_sd_uart_detect(struct amlsd_platform *pdata)
host->is_sduart = 0;
if (mmc && mmc->card)
mmc_card_set_removed(mmc->card);
if (!pdata->no_sduart) {
if (host->data->chip_type < MMC_CHIP_TL1) {
aml_uart_switch(pdata, 0);
aml_jtag_switch_ao(pdata);
}