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