]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: zynq: configure SPI SSx pins separately
authorHelmut Buchsbaum <helmut.buchsbaum@gmail.com>
Sun, 26 Apr 2015 09:32:47 +0000 (11:32 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 6 May 2015 13:26:52 +0000 (15:26 +0200)
commitf79c09f88587679f814b62cc7949c6066ed32ebd
tree1676a94e6437fd984085d121cb1cc1d9103364a3
parent1172f8a68f40b534a5b4570b072a94099249575b
pinctrl: zynq: configure SPI SSx pins separately

Since SCLK, MISO and MOSI are the only mandatory signals at Zynq's SPI
interfaces, SS0, SS1 and SS2 have to be configured separately as they may
be used as simple GPIO lines.

This, of course, has to be considered in the devicetree, so pin controller
configuration for e.g. an SPI0 using SS0 and SS1 only might look like the
following snippet (derived from the example of chapter "17.5.3
MIO/EMIO" Routing of Zynq-7000 TRM UG585). So MIO20 can now be used
as GPIO instead of being occupied by SPI0 SS2 function. Note the separate
pinmux function for the slave select signals:

pinctrl_spi0_default: spi0-default {
mux_spi {
function = "spi0";
groups = "spi0_0_grp";
};

mux_ss {
function = "spi0_ss";
groups = "spi0_0_ss0_grp", "spi0_0_ss1_grp";
}

conf-output {
pins = "MIO16", "MIO21";
slew-rate = <0>;
bias-disable;
low-power-disable;
io-standard = <1>;
};

conf-input {
pins = "MIO17";
slew-rate = <0>;
bias-high-impedance;
low-power-disable;
io-standard = <1>;
};

conf-select {
pins = "MIO18", "MIO19";
slew-rate = <0>;
bias-pull-up;
low-power-disable;
io-standard = <1>;
};
};

pinctrl_gpio0_default {
mux {
function = "gpio0";
groups = "gpio0_20_grp"
};

conf {
pins = "MIO20";
slew-rate = <0>;
bias-pull-up;
low-power-disable;
io-standard = <1>;
};
};

Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@gmail.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Documentation/devicetree/bindings/pinctrl/xlnx,zynq-pinctrl.txt
drivers/pinctrl/pinctrl-zynq.c