0001 /*
0002 * Copyright (C) 2017 Jelle van der Waa <jelle@vdwaa.nl>
0003 *
0004 * This file is dual-licensed: you can use it either under the terms
0005 * of the GPL or the X11 license, at your option. Note that this dual
0006 * licensing only applies to this file, and not this project as a
0007 * whole.
0008 *
0009 * a) This file is free software; you can redistribute it and/or
0010 * modify it under the terms of the GNU General Public License as
0011 * published by the Free Software Foundation; either version 2 of the
0012 * License, or (at your option) any later version.
0013 *
0014 * This file is distributed in the hope that it will be useful,
0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0017 * GNU General Public License for more details.
0018 *
0019 * Or, alternatively,
0020 *
0021 * b) Permission is hereby granted, free of charge, to any person
0022 * obtaining a copy of this software and associated documentation
0023 * files (the "Software"), to deal in the Software without
0024 * restriction, including without limitation the rights to use,
0025 * copy, modify, merge, publish, distribute, sublicense, and/or
0026 * sell copies of the Software, and to permit persons to whom the
0027 * Software is furnished to do so, subject to the following
0028 * conditions:
0029 *
0030 * The above copyright notice and this permission notice shall be
0031 * included in all copies or substantial portions of the Software.
0032 *
0033 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0034 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0035 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0036 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0037 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0038 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0039 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0040 * OTHER DEALINGS IN THE SOFTWARE.
0041 */
0042
0043 /dts-v1/;
0044 #include "sun8i-h3.dtsi"
0045 #include "sunxi-common-regulators.dtsi"
0046
0047 #include <dt-bindings/gpio/gpio.h>
0048
0049 / {
0050 model = "FriendlyARM NanoPi NEO Air";
0051 compatible = "friendlyarm,nanopi-neo-air", "allwinner,sun8i-h3";
0052
0053 aliases {
0054 serial0 = &uart0;
0055 };
0056
0057 chosen {
0058 stdout-path = "serial0:115200n8";
0059 };
0060
0061 leds {
0062 compatible = "gpio-leds";
0063
0064 led-0 {
0065 label = "nanopi:green:pwr";
0066 gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
0067 default-state = "on";
0068 };
0069
0070 led-1 {
0071 label = "nanopi:blue:status";
0072 gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
0073 };
0074 };
0075
0076 wifi_pwrseq: wifi_pwrseq {
0077 compatible = "mmc-pwrseq-simple";
0078 reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
0079 };
0080 };
0081
0082 &mmc0 {
0083 vmmc-supply = <®_vcc3v3>;
0084 bus-width = <4>;
0085 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
0086 status = "okay";
0087 };
0088
0089 &mmc1 {
0090 vmmc-supply = <®_vcc3v3>;
0091 vqmmc-supply = <®_vcc3v3>;
0092 mmc-pwrseq = <&wifi_pwrseq>;
0093 bus-width = <4>;
0094 non-removable;
0095 status = "okay";
0096
0097 brcmf: bcrmf@1 {
0098 reg = <1>;
0099 compatible = "brcm,bcm4329-fmac";
0100 interrupt-parent = <&pio>;
0101 interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
0102 interrupt-names = "host-wake";
0103 };
0104 };
0105
0106 &mmc2 {
0107 pinctrl-names = "default";
0108 pinctrl-0 = <&mmc2_8bit_pins>;
0109 vmmc-supply = <®_vcc3v3>;
0110 vqmmc-supply = <®_vcc3v3>;
0111 bus-width = <8>;
0112 non-removable;
0113 status = "okay";
0114 };
0115
0116 &uart0 {
0117 pinctrl-names = "default";
0118 pinctrl-0 = <&uart0_pa_pins>;
0119 status = "okay";
0120 };
0121
0122 &uart3 {
0123 pinctrl-names = "default";
0124 pinctrl-0 = <&uart3_pins>, <&uart3_rts_cts_pins>;
0125 uart-has-rtscts;
0126 status = "okay";
0127
0128 bluetooth {
0129 compatible = "brcm,bcm43438-bt";
0130 clocks = <&rtc CLK_OSC32K_FANOUT>;
0131 clock-names = "lpo";
0132 vbat-supply = <®_vcc3v3>;
0133 vddio-supply = <®_vcc3v3>;
0134 device-wakeup-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */
0135 host-wakeup-gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */
0136 shutdown-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */
0137 };
0138 };
0139
0140 &usbphy {
0141 /* USB VBUS is always on */
0142 status = "okay";
0143 };