Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | // Copyright (C) 2018 Amarula Solutions |
| 3 | // Author: Jagan Teki <jagan@amarulasolutions.com> |
Jagan Teki | 4c44d50 | 2018-11-05 13:20:39 +0530 | [diff] [blame] | 4 | |
| 5 | /dts-v1/; |
| 6 | |
| 7 | #include "sun50i-h6.dtsi" |
| 8 | |
| 9 | #include <dt-bindings/gpio/gpio.h> |
| 10 | |
| 11 | / { |
| 12 | model = "OrangePi One Plus"; |
| 13 | compatible = "xunlong,orangepi-one-plus", "allwinner,sun50i-h6"; |
| 14 | |
| 15 | aliases { |
| 16 | serial0 = &uart0; |
| 17 | }; |
| 18 | |
| 19 | chosen { |
| 20 | stdout-path = "serial0:115200n8"; |
| 21 | }; |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 22 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 23 | connector { |
| 24 | compatible = "hdmi-connector"; |
| 25 | type = "a"; |
| 26 | ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */ |
| 27 | |
| 28 | port { |
| 29 | hdmi_con_in: endpoint { |
| 30 | remote-endpoint = <&hdmi_out_con>; |
| 31 | }; |
| 32 | }; |
| 33 | }; |
| 34 | |
Andre Przywara | 3b79821 | 2024-04-19 17:59:52 +0100 | [diff] [blame] | 35 | ext_osc32k: ext-osc32k-clk { |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 36 | #clock-cells = <0>; |
| 37 | compatible = "fixed-clock"; |
| 38 | clock-frequency = <32768>; |
| 39 | clock-output-names = "ext_osc32k"; |
| 40 | }; |
| 41 | |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 42 | leds { |
| 43 | compatible = "gpio-leds"; |
| 44 | |
Andre Przywara | 787f5a0 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 45 | led-0 { |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 46 | label = "orangepi:red:power"; |
| 47 | gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */ |
| 48 | default-state = "on"; |
| 49 | }; |
| 50 | |
Andre Przywara | 787f5a0 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 51 | led-1 { |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 52 | label = "orangepi:green:status"; |
| 53 | gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ |
| 54 | }; |
| 55 | }; |
| 56 | |
| 57 | reg_vcc5v: vcc5v { |
| 58 | /* board wide 5V supply directly from the DC jack */ |
| 59 | compatible = "regulator-fixed"; |
| 60 | regulator-name = "vcc-5v"; |
| 61 | regulator-min-microvolt = <5000000>; |
| 62 | regulator-max-microvolt = <5000000>; |
| 63 | regulator-always-on; |
| 64 | }; |
| 65 | }; |
| 66 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 67 | &de { |
| 68 | status = "okay"; |
| 69 | }; |
| 70 | |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 71 | &ehci0 { |
| 72 | status = "okay"; |
| 73 | }; |
| 74 | |
| 75 | &ehci3 { |
| 76 | status = "okay"; |
Jagan Teki | 4c44d50 | 2018-11-05 13:20:39 +0530 | [diff] [blame] | 77 | }; |
| 78 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 79 | &gpu { |
| 80 | mali-supply = <®_dcdcc>; |
| 81 | status = "okay"; |
| 82 | }; |
| 83 | |
| 84 | &hdmi { |
| 85 | status = "okay"; |
| 86 | }; |
| 87 | |
| 88 | &hdmi_out { |
| 89 | hdmi_out_con: endpoint { |
| 90 | remote-endpoint = <&hdmi_con_in>; |
| 91 | }; |
| 92 | }; |
| 93 | |
Jagan Teki | 4c44d50 | 2018-11-05 13:20:39 +0530 | [diff] [blame] | 94 | &mmc0 { |
Jagan Teki | 4c44d50 | 2018-11-05 13:20:39 +0530 | [diff] [blame] | 95 | vmmc-supply = <®_cldo1>; |
| 96 | cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; |
| 97 | bus-width = <4>; |
| 98 | status = "okay"; |
| 99 | }; |
| 100 | |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 101 | &ohci0 { |
| 102 | status = "okay"; |
| 103 | }; |
| 104 | |
| 105 | &ohci3 { |
| 106 | status = "okay"; |
| 107 | }; |
| 108 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 109 | &pio { |
| 110 | vcc-pc-supply = <®_bldo2>; |
| 111 | vcc-pd-supply = <®_cldo1>; |
| 112 | vcc-pg-supply = <®_aldo1>; |
| 113 | }; |
| 114 | |
Samuel Holland | 399a01f | 2022-04-27 15:31:31 -0500 | [diff] [blame] | 115 | &r_ir { |
| 116 | status = "okay"; |
| 117 | }; |
| 118 | |
| 119 | &r_pio { |
| 120 | vcc-pm-supply = <®_bldo3>; |
| 121 | }; |
| 122 | |
| 123 | &r_rsb { |
Jagan Teki | 4c44d50 | 2018-11-05 13:20:39 +0530 | [diff] [blame] | 124 | status = "okay"; |
| 125 | |
Samuel Holland | 399a01f | 2022-04-27 15:31:31 -0500 | [diff] [blame] | 126 | axp805: pmic@745 { |
Jagan Teki | 4c44d50 | 2018-11-05 13:20:39 +0530 | [diff] [blame] | 127 | compatible = "x-powers,axp805", "x-powers,axp806"; |
Samuel Holland | 399a01f | 2022-04-27 15:31:31 -0500 | [diff] [blame] | 128 | reg = <0x745>; |
Jagan Teki | 4c44d50 | 2018-11-05 13:20:39 +0530 | [diff] [blame] | 129 | interrupt-parent = <&r_intc>; |
| 130 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; |
| 131 | interrupt-controller; |
| 132 | #interrupt-cells = <1>; |
| 133 | x-powers,self-working-mode; |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 134 | vina-supply = <®_vcc5v>; |
| 135 | vinb-supply = <®_vcc5v>; |
| 136 | vinc-supply = <®_vcc5v>; |
| 137 | vind-supply = <®_vcc5v>; |
| 138 | vine-supply = <®_vcc5v>; |
| 139 | aldoin-supply = <®_vcc5v>; |
| 140 | bldoin-supply = <®_vcc5v>; |
| 141 | cldoin-supply = <®_vcc5v>; |
Jagan Teki | 4c44d50 | 2018-11-05 13:20:39 +0530 | [diff] [blame] | 142 | |
| 143 | regulators { |
| 144 | reg_aldo1: aldo1 { |
| 145 | regulator-always-on; |
| 146 | regulator-min-microvolt = <3300000>; |
| 147 | regulator-max-microvolt = <3300000>; |
| 148 | regulator-name = "vcc-pl"; |
| 149 | }; |
| 150 | |
| 151 | reg_aldo2: aldo2 { |
| 152 | regulator-min-microvolt = <3300000>; |
| 153 | regulator-max-microvolt = <3300000>; |
| 154 | regulator-name = "vcc-ac200"; |
| 155 | }; |
| 156 | |
| 157 | reg_aldo3: aldo3 { |
| 158 | regulator-always-on; |
| 159 | regulator-min-microvolt = <3300000>; |
| 160 | regulator-max-microvolt = <3300000>; |
| 161 | regulator-name = "vcc25-dram"; |
| 162 | }; |
| 163 | |
| 164 | reg_bldo1: bldo1 { |
| 165 | regulator-always-on; |
| 166 | regulator-min-microvolt = <1800000>; |
| 167 | regulator-max-microvolt = <1800000>; |
| 168 | regulator-name = "vcc-bias-pll"; |
| 169 | }; |
| 170 | |
| 171 | reg_bldo2: bldo2 { |
| 172 | regulator-always-on; |
| 173 | regulator-min-microvolt = <1800000>; |
| 174 | regulator-max-microvolt = <1800000>; |
| 175 | regulator-name = "vcc-efuse-pcie-hdmi-io"; |
| 176 | }; |
| 177 | |
| 178 | reg_bldo3: bldo3 { |
| 179 | regulator-always-on; |
| 180 | regulator-min-microvolt = <1800000>; |
| 181 | regulator-max-microvolt = <1800000>; |
| 182 | regulator-name = "vcc-dcxoio"; |
| 183 | }; |
| 184 | |
| 185 | bldo4 { |
| 186 | /* unused */ |
| 187 | }; |
| 188 | |
| 189 | reg_cldo1: cldo1 { |
| 190 | regulator-always-on; |
| 191 | regulator-min-microvolt = <3300000>; |
| 192 | regulator-max-microvolt = <3300000>; |
| 193 | regulator-name = "vcc-3v3"; |
| 194 | }; |
| 195 | |
| 196 | reg_cldo2: cldo2 { |
| 197 | regulator-min-microvolt = <3300000>; |
| 198 | regulator-max-microvolt = <3300000>; |
| 199 | regulator-name = "vcc-wifi-1"; |
| 200 | }; |
| 201 | |
| 202 | reg_cldo3: cldo3 { |
| 203 | regulator-min-microvolt = <3300000>; |
| 204 | regulator-max-microvolt = <3300000>; |
| 205 | regulator-name = "vcc-wifi-2"; |
| 206 | }; |
| 207 | |
| 208 | reg_dcdca: dcdca { |
| 209 | regulator-always-on; |
| 210 | regulator-min-microvolt = <810000>; |
| 211 | regulator-max-microvolt = <1080000>; |
| 212 | regulator-name = "vdd-cpu"; |
| 213 | }; |
| 214 | |
| 215 | reg_dcdcc: dcdcc { |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 216 | regulator-enable-ramp-delay = <32000>; |
Jagan Teki | 4c44d50 | 2018-11-05 13:20:39 +0530 | [diff] [blame] | 217 | regulator-min-microvolt = <810000>; |
| 218 | regulator-max-microvolt = <1080000>; |
| 219 | regulator-name = "vdd-gpu"; |
| 220 | }; |
| 221 | |
| 222 | reg_dcdcd: dcdcd { |
| 223 | regulator-always-on; |
| 224 | regulator-min-microvolt = <960000>; |
| 225 | regulator-max-microvolt = <960000>; |
| 226 | regulator-name = "vdd-sys"; |
| 227 | }; |
| 228 | |
| 229 | reg_dcdce: dcdce { |
| 230 | regulator-always-on; |
| 231 | regulator-min-microvolt = <1200000>; |
| 232 | regulator-max-microvolt = <1200000>; |
| 233 | regulator-name = "vcc-dram"; |
| 234 | }; |
| 235 | |
| 236 | sw { |
| 237 | /* unused */ |
| 238 | }; |
| 239 | }; |
| 240 | }; |
| 241 | }; |
| 242 | |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 243 | &rtc { |
| 244 | clocks = <&ext_osc32k>; |
| 245 | }; |
| 246 | |
Jagan Teki | 4c44d50 | 2018-11-05 13:20:39 +0530 | [diff] [blame] | 247 | &uart0 { |
| 248 | pinctrl-names = "default"; |
| 249 | pinctrl-0 = <&uart0_ph_pins>; |
| 250 | status = "okay"; |
| 251 | }; |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 252 | |
| 253 | &usb2otg { |
Jernej Skrabec | 463304d | 2021-01-06 18:02:56 +0100 | [diff] [blame] | 254 | /* |
| 255 | * OrangePi Lite 2 and One Plus, where this DT is used, don't |
| 256 | * have a controllable VBUS even though they do have an ID pin. |
| 257 | * Using it as anything but a USB host is unsafe. |
| 258 | */ |
| 259 | dr_mode = "host"; |
Jagan Teki | 7d412cd | 2019-04-14 22:22:21 +0530 | [diff] [blame] | 260 | status = "okay"; |
| 261 | }; |
| 262 | |
| 263 | &usb2phy { |
| 264 | usb0_id_det-gpios = <&pio 2 6 GPIO_ACTIVE_HIGH>; /* PC6 */ |
| 265 | usb0_vbus-supply = <®_vcc5v>; |
| 266 | usb3_vbus-supply = <®_vcc5v>; |
| 267 | status = "okay"; |
| 268 | }; |