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