| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
/* |
| 3 |
* Copyright (C) Jisheng Zhang <[email protected]> |
| 4 |
*/ |
| 5 |
|
| 6 |
/dts-v1/; |
| 7 |
|
| 8 |
#include "sun50i-h618-longan-module-3h.dtsi" |
| 9 |
|
| 10 |
#include <dt-bindings/gpio/gpio.h> |
| 11 |
#include <dt-bindings/interrupt-controller/arm-gic.h> |
| 12 |
#include <dt-bindings/leds/common.h> |
| 13 |
|
| 14 |
/ { |
| 15 |
model = "Sipeed Longan Pi 3H"; |
| 16 |
compatible = "sipeed,longan-pi-3h", "sipeed,longan-module-3h", "allwinner,sun50i-h618"; |
| 17 |
|
| 18 |
aliases { |
| 19 |
ethernet0 = &emac0; |
| 20 |
serial0 = &uart0; |
| 21 |
}; |
| 22 |
|
| 23 |
chosen { |
| 24 |
stdout-path = "serial0:115200n8"; |
| 25 |
}; |
| 26 |
|
| 27 |
leds { |
| 28 |
compatible = "gpio-leds"; |
| 29 |
|
| 30 |
led-0 { |
| 31 |
color = <LED_COLOR_ID_ORANGE>; |
| 32 |
function = LED_FUNCTION_INDICATOR; |
| 33 |
function-enumerator = <0>; |
| 34 |
gpios = <&pio 6 2 GPIO_ACTIVE_LOW>; /* PG2 */ |
| 35 |
}; |
| 36 |
|
| 37 |
led-1 { |
| 38 |
color = <LED_COLOR_ID_ORANGE>; |
| 39 |
function = LED_FUNCTION_INDICATOR; |
| 40 |
function-enumerator = <1>; |
| 41 |
gpios = <&pio 6 4 GPIO_ACTIVE_LOW>; /* PG4 */ |
| 42 |
}; |
| 43 |
}; |
| 44 |
|
| 45 |
reg_vcc5v: regulator-vcc5v { |
| 46 |
/* board wide 5V supply directly from the USB-C socket */ |
| 47 |
compatible = "regulator-fixed"; |
| 48 |
regulator-name = "vcc-5v"; |
| 49 |
regulator-min-microvolt = <5000000>; |
| 50 |
regulator-max-microvolt = <5000000>; |
| 51 |
regulator-always-on; |
| 52 |
}; |
| 53 |
|
| 54 |
reg_vcc3v3: regulator-vcc3v3 { |
| 55 |
compatible = "regulator-fixed"; |
| 56 |
regulator-name = "vcc-3v3"; |
| 57 |
regulator-min-microvolt = <3300000>; |
| 58 |
regulator-max-microvolt = <3300000>; |
| 59 |
regulator-always-on; |
| 60 |
vin-supply = <®_vcc5v>; |
| 61 |
}; |
| 62 |
}; |
| 63 |
|
| 64 |
&axp313 { |
| 65 |
vin1-supply = <®_vcc5v>; |
| 66 |
vin2-supply = <®_vcc5v>; |
| 67 |
vin3-supply = <®_vcc5v>; |
| 68 |
}; |
| 69 |
|
| 70 |
&ehci1 { |
| 71 |
status = "okay"; |
| 72 |
}; |
| 73 |
|
| 74 |
&ohci1 { |
| 75 |
status = "okay"; |
| 76 |
}; |
| 77 |
|
| 78 |
&ehci2 { |
| 79 |
status = "okay"; |
| 80 |
}; |
| 81 |
|
| 82 |
&ohci2 { |
| 83 |
status = "okay"; |
| 84 |
}; |
| 85 |
|
| 86 |
/* WiFi & BT combo module is connected to this Host */ |
| 87 |
&ehci3 { |
| 88 |
status = "okay"; |
| 89 |
}; |
| 90 |
|
| 91 |
&ohci3 { |
| 92 |
status = "okay"; |
| 93 |
}; |
| 94 |
|
| 95 |
&emac0 { |
| 96 |
pinctrl-names = "default"; |
| 97 |
pinctrl-0 = <&ext_rgmii_pins>; |
| 98 |
phy-mode = "rgmii"; |
| 99 |
phy-handle = <&ext_rgmii_phy>; |
| 100 |
allwinner,rx-delay-ps = <3100>; |
| 101 |
allwinner,tx-delay-ps = <700>; |
| 102 |
phy-supply = <®_vcc3v3>; |
| 103 |
status = "okay"; |
| 104 |
}; |
| 105 |
|
| 106 |
&mdio0 { |
| 107 |
ext_rgmii_phy: ethernet-phy@1 { |
| 108 |
compatible = "ethernet-phy-ieee802.3-c22"; |
| 109 |
reg = <1>; |
| 110 |
}; |
| 111 |
}; |
| 112 |
|
| 113 |
&mmc0 { |
| 114 |
disable-wp; |
| 115 |
bus-width = <4>; |
| 116 |
cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ |
| 117 |
vmmc-supply = <®_vcc3v3>; |
| 118 |
status = "okay"; |
| 119 |
}; |
| 120 |
|
| 121 |
&uart0 { |
| 122 |
status = "okay"; |
| 123 |
}; |
| 124 |
|
| 125 |
&usbotg { |
| 126 |
/* |
| 127 |
* PHY0 pins are connected to a USB-C socket, but a role switch |
| 128 |
* is not implemented: both CC pins are pulled to GND. |
| 129 |
* The VBUS pins power the device, so a fixed peripheral mode |
| 130 |
* is the best choice. |
| 131 |
* The board can be powered via GPIOs, in this case port0 *can* |
| 132 |
* act as a host (with a cable/adapter ignoring CC), as VBUS is |
| 133 |
* then provided by the GPIOs. Any user of this setup would |
| 134 |
* need to adjust the DT accordingly: dr_mode set to "host", |
| 135 |
* enabling OHCI0 and EHCI0. |
| 136 |
*/ |
| 137 |
dr_mode = "peripheral"; |
| 138 |
status = "okay"; |
| 139 |
}; |
| 140 |
|
| 141 |
&usbphy { |
| 142 |
usb1_vbus-supply = <®_vcc5v>; |
| 143 |
usb2_vbus-supply = <®_vcc5v>; |
| 144 |
status = "okay"; |
| 145 |
}; |