mscc_sgpio.txt 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. Microsemi Corporation (MSCC) Serial GPIO driver
  2. The MSCC serial GPIO extends the number or GPIO's on the system by
  3. means of 4 dedicated pins: one input, one output, one clock and one
  4. strobe pin. By attaching a number of (external) shift registers, the
  5. effective GPIO count can be extended by up to 128 GPIO's per
  6. controller.
  7. Required properties:
  8. - compatible : "mscc,luton-sgpio" or "mscc,ocelot-sgpio"
  9. - clock: Reference clock used to generate clock divider setting. See
  10. mscc,sgpio-frequency property.
  11. - reg : Physical base address and length of the controller's registers.
  12. - #gpio-cells : Should be two. The first cell is the pin number and the
  13. second cell is used to specify optional parameters:
  14. - bit 0 specifies polarity (0 for normal, 1 for inverted)
  15. - gpio-controller : Marks the device node as a GPIO controller.
  16. - gpio-ranges: Standard gpio range(s): phandle, gpio base, pinctrl base
  17. and count.
  18. Optional properties:
  19. - ngpios: See gpio.txt
  20. - mscc,sgpio-frequency: The frequency at which the serial bitstream is
  21. generated and sampled. Default: 12500000 (Hz).
  22. - mscc,sgpio-ports: A bitmask (32 bits) of which ports are enabled in
  23. the serialized gpio stream. One 'port' will transport from 1 to 4
  24. gpio bits. Default: 0xFFFFFFFF.
  25. Typically the pinctrl-0 and pinctrl-names properties will also be
  26. present to enable the use of the SIO CLK, LD, DI and DO for some
  27. regular GPIO pins.
  28. Example:
  29. sgpio: gpio@10700f8 {
  30. compatible = "mscc,ocelot-sgpio";
  31. pinctrl-0 = <&sgpio_pins>;
  32. pinctrl-names = "default";
  33. reg = <0x10700f8 0x100>;
  34. gpio-controller;
  35. #gpio-cells = <2>;
  36. gpio-ranges = <&sgpio 0 0 64>;
  37. mscc,sgpio-frequency = <12500>;
  38. mscc,sgpio-ports = <0x000FFFFF>;
  39. };