blob: a1b559668ff76fdf8bce7c962b88aab2d509c792 [file] [log] [blame]
Wenyou Yang382d5622016-07-20 17:16:28 +08001* Atmel PIO4 Controller
2
3The Atmel PIO4 controller is used to select the function of a pin and to
4configure it.
5
6Required properties:
7- compatible: "atmel,sama5d2-pinctrl".
8- reg: base address and length of the PIO controller.
9
10Please refer to pinctrl-bindings.txt in this directory for details of the
11common pinctrl bindings used by client devices.
12
13Subnode format
14Each node (or subnode) will list the pins it needs and how to configured these
15pins.
16
17 node {
18 pinmux = <PIN_NUMBER_PINMUX>;
19 GENERIC_PINCONFIG;
20 };
21
22Required properties:
23- pinmux: integer array. Each integer represents a pin number plus mux and
24ioset settings. Use the macros from boot/dts/<soc>-pinfunc.h file to get the
25right representation of the pin.
26
27Optional properties:
28- GENERIC_PINCONFIG: generic pinconfig options to use, bias-disable,
29bias-pull-down, bias-pull-up, drive-open-drain, input-schmitt-enable,
30input-debounce.
31
32Example:
33
34#include <sama5d2-pinfunc.h>
35
36...
37{
38 spi0: spi@f8000000 {
39 cs-gpios = <&pioA 17 0>, <0>, <0>, <0>;
40 pinctrl-names = "default";
41 pinctrl-0 = <&pinctrl_spi0_default>;
42 status = "okay";
43
44 spi_flash@0 {
45 compatible = "spi-flash";
46 reg = <0>;
47 spi-max-frequency = <50000000>;
48 };
49 };
50
51 ...
52
53 pioA: pinctrl@fc038000 {
54 compatible = "atmel,sama5d2-pinctrl";
55 reg = <0xfc038000 0x600>;
56
57 pinctrl_spi0_default: spi0_default {
58 pinmux = <PIN_PA14__SPI0_SPCK>,
59 <PIN_PA15__SPI0_MOSI>,
60 <PIN_PA16__SPI0_MISO>;
61 bias-disable;
62 };
63 ...
64 };
65};
66...