1724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2724ba675SRob Herring/* 3724ba675SRob Herring * Copyright (C) 2019 Karl Palsson <karlp@tweak.net.au> 4724ba675SRob Herring */ 5724ba675SRob Herring 6724ba675SRob Herring/dts-v1/; 7724ba675SRob Herring#include "sun8i-h3.dtsi" 8724ba675SRob Herring#include "sunxi-common-regulators.dtsi" 9724ba675SRob Herring 10724ba675SRob Herring#include <dt-bindings/gpio/gpio.h> 11724ba675SRob Herring#include <dt-bindings/input/input.h> 12724ba675SRob Herring 13724ba675SRob Herring/ { 14724ba675SRob Herring model = "FriendlyARM NanoPi Duo2"; 15724ba675SRob Herring compatible = "friendlyarm,nanopi-duo2", "allwinner,sun8i-h3"; 16724ba675SRob Herring 17724ba675SRob Herring aliases { 18724ba675SRob Herring serial0 = &uart0; 19724ba675SRob Herring }; 20724ba675SRob Herring 21724ba675SRob Herring chosen { 22724ba675SRob Herring stdout-path = "serial0:115200n8"; 23724ba675SRob Herring }; 24724ba675SRob Herring 25724ba675SRob Herring leds { 26724ba675SRob Herring compatible = "gpio-leds"; 27724ba675SRob Herring 28724ba675SRob Herring led-0 { 29724ba675SRob Herring label = "nanopi:red:pwr"; 30724ba675SRob Herring gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ 31724ba675SRob Herring default-state = "on"; 32724ba675SRob Herring }; 33724ba675SRob Herring 34724ba675SRob Herring led-1 { 35724ba675SRob Herring label = "nanopi:green:status"; 36724ba675SRob Herring gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */ 37724ba675SRob Herring }; 38724ba675SRob Herring }; 39724ba675SRob Herring 40724ba675SRob Herring gpio-keys { 41724ba675SRob Herring compatible = "gpio-keys"; 42724ba675SRob Herring 43724ba675SRob Herring key-0 { 44724ba675SRob Herring label = "k1"; 45724ba675SRob Herring linux,code = <BTN_0>; 46724ba675SRob Herring gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; /* PL3 */ 47724ba675SRob Herring }; 48724ba675SRob Herring }; 49724ba675SRob Herring 50724ba675SRob Herring reg_vdd_cpux: vdd-cpux-regulator { 51724ba675SRob Herring compatible = "regulator-gpio"; 52724ba675SRob Herring regulator-name = "vdd-cpux"; 53724ba675SRob Herring regulator-min-microvolt = <1100000>; 54724ba675SRob Herring regulator-max-microvolt = <1300000>; 55724ba675SRob Herring regulator-always-on; 56724ba675SRob Herring regulator-boot-on; 57724ba675SRob Herring regulator-ramp-delay = <50>; /* 4ms */ 58724ba675SRob Herring 59724ba675SRob Herring enable-active-high; 60724ba675SRob Herring enable-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ 61724ba675SRob Herring gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ 62724ba675SRob Herring gpios-states = <0x1>; 63724ba675SRob Herring states = <1100000 0>, <1300000 1>; 64724ba675SRob Herring }; 65724ba675SRob Herring 66724ba675SRob Herring reg_vcc_dram: vcc-dram { 67724ba675SRob Herring compatible = "regulator-fixed"; 68724ba675SRob Herring regulator-name = "vcc-dram"; 69724ba675SRob Herring regulator-min-microvolt = <1500000>; 70724ba675SRob Herring regulator-max-microvolt = <1500000>; 71724ba675SRob Herring regulator-always-on; 72724ba675SRob Herring regulator-boot-on; 73724ba675SRob Herring enable-active-high; 74724ba675SRob Herring gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */ 75724ba675SRob Herring vin-supply = <®_vcc5v0>; 76724ba675SRob Herring }; 77724ba675SRob Herring 78724ba675SRob Herring reg_vdd_sys: vdd-sys { 79724ba675SRob Herring compatible = "regulator-fixed"; 80724ba675SRob Herring regulator-name = "vdd-sys"; 81724ba675SRob Herring regulator-min-microvolt = <1200000>; 82724ba675SRob Herring regulator-max-microvolt = <1200000>; 83724ba675SRob Herring regulator-always-on; 84724ba675SRob Herring regulator-boot-on; 85724ba675SRob Herring enable-active-high; 86724ba675SRob Herring gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ 87724ba675SRob Herring vin-supply = <®_vcc5v0>; 88724ba675SRob Herring }; 89724ba675SRob Herring 90*0f47ef3fSKrzysztof Kozlowski wifi_pwrseq: pwrseq { 91724ba675SRob Herring compatible = "mmc-pwrseq-simple"; 92724ba675SRob Herring reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ 93724ba675SRob Herring clocks = <&rtc CLK_OSC32K_FANOUT>; 94724ba675SRob Herring clock-names = "ext_clock"; 95724ba675SRob Herring }; 96724ba675SRob Herring 97724ba675SRob Herring}; 98724ba675SRob Herring 99724ba675SRob Herring&cpu0 { 100724ba675SRob Herring cpu-supply = <®_vdd_cpux>; 101724ba675SRob Herring}; 102724ba675SRob Herring 103724ba675SRob Herring&ehci0 { 104724ba675SRob Herring status = "okay"; 105724ba675SRob Herring}; 106724ba675SRob Herring 107724ba675SRob Herring&mmc0 { 108724ba675SRob Herring bus-width = <4>; 109724ba675SRob Herring cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ 110724ba675SRob Herring status = "okay"; 111724ba675SRob Herring vmmc-supply = <®_vcc3v3>; 112724ba675SRob Herring}; 113724ba675SRob Herring 114724ba675SRob Herring&mmc1 { 115724ba675SRob Herring vmmc-supply = <®_vcc3v3>; 116724ba675SRob Herring vqmmc-supply = <®_vcc3v3>; 117724ba675SRob Herring mmc-pwrseq = <&wifi_pwrseq>; 118724ba675SRob Herring bus-width = <4>; 119724ba675SRob Herring non-removable; 120724ba675SRob Herring status = "okay"; 121724ba675SRob Herring 122*0f47ef3fSKrzysztof Kozlowski sdio_wifi: wifi@1 { 123724ba675SRob Herring reg = <1>; 124724ba675SRob Herring compatible = "brcm,bcm4329-fmac"; 125724ba675SRob Herring interrupt-parent = <&pio>; 126724ba675SRob Herring interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */ 127724ba675SRob Herring interrupt-names = "host-wake"; 128724ba675SRob Herring }; 129724ba675SRob Herring}; 130724ba675SRob Herring 131724ba675SRob Herring&ohci0 { 132724ba675SRob Herring status = "okay"; 133724ba675SRob Herring}; 134724ba675SRob Herring 135724ba675SRob Herring®_usb0_vbus { 136724ba675SRob Herring gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */ 137724ba675SRob Herring status = "okay"; 138724ba675SRob Herring}; 139724ba675SRob Herring 140724ba675SRob Herring&uart0 { 141724ba675SRob Herring pinctrl-names = "default"; 142724ba675SRob Herring pinctrl-0 = <&uart0_pa_pins>; 143724ba675SRob Herring status = "okay"; 144724ba675SRob Herring}; 145724ba675SRob Herring 146724ba675SRob Herring&uart2 { 147724ba675SRob Herring pinctrl-names = "default"; 148724ba675SRob Herring pinctrl-0 = <&uart2_pins>, <&uart2_rts_cts_pins>; 149724ba675SRob Herring uart-has-rtscts; 150724ba675SRob Herring status = "okay"; 151724ba675SRob Herring 152724ba675SRob Herring bluetooth { 153724ba675SRob Herring compatible = "brcm,bcm43438-bt"; 154724ba675SRob Herring clocks = <&rtc CLK_OSC32K_FANOUT>; 155724ba675SRob Herring clock-names = "lpo"; 156724ba675SRob Herring vbat-supply = <®_vcc3v3>; 157724ba675SRob Herring vddio-supply = <®_vcc3v3>; 158724ba675SRob Herring device-wakeup-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ 159724ba675SRob Herring host-wakeup-gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */ 160724ba675SRob Herring shutdown-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */ 161724ba675SRob Herring }; 162724ba675SRob Herring}; 163724ba675SRob Herring 164724ba675SRob Herring&usb_otg { 165724ba675SRob Herring status = "okay"; 166724ba675SRob Herring dr_mode = "otg"; 167724ba675SRob Herring}; 168724ba675SRob Herring 169724ba675SRob Herring&usbphy { 170724ba675SRob Herring usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ 171724ba675SRob Herring usb0_vbus-supply = <®_usb0_vbus>; 172724ba675SRob Herring status = "okay"; 173724ba675SRob Herring}; 174