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