From patchwork Mon Mar 20 11:46:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 1759001 X-Patchwork-Delegate: narmstrong@baylibre.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=MQP62o7U; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PgFJ13hy0z246f for ; Tue, 21 Mar 2023 00:02:09 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1EB6985D6B; Mon, 20 Mar 2023 13:57:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="MQP62o7U"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C2DA085ABA; Mon, 20 Mar 2023 12:47:11 +0100 (CET) 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,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (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 6B72185AB9 for ; Mon, 20 Mar 2023 12:47:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=christianshewitt@gmail.com Received: by mail-wr1-x435.google.com with SMTP id l27so1721701wrb.2 for ; Mon, 20 Mar 2023 04:47:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679312823; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VcpHorJlJda5nW//a0yVnoGJJXcKO2Y9Lk0g22JcFtE=; b=MQP62o7Uwihx4W/czKQHpX8N4RbqpjB4JI17TRrTXKtwuADXQALHgSKm8MuhN7EsIg z/MahH2YCuUvW2VmQs2anCFBLc+gQJAe8K2JDoHkfCZJe/IqMAwmStcVhKzwTHaiydQu mGe2zX+MOx4zKRSVuJHGGmTFBxZ4wBMSdu5IGqslJPIa6OMyODyIlqjEKOZWpR1oTfSU 90F+RfkdHXcYYMt0rzQFrRndLlXA9GVaw0YsQkWPoqdX2tlXgkHW0UdjUXdVAFFwj60d DaMwSQ5SmcWrygOL9Am2vg3oi9Cj5lHvDrIixKl9GYR8ckO6tYHIOTfzckwC38GhtWu+ ueiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679312823; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VcpHorJlJda5nW//a0yVnoGJJXcKO2Y9Lk0g22JcFtE=; b=plMWW4XEx1xSFxVajH/9l0MAuJxGcL2IXnh+dETiDQUnGyb3+NaL4NtSTlN7+usZ5i lHLb3wgzZ6VinZcIxyuEiW/bBbjzhUxv6S7Pu64TFmXyLTSBdVGN0eeXDGUL+4baeIHp QuTqVCKu4ZNpkDxl7+uc+8+mF65ujcCoKI+kZE4pKn/+CMbQMt/xDhnTYF4gobBTt/G8 8v2Uw0ys6KNV4sUly7H4+qTZakddH5DP3E1m0UNztYPD7VGLekDgMvyPrkswjXJuhvgK Od5zZZ0NbWMzlSvoyCS3tgHRUL9J3KV9mjaXzL0UJZtLnJjJ1qR+XWRARtiXV2wY5Ku2 K6AQ== X-Gm-Message-State: AO0yUKUWapoKve9kr8D+KLZvDHbhx99/QruSXFV2qBNGd8P9ufAshYrq VREt6OX3hFMcL11TX1U1gAKQHdOt96YtKT7G X-Google-Smtp-Source: AK7set8lKZepeViQWoGUxmwRN5+BQSxhe08rEfy1YR3MKwwIfij038d9m/TG8Z5rc9qNEH/nF6GQoQ== X-Received: by 2002:adf:d844:0:b0:2d1:5698:3f70 with SMTP id k4-20020adfd844000000b002d156983f70mr9106101wrl.29.1679312823830; Mon, 20 Mar 2023 04:47:03 -0700 (PDT) Received: from toolbox.. ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id w2-20020a5d6802000000b002cfe687fc7asm8669836wru.67.2023.03.20.04.47.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 04:47:03 -0700 (PDT) From: Christian Hewitt To: u-boot@lists.denx.de, u-boot-amlogic@groups.io, linux-amlogic@lists.infradead.org Cc: Christian Hewitt Subject: [PATCH 32/33] doc: boards: amlogic: add documentation for GS-King-X Date: Mon, 20 Mar 2023 11:46:08 +0000 Message-Id: <20230320114609.930145-33-christianshewitt@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230320114609.930145-1-christianshewitt@gmail.com> References: <20230320114609.930145-1-christianshewitt@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 20 Mar 2023 13:54:05 +0100 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 GS-King-X is also supported with the beelink-s922x FIP sources and can use the GT-King defconfig. Add a board document with instructions. Signed-off-by: Christian Hewitt --- board/amlogic/beelink-s922x/MAINTAINERS | 3 +- doc/board/amlogic/beelink-gskingx.rst | 121 ++++++++++++++++++++++++ doc/board/amlogic/index.rst | 1 + 3 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 doc/board/amlogic/beelink-gskingx.rst diff --git a/board/amlogic/beelink-s922x/MAINTAINERS b/board/amlogic/beelink-s922x/MAINTAINERS index 47b622765a..8dddeb91d5 100644 --- a/board/amlogic/beelink-s922x/MAINTAINERS +++ b/board/amlogic/beelink-s922x/MAINTAINERS @@ -3,8 +3,9 @@ M: Christian Hewitt S: Maintained L: u-boot-amlogic@groups.io F: board/amlogic/beelink-s922x/ +F: configs/beelink-gsking-x_defconfig F: configs/beelink-gtking_defconfig F: configs/beelink-gtkingpro_defconfig -F: configs/beelink-gsking-x_defconfig +F: doc/board/amlogic/beelink-gskingx.rst F: doc/board/amlogic/beelink-gtking.rst F: doc/board/amlogic/beelink-gtkingpro.rst diff --git a/doc/board/amlogic/beelink-gskingx.rst b/doc/board/amlogic/beelink-gskingx.rst new file mode 100644 index 0000000000..987d358c77 --- /dev/null +++ b/doc/board/amlogic/beelink-gskingx.rst @@ -0,0 +1,121 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +U-Boot for Beelink GS-King-X (S922X) +==================================== + +The Shenzen AZW (Beelink) GS-King-X is based on the Amlogic W400 reference board with an +S922X-H chip and the following specifications: + +- 4GB LPDDR4 RAM +- 64GB eMMC storage +- 10/100/1000 Base-T Ethernet +- AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.1) +- HDMI 2.1 video +- S/PDIF optical output +- 2x ESS9018 audio DACs +- 4x Ricor RT6862 audio amps +- Analogue headphone output +- 1x USB 2.0 OTG port +- 3x USB 3.0 ports +- IR receiver +- 1x micro SD card slot (internal) +- USB SATA controller with 2x 3.5" drive bays +- 1x Power on/off button + +Beelink do not provide public schematics, but have been willing to share them with known +distro developers to assist with development. + +U-Boot Compilation +------------------ + +.. code-block:: bash + + $ export CROSS_COMPILE=aarch64-none-elf- + $ make beelink-gsking-x_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 beelink-s922x /path/to/u-boot/u-boot.bin my-output-dir + +U-Boot Manual Signing +--------------------- + +Beelink released an Amlogic "SDK" dump in their forums but the U-Boot sources included +result in 2GB RAM detected. The following FIPs were generated with newer sources and +detect 4GB RAM: https://github.com/LibreELEC/amlogic-boot-fip/tree/master/beelink-s922x + +.. code-block:: bash + + $ wget https://github.com/LibreELEC/amlogic-boot-fip/archive/master.zip + $ unzip master.zip + $ export FIPDIR=$PWD/amlogic-boot-fip/beelink-s922x + +Go back to the mainline U-Boot source tree then: + +.. code-block:: bash + + $ mkdir fip + $ cp $FIPDIR/* fip/ + $ cp u-boot.bin fip/bl33.bin + + $ sh fip/blx_fix.sh \ + fip/bl30.bin \ + fip/zero_tmp \ + fip/bl30_zero.bin \ + fip/bl301.bin \ + fip/bl301_zero.bin \ + fip/bl30_new.bin \ + bl30 + + $ sh fip/blx_fix.sh \ + fip/bl2.bin \ + fip/zero_tmp \ + fip/bl2_zero.bin \ + fip/acs.bin \ + fip/bl21_zero.bin \ + fip/bl2_new.bin \ + bl2 + + $ fip/aml_encrypt_g12b --bl30sig --input fip/bl30_new.bin \ + --output fip/bl30_new.bin.g12a.enc \ + --level v3 + $ fip/aml_encrypt_g12b --bl3sig --input fip/bl30_new.bin.g12a.enc \ + --output fip/bl30_new.bin.enc \ + --level v3 --type bl30 + $ fip/aml_encrypt_g12b --bl3sig --input fip/bl31.img \ + --output fip/bl31.img.enc \ + --level v3 --type bl31 + $ fip/aml_encrypt_g12b --bl3sig --input fip/bl33.bin --compress lz4 \ + --output fip/bl33.bin.enc \ + --level v3 --type bl33 + $ fip/aml_encrypt_g12b --bl2sig --input fip/bl2_new.bin \ + --output fip/bl2.n.bin.sig + $ fip/aml_encrypt_g12b --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 fip/ddr4_1d.fw \ + --ddrfw2 fip/ddr4_2d.fw \ + --ddrfw3 fip/ddr3_1d.fw \ + --ddrfw4 fip/piei.fw \ + --ddrfw5 fip/lpddr4_1d.fw \ + --ddrfw6 fip/lpddr4_2d.fw \ + --ddrfw7 fip/diag_lpddr4.fw \ + --ddrfw8 fip/aml_ddr.fw \ + --level v3 + +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 808c857622..7c4c161e0d 100644 --- a/doc/board/amlogic/index.rst +++ b/doc/board/amlogic/index.rst @@ -87,6 +87,7 @@ Board Documentation bananapi-cm4io bananapi-m5 + beelink-gskingx beelink-gtking beelink-gtkingpro jethub-j80