Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'qcom-dt-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/linux-qcom into for-next

Merge "Qualcomm ARM Based Device Tree Updates for v3.16" from Kumar Gala:

* Added device tree nodes for pinctrl and SDHC for msm8974 SoC/DB8074 board
* Added binding spec for GSBI configuration node

* tag 'qcom-dt-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/linux-qcom:
soc: qcom: Add device tree binding for GSBI
ARM: dts: msm: Add SDHC controller nodes for MSM8974 and DB8074 board
ARM: dts: MSM8974: Add pinctrl node

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+168
+78
Documentation/devicetree/bindings/soc/qcom/qcom,gsbi.txt
··· 1 + QCOM GSBI (General Serial Bus Interface) Driver 2 + 3 + The GSBI controller is modeled as a node with zero or more child nodes, each 4 + representing a serial sub-node device that is mux'd as part of the GSBI 5 + configuration settings. The mode setting will govern the input/output mode of 6 + the 4 GSBI IOs. 7 + 8 + Required properties: 9 + - compatible: must contain "qcom,gsbi-v1.0.0" for APQ8064/IPQ8064 10 + - reg: Address range for GSBI registers 11 + - clocks: required clock 12 + - clock-names: must contain "iface" entry 13 + - qcom,mode : indicates MUX value for configuration of the serial interface. 14 + Please reference dt-bindings/soc/qcom,gsbi.h for valid mux values. 15 + 16 + Optional properties: 17 + - qcom,crci : indicates CRCI MUX value for QUP CRCI ports. Please reference 18 + dt-bindings/soc/qcom,gsbi.h for valid CRCI mux values. 19 + 20 + Required properties if child node exists: 21 + - #address-cells: Must be 1 22 + - #size-cells: Must be 1 23 + - ranges: Must be present 24 + 25 + Properties for children: 26 + 27 + A GSBI controller node can contain 0 or more child nodes representing serial 28 + devices. These serial devices can be a QCOM UART, I2C controller, spi 29 + controller, or some combination of aforementioned devices. 30 + 31 + See the following for child node definitions: 32 + Documentation/devicetree/bindings/i2c/qcom,i2c-qup.txt 33 + Documentation/devicetree/bindings/spi/qcom,spi-qup.txt 34 + Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt 35 + 36 + Example for APQ8064: 37 + 38 + #include <dt-bindings/soc/qcom,gsbi.h> 39 + 40 + gsbi4@16300000 { 41 + compatible = "qcom,gsbi-v1.0.0"; 42 + reg = <0x16300000 0x100>; 43 + clocks = <&gcc GSBI4_H_CLK>; 44 + clock-names = "iface"; 45 + #address-cells = <1>; 46 + #size-cells = <1>; 47 + ranges; 48 + qcom,mode = <GSBI_PROT_I2C_UART>; 49 + qcom,crci = <GSBI_CRCI_QUP>; 50 + 51 + /* child nodes go under here */ 52 + 53 + i2c_qup4: i2c@16380000 { 54 + compatible = "qcom,i2c-qup-v1.1.1"; 55 + reg = <0x16380000 0x1000>; 56 + interrupts = <0 153 0>; 57 + 58 + clocks = <&gcc GSBI4_QUP_CLK>, <&gcc GSBI4_H_CLK>; 59 + clock-names = "core", "iface"; 60 + 61 + clock-frequency = <200000>; 62 + 63 + #address-cells = <1>; 64 + #size-cells = <0>; 65 + 66 + }; 67 + 68 + uart4: serial@16340000 { 69 + compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; 70 + reg = <0x16340000 0x1000>, 71 + <0x16300000 0x1000>; 72 + interrupts = <0 152 0x0>; 73 + clocks = <&gcc GSBI4_UART_CLK>, <&gcc GSBI4_H_CLK>; 74 + clock-names = "core", "iface"; 75 + status = "ok"; 76 + }; 77 + }; 78 +
+13
arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
··· 3 3 / { 4 4 model = "Qualcomm APQ8074 Dragonboard"; 5 5 compatible = "qcom,apq8074-dragonboard", "qcom,apq8074"; 6 + 7 + soc: soc { 8 + sdhci@f9824900 { 9 + bus-width = <8>; 10 + non-removable; 11 + status = "ok"; 12 + }; 13 + 14 + sdhci@f98a4900 { 15 + cd-gpios = <&msmgpio 62 0x1>; 16 + bus-width = <4>; 17 + }; 18 + }; 6 19 };
+51
arch/arm/boot/dts/qcom-msm8974.dtsi
··· 192 192 clock-names = "core", "iface"; 193 193 }; 194 194 195 + sdhci@f9824900 { 196 + compatible = "qcom,sdhci-msm-v4"; 197 + reg = <0xf9824900 0x11c>, <0xf9824000 0x800>; 198 + reg-names = "hc_mem", "core_mem"; 199 + interrupts = <0 123 0>, <0 138 0>; 200 + interrupt-names = "hc_irq", "pwr_irq"; 201 + clocks = <&gcc GCC_SDCC1_APPS_CLK>, <&gcc GCC_SDCC1_AHB_CLK>; 202 + clock-names = "core", "iface"; 203 + status = "disabled"; 204 + }; 205 + 206 + sdhci@f98a4900 { 207 + compatible = "qcom,sdhci-msm-v4"; 208 + reg = <0xf98a4900 0x11c>, <0xf98a4000 0x800>; 209 + reg-names = "hc_mem", "core_mem"; 210 + interrupts = <0 125 0>, <0 221 0>; 211 + interrupt-names = "hc_irq", "pwr_irq"; 212 + clocks = <&gcc GCC_SDCC2_APPS_CLK>, <&gcc GCC_SDCC2_AHB_CLK>; 213 + clock-names = "core", "iface"; 214 + status = "disabled"; 215 + }; 216 + 195 217 rng@f9bff000 { 196 218 compatible = "qcom,prng"; 197 219 reg = <0xf9bff000 0x200>; 198 220 clocks = <&gcc GCC_PRNG_AHB_CLK>; 199 221 clock-names = "core"; 222 + }; 223 + 224 + msmgpio: pinctrl@fd510000 { 225 + compatible = "qcom,msm8974-pinctrl"; 226 + reg = <0xfd510000 0x4000>; 227 + gpio-controller; 228 + #gpio-cells = <2>; 229 + interrupt-controller; 230 + #interrupt-cells = <2>; 231 + interrupts = <0 208 0>; 232 + 233 + spi8_default: spi8_default { 234 + mosi { 235 + pins = "gpio45"; 236 + function = "blsp_spi8"; 237 + }; 238 + miso { 239 + pins = "gpio46"; 240 + function = "blsp_spi8"; 241 + }; 242 + cs { 243 + pins = "gpio47"; 244 + function = "blsp_spi8"; 245 + }; 246 + clk { 247 + pins = "gpio48"; 248 + function = "blsp_spi8"; 249 + }; 250 + }; 200 251 }; 201 252 }; 202 253 };
+26
include/dt-bindings/soc/qcom,gsbi.h
··· 1 + /* Copyright (c) 2013, The Linux Foundation. All rights reserved. 2 + * 3 + * This program is free software; you can redistribute it and/or modify 4 + * it under the terms of the GNU General Public License version 2 and 5 + * only version 2 as published by the Free Software Foundation. 6 + * 7 + * This program is distributed in the hope that it will be useful, 8 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 + * GNU General Public License for more details. 11 + */ 12 + #ifndef __DT_BINDINGS_QCOM_GSBI_H 13 + #define __DT_BINDINGS_QCOM_GSBI_H 14 + 15 + #define GSBI_PROT_IDLE 0 16 + #define GSBI_PROT_I2C_UIM 1 17 + #define GSBI_PROT_I2C 2 18 + #define GSBI_PROT_SPI 3 19 + #define GSBI_PROT_UART_W_FC 4 20 + #define GSBI_PROT_UIM 5 21 + #define GSBI_PROT_I2C_UART 6 22 + 23 + #define GSBI_CRCI_QUP 0 24 + #define GSBI_CRCI_UART 1 25 + 26 + #endif