sd: add sduart not supported flag [1/1]

PD#SWPL-4858

Problem:
tl1 not support sduart

Solution:
add not supported flag in match_data

Verify:
verify by tl1 skt

Change-Id: I651765433bb62892fad770c85a5eccd4805e7c79
Signed-off-by: Nan Li <nan.li@amlogic.com>
This commit is contained in:
Nan Li
2019-02-14 10:43:31 +08:00
committed by Luke Go
parent e6bbfaf869
commit 35bc41f8d8
4 changed files with 145 additions and 3 deletions

View File

@@ -473,6 +473,142 @@
reg-names = "ao_exit","ao";
};
/*DCDC for MP8756GD*/
cpu_opp_table0: cpu_opp_table0 {
compatible = "operating-points-v2";
opp-shared;
opp00 {
opp-hz = /bits/ 64 <100000000>;
opp-microvolt = <731000>;
};
opp01 {
opp-hz = /bits/ 64 <250000000>;
opp-microvolt = <731000>;
};
opp02 {
opp-hz = /bits/ 64 <500000000>;
opp-microvolt = <731000>;
};
opp03 {
opp-hz = /bits/ 64 <667000000>;
opp-microvolt = <761000>;
};
opp04 {
opp-hz = /bits/ 64 <1000000000>;
opp-microvolt = <781000>;
};
opp05 {
opp-hz = /bits/ 64 <1200000000>;
opp-microvolt = <801000>;
};
opp06 {
opp-hz = /bits/ 64 <1398000000>;
opp-microvolt = <831000>;
};
opp07 {
opp-hz = /bits/ 64 <1512000000>;
opp-microvolt = <861000>;
};
opp08 {
opp-hz = /bits/ 64 <1608000000>;
opp-microvolt = <891000>;
};
opp09 {
opp-hz = /bits/ 64 <1704000000>;
opp-microvolt = <921000>;
};
opp10 {
opp-hz = /bits/ 64 <1800000000>;
opp-microvolt = <981000>;
};
opp11 {
opp-hz = /bits/ 64 <1908000000>;
opp-microvolt = <1011000>;
};
};
cpufreq-meson {
compatible = "amlogic, cpufreq-meson";
pinctrl-names = "default";
pinctrl-0 = <&pwm_ao_d_pins3>;
status = "okay";
};
tuner: tuner {
compatible = "amlogic, tuner";
status = "okay";
tuner_name = "mxl661_tuner";
tuner_i2c_adap = <&i2c0>;
tuner_i2c_addr = <0x60>;
tuner_xtal = <1>; /* 0: 16MHz, 1: 24MHz */
tuner_xtal_mode = <3>;
/* NO_SHARE_XTAL(0)
* SLAVE_XTAL_SHARE(3)
*/
tuner_xtal_cap = <25>; /* when tuner_xtal_mode = 3, set 25 */
};
atv-demod {
compatible = "amlogic, atv-demod";
status = "okay";
tuner = <&tuner>;
btsc_sap_mode = <1>;
/* pinctrl-names="atvdemod_agc_pins"; */
/* pinctrl-0=<&atvdemod_agc_pins>; */
reg = <0xff656000 0x2000 /* demod reg */
0xff63c000 0x2000 /* hiu reg */
0xff634000 0x2000 /* periphs reg */
0xff64a000 0x2000>; /* audio reg */
reg_23cf = <0x88188832>;
/*default:0x88188832;r840 on haier:0x48188832*/
};
sd_emmc_b: sd@ffe05000 {
status = "okay";
compatible = "amlogic, meson-mmc-tl1";
reg = <0xffe05000 0x800>;
interrupts = <0 190 1>;
pinctrl-names = "sd_all_pins",
"sd_clk_cmd_pins",
"sd_1bit_pins";
pinctrl-0 = <&sd_all_pins>;
pinctrl-1 = <&sd_clk_cmd_pins>;
pinctrl-2 = <&sd_1bit_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;
sd {
pinname = "sd";
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 */
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>;
card_type = <5>;
/* 3:sdio device(ie:sdio-wifi),
* 4:SD combo (IO+mem) card
*/
};
};
}; /* end of / */
&audiobus {

View File

@@ -885,7 +885,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 ((!pdata->no_sduart)
&& aml_is_sduart(pdata)) {
aml_uart_switch(pdata, 1);
pr_info("Uart in\n");
mmc->caps &= ~MMC_CAP_4_BIT_DATA;
@@ -923,8 +924,10 @@ int aml_sd_uart_detect(struct amlsd_platform *pdata)
host->is_sduart = 0;
if (mmc && mmc->card)
mmc_card_set_removed(mmc->card);
aml_uart_switch(pdata, 0);
aml_jtag_switch_ao(pdata);
if (!pdata->no_sduart) {
aml_uart_switch(pdata, 0);
aml_jtag_switch_ao(pdata);
}
/* switch to 3.3V */
aml_sd_voltage_switch(mmc,
MMC_SIGNAL_VOLTAGE_330);

View File

@@ -187,6 +187,8 @@ int amlsd_get_platform_data(struct platform_device *pdev,
str, pdata->gpio_power);
SD_PARSE_U32_PROP_DEC(child, "calc_f",
prop, pdata->calc_f);
SD_PARSE_U32_PROP_DEC(child, "no_sduart",
prop, pdata->no_sduart);
SD_PARSE_U32_PROP_DEC(child, "gpio_cd_level",
prop, pdata->gpio_cd_level);

View File

@@ -299,6 +299,7 @@ struct amlsd_platform {
unsigned int gpio_power;
unsigned int power_level;
unsigned int calc_f;
unsigned int no_sduart;
unsigned int auto_clk_close;
unsigned int vol_switch;