1*724ba675SRob Herring/* 2*724ba675SRob Herring * Copyright 2015 Hans de Goede <hdegoede@redhat.com> 3*724ba675SRob Herring * 4*724ba675SRob Herring * This file is dual-licensed: you can use it either under the terms 5*724ba675SRob Herring * of the GPL or the X11 license, at your option. Note that this dual 6*724ba675SRob Herring * licensing only applies to this file, and not this project as a 7*724ba675SRob Herring * whole. 8*724ba675SRob Herring * 9*724ba675SRob Herring * a) This library is free software; you can redistribute it and/or 10*724ba675SRob Herring * modify it under the terms of the GNU General Public License as 11*724ba675SRob Herring * published by the Free Software Foundation; either version 2 of the 12*724ba675SRob Herring * License, or (at your option) any later version. 13*724ba675SRob Herring * 14*724ba675SRob Herring * This library is distributed in the hope that it will be useful, 15*724ba675SRob Herring * but WITHOUT ANY WARRANTY; without even the implied warranty of 16*724ba675SRob Herring * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17*724ba675SRob Herring * GNU General Public License for more details. 18*724ba675SRob Herring * 19*724ba675SRob Herring * Or, alternatively, 20*724ba675SRob Herring * 21*724ba675SRob Herring * b) Permission is hereby granted, free of charge, to any person 22*724ba675SRob Herring * obtaining a copy of this software and associated documentation 23*724ba675SRob Herring * files (the "Software"), to deal in the Software without 24*724ba675SRob Herring * restriction, including without limitation the rights to use, 25*724ba675SRob Herring * copy, modify, merge, publish, distribute, sublicense, and/or 26*724ba675SRob Herring * sell copies of the Software, and to permit persons to whom the 27*724ba675SRob Herring * Software is furnished to do so, subject to the following 28*724ba675SRob Herring * conditions: 29*724ba675SRob Herring * 30*724ba675SRob Herring * The above copyright notice and this permission notice shall be 31*724ba675SRob Herring * included in all copies or substantial portions of the Software. 32*724ba675SRob Herring * 33*724ba675SRob Herring * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 34*724ba675SRob Herring * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 35*724ba675SRob Herring * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 36*724ba675SRob Herring * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 37*724ba675SRob Herring * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 38*724ba675SRob Herring * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 39*724ba675SRob Herring * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 40*724ba675SRob Herring * OTHER DEALINGS IN THE SOFTWARE. 41*724ba675SRob Herring */ 42*724ba675SRob Herring 43*724ba675SRob Herring/dts-v1/; 44*724ba675SRob Herring#include "sun6i-a31s.dtsi" 45*724ba675SRob Herring#include <dt-bindings/gpio/gpio.h> 46*724ba675SRob Herring 47*724ba675SRob Herring/ { 48*724ba675SRob Herring model = "Sinovoip BPI-M2"; 49*724ba675SRob Herring compatible = "sinovoip,bpi-m2", "allwinner,sun6i-a31s"; 50*724ba675SRob Herring 51*724ba675SRob Herring aliases { 52*724ba675SRob Herring serial0 = &uart0; 53*724ba675SRob Herring }; 54*724ba675SRob Herring 55*724ba675SRob Herring chosen { 56*724ba675SRob Herring stdout-path = "serial0:115200n8"; 57*724ba675SRob Herring }; 58*724ba675SRob Herring 59*724ba675SRob Herring leds { 60*724ba675SRob Herring compatible = "gpio-leds"; 61*724ba675SRob Herring 62*724ba675SRob Herring led-0 { 63*724ba675SRob Herring label = "bpi-m2:blue:usr"; 64*724ba675SRob Herring gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */ 65*724ba675SRob Herring }; 66*724ba675SRob Herring 67*724ba675SRob Herring led-1 { 68*724ba675SRob Herring label = "bpi-m2:green:usr"; 69*724ba675SRob Herring gpios = <&pio 6 10 GPIO_ACTIVE_HIGH>; /* PG10 */ 70*724ba675SRob Herring }; 71*724ba675SRob Herring 72*724ba675SRob Herring led-2 { 73*724ba675SRob Herring label = "bpi-m2:red:usr"; 74*724ba675SRob Herring gpios = <&pio 6 5 GPIO_ACTIVE_HIGH>; /* PG5 */ 75*724ba675SRob Herring }; 76*724ba675SRob Herring }; 77*724ba675SRob Herring 78*724ba675SRob Herring mmc2_pwrseq: mmc2_pwrseq { 79*724ba675SRob Herring compatible = "mmc-pwrseq-simple"; 80*724ba675SRob Herring reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 WIFI_EN */ 81*724ba675SRob Herring }; 82*724ba675SRob Herring}; 83*724ba675SRob Herring 84*724ba675SRob Herring&cpu0 { 85*724ba675SRob Herring cpu-supply = <®_dcdc3>; 86*724ba675SRob Herring}; 87*724ba675SRob Herring 88*724ba675SRob Herring&ehci0 { 89*724ba675SRob Herring status = "okay"; 90*724ba675SRob Herring}; 91*724ba675SRob Herring 92*724ba675SRob Herring&gmac { 93*724ba675SRob Herring pinctrl-names = "default"; 94*724ba675SRob Herring pinctrl-0 = <&gmac_rgmii_pins>; 95*724ba675SRob Herring phy-handle = <&phy1>; 96*724ba675SRob Herring phy-mode = "rgmii"; 97*724ba675SRob Herring phy-supply = <®_dldo1>; 98*724ba675SRob Herring status = "okay"; 99*724ba675SRob Herring}; 100*724ba675SRob Herring 101*724ba675SRob Herring&ir { 102*724ba675SRob Herring pinctrl-names = "default"; 103*724ba675SRob Herring pinctrl-0 = <&s_ir_rx_pin>; 104*724ba675SRob Herring status = "okay"; 105*724ba675SRob Herring}; 106*724ba675SRob Herring 107*724ba675SRob Herring&mdio { 108*724ba675SRob Herring phy1: ethernet-phy@1 { 109*724ba675SRob Herring reg = <1>; 110*724ba675SRob Herring reset-gpios = <&pio 0 21 GPIO_ACTIVE_LOW>; /* PA21 */ 111*724ba675SRob Herring reset-assert-us = <10000>; 112*724ba675SRob Herring reset-deassert-us = <30000>; 113*724ba675SRob Herring }; 114*724ba675SRob Herring}; 115*724ba675SRob Herring 116*724ba675SRob Herring&mmc0 { 117*724ba675SRob Herring vmmc-supply = <®_dcdc1>; 118*724ba675SRob Herring bus-width = <4>; 119*724ba675SRob Herring cd-gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */ 120*724ba675SRob Herring status = "okay"; 121*724ba675SRob Herring}; 122*724ba675SRob Herring 123*724ba675SRob Herring&mmc2 { 124*724ba675SRob Herring pinctrl-names = "default"; 125*724ba675SRob Herring pinctrl-0 = <&mmc2_4bit_pins>; 126*724ba675SRob Herring vmmc-supply = <®_aldo1>; 127*724ba675SRob Herring mmc-pwrseq = <&mmc2_pwrseq>; 128*724ba675SRob Herring bus-width = <4>; 129*724ba675SRob Herring non-removable; 130*724ba675SRob Herring status = "okay"; 131*724ba675SRob Herring 132*724ba675SRob Herring brcmf: wifi@1 { 133*724ba675SRob Herring reg = <1>; 134*724ba675SRob Herring compatible = "brcm,bcm4329-fmac"; 135*724ba675SRob Herring interrupt-parent = <&r_pio>; 136*724ba675SRob Herring interrupts = <0 5 IRQ_TYPE_LEVEL_LOW>; /* PL5 */ 137*724ba675SRob Herring interrupt-names = "host-wake"; 138*724ba675SRob Herring }; 139*724ba675SRob Herring}; 140*724ba675SRob Herring 141*724ba675SRob Herring&ohci0 { 142*724ba675SRob Herring status = "okay"; 143*724ba675SRob Herring}; 144*724ba675SRob Herring 145*724ba675SRob Herring&p2wi { 146*724ba675SRob Herring status = "okay"; 147*724ba675SRob Herring 148*724ba675SRob Herring axp22x: pmic@68 { 149*724ba675SRob Herring compatible = "x-powers,axp221"; 150*724ba675SRob Herring reg = <0x68>; 151*724ba675SRob Herring interrupt-parent = <&r_intc>; 152*724ba675SRob Herring interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>; 153*724ba675SRob Herring eldoin-supply = <®_dcdc1>; 154*724ba675SRob Herring x-powers,drive-vbus-en; 155*724ba675SRob Herring }; 156*724ba675SRob Herring}; 157*724ba675SRob Herring 158*724ba675SRob Herring#include "axp22x.dtsi" 159*724ba675SRob Herring 160*724ba675SRob Herring®_aldo1 { 161*724ba675SRob Herring regulator-min-microvolt = <3300000>; 162*724ba675SRob Herring regulator-max-microvolt = <3300000>; 163*724ba675SRob Herring regulator-name = "vcc-wifi"; 164*724ba675SRob Herring}; 165*724ba675SRob Herring 166*724ba675SRob Herring®_aldo2 { 167*724ba675SRob Herring regulator-always-on; 168*724ba675SRob Herring regulator-min-microvolt = <2500000>; 169*724ba675SRob Herring regulator-max-microvolt = <2500000>; 170*724ba675SRob Herring regulator-name = "vcc-gmac"; 171*724ba675SRob Herring}; 172*724ba675SRob Herring 173*724ba675SRob Herring®_aldo3 { 174*724ba675SRob Herring regulator-always-on; 175*724ba675SRob Herring regulator-min-microvolt = <3000000>; 176*724ba675SRob Herring regulator-max-microvolt = <3000000>; 177*724ba675SRob Herring regulator-name = "avcc"; 178*724ba675SRob Herring}; 179*724ba675SRob Herring 180*724ba675SRob Herring®_dc5ldo { 181*724ba675SRob Herring regulator-always-on; 182*724ba675SRob Herring regulator-min-microvolt = <700000>; 183*724ba675SRob Herring regulator-max-microvolt = <1320000>; 184*724ba675SRob Herring regulator-name = "vdd-cpus"; 185*724ba675SRob Herring}; 186*724ba675SRob Herring 187*724ba675SRob Herring®_dcdc1 { 188*724ba675SRob Herring regulator-always-on; 189*724ba675SRob Herring regulator-min-microvolt = <3000000>; 190*724ba675SRob Herring regulator-max-microvolt = <3000000>; 191*724ba675SRob Herring regulator-name = "vdd-3v0"; 192*724ba675SRob Herring}; 193*724ba675SRob Herring 194*724ba675SRob Herring®_dcdc2 { 195*724ba675SRob Herring regulator-min-microvolt = <700000>; 196*724ba675SRob Herring regulator-max-microvolt = <1320000>; 197*724ba675SRob Herring regulator-name = "vdd-gpu"; 198*724ba675SRob Herring}; 199*724ba675SRob Herring 200*724ba675SRob Herring®_dcdc3 { 201*724ba675SRob Herring regulator-always-on; 202*724ba675SRob Herring regulator-min-microvolt = <700000>; 203*724ba675SRob Herring regulator-max-microvolt = <1320000>; 204*724ba675SRob Herring regulator-name = "vdd-cpu"; 205*724ba675SRob Herring}; 206*724ba675SRob Herring 207*724ba675SRob Herring®_dcdc4 { 208*724ba675SRob Herring regulator-always-on; 209*724ba675SRob Herring regulator-min-microvolt = <700000>; 210*724ba675SRob Herring regulator-max-microvolt = <1320000>; 211*724ba675SRob Herring regulator-name = "vdd-sys-dll"; 212*724ba675SRob Herring}; 213*724ba675SRob Herring 214*724ba675SRob Herring®_dcdc5 { 215*724ba675SRob Herring regulator-always-on; 216*724ba675SRob Herring regulator-min-microvolt = <1500000>; 217*724ba675SRob Herring regulator-max-microvolt = <1500000>; 218*724ba675SRob Herring regulator-name = "vcc-dram"; 219*724ba675SRob Herring}; 220*724ba675SRob Herring 221*724ba675SRob Herring®_dldo1 { 222*724ba675SRob Herring regulator-min-microvolt = <3000000>; 223*724ba675SRob Herring regulator-max-microvolt = <3000000>; 224*724ba675SRob Herring regulator-name = "vcc-mac"; 225*724ba675SRob Herring}; 226*724ba675SRob Herring 227*724ba675SRob Herring®_dldo2 { 228*724ba675SRob Herring regulator-min-microvolt = <2800000>; 229*724ba675SRob Herring regulator-max-microvolt = <2800000>; 230*724ba675SRob Herring regulator-name = "avdd-csi"; 231*724ba675SRob Herring}; 232*724ba675SRob Herring 233*724ba675SRob Herring®_dldo3 { 234*724ba675SRob Herring regulator-always-on; 235*724ba675SRob Herring regulator-min-microvolt = <3300000>; 236*724ba675SRob Herring regulator-max-microvolt = <3300000>; 237*724ba675SRob Herring regulator-name = "vcc-pb"; 238*724ba675SRob Herring}; 239*724ba675SRob Herring 240*724ba675SRob Herring®_eldo1 { 241*724ba675SRob Herring regulator-min-microvolt = <1800000>; 242*724ba675SRob Herring regulator-max-microvolt = <1800000>; 243*724ba675SRob Herring regulator-name = "vdd-csi"; 244*724ba675SRob Herring status = "okay"; 245*724ba675SRob Herring}; 246*724ba675SRob Herring 247*724ba675SRob Herring®_ldo_io1 { 248*724ba675SRob Herring regulator-always-on; 249*724ba675SRob Herring regulator-min-microvolt = <1800000>; 250*724ba675SRob Herring regulator-max-microvolt = <1800000>; 251*724ba675SRob Herring regulator-name = "vcc-pm-cpus"; 252*724ba675SRob Herring status = "okay"; 253*724ba675SRob Herring}; 254*724ba675SRob Herring 255*724ba675SRob Herring&uart0 { 256*724ba675SRob Herring pinctrl-names = "default"; 257*724ba675SRob Herring pinctrl-0 = <&uart0_ph_pins>; 258*724ba675SRob Herring status = "okay"; 259*724ba675SRob Herring}; 260*724ba675SRob Herring 261*724ba675SRob Herring&usbphy { 262*724ba675SRob Herring status = "okay"; 263*724ba675SRob Herring}; 264*724ba675SRob Herring 265*724ba675SRob Herring&pio { 266*724ba675SRob Herring gpio-line-names = 267*724ba675SRob Herring /* PA */ 268*724ba675SRob Herring "ETXD0", "ETXD1", "ETXD2", "ETXD3", "SDC0-DET", "", "", 269*724ba675SRob Herring "", "ETXCLK", "ETXEN", "EGTXCLK", "ERXD0", "ERXD1", 270*724ba675SRob Herring "ERXD2", "ERXD3", "", "", "", "", "ERXDV", "ERXCK", 271*724ba675SRob Herring "ETXERR", "ERXERR", "ECOL", "ECRS", "ECLKIN", "EMDC", 272*724ba675SRob Herring "EMDIO", "", "", "", "", 273*724ba675SRob Herring 274*724ba675SRob Herring /* PB */ 275*724ba675SRob Herring "CN7-P29", "CN7-P31", "CN7-P33", "CN7-P35", "CN7-P37", 276*724ba675SRob Herring "CN7-P28", "CN7-P27", "CN7-P32", "", "", "", "", "", "", 277*724ba675SRob Herring "", "", "", "", "", "", "", "", "", "", "", "", "", "", 278*724ba675SRob Herring "", "", "", "", 279*724ba675SRob Herring 280*724ba675SRob Herring /* PC */ 281*724ba675SRob Herring "", "", "", "", "", "", "WL-SDIO-CMD", "WL-SDIO-CLK", 282*724ba675SRob Herring "WL-SDIO-D0", "WL-SDIO-D2", "WL-SDIO-D2", "WL-SDIO-D3", 283*724ba675SRob Herring "", "", "", "", "", "", "", "", "", "", "", "", "", "", 284*724ba675SRob Herring "", "USB-DRV", "", "", "", "", 285*724ba675SRob Herring 286*724ba675SRob Herring /* PD */ 287*724ba675SRob Herring "CN9-P09", "CN9-P11", "CN9-P13", "CN9-P15", "CN9-P17", 288*724ba675SRob Herring "CN9-P19", "CN9-P21", "CN9-P23", "CN9-P25", "CN9-P27", 289*724ba675SRob Herring "CN9-P29", "CN9-P31", "CN9-P33", "CN9-P35", "CN9-P37", 290*724ba675SRob Herring "CN9-P39", "CN9-P40", "CN9-P38", "CN9-P36", "CN9-P34", 291*724ba675SRob Herring "CN9-P32", "CN9-P30", "CN9-P28", "CN9-P26", "CN9-P22", 292*724ba675SRob Herring "CN9-P14", "CN9-P18", "CN9-P16", "", "", "", "", 293*724ba675SRob Herring 294*724ba675SRob Herring /* PE */ 295*724ba675SRob Herring "CN6-P20", "CN6-P24", "CN6-P30", "CN6-P28", "CN7-P08", 296*724ba675SRob Herring "CN7-P10", "CN7-P36", "CN7-P38", "CN6-P17", "CN6-P19", 297*724ba675SRob Herring "CN6-P21", "CN6-P23", "CN6-P25", "CN6-P27", "CN6-P29", 298*724ba675SRob Herring "CN6-P31", "", "", "", "", "", "", "", "", "", "", "", 299*724ba675SRob Herring "", "", "", "", "", 300*724ba675SRob Herring 301*724ba675SRob Herring /* PF */ 302*724ba675SRob Herring "SDC0-D1", "SDC0-D0", "SDC0-CLK", "SDC0-CMD", "SDC0-D3", 303*724ba675SRob Herring "SDC0-D2", "", "", "", "", "", "", "", "", "", "", "", 304*724ba675SRob Herring "", "", "", "", "", "", "", "", "", "", "", "", "", "", 305*724ba675SRob Herring "", 306*724ba675SRob Herring 307*724ba675SRob Herring /* PG */ 308*724ba675SRob Herring "CN9-P06", "CN9-P08", "CN9-P20", "CN9-P12", "CN9-P07", 309*724ba675SRob Herring "LED-PWR", "CN7-P13", "CN7-P11", "CN7-P22", "CN7-P15", 310*724ba675SRob Herring "LED-G", "LED-B", "CN7-P26", "CN7-P24", "CN7-P23", 311*724ba675SRob Herring "CN7-P19", "CN7-P21", "HCEC", "CN6-P22", "", "", "", "", 312*724ba675SRob Herring "", "", "", "", "", "", "", "", "", 313*724ba675SRob Herring 314*724ba675SRob Herring /* PH */ 315*724ba675SRob Herring "", "", "", "", "", "", "", "", "", "CN7-P07", 316*724ba675SRob Herring "CN7-P12", "CN7-P16", "CN7-P18", "CN9-P10", "CN6-P16", 317*724ba675SRob Herring "CN6-P14", "CN9-P04", "CN9-P02", "CN7-P05", "CN7-P03", 318*724ba675SRob Herring "CN8-P03", "CN8-P02", "", "", "CN6-P34", "CN6-P32", 319*724ba675SRob Herring "CN6-P26", "CN6-P18", "", "", "", ""; 320*724ba675SRob Herring}; 321*724ba675SRob Herring 322*724ba675SRob Herring&r_pio { 323*724ba675SRob Herring gpio-line-names = 324*724ba675SRob Herring /* PL */ 325*724ba675SRob Herring "PMU-SCK", "PMU-SDA", "VBAT-EN", "", "IR-RX", 326*724ba675SRob Herring "WL-WAKE-HOST", "BT-WAKE_HOST", "BT-ENABLE", 327*724ba675SRob Herring "WL-PMU-EN", "", "", "", "", "", "", "", "", "", "", "", 328*724ba675SRob Herring "", "", "", "", "", "", "", "", "", "", "", "", 329*724ba675SRob Herring 330*724ba675SRob Herring /* PM */ 331*724ba675SRob Herring "CN6-P12", "CN6-P35", "CN7-P40", "", "", "", "", "", "", 332*724ba675SRob Herring "", "", "", "", "", "", "", "", "", "", "", "", "", "", 333*724ba675SRob Herring "", "", "", "", "", "", "", "", ""; 334*724ba675SRob Herring}; 335