blob: 9252dc154e996fc401c571e1345dc106f3818e05 [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.
Eugen Hristev386d5302021-01-05 10:50:06 +020031- atmel,drive-strength: 0 or 1 for low drive, 2 for medium drive and 3 for
32high drive. The default value is low drive.
Wenyou Yang382d5622016-07-20 17:16:28 +080033
34Example:
35
36#include <sama5d2-pinfunc.h>
37
38...
39{
40 spi0: spi@f8000000 {
41 cs-gpios = <&pioA 17 0>, <0>, <0>, <0>;
42 pinctrl-names = "default";
43 pinctrl-0 = <&pinctrl_spi0_default>;
44 status = "okay";
45
46 spi_flash@0 {
Neil Armstrong2da69a82019-02-10 10:16:23 +000047 compatible = "jedec,spi-nor";
Wenyou Yang382d5622016-07-20 17:16:28 +080048 reg = <0>;
49 spi-max-frequency = <50000000>;
50 };
51 };
52
53 ...
54
55 pioA: pinctrl@fc038000 {
56 compatible = "atmel,sama5d2-pinctrl";
57 reg = <0xfc038000 0x600>;
58
59 pinctrl_spi0_default: spi0_default {
60 pinmux = <PIN_PA14__SPI0_SPCK>,
61 <PIN_PA15__SPI0_MOSI>,
62 <PIN_PA16__SPI0_MISO>;
63 bias-disable;
64 };
65 ...
66 };
67};
68...