162306a36Sopenharmony_ci=== ST Microelectronics SPEAr SPI CS Driver === 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciSPEAr platform provides a provision to control chipselects of ARM PL022 Prime 462306a36Sopenharmony_ciCell spi controller through its system registers, which otherwise remains under 562306a36Sopenharmony_ciPL022 control. If chipselect remain under PL022 control then they would be 662306a36Sopenharmony_cireleased as soon as transfer is over and TxFIFO becomes empty. This is not 762306a36Sopenharmony_cidesired by some of the device protocols above spi which expect (multiple) 862306a36Sopenharmony_citransfers without releasing their chipselects. 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ciChipselects can be controlled by software by turning them as GPIOs. SPEAr 1162306a36Sopenharmony_ciprovides another interface through system registers through which software can 1262306a36Sopenharmony_cidirectly control each PL022 chipselect. Hence, it is natural for SPEAr to export 1362306a36Sopenharmony_cithe control of this interface as gpio. 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ciRequired properties: 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci * compatible: should be defined as "st,spear-spics-gpio" 1862306a36Sopenharmony_ci * reg: mentioning address range of spics controller 1962306a36Sopenharmony_ci * st-spics,peripcfg-reg: peripheral configuration register offset 2062306a36Sopenharmony_ci * st-spics,sw-enable-bit: bit offset to enable sw control 2162306a36Sopenharmony_ci * st-spics,cs-value-bit: bit offset to drive chipselect low or high 2262306a36Sopenharmony_ci * st-spics,cs-enable-mask: chip select number bit mask 2362306a36Sopenharmony_ci * st-spics,cs-enable-shift: chip select number program offset 2462306a36Sopenharmony_ci * gpio-controller: Marks the device node as gpio controller 2562306a36Sopenharmony_ci * #gpio-cells: should be 1 and will mention chip select number 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ciAll the above bit offsets are within peripcfg register. 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ciExample: 3062306a36Sopenharmony_ci------- 3162306a36Sopenharmony_cispics: spics@e0700000{ 3262306a36Sopenharmony_ci compatible = "st,spear-spics-gpio"; 3362306a36Sopenharmony_ci reg = <0xe0700000 0x1000>; 3462306a36Sopenharmony_ci st-spics,peripcfg-reg = <0x3b0>; 3562306a36Sopenharmony_ci st-spics,sw-enable-bit = <12>; 3662306a36Sopenharmony_ci st-spics,cs-value-bit = <11>; 3762306a36Sopenharmony_ci st-spics,cs-enable-mask = <3>; 3862306a36Sopenharmony_ci st-spics,cs-enable-shift = <8>; 3962306a36Sopenharmony_ci gpio-controller; 4062306a36Sopenharmony_ci #gpio-cells = <2>; 4162306a36Sopenharmony_ci}; 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_cispi0: spi@e0100000 { 4562306a36Sopenharmony_ci num-cs = <3>; 4662306a36Sopenharmony_ci cs-gpios = <&gpio1 7 0>, <&spics 0>, 4762306a36Sopenharmony_ci <&spics 1>; 4862306a36Sopenharmony_ci ... 4962306a36Sopenharmony_ci} 50