1# Copyright (c) 2018, I-SENSE group of ICCS 2# SPDX-License-Identifier: Apache-2.0 3 4# Common fields for SPI devices 5 6include: [base.yaml, power.yaml] 7 8on-bus: spi 9 10properties: 11 reg: 12 required: true 13 spi-max-frequency: 14 type: int 15 required: true 16 description: Maximum clock frequency of device's SPI interface in Hz 17 duplex: 18 type: int 19 default: 0 20 description: | 21 Duplex mode, full or half. By default it's always full duplex thus 0 22 as this is, by far, the most common mode. 23 Use the macros not the actual enum value, here is the concordance 24 list (see dt-bindings/spi/spi.h) 25 0 SPI_FULL_DUPLEX 26 2048 SPI_HALF_DUPLEX 27 enum: 28 - 0 29 - 2048 30 frame-format: 31 type: int 32 default: 0 33 description: | 34 Motorola or TI frame format. By default it's always Motorola's, 35 thus 0 as this is, by far, the most common format. 36 Use the macros not the actual enum value, here is the concordance 37 list (see dt-bindings/spi/spi.h) 38 0 SPI_FRAME_FORMAT_MOTOROLA 39 32768 SPI_FRAME_FORMAT_TI 40 enum: 41 - 0 42 - 32768 43 spi-cpol: 44 type: boolean 45 description: | 46 SPI clock polarity which indicates the clock idle state. 47 If it is used, the clock idle state is logic high; otherwise, low. 48 spi-cpha: 49 type: boolean 50 description: | 51 SPI clock phase that indicates on which edge data is sampled. 52 If it is used, data is sampled on the second edge; otherwise, on the first edge. 53 spi-hold-cs: 54 type: boolean 55 description: | 56 In some cases, it is necessary for the master to manage SPI chip select 57 under software control, so that multiple spi transactions can be performed 58 without releasing it. A typical use case is variable length SPI packets 59 where the first spi transaction reads the length and the second spi transaction 60 reads length bytes. 61