In the linux-3.0.35 sd driver.
File:sdhci.c
Func:sdhci_start_signal_voltage_switch
Reg:SDHCI_HOST_CONTROL2(#define SDHCI_HOST_CONTROL2 0x3E)
From the datasheet,0x3E is part of the retgister uSDHC1_AUTOCMD12_ERR_STATUS,it is a readonly erea.But,the linux kernel source has the write operation:
sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2);
Question:
1.Is there some problem with register write to SDHCI_HOST_CONTROL2(0x3E)
2.The function sdhci_start_signal_voltage_switch can be used to switch signal voltage from 3.3V to 1.8V for UHS card,If SDHCI_HOST_CONTROL2 can be write,it seems no affect to the signal voltage.
3.I also check the source in u-boot.In u-boot,when use a UHS card,the source write register uSDHCx_VEND_SPEC bit 1:
Voltage Selection
Change the value of output signal VSELECT, to control the voltage on pads for external card. There must be a control circuit out of uSDHC to change the voltage on pads.
1 Change the voltage to low voltage range, around 1.8V
0 Change the voltage to high voltage range, around 3.0V
So I think u-boot source is right,the kernel may be wrong ,is that right?
Solved! Go to Solution.
Hi, please see my comments below:
1) sdhci.c is generickernel driver is not the i.mx sdhc driver.
2) SDHCI_HOST_CONTROL is not a hardware register offset .
3) sdhci_writew is a calback to the platform write function, the one defined in the driver.
4) sdhci-esdhc-imx.c is the real driver which in his write_w function handles properly the
SDHCI_HOST_CONTROL2 to te real offset in the hardware.
I hope this helps.
Regards,
Alejandro
Hi, please see my comments below:
1) sdhci.c is generickernel driver is not the i.mx sdhc driver.
2) SDHCI_HOST_CONTROL is not a hardware register offset .
3) sdhci_writew is a calback to the platform write function, the one defined in the driver.
4) sdhci-esdhc-imx.c is the real driver which in his write_w function handles properly the
SDHCI_HOST_CONTROL2 to te real offset in the hardware.
I hope this helps.
Regards,
Alejandro
Thanks very much.