Skip to contentSkip to conversation

sh-pfc: hardcode TDSEL to maximum value for 1.8V

HACK Wolfram Sang 1 participant 2 messages Oct 19, 2016 Pin control

lore
Share & tools
lore
#0 lore raw

From: Wolfram Sang <[email protected]>

When switching to 1.8V for exposed SD card slots, switch pins from 10pF to 40pF. Hardcoded for Gen3 Salvator-X boards.

With this patch, my Samsung card can be reliably tuned with SDR104 \o/ Before, the bus just stalled. SanDisk card still has issues, needs further debugging. But I think we want this setting in DT.

Not for upstream! Inspired by the fact that a firmware update improved the situation for Simon (I did not update yet!). Simon, can you test as well?

---
 drivers/pinctrl/sh-pfc/pinctrl.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/pinctrl/sh-pfc/pinctrl.c +6 -0
index c5772584594ce3..f69305a3200c42 100644
@@ -721,6 +721,12 @@ static int sh_pfc_pinconf_set(struct pinctrl_dev *pctldev, unsigned _pin,
 			else
 				val &= ~BIT(bit);
 			sh_pfc_write_reg(pfc, pocctrl, 32, val);
+
+			if (mV == 3300)
+				sh_pfc_write_reg(pfc, 0xe60603c0, 32, 0);
+			else
+				sh_pfc_write_reg(pfc, 0xe60603c0, 32, 0xc3);
+
 			spin_unlock_irqrestore(&pfc->lock, flags);
 
 			break;
Signature · 1 line
2.9.3
#1 lore raw
Quoted 2 lines

SanDisk card still has issues, needs further debugging.

Works fine on H3, both slots.