Chen-Yu Tsai | b5fe523 | 2020-01-12 23:36:13 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | // Copyright (C) 2016 ARM Ltd. |
Andre Przywara | e7bd15e | 2017-02-16 01:20:29 +0000 | [diff] [blame] | 3 | |
| 4 | /dts-v1/; |
Jagan Teki | 702a3e5 | 2017-05-25 18:15:36 +0000 | [diff] [blame] | 5 | #include "sun50i-h5.dtsi" |
Andre Przywara | 5728573 | 2023-04-02 01:17:07 +0100 | [diff] [blame] | 6 | #include "sun50i-h5-cpu-opp.dtsi" |
Andre Przywara | e7bd15e | 2017-02-16 01:20:29 +0000 | [diff] [blame] | 7 | |
Jagan Teki | f333973 | 2017-05-25 18:26:41 +0000 | [diff] [blame] | 8 | #include <dt-bindings/gpio/gpio.h> |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 9 | #include <dt-bindings/input/input.h> |
| 10 | #include <dt-bindings/pinctrl/sun4i-a10.h> |
Jagan Teki | f333973 | 2017-05-25 18:26:41 +0000 | [diff] [blame] | 11 | |
Andre Przywara | e7bd15e | 2017-02-16 01:20:29 +0000 | [diff] [blame] | 12 | / { |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 13 | model = "Xunlong Orange Pi PC 2"; |
| 14 | compatible = "xunlong,orangepi-pc2", "allwinner,sun50i-h5"; |
| 15 | |
| 16 | reg_vcc3v3: vcc3v3 { |
| 17 | compatible = "regulator-fixed"; |
| 18 | regulator-name = "vcc3v3"; |
| 19 | regulator-min-microvolt = <3300000>; |
| 20 | regulator-max-microvolt = <3300000>; |
| 21 | }; |
Andre Przywara | e7bd15e | 2017-02-16 01:20:29 +0000 | [diff] [blame] | 22 | |
Jagan Teki | 0107cd4 | 2018-05-07 13:03:47 +0530 | [diff] [blame] | 23 | aliases { |
Jagan Teki | 0107cd4 | 2018-05-07 13:03:47 +0530 | [diff] [blame] | 24 | ethernet0 = &emac; |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 25 | serial0 = &uart0; |
Jagan Teki | 0107cd4 | 2018-05-07 13:03:47 +0530 | [diff] [blame] | 26 | }; |
| 27 | |
Andre Przywara | e7bd15e | 2017-02-16 01:20:29 +0000 | [diff] [blame] | 28 | chosen { |
| 29 | stdout-path = "serial0:115200n8"; |
| 30 | }; |
| 31 | |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 32 | connector { |
| 33 | compatible = "hdmi-connector"; |
| 34 | type = "a"; |
Andre Przywara | e7bd15e | 2017-02-16 01:20:29 +0000 | [diff] [blame] | 35 | |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 36 | port { |
| 37 | hdmi_con_in: endpoint { |
| 38 | remote-endpoint = <&hdmi_out_con>; |
| 39 | }; |
Andre Przywara | e7bd15e | 2017-02-16 01:20:29 +0000 | [diff] [blame] | 40 | }; |
| 41 | }; |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 42 | |
| 43 | leds { |
| 44 | compatible = "gpio-leds"; |
| 45 | |
Andre Przywara | 58f6861 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 46 | led-0 { |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 47 | label = "orangepi:green:pwr"; |
| 48 | gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; |
| 49 | default-state = "on"; |
| 50 | }; |
| 51 | |
Andre Przywara | 58f6861 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 52 | led-1 { |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 53 | label = "orangepi:red:status"; |
| 54 | gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>; |
| 55 | }; |
| 56 | }; |
| 57 | |
Andre Przywara | 7f53f50 | 2022-09-11 00:04:41 +0100 | [diff] [blame] | 58 | gpio-keys { |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 59 | compatible = "gpio-keys"; |
| 60 | |
Andre Przywara | 7f53f50 | 2022-09-11 00:04:41 +0100 | [diff] [blame] | 61 | key-sw4 { |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 62 | label = "sw4"; |
| 63 | linux,code = <BTN_0>; |
| 64 | gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; |
Andre Przywara | 58f6861 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 65 | wakeup-source; |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 66 | }; |
| 67 | }; |
| 68 | |
| 69 | reg_gmac_3v3: gmac-3v3 { |
| 70 | compatible = "regulator-fixed"; |
| 71 | regulator-name = "gmac-3v3"; |
| 72 | regulator-min-microvolt = <3300000>; |
| 73 | regulator-max-microvolt = <3300000>; |
| 74 | startup-delay-us = <100000>; |
| 75 | enable-active-high; |
| 76 | gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; |
| 77 | }; |
| 78 | |
| 79 | reg_usb0_vbus: usb0-vbus { |
| 80 | compatible = "regulator-fixed"; |
| 81 | regulator-name = "usb0-vbus"; |
| 82 | regulator-min-microvolt = <5000000>; |
| 83 | regulator-max-microvolt = <5000000>; |
| 84 | enable-active-high; |
| 85 | gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */ |
| 86 | status = "okay"; |
| 87 | }; |
| 88 | }; |
| 89 | |
| 90 | &codec { |
| 91 | allwinner,audio-routing = |
| 92 | "Line Out", "LINEOUT", |
| 93 | "MIC1", "Mic", |
| 94 | "Mic", "MBIAS"; |
| 95 | status = "okay"; |
| 96 | }; |
| 97 | |
Andre Przywara | 58f6861 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 98 | &cpu0 { |
| 99 | cpu-supply = <®_vdd_cpux>; |
| 100 | }; |
| 101 | |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 102 | &de { |
| 103 | status = "okay"; |
Andre Przywara | e7bd15e | 2017-02-16 01:20:29 +0000 | [diff] [blame] | 104 | }; |
| 105 | |
Jagan Teki | 84c569c | 2018-05-07 13:03:48 +0530 | [diff] [blame] | 106 | &ehci0 { |
| 107 | status = "okay"; |
| 108 | }; |
| 109 | |
Andre Przywara | e7bd15e | 2017-02-16 01:20:29 +0000 | [diff] [blame] | 110 | &ehci1 { |
| 111 | status = "okay"; |
| 112 | }; |
| 113 | |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 114 | &ehci2 { |
| 115 | status = "okay"; |
| 116 | }; |
| 117 | |
| 118 | &ehci3 { |
| 119 | status = "okay"; |
| 120 | }; |
| 121 | |
Andre Przywara | e7bd15e | 2017-02-16 01:20:29 +0000 | [diff] [blame] | 122 | &emac { |
| 123 | pinctrl-names = "default"; |
| 124 | pinctrl-0 = <&emac_rgmii_pins>; |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 125 | phy-supply = <®_gmac_3v3>; |
Andre Przywara | 0bb48ef | 2018-04-04 01:31:19 +0100 | [diff] [blame] | 126 | phy-handle = <&ext_rgmii_phy>; |
Andre Przywara | 58f6861 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 127 | phy-mode = "rgmii-id"; |
Andre Przywara | e7bd15e | 2017-02-16 01:20:29 +0000 | [diff] [blame] | 128 | status = "okay"; |
Andre Przywara | 0bb48ef | 2018-04-04 01:31:19 +0100 | [diff] [blame] | 129 | }; |
Andre Przywara | e7bd15e | 2017-02-16 01:20:29 +0000 | [diff] [blame] | 130 | |
Andre Przywara | 0bb48ef | 2018-04-04 01:31:19 +0100 | [diff] [blame] | 131 | &external_mdio { |
| 132 | ext_rgmii_phy: ethernet-phy@1 { |
| 133 | compatible = "ethernet-phy-ieee802.3-c22"; |
Andre Przywara | e7bd15e | 2017-02-16 01:20:29 +0000 | [diff] [blame] | 134 | reg = <1>; |
| 135 | }; |
| 136 | }; |
Jagan Teki | 0107cd4 | 2018-05-07 13:03:47 +0530 | [diff] [blame] | 137 | |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 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 | b5fe523 | 2020-01-12 23:36:13 +0800 | [diff] [blame] | 150 | pinctrl-0 = <&r_ir_rx_pin>; |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 151 | status = "okay"; |
| 152 | }; |
| 153 | |
Jagan Teki | 0107cd4 | 2018-05-07 13:03:47 +0530 | [diff] [blame] | 154 | &mmc0 { |
Jagan Teki | 0107cd4 | 2018-05-07 13:03:47 +0530 | [diff] [blame] | 155 | vmmc-supply = <®_vcc3v3>; |
| 156 | bus-width = <4>; |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 157 | cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ |
Jagan Teki | 0107cd4 | 2018-05-07 13:03:47 +0530 | [diff] [blame] | 158 | status = "okay"; |
| 159 | }; |
| 160 | |
Jagan Teki | 84c569c | 2018-05-07 13:03:48 +0530 | [diff] [blame] | 161 | &ohci0 { |
| 162 | status = "okay"; |
| 163 | }; |
| 164 | |
Jagan Teki | 0107cd4 | 2018-05-07 13:03:47 +0530 | [diff] [blame] | 165 | &ohci1 { |
| 166 | status = "okay"; |
| 167 | }; |
| 168 | |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 169 | &ohci2 { |
| 170 | status = "okay"; |
| 171 | }; |
| 172 | |
| 173 | &ohci3 { |
| 174 | status = "okay"; |
| 175 | }; |
| 176 | |
Andre Przywara | 58f6861 | 2021-05-25 01:20:25 +0100 | [diff] [blame] | 177 | &r_i2c { |
| 178 | status = "okay"; |
| 179 | |
| 180 | reg_vdd_cpux: regulator@65 { |
| 181 | compatible = "silergy,sy8106a"; |
| 182 | reg = <0x65>; |
| 183 | regulator-name = "vdd-cpux"; |
| 184 | silergy,fixed-microvolt = <1100000>; |
| 185 | regulator-min-microvolt = <1000000>; |
| 186 | regulator-max-microvolt = <1400000>; |
| 187 | regulator-ramp-delay = <200>; |
| 188 | regulator-boot-on; |
| 189 | regulator-always-on; |
| 190 | }; |
| 191 | }; |
| 192 | |
Andre Przywara | 4c974ee | 2018-10-29 00:56:49 +0000 | [diff] [blame] | 193 | &spi0 { |
| 194 | status = "okay"; |
| 195 | |
| 196 | flash@0 { |
| 197 | #address-cells = <1>; |
| 198 | #size-cells = <1>; |
| 199 | compatible = "jedec,spi-nor"; |
| 200 | reg = <0>; |
| 201 | spi-max-frequency = <40000000>; |
| 202 | }; |
| 203 | }; |
| 204 | |
Jagan Teki | 0107cd4 | 2018-05-07 13:03:47 +0530 | [diff] [blame] | 205 | &uart0 { |
| 206 | pinctrl-names = "default"; |
Chen-Yu Tsai | b5fe523 | 2020-01-12 23:36:13 +0800 | [diff] [blame] | 207 | pinctrl-0 = <&uart0_pa_pins>; |
Jagan Teki | 0107cd4 | 2018-05-07 13:03:47 +0530 | [diff] [blame] | 208 | status = "okay"; |
| 209 | }; |
| 210 | |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 211 | &uart1 { |
| 212 | pinctrl-names = "default"; |
| 213 | pinctrl-0 = <&uart1_pins>; |
| 214 | status = "disabled"; |
| 215 | }; |
| 216 | |
| 217 | &uart2 { |
| 218 | pinctrl-names = "default"; |
| 219 | pinctrl-0 = <&uart2_pins>; |
| 220 | status = "disabled"; |
| 221 | }; |
| 222 | |
Jagan Teki | 84c569c | 2018-05-07 13:03:48 +0530 | [diff] [blame] | 223 | &usb_otg { |
| 224 | dr_mode = "otg"; |
| 225 | status = "okay"; |
| 226 | }; |
| 227 | |
Jagan Teki | 0107cd4 | 2018-05-07 13:03:47 +0530 | [diff] [blame] | 228 | &usbphy { |
Andre Przywara | 1caeae3 | 2018-07-04 14:16:37 +0100 | [diff] [blame] | 229 | /* USB Type-A ports' VBUS is always on */ |
| 230 | usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */ |
| 231 | usb0_vbus-supply = <®_usb0_vbus>; |
Jagan Teki | 0107cd4 | 2018-05-07 13:03:47 +0530 | [diff] [blame] | 232 | status = "okay"; |
| 233 | }; |