1*724ba675SRob Herring/* 2*724ba675SRob Herring * Copyright 2016 Free Electrons 3*724ba675SRob Herring * Copyright 2016 NextThing Co 4*724ba675SRob Herring * 5*724ba675SRob Herring * Maxime Ripard <maxime.ripard@free-electrons.com> 6*724ba675SRob Herring * 7*724ba675SRob Herring * This file is dual-licensed: you can use it either under the terms 8*724ba675SRob Herring * of the GPL or the X11 license, at your option. Note that this dual 9*724ba675SRob Herring * licensing only applies to this file, and not this project as a 10*724ba675SRob Herring * whole. 11*724ba675SRob Herring * 12*724ba675SRob Herring * a) This file is free software; you can redistribute it and/or 13*724ba675SRob Herring * modify it under the terms of the GNU General Public License as 14*724ba675SRob Herring * published by the Free Software Foundation; either version 2 of the 15*724ba675SRob Herring * License, or (at your option) any later version. 16*724ba675SRob Herring * 17*724ba675SRob Herring * This file is distributed in the hope that it will be useful, 18*724ba675SRob Herring * but WITHOUT ANY WARRANTY; without even the implied warranty of 19*724ba675SRob Herring * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20*724ba675SRob Herring * GNU General Public License for more details. 21*724ba675SRob Herring * 22*724ba675SRob Herring * Or, alternatively, 23*724ba675SRob Herring * 24*724ba675SRob Herring * b) Permission is hereby granted, free of charge, to any person 25*724ba675SRob Herring * obtaining a copy of this software and associated documentation 26*724ba675SRob Herring * files (the "Software"), to deal in the Software without 27*724ba675SRob Herring * restriction, including without limitation the rights to use, 28*724ba675SRob Herring * copy, modify, merge, publish, distribute, sublicense, and/or 29*724ba675SRob Herring * sell copies of the Software, and to permit persons to whom the 30*724ba675SRob Herring * Software is furnished to do so, subject to the following 31*724ba675SRob Herring * conditions: 32*724ba675SRob Herring * 33*724ba675SRob Herring * The above copyright notice and this permission notice shall be 34*724ba675SRob Herring * included in all copies or substantial portions of the Software. 35*724ba675SRob Herring * 36*724ba675SRob Herring * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 37*724ba675SRob Herring * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 38*724ba675SRob Herring * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 39*724ba675SRob Herring * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 40*724ba675SRob Herring * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 41*724ba675SRob Herring * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 42*724ba675SRob Herring * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 43*724ba675SRob Herring * OTHER DEALINGS IN THE SOFTWARE. 44*724ba675SRob Herring */ 45*724ba675SRob Herring 46*724ba675SRob Herring/dts-v1/; 47*724ba675SRob Herring#include "sun5i-gr8.dtsi" 48*724ba675SRob Herring#include "sunxi-common-regulators.dtsi" 49*724ba675SRob Herring 50*724ba675SRob Herring#include <dt-bindings/gpio/gpio.h> 51*724ba675SRob Herring#include <dt-bindings/input/input.h> 52*724ba675SRob Herring#include <dt-bindings/interrupt-controller/irq.h> 53*724ba675SRob Herring 54*724ba675SRob Herring/ { 55*724ba675SRob Herring model = "NextThing C.H.I.P. Pro"; 56*724ba675SRob Herring compatible = "nextthing,chip-pro", "nextthing,gr8"; 57*724ba675SRob Herring 58*724ba675SRob Herring aliases { 59*724ba675SRob Herring i2c0 = &i2c0; 60*724ba675SRob Herring i2c1 = &i2c1; 61*724ba675SRob Herring serial0 = &uart1; 62*724ba675SRob Herring serial1 = &uart2; 63*724ba675SRob Herring serial2 = &uart3; 64*724ba675SRob Herring }; 65*724ba675SRob Herring 66*724ba675SRob Herring chosen { 67*724ba675SRob Herring stdout-path = "serial0:115200n8"; 68*724ba675SRob Herring }; 69*724ba675SRob Herring 70*724ba675SRob Herring leds { 71*724ba675SRob Herring compatible = "gpio-leds"; 72*724ba675SRob Herring 73*724ba675SRob Herring led-0 { 74*724ba675SRob Herring label = "chip-pro:white:status"; 75*724ba675SRob Herring gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>; 76*724ba675SRob Herring default-state = "on"; 77*724ba675SRob Herring }; 78*724ba675SRob Herring }; 79*724ba675SRob Herring 80*724ba675SRob Herring mmc0_pwrseq: mmc0_pwrseq { 81*724ba675SRob Herring compatible = "mmc-pwrseq-simple"; 82*724ba675SRob Herring reset-gpios = <&pio 1 10 GPIO_ACTIVE_LOW>; /* PB10 */ 83*724ba675SRob Herring }; 84*724ba675SRob Herring}; 85*724ba675SRob Herring 86*724ba675SRob Herring&codec { 87*724ba675SRob Herring status = "okay"; 88*724ba675SRob Herring}; 89*724ba675SRob Herring 90*724ba675SRob Herring&ehci0 { 91*724ba675SRob Herring status = "okay"; 92*724ba675SRob Herring}; 93*724ba675SRob Herring 94*724ba675SRob Herring&i2c0 { 95*724ba675SRob Herring status = "okay"; 96*724ba675SRob Herring 97*724ba675SRob Herring axp209: pmic@34 { 98*724ba675SRob Herring reg = <0x34>; 99*724ba675SRob Herring 100*724ba675SRob Herring /* 101*724ba675SRob Herring * The interrupt is routed through the "External Fast 102*724ba675SRob Herring * Interrupt Request" pin (ball G13 of the module) 103*724ba675SRob Herring * directly to the main interrupt controller, without 104*724ba675SRob Herring * any other controller interfering. 105*724ba675SRob Herring */ 106*724ba675SRob Herring interrupts = <0>; 107*724ba675SRob Herring }; 108*724ba675SRob Herring}; 109*724ba675SRob Herring 110*724ba675SRob Herring#include "axp209.dtsi" 111*724ba675SRob Herring 112*724ba675SRob Herring&i2c1 { 113*724ba675SRob Herring status = "disabled"; 114*724ba675SRob Herring}; 115*724ba675SRob Herring 116*724ba675SRob Herring&i2s0 { 117*724ba675SRob Herring pinctrl-names = "default"; 118*724ba675SRob Herring pinctrl-0 = <&i2s0_mclk_pin>, <&i2s0_data_pins>; 119*724ba675SRob Herring status = "disabled"; 120*724ba675SRob Herring}; 121*724ba675SRob Herring 122*724ba675SRob Herring&mmc0 { 123*724ba675SRob Herring vmmc-supply = <®_vcc3v3>; 124*724ba675SRob Herring mmc-pwrseq = <&mmc0_pwrseq>; 125*724ba675SRob Herring bus-width = <4>; 126*724ba675SRob Herring non-removable; 127*724ba675SRob Herring status = "okay"; 128*724ba675SRob Herring}; 129*724ba675SRob Herring 130*724ba675SRob Herring&nfc { 131*724ba675SRob Herring pinctrl-names = "default"; 132*724ba675SRob Herring pinctrl-0 = <&nand_pins &nand_cs0_pin &nand_rb0_pin>; 133*724ba675SRob Herring status = "okay"; 134*724ba675SRob Herring 135*724ba675SRob Herring nand@0 { 136*724ba675SRob Herring reg = <0>; 137*724ba675SRob Herring allwinner,rb = <0>; 138*724ba675SRob Herring nand-ecc-mode = "hw"; 139*724ba675SRob Herring }; 140*724ba675SRob Herring}; 141*724ba675SRob Herring 142*724ba675SRob Herring&ohci0 { 143*724ba675SRob Herring status = "okay"; 144*724ba675SRob Herring}; 145*724ba675SRob Herring 146*724ba675SRob Herring&otg_sram { 147*724ba675SRob Herring status = "okay"; 148*724ba675SRob Herring}; 149*724ba675SRob Herring 150*724ba675SRob Herring&pwm { 151*724ba675SRob Herring pinctrl-names = "default"; 152*724ba675SRob Herring pinctrl-0 = <&pwm0_pin>, <&pwm1_pins>; 153*724ba675SRob Herring status = "disabled"; 154*724ba675SRob Herring}; 155*724ba675SRob Herring 156*724ba675SRob Herring®_dcdc2 { 157*724ba675SRob Herring regulator-min-microvolt = <1000000>; 158*724ba675SRob Herring regulator-max-microvolt = <1400000>; 159*724ba675SRob Herring regulator-name = "vdd-cpu"; 160*724ba675SRob Herring regulator-always-on; 161*724ba675SRob Herring}; 162*724ba675SRob Herring 163*724ba675SRob Herring®_dcdc3 { 164*724ba675SRob Herring regulator-min-microvolt = <1000000>; 165*724ba675SRob Herring regulator-max-microvolt = <1300000>; 166*724ba675SRob Herring regulator-name = "vdd-sys"; 167*724ba675SRob Herring regulator-always-on; 168*724ba675SRob Herring}; 169*724ba675SRob Herring 170*724ba675SRob Herring®_ldo1 { 171*724ba675SRob Herring regulator-name = "vdd-rtc"; 172*724ba675SRob Herring}; 173*724ba675SRob Herring 174*724ba675SRob Herring®_ldo2 { 175*724ba675SRob Herring regulator-min-microvolt = <2700000>; 176*724ba675SRob Herring regulator-max-microvolt = <3300000>; 177*724ba675SRob Herring regulator-name = "avcc"; 178*724ba675SRob Herring regulator-always-on; 179*724ba675SRob Herring}; 180*724ba675SRob Herring 181*724ba675SRob Herring/* 182*724ba675SRob Herring * Both LDO3 and LDO4 are used in parallel to power up the 183*724ba675SRob Herring * WiFi/BT chip. 184*724ba675SRob Herring */ 185*724ba675SRob Herring®_ldo3 { 186*724ba675SRob Herring regulator-min-microvolt = <3300000>; 187*724ba675SRob Herring regulator-max-microvolt = <3300000>; 188*724ba675SRob Herring regulator-name = "vcc-wifi-1"; 189*724ba675SRob Herring regulator-always-on; 190*724ba675SRob Herring}; 191*724ba675SRob Herring 192*724ba675SRob Herring®_ldo4 { 193*724ba675SRob Herring regulator-min-microvolt = <3300000>; 194*724ba675SRob Herring regulator-max-microvolt = <3300000>; 195*724ba675SRob Herring regulator-name = "vcc-wifi-2"; 196*724ba675SRob Herring regulator-always-on; 197*724ba675SRob Herring}; 198*724ba675SRob Herring 199*724ba675SRob Herring&uart1 { 200*724ba675SRob Herring pinctrl-names = "default"; 201*724ba675SRob Herring pinctrl-0 = <&uart1_pg_pins>, <&uart1_cts_rts_pins>; 202*724ba675SRob Herring status = "okay"; 203*724ba675SRob Herring}; 204*724ba675SRob Herring 205*724ba675SRob Herring&uart2 { 206*724ba675SRob Herring pinctrl-names = "default"; 207*724ba675SRob Herring pinctrl-0 = <&uart2_pd_pins>, <&uart2_cts_rts_pd_pins>; 208*724ba675SRob Herring status = "disabled"; 209*724ba675SRob Herring}; 210*724ba675SRob Herring 211*724ba675SRob Herring&uart3 { 212*724ba675SRob Herring pinctrl-names = "default"; 213*724ba675SRob Herring pinctrl-0 = <&uart3_pg_pins>, <&uart3_cts_rts_pg_pins>; 214*724ba675SRob Herring status = "okay"; 215*724ba675SRob Herring}; 216*724ba675SRob Herring 217*724ba675SRob Herring&usb_otg { 218*724ba675SRob Herring /* 219*724ba675SRob Herring * The CHIP Pro doesn't have a controllable VBUS, nor does it 220*724ba675SRob Herring * have any 5v rail on the board itself. 221*724ba675SRob Herring * 222*724ba675SRob Herring * If one wants to use it as a true OTG port, it should be 223*724ba675SRob Herring * done in the baseboard, and its DT / overlay will add it. 224*724ba675SRob Herring */ 225*724ba675SRob Herring dr_mode = "otg"; 226*724ba675SRob Herring status = "okay"; 227*724ba675SRob Herring}; 228*724ba675SRob Herring 229*724ba675SRob Herring&usb_power_supply { 230*724ba675SRob Herring status = "okay"; 231*724ba675SRob Herring}; 232*724ba675SRob Herring 233*724ba675SRob Herring&usbphy { 234*724ba675SRob Herring usb0_id_det-gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */ 235*724ba675SRob Herring usb0_vbus_power-supply = <&usb_power_supply>; 236*724ba675SRob Herring usb1_vbus-supply = <®_vcc5v0>; 237*724ba675SRob Herring status = "okay"; 238*724ba675SRob Herring}; 239