/*
* Copyright 2016 Linaro Ltd
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
#include "qcom-msm8660.dtsi"
/ {
model = "Qualcomm APQ8060 Dragonboard";
compatible = "qcom,apq8060-dragonboard", "qcom,msm8660";
aliases {
serial0 = &gsbi12_serial;
};
chosen {
stdout-path = "serial0:115200n8";
};
regulators {
compatible = "simple-bus";
/* Main power of the board: 3.7V */
vph: regulator-fixed {
compatible = "regulator-fixed";
regulator-min-microvolt = <3700000>;
regulator-max-microvolt = <3700000>;
regulator-name = "VPH";
regulator-type = "voltage";
regulator-always-on;
regulator-boot-on;
};
/* GPIO controlled ethernet power regulator */
dragon_veth: xc622a331mrg {
compatible = "regulator-fixed";
regulator-name = "XC6222A331MR-G";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&vph>;
gpio = <&pm8058_gpio 40 GPIO_ACTIVE_HIGH>;
enable-active-high;
pinctrl-names = "default";
pinctrl-0 = <&dragon_veth_gpios>;
regulator-always-on;
};
/* VDDvario fixed regulator */
dragon_vario: nds332p {
compatible = "regulator-fixed";
regulator-name = "NDS332P";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
vin-supply = <&pm8058_s3>;
};
/* This is a levelshifter for SDCC5 */
dragon_vio_txb: txb0104rgyr {
compatible = "regulator-fixed";
regulator-name = "Dragon SDCC levelshifter";
vin-supply = <&pm8058_l14>;
regulator-always-on;
};
};
/*
* Capella CM3605 light and proximity sensor mounted directly
* on the sensor board.
*/
cm3605 {
compatible = "capella,cm3605";
vdd-supply = <&pm8058_l14>; // 2.85V
aset-gpios = <&pm8058_gpio 35 GPIO_ACTIVE_LOW>;
capella,aset-resistance-ohms = <100000>;
/* Trig on both edges - getting close or far away */
interrupts-extended = <&pm8058_gpio 34 IRQ_TYPE_EDGE_BOTH>;
/* MPP05 analog input to the XOADC */
io-channels = <&xoadc 0x00 0x05>;
io-channel-names = "aout";
pinctrl-names = "default";
pinctrl-0 = <&dragon_cm3605_gpios>, <&dragon_cm3605_mpps>;
};
soc {
pinctrl@800000 {
/* eMMMC pins, all 8 data lines connected */
dragon_sdcc1_pins: sdcc1 {
mux {
pins = "gpio159", "gpio160", "gpio161",
"gpio162", "gpio163", "gpio164",
"gpio165", "gpio166", "gpio167",
"gpio168";
function = "sdc1";
};
clk {
pins = "gpio167"; /* SDC1 CLK */
drive-strength = <16>;
bias-disable;
};
cmd {
pins = "gpio168"; /* SDC1 CMD */
drive-strength = <10>;
bias-pull-up;
};
data {
/* SDC1 D0 to D7 */
pins = "gpio159", "gpio160", "gpio161", "gpio162",
"gpio163", "gpio164", "gpio165", "gpio166";
drive-strength = <10>;
bias-pull-up;
};
};
/*
* The SDCC3 pins are hardcoded (non-muxable) but need some pin
* configuration.
*/
dragon_sdcc3_pins: sdcc3 {
clk {
pins = "sdc3_clk";
drive-strength = <8>;
bias-disable;
};
cmd {
pins = "sdc3_cmd";
drive-strength = <8>;
bias-pull-up;
};
data {
pins = "sdc3_data";
drive-strength = <8>;
bias-pull-up;
};
};
/* Second SD card slot pins */
dragon_sdcc5_pins: sdcc5 {
mux {
pins = "gpio95", "gpio96", "gpio97",
"gpio98", "gpio99", "gpio100";
function = "sdc5";
};
clk {
pins = "gpio97"; /* SDC5 CLK */
drive-strength = <16>;
bias-disable;
};
cmd {
pins = "gpio95"; /* SDC5 CMD */
drive-strength = <10>;
bias-pull-up