From patchwork Fri Jul 8 13:14:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 588507 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:bb16:0:0:0:0 with SMTP id jd22csp639075mab; Fri, 8 Jul 2022 06:15:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vqMD5++KsWxNYHz6Q4jBYjWGVMbWGhsWizo84gHYNOBxlkO4zfsNzAE1BNWc/wJSx2t35o X-Received: by 2002:a2e:9ad0:0:b0:25a:7156:26bb with SMTP id p16-20020a2e9ad0000000b0025a715626bbmr1888552ljj.141.1657286122522; Fri, 08 Jul 2022 06:15:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657286122; cv=none; d=google.com; s=arc-20160816; b=JpZxQ+DSNurycmojQFEKhJCO0D9jHM/MHOX/gfifmpuSZ/6+88ESou+ypSHpr7O+CY MnoPUoPrctwWYNNtlzZ5Zx472v64o49cK3CT88jrjPGXav80koeKQx7WQ1FeDRQeBkEO hY3XEaQixvUYQs07I74TLdnb4yzCu/s5skLX6+FPVvn68dYGP7x1YFvxeOe46Ez9Hj9U tkcnnJ452LjqUI+RaxEWK6XwfoHqLSDMPGm+1sKnvOAwdciLsK/q8OOPXJFbB9P4kEag xvktabJMfcrdG1WNBDVkcjjBUoq9RdLaqqi1Z8gZSQoSG075F/yHuX+MC5JOkNvy6joB tvXQ== 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=rN7mjcyPhq6wtWjX+4VRfP/6UX9JhagHY4gsxKNPX2I=; b=Brfr8svfXlIoRytbPX4zk77glpiRryPGl0CgSfau/z/Rts4xZkLfeyjYS5CmjKqI5+ CB1UeNUiggcb7zSwNclxqjbDER+AR8gZOeqUftE503ze4KSmCUUbl0qT8k84kC4zLZIx OuVbciNxnS462ACQYJ7yRrzIYyek54qtlsaXSokpfarDyD4DkzegDF2GCIbraGh/HCz3 pcmlWfBbRzUFAqHw4BiHjWBOk7SPOgtpbiu59e+7V/6jMT406TaB5fpvMr14L1f8nHnI 51ScZkMQwNJRg5qfT4bzR6oAmCSTjzDY2GsHYejwn4IB4Eai3r4ZXUh/u8TeFTCM/dxM spWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WXIle5S2; 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 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 p6-20020a056512234600b0047943b19007si22767208lfu.7.2022.07.08.06.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 06:15:22 -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=WXIle5S2; 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 Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9A0AB845A7; Fri, 8 Jul 2022 15:14:48 +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="WXIle5S2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2FA5D845A7; Fri, 8 Jul 2022 15:14:47 +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-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) (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 B0DC1845AD for ; Fri, 8 Jul 2022 15:14:42 +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-x62a.google.com with SMTP id p16so1611573plo.0 for ; Fri, 08 Jul 2022 06:14:42 -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=rN7mjcyPhq6wtWjX+4VRfP/6UX9JhagHY4gsxKNPX2I=; b=WXIle5S2OIaRkNHskpeBNLEFv0nKomBhdlS1cAL3PKEW/GQ+J+X/xEd+coRVl/tHpN GeE0/g23B1rBvaidyP3HuPmF/Y11anr9v8myXfwz/pxPAY9gYhXjdYHC9INjc4h0JdUo 38OQX3am7KA/jPvHRW/3gAyI8xmWO8tkkHPYHHSh+hghWR8O51dM7vpCCk43ikVRkaoV T8N/VwmaP8Z8/su2blK6mSrbh3+l9nWSGLh9Ve1X057g87cd0etIIaIK+DGE2L3TUkj/ jShO6dMCVq6jTQVkiOwwfz36kPf+pM+hE5/cgMXbPmz1VHMRIFcb2GfC+FDY4wPqyaRR tJYw== 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=rN7mjcyPhq6wtWjX+4VRfP/6UX9JhagHY4gsxKNPX2I=; b=2UFJ5qreFOsDvHbRozSRxaLL+bPH+w8I9dho+ogZ94glkb64pn1pxKLBFv0ktHnyCF HNTMK+Gd4aehmwSRmFAQl88jdJFf3mZfCciQIAEY0kh1KAh0hPh4A1fveDJGhKCJ2bdF TvqXyxueHADgskj6E4EY5l3L2cCGw7IjUqxYwSkA0ny2HlffkUQdY59ZTaMqYg0jb2H/ DLM6F1exK+e15jOVvuX+ti0DESMjUULSjm8iL7MCoNz57wu1oeEQhd3q5fEvPkM9cl/1 9zdjqeCqmqxGw1W437FdfFAKIezfh0kKAozWVeIQodhN8IVXHqQUSxQ1kOy8WCMpvjBH Nvsw== X-Gm-Message-State: AJIora+8Ex8sYoAgeQCfh3mqvDmCMBjIoPor7c+kmmBRTwe+G8o+Vgxg IdMeD+sh9Lz361RO5HnSy+LLgEcuzrB7wQ== X-Received: by 2002:a17:90b:3510:b0:1ef:fa68:fdf6 with SMTP id ls16-20020a17090b351000b001effa68fdf6mr1060982pjb.99.1657286080652; Fri, 08 Jul 2022 06:14:40 -0700 (PDT) Received: from localhost.localdomain ([182.77.21.191]) by smtp.gmail.com with ESMTPSA id c9-20020a624e09000000b0052974b651b9sm2026493pfb.38.2022.07.08.06.14.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 06:14:40 -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, pbrobinson@gmail.com, Sumit Garg Subject: [PATCH v2 5/9] board: qualcomm: Add support for dragonboard845c Date: Fri, 8 Jul 2022 18:44:00 +0530 Message-Id: <20220708131404.1489347-6-sumit.garg@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220708131404.1489347-1-sumit.garg@linaro.org> References: <20220708131404.1489347-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 Reviewed-by: Ramon Fried --- 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..cb53dc8901 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 96Boards 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