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