blob: 6e936a08b6cad6d055c1cf85f5eb82a3e27eed54 [file] [log] [blame]
Wenyou Yang256a3f22016-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:
Claudiu Bezneaf031bb32021-01-27 15:00:29 +020028- GENERIC_PINCONFIG: generic pinconfig options to use:
29 - bias-disable, bias-pull-down, bias-pull-up, drive-open-drain,
30 input-schmitt-enable, input-debounce
31 - slew-rate: 0 - disabled, 1 - enabled (default)
Eugen Hristev63c27c32021-01-05 10:50:06 +020032- atmel,drive-strength: 0 or 1 for low drive, 2 for medium drive and 3 for
33high drive. The default value is low drive.
Wenyou Yang256a3f22016-07-20 17:16:28 +080034
35Example:
36
37#include <sama5d2-pinfunc.h>
38
39...
40{
41 spi0: spi@f8000000 {
42 cs-gpios = <&pioA 17 0>, <0>, <0>, <0>;
43 pinctrl-names = "default";
44 pinctrl-0 = <&pinctrl_spi0_default>;
45 status = "okay";
46
47 spi_flash@0 {
Neil Armstrong5991d0e2019-02-10 10:16:23 +000048 compatible = "jedec,spi-nor";
Wenyou Yang256a3f22016-07-20 17:16:28 +080049 reg = <0>;
50 spi-max-frequency = <50000000>;
51 };
52 };
53
54 ...
55
56 pioA: pinctrl@fc038000 {
57 compatible = "atmel,sama5d2-pinctrl";
58 reg = <0xfc038000 0x600>;
59
60 pinctrl_spi0_default: spi0_default {
61 pinmux = <PIN_PA14__SPI0_SPCK>,
62 <PIN_PA15__SPI0_MOSI>,
63 <PIN_PA16__SPI0_MISO>;
64 bias-disable;
65 };
66 ...
67 };
68};
69...