forked from armbian/build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Onecloud: fix some bugs (armbian#3873)
* Refactor patches * Fix bug: the USB closed to the HDMI doesn't work * Fix bug: cpufreq doesn't work * Fix bug: thermal_zone doesn't work * More frequency governors * Add bootscript * Fix bug: add missing dependency needed for gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf
- Loading branch information
Showing
16 changed files
with
306 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# DO NOT EDIT THIS FILE | ||
# | ||
# Please edit /boot/armbianEnv.txt to set supported parameters | ||
# | ||
|
||
# We can't use `test -z` due to the bug: https://lists.denx.de/pipermail/u-boot/2005-August/011447.html | ||
test -n "${bootdev}" && test -n "${rootdev}" | ||
if test $? != 0; then | ||
echo '==============================================================' | ||
echo 'Please set "bootdev" and "rootdev" before calling this script.' | ||
echo '' | ||
echo 'Boot from usb:' | ||
echo ' bootdev="usb 0"' | ||
echo ' rootdev="/dev/sda2"' | ||
echo ' usb start' | ||
echo ' fatload ${bootdev} 0x20800000 boot.scr && autoscr 0x20800000' | ||
echo '' | ||
echo 'Boot from eMMC:' | ||
echo ' bootdev="mmc 1"' | ||
echo ' rootdev="/dev/mmcblk1p2"' | ||
echo ' fatload ${bootdev} 0x20800000 boot.scr && autoscr 0x20800000' | ||
echo '==============================================================' | ||
exit 22 | ||
fi | ||
|
||
echo "Try to boot from ${bootdev}" | ||
|
||
fatload ${bootdev} 0x20800000 /armbianEnv.txt && env import -t 0x20800000 ${filesize} | ||
test -n "${consoleargs}" || setenv consoleargs "console=ttyAML0,115200n8" | ||
|
||
# Boot Arguments | ||
setenv bootargs "" | ||
setenv bootargs "${bootargs} root=${rootdev} rootwait rw" | ||
setenv bootargs "${bootargs} ${consoleargs} no_console_suspend consoleblank=0" | ||
|
||
# Booting | ||
fatload ${bootdev} 0x20800000 /uImage || exit 1 | ||
fatload ${bootdev} 0x22000000 /uInitrd || exit 1 | ||
fatload ${bootdev} 0x21800000 /dtb/meson8b-onecloud.dtb || exit 1 | ||
|
||
bootm 0x20800000 0x22000000 0x21800000 | ||
|
||
# Recompile with: | ||
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
patch/kernel/archive/meson-5.14/board_onecloud/usb-disable-ACA-check.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
USB: Disable ACA check | ||
|
||
In V1.3, USB0 fails in this check. | ||
But it can work normally. | ||
So just disable this check. | ||
|
||
--- | ||
drivers/phy/amlogic/phy-meson8b-usb2.c | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c b/drivers/phy/amlogic/phy-meson8b-usb2.c | ||
index 03c061dd5..9a49a2d92 100644 | ||
--- a/drivers/phy/amlogic/phy-meson8b-usb2.c | ||
+++ b/drivers/phy/amlogic/phy-meson8b-usb2.c | ||
@@ -195,12 +195,12 @@ static int phy_meson8b_usb2_power_on(struct phy *phy) | ||
udelay(ACA_ENABLE_COMPLETE_TIME); | ||
|
||
regmap_read(priv->regmap, REG_ADP_BC, ®); | ||
- if (reg & REG_ADP_BC_ACA_PIN_FLOAT) { | ||
+ /*if (reg & REG_ADP_BC_ACA_PIN_FLOAT) { | ||
dev_warn(&phy->dev, "USB ID detect failed!\n"); | ||
clk_disable_unprepare(priv->clk_usb); | ||
clk_disable_unprepare(priv->clk_usb_general); | ||
return -EINVAL; | ||
- } | ||
+ }*/ | ||
} | ||
} | ||
|
||
-- | ||
2.25.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.