From 12971a4d6edb3757fc957969fcf8aea319415ae3 Mon Sep 17 00:00:00 2001 From: Dmitry Ermakov Date: Mon, 7 Mar 2022 21:52:47 +0300 Subject: [PATCH] Add PHY autoprobe patch Add option to disable MCI ( add hisi_mci.disabled=1 to cmdline) --- .../patches/12_himci_disable_option.patch | 37 +++++++++++++++++++ .../patches/13_enable_phy_autoprobe.patch | 11 ++++++ building.sh | 4 +- 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 br-ext-chip-hisilicon/board/hi3516cv200/kernel/patches/12_himci_disable_option.patch create mode 100644 br-ext-chip-hisilicon/board/hi3516cv200/kernel/patches/13_enable_phy_autoprobe.patch diff --git a/br-ext-chip-hisilicon/board/hi3516cv200/kernel/patches/12_himci_disable_option.patch b/br-ext-chip-hisilicon/board/hi3516cv200/kernel/patches/12_himci_disable_option.patch new file mode 100644 index 00000000..9e296482 --- /dev/null +++ b/br-ext-chip-hisilicon/board/hi3516cv200/kernel/patches/12_himci_disable_option.patch @@ -0,0 +1,37 @@ +--- a/drivers/mmc/host/himci/himci.c ++++ b/drivers/mmc/host/himci/himci.c +@@ -63,6 +63,7 @@ + int trace_level = HIMCI_TRACE_LEVEL; + unsigned int slot_index = 0; + struct himci_host *mci_host[HIMCI_SLOT_NUM] = {NULL}; ++int disabled = 0; + + #ifdef MODULE + +@@ -80,6 +81,8 @@ + + #endif + ++module_param(disabled, int, S_IRUGO); ++ + /* reset MMC host controller */ + static void himci_sys_reset(struct himci_host *host) + { +@@ -1719,7 +1722,7 @@ + * We should register SDIO1 first to make sure that + * the eMMC device,which connected to SDIO1 is mmcblk0. + */ +- ++if (disabled == 0) { + ret = platform_driver_register(&himci_driver); + if (ret) { + platform_driver_unregister(&himci_driver); +@@ -1731,7 +1734,7 @@ + ret = mci_proc_init(HIMCI_SLOT_NUM); + if (ret) + himci_error("device proc init is failed!"); +- ++} + return ret; + } + diff --git a/br-ext-chip-hisilicon/board/hi3516cv200/kernel/patches/13_enable_phy_autoprobe.patch b/br-ext-chip-hisilicon/board/hi3516cv200/kernel/patches/13_enable_phy_autoprobe.patch new file mode 100644 index 00000000..bec733bb --- /dev/null +++ b/br-ext-chip-hisilicon/board/hi3516cv200/kernel/patches/13_enable_phy_autoprobe.patch @@ -0,0 +1,11 @@ +--- a/arch/arm/boot/dts/hi3518ev20x-demb.dts ++++ b/arch/arm/boot/dts/hi3518ev20x-demb.dts +@@ -87,7 +87,7 @@ + &mdio { + hisilicon,phy-reset-delays-us = <10000 20000 150000>; + phy0: ethernet-phy@1 { +- reg = <1>; ++ /* reg = <1>; */ + }; + }; + diff --git a/building.sh b/building.sh index 9e62516d..e486eee3 100755 --- a/building.sh +++ b/building.sh @@ -471,12 +471,12 @@ xm550() { # hi3516cv100 # OpenIPC # # hi3516cv200 # testing.. -# hi3518ev200 # testing.. +hi3518ev200 # testing.. # hi3516cv200 # testing.. # hi3518ev200 # testing.. # hi3518ev200_domsip # DomSip # hi3518ev200_hs303v1 # OpenIPC -hi3518ev200_hs303v2 # OpenIPC +#hi3518ev200_hs303v2 # OpenIPC # hi3518ev200_hs303v3 # OpenIPC # # hi3516av100 # OpenIPC