162306a36Sopenharmony_ci* Device tree bindings for Atmel Flexcom (Flexible Serial Communication Unit) 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciThe Atmel Flexcom is just a wrapper which embeds a SPI controller, an I2C 462306a36Sopenharmony_cicontroller and an USART. Only one function can be used at a time and is chosen 562306a36Sopenharmony_ciat boot time according to the device tree. 662306a36Sopenharmony_ci 762306a36Sopenharmony_ciRequired properties: 862306a36Sopenharmony_ci- compatible: Should be "atmel,sama5d2-flexcom" 962306a36Sopenharmony_ci or "microchip,sam9x7-flexcom", "atmel,sama5d2-flexcom" 1062306a36Sopenharmony_ci- reg: Should be the offset/length value for Flexcom dedicated 1162306a36Sopenharmony_ci I/O registers (without USART, TWI or SPI registers). 1262306a36Sopenharmony_ci- clocks: Should be the Flexcom peripheral clock from PMC. 1362306a36Sopenharmony_ci- #address-cells: Should be <1> 1462306a36Sopenharmony_ci- #size-cells: Should be <1> 1562306a36Sopenharmony_ci- ranges: Should be one range for the full I/O register region 1662306a36Sopenharmony_ci (including USART, TWI and SPI registers). 1762306a36Sopenharmony_ci- atmel,flexcom-mode: Should be one of the following values: 1862306a36Sopenharmony_ci - <1> for USART 1962306a36Sopenharmony_ci - <2> for SPI 2062306a36Sopenharmony_ci - <3> for I2C 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ciRequired child: 2362306a36Sopenharmony_ciA single available child device of type matching the "atmel,flexcom-mode" 2462306a36Sopenharmony_ciproperty. 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ciThe phandle provided by the clocks property of the child is the same as one for 2762306a36Sopenharmony_cithe Flexcom parent. 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ciFor other properties, please refer to the documentations of the respective 3062306a36Sopenharmony_cidevice: 3162306a36Sopenharmony_ci- ../serial/atmel-usart.txt 3262306a36Sopenharmony_ci- ../spi/spi_atmel.txt 3362306a36Sopenharmony_ci- ../i2c/i2c-at91.txt 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ciExample: 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ciflexcom@f8034000 { 3862306a36Sopenharmony_ci compatible = "atmel,sama5d2-flexcom"; 3962306a36Sopenharmony_ci reg = <0xf8034000 0x200>; 4062306a36Sopenharmony_ci clocks = <&flx0_clk>; 4162306a36Sopenharmony_ci #address-cells = <1>; 4262306a36Sopenharmony_ci #size-cells = <1>; 4362306a36Sopenharmony_ci ranges = <0x0 0xf8034000 0x800>; 4462306a36Sopenharmony_ci atmel,flexcom-mode = <2>; 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ci spi@400 { 4762306a36Sopenharmony_ci compatible = "atmel,at91rm9200-spi"; 4862306a36Sopenharmony_ci reg = <0x400 0x200>; 4962306a36Sopenharmony_ci interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>; 5062306a36Sopenharmony_ci pinctrl-names = "default"; 5162306a36Sopenharmony_ci pinctrl-0 = <&pinctrl_flx0_default>; 5262306a36Sopenharmony_ci #address-cells = <1>; 5362306a36Sopenharmony_ci #size-cells = <0>; 5462306a36Sopenharmony_ci clocks = <&flx0_clk>; 5562306a36Sopenharmony_ci clock-names = "spi_clk"; 5662306a36Sopenharmony_ci atmel,fifo-size = <32>; 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci flash@0 { 5962306a36Sopenharmony_ci compatible = "atmel,at25f512b"; 6062306a36Sopenharmony_ci reg = <0>; 6162306a36Sopenharmony_ci spi-max-frequency = <20000000>; 6262306a36Sopenharmony_ci }; 6362306a36Sopenharmony_ci }; 6462306a36Sopenharmony_ci}; 65