On Sun, 25 Sep 2016 10:19:55 +0200
Danny Milosavljevic <[email protected]> wrote:

> On Fri, 23 Sep 2016 04:03:57 +0300
> Siarhei Siamashka <[email protected]> wrote:
> > I'm not sure, but something like this might be somehow related:
> >     https://patchwork.kernel.org/patch/7960811/
> > 
> > As a random thing to check, I would also advise to verify the
> > pull-up/pull-down settings for the SCLK pin.  
> 
> Where are they in mainline? The device tree file sun7i-a20.dtsi says
> SUN4I_PINCTRL_NO_PULL for spi2_pins_a - but do you mean more
> up-to-date runtime information?

Yes, you can check the exact pin settings by reading
hardware registers. Or by using the sunxi-pio tool from
https://github.com/linux-sunxi/sunxi-tools

> > And maybe as another test, change the driver to automatically
> > drive the SSEL pin instead of doing this manually.  
> 
> What should I change exactly?

"Patching the driver (again, only as a troubleshooting experiment)
should be relatively easy: the code that changes the CS pin state just
needs to be commented out and the manual mode disabled."

> I see that the patch changed it to manual slave selection -
> I can try to revert that one.

Still you can first try to just experiment with the SCLK and SSEL
pins alone via GPIO, even without SPI. Try to assert the SSEL pin
and check what happens to the SCLK pin.

You can also have a look at the schematics of your slave device.
I suspect that there might be a pull-down resistor on the SCLK line.
You mentioned that the polarity settings are somewhat unusual. Maybe
the slave device expects the SCLK line to be initially low?

-- 
Best regards,
Siarhei Siamashka

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to