atmel,at91-pio4-pinctrl.txt 1.4 KB

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