0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 // Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.xyz>
0003 // Based on sun50i-h5-orangepi-pc2.dts, which is:
0004 // Copyright (C) 2016 ARM Ltd.
0005
0006 /dts-v1/;
0007 #include "sun50i-h5.dtsi"
0008
0009 #include <dt-bindings/gpio/gpio.h>
0010 #include <dt-bindings/input/input.h>
0011
0012 / {
0013 model = "Xunlong Orange Pi Prime";
0014 compatible = "xunlong,orangepi-prime", "allwinner,sun50i-h5";
0015
0016 aliases {
0017 ethernet0 = &emac;
0018 serial0 = &uart0;
0019 };
0020
0021 chosen {
0022 stdout-path = "serial0:115200n8";
0023 };
0024
0025 connector {
0026 compatible = "hdmi-connector";
0027 type = "a";
0028
0029 port {
0030 hdmi_con_in: endpoint {
0031 remote-endpoint = <&hdmi_out_con>;
0032 };
0033 };
0034 };
0035
0036 leds {
0037 compatible = "gpio-leds";
0038
0039 led-0 {
0040 label = "orangepi:green:pwr";
0041 gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
0042 default-state = "on";
0043 };
0044
0045 led-1 {
0046 label = "orangepi:red:status";
0047 gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>;
0048 };
0049 };
0050
0051 gpio-keys {
0052 compatible = "gpio-keys";
0053
0054 key-sw4 {
0055 label = "sw4";
0056 linux,code = <BTN_0>;
0057 gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
0058 };
0059 };
0060
0061 reg_gmac_3v3: gmac-3v3 {
0062 compatible = "regulator-fixed";
0063 regulator-name = "gmac-3v3";
0064 regulator-min-microvolt = <3300000>;
0065 regulator-max-microvolt = <3300000>;
0066 startup-delay-us = <100000>;
0067 enable-active-high;
0068 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
0069 };
0070
0071 reg_vcc3v3: vcc3v3 {
0072 compatible = "regulator-fixed";
0073 regulator-name = "vcc3v3";
0074 regulator-min-microvolt = <3300000>;
0075 regulator-max-microvolt = <3300000>;
0076 };
0077
0078 reg_usb0_vbus: usb0-vbus {
0079 compatible = "regulator-fixed";
0080 regulator-name = "usb0-vbus";
0081 regulator-min-microvolt = <5000000>;
0082 regulator-max-microvolt = <5000000>;
0083 enable-active-high;
0084 gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
0085 status = "okay";
0086 };
0087
0088 wifi_pwrseq: wifi_pwrseq {
0089 compatible = "mmc-pwrseq-simple";
0090 reset-gpios = <&pio 2 14 GPIO_ACTIVE_LOW>; /* PC14 */
0091 };
0092 };
0093
0094 &codec {
0095 allwinner,audio-routing =
0096 "Line Out", "LINEOUT",
0097 "MIC1", "Mic",
0098 "Mic", "MBIAS";
0099 status = "okay";
0100 };
0101
0102 &de {
0103 status = "okay";
0104 };
0105
0106 &ehci0 {
0107 status = "okay";
0108 };
0109
0110 &ehci1 {
0111 status = "okay";
0112 };
0113
0114 &ehci2 {
0115 status = "okay";
0116 };
0117
0118 &ehci3 {
0119 status = "okay";
0120 };
0121
0122 &emac {
0123 pinctrl-names = "default";
0124 pinctrl-0 = <&emac_rgmii_pins>;
0125 phy-supply = <®_gmac_3v3>;
0126 phy-handle = <&ext_rgmii_phy>;
0127 phy-mode = "rgmii-id";
0128 status = "okay";
0129 };
0130
0131 &external_mdio {
0132 ext_rgmii_phy: ethernet-phy@1 {
0133 compatible = "ethernet-phy-ieee802.3-c22";
0134 reg = <1>;
0135 };
0136 };
0137
0138 &hdmi {
0139 status = "okay";
0140 };
0141
0142 &hdmi_out {
0143 hdmi_out_con: endpoint {
0144 remote-endpoint = <&hdmi_con_in>;
0145 };
0146 };
0147
0148 &ir {
0149 pinctrl-names = "default";
0150 pinctrl-0 = <&r_ir_rx_pin>;
0151 status = "okay";
0152 };
0153
0154 &mmc0 {
0155 vmmc-supply = <®_vcc3v3>;
0156 bus-width = <4>;
0157 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
0158 status = "okay";
0159 };
0160
0161 &mmc1 {
0162 vmmc-supply = <®_vcc3v3>;
0163 mmc-pwrseq = <&wifi_pwrseq>;
0164 bus-width = <4>;
0165 non-removable;
0166 status = "okay";
0167 };
0168
0169 &ohci0 {
0170 status = "okay";
0171 };
0172
0173 &ohci1 {
0174 status = "okay";
0175 };
0176
0177 &ohci2 {
0178 status = "okay";
0179 };
0180
0181 &ohci3 {
0182 status = "okay";
0183 };
0184
0185 &uart0 {
0186 pinctrl-names = "default";
0187 pinctrl-0 = <&uart0_pa_pins>;
0188 status = "okay";
0189 };
0190
0191 &uart1 {
0192 pinctrl-names = "default";
0193 pinctrl-0 = <&uart1_pins>;
0194 status = "disabled";
0195 };
0196
0197 &uart2 {
0198 pinctrl-names = "default";
0199 pinctrl-0 = <&uart2_pins>;
0200 status = "disabled";
0201 };
0202
0203 &usb_otg {
0204 dr_mode = "otg";
0205 status = "okay";
0206 };
0207
0208 &usbphy {
0209 /* USB Type-A ports' VBUS is always on */
0210 usb0_id_det-gpios = <&pio 0 21 GPIO_ACTIVE_HIGH>; /* PA21 */
0211 usb0_vbus-supply = <®_usb0_vbus>;
0212 status = "okay";
0213 };