--- /dev/null
+From afe08eab26c051e76e0ae7ce8e32f11285bf4470 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20Kempczy=C5=84ski?= <z.kempczynsk@samsung.com>
+Date: Wed, 18 Oct 2017 07:55:41 +0200
+Subject: [PATCH] Altering nanopi dts to work with MuxPi
+
+Change-Id: Ief6fd94649a0b0f573387956726ce5cebf8dd878
+---
+ arch/arm/boot/dts/sun8i-h3-nanopi.dtsi | 8 ++++----
+ arch/arm/boot/dts/sunxi-h3-h5.dtsi | 3 ++-
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
+index 3fa3091..e755432 100644
+--- a/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
++++ b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
+@@ -321,7 +321,7 @@
+ };
+
+ &i2c0 {
+- status = "okay";
++ status = "disabled";
+ rtc@68 {
+ compatible = "dallas,ds1307";
+ reg = <0x68>;
+@@ -329,7 +329,7 @@
+ };
+
+ &i2c1 {
+- status = "okay";
++ status = "disabled";
+ };
+
+ &i2c2 {
+@@ -341,7 +341,7 @@
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+- status = "okay";
++ status = "disabled";
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
+ cs-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>, <&pio 0 6 GPIO_ACTIVE_HIGH>;
+@@ -498,4 +498,4 @@
+ pinctrl-names = "default";
+ pinctrl-0 = <&ir_pins_a>;
+ status = "disabled";
+-};
+\ No newline at end of file
++};
+diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+index 0137e88..94feb0d 100644
+--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
++++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+@@ -245,7 +245,8 @@
+ phys = <&usbphy 0>;
+ phy-names = "usb";
+ extcon = <&usbphy 0>;
+- status = "disabled";
++ status = "okay";
++ dr_mode = "otg";
+ };
+
+ usbphy: phy@1c19400 {
+--
+2.7.4
+
--- /dev/null
+From 1ee37f83bff8617922208ae1ba9f15f3c2f42077 Mon Sep 17 00:00:00 2001
+From: Aleksander Mistewicz <a.mistewicz@samsung.com>
+Date: Mon, 28 May 2018 14:41:43 +0200
+Subject: [PATCH] Fix typo causing build break
+
+Change-Id: I234e970a09eb071769edc46bac9f9ca3414c7f71
+---
+ drivers/net/ethernet/allwinner/sun8i-emac.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/allwinner/sun8i-emac.c b/drivers/net/ethernet/allwinner/sun8i-emac.c
+index 8247b61..7a4b3d4 100644
+--- a/drivers/net/ethernet/allwinner/sun8i-emac.c
++++ b/drivers/net/ethernet/allwinner/sun8i-emac.c
+@@ -1869,7 +1869,7 @@ static int sun8i_emac_ethtool_get_settings(struct net_device *ndev,
+ return -EBUSY;
+ }
+
+- return phy_ethtool_gset(phy, cmd);
++ return phy_ethtool_sset(phy, cmd);
+ }
+
+ static int sun8i_emac_ethtool_set_settings(struct net_device *ndev,
+--
+2.7.4
+
--- /dev/null
+# Copyright 1999-2018 Gentoo Foundation
+# Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+UNIPATCH_STRICTORDER="yes"
+K_NOUSENAME="yes"
+K_NOSETEXTRAVERSION="yes"
+K_NOUSEPR="yes"
+K_SECURITY_UNSUPPORTED="1"
+K_BASE_VER="4.16"
+K_EXP_GENPATCHES_NOUSE="1"
+K_FROM_GIT="yes"
+ETYPE="sources"
+CKV="${PVR/-r/-git}"
+
+[ "${PV/_pre}" == "${PV}" ] && [ "${PV/_rc}" == "${PV}" ] && OKV="${PV}"
+inherit kernel-2
+
+DESCRIPTION="The very latest -git version of the Linux kernel"
+HOMEPAGE="https://www.kernel.org"
+EGIT_REPO_URI="https://github.com/friendlyarm/linux.git"
+EGIT_BRANCH="sunxi-${K_BASE_VER}.y"
+EGIT_CLONE_TYPE="shallow"
+EGIT_CHECKOUT_DIR="${WORKDIR}/linux-${K_BASE_VER}"
+inherit git-r3
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-0001-Altering-nanopi-dts-to-work-with-MuxPi.patch"
+ epatch "${FILESDIR}/${P}-0001-Fix-typo-causing-build-break.patch"
+}
+
+pkg_postinst() {
+ postinst_sources
+}