1724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0+ OR MIT 2724ba675SRob Herring/* 3724ba675SRob Herring * Device Tree Source for mangOH Green Board with WP8548 Module 4724ba675SRob Herring * 5724ba675SRob Herring * Copyright (C) 2016 BayLibre, SAS. 6724ba675SRob Herring * Author : Neil Armstrong <narmstrong@baylibre.com> 7724ba675SRob Herring */ 8724ba675SRob Herring 9*249aae3fSDmitry Baryshkov#include <dt-bindings/gpio/gpio.h> 10724ba675SRob Herring#include <dt-bindings/input/input.h> 11*249aae3fSDmitry Baryshkov#include <dt-bindings/interrupt-controller/irq.h> 12724ba675SRob Herring 13724ba675SRob Herring#include "qcom-mdm9615-wp8548.dtsi" 14724ba675SRob Herring 15724ba675SRob Herring/ { 16724ba675SRob Herring model = "MangOH Green with WP8548 Module"; 17724ba675SRob Herring compatible = "swir,mangoh-green-wp8548", "swir,wp8548", "qcom,mdm9615"; 18724ba675SRob Herring 19724ba675SRob Herring aliases { 20724ba675SRob Herring spi0 = &gsbi3_spi; 21724ba675SRob Herring serial0 = &gsbi4_serial; 22724ba675SRob Herring serial1 = &gsbi5_serial; 23724ba675SRob Herring i2c0 = &gsbi5_i2c; 24724ba675SRob Herring mmc0 = &sdcc1; 25724ba675SRob Herring }; 26724ba675SRob Herring 27724ba675SRob Herring chosen { 28724ba675SRob Herring stdout-path = "serial1:115200n8"; 29724ba675SRob Herring }; 30724ba675SRob Herring}; 31724ba675SRob Herring 32724ba675SRob Herring&msmgpio { 33724ba675SRob Herring /* MangOH GPIO Mapping : 34724ba675SRob Herring * - 2 : GPIOEXP_INT2 35724ba675SRob Herring * - 7 : IOT1_GPIO2 36724ba675SRob Herring * - 8 : IOT0_GPIO4 37724ba675SRob Herring * - 13: IOT0_GPIO3 38724ba675SRob Herring * - 21: IOT1_GPIO4 39724ba675SRob Herring * - 22: IOT2_GPIO1 40724ba675SRob Herring * - 23: IOT2_GPIO2 41724ba675SRob Herring * - 24: IOT2_GPIO3 42724ba675SRob Herring * - 25: IOT1_GPIO1 43724ba675SRob Herring * - 32: IOT1_GPIO3 44724ba675SRob Herring * - 33: IOT0_GPIO2 45724ba675SRob Herring * - 42: IOT0_GPIO1 and SD Card Detect 46724ba675SRob Herring */ 47724ba675SRob Herring 48724ba675SRob Herring gpioext1_pins: gpioext1-state { 49724ba675SRob Herring gpioext1-pins { 50724ba675SRob Herring pins = "gpio2"; 51724ba675SRob Herring function = "gpio"; 52724ba675SRob Herring bias-disable; 53724ba675SRob Herring }; 54724ba675SRob Herring }; 55724ba675SRob Herring 56724ba675SRob Herring sdc_cd_pins: sdc-cd-state { 57724ba675SRob Herring sdc-cd-pins { 58724ba675SRob Herring pins = "gpio42"; 59724ba675SRob Herring function = "gpio"; 60724ba675SRob Herring drive-strength = <2>; 61724ba675SRob Herring bias-pull-up; 62724ba675SRob Herring }; 63724ba675SRob Herring }; 64724ba675SRob Herring}; 65724ba675SRob Herring 66724ba675SRob Herring&gsbi3_spi { 67724ba675SRob Herring spi@0 { 68724ba675SRob Herring compatible = "swir,mangoh-iotport-spi"; 69724ba675SRob Herring spi-max-frequency = <24000000>; 70724ba675SRob Herring reg = <0>; 71724ba675SRob Herring }; 72724ba675SRob Herring}; 73724ba675SRob Herring 74724ba675SRob Herring&gsbi5_i2c { 75724ba675SRob Herring mux@71 { 76724ba675SRob Herring compatible = "nxp,pca9548"; 77724ba675SRob Herring #address-cells = <1>; 78724ba675SRob Herring #size-cells = <0>; 79724ba675SRob Herring reg = <0x71>; 80724ba675SRob Herring 81724ba675SRob Herring i2c_iot0: i2c@0 { 82724ba675SRob Herring #address-cells = <1>; 83724ba675SRob Herring #size-cells = <0>; 84724ba675SRob Herring reg = <0>; 85724ba675SRob Herring }; 86724ba675SRob Herring 87724ba675SRob Herring i2c_iot1: i2c@1 { 88724ba675SRob Herring #address-cells = <1>; 89724ba675SRob Herring #size-cells = <0>; 90724ba675SRob Herring reg = <1>; 91724ba675SRob Herring }; 92724ba675SRob Herring 93724ba675SRob Herring i2c_iot2: i2c@2 { 94724ba675SRob Herring #address-cells = <1>; 95724ba675SRob Herring #size-cells = <0>; 96724ba675SRob Herring reg = <2>; 97724ba675SRob Herring }; 98724ba675SRob Herring 99724ba675SRob Herring i2c@3 { 100724ba675SRob Herring #address-cells = <1>; 101724ba675SRob Herring #size-cells = <0>; 102724ba675SRob Herring reg = <3>; 103724ba675SRob Herring 104724ba675SRob Herring usbhub: hub@8 { 105724ba675SRob Herring compatible = "smsc,usb3503a"; 106724ba675SRob Herring reg = <0x8>; 107724ba675SRob Herring connect-gpios = <&gpioext2 1 GPIO_ACTIVE_HIGH>; 108724ba675SRob Herring intn-gpios = <&gpioext2 0 GPIO_ACTIVE_HIGH>; 109724ba675SRob Herring initial-mode = <1>; 110724ba675SRob Herring }; 111724ba675SRob Herring }; 112724ba675SRob Herring 113724ba675SRob Herring i2c@4 { 114724ba675SRob Herring #address-cells = <1>; 115724ba675SRob Herring #size-cells = <0>; 116724ba675SRob Herring reg = <4>; 117724ba675SRob Herring 118724ba675SRob Herring gpioext0: pinctrl@3e { 119724ba675SRob Herring /* GPIO Expander 0 Mapping : 120724ba675SRob Herring * - 0: ARDUINO_RESET_Level shift 121724ba675SRob Herring * - 1: BattChrgr_PG_N 122724ba675SRob Herring * - 2: BattGauge_GPIO 123724ba675SRob Herring * - 3: LED_ON (out active high) 124724ba675SRob Herring * - 4: ATmega_reset_GPIO 125724ba675SRob Herring * - 5: X 126724ba675SRob Herring * - 6: PCM_ANALOG_SELECT (out active high) 127724ba675SRob Herring * - 7: X 128724ba675SRob Herring * - 8: Board_rev_res1 (in) 129724ba675SRob Herring * - 9: Board_rev_res2 (in) 130724ba675SRob Herring * - 10: UART_EXP1_ENn (out active low / pull-down) 131724ba675SRob Herring * - 11: UART_EXP1_IN (out pull-down) 132724ba675SRob Herring * - 12: UART_EXP2_IN (out pull-down) 133724ba675SRob Herring * - 13: SDIO_SEL (out pull-down) 134724ba675SRob Herring * - 14: SPI_EXP1_ENn (out active low / pull-down) 135724ba675SRob Herring * - 15: SPI_EXP1_IN (out pull-down) 136724ba675SRob Herring */ 137724ba675SRob Herring #gpio-cells = <2>; 138724ba675SRob Herring #interrupt-cells = <2>; 139724ba675SRob Herring compatible = "semtech,sx1509q"; 140724ba675SRob Herring reg = <0x3e>; 141724ba675SRob Herring interrupt-parent = <&gpioext1>; 142724ba675SRob Herring interrupts = <0 IRQ_TYPE_EDGE_FALLING>; 143724ba675SRob Herring 144724ba675SRob Herring semtech,probe-reset; 145724ba675SRob Herring 146724ba675SRob Herring gpio-controller; 147724ba675SRob Herring interrupt-controller; 148724ba675SRob Herring }; 149724ba675SRob Herring }; 150724ba675SRob Herring 151724ba675SRob Herring i2c@5 { 152724ba675SRob Herring #address-cells = <1>; 153724ba675SRob Herring #size-cells = <0>; 154724ba675SRob Herring reg = <5>; 155724ba675SRob Herring 156724ba675SRob Herring gpioext1: pinctrl@3f { 157724ba675SRob Herring /* GPIO Expander 1 Mapping : 158724ba675SRob Herring * - 0: GPIOEXP_INT1 159724ba675SRob Herring * - 1: Battery detect 160724ba675SRob Herring * - 2: GPIO_SCF3_RESET 161724ba675SRob Herring * - 3: LED_CARD_DETECT_IOT0 (in) 162724ba675SRob Herring * - 4: LED_CARD_DETECT_IOT1 (in) 163724ba675SRob Herring * - 5: LED_CARD_DETECT_IOT2 (in) 164724ba675SRob Herring * - 6: UIM2_PWM_SELECT 165724ba675SRob Herring * - 7: UIM2_M2_S_SELECT 166724ba675SRob Herring * - 8: TP900 167724ba675SRob Herring * - 9: SENSOR_INT1 (in) 168724ba675SRob Herring * - 10: SENSOR_INT2 (in) 169724ba675SRob Herring * - 11: CARD_DETECT_IOT0 (in pull-up) 170724ba675SRob Herring * - 12: CARD_DETECT_IOT2 (in pull-up) 171724ba675SRob Herring * - 13: CARD_DETECT_IOT1 (in pull-up) 172724ba675SRob Herring * - 14: GPIOEXP_INT3 (in active low / pull-up) 173724ba675SRob Herring * - 15: BattChrgr_INT_N 174724ba675SRob Herring */ 175724ba675SRob Herring pinctrl-0 = <&gpioext1_pins>; 176724ba675SRob Herring pinctrl-names = "default"; 177724ba675SRob Herring 178724ba675SRob Herring #gpio-cells = <2>; 179724ba675SRob Herring #interrupt-cells = <2>; 180724ba675SRob Herring compatible = "semtech,sx1509q"; 181724ba675SRob Herring reg = <0x3f>; 182724ba675SRob Herring interrupt-parent = <&msmgpio>; 183724ba675SRob Herring interrupts = <0 IRQ_TYPE_EDGE_FALLING>; 184724ba675SRob Herring 185724ba675SRob Herring semtech,probe-reset; 186724ba675SRob Herring 187724ba675SRob Herring gpio-controller; 188724ba675SRob Herring interrupt-controller; 189724ba675SRob Herring }; 190724ba675SRob Herring }; 191724ba675SRob Herring 192724ba675SRob Herring i2c@6 { 193724ba675SRob Herring #address-cells = <1>; 194724ba675SRob Herring #size-cells = <0>; 195724ba675SRob Herring reg = <6>; 196724ba675SRob Herring 197724ba675SRob Herring gpioext2: pinctrl@70 { 198724ba675SRob Herring /* GPIO Expander 2 Mapping : 199724ba675SRob Herring * - 0: USB_HUB_INTn 200724ba675SRob Herring * - 1: HUB_CONNECT 201724ba675SRob Herring * - 2: GPIO_IOT2_RESET (out active low / pull-up) 202724ba675SRob Herring * - 3: GPIO_IOT1_RESET (out active low / pull-up) 203724ba675SRob Herring * - 4: GPIO_IOT0_RESET (out active low / pull-up) 204724ba675SRob Herring * - 5: TP901 205724ba675SRob Herring * - 6: TP902 206724ba675SRob Herring * - 7: TP903 207724ba675SRob Herring * - 8: UART_EXP2_ENn (out active low / pull-down) 208724ba675SRob Herring * - 9: PCM_EXP1_ENn (out active low) 209724ba675SRob Herring * - 10: PCM_EXP1_SEL (out) 210724ba675SRob Herring * - 11: ARD_FTDI 211724ba675SRob Herring * - 12: TP904 212724ba675SRob Herring * - 13: TP905 213724ba675SRob Herring * - 14: TP906 214724ba675SRob Herring * - 15: RS232_Enable (out active high / pull-up) 215724ba675SRob Herring */ 216724ba675SRob Herring #gpio-cells = <2>; 217724ba675SRob Herring #interrupt-cells = <2>; 218724ba675SRob Herring compatible = "semtech,sx1509q"; 219724ba675SRob Herring reg = <0x70>; 220724ba675SRob Herring interrupt-parent = <&gpioext1>; 221724ba675SRob Herring interrupts = <14 IRQ_TYPE_EDGE_FALLING>; 222724ba675SRob Herring 223724ba675SRob Herring semtech,probe-reset; 224724ba675SRob Herring 225724ba675SRob Herring gpio-controller; 226724ba675SRob Herring interrupt-controller; 227724ba675SRob Herring }; 228724ba675SRob Herring }; 229724ba675SRob Herring 230724ba675SRob Herring i2c@7 { 231724ba675SRob Herring #address-cells = <1>; 232724ba675SRob Herring #size-cells = <0>; 233724ba675SRob Herring reg = <7>; 234724ba675SRob Herring }; 235724ba675SRob Herring }; 236724ba675SRob Herring}; 237724ba675SRob Herring 238724ba675SRob Herring&sdcc1 { 239724ba675SRob Herring pinctrl-0 = <&sdc_cd_pins>; 240724ba675SRob Herring pinctrl-names = "default"; 241724ba675SRob Herring disable-wp; 242724ba675SRob Herring cd-gpios = <&msmgpio 42 GPIO_ACTIVE_LOW>; /* Active low CD */ 243724ba675SRob Herring}; 244