Back to home page

OSCL-LXR

 
 

    


0001 * Device tree bindings for Atmel Flexcom (Flexible Serial Communication Unit)
0002 
0003 The Atmel Flexcom is just a wrapper which embeds a SPI controller, an I2C
0004 controller and an USART. Only one function can be used at a time and is chosen
0005 at boot time according to the device tree.
0006 
0007 Required properties:
0008 - compatible:           Should be "atmel,sama5d2-flexcom"
0009 - reg:                  Should be the offset/length value for Flexcom dedicated
0010                         I/O registers (without USART, TWI or SPI registers).
0011 - clocks:               Should be the Flexcom peripheral clock from PMC.
0012 - #address-cells:       Should be <1>
0013 - #size-cells:          Should be <1>
0014 - ranges:               Should be one range for the full I/O register region
0015                         (including USART, TWI and SPI registers).
0016 - atmel,flexcom-mode:   Should be one of the following values:
0017                         - <1> for USART
0018                         - <2> for SPI
0019                         - <3> for I2C
0020 
0021 Required child:
0022 A single available child device of type matching the "atmel,flexcom-mode"
0023 property.
0024 
0025 The phandle provided by the clocks property of the child is the same as one for
0026 the Flexcom parent.
0027 
0028 For other properties, please refer to the documentations of the respective
0029 device:
0030 - ../serial/atmel-usart.txt
0031 - ../spi/spi_atmel.txt
0032 - ../i2c/i2c-at91.txt
0033 
0034 Example:
0035 
0036 flexcom@f8034000 {
0037         compatible = "atmel,sama5d2-flexcom";
0038         reg = <0xf8034000 0x200>;
0039         clocks = <&flx0_clk>;
0040         #address-cells = <1>;
0041         #size-cells = <1>;
0042         ranges = <0x0 0xf8034000 0x800>;
0043         atmel,flexcom-mode = <2>;
0044 
0045         spi@400 {
0046                 compatible = "atmel,at91rm9200-spi";
0047                 reg = <0x400 0x200>;
0048                 interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>;
0049                 pinctrl-names = "default";
0050                 pinctrl-0 = <&pinctrl_flx0_default>;
0051                 #address-cells = <1>;
0052                 #size-cells = <0>;
0053                 clocks = <&flx0_clk>;
0054                 clock-names = "spi_clk";
0055                 atmel,fifo-size = <32>;
0056 
0057                 flash@0 {
0058                         compatible = "atmel,at25f512b";
0059                         reg = <0>;
0060                         spi-max-frequency = <20000000>;
0061                 };
0062         };
0063 };