1f126890aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2f126890aSEmmanuel Vadot/* 3f126890aSEmmanuel Vadot * Copyright (C) 2019 Igor Pecovnik <igor@armbian.com> 4f126890aSEmmanuel Vadot * Copyright (C) 2020 Jayantajit Gogoi <jayanta.gogoi525@gmail.com> 5f126890aSEmmanuel Vadot * Copyright (C) 2020 Yu-Tung Chang <mtwget@gmail.com> 6f126890aSEmmanuel Vadot*/ 7f126890aSEmmanuel Vadot 8f126890aSEmmanuel Vadot#include "sun8i-h3-nanopi.dtsi" 9f126890aSEmmanuel Vadot#include <dt-bindings/leds/common.h> 10f126890aSEmmanuel Vadot 11f126890aSEmmanuel Vadot/ { 12f126890aSEmmanuel Vadot model = "FriendlyARM NanoPi R1"; 13f126890aSEmmanuel Vadot compatible = "friendlyarm,nanopi-r1", "allwinner,sun8i-h3"; 14f126890aSEmmanuel Vadot 15f126890aSEmmanuel Vadot aliases { 16f126890aSEmmanuel Vadot serial1 = &uart1; 17f126890aSEmmanuel Vadot ethernet0 = &emac; 18f126890aSEmmanuel Vadot ethernet1 = &wifi; 19f126890aSEmmanuel Vadot }; 20f126890aSEmmanuel Vadot 21f126890aSEmmanuel Vadot reg_gmac_3v3: gmac-3v3 { 22f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 23f126890aSEmmanuel Vadot regulator-name = "gmac-3v3"; 24f126890aSEmmanuel Vadot regulator-min-microvolt = <3300000>; 25f126890aSEmmanuel Vadot regulator-max-microvolt = <3300000>; 26f126890aSEmmanuel Vadot startup-delay-us = <100000>; 27f126890aSEmmanuel Vadot enable-active-high; 28f126890aSEmmanuel Vadot gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */ 29f126890aSEmmanuel Vadot }; 30f126890aSEmmanuel Vadot 31f126890aSEmmanuel Vadot reg_vdd_cpux: gpio-regulator { 32f126890aSEmmanuel Vadot compatible = "regulator-gpio"; 33f126890aSEmmanuel Vadot regulator-name = "vdd-cpux"; 34f126890aSEmmanuel Vadot regulator-type = "voltage"; 35f126890aSEmmanuel Vadot regulator-boot-on; 36f126890aSEmmanuel Vadot regulator-always-on; 37f126890aSEmmanuel Vadot regulator-min-microvolt = <1100000>; 38f126890aSEmmanuel Vadot regulator-max-microvolt = <1300000>; 39f126890aSEmmanuel Vadot regulator-ramp-delay = <50>; 40f126890aSEmmanuel Vadot gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ 41f126890aSEmmanuel Vadot gpios-states = <0x1>; 42f126890aSEmmanuel Vadot states = <1100000 0x0>, 43f126890aSEmmanuel Vadot <1300000 0x1>; 44f126890aSEmmanuel Vadot }; 45f126890aSEmmanuel Vadot 46*7d0873ebSEmmanuel Vadot wifi_pwrseq: pwrseq { 47f126890aSEmmanuel Vadot compatible = "mmc-pwrseq-simple"; 48f126890aSEmmanuel Vadot reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ 49f126890aSEmmanuel Vadot clocks = <&rtc CLK_OSC32K_FANOUT>; 50f126890aSEmmanuel Vadot clock-names = "ext_clock"; 51f126890aSEmmanuel Vadot }; 52f126890aSEmmanuel Vadot 53f126890aSEmmanuel Vadot leds { 54f126890aSEmmanuel Vadot led-2 { 55f126890aSEmmanuel Vadot function = LED_FUNCTION_WAN; 56f126890aSEmmanuel Vadot color = <LED_COLOR_ID_GREEN>; 57f126890aSEmmanuel Vadot gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */ 58f126890aSEmmanuel Vadot }; 59f126890aSEmmanuel Vadot 60f126890aSEmmanuel Vadot led-3 { 61f126890aSEmmanuel Vadot function = LED_FUNCTION_LAN; 62f126890aSEmmanuel Vadot color = <LED_COLOR_ID_GREEN>; 63f126890aSEmmanuel Vadot gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>; /* PA9 */ 64f126890aSEmmanuel Vadot }; 65f126890aSEmmanuel Vadot }; 66f126890aSEmmanuel Vadot}; 67f126890aSEmmanuel Vadot 68f126890aSEmmanuel Vadot&cpu0 { 69f126890aSEmmanuel Vadot cpu-supply = <®_vdd_cpux>; 70f126890aSEmmanuel Vadot}; 71f126890aSEmmanuel Vadot 72f126890aSEmmanuel Vadot&ehci1 { 73f126890aSEmmanuel Vadot status = "okay"; 74f126890aSEmmanuel Vadot}; 75f126890aSEmmanuel Vadot 76f126890aSEmmanuel Vadot&ehci2 { 77f126890aSEmmanuel Vadot status = "okay"; 78f126890aSEmmanuel Vadot}; 79f126890aSEmmanuel Vadot 80f126890aSEmmanuel Vadot&emac { 81f126890aSEmmanuel Vadot pinctrl-names = "default"; 82f126890aSEmmanuel Vadot pinctrl-0 = <&emac_rgmii_pins>; 83f126890aSEmmanuel Vadot phy-supply = <®_gmac_3v3>; 84f126890aSEmmanuel Vadot phy-handle = <&ext_rgmii_phy>; 85f126890aSEmmanuel Vadot phy-mode = "rgmii-id"; 86f126890aSEmmanuel Vadot status = "okay"; 87f126890aSEmmanuel Vadot}; 88f126890aSEmmanuel Vadot 89f126890aSEmmanuel Vadot&external_mdio { 90f126890aSEmmanuel Vadot ext_rgmii_phy: ethernet-phy@7 { 91f126890aSEmmanuel Vadot compatible = "ethernet-phy-ieee802.3-c22"; 92f126890aSEmmanuel Vadot reg = <7>; 93f126890aSEmmanuel Vadot }; 94f126890aSEmmanuel Vadot}; 95f126890aSEmmanuel Vadot 96f126890aSEmmanuel Vadot&mmc1 { 97f126890aSEmmanuel Vadot vmmc-supply = <®_vcc3v3>; 98f126890aSEmmanuel Vadot vqmmc-supply = <®_vcc3v3>; 99f126890aSEmmanuel Vadot mmc-pwrseq = <&wifi_pwrseq>; 100f126890aSEmmanuel Vadot bus-width = <4>; 101f126890aSEmmanuel Vadot non-removable; 102f126890aSEmmanuel Vadot status = "okay"; 103f126890aSEmmanuel Vadot 104f126890aSEmmanuel Vadot wifi: wifi@1 { 105f126890aSEmmanuel Vadot reg = <1>; 106f126890aSEmmanuel Vadot compatible = "brcm,bcm4329-fmac"; 107f126890aSEmmanuel Vadot interrupt-parent = <&pio>; 108f126890aSEmmanuel Vadot interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */ 109f126890aSEmmanuel Vadot interrupt-names = "host-wake"; 110f126890aSEmmanuel Vadot }; 111f126890aSEmmanuel Vadot}; 112f126890aSEmmanuel Vadot 113f126890aSEmmanuel Vadot&mmc2 { 114f126890aSEmmanuel Vadot pinctrl-names = "default"; 115f126890aSEmmanuel Vadot pinctrl-0 = <&mmc2_8bit_pins>; 116f126890aSEmmanuel Vadot vmmc-supply = <®_vcc3v3>; 117f126890aSEmmanuel Vadot vqmmc-supply = <®_vcc3v3>; 118f126890aSEmmanuel Vadot bus-width = <8>; 119f126890aSEmmanuel Vadot non-removable; 120f126890aSEmmanuel Vadot status = "okay"; 121f126890aSEmmanuel Vadot}; 122f126890aSEmmanuel Vadot 123f126890aSEmmanuel Vadot&ohci1 { 124f126890aSEmmanuel Vadot status = "okay"; 125f126890aSEmmanuel Vadot}; 126f126890aSEmmanuel Vadot 127f126890aSEmmanuel Vadot&ohci2 { 128f126890aSEmmanuel Vadot status = "okay"; 129f126890aSEmmanuel Vadot}; 130f126890aSEmmanuel Vadot 131f126890aSEmmanuel Vadot®_usb0_vbus { 132f126890aSEmmanuel Vadot gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */ 133f126890aSEmmanuel Vadot status = "okay"; 134f126890aSEmmanuel Vadot}; 135f126890aSEmmanuel Vadot 136f126890aSEmmanuel Vadot&uart1 { 137f126890aSEmmanuel Vadot pinctrl-names = "default"; 138f126890aSEmmanuel Vadot pinctrl-0 = <&uart1_pins>; 139f126890aSEmmanuel Vadot status = "okay"; 140f126890aSEmmanuel Vadot}; 141f126890aSEmmanuel Vadot 142f126890aSEmmanuel Vadot&uart3 { 143f126890aSEmmanuel Vadot pinctrl-names = "default"; 144f126890aSEmmanuel Vadot pinctrl-0 = <&uart3_pins>, <&uart3_rts_cts_pins>; 145f126890aSEmmanuel Vadot uart-has-rtscts; 146f126890aSEmmanuel Vadot status = "okay"; 147f126890aSEmmanuel Vadot 148f126890aSEmmanuel Vadot bluetooth { 149f126890aSEmmanuel Vadot compatible = "brcm,bcm43438-bt"; 150f126890aSEmmanuel Vadot clocks = <&rtc CLK_OSC32K_FANOUT>; 151f126890aSEmmanuel Vadot clock-names = "lpo"; 152f126890aSEmmanuel Vadot vbat-supply = <®_vcc3v3>; 153f126890aSEmmanuel Vadot vddio-supply = <®_vcc3v3>; 154f126890aSEmmanuel Vadot device-wakeup-gpios = <&pio 0 8 GPIO_ACTIVE_HIGH>; /* PA8 */ 155f126890aSEmmanuel Vadot host-wakeup-gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */ 156f126890aSEmmanuel Vadot shutdown-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */ 157f126890aSEmmanuel Vadot }; 158f126890aSEmmanuel Vadot}; 159f126890aSEmmanuel Vadot 160f126890aSEmmanuel Vadot&usb_otg { 161f126890aSEmmanuel Vadot status = "okay"; 162f126890aSEmmanuel Vadot dr_mode = "otg"; 163f126890aSEmmanuel Vadot}; 164f126890aSEmmanuel Vadot 165f126890aSEmmanuel Vadot&usbphy { 166f126890aSEmmanuel Vadot usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ 167f126890aSEmmanuel Vadot usb0_vbus-supply = <®_usb0_vbus>; 168f126890aSEmmanuel Vadot status = "okay"; 169f126890aSEmmanuel Vadot}; 170