1d5b0e70fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2d5b0e70fSEmmanuel Vadot%YAML 1.2 3d5b0e70fSEmmanuel Vadot--- 4d5b0e70fSEmmanuel Vadot$id: http://devicetree.org/schemas/spi/qcom,spi-geni-qcom.yaml# 5d5b0e70fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6d5b0e70fSEmmanuel Vadot 7d5b0e70fSEmmanuel Vadottitle: GENI based Qualcomm Universal Peripheral (QUP) Serial Peripheral Interface (SPI) 8d5b0e70fSEmmanuel Vadot 9d5b0e70fSEmmanuel Vadotmaintainers: 10d5b0e70fSEmmanuel Vadot - Andy Gross <agross@kernel.org> 11d5b0e70fSEmmanuel Vadot - Bjorn Andersson <bjorn.andersson@linaro.org> 12d5b0e70fSEmmanuel Vadot - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 13d5b0e70fSEmmanuel Vadot 14d5b0e70fSEmmanuel Vadotdescription: 15d5b0e70fSEmmanuel Vadot The QUP v3 core is a GENI based AHB slave that provides a common data path 16d5b0e70fSEmmanuel Vadot (an output FIFO and an input FIFO) for serial peripheral interface (SPI) 17d5b0e70fSEmmanuel Vadot mini-core. 18d5b0e70fSEmmanuel Vadot 19d5b0e70fSEmmanuel Vadot SPI in master mode supports up to 50MHz, up to four chip selects, 20d5b0e70fSEmmanuel Vadot programmable data path from 4 bits to 32 bits and numerous protocol variants. 21d5b0e70fSEmmanuel Vadot 22d5b0e70fSEmmanuel Vadot SPI Controller nodes must be child of GENI based Qualcomm Universal 23d5b0e70fSEmmanuel Vadot Peripharal. Please refer GENI based QUP wrapper controller node bindings 24d5b0e70fSEmmanuel Vadot described in Documentation/devicetree/bindings/soc/qcom/qcom,geni-se.yaml. 25d5b0e70fSEmmanuel Vadot 26d5b0e70fSEmmanuel VadotallOf: 27d5b0e70fSEmmanuel Vadot - $ref: /schemas/spi/spi-controller.yaml# 28d5b0e70fSEmmanuel Vadot 29d5b0e70fSEmmanuel Vadotproperties: 30d5b0e70fSEmmanuel Vadot compatible: 31d5b0e70fSEmmanuel Vadot const: qcom,geni-spi 32d5b0e70fSEmmanuel Vadot 33d5b0e70fSEmmanuel Vadot clocks: 34d5b0e70fSEmmanuel Vadot maxItems: 1 35d5b0e70fSEmmanuel Vadot 36d5b0e70fSEmmanuel Vadot clock-names: 37d5b0e70fSEmmanuel Vadot const: se 38d5b0e70fSEmmanuel Vadot 39d5b0e70fSEmmanuel Vadot dmas: 40d5b0e70fSEmmanuel Vadot maxItems: 2 41d5b0e70fSEmmanuel Vadot 42d5b0e70fSEmmanuel Vadot dma-names: 43d5b0e70fSEmmanuel Vadot items: 44d5b0e70fSEmmanuel Vadot - const: tx 45d5b0e70fSEmmanuel Vadot - const: rx 46d5b0e70fSEmmanuel Vadot 47d5b0e70fSEmmanuel Vadot interconnects: 48*b97ee269SEmmanuel Vadot minItems: 2 49*b97ee269SEmmanuel Vadot maxItems: 3 50d5b0e70fSEmmanuel Vadot 51d5b0e70fSEmmanuel Vadot interconnect-names: 52*b97ee269SEmmanuel Vadot minItems: 2 53d5b0e70fSEmmanuel Vadot items: 54d5b0e70fSEmmanuel Vadot - const: qup-core 55d5b0e70fSEmmanuel Vadot - const: qup-config 56*b97ee269SEmmanuel Vadot - const: qup-memory 57d5b0e70fSEmmanuel Vadot 58d5b0e70fSEmmanuel Vadot interrupts: 59d5b0e70fSEmmanuel Vadot maxItems: 1 60d5b0e70fSEmmanuel Vadot 61d5b0e70fSEmmanuel Vadot operating-points-v2: true 62d5b0e70fSEmmanuel Vadot 63d5b0e70fSEmmanuel Vadot power-domains: 64d5b0e70fSEmmanuel Vadot maxItems: 1 65d5b0e70fSEmmanuel Vadot 66d5b0e70fSEmmanuel Vadot reg: 67d5b0e70fSEmmanuel Vadot maxItems: 1 68d5b0e70fSEmmanuel Vadot 69d5b0e70fSEmmanuel Vadotrequired: 70d5b0e70fSEmmanuel Vadot - compatible 71d5b0e70fSEmmanuel Vadot - clocks 72d5b0e70fSEmmanuel Vadot - clock-names 73d5b0e70fSEmmanuel Vadot - interrupts 74d5b0e70fSEmmanuel Vadot - reg 75d5b0e70fSEmmanuel Vadot 76d5b0e70fSEmmanuel VadotunevaluatedProperties: false 77d5b0e70fSEmmanuel Vadot 78d5b0e70fSEmmanuel Vadotexamples: 79d5b0e70fSEmmanuel Vadot - | 80d5b0e70fSEmmanuel Vadot #include <dt-bindings/clock/qcom,gcc-sc7180.h> 81d5b0e70fSEmmanuel Vadot #include <dt-bindings/interconnect/qcom,sc7180.h> 82d5b0e70fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 83d5b0e70fSEmmanuel Vadot #include <dt-bindings/power/qcom-rpmpd.h> 84d5b0e70fSEmmanuel Vadot 85d5b0e70fSEmmanuel Vadot spi@880000 { 86d5b0e70fSEmmanuel Vadot compatible = "qcom,geni-spi"; 87d5b0e70fSEmmanuel Vadot reg = <0x00880000 0x4000>; 88d5b0e70fSEmmanuel Vadot clock-names = "se"; 89d5b0e70fSEmmanuel Vadot clocks = <&gcc GCC_QUPV3_WRAP0_S0_CLK>; 90d5b0e70fSEmmanuel Vadot pinctrl-names = "default"; 91d5b0e70fSEmmanuel Vadot pinctrl-0 = <&qup_spi0_default>; 92d5b0e70fSEmmanuel Vadot interrupts = <GIC_SPI 601 IRQ_TYPE_LEVEL_HIGH>; 93d5b0e70fSEmmanuel Vadot #address-cells = <1>; 94d5b0e70fSEmmanuel Vadot #size-cells = <0>; 95d5b0e70fSEmmanuel Vadot power-domains = <&rpmhpd SC7180_CX>; 96d5b0e70fSEmmanuel Vadot operating-points-v2 = <&qup_opp_table>; 97d5b0e70fSEmmanuel Vadot interconnects = <&qup_virt MASTER_QUP_CORE_0 0 &qup_virt SLAVE_QUP_CORE_0 0>, 98d5b0e70fSEmmanuel Vadot <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_0 0>; 99d5b0e70fSEmmanuel Vadot interconnect-names = "qup-core", "qup-config"; 100d5b0e70fSEmmanuel Vadot }; 101d5b0e70fSEmmanuel Vadot 102d5b0e70fSEmmanuel Vadot - | 103d5b0e70fSEmmanuel Vadot #include <dt-bindings/dma/qcom-gpi.h> 104d5b0e70fSEmmanuel Vadot 105d5b0e70fSEmmanuel Vadot spi@884000 { 106d5b0e70fSEmmanuel Vadot compatible = "qcom,geni-spi"; 107d5b0e70fSEmmanuel Vadot reg = <0x00884000 0x4000>; 108d5b0e70fSEmmanuel Vadot clock-names = "se"; 109d5b0e70fSEmmanuel Vadot clocks = <&gcc GCC_QUPV3_WRAP0_S1_CLK>; 110d5b0e70fSEmmanuel Vadot dmas = <&gpi_dma0 0 1 QCOM_GPI_SPI>, 111d5b0e70fSEmmanuel Vadot <&gpi_dma0 1 1 QCOM_GPI_SPI>; 112d5b0e70fSEmmanuel Vadot dma-names = "tx", "rx"; 113d5b0e70fSEmmanuel Vadot pinctrl-names = "default"; 114d5b0e70fSEmmanuel Vadot pinctrl-0 = <&qup_spi1_default>; 115d5b0e70fSEmmanuel Vadot interrupts = <GIC_SPI 602 IRQ_TYPE_LEVEL_HIGH>; 116d5b0e70fSEmmanuel Vadot #address-cells = <1>; 117d5b0e70fSEmmanuel Vadot #size-cells = <0>; 118d5b0e70fSEmmanuel Vadot }; 119