|
| 1 | +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) |
| 2 | +%YAML 1.2 |
| 3 | +--- |
| 4 | +$id: "http://devicetree.org/schemas/soc/qcom/qcom,geni-se.yaml#" |
| 5 | +$schema: "http://devicetree.org/meta-schemas/core.yaml#" |
| 6 | + |
| 7 | +title: GENI Serial Engine QUP Wrapper Controller |
| 8 | + |
| 9 | +maintainers: |
| 10 | + - Mukesh Savaliya <[email protected]> |
| 11 | + - Akash Asthana <[email protected]> |
| 12 | + |
| 13 | +description: | |
| 14 | + Generic Interface (GENI) based Qualcomm Universal Peripheral (QUP) wrapper |
| 15 | + is a programmable module for supporting a wide range of serial interfaces |
| 16 | + like UART, SPI, I2C, I3C, etc. A single QUP module can provide upto 8 Serial |
| 17 | + Interfaces, using its internal Serial Engines. The GENI Serial Engine QUP |
| 18 | + Wrapper controller is modeled as a node with zero or more child nodes each |
| 19 | + representing a serial engine. |
| 20 | +
|
| 21 | +properties: |
| 22 | + compatible: |
| 23 | + enum: |
| 24 | + - qcom,geni-se-qup |
| 25 | + |
| 26 | + reg: |
| 27 | + description: QUP wrapper common register address and length. |
| 28 | + maxItems: 1 |
| 29 | + |
| 30 | + clock-names: |
| 31 | + items: |
| 32 | + - const: m-ahb |
| 33 | + - const: s-ahb |
| 34 | + |
| 35 | + clocks: |
| 36 | + items: |
| 37 | + - description: Master AHB Clock |
| 38 | + - description: Slave AHB Clock |
| 39 | + |
| 40 | + "#address-cells": |
| 41 | + const: 2 |
| 42 | + |
| 43 | + "#size-cells": |
| 44 | + const: 2 |
| 45 | + |
| 46 | + ranges: true |
| 47 | + |
| 48 | +required: |
| 49 | + - compatible |
| 50 | + - reg |
| 51 | + - clock-names |
| 52 | + - clocks |
| 53 | + - "#address-cells" |
| 54 | + - "#size-cells" |
| 55 | + - ranges |
| 56 | + |
| 57 | +patternProperties: |
| 58 | + "^.*@[0-9a-f]+$": |
| 59 | + type: object |
| 60 | + description: Common properties for GENI Serial Engine based I2C, SPI and |
| 61 | + UART controller. |
| 62 | + |
| 63 | + properties: |
| 64 | + reg: |
| 65 | + description: GENI Serial Engine register address and length. |
| 66 | + maxItems: 1 |
| 67 | + |
| 68 | + clock-names: |
| 69 | + const: se |
| 70 | + |
| 71 | + clocks: |
| 72 | + description: Serial engine core clock needed by the device. |
| 73 | + maxItems: 1 |
| 74 | + |
| 75 | + required: |
| 76 | + - reg |
| 77 | + - clock-names |
| 78 | + - clocks |
| 79 | + |
| 80 | + "spi@[0-9a-f]+$": |
| 81 | + type: object |
| 82 | + description: GENI serial engine based SPI controller. SPI in master mode |
| 83 | + supports up to 50MHz, up to four chip selects, programmable |
| 84 | + data path from 4 bits to 32 bits and numerous protocol |
| 85 | + variants. |
| 86 | + allOf: |
| 87 | + - $ref: /spi/spi-controller.yaml# |
| 88 | + |
| 89 | + properties: |
| 90 | + compatible: |
| 91 | + enum: |
| 92 | + - qcom,geni-spi |
| 93 | + |
| 94 | + interrupts: |
| 95 | + maxItems: 1 |
| 96 | + |
| 97 | + "#address-cells": |
| 98 | + const: 1 |
| 99 | + |
| 100 | + "#size-cells": |
| 101 | + const: 0 |
| 102 | + |
| 103 | + required: |
| 104 | + - compatible |
| 105 | + - interrupts |
| 106 | + - "#address-cells" |
| 107 | + - "#size-cells" |
| 108 | + |
| 109 | + "i2c@[0-9a-f]+$": |
| 110 | + type: object |
| 111 | + description: GENI serial engine based I2C controller. |
| 112 | + allOf: |
| 113 | + - $ref: /schemas/i2c/i2c-controller.yaml# |
| 114 | + |
| 115 | + properties: |
| 116 | + compatible: |
| 117 | + enum: |
| 118 | + - qcom,geni-i2c |
| 119 | + |
| 120 | + interrupts: |
| 121 | + maxItems: 1 |
| 122 | + |
| 123 | + "#address-cells": |
| 124 | + const: 1 |
| 125 | + |
| 126 | + "#size-cells": |
| 127 | + const: 0 |
| 128 | + |
| 129 | + clock-frequency: |
| 130 | + description: Desired I2C bus clock frequency in Hz. |
| 131 | + default: 100000 |
| 132 | + |
| 133 | + required: |
| 134 | + - compatible |
| 135 | + - interrupts |
| 136 | + - "#address-cells" |
| 137 | + - "#size-cells" |
| 138 | + |
| 139 | + "serial@[0-9a-f]+$": |
| 140 | + type: object |
| 141 | + description: GENI Serial Engine based UART Controller. |
| 142 | + allOf: |
| 143 | + - $ref: /schemas/serial.yaml# |
| 144 | + |
| 145 | + properties: |
| 146 | + compatible: |
| 147 | + enum: |
| 148 | + - qcom,geni-uart |
| 149 | + - qcom,geni-debug-uart |
| 150 | + |
| 151 | + interrupts: |
| 152 | + minItems: 1 |
| 153 | + maxItems: 2 |
| 154 | + items: |
| 155 | + - description: UART core irq |
| 156 | + - description: Wakeup irq (RX GPIO) |
| 157 | + |
| 158 | + required: |
| 159 | + - compatible |
| 160 | + - interrupts |
| 161 | + |
| 162 | + |
| 163 | +examples: |
| 164 | + - | |
| 165 | + #include <dt-bindings/clock/qcom,gcc-sdm845.h> |
| 166 | + #include <dt-bindings/interrupt-controller/arm-gic.h> |
| 167 | +
|
| 168 | + soc { |
| 169 | + #address-cells = <2>; |
| 170 | + #size-cells = <2>; |
| 171 | +
|
| 172 | + geniqup@8c0000 { |
| 173 | + compatible = "qcom,geni-se-qup"; |
| 174 | + reg = <0 0x008c0000 0 0x6000>; |
| 175 | + clock-names = "m-ahb", "s-ahb"; |
| 176 | + clocks = <&gcc GCC_QUPV3_WRAP_0_M_AHB_CLK>, |
| 177 | + <&gcc GCC_QUPV3_WRAP_0_S_AHB_CLK>; |
| 178 | + #address-cells = <2>; |
| 179 | + #size-cells = <2>; |
| 180 | + ranges; |
| 181 | +
|
| 182 | + i2c0: i2c@a94000 { |
| 183 | + compatible = "qcom,geni-i2c"; |
| 184 | + reg = <0 0xa94000 0 0x4000>; |
| 185 | + interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>; |
| 186 | + clock-names = "se"; |
| 187 | + clocks = <&gcc GCC_QUPV3_WRAP0_S5_CLK>; |
| 188 | + pinctrl-names = "default", "sleep"; |
| 189 | + pinctrl-0 = <&qup_1_i2c_5_active>; |
| 190 | + pinctrl-1 = <&qup_1_i2c_5_sleep>; |
| 191 | + #address-cells = <1>; |
| 192 | + #size-cells = <0>; |
| 193 | + }; |
| 194 | +
|
| 195 | + uart0: serial@a88000 { |
| 196 | + compatible = "qcom,geni-uart"; |
| 197 | + reg = <0 0xa88000 0 0x7000>; |
| 198 | + interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>; |
| 199 | + clock-names = "se"; |
| 200 | + clocks = <&gcc GCC_QUPV3_WRAP0_S0_CLK>; |
| 201 | + pinctrl-names = "default", "sleep"; |
| 202 | + pinctrl-0 = <&qup_1_uart_3_active>; |
| 203 | + pinctrl-1 = <&qup_1_uart_3_sleep>; |
| 204 | + }; |
| 205 | + }; |
| 206 | + }; |
| 207 | +
|
| 208 | +... |
0 commit comments