0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 // Copyright (C) 2016 ARM Ltd.
0003
0004 /dts-v1/;
0005 #include "sun50i-h5.dtsi"
0006
0007 #include <dt-bindings/gpio/gpio.h>
0008 #include <dt-bindings/input/input.h>
0009 #include <dt-bindings/pinctrl/sun4i-a10.h>
0010
0011 / {
0012 model = "Xunlong Orange Pi PC 2";
0013 compatible = "xunlong,orangepi-pc2", "allwinner,sun50i-h5";
0014
0015 reg_vcc3v3: vcc3v3 {
0016 compatible = "regulator-fixed";
0017 regulator-name = "vcc3v3";
0018 regulator-min-microvolt = <3300000>;
0019 regulator-max-microvolt = <3300000>;
0020 };
0021
0022 aliases {
0023 ethernet0 = &emac;
0024 serial0 = &uart0;
0025 };
0026
0027 chosen {
0028 stdout-path = "serial0:115200n8";
0029 };
0030
0031 connector {
0032 compatible = "hdmi-connector";
0033 type = "a";
0034
0035 port {
0036 hdmi_con_in: endpoint {
0037 remote-endpoint = <&hdmi_out_con>;
0038 };
0039 };
0040 };
0041
0042 leds {
0043 compatible = "gpio-leds";
0044
0045 led-0 {
0046 label = "orangepi:green:pwr";
0047 gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
0048 default-state = "on";
0049 };
0050
0051 led-1 {
0052 label = "orangepi:red:status";
0053 gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>;
0054 };
0055 };
0056
0057 gpio-keys {
0058 compatible = "gpio-keys";
0059
0060 key-sw4 {
0061 label = "sw4";
0062 linux,code = <BTN_0>;
0063 gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
0064 wakeup-source;
0065 };
0066 };
0067
0068 reg_gmac_3v3: gmac-3v3 {
0069 compatible = "regulator-fixed";
0070 regulator-name = "gmac-3v3";
0071 regulator-min-microvolt = <3300000>;
0072 regulator-max-microvolt = <3300000>;
0073 startup-delay-us = <100000>;
0074 enable-active-high;
0075 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
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
0089 &codec {
0090 allwinner,audio-routing =
0091 "Line Out", "LINEOUT",
0092 "MIC1", "Mic",
0093 "Mic", "MBIAS";
0094 status = "okay";
0095 };
0096
0097 &cpu0 {
0098 cpu-supply = <®_vdd_cpux>;
0099 };
0100
0101 &de {
0102 status = "okay";
0103 };
0104
0105 &ehci0 {
0106 status = "okay";
0107 };
0108
0109 &ehci1 {
0110 status = "okay";
0111 };
0112
0113 &ehci2 {
0114 status = "okay";
0115 };
0116
0117 &ehci3 {
0118 status = "okay";
0119 };
0120
0121 &emac {
0122 pinctrl-names = "default";
0123 pinctrl-0 = <&emac_rgmii_pins>;
0124 phy-supply = <®_gmac_3v3>;
0125 phy-handle = <&ext_rgmii_phy>;
0126 phy-mode = "rgmii-id";
0127 status = "okay";
0128 };
0129
0130 &external_mdio {
0131 ext_rgmii_phy: ethernet-phy@1 {
0132 compatible = "ethernet-phy-ieee802.3-c22";
0133 reg = <1>;
0134 };
0135 };
0136
0137 &hdmi {
0138 status = "okay";
0139 };
0140
0141 &hdmi_out {
0142 hdmi_out_con: endpoint {
0143 remote-endpoint = <&hdmi_con_in>;
0144 };
0145 };
0146
0147 &ir {
0148 pinctrl-names = "default";
0149 pinctrl-0 = <&r_ir_rx_pin>;
0150 status = "okay";
0151 };
0152
0153 &mmc0 {
0154 vmmc-supply = <®_vcc3v3>;
0155 bus-width = <4>;
0156 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
0157 status = "okay";
0158 };
0159
0160 &ohci0 {
0161 status = "okay";
0162 };
0163
0164 &ohci1 {
0165 status = "okay";
0166 };
0167
0168 &ohci2 {
0169 status = "okay";
0170 };
0171
0172 &ohci3 {
0173 status = "okay";
0174 };
0175
0176 &r_i2c {
0177 status = "okay";
0178
0179 reg_vdd_cpux: regulator@65 {
0180 compatible = "silergy,sy8106a";
0181 reg = <0x65>;
0182 regulator-name = "vdd-cpux";
0183 silergy,fixed-microvolt = <1100000>;
0184 regulator-min-microvolt = <1000000>;
0185 regulator-max-microvolt = <1400000>;
0186 regulator-ramp-delay = <200>;
0187 regulator-boot-on;
0188 regulator-always-on;
0189 };
0190 };
0191
0192 &spi0 {
0193 status = "okay";
0194
0195 flash@0 {
0196 #address-cells = <1>;
0197 #size-cells = <1>;
0198 compatible = "jedec,spi-nor";
0199 reg = <0>;
0200 spi-max-frequency = <40000000>;
0201 };
0202 };
0203
0204 &uart0 {
0205 pinctrl-names = "default";
0206 pinctrl-0 = <&uart0_pa_pins>;
0207 status = "okay";
0208 };
0209
0210 &uart1 {
0211 pinctrl-names = "default";
0212 pinctrl-0 = <&uart1_pins>;
0213 status = "disabled";
0214 };
0215
0216 &uart2 {
0217 pinctrl-names = "default";
0218 pinctrl-0 = <&uart2_pins>;
0219 status = "disabled";
0220 };
0221
0222 &usb_otg {
0223 dr_mode = "otg";
0224 status = "okay";
0225 };
0226
0227 &usbphy {
0228 /* USB Type-A ports' VBUS is always on */
0229 usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
0230 usb0_vbus-supply = <®_usb0_vbus>;
0231 status = "okay";
0232 };