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