atmel-flexcom.txt 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. * Device tree bindings for Atmel Flexcom (Flexible Serial Communication Unit)
  2. The Atmel Flexcom is just a wrapper which embeds a SPI controller, an I2C
  3. controller and an USART. Only one function can be used at a time and is chosen
  4. at boot time according to the device tree.
  5. Required properties:
  6. - compatible: Should be "atmel,sama5d2-flexcom"
  7. - reg: Should be the offset/length value for Flexcom dedicated
  8. I/O registers (without USART, TWI or SPI registers).
  9. - clocks: Should be the Flexcom peripheral clock from PMC.
  10. - #address-cells: Should be <1>
  11. - #size-cells: Should be <1>
  12. - ranges: Should be one range for the full I/O register region
  13. (including USART, TWI and SPI registers).
  14. - atmel,flexcom-mode: Should be one of the following values:
  15. - <1> for USART
  16. - <2> for SPI
  17. - <3> for I2C
  18. Required child:
  19. A single available child device of type matching the "atmel,flexcom-mode"
  20. property.
  21. The phandle provided by the clocks property of the child is the same as one for
  22. the Flexcom parent.
  23. For other properties, please refer to the documentations of the respective
  24. device:
  25. - ../serial/atmel-usart.txt
  26. - ../spi/spi_atmel.txt
  27. - ../i2c/i2c-at91.txt
  28. Example:
  29. flexcom@f8034000 {
  30. compatible = "atmel,sama5d2-flexcom";
  31. reg = <0xf8034000 0x200>;
  32. clocks = <&flx0_clk>;
  33. #address-cells = <1>;
  34. #size-cells = <1>;
  35. ranges = <0x0 0xf8034000 0x800>;
  36. atmel,flexcom-mode = <2>;
  37. spi@400 {
  38. compatible = "atmel,at91rm9200-spi";
  39. reg = <0x400 0x200>;
  40. interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>;
  41. pinctrl-names = "default";
  42. pinctrl-0 = <&pinctrl_flx0_default>;
  43. #address-cells = <1>;
  44. #size-cells = <0>;
  45. clocks = <&flx0_clk>;
  46. clock-names = "spi_clk";
  47. atmel,fifo-size = <32>;
  48. mtd_dataflash@0 {
  49. compatible = "atmel,at25f512b";
  50. reg = <0>;
  51. spi-max-frequency = <20000000>;
  52. };
  53. };
  54. };