Commit graph

77873 commits

Author SHA1 Message Date
jianlong.huang
ccecef294d Merge branch 'CR_1037_sd_nosave_jianlong' into 'JH7100_VisionFive_OH_dev'
CR_1037 configs: starfive-jh7100: Add default bootargs

See merge request jh7100/u-boot!5
2022-06-06 06:33:12 +00:00
Jianlong Huang
caffbef21c configs: starfive-jh7100: Add default bootargs
because delete linux cmdline cause eth0 don't work, it should work on chain_mode=1, so compromise to set bootargs in uboot

Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
2022-06-01 08:37:41 +08:00
jianlong.huang
48e83a7af5 add starfive timer init
Signed-off-by: jianlong.huang <jianlong.huang@starfivetech.com>
2022-04-27 10:29:05 +08:00
jianlong.huang
e095428f8a Merge branch 'CR_703_commitinfo_jianlong' into 'JH7100_VisionFive_devel'
scripts/setlocalversion: add tag info

See merge request jh7100/u-boot!3
2022-03-12 04:31:19 +00:00
jianlonghuang
0362ea4407 Resolved issue #703 add tag info
Signed-off-by: jianlonghuang <jianlong.huang@starfivetech.com>
2022-03-09 15:00:25 +08:00
walker.chen
909b33e2d1 Merge branch 'CR-636-SD-jianlong' into 'JH7100_VisionFive_devel'
resoved issue #636 sd compatibility

See merge request jh7100/u-boot!2
2022-03-07 09:32:41 +00:00
jianlonghuang
55da63229f resoved issue #636 sd compatibility
Signed-off-by: jianlonghuang <jianlong.huang@starfivetech.com>
2022-03-07 09:21:25 +08:00
Hal Feng
ef571fcead riscv: dts: starfive: add watchdog node
Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2022-02-15 17:48:26 +08:00
Som Qin
ca3cac173d riscv: dts: starfive: Modify devicee tree for VisionFive to support WM8960 daughter board
Modify the gpio node to keep i2s pins state.

Signed-off-by: Som Qin <som.qin@starfivetech.com>
2022-02-15 17:48:26 +08:00
Andy Hu
ce5f9c9455 dts: fixed libcamera report locaton warning about imx219
Signed-off-by: 123curry <curry.zhang@starfivetech.com>
2022-02-15 17:48:26 +08:00
Som.Qin
119a5f75e5 starfive: Fix the compile issue of starfive ID_EEPROM
The issue:
Error: You must add new CONFIG options using Kconfig
The following new ad-hoc CONFIG options were detected:
CONFIG_STARFIVE_EEPROM_ATOM1_PSTR
CONFIG_STARFIVE_EEPROM_ATOM1_PSTR_SIZE
CONFIG_STARFIVE_EEPROM_ATOM1_SN_OFFSET
CONFIG_STARFIVE_EEPROM_ATOM1_VSTR
CONFIG_STARFIVE_EEPROM_ATOM1_VSTR_SIZE
CONFIG_STARFIVE_EEPROM_HATS_SIZE_MAX
CONFIG_STARFIVE_EEPROM_WP_OFFSET

Signed-off-by: Som.Qin <som.qin@starfivetech.com>
2022-02-15 17:48:26 +08:00
Som.Qin
a5811ee9da starfive: apply VisionFive board changes
The VisionFive dts is base on Starlight dts, and the difference of
rst gpio, eeprom and gmac should be applied.

Signed-off-by: Som.Qin <som.qin@starfivetech.com>
2022-02-15 17:48:26 +08:00
Wei Fu
d434b5243d starfive: add ID_EEPROM supoort for visionfive V1
This patch add ID_EEPROM (mac command) support for visionfive V1.

Signed-off-by: Wei Fu <wefu@redhat.com>
2022-02-15 17:48:26 +08:00
Jianlong Huang
8bd2d61d93 configs: starfive: update jh7100.h for importing u74_uEnv.txt for testing
Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
2022-02-15 17:48:25 +08:00
Yanhong Wang
2a7a9c34bd drivers/net/phy/marvell: setup LED config for JH7100 EVB 2022-02-15 17:48:25 +08:00
SW Multimedia
dd19b77c45 starfive: GPIO pin init
This patch should be removed, once we can do GPIO pin init
in secondboot or ddrinit

Include:
starfive: Add init GPIO for ALSA audio framework
starfive: remove useless gpio operation

Signed-off-by: sw.multimedia <sw.multimedia@starfivetech.com>
Signed-off-by: michael.yan <michael.yan@starfivetech.com>
Signed-off-by: andy.hu <andy.hu@starfivetech.com>
2022-02-15 17:48:25 +08:00
Bo Li
f51ecad0d1 starfive: Modify designware driver for JH7100
This patch is using internal RAM to improve performance
(avoid flushing L2 cache): Modify designware driver by:
1, Modify gtxclk configuration by phydev->speed
2, Add Preseted mem support for mac descrtables and buffs
3, disable DMA memory range check when building for JH7100
2022-02-15 17:48:25 +08:00
Tekkaman Ninja
0b5dbb97f1 [TEMP]jh7100: remove "depends on DM_ETH || !NET" in EFI_LOADER
This patch reverses some part of change in:
        commit eac6e0b797
        Author: Simon Glass <sjg@chromium.org>
        Date:   Fri Sep 24 18:30:17 2021 -0600
        efi_loader: Drop code that doesn't work with driver model
        ...
Since JH7100 ETH driver haven't supported DM yet.
2022-02-15 17:48:25 +08:00
SW Multimedia
73009927d3 starfive(multimedia): Add pwmdac pinctl and keep 0,2,3,45 gpio for i2s to dts 2022-02-15 17:48:25 +08:00
SW Multimedia
473071c093 starfive(multimedia): apply starfive v4l2 pinctl to dts
Signed-off-by: SW Multimedia <sw.multimedia@starfivetech.com>
2022-02-15 17:48:25 +08:00
SW Multimedia
5d5ed576bd starfive: apply the pinctl to dts 2022-02-15 17:48:25 +08:00
Andy Hu
99efb19539 starfive: Add v4l2 video sensor device and DRM framework in dts
Signed-off-by: SW Multimedia <sw.multimedia@starfivetech.com>
Signed-off-by: Andy Hu <andy.hu@starfivetech.com>
Signed-off-by: David Li <david.li@starfivetech.com>
Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
Signed-off-by: Curry Zhang <curry.zhang@starfivetech.com>
2022-02-15 17:48:25 +08:00
SW Multimedia
e92f77ff23 starfive: dtsi fix for dma2p 2022-02-15 17:48:25 +08:00
SW Multimedia
5ab85f9d11 starfive: Add more audio codecs support in dts 2022-02-15 17:48:25 +08:00
SW Multimedia
615976b480 starfive: add clock info in dts for audio 2022-02-15 17:48:25 +08:00
SW Multimedia
6ca4c6e60b starfive: add i2c dev info in dts for audio 2022-02-15 17:48:25 +08:00
Jianlong.Huang
036f72e637 starfive: add JH7100 VisionFive V1 Support.
Signed-off-by: Jianlong.Huang <jianlong.huang@starfivetech.com>
2022-02-15 17:48:25 +08:00
Wei Fu
1356a825d9 starfive: fix dts(linux)
1, ccache
2, mmc
    This patch adds the necessary info for mmc driver:
    bus-width = <4>;
    max-frequency = <?0000000>;

3, uart0(console)
4, SPI Nor Flash
5, Switch dtb to linux dts
2022-02-15 17:48:25 +08:00
Emil Renner Berthing
724d2a288a starfive: Porting jh7100-beaglev-starlight.dts from linux
https://github.com/starfive-tech/linux
2022-02-15 17:48:25 +08:00
Micheal Zhu
6d3fbb8c00 starfive: Add JH7100 support
This patch adds StarFive JH7100 main support, including Starlight and EVB
support, ported from StarFive HiFive_U-Boot REPO.

    The original authors are
    Bo Li <bo.li@starfivetech.com>
    JieQin Chen <Jessica.Chen@starfivetech.com>
    Huan Feng <huan.feng@starfivetech.com>
    Jack Zhu <jack.zhu@starfivetech.com>
    Jianlong Huang <jianlong.huang@starfivetech.com>
    Ke Zhu <ke.zhu@starfivetech.com>
    Micheal Zhu <michael.zhu@starfivetech.com>
    Samin Guo <samin.guo@starfivetech.com>
    Yanhong Wang <yanhong.wang@starfivetech.com>
    Yiming Li <yiming.li@starfivetech.com>

Note:
    1, disable BTRFS(will trigger a link error with *some* RV64 GCC)
    But RV64 GCC on Fedora works well with enabling BTRFS.

    BTRFS will select ZSTD which will trigger a link error with
    *some* RV64 GCC:
    ---
    riscv64-unknown-linux-gnu-ld.bfd: /usr/lib/gcc/riscv64-unknown-linux-gnu/11.2.0/libgcc.a(_clzsi2.o): can't link double-float modules with soft-float modules
    riscv64-unknown-linux-gnu-ld.bfd: failed to merge target specific data of file /usr/lib/gcc/riscv64-unknown-linux-gnu/11.2.0/libgcc.a(_clzsi2.o)
    riscv64-unknown-linux-gnu-ld.bfd: /usr/lib/gcc/riscv64-unknown-linux-gnu/11.2.0/libgcc.a(_clz.o): can't link double-float modules with soft-float modules
    riscv64-unknown-linux-gnu-ld.bfd: failed to merge target specific data of file /usr/lib/gcc/riscv64-unknown-linux-gnu/11.2.0/libgcc.a(_clz.o)
    make: *** [Makefile:1787: u-boot] Error 1
    ---

    2, enable OF_SEPARATE:
    This is required so that openSBI can add itself to /reserved-memory, and
    let EFI know about it.

    By Andreas Schwab <schwab@suse.de>

    3, Set default fdtfile name

    By Andreas Schwab <schwab@suse.de>
2022-02-15 17:48:25 +08:00
Wei Fu
4954df51e4 starfive: Add JH7100 MMC driver support
This driver modified from snps_dw_mmc.c

Signed-off-by: Wei Fu <wefu@redhat.com>
2022-02-15 17:48:24 +08:00
Wei Fu
d39e78ba61 starfive: add JH71x0 serial driver
This driver ported from NS16550 Serial Port driver, It is a simplified
version of drivers/serial/ns16550.c
We may can merge it to ns16550 later.

Signed-off-by: Wei Fu <wefu@redhat.com>
2022-02-15 17:48:24 +08:00
Yanhong Wang
c71bf24ac3 starfive: add OTP driver for jh7100
Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
2022-02-15 17:48:24 +08:00
Wei Fu
b3f2cfad94 sifive: make WayEnable can be configured by menuconfig
Signed-off-by:Wei Fu <wefu@redhat.com>
2022-02-15 17:48:24 +08:00
Wei Fu
954644d8f5 sifive_cache: add flush_range func in sifive cache driver
Signed-off-by: Wei Fu <wefu@redhat.com>
2022-02-15 17:48:24 +08:00
Wei Fu
28db513a7d cache: add flush_range interface in cache_ops struct
Signed-off-by: Wei Fu <wefu@redhat.com>
2022-02-15 17:48:24 +08:00
Wei Fu
ae8609677b riscv: add reset_misc function (__weak)
Signed-off-by: Wei Fu <wefu@redhat.com>
2022-02-15 17:48:24 +08:00
Jianlong.Huang
803349d956 cmd/eeprom: fix data type issue for parse_numeric_param
This patch fixs parse_numeric_param issue on some platfrom which has
different sizes of int and long, like riscv64.

On riscv64, int is 4 bytes, but long is 8 bytes.

on this situation:
ulong addr = parse_numeric_param(argv[index]);

if argv[index] is "0x80000000", this "ulong addr" will be
0xffffffff80000000.

Signed-off-by: Jianlong.Huang <jianlong.huang@starfivetech.com>
Co-developed-by: Wei Fu <wefu@redhat.com>
Signed-off-by: Wei Fu <wefu@redhat.com>
2022-02-15 17:48:24 +08:00
Walker Chen
4793fbc0f0 net/phy: add YuTai Corp Ethernet PHYs(YT8511/YT8521) driver
This pathch adds YuTai Corp Ethernet PHYs(YT8511/YT8521) support.

Signed-off-by: Walker Chen <walker.chen@starfivetech.com>
2022-02-15 17:48:24 +08:00
Tom Rini
ab8903a24d configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-02-14 22:21:29 +00:00
Tom Rini
8a4ef8786f Prepare v2022.04-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-02-14 17:03:08 -05:00
Tom Rini
139e049732 Merge branch '2022-02-14-assorted-fixes'
- Fix for pstore already being in the DT, "setlocalversion" script
  bugfix and pdu001 platform bugfix
2022-02-14 14:18:45 -05:00
Felix Brack
9f0deae6d5 arm: pdu001: Fix dt to work with the current am33xx dtsi files
The changes introduced with commit 6337d53fdf ("arm: dts: sync am33xx
with Linux 5.9-rc7") prevent the PDU001 from operating correctly.
This patch fixes the configuration of the pin multiplexer and uart3.

Signed-off-by: Felix Brack <fb@ltec.ch>
2022-02-14 13:04:39 -05:00
Nikita Maslov
609177140b scripts: setlocalversion: remove quotes around localversion from config
After replacing of include/config/auto.conf sourcing with
extraction of CONFIG_LOCALVERSION, resulting version string
contains quotes around localversion part which are always
present in auto.conf (even if localversion is empty).

This patch fixes this script to remove quotes.

Signed-off-by: Nikita Maslov <wkernelteam@gmail.com>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-14 13:04:39 -05:00
Detlev Casanova
ac52cba63f pstore: Support already existing reserved-memory node
The pstore command tries to create a reserved-memory node but fails if
it is already present with:

    Add 'reserved-memory' node failed: FDT_ERR_EXISTS

This patch creates the node only if it does not exist and adapts the reg
values sizes depending on already present #address-cells and #size-cells
values.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
2022-02-14 13:03:49 -05:00
Tom Rini
162c22bfbc Pull request for efi-2022-04-rc2-4
Documentation:
 
 * mkeficapsule man-page
 
 UEFI changes:
 
 * add support for signing images to mkeficapsule
 * add support for user define capsule GUID
 * adjust unit tests for capsules
 * fix UEFI image signature validation in case of multiple signatures
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmIGtKEACgkQxIHbvCwF
 GsSWlg//Vr61dpbpPVuczl18OtojpUzMg8bwqc4tJQRQrOGMGjmPqrGZJCm1pmMH
 Q5ZD4QCAdycbRqAqcpdX9FXHmD5R0HvGmhlC9TnXxo4nKaOcphMMC3PFjBQZlhPJ
 KPc7jjoIcycz+fRqbd4CGRFXNGJAecK++4uM6v6WCNF3Dq16r0ws1aUTG7YPlaJF
 JNo3/4eEQpRsplNXpJsqVPQhbfLuaiCOJc8VUWYNylRdhBC7Dx8yI7m1FHOSBbKb
 Pk4tbysEhowcSc2Duc9muxkaVAkSy/mIHj1I8Z2VzpzH8zXcaiHMjROqMGOE+vwx
 raDzJI0ZcEV/MEbm/QLCALlCKqN3d1NRmZLAvXPYN4+ioA8lzPAEnqEywXRPY/Yk
 KnkDWaF1KEKzDaY52oqkh2LkasY9wzluvb1sm+oW9bh/kn4wKLr0Z1oSl92/vvci
 S/ztLqxhqlXpWx0NzOFnNvUUkEl0VN6IM/+Bsg5AoO7mdWe7MC3iSPOU1Ge5wRU9
 R9BLaTrr61/+soc2jrJL5PQr3Rqtyo1qLpIusMFT88jeFp0b8AIUL2AUlJsAUXYg
 a2NV7qGUsZN/Ur488N1t7DixTkjGdStHKRk06bSTPrOpfA2oembdA2/H/HECoJMP
 JzdwMeZM0qcxFGTbC7c3yO3cTVVYPyIDGh1YEBYjCzfL6AuR2uU=
 =AAdJ
 -----END PGP SIGNATURE-----

Merge tag 'efi-2022-04-rc2-4' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2022-04-rc2-4

Documentation:

* mkeficapsule man-page

UEFI changes:

* add support for signing images to mkeficapsule
* add support for user define capsule GUID
* adjust unit tests for capsules
* fix UEFI image signature validation in case of multiple signatures
2022-02-11 15:11:52 -05:00
Ilias Apalodimas
72b509b701 test/py: efi_secboot: adjust secure boot tests to code changes
The previous patch is changing U-Boot's behavior wrt certificate based
binary authentication.  Specifically an image who's digest of a
certificate is found in dbx is now rejected.  Fix the test accordingly
and add another one testing signatures in reverse order

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-02-11 20:07:55 +01:00
Ilias Apalodimas
54cebe8a3a efi_loader: fix dual signed image certification
The EFI spec allows for images to carry multiple signatures. Currently
we don't adhere to the verification process for such images.

The spec says:
"Multiple signatures are allowed to exist in the binary's certificate
table (as per PE/COFF Section "Attribute Certificate Table"). Only one
hash or signature is required to be present in db in order to pass
validation, so long as neither the SHA-256 hash of the binary nor any
present signature is reflected in dbx."

With our current implementation signing the image with two certificates
and inserting both of them in db and one of them dbx doesn't always reject
the image.  The rejection depends on the order that the image was signed
and the order the certificates are read (and checked) in db.

While at it move the sha256 hash verification outside the signature
checking loop, since it only needs to run once per image and get simplify
the logic for authenticating an unsigned imahe using sha256 hashes.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-02-11 20:07:55 +01:00
AKASHI Takahiro
e012550cd7 test/py: efi_capsule: check the results in case of CAPSULE_AUTHENTICATE
Before the capsule authentication is supported, this test script works
correctly, but with the feature enabled, most tests will fail due to
unsigned capsules.
So check the results depending on CAPSULE_AUTHENTICATE or not.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-11 20:07:55 +01:00
AKASHI Takahiro
e9b74979b4 test/py: efi_capsule: add a test for "--guid" option
This test scenario tests a new feature of mkeficapsule, "--guid" option,
which allows us to specify FMP driver's guid explicitly at the command
line.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2022-02-11 20:07:55 +01:00