[PATCH 0/2] u-boot support for ODROID-C4

Hi,
these two patches add initial u-boot support for Hardkernel ODROID-C4.
https://wiki.odroid.com/odroid-c4/odroid-c4
Beniamino Galvani (2): arm: dts: import ODROID-C4 device tree boards: amlogic: add ODROID-C4 support
arch/arm/dts/Makefile | 1 + arch/arm/dts/meson-sm1-odroid-c4.dts | 399 +++++++++++++++++++++++++++ board/amlogic/odroid-c4/MAINTAINERS | 6 + board/amlogic/odroid-c4/Makefile | 3 + board/amlogic/odroid-c4/README | 83 ++++++ board/amlogic/odroid-c4/odroid-c4.c | 17 ++ configs/odroid-c4_defconfig | 63 +++++ 7 files changed, 572 insertions(+) create mode 100644 arch/arm/dts/meson-sm1-odroid-c4.dts create mode 100644 board/amlogic/odroid-c4/MAINTAINERS create mode 100644 board/amlogic/odroid-c4/Makefile create mode 100644 board/amlogic/odroid-c4/README create mode 100644 board/amlogic/odroid-c4/odroid-c4.c create mode 100644 configs/odroid-c4_defconfig

Import the device tree for ODROID-C4 as submitted in [1].
[1] https://lkml.org/lkml/2020/4/24/535
Signed-off-by: Beniamino Galvani b.galvani@gmail.com --- arch/arm/dts/Makefile | 1 + arch/arm/dts/meson-sm1-odroid-c4.dts | 399 +++++++++++++++++++++++++++ 2 files changed, 400 insertions(+) create mode 100644 arch/arm/dts/meson-sm1-odroid-c4.dts
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 559d3ab6a7..70ea72dfaf 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -161,6 +161,7 @@ dtb-$(CONFIG_ARCH_MESON) += \ meson-g12b-odroid-n2.dtb \ meson-g12b-a311d-khadas-vim3.dtb \ meson-sm1-khadas-vim3l.dtb \ + meson-sm1-odroid-c4.dtb \ meson-sm1-sei610.dtb dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \ tegra20-medcom-wide.dtb \ diff --git a/arch/arm/dts/meson-sm1-odroid-c4.dts b/arch/arm/dts/meson-sm1-odroid-c4.dts new file mode 100644 index 0000000000..4882c604a7 --- /dev/null +++ b/arch/arm/dts/meson-sm1-odroid-c4.dts @@ -0,0 +1,399 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2020 Dongjin Kim tobetter@gmail.com + */ + +/dts-v1/; + +#include "meson-sm1.dtsi" +#include <dt-bindings/gpio/meson-g12a-gpio.h> +#include <dt-bindings/leds/common.h> + +/ { + compatible = "hardkernel,odroid-c4", "amlogic,sm1"; + model = "Hardkernel ODROID-C4"; + + aliases { + serial0 = &uart_AO; + ethernet0 = ðmac; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x40000000>; + }; + + emmc_pwrseq: emmc-pwrseq { + compatible = "mmc-pwrseq-emmc"; + reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>; + }; + + leds { + compatible = "gpio-leds"; + + led-blue { + color = <LED_COLOR_ID_BLUE>; + function = LED_FUNCTION_STATUS; + gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + panic-indicator; + }; + }; + + tflash_vdd: regulator-tflash_vdd { + compatible = "regulator-fixed"; + + regulator-name = "TFLASH_VDD"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on; + }; + + tf_io: gpio-regulator-tf_io { + compatible = "regulator-gpio"; + + regulator-name = "TF_IO"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>; + gpios-states = <0>; + + states = <3300000 0>, + <1800000 1>; + }; + + flash_1v8: regulator-flash_1v8 { + compatible = "regulator-fixed"; + regulator-name = "FLASH_1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vcc_3v3>; + regulator-always-on; + }; + + main_12v: regulator-main_12v { + compatible = "regulator-fixed"; + regulator-name = "12V"; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + regulator-always-on; + }; + + vcc_5v: regulator-vcc_5v { + compatible = "regulator-fixed"; + regulator-name = "5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + vin-supply = <&main_12v>; + }; + + vcc_1v8: regulator-vcc_1v8 { + compatible = "regulator-fixed"; + regulator-name = "VCC_1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vcc_3v3>; + regulator-always-on; + }; + + vcc_3v3: regulator-vcc_3v3 { + compatible = "regulator-fixed"; + regulator-name = "VCC_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&vddao_3v3>; + regulator-always-on; + /* FIXME: actually controlled by VDDCPU_B_EN */ + }; + + vddcpu: regulator-vddcpu { + /* + * MP8756GD Regulator. + */ + compatible = "pwm-regulator"; + + regulator-name = "VDDCPU"; + regulator-min-microvolt = <721000>; + regulator-max-microvolt = <1022000>; + + vin-supply = <&main_12v>; + + pwms = <&pwm_AO_cd 1 1250 0>; + pwm-dutycycle-range = <100 0>; + + regulator-boot-on; + regulator-always-on; + }; + + hub_5v: regulator-hub_5v { + compatible = "regulator-fixed"; + regulator-name = "HUB_5V"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc_5v>; + + /* Connected to the Hub CHIPENABLE, LOW sets low power state */ + gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + usb_pwr_en: regulator-usb_pwr_en { + compatible = "regulator-fixed"; + regulator-name = "USB_PWR_EN"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc_5v>; + + /* Connected to the microUSB port power enable */ + gpio = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + vddao_1v8: regulator-vddao_1v8 { + compatible = "regulator-fixed"; + regulator-name = "VDDAO_1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vddao_3v3>; + regulator-always-on; + }; + + vddao_3v3: regulator-vddao_3v3 { + compatible = "regulator-fixed"; + regulator-name = "VDDAO_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + vin-supply = <&main_12v>; + regulator-always-on; + }; + + hdmi-connector { + compatible = "hdmi-connector"; + type = "a"; + + port { + hdmi_connector_in: endpoint { + remote-endpoint = <&hdmi_tx_tmds_out>; + }; + }; + }; +}; + +&cpu0 { + cpu-supply = <&vddcpu>; + operating-points-v2 = <&cpu_opp_table>; + clocks = <&clkc CLKID_CPU_CLK>; + clock-latency = <50000>; +}; + +&cpu1 { + cpu-supply = <&vddcpu>; + operating-points-v2 = <&cpu_opp_table>; + clocks = <&clkc CLKID_CPU1_CLK>; + clock-latency = <50000>; +}; + +&cpu2 { + cpu-supply = <&vddcpu>; + operating-points-v2 = <&cpu_opp_table>; + clocks = <&clkc CLKID_CPU2_CLK>; + clock-latency = <50000>; +}; + +&cpu3 { + cpu-supply = <&vddcpu>; + operating-points-v2 = <&cpu_opp_table>; + clocks = <&clkc CLKID_CPU3_CLK>; + clock-latency = <50000>; +}; + +&ext_mdio { + external_phy: ethernet-phy@0 { + /* Realtek RTL8211F (0x001cc916) */ + reg = <0>; + max-speed = <1000>; + + reset-assert-us = <10000>; + reset-deassert-us = <30000>; + reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; + + interrupt-parent = <&gpio_intc>; + /* MAC_INTR on GPIOZ_14 */ + interrupts = <26 IRQ_TYPE_LEVEL_LOW>; + }; +}; + +ðmac { + pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; + pinctrl-names = "default"; + status = "okay"; + phy-mode = "rgmii"; + phy-handle = <&external_phy>; + amlogic,tx-delay-ns = <2>; +}; + +&gpio { + gpio-line-names = + /* GPIOZ */ + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + /* GPIOH */ + "", "", "", "", "", + "PIN_36", /* GPIOH_5 */ + "PIN_26", /* GPIOH_6 */ + "PIN_32", /* GPIOH_7 */ + "", + /* BOOT */ + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", + /* GPIOC */ + "", "", "", "", "", "", "", "", + /* GPIOA */ + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", + "PIN_27", /* GPIOA_14 */ + "PIN_28", /* GPIOA_15 */ + /* GPIOX */ + "PIN_16", /* GPIOX_0 */ + "PIN_18", /* GPIOX_1 */ + "PIN_22", /* GPIOX_2 */ + "PIN_11", /* GPIOX_3 */ + "PIN_13", /* GPIOX_4 */ + "PIN_7", /* GPIOX_5 */ + "PIN_33", /* GPIOX_6 */ + "PIN_15", /* GPIOX_7 */ + "PIN_19", /* GPIOX_8 */ + "PIN_21", /* GPIOX_9 */ + "PIN_24", /* GPIOX_10 */ + "PIN_23", /* GPIOX_11 */ + "PIN_8", /* GPIOX_12 */ + "PIN_10", /* GPIOX_13 */ + "PIN_29", /* GPIOX_14 */ + "PIN_31", /* GPIOX_15 */ + "PIN_12", /* GPIOX_16 */ + "PIN_3", /* GPIOX_17 */ + "PIN_5", /* GPIOX_18 */ + "PIN_35"; /* GPIOX_19 */ + + /* + * WARNING: The USB Hub on the Odroid-C4 needs a reset signal + * to be turned high in order to be detected by the USB Controller + * This signal should be handled by a USB specific power sequence + * in order to reset the Hub when USB bus is powered down. + */ + usb-hub { + gpio-hog; + gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "usb-hub-reset"; + }; +}; + +&gpio_ao { + gpio-line-names = + /* GPIOAO */ + "", "", "", "", + "PIN_47", /* GPIOAO_4 */ + "", "", + "PIN_45", /* GPIOAO_7 */ + "PIN_46", /* GPIOAO_8 */ + "PIN_44", /* GPIOAO_9 */ + "PIN_42", /* GPIOAO_10 */ + "", + /* GPIOE */ + "", "", ""; +}; + +&hdmi_tx { + status = "okay"; + pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; + pinctrl-names = "default"; + hdmi-supply = <&vcc_5v>; +}; + +&hdmi_tx_tmds_port { + hdmi_tx_tmds_out: endpoint { + remote-endpoint = <&hdmi_connector_in>; + }; +}; + +&pwm_AO_cd { + pinctrl-0 = <&pwm_ao_d_e_pins>; + pinctrl-names = "default"; + clocks = <&xtal>; + clock-names = "clkin1"; + status = "okay"; +}; + +&saradc { + status = "okay"; +}; + +/* SD card */ +&sd_emmc_b { + status = "okay"; + pinctrl-0 = <&sdcard_c_pins>; + pinctrl-1 = <&sdcard_clk_gate_c_pins>; + pinctrl-names = "default", "clk-gate"; + + bus-width = <4>; + cap-sd-highspeed; + max-frequency = <200000000>; + sd-uhs-sdr12; + sd-uhs-sdr25; + sd-uhs-sdr50; + sd-uhs-sdr104; + disable-wp; + + cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>; + vmmc-supply = <&tflash_vdd>; + vqmmc-supply = <&tf_io>; +}; + +/* eMMC */ +&sd_emmc_c { + status = "okay"; + pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>; + pinctrl-1 = <&emmc_clk_gate_pins>; + pinctrl-names = "default", "clk-gate"; + + bus-width = <8>; + cap-mmc-highspeed; + mmc-ddr-1_8v; + mmc-hs200-1_8v; + max-frequency = <200000000>; + disable-wp; + + mmc-pwrseq = <&emmc_pwrseq>; + vmmc-supply = <&vcc_3v3>; + vqmmc-supply = <&flash_1v8>; +}; + +&uart_AO { + status = "okay"; + pinctrl-0 = <&uart_ao_a_pins>; + pinctrl-names = "default"; +}; + +&usb { + status = "okay"; + vbus-supply = <&usb_pwr_en>; +}; + +&usb2_phy0 { + phy-supply = <&vcc_5v>; +}; + +&usb2_phy1 { + /* Enable the hub which is connected to this port */ + phy-supply = <&hub_5v>; +};

Introduce support for ODROID-C4, a single board computer manufactured by Hardkernel Co. Ltd with the following specifications:
- Amlogic S905X3 ARM Cortex-A55 quad-core SoC - 4GiB DDR4 SDRAM - Gigabit Ethernet (External Realtek RTL8211F PHY) - 4 x USB 3.0 Host ports - 1 x USB 2.0 OTG port - HDMI 2.0 - eMMC - SDcard - 40-pin GPIO header - Infrared receiver
Signed-off-by: Beniamino Galvani b.galvani@gmail.com --- board/amlogic/odroid-c4/MAINTAINERS | 6 +++ board/amlogic/odroid-c4/Makefile | 3 ++ board/amlogic/odroid-c4/README | 83 +++++++++++++++++++++++++++++ board/amlogic/odroid-c4/odroid-c4.c | 17 ++++++ configs/odroid-c4_defconfig | 63 ++++++++++++++++++++++ 5 files changed, 172 insertions(+) create mode 100644 board/amlogic/odroid-c4/MAINTAINERS create mode 100644 board/amlogic/odroid-c4/Makefile create mode 100644 board/amlogic/odroid-c4/README create mode 100644 board/amlogic/odroid-c4/odroid-c4.c create mode 100644 configs/odroid-c4_defconfig
diff --git a/board/amlogic/odroid-c4/MAINTAINERS b/board/amlogic/odroid-c4/MAINTAINERS new file mode 100644 index 0000000000..ebc1a9efe5 --- /dev/null +++ b/board/amlogic/odroid-c4/MAINTAINERS @@ -0,0 +1,6 @@ +ODROID-C4 +M: Beniamino Galvani b.galvani@gmail.com +S: Maintained +L: u-boot-amlogic@groups.io +F: board/amlogic/odroid-c4/ +F: configs/odroid-c4_defconfig diff --git a/board/amlogic/odroid-c4/Makefile b/board/amlogic/odroid-c4/Makefile new file mode 100644 index 0000000000..a0ca5fb242 --- /dev/null +++ b/board/amlogic/odroid-c4/Makefile @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0+ + +obj-y := odroid-c4.o diff --git a/board/amlogic/odroid-c4/README b/board/amlogic/odroid-c4/README new file mode 100644 index 0000000000..9308965738 --- /dev/null +++ b/board/amlogic/odroid-c4/README @@ -0,0 +1,83 @@ +U-Boot for ODROID-C4 +==================== + +ODROID-C4 is a single board computer manufactured by Hardkernel +Co. Ltd with the following specifications: + + - Amlogic S905X3 ARM Cortex-A55 quad-core SoC + - 4GiB DDR4 SDRAM + - Gigabit Ethernet (External Realtek RTL8211F PHY) + - 4 x USB 3.0 Host ports + - 1 x USB 2.0 OTG port + - HDMI 2.0 + - eMMC + - SDcard + - 40-pin GPIO header + - Infrared receiver + +Currently the u-boot port supports the following devices: + - Serial + - Clock controller + - USB + +u-boot compilation +================== + + export ARCH=arm + export CROSS_COMPILE=aarch64-none-elf- + make odroid-c4_defconfig + make + +Image creation +============== + +Amlogic doesn't provide sources for the firmware and for tools needed +to create the bootloader image, so it is necessary to obtain them from +the git tree published by the board vendor: + + wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-... + wget https://releases.linaro.org/archive/14.04/components/toolchain/binaries/gcc-... + tar xf gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz + tar xf gcc-linaro-arm-none-eabi-4.8-2014.04_linux.tar.xz + export PATH=$PWD/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux/bin:$PWD/gcc-linaro-arm-none-eabi-4.8-2014.04_linux/bin:$PATH + git clone --depth 1 https://github.com/hardkernel/u-boot.git -b odroidg12-v2015.01 hardkernel-u-boot + cd hardkernel-u-boot + make odroidc4_defconfig + make + export UBOOTDIR=$PWD + +Go back to mainline U-Boot source tree and then: + + mkdir fip + $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl30sig --level v3 \ + --input $UBOOTDIR/build/fip/bl30_new.bin \ + --output fip/bl30_new.bin.g12.enc + $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl3sig --type bl30 --level v3 \ + --input fip/bl30_new.bin.g12.enc \ + --output fip/bl30_new.bin.enc + $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl3sig --type bl31 --level v3 \ + --input $UBOOTDIR/fip/g12a/bl31.img \ + --output fip/bl31.img.enc + $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl3sig --type bl33 --level v3 \ + --compress lz4 \ + --input u-boot.bin \ + --output fip/bl33.bin.enc + $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bl2sig \ + --input $UBOOTDIR/build/fip/bl2_new.bin \ + --output fip/bl2.n.bin.sig + $UBOOTDIR/fip/g12a/aml_encrypt_g12a --bootmk \ + --output fip/u-boot.bin \ + --bl2 fip/bl2.n.bin.sig \ + --bl30 fip/bl30_new.bin.enc \ + --bl31 fip/bl31.img.enc \ + --bl33 fip/bl33.bin.enc \ + --ddrfw1 $UBOOTDIR/fip/g12a/ddr4_1d.fw \ + --ddrfw2 $UBOOTDIR/fip/g12a/ddr4_2d.fw \ + --ddrfw4 $UBOOTDIR/fip/g12a/piei.fw \ + --ddrfw8 $UBOOTDIR/fip/g12a/aml_ddr.fw \ + --level v3 + +and then write the image to SD with: + + DEV=/dev/your_sd_device + dd if=fip/u-boot.bin of=$DEV conv=fsync,notrunc bs=512 seek=1 diff --git a/board/amlogic/odroid-c4/odroid-c4.c b/board/amlogic/odroid-c4/odroid-c4.c new file mode 100644 index 0000000000..14f1748fa0 --- /dev/null +++ b/board/amlogic/odroid-c4/odroid-c4.c @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2016 BayLibre, SAS + */ + +#include <common.h> +#include <dm.h> +#include <asm/arch/eth.h> + +int misc_init_r(void) +{ + meson_eth_init(PHY_INTERFACE_MODE_RGMII, 0); + + meson_generate_serial_ethaddr(); + + return 0; +} diff --git a/configs/odroid-c4_defconfig b/configs/odroid-c4_defconfig new file mode 100644 index 0000000000..cc27c6fc1b --- /dev/null +++ b/configs/odroid-c4_defconfig @@ -0,0 +1,63 @@ +CONFIG_ARM=y +CONFIG_SYS_BOARD="odroid-c4" +CONFIG_ARCH_MESON=y +CONFIG_SYS_TEXT_BASE=0x01000000 +CONFIG_ENV_SIZE=0x10000 +CONFIG_DM_GPIO=y +CONFIG_MESON_G12A=y +CONFIG_NR_DRAM_BANKS=1 +CONFIG_DEBUG_UART_BASE=0xff803000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_IDENT_STRING=" odroid-c4" +# CONFIG_PSCI_RESET is not set +CONFIG_DEBUG_UART=y +CONFIG_OF_BOARD_SETUP=y +# CONFIG_CONSOLE_MUX is not set +CONFIG_MISC_INIT_R=y +# CONFIG_DISPLAY_CPUINFO is not set +# CONFIG_CMD_BDI is not set +# CONFIG_CMD_IMI is not set +CONFIG_CMD_GPIO=y +CONFIG_CMD_GPT=y +# CONFIG_CMD_LOADS is not set +CONFIG_CMD_MMC=y +CONFIG_CMD_USB=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_BMP=y +CONFIG_CMD_REGULATOR=y +CONFIG_OF_CONTROL=y +CONFIG_DEFAULT_DEVICE_TREE="meson-sm1-odroid-c4" +CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_NET_RANDOM_ETHADDR=y +# CONFIG_INPUT is not set +CONFIG_DM_MMC=y +CONFIG_MMC_MESON_GX=y +CONFIG_PHY_ADDR_ENABLE=y +CONFIG_PHY_ADDR=8 +CONFIG_DM_ETH=y +CONFIG_ETH_DESIGNWARE=y +CONFIG_MESON_G12A_USB_PHY=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_MESON_G12A=y +CONFIG_POWER_DOMAIN=y +CONFIG_MESON_EE_POWER_DOMAIN=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_DM_RESET=y +CONFIG_DEBUG_UART_MESON=y +CONFIG_DEBUG_UART_ANNOUNCE=y +CONFIG_DEBUG_UART_SKIP_INIT=y +CONFIG_MESON_SERIAL=y +CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_MESON_G12A=y +CONFIG_DM_VIDEO=y +# CONFIG_VIDEO_BPP8 is not set +# CONFIG_VIDEO_BPP16 is not set +CONFIG_SYS_WHITE_ON_BLACK=y +CONFIG_VIDEO_MESON=y +CONFIG_VIDEO_DT_SIMPLEFB=y +CONFIG_OF_LIBFDT_OVERLAY=y

Hi Beniamino,
On 05/05/2020 22:22, Beniamino Galvani wrote:
Hi,
these two patches add initial u-boot support for Hardkernel ODROID-C4.
Thanks for the patchset, I already have one in my test tree, by you did beat me by sending it to the list !
https://wiki.odroid.com/odroid-c4/odroid-c4
Beniamino Galvani (2): arm: dts: import ODROID-C4 device tree
The DT is not yet applied by kevin, thus I'll prefer waiting it to be accepted and merged in a stable linux tree to keep DT synced.
boards: amlogic: add ODROID-C4 support
Please re-use the w400 board instead of adding a new board, there is no need for a new one until you'll need to add more functionalities.
I know meson_generate_serial_ethaddr() is absent from w400, I'll add it shortly.
Neil
arch/arm/dts/Makefile | 1 + arch/arm/dts/meson-sm1-odroid-c4.dts | 399 +++++++++++++++++++++++++++ board/amlogic/odroid-c4/MAINTAINERS | 6 + board/amlogic/odroid-c4/Makefile | 3 + board/amlogic/odroid-c4/README | 83 ++++++ board/amlogic/odroid-c4/odroid-c4.c | 17 ++ configs/odroid-c4_defconfig | 63 +++++ 7 files changed, 572 insertions(+) create mode 100644 arch/arm/dts/meson-sm1-odroid-c4.dts create mode 100644 board/amlogic/odroid-c4/MAINTAINERS create mode 100644 board/amlogic/odroid-c4/Makefile create mode 100644 board/amlogic/odroid-c4/README create mode 100644 board/amlogic/odroid-c4/odroid-c4.c create mode 100644 configs/odroid-c4_defconfig

On Wed, May 06, 2020 at 09:59:17AM +0200, Neil Armstrong wrote:
Hi Beniamino,
On 05/05/2020 22:22, Beniamino Galvani wrote:
Hi,
these two patches add initial u-boot support for Hardkernel ODROID-C4.
Thanks for the patchset, I already have one in my test tree, by you did beat me by sending it to the list !
Oh, I didn't notice, sorry.
https://wiki.odroid.com/odroid-c4/odroid-c4
Beniamino Galvani (2): arm: dts: import ODROID-C4 device tree
The DT is not yet applied by kevin, thus I'll prefer waiting it to be accepted and merged in a stable linux tree to keep DT synced.
boards: amlogic: add ODROID-C4 support
Please re-use the w400 board instead of adding a new board, there is no need for a new one until you'll need to add more functionalities.
I know meson_generate_serial_ethaddr() is absent from w400, I'll add it shortly.
Okay, I'll wait that the DT gets merged and then will resubmit using w400.
Thanks, Beniamino

Hi Beniamino,
On Wed, 6 May 2020 at 01:53, Beniamino Galvani b.galvani@gmail.com wrote:
Hi,
these two patches add initial u-boot support for Hardkernel ODROID-C4.
https://wiki.odroid.com/odroid-c4/odroid-c4
Beniamino Galvani (2): arm: dts: import ODROID-C4 device tree boards: amlogic: add ODROID-C4 support
Can you respin this patches, I would like to see these get merged in the current u-boot release
-Anand

Hi,
On 30/06/2020 13:33, Anand Moon wrote:
Hi Beniamino,
On Wed, 6 May 2020 at 01:53, Beniamino Galvani b.galvani@gmail.com wrote:
Hi,
these two patches add initial u-boot support for Hardkernel ODROID-C4.
https://wiki.odroid.com/odroid-c4/odroid-c4
Beniamino Galvani (2): arm: dts: import ODROID-C4 device tree boards: amlogic: add ODROID-C4 support
Can you respin this patches, I would like to see these get merged in the current u-boot release
-Anand
The Odroid-C4 could re-use the new Odroid-N2 board support I submitted at [1]
Anand, is the MAC address stored stored the same way on the C4 ?
Neil
[1] https://patchwork.ozlabs.org/project/uboot/patch/20200618144037.23392-1-narm...

Hi Neil,
On Tue, 30 Jun 2020 at 18:30, Neil Armstrong narmstrong@baylibre.com wrote:
Hi,
On 30/06/2020 13:33, Anand Moon wrote:
Hi Beniamino,
On Wed, 6 May 2020 at 01:53, Beniamino Galvani b.galvani@gmail.com wrote:
Hi,
these two patches add initial u-boot support for Hardkernel ODROID-C4.
https://wiki.odroid.com/odroid-c4/odroid-c4
Beniamino Galvani (2): arm: dts: import ODROID-C4 device tree boards: amlogic: add ODROID-C4 support
Can you respin this patches, I would like to see these get merged in the current u-boot release
-Anand
The Odroid-C4 could re-use the new Odroid-N2 board support I submitted at [1]
Anand, is the MAC address stored stored the same way on the C4 ?
Neil
[1] https://patchwork.ozlabs.org/project/uboot/patch/20200618144037.23392-1-narm...
I gave this patches a try on latest u-boot but I cannot make my Odroid C4 to boot up uinsg microSD card and eMMC Here are the logs.
SM1:BL:511f6b:81ca2f;FEAT:A0F83180:20282000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:0;READ:0;0.0;CHK:0; bl2_stage_init 0x01 bl2_stage_init 0x81 hw id: 0x0000 - pwm id 0x01 bl2_stage_init 0xc1 bl2_stage_init 0x02
no sdio debug board detected L0:00000000 L1:00000703 L2:00008067 L3:15000020 S1:00000000 B2:20282000 B1:a0f83180
TE: 260148
BL2 Built : 22:54:32, Apr 28 2020. g12a ga659aac-dirty - changqing.gao@droid11
Board ID = 1 Set cpu clk to 24M Set clk81 to 24M Use GP1_pll as DSU clk. DSU clk: 1200 Mhz CPU clk: 1200 MHz Set clk81 to 166.6M DDR driver_vesion: LPDDR4_PHY_V_0_1_15 build time: Apr 28 2020 22:54:28 board id: 1 Load FIP HDR from SD, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0 fw parse done Load ddrfw from SD, src: 0x00030200, des: 0xfffd0000, size: 0x0000c000, part: 0 Load ddrfw from SD, src: 0x0002c200, des: 0xfffd0000, size: 0x00004000, part: 0 PIEI prepare done fastboot data load fastboot data verify verify result: 255 Cfg max: 2, cur: 1. Board id: 255. Force loop cfg DDR4 probe ddr clk to 1320MHz Load ddrfw from SD, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part: 0
dmc_version 0001 Check phy result INFO : End of initialization INFO : End of read enable training INFO : End of fine write leveling INFO : End of read dq deskew training INFO : End of MPR read delay center optimization INFO : End of Write leveling coarse delay INFO : End of write delay center optimization INFO : End of read delay center optimization INFO : End of max read latency training INFO : Training has run successfully! 1D training succeed Load ddrfw from SD, src: 0x00020200, des: 0xfffd0000, size: 0x0000c000, part: 0 Check phy result INFO : End of initialization INFO : End of 2D read delay Voltage center optimization INFO : End of 2D write delay Voltage center optimization INFO : Training has run successfully!
R0_RxClkDly_Margin==106 ps 9 R0_TxDqDly_Margi==118 ps 10
R1_RxClkDly_Margin==0 ps 0 R1_TxDqDly_Margi==0 ps 0
dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0001
soc_vref_reg_value 0x 0000004e 0000004e 0000004e 0000004d 0000004f 0000004e 0000004e 0000004f 0000004c 0000004d 0000004e 0000004c 0000004c 0000004e 0000004f 0000004e 00000050 0000004e 0000004d 0000004e 0000004e 0000004c 0000004d 0000004d 0000004d 0000004f 0000004f 0000004f 0000004d 0000004d 0000004d 0000004f dram_vref_reg_value 0x 00000021 2D training succeed aml_ddr_fw_vesion: LPDDR4_PHY_V_0_1_15 build time: Jun 18 2019 20:29:43 auto size-- 65535DDR cs0 size: 2048MB DDR cs1 size: 2048MB DMC_DDR_CTRL: 00700024DDR size: 3928MB cs0 DataBus test pass cs1 DataBus test pass cs0 AddrBus test pass cs1 AddrBus test pass
non-sec scramble use zero key ddr scramble enabled
100bdlr_step_size ps== 461 result report boot times 0Enable ddr reg access Load FIP HDR from SD, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0 Load BL3X from SD, src: 0x0003c200, des: 0x0172c000, size: 0x00090000, part: 0 0.0;M3 CHK:0;cm4_sp_mode 0 MVN_1=0x00000000 MVN_2=0x00000000 [Image: g12a_v1.1.3386-3b31431 2019-05-21 10:41:54 luan.yuan@droid15-sz] OPS=0x10 ring efuse init 2b 0c 10 00 01 13 20 00 00 0f 36 30 43 57 50 50 [0.017319 Inits done] secure task start! high task start! low task start! run into bl31 NOTICE: BL31: v1.3(release):4fc40b1 NOTICE: BL31: Built : 15:57:33, May 22 2019 NOTICE: BL31: G12A normal boot! NOTICE: BL31: BL33 decompress pass ERROR: Error initializing runtime service opteed_fast
U-Boot 2020.07-rc5-00076-g46e5b60e21 (Jun 30 2020 - 21:08:25 +0530) odroid-c4
Model: Hardkernel ODROID-C4 SoC: Amlogic Meson SM1 (Unknown) Revision 2b:c (10:2) DRAM: 3.8 GiB MMC: sd@ffe05000: 0, mmc@ffe07000: 1 stdio_add_devices: Video device failed (ret=-22) In: serial@3000 Out: serial@3000 Err: serial@3000 Net: Could not get PHY for ethernet@ff3f0000: addr 8 No ethernet found.
Hit any key to stop autoboot: 0
-Anand

Hi,
On 30/06/2020 18:02, Anand Moon wrote:
Hi Neil,
On Tue, 30 Jun 2020 at 18:30, Neil Armstrong narmstrong@baylibre.com wrote:
Hi,
On 30/06/2020 13:33, Anand Moon wrote:
Hi Beniamino,
On Wed, 6 May 2020 at 01:53, Beniamino Galvani b.galvani@gmail.com wrote:
Hi,
these two patches add initial u-boot support for Hardkernel ODROID-C4.
https://wiki.odroid.com/odroid-c4/odroid-c4
Beniamino Galvani (2): arm: dts: import ODROID-C4 device tree boards: amlogic: add ODROID-C4 support
Can you respin this patches, I would like to see these get merged in the current u-boot release
-Anand
The Odroid-C4 could re-use the new Odroid-N2 board support I submitted at [1]
Anand, is the MAC address stored stored the same way on the C4 ?
Neil
[1] https://patchwork.ozlabs.org/project/uboot/patch/20200618144037.23392-1-narm...
I gave this patches a try on latest u-boot but I cannot make my Odroid C4 to boot up uinsg microSD card and eMMC Here are the logs.
The PHY config must be wrong and it misses the -u-boot.dtsi to enable HDMI.
Can you test my custodian test branch with my C4 support patchset ?
https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic/-/tree/u-boot-amlogi...
This one is used in Armbian 5.4 release and our KernelCI lab.
Neil
SM1:BL:511f6b:81ca2f;FEAT:A0F83180:20282000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:0;READ:0;0.0;CHK:0; bl2_stage_init 0x01 bl2_stage_init 0x81 hw id: 0x0000 - pwm id 0x01 bl2_stage_init 0xc1 bl2_stage_init 0x02
no sdio debug board detected L0:00000000 L1:00000703 L2:00008067 L3:15000020 S1:00000000 B2:20282000 B1:a0f83180
TE: 260148
BL2 Built : 22:54:32, Apr 28 2020. g12a ga659aac-dirty - changqing.gao@droid11
Board ID = 1 Set cpu clk to 24M Set clk81 to 24M Use GP1_pll as DSU clk. DSU clk: 1200 Mhz CPU clk: 1200 MHz Set clk81 to 166.6M DDR driver_vesion: LPDDR4_PHY_V_0_1_15 build time: Apr 28 2020 22:54:28 board id: 1 Load FIP HDR from SD, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0 fw parse done Load ddrfw from SD, src: 0x00030200, des: 0xfffd0000, size: 0x0000c000, part: 0 Load ddrfw from SD, src: 0x0002c200, des: 0xfffd0000, size: 0x00004000, part: 0 PIEI prepare done fastboot data load fastboot data verify verify result: 255 Cfg max: 2, cur: 1. Board id: 255. Force loop cfg DDR4 probe ddr clk to 1320MHz Load ddrfw from SD, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part: 0
dmc_version 0001 Check phy result INFO : End of initialization INFO : End of read enable training INFO : End of fine write leveling INFO : End of read dq deskew training INFO : End of MPR read delay center optimization INFO : End of Write leveling coarse delay INFO : End of write delay center optimization INFO : End of read delay center optimization INFO : End of max read latency training INFO : Training has run successfully! 1D training succeed Load ddrfw from SD, src: 0x00020200, des: 0xfffd0000, size: 0x0000c000, part: 0 Check phy result INFO : End of initialization INFO : End of 2D read delay Voltage center optimization INFO : End of 2D write delay Voltage center optimization INFO : Training has run successfully!
R0_RxClkDly_Margin==106 ps 9 R0_TxDqDly_Margi==118 ps 10
R1_RxClkDly_Margin==0 ps 0 R1_TxDqDly_Margi==0 ps 0
dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0001
soc_vref_reg_value 0x 0000004e 0000004e 0000004e 0000004d 0000004f 0000004e 0000004e 0000004f 0000004c 0000004d 0000004e 0000004c 0000004c 0000004e 0000004f 0000004e 00000050 0000004e 0000004d 0000004e 0000004e 0000004c 0000004d 0000004d 0000004d 0000004f 0000004f 0000004f 0000004d 0000004d 0000004d 0000004f dram_vref_reg_value 0x 00000021 2D training succeed aml_ddr_fw_vesion: LPDDR4_PHY_V_0_1_15 build time: Jun 18 2019 20:29:43 auto size-- 65535DDR cs0 size: 2048MB DDR cs1 size: 2048MB DMC_DDR_CTRL: 00700024DDR size: 3928MB cs0 DataBus test pass cs1 DataBus test pass cs0 AddrBus test pass cs1 AddrBus test pass
non-sec scramble use zero key ddr scramble enabled
100bdlr_step_size ps== 461 result report boot times 0Enable ddr reg access Load FIP HDR from SD, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0 Load BL3X from SD, src: 0x0003c200, des: 0x0172c000, size: 0x00090000, part: 0 0.0;M3 CHK:0;cm4_sp_mode 0 MVN_1=0x00000000 MVN_2=0x00000000 [Image: g12a_v1.1.3386-3b31431 2019-05-21 10:41:54 luan.yuan@droid15-sz] OPS=0x10 ring efuse init 2b 0c 10 00 01 13 20 00 00 0f 36 30 43 57 50 50 [0.017319 Inits done] secure task start! high task start! low task start! run into bl31 NOTICE: BL31: v1.3(release):4fc40b1 NOTICE: BL31: Built : 15:57:33, May 22 2019 NOTICE: BL31: G12A normal boot! NOTICE: BL31: BL33 decompress pass ERROR: Error initializing runtime service opteed_fast
U-Boot 2020.07-rc5-00076-g46e5b60e21 (Jun 30 2020 - 21:08:25 +0530) odroid-c4
Model: Hardkernel ODROID-C4 SoC: Amlogic Meson SM1 (Unknown) Revision 2b:c (10:2) DRAM: 3.8 GiB MMC: sd@ffe05000: 0, mmc@ffe07000: 1 stdio_add_devices: Video device failed (ret=-22) In: serial@3000 Out: serial@3000 Err: serial@3000 Net: Could not get PHY for ethernet@ff3f0000: addr 8 No ethernet found.
Hit any key to stop autoboot: 0
-Anand

Hi Neil,
On Wed, 1 Jul 2020 at 13:22, Neil Armstrong narmstrong@baylibre.com wrote:
Hi,
On 30/06/2020 18:02, Anand Moon wrote:
Hi Neil,
On Tue, 30 Jun 2020 at 18:30, Neil Armstrong narmstrong@baylibre.com wrote:
Hi,
On 30/06/2020 13:33, Anand Moon wrote:
Hi Beniamino,
On Wed, 6 May 2020 at 01:53, Beniamino Galvani b.galvani@gmail.com wrote:
Hi,
these two patches add initial u-boot support for Hardkernel ODROID-C4.
https://wiki.odroid.com/odroid-c4/odroid-c4
Beniamino Galvani (2): arm: dts: import ODROID-C4 device tree boards: amlogic: add ODROID-C4 support
Can you respin this patches, I would like to see these get merged in the current u-boot release
-Anand
The Odroid-C4 could re-use the new Odroid-N2 board support I submitted at [1]
Anand, is the MAC address stored stored the same way on the C4 ?
Neil
[1] https://patchwork.ozlabs.org/project/uboot/patch/20200618144037.23392-1-narm...
I gave this patches a try on latest u-boot but I cannot make my Odroid C4 to boot up uinsg microSD card and eMMC Here are the logs.
The PHY config must be wrong and it misses the -u-boot.dtsi to enable HDMI.
Can you test my custodian test branch with my C4 support patchset ?
https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic/-/tree/u-boot-amlogi...
This one is used in Armbian 5.4 release and our KernelCI lab.
Neil
Thanks.
There seems to be a typo in the build instructions in # doc/board/amlogic/odroid-c4.rst instead of *g12b*, it should be *g12a*
See below I get following build warning, which I fix locally,
./buildc4c.sh: line 78: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 81: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 84: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 87: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 90: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 92: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory
After that fix I am able to boot my board using eMMC and microSD card.
-Anand

Hi,
On 01/07/2020 13:31, Anand Moon wrote:
Hi Neil,
On Wed, 1 Jul 2020 at 13:22, Neil Armstrong narmstrong@baylibre.com wrote:
Hi,
On 30/06/2020 18:02, Anand Moon wrote:
Hi Neil,
On Tue, 30 Jun 2020 at 18:30, Neil Armstrong narmstrong@baylibre.com wrote:
Hi,
On 30/06/2020 13:33, Anand Moon wrote:
Hi Beniamino,
On Wed, 6 May 2020 at 01:53, Beniamino Galvani b.galvani@gmail.com wrote:
Hi,
these two patches add initial u-boot support for Hardkernel ODROID-C4.
https://wiki.odroid.com/odroid-c4/odroid-c4
Beniamino Galvani (2): arm: dts: import ODROID-C4 device tree boards: amlogic: add ODROID-C4 support
Can you respin this patches, I would like to see these get merged in the current u-boot release
-Anand
The Odroid-C4 could re-use the new Odroid-N2 board support I submitted at [1]
Anand, is the MAC address stored stored the same way on the C4 ?
Neil
[1] https://patchwork.ozlabs.org/project/uboot/patch/20200618144037.23392-1-narm...
I gave this patches a try on latest u-boot but I cannot make my Odroid C4 to boot up uinsg microSD card and eMMC Here are the logs.
The PHY config must be wrong and it misses the -u-boot.dtsi to enable HDMI.
Can you test my custodian test branch with my C4 support patchset ?
https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic/-/tree/u-boot-amlogi...
This one is used in Armbian 5.4 release and our KernelCI lab.
Neil
Thanks.
There seems to be a typo in the build instructions in # doc/board/amlogic/odroid-c4.rst instead of *g12b*, it should be *g12a*
See below I get following build warning, which I fix locally,
./buildc4c.sh: line 78: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 81: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 84: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 87: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 90: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 92: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory
After that fix I am able to boot my board using eMMC and microSD card.
Thanks for testing, I'll push my serie rebased on v5.8-rc1 and fix this typo.
Neil
-Anand

Hi Neil,
On Wed, 1 Jul 2020 at 18:38, Neil Armstrong narmstrong@baylibre.com wrote:
Hi,
On 01/07/2020 13:31, Anand Moon wrote:
Hi Neil,
On Wed, 1 Jul 2020 at 13:22, Neil Armstrong narmstrong@baylibre.com wrote:
Hi,
On 30/06/2020 18:02, Anand Moon wrote:
Hi Neil,
On Tue, 30 Jun 2020 at 18:30, Neil Armstrong narmstrong@baylibre.com wrote:
Hi,
On 30/06/2020 13:33, Anand Moon wrote:
Hi Beniamino,
On Wed, 6 May 2020 at 01:53, Beniamino Galvani b.galvani@gmail.com wrote: > > Hi, > > these two patches add initial u-boot support for Hardkernel ODROID-C4. > > https://wiki.odroid.com/odroid-c4/odroid-c4 > > Beniamino Galvani (2): > arm: dts: import ODROID-C4 device tree > boards: amlogic: add ODROID-C4 support >
Can you respin this patches, I would like to see these get merged in the current u-boot release
-Anand
The Odroid-C4 could re-use the new Odroid-N2 board support I submitted at [1]
Anand, is the MAC address stored stored the same way on the C4 ?
Neil
[1] https://patchwork.ozlabs.org/project/uboot/patch/20200618144037.23392-1-narm...
I gave this patches a try on latest u-boot but I cannot make my Odroid C4 to boot up uinsg microSD card and eMMC Here are the logs.
The PHY config must be wrong and it misses the -u-boot.dtsi to enable HDMI.
Can you test my custodian test branch with my C4 support patchset ?
https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic/-/tree/u-boot-amlogi...
This one is used in Armbian 5.4 release and our KernelCI lab.
Neil
Thanks.
There seems to be a typo in the build instructions in # doc/board/amlogic/odroid-c4.rst instead of *g12b*, it should be *g12a*
See below I get following build warning, which I fix locally,
./buildc4c.sh: line 78: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 81: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 84: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 87: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 90: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 92: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory
After that fix I am able to boot my board using eMMC and microSD card.
Thanks for testing, I'll push my serie rebased on v5.8-rc1 and fix this typo.
Neil
Thanks, I see the same issue with random mac address just like N2.
-Anand

On 01/07/2020 16:43, Anand Moon wrote:
Hi Neil,
On Wed, 1 Jul 2020 at 18:38, Neil Armstrong narmstrong@baylibre.com wrote:
Hi,
On 01/07/2020 13:31, Anand Moon wrote:
Hi Neil,
On Wed, 1 Jul 2020 at 13:22, Neil Armstrong narmstrong@baylibre.com wrote:
Hi,
On 30/06/2020 18:02, Anand Moon wrote:
Hi Neil,
On Tue, 30 Jun 2020 at 18:30, Neil Armstrong narmstrong@baylibre.com wrote:
Hi,
On 30/06/2020 13:33, Anand Moon wrote: > Hi Beniamino, > > On Wed, 6 May 2020 at 01:53, Beniamino Galvani b.galvani@gmail.com wrote: >> >> Hi, >> >> these two patches add initial u-boot support for Hardkernel ODROID-C4. >> >> https://wiki.odroid.com/odroid-c4/odroid-c4 >> >> Beniamino Galvani (2): >> arm: dts: import ODROID-C4 device tree >> boards: amlogic: add ODROID-C4 support >> > > Can you respin this patches, I would like to see these get merged in > the current u-boot release > > -Anand >
The Odroid-C4 could re-use the new Odroid-N2 board support I submitted at [1]
Anand, is the MAC address stored stored the same way on the C4 ?
Neil
[1] https://patchwork.ozlabs.org/project/uboot/patch/20200618144037.23392-1-narm...
I gave this patches a try on latest u-boot but I cannot make my Odroid C4 to boot up uinsg microSD card and eMMC Here are the logs.
The PHY config must be wrong and it misses the -u-boot.dtsi to enable HDMI.
Can you test my custodian test branch with my C4 support patchset ?
https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic/-/tree/u-boot-amlogi...
This one is used in Armbian 5.4 release and our KernelCI lab.
Neil
Thanks.
There seems to be a typo in the build instructions in # doc/board/amlogic/odroid-c4.rst instead of *g12b*, it should be *g12a*
See below I get following build warning, which I fix locally,
./buildc4c.sh: line 78: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 81: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 84: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 87: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 90: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 92: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory
After that fix I am able to boot my board using eMMC and microSD card.
Thanks for testing, I'll push my serie rebased on v5.8-rc1 and fix this typo.
Neil
Thanks, I see the same issue with random mac address just like N2.
Yes, my branch was not using the N2 board support with eFuses MAC readout, can you test my last patchset I just sent ? It should use the MAC from eFuses or generate an unique address with the SoC serial number.
Please apply the patch in [1] before the new Odroid-C4 serie.
[1] https://patchwork.ozlabs.org/project/uboot/patch/20200618144037.23392-1-narm...
Neil
-Anand

Hi Neil,
On Wed, 1 Jul 2020 at 20:16, Neil Armstrong narmstrong@baylibre.com wrote:
On 01/07/2020 16:43, Anand Moon wrote:
Hi Neil,
On Wed, 1 Jul 2020 at 18:38, Neil Armstrong narmstrong@baylibre.com wrote:
Hi,
On 01/07/2020 13:31, Anand Moon wrote:
Hi Neil,
On Wed, 1 Jul 2020 at 13:22, Neil Armstrong narmstrong@baylibre.com wrote:
Hi,
On 30/06/2020 18:02, Anand Moon wrote:
Hi Neil,
On Tue, 30 Jun 2020 at 18:30, Neil Armstrong narmstrong@baylibre.com wrote: > > Hi, > > On 30/06/2020 13:33, Anand Moon wrote: >> Hi Beniamino, >> >> On Wed, 6 May 2020 at 01:53, Beniamino Galvani b.galvani@gmail.com wrote: >>> >>> Hi, >>> >>> these two patches add initial u-boot support for Hardkernel ODROID-C4. >>> >>> https://wiki.odroid.com/odroid-c4/odroid-c4 >>> >>> Beniamino Galvani (2): >>> arm: dts: import ODROID-C4 device tree >>> boards: amlogic: add ODROID-C4 support >>> >> >> Can you respin this patches, I would like to see these get merged in >> the current u-boot release >> >> -Anand >> > > The Odroid-C4 could re-use the new Odroid-N2 board support I submitted at [1] > > Anand, is the MAC address stored stored the same way on the C4 ? > > Neil > > [1] https://patchwork.ozlabs.org/project/uboot/patch/20200618144037.23392-1-narm...
I gave this patches a try on latest u-boot but I cannot make my Odroid C4 to boot up uinsg microSD card and eMMC Here are the logs.
The PHY config must be wrong and it misses the -u-boot.dtsi to enable HDMI.
Can you test my custodian test branch with my C4 support patchset ?
https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic/-/tree/u-boot-amlogi...
This one is used in Armbian 5.4 release and our KernelCI lab.
Neil
Thanks.
There seems to be a typo in the build instructions in # doc/board/amlogic/odroid-c4.rst instead of *g12b*, it should be *g12a*
See below I get following build warning, which I fix locally,
./buildc4c.sh: line 78: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 81: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 84: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 87: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 90: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 92: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory
After that fix I am able to boot my board using eMMC and microSD card.
Thanks for testing, I'll push my serie rebased on v5.8-rc1 and fix this typo.
Neil
Thanks, I see the same issue with random mac address just like N2.
Yes, my branch was not using the N2 board support with eFuses MAC readout, can you test my last patchset I just sent ? It should use the MAC from eFuses or generate an unique address with the SoC serial number.
Thanks
Please apply the patch in [1] before the new Odroid-C4 serie.
[1] https://patchwork.ozlabs.org/project/uboot/patch/20200618144037.23392-1-narm...
Neil
I do not know the reason but your patches are not showing up on u-boot patchwork.
[0] https://patchwork.ozlabs.org/project/uboot/list/
-Anand

On 01/07/2020 18:09, Anand Moon wrote:
Hi Neil,
On Wed, 1 Jul 2020 at 20:16, Neil Armstrong narmstrong@baylibre.com wrote:
On 01/07/2020 16:43, Anand Moon wrote:
Hi Neil,
On Wed, 1 Jul 2020 at 18:38, Neil Armstrong narmstrong@baylibre.com wrote:
Hi,
On 01/07/2020 13:31, Anand Moon wrote:
Hi Neil,
On Wed, 1 Jul 2020 at 13:22, Neil Armstrong narmstrong@baylibre.com wrote:
Hi,
On 30/06/2020 18:02, Anand Moon wrote: > Hi Neil, > > On Tue, 30 Jun 2020 at 18:30, Neil Armstrong narmstrong@baylibre.com wrote: >> >> Hi, >> >> On 30/06/2020 13:33, Anand Moon wrote: >>> Hi Beniamino, >>> >>> On Wed, 6 May 2020 at 01:53, Beniamino Galvani b.galvani@gmail.com wrote: >>>> >>>> Hi, >>>> >>>> these two patches add initial u-boot support for Hardkernel ODROID-C4. >>>> >>>> https://wiki.odroid.com/odroid-c4/odroid-c4 >>>> >>>> Beniamino Galvani (2): >>>> arm: dts: import ODROID-C4 device tree >>>> boards: amlogic: add ODROID-C4 support >>>> >>> >>> Can you respin this patches, I would like to see these get merged in >>> the current u-boot release >>> >>> -Anand >>> >> >> The Odroid-C4 could re-use the new Odroid-N2 board support I submitted at [1] >> >> Anand, is the MAC address stored stored the same way on the C4 ? >> >> Neil >> >> [1] https://patchwork.ozlabs.org/project/uboot/patch/20200618144037.23392-1-narm... > > I gave this patches a try on latest u-boot but I cannot make my Odroid > C4 to boot up uinsg microSD card and eMMC > Here are the logs.
The PHY config must be wrong and it misses the -u-boot.dtsi to enable HDMI.
Can you test my custodian test branch with my C4 support patchset ?
https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic/-/tree/u-boot-amlogi...
This one is used in Armbian 5.4 release and our KernelCI lab.
Neil
Thanks.
There seems to be a typo in the build instructions in # doc/board/amlogic/odroid-c4.rst instead of *g12b*, it should be *g12a*
See below I get following build warning, which I fix locally,
./buildc4c.sh: line 78: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 81: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 84: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 87: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 90: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 92: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory
After that fix I am able to boot my board using eMMC and microSD card.
Thanks for testing, I'll push my serie rebased on v5.8-rc1 and fix this typo.
Neil
Thanks, I see the same issue with random mac address just like N2.
Yes, my branch was not using the N2 board support with eFuses MAC readout, can you test my last patchset I just sent ? It should use the MAC from eFuses or generate an unique address with the SoC serial number.
Thanks
Please apply the patch in [1] before the new Odroid-C4 serie.
[1] https://patchwork.ozlabs.org/project/uboot/patch/20200618144037.23392-1-narm...
Neil
I do not know the reason but your patches are not showing up on u-boot patchwork.
Good question !
Neil
-Anand

Hi Neil,
On Thu, 2 Jul 2020 at 13:29, Neil Armstrong narmstrong@baylibre.com wrote:
On 01/07/2020 18:09, Anand Moon wrote:
Hi Neil,
On Wed, 1 Jul 2020 at 20:16, Neil Armstrong narmstrong@baylibre.com wrote:
On 01/07/2020 16:43, Anand Moon wrote:
Hi Neil,
On Wed, 1 Jul 2020 at 18:38, Neil Armstrong narmstrong@baylibre.com wrote:
Hi,
On 01/07/2020 13:31, Anand Moon wrote:
Hi Neil,
On Wed, 1 Jul 2020 at 13:22, Neil Armstrong narmstrong@baylibre.com wrote: > > Hi, > > On 30/06/2020 18:02, Anand Moon wrote: >> Hi Neil, >> >> On Tue, 30 Jun 2020 at 18:30, Neil Armstrong narmstrong@baylibre.com wrote: >>> >>> Hi, >>> >>> On 30/06/2020 13:33, Anand Moon wrote: >>>> Hi Beniamino, >>>> >>>> On Wed, 6 May 2020 at 01:53, Beniamino Galvani b.galvani@gmail.com wrote: >>>>> >>>>> Hi, >>>>> >>>>> these two patches add initial u-boot support for Hardkernel ODROID-C4. >>>>> >>>>> https://wiki.odroid.com/odroid-c4/odroid-c4 >>>>> >>>>> Beniamino Galvani (2): >>>>> arm: dts: import ODROID-C4 device tree >>>>> boards: amlogic: add ODROID-C4 support >>>>> >>>> >>>> Can you respin this patches, I would like to see these get merged in >>>> the current u-boot release >>>> >>>> -Anand >>>> >>> >>> The Odroid-C4 could re-use the new Odroid-N2 board support I submitted at [1] >>> >>> Anand, is the MAC address stored stored the same way on the C4 ? >>> >>> Neil >>> >>> [1] https://patchwork.ozlabs.org/project/uboot/patch/20200618144037.23392-1-narm... >> >> I gave this patches a try on latest u-boot but I cannot make my Odroid >> C4 to boot up uinsg microSD card and eMMC >> Here are the logs. > > The PHY config must be wrong and it misses the -u-boot.dtsi to enable HDMI. > > Can you test my custodian test branch with my C4 support patchset ? > > https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic/-/tree/u-boot-amlogi... > > This one is used in Armbian 5.4 release and our KernelCI lab. > > Neil >
Thanks.
There seems to be a typo in the build instructions in # doc/board/amlogic/odroid-c4.rst instead of *g12b*, it should be *g12a*
See below I get following build warning, which I fix locally,
./buildc4c.sh: line 78: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 81: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 84: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 87: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 90: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory ./buildc4c.sh: line 92: /home/amoon/mainline/u-boot/amlogic/w400/odroid-c4/fip/g12b/aml_encrypt_g12a: No such file or directory
After that fix I am able to boot my board using eMMC and microSD card.
Thanks for testing, I'll push my serie rebased on v5.8-rc1 and fix this typo.
Neil
Thanks, I see the same issue with random mac address just like N2.
Yes, my branch was not using the N2 board support with eFuses MAC readout, can you test my last patchset I just sent ? It should use the MAC from eFuses or generate an unique address with the SoC serial number.
Thanks
Please apply the patch in [1] before the new Odroid-C4 serie.
[1] https://patchwork.ozlabs.org/project/uboot/patch/20200618144037.23392-1-narm...
Neil
I do not know the reason but your patches are not showing up on u-boot patchwork.
Good question !
Neil
Now it's showing up on u-boot patchwork.
https://patchwork.ozlabs.org/project/uboot/list/?series=187096
-Anand
participants (3)
-
Anand Moon
-
Beniamino Galvani
-
Neil Armstrong