microchip,pic32-pinctrl.txt 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. * Microchip PIC32 Pin Controller
  2. Please refer to pinctrl-bindings.txt, ../gpio/gpio.txt, and
  3. ../interrupt-controller/interrupts.txt for generic information regarding
  4. pin controller, GPIO, and interrupt bindings.
  5. PIC32 'pin configuration node' is a node of a group of pins which can be
  6. used for a specific device or function. This node represents configuraions of
  7. pins, optional function, and optional mux related configuration.
  8. Required properties for pin controller node:
  9. - compatible: "microchip,pic32mada-pinctrl"
  10. - reg: Address range of the pinctrl registers.
  11. - clocks: Clock specifier (see clock bindings for details)
  12. Required properties for pin configuration sub-nodes:
  13. - pins: List of pins to which the configuration applies.
  14. Optional properties for pin configuration sub-nodes:
  15. ----------------------------------------------------
  16. - function: Mux function for the specified pins.
  17. - bias-pull-up: Enable weak pull-up.
  18. - bias-pull-down: Enable weak pull-down.
  19. - input-enable: Set the pin as an input.
  20. - output-low: Set the pin as an output level low.
  21. - output-high: Set the pin as an output level high.
  22. - microchip,digital: Enable digital I/O.
  23. - microchip,analog: Enable analog I/O.
  24. Example:
  25. pic32_pinctrl: pinctrl@1f801400{
  26. #address-cells = <1>;
  27. #size-cells = <1>;
  28. compatible = "microchip,pic32mzda-pinctrl";
  29. reg = <0x1f801400 0x400>;
  30. clocks = <&rootclk PB1CLK>;
  31. pinctrl_uart2: pinctrl_uart2 {
  32. uart2-tx {
  33. pins = "G9";
  34. function = "U2TX";
  35. microchip,digital;
  36. output-low;
  37. };
  38. uart2-rx {
  39. pins = "B0";
  40. function = "U2RX";
  41. microchip,digital;
  42. input-enable;
  43. };
  44. };
  45. };
  46. uart2: serial@1f822200 {
  47. compatible = "microchip,pic32mzda-uart";
  48. reg = <0x1f822200 0x50>;
  49. pinctrl-names = "default";
  50. pinctrl-0 = <&pinctrl_uart2>;
  51. };