diff --git a/patch/kernel/sunxi-current/orangepi-win-fixes.patch b/patch/kernel/sunxi-current/orangepi-win-fixes.patch new file mode 100644 index 0000000000..db836d62d9 --- /dev/null +++ b/patch/kernel/sunxi-current/orangepi-win-fixes.patch @@ -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 ++#include ++#include + + / { + 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 = <®_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 = <®_dcdc1>; ++ vqmmc-supply = <®_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 @@ + }; + + ®_eldo1 { ++ regulator-always-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-name = "cpvdd"; + }; + + ®_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"; + }; + ++®_ldo_io0 { ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc-usb"; ++ status = "okay"; ++}; ++ + ®_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 { diff --git a/patch/kernel/sunxi-current/orangepi-win_enable_audio_codec.patch b/patch/kernel/sunxi-current/orangepi-win_enable_audio_codec.patch new file mode 100644 index 0000000000..2bb9f5621d --- /dev/null +++ b/patch/kernel/sunxi-current/orangepi-win_enable_audio_codec.patch @@ -0,0 +1,68 @@ +From 6db1aaf4d9735e04f6f310db6410d1dcf340a749 Mon Sep 17 00:00:00 2001 +From: Jernej Skrabec +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 +Signed-off-by: Maxime Ripard +--- + .../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 = <®_eldo1>; ++ status = "okay"; ++}; ++ ++&dai { ++ status = "okay"; ++}; ++ + &de { + status = "okay"; + }; +@@ -333,6 +346,22 @@ + vcc-hdmi-supply = <®_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 +