From patchwork Mon Sep 16 09:41:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 829002 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:4187:b0:367:895a:4699 with SMTP id ei7csp695214wrb; Mon, 16 Sep 2024 02:42:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWkfh4qhiKxX5d55ouisMTAKup2dVjy9Uc20OHDNM+UbfXegbBrapsC5JPf3dcH/Yd4f64HdA==@linaro.org X-Google-Smtp-Source: AGHT+IEmrGaM5CPv8X6m+NOymD6d7uTvdcNFAb7GX+IngsrU1s4HcVQoZ8aHLvKfzxYvgiT6HrRb X-Received: by 2002:a5d:46c2:0:b0:371:8685:84c with SMTP id ffacd0b85a97d-378c27b0c2dmr8709643f8f.15.1726479739186; Mon, 16 Sep 2024 02:42:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726479739; cv=none; d=google.com; s=arc-20240605; b=CxTw4rDwiCs9N8pWqayqghyDEl+6be4QclDQZTd5JntaDeuKijF1FHhYy7hDoo6oK/ 5hoVtNkwNSFpygk93McMG9kIl7+/hgR5rX9luYD66eYjilabR8mAFe6wJfDtNha/xMHw jkuNEHzYO/R7YZmN/3UowqMHrRH+iR0ZVFMrOhWioVrOzCdetLoJay5HXUi5BYJRSvaV pFohCsRk0KIzxhJgncG+wtKU6amw6oPedMnG3SAGO6xy2NcsUvQ7V2V2g3t57r1n+J40 f6cX/smj9f+OqP3K0DX56Xd12YxQ4uxiaIaizpMedeoot6XBOhNHXEmhah941Lq3ffQz ZeZA== 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=isM0wkxM75qh7yVsSrZ/ILYNAN2B3+md2rez5tZORVY=; fh=O59TxTW0HDIbwPHxy3+eSERFQazILORdcosjvsbEYTo=; b=PMHt9k26GBs+W7PErXkx5CJzFBqkBK0EfbdojloLG+RCZBJTDfaRj1fV1TNASdpAp9 ncGfjXGJ2BYpv7sdI2Yx6AlALFasuiMmwrqLQ/DPdFp//MDwYCkeqR/yPC7/1AaS6kjz A9JfD5lY0O88OIugpjmJHiMgNqyQ1emr76l5Vlyrq56eDG41OJ32u/McyaS6W8AHGxd4 5wWEcYsaf1W7+kGEhX37SHt2i0sp3XaA7NPHq0wCqen6YSEKXUFhBnsCphVMtX1U0H2N 9mHPMxBCa0ctVGFYotNL1HzqqqBRNUyYCfCVbx9ZnjFqAVfx//R7lHCi1ch0hPyDhEF+ NVrA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OJq+ODCi; 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 ffacd0b85a97d-378e78194c4si1977525f8f.795.2024.09.16.02.42.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2024 02:42:19 -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=OJq+ODCi; 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 33E9E88ED2; Mon, 16 Sep 2024 11:42:01 +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="OJq+ODCi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 46C5488EB8; Mon, 16 Sep 2024 11:41:59 +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-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (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 D0EDE88EC0 for ; Mon, 16 Sep 2024 11:41:54 +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-x32f.google.com with SMTP id 5b1f17b1804b1-42cba8340beso32542085e9.1 for ; Mon, 16 Sep 2024 02:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726479714; x=1727084514; 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=isM0wkxM75qh7yVsSrZ/ILYNAN2B3+md2rez5tZORVY=; b=OJq+ODCiVTTFb9yIQtL528oyN4yx93ZuUlGu3ZlwFhzbMUgLMgAHyvNkVQ621fGxn+ tdx3KeXBfjbvjQhLofIgdFaeUVkc3GtFeH/2G5Vi3camenAzfQSGHQcQXkkNiQkB/fb4 iriLoblZBH+HZIJp+AwsGcEbx6MYqY3kQ3WLj0YcbL+BOUNC9LXFmhmKFyXIFHNWUjLS CwTdRfVUHzWye/yqtwrSXthWuZR5MqLNhM0Spwl7/ZdUq1lw5mbocqYbncTUuky4T1UQ 3eGZSykb5ZecwfzUMsxKHcBCD+j52KuNOfHRxZFlSmxXT+e/rkaPejF9W7tiWrwHGAyw Op5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726479714; x=1727084514; 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=isM0wkxM75qh7yVsSrZ/ILYNAN2B3+md2rez5tZORVY=; b=TW/ZK/gejszX4KAeE32sK/WKG3lj6zodGjIGKhk1IjEiYMxOQAMaxYOCAi4zy+k/0u Mx8A0I6BsOSMW6riI93qu/ryQXviv3Ta+Raj6vLMpk/oOJlKvc4Q6CrBk8KBUWdmNG65 9yE6dGkfnBcl9vZrsnZnQpBneNVKyAWfTxH99x8F+1UAasbo2E8UaVrReAHto2ZXBbPm lvA7R8lhCZAXkzd7Jm+7kxUiPkVFxUzTch26SB+x9FRwJ2thbSCcYhcrFtWteD9Ad0K+ Ue4v3wgDygmat+r4EitL2qWK9MwGVkS9XuzT/ynzgJTxppqD5BFE+rQe5CJJh4W/+yd7 vBKw== X-Forwarded-Encrypted: i=1; AJvYcCVefRYE+SKmTMfCCjXao7lhl9Kdg2cWRP1UbwseFJqeP3KQXgqObHCr8Vt7KOJoatmdvDuTkO0=@lists.denx.de X-Gm-Message-State: AOJu0Yw7U62AbHPlYzXe2LzwNw4EF/VlrzT6AB5029Yc4RlQXdPywWUG paGG840a/LrIVHLz8FhgxsMGdUw8hmT2IrId/W7JwOADtNsWrIwHaA7w9N7bRpU= X-Received: by 2002:a05:600c:4e87:b0:426:6fb1:6b64 with SMTP id 5b1f17b1804b1-42cbddcefd1mr132381365e9.7.1726479713594; Mon, 16 Sep 2024 02:41:53 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42d9b05d4e1sm106398555e9.12.2024.09.16.02.41.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2024 02:41:53 -0700 (PDT) From: Neil Armstrong Date: Mon, 16 Sep 2024 11:41:48 +0200 Subject: [PATCH 1/2] board: libretech-ac: move board support into dedicated directory MIME-Version: 1.0 Message-Id: <20240916-u-boot-topic-dynamic-uuid-v1-1-7e4f48542a0f@linaro.org> References: <20240916-u-boot-topic-dynamic-uuid-v1-0-7e4f48542a0f@linaro.org> In-Reply-To: <20240916-u-boot-topic-dynamic-uuid-v1-0-7e4f48542a0f@linaro.org> To: Tom Rini Cc: u-boot-amlogic@groups.io, u-boot@lists.denx.de, Ilias Apalodimas , Da Xue , Neil Armstrong X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=4053; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=PkfVFZOTXdUMNl5kZ51pRdlVcMTOlH1wQ6hn+etanQs=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBm5/1f6aRlN14iJL7c1sDv5qCCyozqru4Q5zrm6+23 bhtieFGJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZuf9XwAKCRB33NvayMhJ0QmiD/ 0cQGOKPkqX6cU0x9QJJO5kgeLxEWNCMmiaXRq+A2aNCQ+fs8HZdkCoeFGXp0G1UfOml8WdHK5x6lOi 5OffvM9k6XMNZAeHIE2hnoVEB44DlwfS3vOF1TA/YZF34KOmaCXetlguh1CCe5fmsPYHioItcckNK9 6fZd6LZ926SYgSZ0hoMkDNVehzNWM4x1za8B55gfVGlZ1G7eyz1NL3mQB2dwApKBGB8Z8Qk+KXkdvr m1w90E1RJD8rDrR65439Ile8kz6hWKqKSKCbQcXbyAEo/5YwHGTHGoVQ0P+V5/2SY5quPuoK1XaE5F wOXiNhhLzKCJm1ZFi1JC8ThN2n0wFCAvg3bv/NjQejJ1icKzhFD8EmYZH/N5wAVRC6O9rcnnSTzEv7 rMbgJ6gUDhcHWYa+0qtUPwaD98HrpbedfOyvdHvQhkpUKyAQb6TeduMIdmwnn8MdyxGetcR/14gWiP FKXMC/AZ7mmvBa2Vi60qtMoOkbepcYH+o8W9JTCaYfct9gVcKVxNbyLYBnWTny7rmXbO92CfHm1jf0 J/9/w90cslrXf/oB3/OdQ8MbQhgWwlNKs41cq2nlbmc+Nmp1uM0PNY84db/3brrA1WLJyHvALwpT3Y n/1/jzeknh4zYPpP+G2RQ5h3Pz6hbmV0dyG4mI915l8LKYgzL9j7EmAuIh/w== 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 The libretech-ac aka aml-s805x-ac supports mainline U-boot from a dedicated SPI flash, move the board support into a dedicated vendor/board subdirectory in order to support vendor specific customization. It also aligns with the vendor downstream changes. Signed-off-by: Neil Armstrong --- board/amlogic/p212/MAINTAINERS | 2 - board/libre-computer/aml-s805x-ac/MAINTAINERS | 8 ++++ board/libre-computer/aml-s805x-ac/Makefile | 6 +++ board/libre-computer/aml-s805x-ac/aml-s805x-ac.c | 47 ++++++++++++++++++++++++ configs/libretech-ac_defconfig | 2 + 5 files changed, 63 insertions(+), 2 deletions(-) diff --git a/board/amlogic/p212/MAINTAINERS b/board/amlogic/p212/MAINTAINERS index b2e3205fdf0..e73a4e52c1f 100644 --- a/board/amlogic/p212/MAINTAINERS +++ b/board/amlogic/p212/MAINTAINERS @@ -5,11 +5,9 @@ L: u-boot-amlogic@groups.io F: board/amlogic/p212/ F: include/configs/p212.h F: configs/khadas-vim_defconfig -F: configs/libretech-ac_defconfig F: configs/libretech-cc_defconfig F: configs/libretech-cc_v2_defconfig F: configs/p212_defconfig F: doc/board/amlogic/p212.rst -F: doc/board/amlogic/libretech-ac.rst F: doc/board/amlogic/libretech-cc.rst F: doc/board/amlogic/khadas-vim.rst diff --git a/board/libre-computer/aml-s805x-ac/MAINTAINERS b/board/libre-computer/aml-s805x-ac/MAINTAINERS new file mode 100644 index 00000000000..7cbc08aeb6c --- /dev/null +++ b/board/libre-computer/aml-s805x-ac/MAINTAINERS @@ -0,0 +1,8 @@ +LIBRE-COMPUTER AML-S805X-AC +M: Neil Armstrong +S: Maintained +L: u-boot-amlogic@groups.io +F: board/amlogic/aml-s805x-ac/ +F: include/configs/libretech-ac.h +F: configs/libretech-ac_defconfig +F: doc/board/amlogic/libretech-ac.rst diff --git a/board/libre-computer/aml-s805x-ac/Makefile b/board/libre-computer/aml-s805x-ac/Makefile new file mode 100644 index 00000000000..b4367ea522b --- /dev/null +++ b/board/libre-computer/aml-s805x-ac/Makefile @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2016 BayLibre, SAS +# Author: Neil Armstrong + +obj-y := aml-s805x-ac.o diff --git a/board/libre-computer/aml-s805x-ac/aml-s805x-ac.c b/board/libre-computer/aml-s805x-ac/aml-s805x-ac.c new file mode 100644 index 00000000000..ae9834c0bf8 --- /dev/null +++ b/board/libre-computer/aml-s805x-ac/aml-s805x-ac.c @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2016 BayLibre, SAS + * Author: Neil Armstrong + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define EFUSE_SN_OFFSET 20 +#define EFUSE_SN_SIZE 16 +#define EFUSE_MAC_OFFSET 52 +#define EFUSE_MAC_SIZE 6 + +int misc_init_r(void) +{ + u8 mac_addr[EFUSE_MAC_SIZE + 1]; + char serial[EFUSE_SN_SIZE + 1]; + ssize_t len; + + if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { + len = meson_sm_read_efuse(EFUSE_MAC_OFFSET, + mac_addr, EFUSE_MAC_SIZE); + mac_addr[len] = '\0'; + if (len == EFUSE_MAC_SIZE && is_valid_ethaddr(mac_addr)) + eth_env_set_enetaddr("ethaddr", mac_addr); + else + meson_generate_serial_ethaddr(); + } + + if (!env_get("serial#")) { + len = meson_sm_read_efuse(EFUSE_SN_OFFSET, serial, + EFUSE_SN_SIZE); + serial[len] = '\0'; + if (len == EFUSE_SN_SIZE) + env_set("serial#", serial); + } + + return 0; +} diff --git a/configs/libretech-ac_defconfig b/configs/libretech-ac_defconfig index 6ad04570022..11d9795e05d 100644 --- a/configs/libretech-ac_defconfig +++ b/configs/libretech-ac_defconfig @@ -1,5 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_CONFIG_NAME="libretech-ac" +CONFIG_SYS_VENDOR="libre-computer" +CONFIG_SYS_BOARD="aml-s805x-ac" CONFIG_ARCH_MESON=y CONFIG_TEXT_BASE=0x01000000 CONFIG_NR_DRAM_BANKS=1