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 Icenowy Zheng <icenowy@aosc.xyz> |
| 3 | // Based on sun50i-h5-orangepi-pc2.dts, which is: |
| 4 | // Copyright (C) 2016 ARM Ltd. |
Jagan Teki | ca4cdf9 | 2017-05-24 19:18:08 +0000 | [diff] [blame] | 5 | |
| 6 | /dts-v1/; |
Jagan Teki | ca4cdf9 | 2017-05-24 19:18:08 +0000 | [diff] [blame] | 7 | #include "sun50i-h5.dtsi" |
| 8 | |
| 9 | #include <dt-bindings/gpio/gpio.h> |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 10 | #include <dt-bindings/input/input.h> |
Jagan Teki | ca4cdf9 | 2017-05-24 19:18:08 +0000 | [diff] [blame] | 11 | |
| 12 | / { |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 13 | model = "Xunlong Orange Pi Prime"; |
Jagan Teki | ca4cdf9 | 2017-05-24 19:18:08 +0000 | [diff] [blame] | 14 | compatible = "xunlong,orangepi-prime", "allwinner,sun50i-h5"; |
| 15 | |
| 16 | aliases { |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 17 | ethernet0 = &emac; |
Jagan Teki | ca4cdf9 | 2017-05-24 19:18:08 +0000 | [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 | connector { |
| 26 | compatible = "hdmi-connector"; |
| 27 | type = "a"; |
| 28 | |
| 29 | port { |
| 30 | hdmi_con_in: endpoint { |
| 31 | remote-endpoint = <&hdmi_out_con>; |
| 32 | }; |
| 33 | }; |
Jagan Teki | ca4cdf9 | 2017-05-24 19:18:08 +0000 | [diff] [blame] | 34 | }; |
| 35 | |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 36 | leds { |
| 37 | compatible = "gpio-leds"; |
| 38 | |
Andre Przywara | 3da6e43 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 39 | led-0 { |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 40 | label = "orangepi:green:pwr"; |
| 41 | gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; |
| 42 | default-state = "on"; |
Jagan Teki | ca4cdf9 | 2017-05-24 19:18:08 +0000 | [diff] [blame] | 43 | }; |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 44 | |
Andre Przywara | 3da6e43 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 45 | led-1 { |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 46 | label = "orangepi:red:status"; |
| 47 | gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>; |
| 48 | }; |
| 49 | }; |
| 50 | |
Andre Przywara | 5eb4bbe | 2022-09-11 00:04:41 +0100 | [diff] [blame] | 51 | gpio-keys { |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 52 | compatible = "gpio-keys"; |
| 53 | |
Andre Przywara | 5eb4bbe | 2022-09-11 00:04:41 +0100 | [diff] [blame] | 54 | key-sw4 { |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 55 | label = "sw4"; |
| 56 | linux,code = <BTN_0>; |
| 57 | gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; |
| 58 | }; |
| 59 | }; |
| 60 | |
| 61 | reg_gmac_3v3: gmac-3v3 { |
| 62 | compatible = "regulator-fixed"; |
| 63 | regulator-name = "gmac-3v3"; |
| 64 | regulator-min-microvolt = <3300000>; |
| 65 | regulator-max-microvolt = <3300000>; |
| 66 | startup-delay-us = <100000>; |
| 67 | enable-active-high; |
| 68 | gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; |
| 69 | }; |
| 70 | |
| 71 | reg_vcc3v3: vcc3v3 { |
| 72 | compatible = "regulator-fixed"; |
| 73 | regulator-name = "vcc3v3"; |
| 74 | regulator-min-microvolt = <3300000>; |
| 75 | regulator-max-microvolt = <3300000>; |
| 76 | }; |
| 77 | |
| 78 | reg_usb0_vbus: usb0-vbus { |
| 79 | compatible = "regulator-fixed"; |
| 80 | regulator-name = "usb0-vbus"; |
| 81 | regulator-min-microvolt = <5000000>; |
| 82 | regulator-max-microvolt = <5000000>; |
| 83 | enable-active-high; |
| 84 | gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */ |
| 85 | status = "okay"; |
Jagan Teki | ca4cdf9 | 2017-05-24 19:18:08 +0000 | [diff] [blame] | 86 | }; |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 87 | |
| 88 | wifi_pwrseq: wifi_pwrseq { |
| 89 | compatible = "mmc-pwrseq-simple"; |
| 90 | reset-gpios = <&pio 2 14 GPIO_ACTIVE_LOW>; /* PC14 */ |
| 91 | }; |
| 92 | }; |
| 93 | |
| 94 | &codec { |
| 95 | allwinner,audio-routing = |
| 96 | "Line Out", "LINEOUT", |
| 97 | "MIC1", "Mic", |
| 98 | "Mic", "MBIAS"; |
| 99 | status = "okay"; |
| 100 | }; |
| 101 | |
| 102 | &de { |
| 103 | status = "okay"; |
Jagan Teki | ca4cdf9 | 2017-05-24 19:18:08 +0000 | [diff] [blame] | 104 | }; |
| 105 | |
Jagan Teki | 9505982 | 2018-05-07 13:03:50 +0530 | [diff] [blame] | 106 | &ehci0 { |
| 107 | status = "okay"; |
| 108 | }; |
| 109 | |
Jagan Teki | e7bf823 | 2017-11-29 13:14:23 +0530 | [diff] [blame] | 110 | &ehci1 { |
| 111 | status = "okay"; |
| 112 | }; |
| 113 | |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 114 | &ehci2 { |
| 115 | status = "okay"; |
| 116 | }; |
| 117 | |
| 118 | &ehci3 { |
| 119 | status = "okay"; |
| 120 | }; |
| 121 | |
| 122 | &emac { |
| 123 | pinctrl-names = "default"; |
| 124 | pinctrl-0 = <&emac_rgmii_pins>; |
| 125 | phy-supply = <®_gmac_3v3>; |
| 126 | phy-handle = <&ext_rgmii_phy>; |
Andre Przywara | 3da6e43 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 127 | phy-mode = "rgmii-id"; |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 128 | status = "okay"; |
| 129 | }; |
| 130 | |
| 131 | &external_mdio { |
| 132 | ext_rgmii_phy: ethernet-phy@1 { |
| 133 | compatible = "ethernet-phy-ieee802.3-c22"; |
| 134 | reg = <1>; |
| 135 | }; |
| 136 | }; |
| 137 | |
| 138 | &hdmi { |
| 139 | status = "okay"; |
| 140 | }; |
| 141 | |
| 142 | &hdmi_out { |
| 143 | hdmi_out_con: endpoint { |
| 144 | remote-endpoint = <&hdmi_con_in>; |
| 145 | }; |
| 146 | }; |
| 147 | |
| 148 | &ir { |
| 149 | pinctrl-names = "default"; |
Chen-Yu Tsai | 8d7da69 | 2020-01-12 23:36:13 +0800 | [diff] [blame] | 150 | pinctrl-0 = <&r_ir_rx_pin>; |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 151 | status = "okay"; |
| 152 | }; |
| 153 | |
Jagan Teki | ca4cdf9 | 2017-05-24 19:18:08 +0000 | [diff] [blame] | 154 | &mmc0 { |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 155 | vmmc-supply = <®_vcc3v3>; |
| 156 | bus-width = <4>; |
| 157 | cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ |
| 158 | status = "okay"; |
| 159 | }; |
| 160 | |
| 161 | &mmc1 { |
Jagan Teki | ca4cdf9 | 2017-05-24 19:18:08 +0000 | [diff] [blame] | 162 | vmmc-supply = <®_vcc3v3>; |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 163 | mmc-pwrseq = <&wifi_pwrseq>; |
Jagan Teki | ca4cdf9 | 2017-05-24 19:18:08 +0000 | [diff] [blame] | 164 | bus-width = <4>; |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 165 | non-removable; |
Jagan Teki | ca4cdf9 | 2017-05-24 19:18:08 +0000 | [diff] [blame] | 166 | status = "okay"; |
| 167 | }; |
| 168 | |
Jagan Teki | 9505982 | 2018-05-07 13:03:50 +0530 | [diff] [blame] | 169 | &ohci0 { |
| 170 | status = "okay"; |
| 171 | }; |
| 172 | |
Jagan Teki | e7bf823 | 2017-11-29 13:14:23 +0530 | [diff] [blame] | 173 | &ohci1 { |
| 174 | status = "okay"; |
| 175 | }; |
| 176 | |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 177 | &ohci2 { |
| 178 | status = "okay"; |
| 179 | }; |
| 180 | |
| 181 | &ohci3 { |
| 182 | status = "okay"; |
| 183 | }; |
| 184 | |
Jagan Teki | ca4cdf9 | 2017-05-24 19:18:08 +0000 | [diff] [blame] | 185 | &uart0 { |
| 186 | pinctrl-names = "default"; |
Chen-Yu Tsai | 8d7da69 | 2020-01-12 23:36:13 +0800 | [diff] [blame] | 187 | pinctrl-0 = <&uart0_pa_pins>; |
Jagan Teki | ca4cdf9 | 2017-05-24 19:18:08 +0000 | [diff] [blame] | 188 | status = "okay"; |
| 189 | }; |
| 190 | |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 191 | &uart1 { |
| 192 | pinctrl-names = "default"; |
| 193 | pinctrl-0 = <&uart1_pins>; |
| 194 | status = "disabled"; |
| 195 | }; |
| 196 | |
| 197 | &uart2 { |
| 198 | pinctrl-names = "default"; |
| 199 | pinctrl-0 = <&uart2_pins>; |
| 200 | status = "disabled"; |
| 201 | }; |
| 202 | |
Jagan Teki | 9505982 | 2018-05-07 13:03:50 +0530 | [diff] [blame] | 203 | &usb_otg { |
| 204 | dr_mode = "otg"; |
| 205 | status = "okay"; |
| 206 | }; |
| 207 | |
Jagan Teki | ca4cdf9 | 2017-05-24 19:18:08 +0000 | [diff] [blame] | 208 | &usbphy { |
Andre Przywara | e237db6 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 209 | /* USB Type-A ports' VBUS is always on */ |
| 210 | usb0_id_det-gpios = <&pio 0 21 GPIO_ACTIVE_HIGH>; /* PA21 */ |
| 211 | usb0_vbus-supply = <®_usb0_vbus>; |
Jagan Teki | ca4cdf9 | 2017-05-24 19:18:08 +0000 | [diff] [blame] | 212 | status = "okay"; |
| 213 | }; |