platform/kernel/u-boot-thead.git
6 months agoboard: thead: spl: Fix compilation 16/320016/2 accepted/tizen_unified accepted/tizen_unified_x accepted/tizen_unified_x_asan tizen accepted/tizen/unified/20241121.055620 accepted/tizen/unified/x/20241116.040744 accepted/tizen/unified/x/asan/20241224.004421
Michal Wilczynski [Wed, 6 Nov 2024 13:41:06 +0000 (14:41 +0100)]
board: thead: spl: Fix compilation

The writel and readl macros expect a pointer, add appropriate casts to
fix broken compilation.

Change-Id: I8527eb49136220f7898060a29d37b998fe7d9017
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
6 months agotizen: bootscript: Execute fixup_memory_region command before boot 15/320015/2
Michal Wilczynski [Wed, 6 Nov 2024 11:34:43 +0000 (12:34 +0100)]
tizen: bootscript: Execute fixup_memory_region command before boot

In case of 16GB boards the kernel FDT needs to be patched, to be able to
use the full 16GB of memory instead of the default 8GB. Call
fixup_memory_region command before booting the kernel, but after FDT is
loaded to specified place in memory.

Change-Id: I15a76bba8606d5131b3811f2cc2cb875eaf9e71a
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
6 months agotizen: Add support for memory region fixup 14/320014/2
Michal Wilczynski [Wed, 6 Nov 2024 11:14:31 +0000 (12:14 +0100)]
tizen: Add support for memory region fixup

Currently the default size in kernel memory device tree node is 8GB.
This prevents 16GB versions of the board from accessing full 16GB of
their memory. Enable the CONFIG_FIXUP_MEMORY_REGION to compile the code
that can auto detect the memory size.

Change-Id: I21671d29c24576591c6a748d50cc744ceb7ffee4
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
7 months agotizen: bootscript: Set eth0 ip addr only for flash boot mode 70/320070/1 accepted/tizen/unified/x/20241108.111144
Seung-Woo Kim [Thu, 7 Nov 2024 09:33:02 +0000 (18:33 +0900)]
tizen: bootscript: Set eth0 ip addr only for flash boot mode

The lpi-4a board has two ethernet interfaces and setting
ipaddr without an interface, it tries all interface for all
enabled autoconfiguration protocol. Sometimes, this causes
boot hang to get recv from an ethernet interface for an
autoconfiguration protocol. To remove the possible boot hang,
set only eth0 ip addr for flash boot mode.

Refer ip= part of below kernel doc:
  https://git.tizen.org/cgit/platform/kernel/linux-thead/tree/Documentation/admin-guide/nfs/nfsroot.rst?h=tizen

Change-Id: I3aa5d59551aea147cd14d464eb501fcc0e843d54
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 months agoboard: t-head: Add missing include to fix compilation accepted/tizen/unified/x/20241031.045847
Michal Wilczynski [Mon, 28 Oct 2024 09:27:51 +0000 (10:27 +0100)]
board: t-head: Add missing include to fix compilation

Add missing include, without it the compilation breaks.

Change-Id: I480599c9771e59c4e1cc50c5b788c0aaafa1a409
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
7 months agoboard: t-head: Remove unused function breaking compilation
Michal Wilczynski [Mon, 28 Oct 2024 08:39:26 +0000 (09:39 +0100)]
board: t-head: Remove unused function breaking compilation

The function is unused, and breaks the compilation. Remove it.

Change-Id: Ib5d51c492407bf5fe653af5f97df53e27065ae6e
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
7 months agotizen: lpi4a: Update firmware binaries to newest version
Michal Wilczynski [Mon, 28 Oct 2024 08:02:47 +0000 (09:02 +0100)]
tizen: lpi4a: Update firmware binaries to newest version

Some firmware binaries, like light_aon_fpga.bin, fell out of sync with
the Tizen used kernel. Update them to avoid any further problems.

Change-Id: If8da57e9c815ed3bf291b74d8df8806993171a99
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
7 months agotizen: Add extra AON options, and run the savedefconfig
Michal Wilczynski [Mon, 28 Oct 2024 07:49:50 +0000 (08:49 +0100)]
tizen: Add extra AON options, and run the savedefconfig

After re-basing on the upstream version new options
CONFIG_LIGHT_AON_CONF, and CONFIG_MISC needs to be added in order for
the E902 core firmware to load correctly. Add the options, and run them
through the 'savedefconfig' Makefile command.

Change-Id: Ib52017c24fb8839e4d2716df2285f667732281e5
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
7 months agotizen: bootscript: unpack initramfs and pass its actual size to kernel
Marek Szyprowski [Mon, 7 Oct 2024 09:44:00 +0000 (11:44 +0200)]
tizen: bootscript: unpack initramfs and pass its actual size to kernel

The initramfs ramdisk image (CPIO compressed archive) is stored on the
separate ramdisk/ramdisk-recovery partitions, thus it is not possible to
determine size of the compresszed archive. Passing the size of the
partition as the size of initramfs image to the kernel instructs the
kernel to check if the remaining bytes are another CPIO archive with more
initramfs data.

Decompressing or interpreting such additional garbage bytes sometimes
fails, what results in kernel ignoring the whole initramfs data as broken
one and thus breaking the Tizen boot sequence.

To avoid such problems and dependency on unknown/garbage data from
ramdisk partitions, lets decompres initramfs data (CPIO gzip archive)
directly in u-boot and pass the kernel only the single, uncompressed CPIO
archive as iniramfs image.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I4d8e532ead5c4775b2eef9272e6121565083d9a0

7 months agotizen: add bootcode.bin with RV64 code to jump to sector 34
Marek Szyprowski [Mon, 5 Aug 2024 16:21:25 +0000 (18:21 +0200)]
tizen: add bootcode.bin with RV64 code to jump to sector 34

The bootcode written to the protective MBR (sector zero) has to be
proviced by the uboot package instead of being hardcoded in sd_fusing.py
script. This makes the SD card flashing proceduce a bit more flexible and
prepares sd_fusing for handling more complicated bootcode for other
boards.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I875760aea53acc638a7daffb49927d876367186d

7 months agoFix Werrors caused by GCC-14.1.0 porting
Dongkyun Son [Wed, 5 Jun 2024 00:35:17 +0000 (09:35 +0900)]
Fix Werrors caused by GCC-14.1.0 porting

-Wint-conversion
-Wimplicit-function-declaration

https://gcc.gnu.org/gcc-14/porting_to.html

Change-Id: I14221a5468496494f90f505b47d052e25292aa96
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
7 months agoRemove the unnecessary script
Jaehoon Chung [Fri, 24 May 2024 01:01:26 +0000 (10:01 +0900)]
Remove the unnecessary script

run.sh was taken from original vendor repo.
This can be confusing to tizen developer if it can be using or not.
To clarify this, remove the unnecessary script.

Change-Id: I26d59298417825dcf8469efa32290160c3b92c8d
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 months agotizen: always set mmc dev to 1 (sd card) in the Tizen boot command
Marek Szyprowski [Wed, 22 May 2024 21:22:45 +0000 (23:22 +0200)]
tizen: always set mmc dev to 1 (sd card) in the Tizen boot command

This fixes first boot after sd_fusing, when vendor's uboot tries to save
board serial number to uboot.env.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Iaa1fa424135759f9eb748e3bfc4967c3cb2f3c1a

7 months agotizen: set CONFIG_ENV_SIZE to 0x4000 (16kb)
Marek Szyprowski [Wed, 22 May 2024 21:20:50 +0000 (23:20 +0200)]
tizen: set CONFIG_ENV_SIZE to 0x4000 (16kb)

Use the same env size as the size of uboot.env created in Tizen packaging
scripts.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I9dc2138a1a3e622d7b81bc04b9380f64c27a5c7d

7 months agotizen: add support for booting Tizen OS from SD-card
Marek Szyprowski [Tue, 26 Mar 2024 12:35:28 +0000 (13:35 +0100)]
tizen: add support for booting Tizen OS from SD-card

Add packaging, dedicated defconfigs and common samsung/tizen_riscv.h for
booting Tizen OS from SD-card on LicheePi4A.

Firmware files (fw_dynamic.bin, light_aon_fpga.bin & light_c906_audio.bin)
are taken from official RevyOS 20231210 boot image:
https://mirror.iscas.ac.cn/revyos/extra/images/lpi4a/20231210/boot-lpi4a-20231210_134926.ext4.zst

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I0808ae880339553953c01ff03b5b3072455ce475

7 months agofat: write: adjust data written in each partial write
Marek Szyprowski [Mon, 2 Dec 2019 11:11:14 +0000 (12:11 +0100)]
fat: write: adjust data written in each partial write

The code for handing file overwrite incorrectly calculated the amount of
data to write when writing to the last non-cluster aligned chunk. Fix
this by ensuring that no more data than the 'filesize' is written to disk.
While touching min()-based calculations, change it to type-safe min_t()
function.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
This patch finally fixes the issue revealed by the test script from the
previous patch. The correctness of the change has been also verified by
the following additional test scripts:

--->8-fat_test2.sh---
make sandbox_defconfig
make
dd if=/dev/zero of=/tmp/10M.img bs=1024 count=10k
mkfs.vfat -v /tmp/10M.img
cat >/tmp/cmds <<EOF
x
host bind 0 /tmp/10M.img
fatls host 0
mw 0x1000000 0x0a434241 0x1000 # "ABC
"
mw 0x1100000 0x0a464544 0x8000 # "DEF
"
fatwrite host 0 0x1000000 file0001.raw 0x1000
fatwrite host 0 0x1000000 file0002.raw 0x1000
fatwrite host 0 0x1000000 file0003.raw 0x1000
fatwrite host 0 0x1000000 file0004.raw 0x1000
fatwrite host 0 0x1000000 file0005.raw 0x1000
fatrm host 0 file0002.raw
fatrm host 0 file0004.raw
fatls host 0
fatwrite host 0 0x1100000 file0007.raw 0x2000
fatwrite host 0 0x1100000 file0007.raw 0x1f00
reset
EOF
./u-boot </tmp/cmds
rm -r /tmp/result /tmp/model
mkdir /tmp/result
mkdir /tmp/model
yes ABC | head -c 4096 >/tmp/model/file0001.raw
yes ABC | head -c 4096 >/tmp/model/file0003.raw
yes ABC | head -c 4096 >/tmp/model/file0005.raw
yes DEF | head -c 7936 >/tmp/model/file0007.raw
mcopy -n -i /tmp/10M.img ::file0001.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0003.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0005.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0007.raw /tmp/result
hd /tmp/10M.img
if diff -urq /tmp/model /tmp/result
then
echo Test okay
else
echo Test fail
fi
--->8-fat_test3.sh---
make sandbox_defconfig
make
dd if=/dev/zero of=/tmp/10M.img bs=1024 count=10k
mkfs.vfat -v /tmp/10M.img
cat >/tmp/cmds <<EOF
x
host bind 0 /tmp/10M.img
fatls host 0
mw 0x1000000 0x0a434241 0x1000 # "ABC
"
mw 0x1100000 0x0a464544 0x8000 # "DEF
"
fatwrite host 0 0x1000000 file0001.raw 0x1000
fatwrite host 0 0x1000000 file0002.raw 0x1000
fatwrite host 0 0x1000000 file0003.raw 0x1000
fatwrite host 0 0x1000000 file0004.raw 0x1000
fatwrite host 0 0x1000000 file0005.raw 0x1000
fatrm host 0 file0002.raw
fatrm host 0 file0004.raw
fatls host 0
fatwrite host 0 0x1100000 file0007.raw 0x2000
fatwrite host 0 0x1100000 file0007.raw 0x2100
reset
EOF
./u-boot </tmp/cmds
rm -r /tmp/result /tmp/model
mkdir /tmp/result
mkdir /tmp/model
yes ABC | head -c 4096 >/tmp/model/file0001.raw
yes ABC | head -c 4096 >/tmp/model/file0003.raw
yes ABC | head -c 4096 >/tmp/model/file0005.raw
yes DEF | head -c 8448 >/tmp/model/file0007.raw
mcopy -n -i /tmp/10M.img ::file0001.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0003.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0005.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0007.raw /tmp/result
hd /tmp/10M.img
if diff -urq /tmp/model /tmp/result
then
echo Test okay
else
echo Test fail
fi
--->8-fat_test4.sh---
make sandbox_defconfig
make
dd if=/dev/zero of=/tmp/10M.img bs=1024 count=10k
mkfs.vfat -v /tmp/10M.img
cat >/tmp/cmds <<EOF
x
host bind 0 /tmp/10M.img
fatls host 0
mw 0x1000000 0x0a434241 0x1000 # "ABC
"
mw 0x1100000 0x0a464544 0x8000 # "DEF
"
mw 0x1200000 0x0a494847 0x8000 # "GHI
"
fatwrite host 0 0x1000000 file0001.raw 0x1000
fatwrite host 0 0x1000000 file0002.raw 0x1000
fatwrite host 0 0x1000000 file0003.raw 0x1000
fatwrite host 0 0x1000000 file0004.raw 0x1000
fatwrite host 0 0x1000000 file0005.raw 0x1000
fatrm host 0 file0002.raw
fatrm host 0 file0004.raw
fatls host 0
fatwrite host 0 0x1100000 file0007.raw 0x900
fatwrite host 0 0x1200000 file0007.raw 0x900 0x900
fatwrite host 0 0x1100000 file0007.raw 0x900 0x1200
fatwrite host 0 0x1200000 file0007.raw 0x900 0x1b00
reset
EOF
./u-boot </tmp/cmds
rm -r /tmp/result /tmp/model
mkdir /tmp/result
mkdir /tmp/model
yes ABC | head -c 4096 >/tmp/model/file0001.raw
yes ABC | head -c 4096 >/tmp/model/file0003.raw
yes ABC | head -c 4096 >/tmp/model/file0005.raw
yes DEF | head -c 2304 >/tmp/model/file0007.raw
yes GHI | head -c 2304 >>/tmp/model/file0007.raw
yes DEF | head -c 2304 >>/tmp/model/file0007.raw
yes GHI | head -c 2304 >>/tmp/model/file0007.raw
mcopy -n -i /tmp/10M.img ::file0001.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0003.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0005.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0007.raw /tmp/result
hd /tmp/10M.img
if diff -urq /tmp/model /tmp/result
then
echo Test okay
else
echo Test fail
fi
--->8---
Feel free to prepare a proper sandbox/py_test based tests based on
the provided test scripts.

[backport of the commit a54ece408582294217d5185dc40a950a3c2983ea from mainline]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ic40f52a7d1280bb06ac0fde4229be8dc412c2096

7 months agofat: write: fix broken write to fragmented files
Marek Szyprowski [Mon, 2 Dec 2019 11:11:13 +0000 (12:11 +0100)]
fat: write: fix broken write to fragmented files

The code for handing file overwrite incorrectly assumed that the file on
disk is always contiguous. This resulted in corrupting disk structure
every time when write to existing fragmented file happened. Fix this
by adding proper check for cluster discontinuity and adjust chunk size
on each partial write.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
This patch partially fixes the issue revealed by the following test
script:

--->8-fat_test1.sh---
make sandbox_defconfig
make
dd if=/dev/zero of=/tmp/10M.img bs=1024 count=10k
mkfs.vfat -v /tmp/10M.img
cat >/tmp/cmds <<EOF
x
host bind 0 /tmp/10M.img
fatls host 0
mw 0x1000000 0x0a434241 0x1000 # "ABC
"
mw 0x1100000 0x0a464544 0x8000 # "DEF
"
fatwrite host 0 0x1000000 file0001.raw 0x1000
fatwrite host 0 0x1000000 file0002.raw 0x1000
fatwrite host 0 0x1000000 file0003.raw 0x1000
fatwrite host 0 0x1000000 file0004.raw 0x1000
fatwrite host 0 0x1000000 file0005.raw 0x1000
fatrm host 0 file0002.raw
fatrm host 0 file0004.raw
fatls host 0
fatwrite host 0 0x1100000 file0007.raw 0x4000
fatwrite host 0 0x1100000 file0007.raw 0x4000
reset
EOF
./u-boot </tmp/cmds
rm -r /tmp/result /tmp/model
mkdir /tmp/result
mkdir /tmp/model
yes ABC | head -c 4096 >/tmp/model/file0001.raw
yes ABC | head -c 4096 >/tmp/model/file0003.raw
yes ABC | head -c 4096 >/tmp/model/file0005.raw
yes DEF | head -c 16384 >/tmp/model/file0007.raw
mcopy -n -i /tmp/10M.img ::file0001.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0003.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0005.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0007.raw /tmp/result
hd /tmp/10M.img
if diff -urq /tmp/model /tmp/result
then
echo Test okay
else
echo Test fail
fi
--->8---

Overwritting a discontiguous test file (file0007.raw) no longer causes
corruption to file0003.raw, which's data lies between the chunks of the
test file. The amount of data written to disk is still incorrect, what
causes damage to the file (file0005.raw), which's data lies next to the
test file. This will be fixed by the next patch.

Feel free to prepare a proper sandbox/py_test based tests based on the
provided test scripts.

[backport of the commit 5e615b74e8c8dedcc1ad9a49a04b01a1c216d8bc from mainline]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I85a1473d70c34b511380f255718aa4dd7337d121

10 months agofeat: add 8g emmc lpi4a som support
Han Gao [Sat, 20 Jul 2024 16:36:32 +0000 (00:36 +0800)]
feat: add 8g emmc lpi4a som support

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
Signed-off-by: Han Gao <rabenda.cn@gmail.com>
10 months agoadd single/dual rank support
钦峰 [Mon, 20 May 2024 13:52:54 +0000 (21:52 +0800)]
add single/dual rank support

Change-Id: I633daa4a871f93c5b4d897b1d60ed23bcc198912

10 months agoenv: Add boot from usb
NekoRouter [Wed, 17 Jul 2024 06:05:36 +0000 (14:05 +0800)]
env: Add boot from usb

10 months agoci: Add build for laptop4a and pocket4a
NekoRouter [Tue, 16 Jul 2024 10:32:41 +0000 (18:32 +0800)]
ci: Add build for laptop4a and pocket4a

10 months agoconfigs: add plastic & pocket config file
Lu [Mon, 20 May 2024 01:31:25 +0000 (09:31 +0800)]
configs: add plastic & pocket config file

10 months agoxhci: allow trans data on 0x0
Lu [Mon, 20 May 2024 01:30:45 +0000 (09:30 +0800)]
xhci: allow trans data on 0x0

10 months agoth1520: enable usb host support
Lu [Mon, 20 May 2024 01:29:14 +0000 (09:29 +0800)]
th1520: enable usb host support

11 months agoci: enable ci for DDR-16GB meles
Haaland Chen [Sat, 22 Jun 2024 08:25:58 +0000 (16:25 +0800)]
ci: enable ci for DDR-16GB meles

Signed-off-by: Haaland Chen <haaland@milkv.io>
11 months agoconfigs: add DDR-16GB meles board
Haaland Chen [Sat, 22 Jun 2024 08:25:02 +0000 (16:25 +0800)]
configs: add DDR-16GB meles board

Signed-off-by: Haaland Chen <haaland@milkv.io>
12 months agomeles: add aon config
Han Gao [Thu, 16 May 2024 08:30:10 +0000 (16:30 +0800)]
meles: add aon config

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
12 months agoRevert "fastboot: clean hibernate image when update uboot/kernel/rootfs partition"
Han Gao [Thu, 16 May 2024 05:28:15 +0000 (13:28 +0800)]
Revert "fastboot: clean hibernate image when update uboot/kernel/rootfs partition"

This reverts commit 3a7b5088eef6eed95537e5a5732f9c08095a559e.

12 months agoci: update toolchains
Han Gao [Thu, 16 May 2024 05:19:10 +0000 (13:19 +0800)]
ci: update toolchains

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
12 months agofastboot: clean hibernate image when update uboot/kernel/rootfs partition
xianbing Zhu [Thu, 28 Mar 2024 08:50:45 +0000 (16:50 +0800)]
fastboot: clean hibernate image when update uboot/kernel/rootfs partition

When update version,this commit erase normal hibernate image
and fastresume image.Before this,only fastresume image is erased.
This may caused issue when hibernate image saved before
update version.

Update one of uboot/kernel/rootfs will clean hibernate image.

Signed-off-by: xianbing Zhu <xianbing.zhu@linux.alibaba.com>
Change-Id: I92cd9ccda83f8d1e215e0f8d75e7cf34380a6201

12 months ago1:fix compile warning 2:add aon set magic
钦峰 [Tue, 19 Mar 2024 06:39:48 +0000 (14:39 +0800)]
1:fix compile warning 2:add aon set magic

Change-Id: I511dc51ff71ae9567dcc0b6b91f6bcac1ae61f3b

12 months agoth1520: SPL_TEXT_BASE=0xffe0000000 for nosign spl
Han Gao [Mon, 13 May 2024 06:43:43 +0000 (14:43 +0800)]
th1520: SPL_TEXT_BASE=0xffe0000000 for nosign spl

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
12 months agosync config
Han Gao [Wed, 8 May 2024 06:32:49 +0000 (06:32 +0000)]
sync config

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
12 months agoLinux_SDK_V1.5.4
thead_admin [Fri, 26 Apr 2024 03:07:14 +0000 (03:07 +0000)]
Linux_SDK_V1.5.4

Signed-off-by: thead_admin <occ_thead@service.alibaba.com>
14 months agofix: run gpt_partition failed
Han Gao [Thu, 28 Mar 2024 11:00:40 +0000 (11:00 +0000)]
fix: run gpt_partition failed

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
14 months agoinclude: light-c910.h: add fdtoverlay_addr_r
Haaland Chen [Tue, 26 Mar 2024 13:36:39 +0000 (21:36 +0800)]
include: light-c910.h: add fdtoverlay_addr_r

Signed-off-by: Haaland Chen <haaland@milkv.io>
14 months agofix: remove find partuuid
Han Gao [Fri, 22 Mar 2024 07:22:32 +0000 (07:22 +0000)]
fix: remove find partuuid

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
14 months agofeat: add sdcard boot first
Han Gao [Fri, 22 Mar 2024 07:22:00 +0000 (07:22 +0000)]
feat: add sdcard boot first

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
14 months agoconfigs: meles: use new fdt default name
Haaland Chen [Sat, 16 Mar 2024 12:49:57 +0000 (20:49 +0800)]
configs: meles: use new fdt default name

Since T-HEAD Linux SDK V1.4.2, modified the kernel device tree
naming rules, starting with th1520.

Signed-off-by: Haaland Chen <haaland@milkv.io>
16 months agofeat: add format swap partition for resume
Han Gao [Wed, 31 Jan 2024 08:39:02 +0000 (16:39 +0800)]
feat: add format swap partition for resume

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
16 months agoRevert "fix(c9xx): don't flush dcache when invalidating"
Han Gao [Wed, 31 Jan 2024 05:37:42 +0000 (13:37 +0800)]
Revert "fix(c9xx): don't flush dcache when invalidating"

This reverts commit adec30ace4cebb0554bb246b52eebaf37c1545c4.

16 months agofeat: enable load str firmware
Han Gao [Sat, 27 Jan 2024 12:52:17 +0000 (20:52 +0800)]
feat: enable load str firmware

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
16 months agoAdd tag publish firmware
Han Gao [Sat, 27 Jan 2024 11:11:02 +0000 (11:11 +0000)]
Add tag publish firmware

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
16 months agofix error to written eth1addr
Han Gao [Tue, 23 Jan 2024 16:15:25 +0000 (00:15 +0800)]
fix error to written eth1addr

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
16 months agoci: add lc4a mainline dt name support
Han Gao [Mon, 22 Jan 2024 15:27:00 +0000 (23:27 +0800)]
ci: add lc4a mainline dt name support

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
16 months agoci: add mainline dt name support
Han Gao [Fri, 12 Jan 2024 02:10:44 +0000 (10:10 +0800)]
ci: add mainline dt name support

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
16 months agoworkaround: add delay
Han Gao [Tue, 16 Jan 2024 08:50:14 +0000 (16:50 +0800)]
workaround: add delay

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
16 months agoconfig: enable BOARD_RNG_SEED
Han Gao [Thu, 28 Dec 2023 15:17:05 +0000 (23:17 +0800)]
config: enable BOARD_RNG_SEED

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
16 months agoconfig: update ROW16 to DDP
Han Gao [Thu, 28 Dec 2023 15:08:17 +0000 (23:08 +0800)]
config: update ROW16 to DDP

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
16 months agoLinux_SDK_V1.4.2
thead_admin [Sun, 24 Dec 2023 02:32:03 +0000 (02:32 +0000)]
Linux_SDK_V1.4.2

Signed-off-by: thead_admin <occ_thead@service.alibaba.com>
16 months agoLinux_SDK_V1.3.3
thead_admin [Tue, 14 Nov 2023 01:41:56 +0000 (01:41 +0000)]
Linux_SDK_V1.3.3

Signed-off-by: thead_admin <occ_thead@service.alibaba.com>
17 months agoci: add build for lcon4a & lc4a
Han Gao [Tue, 26 Dec 2023 08:42:47 +0000 (16:42 +0800)]
ci: add build for lcon4a & lc4a

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
17 months agodefconfig: add light_lpi4a_[cluster|console]_defconfig
Lu Hui [Mon, 25 Dec 2023 08:54:20 +0000 (16:54 +0800)]
defconfig: add light_lpi4a_[cluster|console]_defconfig

17 months agodrivers: video: ilitek-ili9881c.c: add long delay panel reset
Lu Hui [Mon, 25 Dec 2023 08:53:41 +0000 (16:53 +0800)]
drivers: video: ilitek-ili9881c.c: add long delay panel reset

17 months agoarch: dts: light-lpi4a: allow pane0 ref by other dts
Lu Hui [Mon, 25 Dec 2023 08:53:07 +0000 (16:53 +0800)]
arch: dts: light-lpi4a: allow pane0 ref by other dts

17 months agodrivers: panel: add panel-mingjun-070bi30ia2
Lu Hui [Mon, 25 Dec 2023 08:34:20 +0000 (16:34 +0800)]
drivers: panel: add panel-mingjun-070bi30ia2

17 months agoci: update toolchains
Han Gao [Wed, 13 Dec 2023 06:13:48 +0000 (14:13 +0800)]
ci: update toolchains

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
17 months agofix(c9xx): don't flush dcache when invalidating
Gilbert Gilb's [Mon, 13 Nov 2023 11:36:24 +0000 (12:36 +0100)]
fix(c9xx): don't flush dcache when invalidating

The data cache invalidation function for c9xx CPUs uses `dcache.cipa`
instruction. According to T-Head extension specification[1] section
3.1.5, this instruction also performs a cache clean along with the
invalidation.

On top of being incorrect, this leads to a serious issue on the
designware ethernet driver, where stalled cache may get flushed each
time we handle a new received packet[2]. As a result, received packet
are randomly corrupted with old cached data. This can easily be
reproduced by sending an ARP request to the device during a TFTP
transfer. The last TFTP block is treated as the ARP reply we just sent,
which makes U-Boot hang on the block.

Always use `dcache.ipa` instruction to invalidate dcache. Replace
existing usages of `dcache.ipa` with our implementation.

Note that this fix is slightly intrusive as it changes the cache
invalidation behavior in all drivers. However, I have not noticed any
side-effect during my tests.

[1] https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.3.0/xthead-2023-11-10-2.3.0.pdf

[2] https://github.com/revyos/thead-u-boot/blob/918a8c89e056e3462031d6a498bb4fcc0c3526ce/drivers/net/designware.c#L475

18 months agoboard: light-c910: update milkv meles iopin initialization status
Haaland Chen [Mon, 11 Dec 2023 12:19:30 +0000 (20:19 +0800)]
board: light-c910: update milkv meles iopin initialization status

Signed-off-by: Haaland Chen <haaland@milkv.io>
18 months agoci: enable ci for meles 4g/8g
Han Gao [Sun, 3 Dec 2023 02:38:24 +0000 (10:38 +0800)]
ci: enable ci for meles 4g/8g

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
18 months agofix: set fdt_default_name for meles 4g/8g
Han Gao [Sun, 3 Dec 2023 02:37:26 +0000 (10:37 +0800)]
fix: set fdt_default_name for meles 4g/8g

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
18 months agoconfigs: add milkv-meles singlerank ddr and dualrank ddr defconfig
Haaland Chen [Thu, 30 Nov 2023 09:00:12 +0000 (17:00 +0800)]
configs: add milkv-meles singlerank ddr and dualrank ddr defconfig

Signed-off-by: Haaland Chen <haaland@milkv.io>
18 months agoriscv: dts: milkv-meles: turn on blue user led
Haaland Chen [Wed, 29 Nov 2023 09:19:18 +0000 (17:19 +0800)]
riscv: dts: milkv-meles: turn on blue user led

Signed-off-by: Haaland Chen <haaland@milkv.io>
18 months agolight-c910: set CONFIG_MISC_INIT_R
Haaland Chen [Wed, 29 Nov 2023 09:18:53 +0000 (17:18 +0800)]
light-c910: set CONFIG_MISC_INIT_R

Signed-off-by: Haaland Chen <haaland@milkv.io>
18 months agoboard: light-c910: add function light_c910_set_gpio_output_high
Haaland Chen [Wed, 29 Nov 2023 09:18:19 +0000 (17:18 +0800)]
board: light-c910: add function light_c910_set_gpio_output_high

Signed-off-by: Haaland Chen <haaland@milkv.io>
18 months agoadd Milk-V Meles board
Haaland Chen [Wed, 29 Nov 2023 07:37:33 +0000 (15:37 +0800)]
add Milk-V Meles board

Signed-off-by: Haaland Chen <haaland@milkv.io>
19 months agoconfigs: fix default dtb file name
Han Gao [Wed, 25 Oct 2023 18:52:22 +0000 (02:52 +0800)]
configs: fix default dtb file name

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
19 months agochore: enable ci for beagle-ahead
Han Gao [Wed, 2 Aug 2023 02:30:16 +0000 (10:30 +0800)]
chore: enable ci for beagle-ahead

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
19 months agochore: sync lpi4a config
Han Gao [Wed, 2 Aug 2023 02:28:05 +0000 (10:28 +0800)]
chore: sync lpi4a config

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
19 months agoUpdate cape header GPIO pinmuxing
Deepak Khatri [Sat, 10 Jun 2023 20:19:32 +0000 (01:49 +0530)]
Update cape header GPIO pinmuxing

19 months agoModify GPIO default status for Beagle Bluetooth uart4 module
Baozhu Zuo [Fri, 9 Jun 2023 10:30:41 +0000 (06:30 -0400)]
Modify GPIO default status for Beagle Bluetooth uart4 module

19 months agoFix SD boot button issue
Deepak Khatri [Wed, 31 May 2023 21:44:33 +0000 (03:14 +0530)]
Fix SD boot button issue

19 months agoUpdate default mikroBus pinmuxing
Deepak Khatri [Sun, 7 May 2023 18:49:35 +0000 (00:19 +0530)]
Update default mikroBus pinmuxing

19 months agoUpdate debug port pinmux
Deepak Khatri [Thu, 13 Apr 2023 12:11:43 +0000 (17:41 +0530)]
Update debug port pinmux

To check if low drive strength is causing problem.

19 months agoPinmux update: PullDown pins
Deepak Khatri [Mon, 10 Apr 2023 17:44:58 +0000 (23:14 +0530)]
Pinmux update: PullDown pins

19 months agoUpdate BeagleV Ahead pinmuxing
Deepak Khatri [Sun, 9 Apr 2023 17:47:10 +0000 (23:17 +0530)]
Update BeagleV Ahead pinmuxing

19 months agobackport of: [PATCH] cmd: pxe: add support for FDT overlays
Robert Nelson [Tue, 14 Feb 2023 22:35:27 +0000 (16:35 -0600)]
backport of: [PATCH] cmd: pxe: add support for FDT overlays

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
19 months agopytest: add sandbox test for "extension" command
Kory Maincent [Tue, 4 May 2021 17:31:23 +0000 (19:31 +0200)]
pytest: add sandbox test for "extension" command

This commit extends the sandbox to implement a dummy
extension_board_scan() function and enables the extension command in
the sandbox configuration. It then adds a test that checks the proper
functionality of the extension command by applying two Device Tree
overlays to the sandbox Device Tree.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
[trini: Limit to running on sandbox]
Signed-off-by: Tom Rini <trini@konsulko.com>
19 months agocmd: add support for a new "extension" command
Kory Maincent [Tue, 4 May 2021 17:31:22 +0000 (19:31 +0200)]
cmd: add support for a new "extension" command

This patch adds a new "extension" command, which aims at detecting
extension boards connected to the hardware platform, and apply the
Device Tree overlays that describe the hardware present on those
extension boards.

In order to enable this mechanism, board-specific code must implement
the extension_board_scan() function that fills in a linked list of
"struct extension", each describing one extension board. In addition,
the board-specific code must select the SUPPORT_EXTENSION_SCAN Kconfig
boolean.

Based on this:

 - "extension scan" makes the generic code call the board-specific
   extension_board_scan() function to retrieve the list of detected
   extension boards.

 - "extension list" allows to list the detected extension boards.

 - "extension apply <number>|all" allows to apply the Device Tree
   overlay(s) corresponding to one, or all, extension boards

The latter requires two environment variables to exist and set one variable
to run:

 - extension_overlay_addr: the RAM address where to load the Device
   Tree overlays

 - extension_overlay_cmd: the U-Boot command to load one overlay.
   Indeed, the location and mechanism to load DT overlays is very setup
   specific.

 - extension_overlay_name: set by the command: the name of the DT which
   will be load during the execution.

When calling the command described in the extension_overlay_cmd
variable, the variable extension_overlay_name will be defined. So a
typical extension_overlay_cmd will look like this:

  extension_overlay_cmd=load mmc 0:1 $extension_overlay_addr /boot/$extension_overlay_name

Here is an example on how to use it:
=> run loadfdt
=> fdt addr $fdtaddr
=> setenv extension_overlay_addr 0x1000
=> setenv extension_overlay_cmd 'load mmc 0:1 ${extension_overlay_addr} /boot/${extension_overlay_name}'
=> extension scan
Found 1 extension board(s).
=> extension apply 0
519 bytes read in 3 ms (168.9 KiB/s)

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Reviewed-by: Maxime Ripard <maxime@cerno.tech>
19 months agofdt_support: move fdt_valid from cmd_fdt.c to fdt_support.c
Kory Maincent [Tue, 4 May 2021 17:31:21 +0000 (19:31 +0200)]
fdt_support: move fdt_valid from cmd_fdt.c to fdt_support.c

Move the fdt_valid function to fdt_support.
This changes allow to be able to test the validity of a devicetree in
other c files.

Update code syntax.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Maxime Ripard <maxime@cerno.tech>
19 months agolight_beagle_defconfig: enable CONFIG_OF_LIBFDT_OVERLAY=y
Robert Nelson [Tue, 14 Feb 2023 17:22:11 +0000 (11:22 -0600)]
light_beagle_defconfig: enable CONFIG_OF_LIBFDT_OVERLAY=y

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
19 months agoModify_GPIO_default_status_for_Beagle_WIFI_BLE_module
Robert Nelson [Thu, 5 Jan 2023 01:13:34 +0000 (19:13 -0600)]
Modify_GPIO_default_status_for_Beagle_WIFI_BLE_module

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
19 months agolight_beagle_defconfig: run savedefconfig
Robert Nelson [Thu, 27 Apr 2023 19:12:29 +0000 (14:12 -0500)]
light_beagle_defconfig: run savedefconfig

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
19 months agofix: ensure flashing img not to lose mac address
Han Gao [Wed, 18 Oct 2023 17:35:17 +0000 (01:35 +0800)]
fix: ensure flashing img not to lose mac address

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
19 months agofastboot: Fix overflow when calculating chunk size
Sean Anderson [Thu, 27 May 2021 16:02:34 +0000 (12:02 -0400)]
fastboot: Fix overflow when calculating chunk size

If a chunk was larger than 4GiB, then chunk_data_sz would overflow and
blkcnt would not be calculated correctly. Upgrade it to a u64 and cast
its multiplicands as well. Also fix bytes_written while we're at it.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
21 months agoinclude: configs: light-c910.h: allow boot partition use other filesystem type
Lu Hui [Wed, 23 Aug 2023 09:53:55 +0000 (17:53 +0800)]
include: configs: light-c910.h: allow boot partition use other filesystem type

21 months agoLinux_SDK_V1.2.1
thead_admin [Mon, 7 Aug 2023 03:22:40 +0000 (11:22 +0800)]
Linux_SDK_V1.2.1

Signed-off-by: thead_admin <occ_thead@service.alibaba.com>
22 months agoUpdate dtb name: add vendor name path to CONFIG_DEFAULT_FDT_FILE
Nekorouter [Tue, 8 Aug 2023 05:32:42 +0000 (13:32 +0800)]
Update dtb name: add vendor name path to CONFIG_DEFAULT_FDT_FILE

22 months agochore: add ums gadget for light-val-a
Han Gao [Tue, 1 Aug 2023 16:50:40 +0000 (00:50 +0800)]
chore: add ums gadget for light-val-a

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
22 months agochore: add 16g ci & modify SYS_PROMPT
Han Gao [Tue, 1 Aug 2023 16:24:16 +0000 (00:24 +0800)]
chore: add 16g ci & modify SYS_PROMPT

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
22 months agoadd default fdt filenames
Icenowy Zheng [Tue, 1 Aug 2023 16:46:29 +0000 (00:46 +0800)]
add default fdt filenames

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Co-Authored-By: Han Gao <gaohan@iscas.ac.cn>
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
22 months agofix 16g dram print
Icenowy Zheng [Wed, 26 Jul 2023 08:41:24 +0000 (16:41 +0800)]
fix 16g dram print

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
22 months agoadd config for 16G board
Icenowy Zheng [Fri, 21 Jul 2023 06:19:49 +0000 (14:19 +0800)]
add config for 16G board

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
22 months agoadd row16 option
Icenowy Zheng [Fri, 21 Jul 2023 06:19:34 +0000 (14:19 +0800)]
add row16 option

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
22 months agofix: disable custom logo
Han Gao [Sat, 29 Jul 2023 20:05:47 +0000 (04:05 +0800)]
fix: disable custom logo

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
22 months agofeat: update SDK1.2.0
Han Gao [Sat, 29 Jul 2023 19:57:28 +0000 (03:57 +0800)]
feat: update SDK1.2.0

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
22 months agoTypo in spl.c
Spacefish [Mon, 24 Jul 2023 15:44:44 +0000 (17:44 +0200)]
Typo in spl.c

Small typo in comment

22 months agoriscv: Fix build against binutils 2.38
Alexandre Ghiti [Mon, 3 Oct 2022 16:07:54 +0000 (18:07 +0200)]
riscv: Fix build against binutils 2.38

The following description is copied from the equivalent patch for the
Linux Kernel proposed by Aurelien Jarno:

>From version 2.38, binutils default to ISA spec version 20191213. This
means that the csr read/write (csrr*/csrw*) instructions and fence.i
instruction has separated from the `I` extension, become two standalone
extensions: Zicsr and Zifencei. As the kernel uses those instruction,
this causes the following build failure:

arch/riscv/cpu/mtrap.S: Assembler messages:
arch/riscv/cpu/mtrap.S:65: Error: unrecognized opcode `csrr a0,scause'
arch/riscv/cpu/mtrap.S:66: Error: unrecognized opcode `csrr a1,sepc'
arch/riscv/cpu/mtrap.S:67: Error: unrecognized opcode `csrr a2,stval'
arch/riscv/cpu/mtrap.S:70: Error: unrecognized opcode `csrw sepc,a0'

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Christian Stewart <christian@paral.in>
Reviewed-by: Rick Chen <rick@andestech.com>
22 months agofix: unknown CSR 'mhcr' (arch/riscv/cpu/c9xx/cpu.c)
Han Gao [Sun, 23 Jul 2023 08:28:03 +0000 (16:28 +0800)]
fix: unknown CSR 'mhcr' (arch/riscv/cpu/c9xx/cpu.c)

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
22 months agofeat: add gcc-12 build
Han Gao [Sun, 23 Jul 2023 08:24:32 +0000 (16:24 +0800)]
feat: add gcc-12 build

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>