1f126890aSEmmanuel Vadot/* 2f126890aSEmmanuel Vadot * Copyright (C) 2017 Jagan Teki <jteki@openedev.com> 3f126890aSEmmanuel Vadot * Copyright (C) 2018 Diego Rondini <diego.rondini@kynetics.com> 4f126890aSEmmanuel Vadot * 5f126890aSEmmanuel Vadot * This file is dual-licensed: you can use it either under the terms 6f126890aSEmmanuel Vadot * of the GPL or the X11 license, at your option. Note that this dual 7f126890aSEmmanuel Vadot * licensing only applies to this file, and not this project as a 8f126890aSEmmanuel Vadot * whole. 9f126890aSEmmanuel Vadot * 10f126890aSEmmanuel Vadot * a) This file is free software; you can redistribute it and/or 11f126890aSEmmanuel Vadot * modify it under the terms of the GNU General Public License as 12f126890aSEmmanuel Vadot * published by the Free Software Foundation; either version 2 of the 13f126890aSEmmanuel Vadot * License, or (at your option) any later version. 14f126890aSEmmanuel Vadot * 15f126890aSEmmanuel Vadot * This file is distributed in the hope that it will be useful, 16f126890aSEmmanuel Vadot * but WITHOUT ANY WARRANTY; without even the implied warranty of 17f126890aSEmmanuel Vadot * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18f126890aSEmmanuel Vadot * GNU General Public License for more details. 19f126890aSEmmanuel Vadot * 20f126890aSEmmanuel Vadot * Or, alternatively, 21f126890aSEmmanuel Vadot * 22f126890aSEmmanuel Vadot * b) Permission is hereby granted, free of charge, to any person 23f126890aSEmmanuel Vadot * obtaining a copy of this software and associated documentation 24f126890aSEmmanuel Vadot * files (the "Software"), to deal in the Software without 25f126890aSEmmanuel Vadot * restriction, including without limitation the rights to use, 26f126890aSEmmanuel Vadot * copy, modify, merge, publish, distribute, sublicense, and/or 27f126890aSEmmanuel Vadot * sell copies of the Software, and to permit persons to whom the 28f126890aSEmmanuel Vadot * Software is furnished to do so, subject to the following 29f126890aSEmmanuel Vadot * conditions: 30f126890aSEmmanuel Vadot * 31f126890aSEmmanuel Vadot * The above copyright notice and this permission notice shall be 32f126890aSEmmanuel Vadot * included in all copies or substantial portions of the Software. 33f126890aSEmmanuel Vadot * 34f126890aSEmmanuel Vadot * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 35f126890aSEmmanuel Vadot * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 36f126890aSEmmanuel Vadot * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 37f126890aSEmmanuel Vadot * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 38f126890aSEmmanuel Vadot * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 39f126890aSEmmanuel Vadot * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 40f126890aSEmmanuel Vadot * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 41f126890aSEmmanuel Vadot * OTHER DEALINGS IN THE SOFTWARE. 42f126890aSEmmanuel Vadot */ 43f126890aSEmmanuel Vadot 44f126890aSEmmanuel Vadot/dts-v1/; 45f126890aSEmmanuel Vadot 46f126890aSEmmanuel Vadot#include "sun8i-h3.dtsi" 47f126890aSEmmanuel Vadot 48f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h> 49f126890aSEmmanuel Vadot 50f126890aSEmmanuel Vadot/ { 51f126890aSEmmanuel Vadot model = "OrangePi Zero Plus2 H3"; 52f126890aSEmmanuel Vadot compatible = "xunlong,orangepi-zero-plus2-h3", "allwinner,sun8i-h3"; 53f126890aSEmmanuel Vadot 54f126890aSEmmanuel Vadot aliases { 55f126890aSEmmanuel Vadot serial0 = &uart0; 56f126890aSEmmanuel Vadot }; 57f126890aSEmmanuel Vadot 58f126890aSEmmanuel Vadot chosen { 59f126890aSEmmanuel Vadot stdout-path = "serial0:115200n8"; 60f126890aSEmmanuel Vadot }; 61f126890aSEmmanuel Vadot 62f126890aSEmmanuel Vadot connector { 63f126890aSEmmanuel Vadot compatible = "hdmi-connector"; 64f126890aSEmmanuel Vadot type = "a"; 65f126890aSEmmanuel Vadot 66f126890aSEmmanuel Vadot port { 67f126890aSEmmanuel Vadot hdmi_con_in: endpoint { 68f126890aSEmmanuel Vadot remote-endpoint = <&hdmi_out_con>; 69f126890aSEmmanuel Vadot }; 70f126890aSEmmanuel Vadot }; 71f126890aSEmmanuel Vadot }; 72f126890aSEmmanuel Vadot 73f126890aSEmmanuel Vadot leds { 74f126890aSEmmanuel Vadot compatible = "gpio-leds"; 75f126890aSEmmanuel Vadot 76f126890aSEmmanuel Vadot led-0 { 77f126890aSEmmanuel Vadot label = "orangepi:green:pwr"; 78f126890aSEmmanuel Vadot gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; 79f126890aSEmmanuel Vadot default-state = "on"; 80f126890aSEmmanuel Vadot }; 81f126890aSEmmanuel Vadot 82f126890aSEmmanuel Vadot led-1 { 83f126890aSEmmanuel Vadot label = "orangepi:red:status"; 84f126890aSEmmanuel Vadot gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>; 85f126890aSEmmanuel Vadot }; 86f126890aSEmmanuel Vadot }; 87f126890aSEmmanuel Vadot 88f126890aSEmmanuel Vadot reg_vcc3v3: vcc3v3 { 89f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 90f126890aSEmmanuel Vadot regulator-name = "vcc3v3"; 91f126890aSEmmanuel Vadot regulator-min-microvolt = <3300000>; 92f126890aSEmmanuel Vadot regulator-max-microvolt = <3300000>; 93f126890aSEmmanuel Vadot }; 94f126890aSEmmanuel Vadot 95*7d0873ebSEmmanuel Vadot wifi_pwrseq: pwrseq { 96f126890aSEmmanuel Vadot compatible = "mmc-pwrseq-simple"; 97f126890aSEmmanuel Vadot reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */ 98f126890aSEmmanuel Vadot post-power-on-delay-ms = <200>; 99f126890aSEmmanuel Vadot }; 100f126890aSEmmanuel Vadot}; 101f126890aSEmmanuel Vadot 102f126890aSEmmanuel Vadot&de { 103f126890aSEmmanuel Vadot status = "okay"; 104f126890aSEmmanuel Vadot}; 105f126890aSEmmanuel Vadot 106f126890aSEmmanuel Vadot&ehci0 { 107f126890aSEmmanuel Vadot status = "okay"; 108f126890aSEmmanuel Vadot}; 109f126890aSEmmanuel Vadot 110f126890aSEmmanuel Vadot&hdmi { 111f126890aSEmmanuel Vadot status = "okay"; 112f126890aSEmmanuel Vadot}; 113f126890aSEmmanuel Vadot 114f126890aSEmmanuel Vadot&hdmi_out { 115f126890aSEmmanuel Vadot hdmi_out_con: endpoint { 116f126890aSEmmanuel Vadot remote-endpoint = <&hdmi_con_in>; 117f126890aSEmmanuel Vadot }; 118f126890aSEmmanuel Vadot}; 119f126890aSEmmanuel Vadot 120f126890aSEmmanuel Vadot&mmc0 { 121f126890aSEmmanuel Vadot vmmc-supply = <®_vcc3v3>; 122f126890aSEmmanuel Vadot bus-width = <4>; 123f126890aSEmmanuel Vadot cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; 124f126890aSEmmanuel Vadot status = "okay"; 125f126890aSEmmanuel Vadot}; 126f126890aSEmmanuel Vadot 127f126890aSEmmanuel Vadot&mmc1 { 128f126890aSEmmanuel Vadot vmmc-supply = <®_vcc3v3>; 129f126890aSEmmanuel Vadot vqmmc-supply = <®_vcc3v3>; 130f126890aSEmmanuel Vadot mmc-pwrseq = <&wifi_pwrseq>; 131f126890aSEmmanuel Vadot bus-width = <4>; 132f126890aSEmmanuel Vadot non-removable; 133f126890aSEmmanuel Vadot status = "okay"; 134f126890aSEmmanuel Vadot 135f126890aSEmmanuel Vadot brcmf: wifi@1 { 136f126890aSEmmanuel Vadot reg = <1>; 137f126890aSEmmanuel Vadot compatible = "brcm,bcm4329-fmac"; 138f126890aSEmmanuel Vadot interrupt-parent = <&r_pio>; 139f126890aSEmmanuel Vadot interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 */ 140f126890aSEmmanuel Vadot interrupt-names = "host-wake"; 141f126890aSEmmanuel Vadot }; 142f126890aSEmmanuel Vadot}; 143f126890aSEmmanuel Vadot 144f126890aSEmmanuel Vadot&mmc2 { 145f126890aSEmmanuel Vadot pinctrl-names = "default"; 146f126890aSEmmanuel Vadot pinctrl-0 = <&mmc2_8bit_pins>; 147f126890aSEmmanuel Vadot vmmc-supply = <®_vcc3v3>; 148f126890aSEmmanuel Vadot bus-width = <8>; 149f126890aSEmmanuel Vadot non-removable; 150f126890aSEmmanuel Vadot cap-mmc-hw-reset; 151f126890aSEmmanuel Vadot status = "okay"; 152f126890aSEmmanuel Vadot}; 153f126890aSEmmanuel Vadot 154f126890aSEmmanuel Vadot&ohci0 { 155f126890aSEmmanuel Vadot status = "okay"; 156f126890aSEmmanuel Vadot}; 157f126890aSEmmanuel Vadot 158f126890aSEmmanuel Vadot&uart0 { 159f126890aSEmmanuel Vadot pinctrl-names = "default"; 160f126890aSEmmanuel Vadot pinctrl-0 = <&uart0_pa_pins>; 161f126890aSEmmanuel Vadot status = "okay"; 162f126890aSEmmanuel Vadot}; 163f126890aSEmmanuel Vadot 164f126890aSEmmanuel Vadot&usb_otg { 165f126890aSEmmanuel Vadot /* 166f126890aSEmmanuel Vadot * According to schematics CN1 MicroUSB port can be used to take 167f126890aSEmmanuel Vadot * external 5V to power up the board VBUS. On the contrary CN1 MicroUSB 168f126890aSEmmanuel Vadot * port cannot provide power externally even if the board is powered 169f126890aSEmmanuel Vadot * via GPIO pins. It thus makes sense to force peripheral mode. 170f126890aSEmmanuel Vadot */ 171f126890aSEmmanuel Vadot dr_mode = "peripheral"; 172f126890aSEmmanuel Vadot status = "okay"; 173f126890aSEmmanuel Vadot}; 174f126890aSEmmanuel Vadot 175f126890aSEmmanuel Vadot&usbphy { 176f126890aSEmmanuel Vadot status = "okay"; 177f126890aSEmmanuel Vadot}; 178