Adjust Orangepi Win, (possible) fix for boot crash / reboot (#1688)

This commit is contained in:
Igor Pečovnik 2019-12-23 00:40:38 +01:00 committed by GitHub
parent ff4c1488da
commit 517d4ecd90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 219 additions and 0 deletions

View File

@ -0,0 +1,151 @@
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
index f54a415f2..fb4cf5423 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
@@ -46,6 +46,8 @@
#include "sun50i-a64.dtsi"
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pwm/pwm.h>
/ {
model = "OrangePi Win/Win Plus";
@@ -55,9 +57,6 @@
ethernet0 = &emac;
serial0 = &uart0;
serial1 = &uart1;
- serial2 = &uart2;
- serial3 = &uart3;
- serial4 = &uart4;
};
chosen {
@@ -127,11 +126,17 @@
status = "okay";
};
+&cpu0 {
+ cpu-supply = <&reg_dcdc2>;
+};
+
&de {
status = "okay";
};
&ehci0 {
+ phys = <&usbphy 0>;
+ phy-names = "usb";
status = "okay";
};
@@ -159,6 +164,14 @@
};
};
+&i2s2 {
+ status = "okay";
+};
+
+&mixer0 {
+ status = "okay";
+};
+
&mdio {
ext_rgmii_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
@@ -195,7 +208,21 @@
};
};
+&mmc2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
+ vmmc-supply = <&reg_dcdc1>;
+ vqmmc-supply = <&reg_eldo1>;
+ bus-width = <8>;
+ non-removable;
+ cap-mmc-hw-reset;
+ mmc-hs200-1_8v;
+ status = "okay";
+};
+
&ohci0 {
+ phys = <&usbphy 0>;
+ phy-names = "usb";
status = "okay";
};
@@ -309,13 +336,14 @@
};
&reg_eldo1 {
+ regulator-always-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "cpvdd";
};
&reg_eldo3 {
- regulator-min-microvolt = <1500000>;
+ regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "dvdd-csi";
};
@@ -338,6 +366,13 @@
regulator-name = "vdd-cpus";
};
+&reg_ldo_io0 {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-usb";
+ status = "okay";
+};
+
&reg_rtc_ldo {
regulator-name = "vcc-rtc";
};
@@ -362,6 +397,10 @@
"MIC1", "Onboard Microphone";
};
+&sound_hdmi {
+ status = "okay";
+};
+
&spi0 {
status = "okay";
@@ -401,30 +440,8 @@
};
};
-/* On Pi-2 connector, RTS/CTS optional */
-&uart2 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart2_pins>;
- status = "disabled";
-};
-
-/* On Pi-2 connector, RTS/CTS optional */
-&uart3 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart3_pins>;
- status = "disabled";
-};
-
-/* On Pi-2 connector (labeled for SPI1), RTS/CTS optional */
-&uart4 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart4_pins>;
- status = "disabled";
-};
-
&usb_otg {
- dr_mode = "otg";
- status = "okay";
+ dr_mode = "host";
};
&usbphy {

View File

@ -0,0 +1,68 @@
From 6db1aaf4d9735e04f6f310db6410d1dcf340a749 Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@siol.net>
Date: Fri, 4 Oct 2019 00:21:30 +0200
Subject: arm64: dts: allwinner: a64: orangepi-win: Enable audio codec
This patch enables internal audio codec on OrangePi Win board by
enabling all relevant nodes and adding appropriate routing. Board has
on-board microphone (MIC1) and 3.5 mm jack with stereo audio and
microphone (MIC2).
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
.../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 29 ++++++++++++++++++++++
1 file changed, 29 insertions(+)
(limited to 'arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts')
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
index 04446e4716c4..f54a415f2e3b 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
@@ -114,6 +114,19 @@
};
};
+&codec {
+ status = "okay";
+};
+
+&codec_analog {
+ cpvdd-supply = <&reg_eldo1>;
+ status = "okay";
+};
+
+&dai {
+ status = "okay";
+};
+
&de {
status = "okay";
};
@@ -333,6 +346,22 @@
vcc-hdmi-supply = <&reg_dldo1>;
};
+&sound {
+ status = "okay";
+ simple-audio-card,widgets = "Headphone", "Headphone Jack",
+ "Microphone", "Microphone Jack",
+ "Microphone", "Onboard Microphone";
+ simple-audio-card,routing =
+ "Left DAC", "AIF1 Slot 0 Left",
+ "Right DAC", "AIF1 Slot 0 Right",
+ "AIF1 Slot 0 Left ADC", "Left ADC",
+ "AIF1 Slot 0 Right ADC", "Right ADC",
+ "Headphone Jack", "HP",
+ "MIC2", "Microphone Jack",
+ "Onboard Microphone", "MBIAS",
+ "MIC1", "Onboard Microphone";
+};
+
&spi0 {
status = "okay";
--
cgit 1.2-0.3.lf.el7