From patchwork Mon Jul 4 12:58:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 587133 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1ec:0:0:0:0 with SMTP id 12csp803843map; Mon, 4 Jul 2022 05:59:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tmO0QdurhvkVsO3wYWWBGdM2qUKlMedmVqEfs8XRN/VntBjsvC9PALKXIF6IZC0WuspR5q X-Received: by 2002:a05:6512:22c4:b0:47f:93ff:9108 with SMTP id g4-20020a05651222c400b0047f93ff9108mr19032582lfu.74.1656939592205; Mon, 04 Jul 2022 05:59:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656939592; cv=none; d=google.com; s=arc-20160816; b=DmdyB/T8B9DcJkTuTqQ2pspiQkn1u5eqOQojw90YMcQWrbCpD1ibt8P6P3rVi5CPNg oTcTfHQLJBRctcof+vcYniW3gzq0ACiacVJrLelnPYVmJF4DqMrUVzmvNl9tCKhQj6sD 1wS0TUrDH8p/X4ivJJu0563dI5HWGTeOrPG3ZmcMQnAbcXX9+oNTV/Q/cnluI197tdfc llkH3xBblg/AeLKWkI1B1W1pmHTBj/19A2H2j+xZP5AENk3jc7sOnw8kUOIn2alWDl5t QMkTtaW+hRvfXSkFVzBjQCfQbYH3/jUfKUzNLMAdri5thrLNyhLz5UO2+IXF9HYZNCun lXPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gOsA83SM6DzgiOPAGiabKF2FayuIBgoVSl6PgO9sNO8=; b=ZCHgRUh3jD/fQ37+h1DduYzty90lOFMHOMYcuVibwq7ziCW6polWusL4PLnzj2o+9B kLbgYQjOztHRSsiA3uaLiESodOifwEMsDYVvGl1+T4gwR+2rYjnqE6P40lpvX8OuffX0 01DHtRev2MCmf1Rz4mTYvSSTYAqHB3fj99inHOGECGDwXZEr+PMfugWJwHemh5DJjGZK yjLoCuAhJayczwxpGux8Fd1S0D0D5zS2vVwlzVLOeVcq2CB7mM9NpGTxfv3YOmOe4/se yn5LrF0QwhqyLugym+SLzRRSXh4iLbfqn77g0aK6ByGVPNI+Fv/fuGva77oVB8KN+YSn eHkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Ckt/mJNs"; 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 Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id b3-20020a2e8943000000b0025a8d169ef2si9573448ljk.350.2022.07.04.05.59.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 05:59:52 -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="Ckt/mJNs"; 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 Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 60E65844C4; Mon, 4 Jul 2022 14:59:28 +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="Ckt/mJNs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BF7AF844B1; Mon, 4 Jul 2022 14:59:26 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (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 9F402844C4 for ; Mon, 4 Jul 2022 14:59:22 +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=sumit.garg@linaro.org Received: by mail-pl1-x636.google.com with SMTP id m14so8520002plg.5 for ; Mon, 04 Jul 2022 05:59:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gOsA83SM6DzgiOPAGiabKF2FayuIBgoVSl6PgO9sNO8=; b=Ckt/mJNs3RyRbemCjh4RGct+CZFkKAPTdb9GLHeLhL5DKjB7ryy91+r0brsNYUgrd5 1XoU35z8+E/bHsAqLHRQs+m1bsrR7+cztFEfXHjPhC4YC5z6PE+ZG+49y+iUXT/vk5Lz ojr/H7DVJCHbHO65YnoaYlqrye6/JcX8P+JMXZfDUhRuJS+NLXeGdRgbIpowyRcY7jL2 HS+Y8RjjWu4n19b1tzmynGnLCoNpQezw1NmcT289K9lRenYrEfJhckKPzEoPj8wqKObv zwlK2faKxY9fvgdm1smt+K6DMai3LVP0l6a++iRDufCS4RWDMJo50BwEzNNAqMywyYgT Ekgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gOsA83SM6DzgiOPAGiabKF2FayuIBgoVSl6PgO9sNO8=; b=Gt72MFJoA5NeIQJJRPkAmiQJTq/xLK+WhyQhw9nVSNJGDwErQtqEBVH2xeLry1wbMg 8hyA2dRSfFoc77CvSqDt0aZ4VIPxWX1C/aBJVkpSMQW4WAO5nHWie+1LtGrMVvW7ajLM Q+W0TYqeB3MKAoZvFAQCzwgR+QreN8DYAgMfi94DesC+YSSTGdtSbcLKf9MOJAHAUWX5 N3iCRY5FVqraO3mXsF/RjvAHagT1qyjfJX4yeBLCCRhPMKDETnyKja2zwqlkREoYq8IK TWujT9rJqQacRwuuicmjeWlOWB138/KtK9zqB+dyy/+bk7ENH5KTbiC02XtMntq9TW4b +DPA== X-Gm-Message-State: AJIora/we6C2mukNgOkrxh8Q9ls6A4VFcp2o17sx77mBXuxdNfx3BJPL xVdySHLJP1/DprwgOYavgDFbWpX7G8cmWg== X-Received: by 2002:a17:902:f54e:b0:16a:75a9:9a39 with SMTP id h14-20020a170902f54e00b0016a75a99a39mr34889298plf.70.1656939560721; Mon, 04 Jul 2022 05:59:20 -0700 (PDT) Received: from localhost.localdomain ([182.77.21.191]) by smtp.gmail.com with ESMTPSA id x20-20020a170902b41400b001676dac529asm21047544plr.146.2022.07.04.05.59.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 05:59:20 -0700 (PDT) From: Sumit Garg To: u-boot@lists.denx.de Cc: rfried.dev@gmail.com, peng.fan@nxp.com, jh80.chung@samsung.com, sjg@chromium.org, trini@konsulko.com, dsankouski@gmail.com, stephan@gerhold.net, vinod.koul@linaro.org, nicolas.dechesne@linaro.org, mworsfold@impinj.com, daniel.thompson@linaro.org, Sumit Garg Subject: [PATCH 4/8] board: qualcomm: Add support for dragonboard845c Date: Mon, 4 Jul 2022 18:28:41 +0530 Message-Id: <20220704125845.1077037-5-sumit.garg@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220704125845.1077037-1-sumit.garg@linaro.org> References: <20220704125845.1077037-1-sumit.garg@linaro.org> MIME-Version: 1.0 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.6 at phobos.denx.de X-Virus-Status: Clean Add support for 96Boards Dragonboard 845C aka Robotics RB3 development platform. This board complies with 96Boards Open Platform Specifications. Features: - Qualcomm Snapdragon SDA845 SoC - 4GiB RAM - 64GiB UFS drive U-boot is chain loaded by ABL in 64-bit mode as part of boot.img. For detailed build and boot instructions, refer to doc/board/qualcomm/sdm845.rst, board: dragonboard845c. Signed-off-by: Sumit Garg --- arch/arm/dts/dragonboard845c-uboot.dtsi | 37 +++++++ arch/arm/dts/dragonboard845c.dts | 44 ++++++++ arch/arm/mach-snapdragon/Kconfig | 14 +++ board/qualcomm/dragonboard845c/Kconfig | 12 +++ board/qualcomm/dragonboard845c/MAINTAINERS | 6 ++ board/qualcomm/dragonboard845c/Makefile | 9 ++ board/qualcomm/dragonboard845c/db845c.its | 63 +++++++++++ .../dragonboard845c/dragonboard845c.c | 9 ++ configs/dragonboard845c_defconfig | 28 +++++ doc/board/qualcomm/sdm845.rst | 100 +++++++++++++++--- include/configs/dragonboard845c.h | 28 +++++ 11 files changed, 337 insertions(+), 13 deletions(-) create mode 100644 arch/arm/dts/dragonboard845c-uboot.dtsi create mode 100644 arch/arm/dts/dragonboard845c.dts create mode 100644 board/qualcomm/dragonboard845c/Kconfig create mode 100644 board/qualcomm/dragonboard845c/MAINTAINERS create mode 100644 board/qualcomm/dragonboard845c/Makefile create mode 100644 board/qualcomm/dragonboard845c/db845c.its create mode 100644 board/qualcomm/dragonboard845c/dragonboard845c.c create mode 100644 configs/dragonboard845c_defconfig create mode 100644 include/configs/dragonboard845c.h diff --git a/arch/arm/dts/dragonboard845c-uboot.dtsi b/arch/arm/dts/dragonboard845c-uboot.dtsi new file mode 100644 index 0000000000..8b5a7ee573 --- /dev/null +++ b/arch/arm/dts/dragonboard845c-uboot.dtsi @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * U-Boot addition to handle Qualcomm Robotics RB3 Development Platform + * (dragonboard845c) pins + * + * (C) Copyright 2022 Sumit Garg + */ + +/ +{ + soc { + u-boot,dm-pre-reloc; + + serial@a84000 { + u-boot,dm-pre-reloc; + }; + + clock-controller@100000 { + u-boot,dm-pre-reloc; + }; + + pinctrl_north@3900000 { + u-boot,dm-pre-reloc; + }; + }; +}; + +&pm8998_pon { + key_vol_down { + gpios = <&pm8998_pon 1 0>; + label = "key_vol_down"; + }; + key_power { + gpios = <&pm8998_pon 0 0>; + label = "key_power"; + }; +}; diff --git a/arch/arm/dts/dragonboard845c.dts b/arch/arm/dts/dragonboard845c.dts new file mode 100644 index 0000000000..1722dce33f --- /dev/null +++ b/arch/arm/dts/dragonboard845c.dts @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Qualcomm Robotics RB3 Development (dragonboard845c) board device + * tree source + * + * (C) Copyright 2022 Sumit Garg + */ + +/dts-v1/; + +#include "sdm845.dtsi" + +/ { + model = "Thundercomm Dragonboard 845c"; + compatible = "thundercomm,db845c", "qcom,sdm845"; + #address-cells = <2>; + #size-cells = <2>; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + aliases { + serial0 = &debug_uart; + }; + + memory { + device_type = "memory"; + reg = <0 0x80000000 0 0xfdfa0000>; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + }; + + soc: soc { + serial@a84000 { + status = "okay"; + }; + }; +}; + +#include "dragonboard845c-uboot.dtsi" diff --git a/arch/arm/mach-snapdragon/Kconfig b/arch/arm/mach-snapdragon/Kconfig index 12cf02a56a..34af40b915 100644 --- a/arch/arm/mach-snapdragon/Kconfig +++ b/arch/arm/mach-snapdragon/Kconfig @@ -44,6 +44,19 @@ config TARGET_DRAGONBOARD820C - 3GiB RAM - 32GiB UFS drive +config TARGET_DRAGONBOARD845C + bool "96Boards Dragonboard 845C" + help + Support for 96Boards Dragonboard 845C aka Robotics RB3 Development + Platform. This board complies with 96Board Open Platform + Specifications. Features: + - Qualcomm Snapdragon SDA845 SoC + - 4GiB RAM + - 64GiB UFS drive + select MISC_INIT_R + select SDM845 + select DM_ETH if NET + config TARGET_STARQLTECHN bool "Samsung S9 SM-G9600(starqltechn)" help @@ -60,6 +73,7 @@ endchoice source "board/qualcomm/dragonboard410c/Kconfig" source "board/qualcomm/dragonboard820c/Kconfig" +source "board/qualcomm/dragonboard845c/Kconfig" source "board/samsung/starqltechn/Kconfig" endif diff --git a/board/qualcomm/dragonboard845c/Kconfig b/board/qualcomm/dragonboard845c/Kconfig new file mode 100644 index 0000000000..52fdff288d --- /dev/null +++ b/board/qualcomm/dragonboard845c/Kconfig @@ -0,0 +1,12 @@ +if TARGET_DRAGONBOARD845C + +config SYS_BOARD + default "dragonboard845c" + +config SYS_CONFIG_NAME + default "dragonboard845c" + +config SYS_VENDOR + default "qualcomm" + +endif diff --git a/board/qualcomm/dragonboard845c/MAINTAINERS b/board/qualcomm/dragonboard845c/MAINTAINERS new file mode 100644 index 0000000000..e555953df6 --- /dev/null +++ b/board/qualcomm/dragonboard845c/MAINTAINERS @@ -0,0 +1,6 @@ +Qualcomm Robotics RB3 Development Platform (dragonboard845c) +M: Sumit Garg +S: Maintained +F: board/qualcomm/dragonboard845c/ +F: include/configs/dragonboard845c.h +F: configs/dragonboard845c_defconfig diff --git a/board/qualcomm/dragonboard845c/Makefile b/board/qualcomm/dragonboard845c/Makefile new file mode 100644 index 0000000000..0abefdaf36 --- /dev/null +++ b/board/qualcomm/dragonboard845c/Makefile @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2022 Sumit Garg +# +# This empty file prevents make error. +# Board logic defined in board/qualcomm/common/sdm845.c, no custom logic for dragonboard845c so far. +# + +obj-y += dragonboard845c.o diff --git a/board/qualcomm/dragonboard845c/db845c.its b/board/qualcomm/dragonboard845c/db845c.its new file mode 100644 index 0000000000..a2621340d1 --- /dev/null +++ b/board/qualcomm/dragonboard845c/db845c.its @@ -0,0 +1,63 @@ +/* + * U-Boot uImage source file with multiple kernels, ramdisks and FDT blobs + */ + +/dts-v1/; + +/ { + description = "Various kernels, ramdisks and FDT blobs"; + #address-cells = <1>; + + images { + kernel-1 { + description = "5.15.0-qcomlt-arm64"; + data = /incbin/("./db845c_imgs/Image.gz--5.15-r0-dragonboard-845c-20211218193034-511.bin"); + type = "kernel"; + arch = "arm64"; + os = "linux"; + compression = "gzip"; + load = <0x80000000>; + entry = <0x80000000>; + hash-1 { + algo = "sha1"; + }; + }; + + ramdisk-1 { + description = "initramfs-test-full-image-dragonboard-845c"; + data = /incbin/("./db845c_imgs/initramfs-test-full-image-dragonboard-845c-20211218193034-511.rootfs.cpio.gz"); + type = "ramdisk"; + arch = "arm64"; + os = "linux"; + compression = "gzip"; + load = <00000000>; + entry = <00000000>; + hash-1 { + algo = "sha1"; + }; + }; + + fdt-1 { + description = "sdm845-db845c-fdt"; + data = /incbin/("./db845c_imgs/sdm845-db845c--5.15-r0-dragonboard-845c-20211218193034.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + hash-1 { + algo = "sha1"; + }; + }; + + }; + + configurations { + default = "config-1"; + + config-1 { + description = "db845c kernel-5.15.0 configuration"; + kernel = "kernel-1"; + ramdisk = "ramdisk-1"; + fdt = "fdt-1"; + }; + }; +}; diff --git a/board/qualcomm/dragonboard845c/dragonboard845c.c b/board/qualcomm/dragonboard845c/dragonboard845c.c new file mode 100644 index 0000000000..c7685de306 --- /dev/null +++ b/board/qualcomm/dragonboard845c/dragonboard845c.c @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * This empty file prevents make linking error. + * No custom logic for dragonboard845c so far. + * + * (C) Copyright 2022 Sumit Garg + */ + +void noop(void) {} diff --git a/configs/dragonboard845c_defconfig b/configs/dragonboard845c_defconfig new file mode 100644 index 0000000000..a19e46a74b --- /dev/null +++ b/configs/dragonboard845c_defconfig @@ -0,0 +1,28 @@ +CONFIG_ARM=y +CONFIG_SKIP_LOWLEVEL_INIT=y +CONFIG_COUNTER_FREQUENCY=19000000 +CONFIG_POSITION_INDEPENDENT=y +CONFIG_ARCH_SNAPDRAGON=y +CONFIG_DEFAULT_DEVICE_TREE="dragonboard845c" +CONFIG_TARGET_DRAGONBOARD845C=y +CONFIG_IDENT_STRING="\nQualcomm-DragonBoard 845C" +CONFIG_SYS_LOAD_ADDR=0x80000000 +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_BOOTDELAY=5 +CONFIG_SAVE_PREV_BL_FDT_ADDR=y +CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR=y +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_HUSH_PARSER=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_BMP=y +# CONFIG_NET is not set +CONFIG_CLK=y +CONFIG_MSM_GPIO=y +CONFIG_PM8916_GPIO=y +CONFIG_PINCTRL=y +CONFIG_DM_PMIC=y +CONFIG_PMIC_PM8916=y +CONFIG_MSM_GENI_SERIAL=y +CONFIG_SPMI_MSM=y +CONFIG_LMB_MAX_REGIONS=64 diff --git a/doc/board/qualcomm/sdm845.rst b/doc/board/qualcomm/sdm845.rst index b6642c9579..8ef4749287 100644 --- a/doc/board/qualcomm/sdm845.rst +++ b/doc/board/qualcomm/sdm845.rst @@ -35,9 +35,25 @@ Pack android boot image ^^^^^^^^^^^^^^^^^^^^^^^ We'll assemble android boot image with ``u-boot.bin`` instead of linux kernel, and FIT image instead of ``initramfs``. Android bootloader expect gzipped kernel -with appended dtb, so let's mimic linux to satisfy stock bootloader: +with appended dtb, so let's mimic linux to satisfy stock bootloader. -- create dump dtb:: +Boards +------------ +starqlte +^^^^^^^^^^^^ + +The starqltechn is a production board for Samsung S9 (SM-G9600) phone, +based on the Qualcomm SDM845 SoC. + +Steps: + +- Build u-boot:: + + $ export CROSS_COMPILE= + $ make starqltechn_defconfig + $ make + +- Create dump dtb:: workdir=/tmp/prepare_payload mkdir -p "$workdir" @@ -56,10 +72,15 @@ with appended dtb, so let's mimic linux to satisfy stock bootloader: }; EOF -- gzip u-boot ``gzip u-boot.bin`` -- append dtb to gzipped u-boot: ``cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb`` +- gzip u-boot:: + + gzip u-boot.bin -Now we've got everything to build android boot image::: +- Append dtb to gzipped u-boot:: + + cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb + +- Now we've got everything to build android boot image:: mkbootimg --base 0x0 --kernel_offset 0x00008000 \ --ramdisk_offset 0x02000000 --tags_offset 0x01e00000 \ @@ -68,16 +89,69 @@ Now we've got everything to build android boot image::: --kernel u-boot.bin.gz-dtb \ -o boot.img -Flash image with your phone's flashing method. +- Flash image with your phone's flashing method. -Boards ------------- -starqlte -^^^^^^^^^^^^ +More information can be found on the `Samsung S9 page`_. -The starqltechn is a production board for Samsung S9 (SM-G9600) phone, -based on the Qualcomm SDM845 SoC. +dragonboard845c +^^^^^^^^^^^^^^^ -More information can be found on the `Samsung S9 page`_. +The dragonboard845c is a Qualcomm Robotics RB3 Development Platform, based on +the Qualcomm SDM845 SoC. + +Steps: + +- Build u-boot:: + + $ export CROSS_COMPILE= + $ make dragonboard845c_defconfig + $ make + +- Create dummy dtb:: + + workdir=/tmp/prepare_payload + mkdir -p "$workdir" + mock_dtb="$workdir"/payload_mock.dtb + + dtc -I dts -O dtb -o "$mock_dtb" << EOF + /dts-v1/; + / { + #address-cells = <2>; + #size-cells = <2>; + + memory@80000000 { + device_type = "memory"; + /* We expect the bootloader to fill in the size */ + reg = <0 0x80000000 0 0>; + }; + + chosen { }; + }; + EOF + +- gzip u-boot:: + + gzip u-boot.bin + +- Append dtb to gzipped u-boot:: + + cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb + +- A ``db845c.its`` file can be found in ``board/qualcomm/dragonboard845c/`` + directory. It expects a folder as ``db845c_imgs/`` in the main directory + containing pre-built kernel, dts and ramdisk images. See ``db845c.its`` + for full path to images:: + + mkimage -f db845c.its db845c.itb + +- Now we've got everything to build android boot image:: + + mkbootimg --kernel u-boot.bin.gz-dtb --ramdisk db845c.itb \ + --output boot.img --pagesize 4096 --base 0x80000000 + +- Flash boot.img using db845c fastboot method. + +More information can be found on the `DragonBoard 845c page`_. .. _Samsung S9 page: https://en.wikipedia.org/wiki/Samsung_Galaxy_S9 +.. _DragonBoard 845c page: https://www.96boards.org/product/rb3-platform/ diff --git a/include/configs/dragonboard845c.h b/include/configs/dragonboard845c.h new file mode 100644 index 0000000000..108dde199b --- /dev/null +++ b/include/configs/dragonboard845c.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Configuration file for Dragonboard 845c, based on Qualcomm SDA845 chip + * + * (C) Copyright 2022 Sumit Garg + */ + +#ifndef __CONFIGS_SDM845_H +#define __CONFIGS_SDM845_H + +#include +#include + +#define CONFIG_SYS_BAUDRATE_TABLE { 115200, 230400, 460800, 921600 } + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "bootm_size=0x5000000\0" \ + "bootm_low=0x80000000\0" \ + "bootcmd=bootm $prevbl_initrd_start_addr\0" + +/* Size of malloc() pool */ +#define CONFIG_SYS_BOOTM_LEN SZ_64M + +/* Monitor Command Prompt */ +#define CONFIG_SYS_CBSIZE 512 +#define CONFIG_SYS_MAXARGS 64 + +#endif