1d7341305SAntony Antony/* 2d7341305SAntony Antony * Copyright (C) 2017 Antony Antony <antony@phenome.org> 3d7341305SAntony Antony * Copyright (C) 2016 ARM Ltd. 4d7341305SAntony Antony * 5d7341305SAntony Antony * This file is dual-licensed: you can use it either under the terms 6d7341305SAntony Antony * of the GPL or the X11 license, at your option. Note that this dual 7d7341305SAntony Antony * licensing only applies to this file, and not this project as a 8d7341305SAntony Antony * whole. 9d7341305SAntony Antony * 10d7341305SAntony Antony * a) This file is free software; you can redistribute it and/or 11d7341305SAntony Antony * modify it under the terms of the GNU General Public License as 12d7341305SAntony Antony * published by the Free Software Foundation; either version 2 of the 13d7341305SAntony Antony * License, or (at your option) any later version. 14d7341305SAntony Antony * 15d7341305SAntony Antony * This file is distributed in the hope that it will be useful, 16d7341305SAntony Antony * but WITHOUT ANY WARRANTY; without even the implied warranty of 17d7341305SAntony Antony * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18d7341305SAntony Antony * GNU General Public License for more details. 19d7341305SAntony Antony * 20d7341305SAntony Antony * Or, alternatively, 21d7341305SAntony Antony * 22d7341305SAntony Antony * b) Permission is hereby granted, free of charge, to any person 23d7341305SAntony Antony * obtaining a copy of this software and associated documentation 24d7341305SAntony Antony * files (the "Software"), to deal in the Software without 25d7341305SAntony Antony * restriction, including without limitation the rights to use, 26d7341305SAntony Antony * copy, modify, merge, publish, distribute, sublicense, and/or 27d7341305SAntony Antony * sell copies of the Software, and to permit persons to whom the 28d7341305SAntony Antony * Software is furnished to do so, subject to the following 29d7341305SAntony Antony * conditions: 30d7341305SAntony Antony * 31d7341305SAntony Antony * The above copyright notice and this permission notice shall be 32d7341305SAntony Antony * included in all copies or substantial portions of the Software. 33d7341305SAntony Antony * 34d7341305SAntony Antony * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 35d7341305SAntony Antony * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 36d7341305SAntony Antony * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 37d7341305SAntony Antony * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 38d7341305SAntony Antony * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 39d7341305SAntony Antony * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 40d7341305SAntony Antony * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 41d7341305SAntony Antony * OTHER DEALINGS IN THE SOFTWARE. 42d7341305SAntony Antony */ 43d7341305SAntony Antony 44d7341305SAntony Antony/dts-v1/; 45d7341305SAntony Antony#include "sun50i-h5.dtsi" 46d7341305SAntony Antony 47d7341305SAntony Antony#include <dt-bindings/gpio/gpio.h> 48d7341305SAntony Antony#include <dt-bindings/input/input.h> 49d7341305SAntony Antony#include <dt-bindings/pinctrl/sun4i-a10.h> 50d7341305SAntony Antony 51d7341305SAntony Antony/ { 52d7341305SAntony Antony model = "FriendlyARM NanoPi NEO Plus2"; 53d7341305SAntony Antony compatible = "friendlyarm,nanopi-neo-plus2", "allwinner,sun50i-h5"; 54d7341305SAntony Antony 55d7341305SAntony Antony aliases { 56d7341305SAntony Antony serial0 = &uart0; 57d7341305SAntony Antony }; 58d7341305SAntony Antony 59d7341305SAntony Antony chosen { 60d7341305SAntony Antony stdout-path = "serial0:115200n8"; 61d7341305SAntony Antony }; 62d7341305SAntony Antony 63d7341305SAntony Antony leds { 64d7341305SAntony Antony compatible = "gpio-leds"; 65d7341305SAntony Antony 66d7341305SAntony Antony pwr { 67d7341305SAntony Antony label = "nanopi:green:pwr"; 68d7341305SAntony Antony gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; 69d7341305SAntony Antony default-state = "on"; 70d7341305SAntony Antony }; 71d7341305SAntony Antony 72d7341305SAntony Antony status { 73d7341305SAntony Antony label = "nanopi:red:status"; 74d7341305SAntony Antony gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>; 75d7341305SAntony Antony }; 76d7341305SAntony Antony }; 77d7341305SAntony Antony 78d7341305SAntony Antony reg_gmac_3v3: gmac-3v3 { 79d7341305SAntony Antony compatible = "regulator-fixed"; 80d7341305SAntony Antony pinctrl-names = "default"; 81d7341305SAntony Antony regulator-name = "gmac-3v3"; 82d7341305SAntony Antony regulator-min-microvolt = <3300000>; 83d7341305SAntony Antony regulator-max-microvolt = <3300000>; 84d7341305SAntony Antony startup-delay-us = <100000>; 85d7341305SAntony Antony enable-active-high; 86d7341305SAntony Antony gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; 87d7341305SAntony Antony }; 88d7341305SAntony Antony 89d7341305SAntony Antony reg_vcc3v3: vcc3v3 { 90d7341305SAntony Antony compatible = "regulator-fixed"; 91d7341305SAntony Antony regulator-name = "vcc3v3"; 92d7341305SAntony Antony regulator-min-microvolt = <3300000>; 93d7341305SAntony Antony regulator-max-microvolt = <3300000>; 94d7341305SAntony Antony }; 95d7341305SAntony Antony 96d7341305SAntony Antony vdd_cpux: gpio-regulator { 97d7341305SAntony Antony compatible = "regulator-gpio"; 98d7341305SAntony Antony pinctrl-names = "default"; 99d7341305SAntony Antony regulator-name = "vdd-cpux"; 100d7341305SAntony Antony regulator-type = "voltage"; 101d7341305SAntony Antony regulator-boot-on; 102d7341305SAntony Antony regulator-always-on; 103d7341305SAntony Antony regulator-min-microvolt = <1100000>; 104d7341305SAntony Antony regulator-max-microvolt = <1300000>; 105d7341305SAntony Antony regulator-ramp-delay = <50>; /* 4ms */ 106d7341305SAntony Antony gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; 107d7341305SAntony Antony gpios-states = <0x1>; 108d7341305SAntony Antony states = <1100000 0x0 109d7341305SAntony Antony 1300000 0x1>; 110d7341305SAntony Antony }; 111d7341305SAntony Antony 112d7341305SAntony Antony wifi_pwrseq: wifi_pwrseq { 113d7341305SAntony Antony compatible = "mmc-pwrseq-simple"; 114d7341305SAntony Antony pinctrl-names = "default"; 115d7341305SAntony Antony reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ 116d7341305SAntony Antony post-power-on-delay-ms = <200>; 117d7341305SAntony Antony }; 118d7341305SAntony Antony}; 119d7341305SAntony Antony 120d7341305SAntony Antony&codec { 121d7341305SAntony Antony allwinner,audio-routing = 122d7341305SAntony Antony "Line Out", "LINEOUT", 123d7341305SAntony Antony "MIC1", "Mic", 124d7341305SAntony Antony "Mic", "MBIAS"; 125d7341305SAntony Antony status = "okay"; 126d7341305SAntony Antony}; 127d7341305SAntony Antony 128d7341305SAntony Antony&ehci0 { 129d7341305SAntony Antony status = "okay"; 130d7341305SAntony Antony}; 131d7341305SAntony Antony 132d7341305SAntony Antony&ehci3 { 133d7341305SAntony Antony status = "okay"; 134d7341305SAntony Antony}; 135d7341305SAntony Antony 136d7341305SAntony Antony&mmc0 { 137d7341305SAntony Antony pinctrl-names = "default"; 1386d84b6c9SAndre Przywara pinctrl-0 = <&mmc0_pins_a>; 139d7341305SAntony Antony vmmc-supply = <®_vcc3v3>; 140d7341305SAntony Antony bus-width = <4>; 141d7341305SAntony Antony cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ 142d7341305SAntony Antony status = "okay"; 143d7341305SAntony Antony}; 144d7341305SAntony Antony 145d7341305SAntony Antony&mmc1 { 146d7341305SAntony Antony pinctrl-names = "default"; 147d7341305SAntony Antony pinctrl-0 = <&mmc1_pins_a>; 148d7341305SAntony Antony vmmc-supply = <®_vcc3v3>; 149d7341305SAntony Antony vqmmc-supply = <®_vcc3v3>; 150d7341305SAntony Antony mmc-pwrseq = <&wifi_pwrseq>; 151d7341305SAntony Antony bus-width = <4>; 152d7341305SAntony Antony non-removable; 153d7341305SAntony Antony status = "okay"; 154d7341305SAntony Antony 155d7341305SAntony Antony brcmf: wifi@1 { 156d7341305SAntony Antony reg = <1>; 157d7341305SAntony Antony compatible = "brcm,bcm4329-fmac"; 158d7341305SAntony Antony }; 159d7341305SAntony Antony}; 160d7341305SAntony Antony 161d7341305SAntony Antony&mmc2 { 162d7341305SAntony Antony pinctrl-names = "default"; 163d7341305SAntony Antony pinctrl-0 = <&mmc2_8bit_pins>; 164d7341305SAntony Antony vmmc-supply = <®_vcc3v3>; 165d7341305SAntony Antony bus-width = <8>; 166d7341305SAntony Antony non-removable; 167d7341305SAntony Antony cap-mmc-hw-reset; 168d7341305SAntony Antony status = "okay"; 169d7341305SAntony Antony}; 170d7341305SAntony Antony 171d7341305SAntony Antony&ohci0 { 172d7341305SAntony Antony status = "okay"; 173d7341305SAntony Antony}; 174d7341305SAntony Antony 175d7341305SAntony Antony&ohci3 { 176d7341305SAntony Antony status = "okay"; 177d7341305SAntony Antony}; 178d7341305SAntony Antony 179d7341305SAntony Antony&uart0 { 180d7341305SAntony Antony pinctrl-names = "default"; 181d7341305SAntony Antony pinctrl-0 = <&uart0_pins_a>; 182d7341305SAntony Antony status = "okay"; 183d7341305SAntony Antony}; 184d7341305SAntony Antony 185d7341305SAntony Antony&usb_otg { 186d7341305SAntony Antony dr_mode = "host"; 187d7341305SAntony Antony status = "okay"; 188d7341305SAntony Antony}; 189d7341305SAntony Antony 190d7341305SAntony Antony&usbphy { 191d7341305SAntony Antony /* USB Type-A ports' VBUS is always on */ 192d7341305SAntony Antony status = "okay"; 193d7341305SAntony Antony}; 194