Chen-Yu Tsai | 8d7da69 | 2020-01-12 23:36:13 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | // Copyright (C) 2017 Antony Antony <antony@phenome.org> |
| 3 | // Copyright (C) 2016 ARM Ltd. |
Antony Antony | 4d7b818 | 2017-11-21 10:11:53 +0100 | [diff] [blame] | 4 | |
| 5 | /dts-v1/; |
Antony Antony | 4d7b818 | 2017-11-21 10:11:53 +0100 | [diff] [blame] | 6 | #include "sun50i-h5.dtsi" |
| 7 | |
| 8 | #include <dt-bindings/gpio/gpio.h> |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 9 | #include <dt-bindings/input/input.h> |
| 10 | #include <dt-bindings/pinctrl/sun4i-a10.h> |
Antony Antony | 4d7b818 | 2017-11-21 10:11:53 +0100 | [diff] [blame] | 11 | |
| 12 | / { |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 13 | model = "FriendlyARM NanoPi NEO Plus2"; |
Antony Antony | 4d7b818 | 2017-11-21 10:11:53 +0100 | [diff] [blame] | 14 | compatible = "friendlyarm,nanopi-neo-plus2", "allwinner,sun50i-h5"; |
| 15 | |
| 16 | aliases { |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 17 | ethernet0 = &emac; |
Antony Antony | 4d7b818 | 2017-11-21 10:11:53 +0100 | [diff] [blame] | 18 | serial0 = &uart0; |
| 19 | }; |
| 20 | |
| 21 | chosen { |
| 22 | stdout-path = "serial0:115200n8"; |
| 23 | }; |
| 24 | |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 25 | leds { |
| 26 | compatible = "gpio-leds"; |
| 27 | |
Andre Przywara | 3da6e43 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 28 | led-0 { |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 29 | label = "nanopi:green:pwr"; |
| 30 | gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; |
| 31 | default-state = "on"; |
| 32 | }; |
| 33 | |
Andre Przywara | 3da6e43 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 34 | led-1 { |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 35 | label = "nanopi:red:status"; |
| 36 | gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>; |
| 37 | }; |
| 38 | }; |
| 39 | |
| 40 | reg_gmac_3v3: gmac-3v3 { |
| 41 | compatible = "regulator-fixed"; |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 42 | regulator-name = "gmac-3v3"; |
| 43 | regulator-min-microvolt = <3300000>; |
| 44 | regulator-max-microvolt = <3300000>; |
| 45 | startup-delay-us = <100000>; |
| 46 | enable-active-high; |
| 47 | gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; |
| 48 | }; |
| 49 | |
Antony Antony | 4d7b818 | 2017-11-21 10:11:53 +0100 | [diff] [blame] | 50 | reg_vcc3v3: vcc3v3 { |
| 51 | compatible = "regulator-fixed"; |
| 52 | regulator-name = "vcc3v3"; |
| 53 | regulator-min-microvolt = <3300000>; |
| 54 | regulator-max-microvolt = <3300000>; |
| 55 | }; |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 56 | |
| 57 | vdd_cpux: gpio-regulator { |
| 58 | compatible = "regulator-gpio"; |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 59 | regulator-name = "vdd-cpux"; |
| 60 | regulator-type = "voltage"; |
| 61 | regulator-boot-on; |
| 62 | regulator-always-on; |
| 63 | regulator-min-microvolt = <1100000>; |
| 64 | regulator-max-microvolt = <1300000>; |
| 65 | regulator-ramp-delay = <50>; /* 4ms */ |
| 66 | gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; |
| 67 | gpios-states = <0x1>; |
Chen-Yu Tsai | 8d7da69 | 2020-01-12 23:36:13 +0800 | [diff] [blame] | 68 | states = <1100000 0>, <1300000 1>; |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 69 | }; |
| 70 | |
| 71 | wifi_pwrseq: wifi_pwrseq { |
| 72 | compatible = "mmc-pwrseq-simple"; |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 73 | reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ |
| 74 | post-power-on-delay-ms = <200>; |
| 75 | }; |
| 76 | }; |
| 77 | |
| 78 | &codec { |
| 79 | allwinner,audio-routing = |
| 80 | "Line Out", "LINEOUT", |
| 81 | "MIC1", "Mic", |
| 82 | "Mic", "MBIAS"; |
| 83 | status = "okay"; |
Antony Antony | 4d7b818 | 2017-11-21 10:11:53 +0100 | [diff] [blame] | 84 | }; |
| 85 | |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 86 | &ehci0 { |
Antony Antony | 4d7b818 | 2017-11-21 10:11:53 +0100 | [diff] [blame] | 87 | status = "okay"; |
| 88 | }; |
| 89 | |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 90 | &ehci3 { |
| 91 | status = "okay"; |
| 92 | }; |
| 93 | |
| 94 | &emac { |
| 95 | pinctrl-names = "default"; |
| 96 | pinctrl-0 = <&emac_rgmii_pins>; |
| 97 | phy-supply = <®_gmac_3v3>; |
| 98 | phy-handle = <&ext_rgmii_phy>; |
Andre Przywara | 3da6e43 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 99 | phy-mode = "rgmii-id"; |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 100 | status = "okay"; |
| 101 | }; |
| 102 | |
| 103 | &external_mdio { |
| 104 | ext_rgmii_phy: ethernet-phy@7 { |
| 105 | compatible = "ethernet-phy-ieee802.3-c22"; |
| 106 | reg = <7>; |
| 107 | }; |
| 108 | }; |
| 109 | |
Antony Antony | 4d7b818 | 2017-11-21 10:11:53 +0100 | [diff] [blame] | 110 | &mmc0 { |
Antony Antony | 4d7b818 | 2017-11-21 10:11:53 +0100 | [diff] [blame] | 111 | vmmc-supply = <®_vcc3v3>; |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 112 | bus-width = <4>; |
| 113 | cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ |
| 114 | status = "okay"; |
| 115 | }; |
| 116 | |
| 117 | &mmc1 { |
| 118 | vmmc-supply = <®_vcc3v3>; |
| 119 | vqmmc-supply = <®_vcc3v3>; |
| 120 | mmc-pwrseq = <&wifi_pwrseq>; |
Antony Antony | 4d7b818 | 2017-11-21 10:11:53 +0100 | [diff] [blame] | 121 | bus-width = <4>; |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 122 | non-removable; |
Antony Antony | 4d7b818 | 2017-11-21 10:11:53 +0100 | [diff] [blame] | 123 | status = "okay"; |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 124 | |
| 125 | brcmf: wifi@1 { |
| 126 | reg = <1>; |
| 127 | compatible = "brcm,bcm4329-fmac"; |
| 128 | }; |
Antony Antony | 4d7b818 | 2017-11-21 10:11:53 +0100 | [diff] [blame] | 129 | }; |
| 130 | |
| 131 | &mmc2 { |
| 132 | pinctrl-names = "default"; |
| 133 | pinctrl-0 = <&mmc2_8bit_pins>; |
| 134 | vmmc-supply = <®_vcc3v3>; |
| 135 | bus-width = <8>; |
| 136 | non-removable; |
| 137 | cap-mmc-hw-reset; |
| 138 | status = "okay"; |
| 139 | }; |
| 140 | |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 141 | &ohci0 { |
| 142 | status = "okay"; |
| 143 | }; |
| 144 | |
| 145 | &ohci3 { |
Antony Antony | 4d7b818 | 2017-11-21 10:11:53 +0100 | [diff] [blame] | 146 | status = "okay"; |
| 147 | }; |
| 148 | |
| 149 | &uart0 { |
| 150 | pinctrl-names = "default"; |
Chen-Yu Tsai | 8d7da69 | 2020-01-12 23:36:13 +0800 | [diff] [blame] | 151 | pinctrl-0 = <&uart0_pa_pins>; |
Antony Antony | 4d7b818 | 2017-11-21 10:11:53 +0100 | [diff] [blame] | 152 | status = "okay"; |
| 153 | }; |
| 154 | |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 155 | &usb_otg { |
| 156 | dr_mode = "host"; |
| 157 | status = "okay"; |
| 158 | }; |
| 159 | |
Antony Antony | 4d7b818 | 2017-11-21 10:11:53 +0100 | [diff] [blame] | 160 | &usbphy { |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 161 | /* USB Type-A ports' VBUS is always on */ |
Antony Antony | 4d7b818 | 2017-11-21 10:11:53 +0100 | [diff] [blame] | 162 | status = "okay"; |
| 163 | }; |