18c2ecf20Sopenharmony_ci* Device tree bindings for Atmel Flexcom (Flexible Serial Communication Unit)
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThe Atmel Flexcom is just a wrapper which embeds a SPI controller, an I2C
48c2ecf20Sopenharmony_cicontroller and an USART. Only one function can be used at a time and is chosen
58c2ecf20Sopenharmony_ciat boot time according to the device tree.
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciRequired properties:
88c2ecf20Sopenharmony_ci- compatible:		Should be "atmel,sama5d2-flexcom"
98c2ecf20Sopenharmony_ci- reg:			Should be the offset/length value for Flexcom dedicated
108c2ecf20Sopenharmony_ci			I/O registers (without USART, TWI or SPI registers).
118c2ecf20Sopenharmony_ci- clocks:		Should be the Flexcom peripheral clock from PMC.
128c2ecf20Sopenharmony_ci- #address-cells:	Should be <1>
138c2ecf20Sopenharmony_ci- #size-cells:		Should be <1>
148c2ecf20Sopenharmony_ci- ranges:		Should be one range for the full I/O register region
158c2ecf20Sopenharmony_ci			(including USART, TWI and SPI registers).
168c2ecf20Sopenharmony_ci- atmel,flexcom-mode:	Should be one of the following values:
178c2ecf20Sopenharmony_ci			- <1> for USART
188c2ecf20Sopenharmony_ci			- <2> for SPI
198c2ecf20Sopenharmony_ci			- <3> for I2C
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciRequired child:
228c2ecf20Sopenharmony_ciA single available child device of type matching the "atmel,flexcom-mode"
238c2ecf20Sopenharmony_ciproperty.
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ciThe phandle provided by the clocks property of the child is the same as one for
268c2ecf20Sopenharmony_cithe Flexcom parent.
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ciFor other properties, please refer to the documentations of the respective
298c2ecf20Sopenharmony_cidevice:
308c2ecf20Sopenharmony_ci- ../serial/atmel-usart.txt
318c2ecf20Sopenharmony_ci- ../spi/spi_atmel.txt
328c2ecf20Sopenharmony_ci- ../i2c/i2c-at91.txt
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ciExample:
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ciflexcom@f8034000 {
378c2ecf20Sopenharmony_ci	compatible = "atmel,sama5d2-flexcom";
388c2ecf20Sopenharmony_ci	reg = <0xf8034000 0x200>;
398c2ecf20Sopenharmony_ci	clocks = <&flx0_clk>;
408c2ecf20Sopenharmony_ci	#address-cells = <1>;
418c2ecf20Sopenharmony_ci	#size-cells = <1>;
428c2ecf20Sopenharmony_ci	ranges = <0x0 0xf8034000 0x800>;
438c2ecf20Sopenharmony_ci	atmel,flexcom-mode = <2>;
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci	spi@400 {
468c2ecf20Sopenharmony_ci		compatible = "atmel,at91rm9200-spi";
478c2ecf20Sopenharmony_ci		reg = <0x400 0x200>;
488c2ecf20Sopenharmony_ci		interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>;
498c2ecf20Sopenharmony_ci		pinctrl-names = "default";
508c2ecf20Sopenharmony_ci		pinctrl-0 = <&pinctrl_flx0_default>;
518c2ecf20Sopenharmony_ci		#address-cells = <1>;
528c2ecf20Sopenharmony_ci		#size-cells = <0>;
538c2ecf20Sopenharmony_ci		clocks = <&flx0_clk>;
548c2ecf20Sopenharmony_ci		clock-names = "spi_clk";
558c2ecf20Sopenharmony_ci		atmel,fifo-size = <32>;
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ci		mtd_dataflash@0 {
588c2ecf20Sopenharmony_ci			compatible = "atmel,at25f512b";
598c2ecf20Sopenharmony_ci			reg = <0>;
608c2ecf20Sopenharmony_ci			spi-max-frequency = <20000000>;
618c2ecf20Sopenharmony_ci		};
628c2ecf20Sopenharmony_ci	};
638c2ecf20Sopenharmony_ci};
64