1*833e5d42SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*833e5d42SEmmanuel Vadot%YAML 1.2 3*833e5d42SEmmanuel Vadot--- 4*833e5d42SEmmanuel Vadot$id: http://devicetree.org/schemas/gpio/st,spear-spics-gpio.yaml# 5*833e5d42SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*833e5d42SEmmanuel Vadot 7*833e5d42SEmmanuel Vadottitle: ST Microelectronics SPEAr SPI CS GPIO Controller 8*833e5d42SEmmanuel Vadot 9*833e5d42SEmmanuel Vadotmaintainers: 10*833e5d42SEmmanuel Vadot - Viresh Kumar <vireshk@kernel.org> 11*833e5d42SEmmanuel Vadot 12*833e5d42SEmmanuel Vadotdescription: > 13*833e5d42SEmmanuel Vadot SPEAr platform provides a provision to control chipselects of ARM PL022 Prime 14*833e5d42SEmmanuel Vadot Cell spi controller through its system registers, which otherwise remains 15*833e5d42SEmmanuel Vadot under PL022 control. If chipselect remain under PL022 control then they would 16*833e5d42SEmmanuel Vadot be released as soon as transfer is over and TxFIFO becomes empty. This is not 17*833e5d42SEmmanuel Vadot desired by some of the device protocols above spi which expect (multiple) 18*833e5d42SEmmanuel Vadot transfers without releasing their chipselects. 19*833e5d42SEmmanuel Vadot 20*833e5d42SEmmanuel Vadot Chipselects can be controlled by software by turning them as GPIOs. SPEAr 21*833e5d42SEmmanuel Vadot provides another interface through system registers through which software can 22*833e5d42SEmmanuel Vadot directly control each PL022 chipselect. Hence, it is natural for SPEAr to 23*833e5d42SEmmanuel Vadot export the control of this interface as gpio. 24*833e5d42SEmmanuel Vadot 25*833e5d42SEmmanuel Vadotproperties: 26*833e5d42SEmmanuel Vadot compatible: 27*833e5d42SEmmanuel Vadot const: st,spear-spics-gpio 28*833e5d42SEmmanuel Vadot 29*833e5d42SEmmanuel Vadot reg: 30*833e5d42SEmmanuel Vadot maxItems: 1 31*833e5d42SEmmanuel Vadot 32*833e5d42SEmmanuel Vadot gpio-controller: true 33*833e5d42SEmmanuel Vadot 34*833e5d42SEmmanuel Vadot '#gpio-cells': 35*833e5d42SEmmanuel Vadot const: 2 36*833e5d42SEmmanuel Vadot 37*833e5d42SEmmanuel Vadot st-spics,peripcfg-reg: 38*833e5d42SEmmanuel Vadot description: Offset of the peripcfg register. 39*833e5d42SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 40*833e5d42SEmmanuel Vadot 41*833e5d42SEmmanuel Vadot st-spics,sw-enable-bit: 42*833e5d42SEmmanuel Vadot description: Bit offset to enable software chipselect control. 43*833e5d42SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 44*833e5d42SEmmanuel Vadot 45*833e5d42SEmmanuel Vadot st-spics,cs-value-bit: 46*833e5d42SEmmanuel Vadot description: Bit offset to drive chipselect low or high. 47*833e5d42SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 48*833e5d42SEmmanuel Vadot 49*833e5d42SEmmanuel Vadot st-spics,cs-enable-mask: 50*833e5d42SEmmanuel Vadot description: Bitmask selecting which chipselects to enable. 51*833e5d42SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 52*833e5d42SEmmanuel Vadot 53*833e5d42SEmmanuel Vadot st-spics,cs-enable-shift: 54*833e5d42SEmmanuel Vadot description: Bit shift for programming chipselect number. 55*833e5d42SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 56*833e5d42SEmmanuel Vadot 57*833e5d42SEmmanuel Vadotrequired: 58*833e5d42SEmmanuel Vadot - compatible 59*833e5d42SEmmanuel Vadot - reg 60*833e5d42SEmmanuel Vadot - gpio-controller 61*833e5d42SEmmanuel Vadot - '#gpio-cells' 62*833e5d42SEmmanuel Vadot - st-spics,peripcfg-reg 63*833e5d42SEmmanuel Vadot - st-spics,sw-enable-bit 64*833e5d42SEmmanuel Vadot - st-spics,cs-value-bit 65*833e5d42SEmmanuel Vadot - st-spics,cs-enable-mask 66*833e5d42SEmmanuel Vadot - st-spics,cs-enable-shift 67*833e5d42SEmmanuel Vadot 68*833e5d42SEmmanuel VadotadditionalProperties: false 69*833e5d42SEmmanuel Vadot 70*833e5d42SEmmanuel Vadotexamples: 71*833e5d42SEmmanuel Vadot - | 72*833e5d42SEmmanuel Vadot gpio@e0700000 { 73*833e5d42SEmmanuel Vadot compatible = "st,spear-spics-gpio"; 74*833e5d42SEmmanuel Vadot reg = <0xe0700000 0x1000>; 75*833e5d42SEmmanuel Vadot st-spics,peripcfg-reg = <0x3b0>; 76*833e5d42SEmmanuel Vadot st-spics,sw-enable-bit = <12>; 77*833e5d42SEmmanuel Vadot st-spics,cs-value-bit = <11>; 78*833e5d42SEmmanuel Vadot st-spics,cs-enable-mask = <3>; 79*833e5d42SEmmanuel Vadot st-spics,cs-enable-shift = <8>; 80*833e5d42SEmmanuel Vadot gpio-controller; 81*833e5d42SEmmanuel Vadot #gpio-cells = <2>; 82*833e5d42SEmmanuel Vadot }; 83