0001 /*
0002 * Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
0003 * Copyright (C) 2018 Diego Rondini <diego.rondini@kynetics.com>
0004 *
0005 * This file is dual-licensed: you can use it either under the terms
0006 * of the GPL or the X11 license, at your option. Note that this dual
0007 * licensing only applies to this file, and not this project as a
0008 * whole.
0009 *
0010 * a) This file is free software; you can redistribute it and/or
0011 * modify it under the terms of the GNU General Public License as
0012 * published by the Free Software Foundation; either version 2 of the
0013 * License, or (at your option) any later version.
0014 *
0015 * This file is distributed in the hope that it will be useful,
0016 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0018 * GNU General Public License for more details.
0019 *
0020 * Or, alternatively,
0021 *
0022 * b) Permission is hereby granted, free of charge, to any person
0023 * obtaining a copy of this software and associated documentation
0024 * files (the "Software"), to deal in the Software without
0025 * restriction, including without limitation the rights to use,
0026 * copy, modify, merge, publish, distribute, sublicense, and/or
0027 * sell copies of the Software, and to permit persons to whom the
0028 * Software is furnished to do so, subject to the following
0029 * conditions:
0030 *
0031 * The above copyright notice and this permission notice shall be
0032 * included in all copies or substantial portions of the Software.
0033 *
0034 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0035 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0036 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0037 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0038 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0039 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0040 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0041 * OTHER DEALINGS IN THE SOFTWARE.
0042 */
0043
0044 /dts-v1/;
0045
0046 #include "sun8i-h3.dtsi"
0047
0048 #include <dt-bindings/gpio/gpio.h>
0049
0050 / {
0051 model = "OrangePi Zero Plus2 H3";
0052 compatible = "xunlong,orangepi-zero-plus2-h3", "allwinner,sun8i-h3";
0053
0054 aliases {
0055 serial0 = &uart0;
0056 };
0057
0058 chosen {
0059 stdout-path = "serial0:115200n8";
0060 };
0061
0062 connector {
0063 compatible = "hdmi-connector";
0064 type = "a";
0065
0066 port {
0067 hdmi_con_in: endpoint {
0068 remote-endpoint = <&hdmi_out_con>;
0069 };
0070 };
0071 };
0072
0073 leds {
0074 compatible = "gpio-leds";
0075
0076 led-0 {
0077 label = "orangepi:green:pwr";
0078 gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
0079 default-state = "on";
0080 };
0081
0082 led-1 {
0083 label = "orangepi:red:status";
0084 gpios = <&pio 0 17 GPIO_ACTIVE_HIGH>;
0085 };
0086 };
0087
0088 reg_vcc3v3: vcc3v3 {
0089 compatible = "regulator-fixed";
0090 regulator-name = "vcc3v3";
0091 regulator-min-microvolt = <3300000>;
0092 regulator-max-microvolt = <3300000>;
0093 };
0094
0095 wifi_pwrseq: wifi_pwrseq {
0096 compatible = "mmc-pwrseq-simple";
0097 reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
0098 post-power-on-delay-ms = <200>;
0099 };
0100 };
0101
0102 &de {
0103 status = "okay";
0104 };
0105
0106 &ehci0 {
0107 status = "okay";
0108 };
0109
0110 &hdmi {
0111 status = "okay";
0112 };
0113
0114 &hdmi_out {
0115 hdmi_out_con: endpoint {
0116 remote-endpoint = <&hdmi_con_in>;
0117 };
0118 };
0119
0120 &mmc0 {
0121 vmmc-supply = <®_vcc3v3>;
0122 bus-width = <4>;
0123 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
0124 status = "okay";
0125 };
0126
0127 &mmc1 {
0128 vmmc-supply = <®_vcc3v3>;
0129 vqmmc-supply = <®_vcc3v3>;
0130 mmc-pwrseq = <&wifi_pwrseq>;
0131 bus-width = <4>;
0132 non-removable;
0133 status = "okay";
0134
0135 brcmf: wifi@1 {
0136 reg = <1>;
0137 compatible = "brcm,bcm4329-fmac";
0138 interrupt-parent = <&r_pio>;
0139 interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 */
0140 interrupt-names = "host-wake";
0141 };
0142 };
0143
0144 &mmc2 {
0145 pinctrl-names = "default";
0146 pinctrl-0 = <&mmc2_8bit_pins>;
0147 vmmc-supply = <®_vcc3v3>;
0148 bus-width = <8>;
0149 non-removable;
0150 cap-mmc-hw-reset;
0151 status = "okay";
0152 };
0153
0154 &ohci0 {
0155 status = "okay";
0156 };
0157
0158 &uart0 {
0159 pinctrl-names = "default";
0160 pinctrl-0 = <&uart0_pa_pins>;
0161 status = "okay";
0162 };
0163
0164 &usb_otg {
0165 /*
0166 * According to schematics CN1 MicroUSB port can be used to take
0167 * external 5V to power up the board VBUS. On the contrary CN1 MicroUSB
0168 * port cannot provide power externally even if the board is powered
0169 * via GPIO pins. It thus makes sense to force peripheral mode.
0170 */
0171 dr_mode = "peripheral";
0172 status = "okay";
0173 };
0174
0175 &usbphy {
0176 status = "okay";
0177 };