Fix odroid issues (#556)
* Adjust kernel for C2/N2 & Kenrel 5.4.16 * Update docs * Add script to fix mac with efuse * Fix script * update description * Fix script * Use u-boot patch * Fix patch
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
# CONFIG_USB_STORAGE is not set
|
||||
# CONFIG_DOS_PARTITION is not set
|
||||
CONFIG_DM_VIDEO=y
|
||||
CONFIG_CMD_FILEENV=y
|
||||
CONFIG_ENV_IS_NOWHERE=Y
|
||||
|
||||
@@ -2194,7 +2194,7 @@ CONFIG_FIXED_PHY=y
|
||||
# CONFIG_LXT_PHY is not set
|
||||
CONFIG_MARVELL_PHY=m
|
||||
CONFIG_MARVELL_10G_PHY=m
|
||||
# CONFIG_MESON_GXL_PHY is not set
|
||||
CONFIG_MESON_GXL_PHY=y
|
||||
CONFIG_MICREL_PHY=y
|
||||
CONFIG_MICROCHIP_PHY=m
|
||||
# CONFIG_MICROCHIP_T1_PHY is not set
|
||||
@@ -2768,7 +2768,7 @@ CONFIG_I2C_DESIGNWARE_PLATFORM=y
|
||||
# CONFIG_I2C_EMEV2 is not set
|
||||
CONFIG_I2C_GPIO=m
|
||||
# CONFIG_I2C_GPIO_FAULT_INJECTOR is not set
|
||||
# CONFIG_I2C_MESON is not set
|
||||
CONFIG_I2C_MESON=y
|
||||
# CONFIG_I2C_NOMADIK is not set
|
||||
# CONFIG_I2C_OCORES is not set
|
||||
# CONFIG_I2C_PCA_PLATFORM is not set
|
||||
@@ -3436,7 +3436,7 @@ CONFIG_RC_DEVICES=y
|
||||
# CONFIG_IR_MCEUSB is not set
|
||||
# CONFIG_IR_ITE_CIR is not set
|
||||
# CONFIG_IR_FINTEK is not set
|
||||
# CONFIG_IR_MESON is not set
|
||||
CONFIG_IR_MESON=y
|
||||
# CONFIG_IR_NUVOTON is not set
|
||||
# CONFIG_IR_REDRAT3 is not set
|
||||
# CONFIG_IR_STREAMZAP is not set
|
||||
@@ -5719,8 +5719,8 @@ CONFIG_RAS=y
|
||||
# CONFIG_DAX is not set
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
CONFIG_NVMEM_BCM_OCOTP=y
|
||||
# CONFIG_MESON_EFUSE is not set
|
||||
# CONFIG_NVMEM_BCM_OCOTP is not set
|
||||
CONFIG_MESON_EFUSE=y
|
||||
# CONFIG_MESON_MX_EFUSE is not set
|
||||
|
||||
#
|
||||
|
||||
@@ -38,7 +38,6 @@ usb start
|
||||
# Load extraargs
|
||||
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} meson-gxbb-odroidc2.dtb
|
||||
#fdt addr ${fdt_addr_r}
|
||||
|
||||
# logical volumes get numbered after physical ones.
|
||||
# 1. boot
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# CONFIG_USB_STORAGE is not set
|
||||
CONFIG_DOS_PARTITION=y
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
# CONFIG_USB_STORAGE is not set
|
||||
CONFIG_USB=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_DM_USB=y
|
||||
CONFIG_CMD_FILEENV=y
|
||||
CONFIG_ENV_IS_NOWHERE=Y
|
||||
|
||||
@@ -2768,7 +2768,7 @@ CONFIG_I2C_DESIGNWARE_PLATFORM=y
|
||||
# CONFIG_I2C_EMEV2 is not set
|
||||
CONFIG_I2C_GPIO=m
|
||||
# CONFIG_I2C_GPIO_FAULT_INJECTOR is not set
|
||||
# CONFIG_I2C_MESON is not set
|
||||
CONFIG_I2C_MESON=y
|
||||
# CONFIG_I2C_NOMADIK is not set
|
||||
# CONFIG_I2C_OCORES is not set
|
||||
# CONFIG_I2C_PCA_PLATFORM is not set
|
||||
@@ -3436,7 +3436,7 @@ CONFIG_RC_DEVICES=y
|
||||
# CONFIG_IR_MCEUSB is not set
|
||||
# CONFIG_IR_ITE_CIR is not set
|
||||
# CONFIG_IR_FINTEK is not set
|
||||
# CONFIG_IR_MESON is not set
|
||||
CONFIG_IR_MESON=y
|
||||
# CONFIG_IR_NUVOTON is not set
|
||||
# CONFIG_IR_REDRAT3 is not set
|
||||
# CONFIG_IR_STREAMZAP is not set
|
||||
@@ -4138,7 +4138,7 @@ CONFIG_SND_SOC=y
|
||||
# CONFIG_SND_MESON_AXG_SPDIFOUT is not set
|
||||
# CONFIG_SND_MESON_AXG_SPDIFIN is not set
|
||||
# CONFIG_SND_MESON_AXG_PDM is not set
|
||||
# CONFIG_SND_MESON_G12A_TOHDMITX is not set
|
||||
CONFIG_SND_MESON_G12A_TOHDMITX=y
|
||||
# end of ASoC support for Amlogic platforms
|
||||
|
||||
# CONFIG_SND_SOC_SOF_TOPLEVEL is not set
|
||||
@@ -5719,8 +5719,8 @@ CONFIG_RAS=y
|
||||
# CONFIG_DAX is not set
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
CONFIG_NVMEM_BCM_OCOTP=y
|
||||
# CONFIG_MESON_EFUSE is not set
|
||||
# CONFIG_NVMEM_BCM_OCOTP is not set
|
||||
CONFIG_MESON_EFUSE=y
|
||||
# CONFIG_MESON_MX_EFUSE is not set
|
||||
|
||||
#
|
||||
|
||||
@@ -40,7 +40,6 @@ usb start
|
||||
# Load extraargs
|
||||
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} meson-g12b-odroid-n2.dtb
|
||||
#fdt addr ${fdt_addr_r}
|
||||
|
||||
# logical volumes get numbered after physical ones.
|
||||
# 1. boot
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
# CONFIG_USB_STORAGE is not set
|
||||
CONFIG_DOS_PARTITION=y
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
CONFIG_USB=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_DM_USB=y
|
||||
CONFIG_CMD_FILEENV=y
|
||||
CONFIG_ENV_IS_NOWHERE=Y
|
||||
# CONFIG_USB_STORAGE is not set
|
||||
|
||||
@@ -7,14 +7,11 @@ mmc dev ${devnum}
|
||||
# Note that import is performed twice for backwards compatability.
|
||||
setenv loadbootstate " \
|
||||
echo 'loading env...'; \
|
||||
mw.b ${ramdisk_addr_r} 0 0x4000; \
|
||||
mmc read ${ramdisk_addr_r} ${mmc_env} 0x20; \
|
||||
env import -c ${ramdisk_addr_r} 0x2000 || \
|
||||
env import -c ${ramdisk_addr_r} 0x4000;"
|
||||
|
||||
setenv storebootstate " \
|
||||
echo 'storing env...'; \
|
||||
mw.b ${ramdisk_addr_r} 0 0x4000; \
|
||||
env export -c -s 0x4000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT; \
|
||||
mmc write ${ramdisk_addr_r} ${mmc_env} 0x20;"
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
# CONFIG_USB_STORAGE is not set
|
||||
CONFIG_DOS_PARTITION=y
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
CONFIG_CMD_FILEENV=y
|
||||
CONFIG_ENV_IS_NOWHERE=Y
|
||||
# CONFIG_USB_STORAGE is not set
|
||||
CONFIG_DISPLAY_BOARDINFO=y
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From 409a0daa72f6fc1652e17cfea7ea1055e9c483c9 Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 21 Oct 2019 16:29:02 +0200
|
||||
Subject: [PATCH] arm64: dts: meson-g12b-odroid-n2: add missing amlogic, s922x
|
||||
compatible
|
||||
|
||||
This fixes the following DT schemas check errors:
|
||||
meson-g12b-odroid-n2.dt.yaml: /: compatible: ['hardkernel,odroid-n2', 'amlogic,g12b'] is not valid under any of the given schemas
|
||||
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
index 42f15405750cd..0e54c1dc2842b 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
|
||||
|
||||
/ {
|
||||
- compatible = "hardkernel,odroid-n2", "amlogic,g12b";
|
||||
+ compatible = "hardkernel,odroid-n2", "amlogic,s922x", "amlogic,g12b";
|
||||
model = "Hardkernel ODROID-N2";
|
||||
|
||||
aliases {
|
||||
@@ -0,0 +1,55 @@
|
||||
From b93c598b1acfe59ffac342d114483af8a45a78ac Mon Sep 17 00:00:00 2001
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Sat, 1 Feb 2020 20:55:39 +0000
|
||||
Subject: [PATCH 1/1] Amlogic w400: read ethaddr from efuse
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
board/amlogic/w400/w400.c | 25 ++++++++++++++++++++++++-
|
||||
1 file changed, 24 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/board/amlogic/w400/w400.c b/board/amlogic/w400/w400.c
|
||||
index e60dc3a622..d4028c6a39 100644
|
||||
--- a/board/amlogic/w400/w400.c
|
||||
+++ b/board/amlogic/w400/w400.c
|
||||
@@ -6,13 +6,36 @@
|
||||
|
||||
#include <common.h>
|
||||
#include <dm.h>
|
||||
-#include <env_internal.h>
|
||||
+#include <env.h>
|
||||
#include <asm/io.h>
|
||||
+#include <asm/arch/sm.h>
|
||||
#include <asm/arch/eth.h>
|
||||
|
||||
+#define EFUSE_MAC_OFFSET 20
|
||||
+#define EFUSE_MAC_SIZE 12
|
||||
+
|
||||
int misc_init_r(void)
|
||||
{
|
||||
+ u8 mac_addr[6];
|
||||
+ char efuse_mac_addr[EFUSE_MAC_SIZE], buff[3];
|
||||
+ ssize_t len;
|
||||
+
|
||||
meson_eth_init(PHY_INTERFACE_MODE_RGMII, 0);
|
||||
|
||||
+ if (!eth_env_get_enetaddr("ethaddr", mac_addr)) {
|
||||
+ len = meson_sm_read_efuse(EFUSE_MAC_OFFSET,
|
||||
+ efuse_mac_addr, EFUSE_MAC_SIZE);
|
||||
+ if (len != EFUSE_MAC_SIZE)
|
||||
+ return 0;
|
||||
+
|
||||
+ for (int i = 0; i < 6; i++){
|
||||
+ buff[0] = efuse_mac_addr[i * 2];
|
||||
+ buff[1] = efuse_mac_addr[i * 2 + 1];
|
||||
+ mac_addr[i] = simple_strtoul(buff, NULL, 16);
|
||||
+ }
|
||||
+ if(is_valid_ethaddr(mac_addr))
|
||||
+ eth_env_set_enetaddr("ethaddr", mac_addr);
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
# CONFIG_DOS_PARTITION is not set
|
||||
CONFIG_CMD_FILEENV=y
|
||||
CONFIG_ENV_IS_NOWHERE=Y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_FUNCTION_MASS_STORAGE=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
|
||||
Reference in New Issue
Block a user