From patchwork Fri Sep 20 13:33:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 829866 Delivered-To: patch@linaro.org Received: by 2002:adf:ebcc:0:b0:367:895a:4699 with SMTP id v12csp829363wrn; Fri, 20 Sep 2024 06:33:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWD5TVwpC1lcBaHmsc1DU9Cwl4U+fOvQ5exHeqyGCNVegXQTD4Vl9Qn+8ZZXFlX1KXjDOkVXA==@linaro.org X-Google-Smtp-Source: AGHT+IFbpLMOL/XPhFsbGy10OkPv4Ug8yLMrp8Y2JmlWF7HVbRngxlBntDDBQCk3ul11pBt2lDNv X-Received: by 2002:a05:6e02:1c46:b0:3a0:98ab:793e with SMTP id e9e14a558f8ab-3a0c9d8fdbdmr23580395ab.23.1726839234140; Fri, 20 Sep 2024 06:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726839234; cv=none; d=google.com; s=arc-20240605; b=RmJdOuqhxa24h0XtM7yEhQ/dV8d6MXQcjt0gr5Z2Ix4eStoSgNDOK4tbOVaBXhgNeb aENgRZGE2MfajzbuKAGUjYuP/LnsijAHDrhC/C2dlbQXWvCbQn3rU3iR+dEwmO27YDWV tfi4a3j+6jxNplFZmGJDyoB0pAZJ9ualnsnZQKwMsbwDWBLkqXTeAR2kOqe1aegAatJs u4LbBUc3pnLgoSVwn5WLyqNyH70Avk1oBagAIzF6/SF1NOixIVndftTzmCJ9XN+iBkO0 XAYK7bj5vuuYPgUZb25VK3yhEFpgU17JV/xUPs5Va1DbbbKfhP5+rE7YHByZt9VILkEY Hk0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=Ux5X8K2h/eBwUZG3fliCUlBQCeKWcaaSfLWKW7p8Vjc=; fh=90vB31WZDremRZGeBkhw701Dg7alkB0pjkwrtjaW2sY=; b=GKSYX2llE6hKoionQRFpkfbjqJp91tq1tA9hTpA/I+OCaNHpIWDFBxRRgb0BIwXdVZ gGXOgDr+ZZawJen93soAkv+bR8tsnf7Htk0SkNRDwiGUTjRnU8Ce2xvFtbhxo6s07Th4 gODa4LJigipeCi0h/onPXKvBkuywqMTLoDLna+N1ud6V5gu3sszICkNwp6qi4bXKSMeJ FZLB+D7sjy1RlIomVQGwy/BQELjM2N4DhGSBOx+2oL+rfLWHYdftNduboL9llRQfCiu6 t6O9arXtUNmBWnbgjyzeM+yF5QUCqBzEgVjMTK580mtRudX/19y/NvYTon0Gk1rjfyLR DTvQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m5f8oNps; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id e9e14a558f8ab-3a0bbb42e58si14072645ab.138.2024.09.20.06.33.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2024 06:33:54 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m5f8oNps; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5D68F89445; Fri, 20 Sep 2024 15:33:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="m5f8oNps"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2D0B68946B; Fri, 20 Sep 2024 15:33:40 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9B5748944E for ; Fri, 20 Sep 2024 15:33:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-42cd74c0d16so18370045e9.1 for ; Fri, 20 Sep 2024 06:33:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726839217; x=1727444017; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Ux5X8K2h/eBwUZG3fliCUlBQCeKWcaaSfLWKW7p8Vjc=; b=m5f8oNpsqbbcYsLdGuEWSQjlSryYZgAF7a39UETj5sSHDOFfAcqjv7NXx+r1S6Ehmi BU3IjZ/QMT2NHyHMB7nbhJe1uOSiWIj+QHvYJCqgWZgE6o+IZVrG96y9nW0N6DtDpsdg mLn+qX19jGrZqC54JO9AVJlg6BHlVfaxLQb0tw2LZdftXej8nPMDu37Nl6fXhYoRjvZ6 hSRBb//2TFLCETjR6W4qfXZHaQplIdIVFbt++8oiolYw+YrJdCfXKQTFpQHHtCWozwKs aNPw9d93jO8oLcQ5mH/AU0MpurqBFMSwTncH7+KzUuRSoH7X+pMyixWDR73VaU80n7x1 l/Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726839217; x=1727444017; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ux5X8K2h/eBwUZG3fliCUlBQCeKWcaaSfLWKW7p8Vjc=; b=i1KewCwuAM1j47+E9fjzyPjLIP5fAbqam8Plq6ue+aIbzlyeEky6vBSxtADFHkxmTM xXFD+Y4HmyXNH1s32Gb5pg+Uyg3qOPdhUUUp5GNeemlEyx/DsAhky93dfyS995wkjzTT JdXabE3XTjRas2c/VvpFC34nrf1J5Js56QqfOxFHDA/DHWwD10Ro5rGVgtQEzSPw8xrM fkH5pgt/LRO8QQpfdh4DdnSuOmhP/iXY+4sdN63idU36i70r8/TFUparLzhINh6JVsKX 0XlmE+0ieq7LJ95Pz6emQkM/v6YE2E+jB4zmKcBkh4DrhFmaFMePfUZ2PbZqZ6tebpRB E3qg== X-Forwarded-Encrypted: i=1; AJvYcCUOLMyuL93a1yH4LHV+ko76Bafev/ptmwSiity319acJsoc5pDc7Yn/KKgDe4VVjjSwCOL+wYk=@lists.denx.de X-Gm-Message-State: AOJu0YwvoRczlu+9y0aqPP7fV1+2OYm+AjOUetb97fF1pIBE118OwCHv i6gRAL4MmbPmbgsCSE+oMjOswM2pdxqEGIg6CJrpqZMWgBdiJgzGPI6RzgQ/Uy0= X-Received: by 2002:a05:600c:5253:b0:42c:ac9f:b528 with SMTP id 5b1f17b1804b1-42e7add9058mr22610055e9.35.1726839216882; Fri, 20 Sep 2024 06:33:36 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378e780df0bsm17557466f8f.113.2024.09.20.06.33.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2024 06:33:36 -0700 (PDT) From: Neil Armstrong Date: Fri, 20 Sep 2024 15:33:33 +0200 Subject: [PATCH 1/2] ARM: meson: add support for Libre Computer aml-a311d-cc MIME-Version: 1.0 Message-Id: <20240920-u-boot-topic-libre-computer-solitude-alta-v1-1-8915b108840b@linaro.org> References: <20240920-u-boot-topic-libre-computer-solitude-alta-v1-0-8915b108840b@linaro.org> In-Reply-To: <20240920-u-boot-topic-libre-computer-solitude-alta-v1-0-8915b108840b@linaro.org> To: Tom Rini Cc: u-boot-amlogic@groups.io, u-boot@lists.denx.de, da@libre.computer, ilias.apalodimas@linaro.org, Neil Armstrong X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=9673; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=OA7V9CsoWRuuYlmKOkBzI6tahgz8cdVXDACarYqD3XY=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBm7XmugQtae+oyO8p2fNU1JKX8PYQVH4XrgUFOqfrC MiUiTymJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZu15rgAKCRB33NvayMhJ0RHxEA Clsr93ANf2a5dJEyLrUV92F8rBd1MK2pu4/QLQR5HX/0dyZ4zoU1Laij0GcD0jlohYXb1ORF7b+Bsi JVPm9yZUNkvZr5soOvTiEye78ClNaZXR6D3V+d8ICb3NplvzJ7bscsP7aRSsQhfnOfQfJMSYxMD0UG +pymut7UhLjnGu3ybcdKV8vCnwyhNPGgq5k722lvwgU5R/M7jB7M05rreUBMwXUOAOS8SgSWznhbiq 2VCMHeHymoFhYV0p57qF+2kCd8FA/XE5FpLJv5kjol/oShelfxLKYt6cZcbDiRIvk3kc/hI3X3jPIl D/bSibbP8/fJYNn1IO3YHURjg6X66CT3CscMTF+jgZItMjbCmg95b05k2MysqMGcZ/zKGoPC2amOyk vyC8GyHAMf7Tk06l+klSrIOX32v0GqAq75z8ZKfZD4Lcf9jedSHqOCORWFzssIfY78xqtmAJUA4AXA vWQGC8HZJlwSH9YU/WxbeeoCsVc7S0auBTvzouAnRfb/rS8a10GvCFZBIC/qLSjAJqX+tIf8ZCjuuT ot4roRgo3AXsC045X/7WYL8loluuPRe1gOCmzvP0jg1tT/yIYAE/eNA4ZJ2L6FuNEbHwloi1AZjJSb N0xunPEbMkqWe/sGd1rh4sGmqAvTFdJMOmts53HvNZERqMD5+Wav6BgSEEUw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add support for the Libre Computer aml-a311d-cc "Alta" board: https://libre.computer/products/aml-a311d-cc/ The Alta board has a Credit Card form factor, similar to the the prvevious "Le Potato" card, but with the Amlogic A311D SoC, MIPI DSI and CSI connectors. PoE header and a single USB2 Type-C connector replacing the microUSB one for power and USB 2.0. The board has an embedded SPI NOR flash, and EFI Capsule support is added. The GUID is dynamically generated for the board, to get it: => efidebug capsule esrt ======================================== ESRT: fw_resource_count=1 ESRT: fw_resource_count_max=1 ESRT: fw_resource_version=1 [entry 0]============================== ESRT: fw_class=17E07D9D-4D91-53F4-8780-1D91F279C1A5 ESRT: fw_type=unknown ESRT: fw_version=0 ESRT: lowest_supported_fw_version=0 ESRT: capsule_flags=0 ESRT: last_attempt_version=0 ESRT: last_attempt_status=success ======================================== On the host (with the aml_encrypt_g12a result binary): $ eficapsule --guid 17E07D9D-4D91-53F4-8780-1D91F279C1A5 -i 1 u-boot.bin u-boot.cap On the board (from USB disk containing u-boot.cap at root): => load usb 0:1 $kernel_addr_r u-boot.cap => efidebug capsule update $kernel_addr_r The binary will then be flashed on the SPI. Signed-off-by: Neil Armstrong Tested-by: Ilias Apalodimas --- .../dts/meson-g12b-a311d-libretech-cc-u-boot.dtsi | 15 +++ board/libre-computer/aml-a311d-cc/MAINTAINERS | 7 ++ board/libre-computer/aml-a311d-cc/Makefile | 6 ++ board/libre-computer/aml-a311d-cc/aml-a311d-cc.c | 44 +++++++++ configs/aml-a311d-cc_defconfig | 108 +++++++++++++++++++++ doc/board/amlogic/aml-a311d-cc.rst | 46 +++++++++ doc/board/amlogic/index.rst | 1 + 7 files changed, 227 insertions(+) diff --git a/arch/arm/dts/meson-g12b-a311d-libretech-cc-u-boot.dtsi b/arch/arm/dts/meson-g12b-a311d-libretech-cc-u-boot.dtsi new file mode 100644 index 00000000000..cbada739042 --- /dev/null +++ b/arch/arm/dts/meson-g12b-a311d-libretech-cc-u-boot.dtsi @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2023 Neil Armstrong + */ + +#include "meson-g12-common-u-boot.dtsi" + +&sd_emmc_c { + pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_4b_pins>; + bus-width = <4>; +}; + +&spifc { + status = "okay"; +}; diff --git a/board/libre-computer/aml-a311d-cc/MAINTAINERS b/board/libre-computer/aml-a311d-cc/MAINTAINERS new file mode 100644 index 00000000000..b4b77acd23b --- /dev/null +++ b/board/libre-computer/aml-a311d-cc/MAINTAINERS @@ -0,0 +1,7 @@ +LIBRE-COMPUTER AML-A311D-CC +M: Neil Armstrong +S: Maintained +L: u-boot-amlogic@groups.io +F: board/amlogic/aml-a311d-cc/ +F: configs/aml-a311d-cc_defconfig +F: doc/board/amlogic/aml-a311d-cc.rst diff --git a/board/libre-computer/aml-a311d-cc/Makefile b/board/libre-computer/aml-a311d-cc/Makefile new file mode 100644 index 00000000000..461955def3a --- /dev/null +++ b/board/libre-computer/aml-a311d-cc/Makefile @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2016 BayLibre, SAS +# Author: Neil Armstrong + +obj-y := aml-a311d-cc.o diff --git a/board/libre-computer/aml-a311d-cc/aml-a311d-cc.c b/board/libre-computer/aml-a311d-cc/aml-a311d-cc.c new file mode 100644 index 00000000000..e45cfd5d8a3 --- /dev/null +++ b/board/libre-computer/aml-a311d-cc/aml-a311d-cc.c @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2016 BayLibre, SAS + * Author: Neil Armstrong + */ + +#include +#include +#include +#include +#include +#include +#include + +struct efi_fw_image fw_images[] = { + { + .fw_name = u"AML_A311D_CC_BOOT", + .image_index = 1, + }, +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "sf 0:0=u-boot-bin raw 0 0x10000", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + + +#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO) +void set_dfu_alt_info(char *interface, char *devstr) +{ + if (strcmp(interface, "ram") == 0) + env_set("dfu_alt_info", "fitimage ram 0x08080000 0x4000000"); + else if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) + env_set("dfu_alt_info", update_info.dfu_string); +} +#endif + +int misc_init_r(void) +{ + meson_generate_serial_ethaddr(); + + return 0; +} diff --git a/configs/aml-a311d-cc_defconfig b/configs/aml-a311d-cc_defconfig new file mode 100644 index 00000000000..c8e22200419 --- /dev/null +++ b/configs/aml-a311d-cc_defconfig @@ -0,0 +1,108 @@ +CONFIG_ARM=y +CONFIG_SYS_VENDOR="libre-computer" +CONFIG_SYS_BOARD="aml-a311d-cc" +CONFIG_ARCH_MESON=y +CONFIG_TEXT_BASE=0x01000000 +CONFIG_NR_DRAM_BANKS=1 +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000 +CONFIG_ENV_SIZE=0x2000 +CONFIG_ENV_OFFSET=0xFFFF0000 +CONFIG_ENV_SECT_SIZE=0x10000 +CONFIG_DM_GPIO=y +CONFIG_DEFAULT_DEVICE_TREE="amlogic/meson-g12b-a311d-libretech-cc" +CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_DM_RESET=y +CONFIG_MESON_G12A=y +CONFIG_DEBUG_UART_BASE=0xff803000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_IDENT_STRING="aml-a311d-cc" +CONFIG_SYS_LOAD_ADDR=0x1000000 +CONFIG_DEBUG_UART=y +CONFIG_REMAKE_ELF=y +CONFIG_FIT=y +CONFIG_FIT_SIGNATURE=y +CONFIG_FIT_VERBOSE=y +CONFIG_LEGACY_IMAGE_FORMAT=y +CONFIG_OF_BOARD_SETUP=y +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_MISC_INIT_R=y +CONFIG_SYS_MAXARGS=32 +# CONFIG_CMD_BDI is not set +# CONFIG_CMD_IMI is not set +CONFIG_CMD_DFU=y +CONFIG_CMD_NVEDIT_EFI=y +CONFIG_CMD_GPIO=y +# CONFIG_CMD_LOADS is not set +CONFIG_CMD_MMC=y +CONFIG_CMD_SF_TEST=y +CONFIG_CMD_SPI=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_CMD_EFIDEBUG=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_REGULATOR=y +CONFIG_OF_CONTROL=y +CONFIG_ENV_IS_IN_SPI_FLASH=y +CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_ADC=y +CONFIG_SARADC_MESON=y +CONFIG_BUTTON=y +CONFIG_BUTTON_ADC=y +CONFIG_DFU_RAM=y +CONFIG_DFU_SF=y +CONFIG_SET_DFU_ALT_INFO=y +CONFIG_MMC_MESON_GX=y +CONFIG_MTD=y +CONFIG_DM_MTD=y +CONFIG_DM_SPI_FLASH=y +CONFIG_SPI_FLASH_GIGADEVICE=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_PHY_REALTEK=y +CONFIG_DM_MDIO=y +CONFIG_DM_MDIO_MUX=y +CONFIG_ETH_DESIGNWARE_MESON8B=y +CONFIG_MDIO_MUX_MESON_G12A=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_DEBUG_UART_ANNOUNCE=y +CONFIG_DEBUG_UART_SKIP_INIT=y +CONFIG_MESON_SERIAL=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_MESON_SPIFC=y +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y +CONFIG_USB=y +CONFIG_DM_USB_GADGET=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_DWC3=y +# CONFIG_USB_DWC3_GADGET is not set +CONFIG_USB_DWC3_MESON_G12A=y +CONFIG_USB_KEYBOARD=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e +CONFIG_USB_GADGET_PRODUCT_NUM=0xfada +CONFIG_USB_GADGET_DWC2_OTG=y +CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y +CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_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_SPLASH_SCREEN=y +CONFIG_SPLASH_SCREEN_ALIGN=y +CONFIG_VIDEO_BMP_RLE8=y +CONFIG_BMP_16BPP=y +CONFIG_BMP_24BPP=y +CONFIG_BMP_32BPP=y +CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y diff --git a/doc/board/amlogic/aml-a311d-cc.rst b/doc/board/amlogic/aml-a311d-cc.rst new file mode 100644 index 00000000000..25c1e01906a --- /dev/null +++ b/doc/board/amlogic/aml-a311d-cc.rst @@ -0,0 +1,46 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +U-Boot for Libre Computer AML-A311D-CC 'Alta' (A311D) +===================================================== + +AML-A311D-CC is a Single Board Computer manufactured by Libre Computer Technology with +the following specifications: + + - Amlogic A311D Arm Cortex-A53 dual-core + Cortex-A73 quad-core SoC + - 2 or 4GB LPDDR4 SDRAM + - Gigabit Ethernet + - HDMI 2.1 display + - 40-pin GPIO header + - 4 x USB 3.0 Host, 1 x USB 2.0 Type-C + - eMMC 5.x SM Interface for Libre Computer Modules + - microSD + - Infrared receiver + +Schematics are available on the manufacturer website. + +U-Boot Compilation +------------------ + +.. code-block:: bash + + $ export CROSS_COMPILE=aarch64-none-elf- + $ make aml-a311d-cc_defconfig + $ make + +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- + +.. code-block:: bash + + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh aml-a311d-cc /path/to/u-boot/u-boot.bin my-output-dir + +Then write U-Boot to SD or eMMC with: + +.. code-block:: bash + + $ DEV=/dev/boot_device + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 diff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst index 46f44bf34ec..de91b21f977 100644 --- a/doc/board/amlogic/index.rst +++ b/doc/board/amlogic/index.rst @@ -85,6 +85,7 @@ Board Documentation .. toctree:: :maxdepth: 1 + aml-a311d-cc bananapi-cm4io bananapi-m2pro bananapi-m2s From patchwork Fri Sep 20 13:33:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 829867 Delivered-To: patch@linaro.org Received: by 2002:adf:ebcc:0:b0:367:895a:4699 with SMTP id v12csp829462wrn; Fri, 20 Sep 2024 06:34:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUdeM0N/NoFQbUxrUynbeEyynKMkjJrKf01mUaSqGdX9qW8KjuymxBDObTbW1qO6HB1jGz8lg==@linaro.org X-Google-Smtp-Source: AGHT+IEPXv6s2iHN8nDdQCe0HrX4NqLMIWl7dwF35mZxutfaylzgaYA/FuR7WvlKZCqrkC4pfyTj X-Received: by 2002:a05:6e02:164e:b0:3a0:a641:b7c7 with SMTP id e9e14a558f8ab-3a0c8c8dd98mr33529535ab.4.1726839244878; Fri, 20 Sep 2024 06:34:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726839244; cv=none; d=google.com; s=arc-20240605; b=RJgFgQOpbNtB6Y0eQDTYF4cwBqro7DehQxxcaa7eMwkR7iL0mAxsfeHOzQHPi4ZrKu 2hPnbXV/5eLn/gq1YP8YpRXB1r2V4TCS5kvH15m2AXHHnJ1X09ByB7Flzm/Ivbufjq75 TalIxPON2f0xseQoJuzeuTsZHXETB7C3EpgH9Z121KojHAEauHMarkxsYvYTM+666cRw Jjt1UsIVcu8wUyGsSBiAWXi+/Oq+33/MNHruj5W2Ns9RcghJifTJNYg0cFfkjjENON2M p1QtUAzMKThTSywKik/9YHqQoxxEP/JI0Kjsc9K/bsI5L+mKfPGq6CIaawAPDVP9hpKS BEug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=D82H80JWnLl93uU6ZnbQzaWt6tBC/852dCGNwYDfFiQ=; fh=nAuuvIBkKEPuMAIVUfQbwC8nb42ZXG7KfJPhJ2xRgeg=; b=SPK6ilzOJumOHYWsCyMwFK5f6+SAkrBNnlebp62aVQLSlJsaQKFJxFwFYts187c+kd G1CW8mSAZAwyXYIEpV/oDG+Ys7Efo9U9CneF5hZYOhyndMtfe/leputyACdneaK5lW1u SXhvFhERYzuCX/rm9xVJ1paPQfJnmj6JkzHHxMf6RMhwHc2Vq6AG/DBH3qNcxJsmi9BW fB7Vr+QV8/Qe2uNNIEs/By8qTbHP2ykdRfkBPlZh90db65FsIjCrTIx4JOoPhSPn8ULa HuGrUt3JHy3vJ+9TRrzfOmbFhvGLpD+q5/HabwLMiz+LhlgQ+u537S6tbgQ6JZGHcGWh pjKA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="D6eeo/xN"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id e9e14a558f8ab-3a0c8b907e3si9139635ab.204.2024.09.20.06.34.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2024 06:34:04 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="D6eeo/xN"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C11A28944D; Fri, 20 Sep 2024 15:33:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="D6eeo/xN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D6E088942A; Fri, 20 Sep 2024 15:33:43 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 654678945B for ; Fri, 20 Sep 2024 15:33:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-42cb57f8b41so24912965e9.0 for ; Fri, 20 Sep 2024 06:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726839218; x=1727444018; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=D82H80JWnLl93uU6ZnbQzaWt6tBC/852dCGNwYDfFiQ=; b=D6eeo/xN0yTzakyn30KoCnuBdmSTrkwrDwxZA7flWFv8V4yirwMKPbpvAWeeYi/P+U Of7qZY4h6TOMkjgN2EqPiD5gU52B6U8nV08V9iIQjCFvil2955xr9jxLpICwG2MzsJ6Q B1fslJZDa1PK7b/En5eUlXAJJ1kFigWOuNarfIrHcPla0CT0Q4qw7Yt34kuFM9qNJr0H IAc3+CIKMYj0020hr3cSSBJTG9RrK8dft7YaUtf8uzPQcAl72QKkC4AZ3AWsCvDi2kQn gslgiz5bx36ktIKQNnwBj1BqUuLlk0ZlLfNlWNXwOls9pcBq0LFQOgwFVl2S5t7QnWv9 PxKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726839218; x=1727444018; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D82H80JWnLl93uU6ZnbQzaWt6tBC/852dCGNwYDfFiQ=; b=JYV5kH90JBobYGEx5yAhtOm/crUpFxzorLpuEes0Guz6aVGEH7SEB73aGaugBEpPVq tN/xOuecDv28YwSRWAtHLNMuT+3z0+YWTOZ7jhq7RwObabdoaN6BA/cXdOylHzJ4Ukuc kteEmAbINJk1FFZJ6aZcoz5itvj83luq3+m3bOoKPwzlbI2VIbs0p75nwi5GfNwWVmOm 0K9nySEY5zgpM09oijhPziXE+h3Pl2mVQ+v6owz9v289lvdx5q84AQPLuU16J+Gne9kK EhSCerRe0jjlnu+Kwqx9btwh85v1SPh4N+VTTxRWDSoFl1KDIriJ3bsoLxk0fvVDHb4d XLaw== X-Forwarded-Encrypted: i=1; AJvYcCUc8c1uVzl+9OhCzaXSq+y3bCjRKNqUrZAkmjjtZOs2kYKRmYlL9quRPCvVF0WzuJolxYPMcDU=@lists.denx.de X-Gm-Message-State: AOJu0Yxd6LFcele3sLmDf12wFsRqZ9deerlLS2pAYY34RO2nSuKfeAcU H4Dn9jVg8f37KutcoDwgAfLBl/GPpxYZCDj/KuhEdrPivbCJcUxAEmHnQrwQNfI= X-Received: by 2002:a05:600c:1d9a:b0:42c:df29:2366 with SMTP id 5b1f17b1804b1-42e7adf70bfmr28656345e9.33.1726839217706; Fri, 20 Sep 2024 06:33:37 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378e780df0bsm17557466f8f.113.2024.09.20.06.33.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Sep 2024 06:33:37 -0700 (PDT) From: Neil Armstrong Date: Fri, 20 Sep 2024 15:33:34 +0200 Subject: [PATCH 2/2] ARM: meson: add support for Libre Computer aml-s905d3-cc MIME-Version: 1.0 Message-Id: <20240920-u-boot-topic-libre-computer-solitude-alta-v1-2-8915b108840b@linaro.org> References: <20240920-u-boot-topic-libre-computer-solitude-alta-v1-0-8915b108840b@linaro.org> In-Reply-To: <20240920-u-boot-topic-libre-computer-solitude-alta-v1-0-8915b108840b@linaro.org> To: Tom Rini Cc: u-boot-amlogic@groups.io, u-boot@lists.denx.de, da@libre.computer, ilias.apalodimas@linaro.org, Neil Armstrong X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=9718; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=J+jm6x5sqtn5fmJgaZZmennVFocTdnVIXwisTQjmzGU=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBm7XmurN1XZQSPwApDyX7F4surDebxOczVua+iqK5q 6PusiNeJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZu15rgAKCRB33NvayMhJ0dswEA C1bgJVZcyLu0aA3eI5poNaKol8FsSXVTBZFRmDJYiR1tHp7/ltmG/0qxNVbM2f5+sin3m/BbBi+qB5 qr6fyV6xrlPxl4OlucGHEzn11reDKDssDVbJ/OHDZ+7hCKNZfGSI6VqzD3mzdwkWwaQZlVSvJQ1Mym 19FNB3J0I7aM4PPIm9Iecn9pYvpilVi9myiP1RUAL+WscRFud9kjA7xlZLdZED70tLow24aGt+EKQ2 WKqxQlzaIUmGacKK0PVD+ahOr/dW1Y9CuUso84YCOnCdWwa8b7eO/uKsDlAdVoN1f98+8+srpw0xtR XoTLWeOsbB216cfhT6WihH5vGf7SCxp5WsZvsT6PUeXCFDq/wQRqku8VdfixH++AFQoK5PJ+oN/auc N6ZRqciKuFtyb3jrGxeVLL/kR7Y0DD8ZMWjvOTFJCr7TvDdNIKfR5MpWqatdmmrJ/+zGQdl7z+aiGI 1CpccnYZp5dZZOoddLCCpYyWKztUgbcuZdo/wnHWp2580U+r4G89JCatnOR6I2AxePg0s792bkC6bd ta1iBbAPPPrq2/5TRlw+Kn1CtGQwgbRbm/YxNeX4jmGpRHKNAOetlefvqhknB60GT4RmLwHmP2Cl6+ 8/lXGrLMitMHfg2qWSB5cPxlzdFsPQsbFYtQ0mnAvhodk+IXXftVTtFcZmVw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add support for the Libre Computer aml-s905d3-cc "Solitude" board: https://libre.computer/products/aml-s905d3-cc/ The Solitude board has a Credit Card form factor, similar to the the previous "Le Potato" card, but with the Amlogic A311D SoC, MIPI DSI and CSI connectors. PoE header and a single USB2 Type-C connector replacing the microUSB one for power and USB 2.0. The board has an embedded SPI NOR flash, and EFI Capsule support is added. The GUID is dynamically generated for the board, to get it: => efidebug capsule esrt ======================================== ESRT: fw_resource_count=1 ESRT: fw_resource_count_max=1 ESRT: fw_resource_version=1 [entry 0]============================== ESRT: fw_class=4302C3CB-2502-5EFE-87E0-894A8A322893 ESRT: fw_type=unknown ESRT: fw_version=0 ESRT: lowest_supported_fw_version=0 ESRT: capsule_flags=0 ESRT: last_attempt_version=0 ESRT: last_attempt_status=success ======================================== On the host (with the aml_encrypt_g12a result binary): $ eficapsule --guid 4302C3CB-2502-5EFE-87E0-894A8A322893 -i 1 u-boot.bin u-boot.cap On the board (from USB disk containing u-boot.cap at root): => load usb 0:1 $kernel_addr_r u-boot.cap => efidebug capsule update $kernel_addr_r The binary will then be flashed on the SPI. Signed-off-by: Neil Armstrong Tested-by: Ilias Apalodimas --- .../dts/meson-sm1-s905d3-libretech-cc-u-boot.dtsi | 15 +++ board/libre-computer/aml-s905d3-cc/MAINTAINERS | 7 ++ board/libre-computer/aml-s905d3-cc/Makefile | 6 ++ board/libre-computer/aml-s905d3-cc/aml-s905d3-cc.c | 44 +++++++++ configs/aml-s905d3-cc_defconfig | 108 +++++++++++++++++++++ doc/board/amlogic/aml-s905d3-cc.rst | 46 +++++++++ doc/board/amlogic/index.rst | 1 + 7 files changed, 227 insertions(+) diff --git a/arch/arm/dts/meson-sm1-s905d3-libretech-cc-u-boot.dtsi b/arch/arm/dts/meson-sm1-s905d3-libretech-cc-u-boot.dtsi new file mode 100644 index 00000000000..1c4f019120f --- /dev/null +++ b/arch/arm/dts/meson-sm1-s905d3-libretech-cc-u-boot.dtsi @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2023 Neil Armstrong + */ + +#include "meson-g12-common-u-boot.dtsi" + +&sd_emmc_c { + pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_4b_pins>, <&emmc_ds_pins>; + bus-width = <4>; +}; + +&spifc { + status = "okay"; +}; diff --git a/board/libre-computer/aml-s905d3-cc/MAINTAINERS b/board/libre-computer/aml-s905d3-cc/MAINTAINERS new file mode 100644 index 00000000000..4b75c815c07 --- /dev/null +++ b/board/libre-computer/aml-s905d3-cc/MAINTAINERS @@ -0,0 +1,7 @@ +LIBRE-COMPUTER AML-S905D3-CC +M: Neil Armstrong +S: Maintained +L: u-boot-amlogic@groups.io +F: board/amlogic/aml-s905d3-cc/ +F: configs/aml-s905d3-cc_defconfig +F: doc/board/amlogic/aml-s905d3-cc.rst diff --git a/board/libre-computer/aml-s905d3-cc/Makefile b/board/libre-computer/aml-s905d3-cc/Makefile new file mode 100644 index 00000000000..7d2c41e6436 --- /dev/null +++ b/board/libre-computer/aml-s905d3-cc/Makefile @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2016 BayLibre, SAS +# Author: Neil Armstrong + +obj-y := aml-s905d3-cc.o diff --git a/board/libre-computer/aml-s905d3-cc/aml-s905d3-cc.c b/board/libre-computer/aml-s905d3-cc/aml-s905d3-cc.c new file mode 100644 index 00000000000..f641db5a494 --- /dev/null +++ b/board/libre-computer/aml-s905d3-cc/aml-s905d3-cc.c @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2016 BayLibre, SAS + * Author: Neil Armstrong + */ + +#include +#include +#include +#include +#include +#include +#include + +struct efi_fw_image fw_images[] = { + { + .fw_name = u"AML_S905D3_CC_BOOT", + .image_index = 1, + }, +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "sf 0:0=u-boot-bin raw 0 0x10000", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + + +#if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO) +void set_dfu_alt_info(char *interface, char *devstr) +{ + if (strcmp(interface, "ram") == 0) + env_set("dfu_alt_info", "fitimage ram 0x08080000 0x4000000"); + else if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)) + env_set("dfu_alt_info", update_info.dfu_string); +} +#endif + +int misc_init_r(void) +{ + meson_generate_serial_ethaddr(); + + return 0; +} diff --git a/configs/aml-s905d3-cc_defconfig b/configs/aml-s905d3-cc_defconfig new file mode 100644 index 00000000000..a6e5d584c0a --- /dev/null +++ b/configs/aml-s905d3-cc_defconfig @@ -0,0 +1,108 @@ +CONFIG_ARM=y +CONFIG_SYS_VENDOR="libre-computer" +CONFIG_SYS_BOARD="aml-s905d3-cc" +CONFIG_ARCH_MESON=y +CONFIG_TEXT_BASE=0x01000000 +CONFIG_NR_DRAM_BANKS=1 +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x20000000 +CONFIG_ENV_SIZE=0x2000 +CONFIG_ENV_OFFSET=0xFFFF0000 +CONFIG_ENV_SECT_SIZE=0x10000 +CONFIG_DM_GPIO=y +CONFIG_DEFAULT_DEVICE_TREE="amlogic/meson-sm1-s905d3-libretech-cc" +CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_DM_RESET=y +CONFIG_MESON_G12A=y +CONFIG_DEBUG_UART_BASE=0xff803000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_IDENT_STRING="aml-s905d3-cc" +CONFIG_SYS_LOAD_ADDR=0x1000000 +CONFIG_DEBUG_UART=y +CONFIG_REMAKE_ELF=y +CONFIG_FIT=y +CONFIG_FIT_SIGNATURE=y +CONFIG_FIT_VERBOSE=y +CONFIG_LEGACY_IMAGE_FORMAT=y +CONFIG_OF_BOARD_SETUP=y +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_MISC_INIT_R=y +CONFIG_SYS_MAXARGS=32 +# CONFIG_CMD_BDI is not set +# CONFIG_CMD_IMI is not set +CONFIG_CMD_DFU=y +CONFIG_CMD_NVEDIT_EFI=y +CONFIG_CMD_GPIO=y +# CONFIG_CMD_LOADS is not set +CONFIG_CMD_MMC=y +CONFIG_CMD_SF_TEST=y +CONFIG_CMD_SPI=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_CMD_EFIDEBUG=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_REGULATOR=y +CONFIG_OF_CONTROL=y +CONFIG_ENV_IS_IN_SPI_FLASH=y +CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_ADC=y +CONFIG_SARADC_MESON=y +CONFIG_BUTTON=y +CONFIG_BUTTON_ADC=y +CONFIG_DFU_RAM=y +CONFIG_DFU_SF=y +CONFIG_SET_DFU_ALT_INFO=y +CONFIG_MMC_MESON_GX=y +CONFIG_MTD=y +CONFIG_DM_MTD=y +CONFIG_DM_SPI_FLASH=y +CONFIG_SPI_FLASH_GIGADEVICE=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_PHY_REALTEK=y +CONFIG_DM_MDIO=y +CONFIG_DM_MDIO_MUX=y +CONFIG_ETH_DESIGNWARE_MESON8B=y +CONFIG_MDIO_MUX_MESON_G12A=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_DEBUG_UART_ANNOUNCE=y +CONFIG_DEBUG_UART_SKIP_INIT=y +CONFIG_MESON_SERIAL=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_MESON_SPIFC=y +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y +CONFIG_USB=y +CONFIG_DM_USB_GADGET=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_DWC3=y +# CONFIG_USB_DWC3_GADGET is not set +CONFIG_USB_DWC3_MESON_G12A=y +CONFIG_USB_KEYBOARD=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e +CONFIG_USB_GADGET_PRODUCT_NUM=0xfada +CONFIG_USB_GADGET_DWC2_OTG=y +CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y +CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_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_SPLASH_SCREEN=y +CONFIG_SPLASH_SCREEN_ALIGN=y +CONFIG_VIDEO_BMP_RLE8=y +CONFIG_BMP_16BPP=y +CONFIG_BMP_24BPP=y +CONFIG_BMP_32BPP=y +CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y diff --git a/doc/board/amlogic/aml-s905d3-cc.rst b/doc/board/amlogic/aml-s905d3-cc.rst new file mode 100644 index 00000000000..083a591fc52 --- /dev/null +++ b/doc/board/amlogic/aml-s905d3-cc.rst @@ -0,0 +1,46 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +U-Boot for Libre Computer AML-S905D3-CC 'Solitude' (S905D3) +=========================================================== + +AML-S905D3-CC is a Single Board Computer manufactured by Libre Computer Technology with +the following specifications: + + - Amlogic S905D3 Cortex-A55 quad-core SoC + - 2 or 4GB LPDDR4 SDRAM + - Gigabit Ethernet + - HDMI 2.1 display + - 40-pin GPIO header + - 4 x USB 3.0 Host, 1 x USB 2.0 Type-C + - eMMC 5.x SM Interface for Libre Computer Modules + - microSD + - Infrared receiver + +Schematics are available on the manufacturer website. + +U-Boot Compilation +------------------ + +.. code-block:: bash + + $ export CROSS_COMPILE=aarch64-none-elf- + $ make aml-s905d3-cc_defconfig + $ make + +U-Boot Signing with Pre-Built FIP repo +-------------------------------------- + +.. code-block:: bash + + $ git clone https://github.com/LibreELEC/amlogic-boot-fip --depth=1 + $ cd amlogic-boot-fip + $ mkdir my-output-dir + $ ./build-fip.sh aml-s905d3-cc /path/to/u-boot/u-boot.bin my-output-dir + +Then write U-Boot to SD or eMMC with: + +.. code-block:: bash + + $ DEV=/dev/boot_device + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1 + $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440 diff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst index de91b21f977..dcd935224ac 100644 --- a/doc/board/amlogic/index.rst +++ b/doc/board/amlogic/index.rst @@ -86,6 +86,7 @@ Board Documentation :maxdepth: 1 aml-a311d-cc + aml-s905d3-cc bananapi-cm4io bananapi-m2pro bananapi-m2s