Commit graph

75072 commits

Author SHA1 Message Date
andyhu-stf
7a18c2005b
Merge pull request #29 from hal-feng/JH7100_Multimedia_V0.1.0
riscv: dts: starfive: add watchdog node
2022-01-13 21:57:47 +08:00
Hal Feng
0eff880420 riscv: dts: starfive: add watchdog node
Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
2022-01-13 15:31:14 +08:00
andyhu-stf
c84a191009
Merge pull request #28 from shalasaka/JH7100_Multimedia_V0.1.0
riscv: dts: starfive: Modify devicee tree for VisionFive to support W…
2022-01-12 09:27:30 +08:00
Som Qin
8617d86c8d 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-01-11 20:38:22 +08:00
Andy Hu
719e29ac34 dts: fixed libcamera report locaton warning about imx219
Signed-off-by: 123curry <curry.zhang@starfivetech.com>
2022-01-07 20:11:17 +08:00
andyhu-stf
31d6026d57
Merge pull request #27 from shalasaka/JH7100_Multimedia_V0.1.0_for_visionfive
Add starfive visionfive board support at brach JH7100_Multimedia_V0.1.0
2022-01-06 21:11:48 +08:00
Jianlong.Huang
c9954fb33e 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-01-06 10:40:48 +08:00
Som.Qin
f4bbb9dcb2 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-01-05 10:10:40 +08:00
Som.Qin
cee5effc45 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-01-05 09:52:02 +08:00
Tom Rini
4620e2cb54 Convert CONFIG_ID_EEPROM to Kconfig
This converts the following to Kconfig:
   CONFIG_ID_EEPROM

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-04 16:28:47 +08:00
Wei Fu
c204ddb84b 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>
2021-12-30 13:38:04 +08:00
Jianlong.Huang
26e56a202d starfive: add JH7100 VisionFive V1 Support.
Signed-off-by: Jianlong.Huang <jianlong.huang@starfivetech.com>
2021-12-30 13:37:34 +08:00
Walker Chen
3482c7c13c 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>
2021-12-30 13:36:46 +08:00
sw.multimedia
6492303060 TF Image: modify uboot env variable to support booting from tf card
Signed-off-by: sw.multimedia <sw.multimedia@starfivetech.com>
Signed-off-by: Curry Zhang <curry.zhang@starfivetech.com>
2021-09-29 18:52:52 +08:00
yanhong.wang
8ae91040fe drivers/net/phy/marvell: setup LED config for JH7100 EVB 2021-09-29 14:51:22 +08:00
sw.multimedia
fda7eff2db 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>
2021-09-29 14:51:22 +08:00
TekkamanV
7b587f7703 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

The original patch is from 'Bo Li <bo.li@starfivetech.com>':
2021-09-29 14:51:22 +08:00
sw.multimedia
51478b7ab8 starfive(multimedia): Add pwmdac pinctl and keep 0,2,3,45 gpio for i2s to dts 2021-09-29 14:51:22 +08:00
sw.multimedia
d91a48975e starfive(multimedia): apply starfive v4l2 pinctl to dts
Signed-off-by: sw.multimedia <sw.multimedia@starfivetech.com>
2021-09-29 14:51:22 +08:00
sw.multimedia
b9512dffcc starfive: apply the pinctl to dts 2021-09-29 14:51:22 +08:00
sw.multimedia
aa2ef16eb2 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: keithzhao <keith.zhao@starfivetech.com>
Signed-off-by: Curry Zhang <curry.zhang@starfivetech.com>
2021-09-29 14:51:22 +08:00
sw.multimedia
df3814cfb1 starfive: dtsi fix for dma2p 2021-09-29 14:51:22 +08:00
sw.multimedia
a7fcd3962c starfive: Add more audio codecs support in dts 2021-09-29 14:51:22 +08:00
sw.multimedia
ea06b2709a starfive: add clock info in dts for audio 2021-09-29 14:51:21 +08:00
sw.multimedia
4bf6fe6812 starfive: add i2c dev info in dts for audio 2021-09-29 14:51:21 +08:00
TekkamanV
7ba433094e 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
2021-09-29 14:51:21 +08:00
TekkamanV
8ae2abd360 starfive: Porting jh7100-beaglev-starlight.dts from linux
https://github.com/starfive-tech/linux/tree/beaglev
2021-09-29 14:51:21 +08:00
TekkamanV
c3f9ce08df 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>
    Chenjieqin <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>
2021-09-29 14:51:21 +08:00
TekkamanV
4f70f19985 starfive: Add JH7100 MMC driver support
This driver modified from snps_dw_mmc.c

Signed-off-by: TekkamanV <tekkamanv@starfivetech.com>
2021-09-29 14:51:21 +08:00
TekkamanV
98794cf331 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: TekkamanV <tekkamanv@starfivetech.com>
2021-09-29 14:51:21 +08:00
yanhong.wang
c52ead0350 starfive: add OTP driver for jh7100
Signed-off-by: yanhong.wang <yanhong.wang@starfivetech.com>
2021-09-29 14:51:21 +08:00
TekkamanV
e43e6f8469 sifive: make WayEnable can be configured by menuconfig
Signed-off-by:TekkamanV <tekkamanv@starfivetech.com>
2021-09-29 14:51:21 +08:00
TekkamanV
70040b561c sifive_cache: add flush_range func in sifive cache driver
Signed-off-by: TekkamanV <tekkamanv@starfivetech.com>
2021-09-29 14:51:21 +08:00
TekkamanV
ec56b4f5ea cache: add flush_range interface in cache_ops struct
Signed-off-by: TekkamanV <tekkamanv@starfivetech.com>
2021-09-29 14:51:21 +08:00
TekkamanV
d4362d5fab riscv: add reset_misc function (__weak)
Signed-off-by: TekkamanV <tekkamanv@starfivetech.com>
2021-09-29 14:51:21 +08:00
TekkamanV
704f73a31a riscv: Enable SYS_CLK_FREQ config
Signed-off-by: TekkamanV <tekkamanv@starfivetech.com>
2021-09-29 14:51:21 +08:00
TekkamanV
208c40be4e riscv: Enable SYS_MALLOC_LEN config
Signed-off-by: TekkamanV <tekkamanv@starfivetech.com>
2021-09-29 14:51:21 +08:00
TekkamanV
0be5e629b8 riscv: add #define in asm/io.h for cadence_qspi_apb.c
Signed-off-by: TekkamanV <tekkamanv@starfivetech.com>
2021-09-29 14:51:21 +08:00
yanhong.wang
4d50242613 mtd: Add SPI Nor Flash chip GD25LQ256D ID
Signed-off-by: yanhong.wang <yanhong.wang@starfivetech.com>
2021-09-29 14:51:21 +08:00
Tom Rini
b5d7a200a8 Merge branch '2021-09-28-regression-fixes'
- Reintroduce creating internally the "nor%d" style names, in order to
  fix some use U-Boot use-cases involving the "mtd" command.
- Fix a regression over the default SPI bus mode shown by having the
  compiled default actually start being used.  The correct default here
  is 0.
- Fix ethernet on imx7d-sdb
- Fix a regression with MTD NAND devices when OF_LIVE is enabled
2021-09-28 13:57:56 -04:00
Rasmus Villemoes
24ea366add imx: imx7d-sdb: fix ethernet, sync .dts with linux
Commit 0d52bab46 (mx7dsabre: Enable DM_ETH) changed these flags from 0
(aka GPIO_ACTIVE_HIGH) to GPIO_ACTIVE_LOW. It claimed to "Also sync
device tree with v5.5-rc1", but in the linux tree, these gpios have
always been GPIO_ACTIVE_HIGH ever since this node was introduced
around v4.13 (linux commit 184f39b5).

I'm guessing that the reason for the GPIO_ACTIVE_LOW was to work
around the behaviour of the soft-spi driver back then, which
effectively defaulted to spi-mode 3 and not 0. That was arguably a bug
in the soft-spi driver, which then got fixed in 0e146993bb (spi: add
support for all spi modes with soft spi), but that commit then broke
ethernet on this board.

Fix it by setting the gpios as active high, which as a bonus actually
brings us in sync with the .dts in the linux source tree.

Without this, one gets

    Net:   Could not get PHY for FEC0: addr 0
    No ethernet found.

With this, ethernet (at least ping and tftp) works as expected from
the U-Boot shell.

Cc: Fabio Estevam <festevam@gmail.com>
Cc: Joris Offouga <offougajoris@gmail.com>
Cc: "Christian Bräuner Sørensen" <yocto@bsorensen.net>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2021-09-28 12:03:21 -04:00
Patrice Chotard
b8919eaa68 mtd: nand: raw: convert nand_dt_init() to ofnode_xx() interface
nand_dt_init() is still using fdtdec_xx() interface.
If OF_LIVE flag is enabled, dt property can't be get anymore.
Updating all fdtdec_xx() interface to ofnode_xx() to solve this issue.

For doing this, node parameter type must be ofnode.

First idea was to convert "node" parameter to ofnode type inside
nand_dt_init() using offset_to_ofnode(node). But offset_to_ofnode()
is not bijective, in case OF_LIVE flag is enabled, it performs an assert().

So, this leads to update nand_chip struct flash_node field from int to
ofnode and to update all nand_dt_init() callers.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-09-28 12:03:21 -04:00
Marek Vasut
b81ce79df0 mtd: spi: Set CONFIG_SF_DEFAULT_MODE default to 0
Before e2e95e5e25 ("spi: Update speed/mode on change") most systems
silently defaulted to SF bus mode 0. Now the mode is always updated,
which causes breakage. It seems most SF which are used as boot media
operate in bus mode 0, so switch that as the default.

This should fix booting at least on Altera SoCFPGA, ST STM32, Xilinx
ZynqMP, NXP iMX and Rockchip SoCs, which recently ran into trouble
with mode 3. Marvell Kirkwood and Xilinx microblaze need to be checked
as those might need mode 3.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Aleksandar Gerasimovski <aleksandar.gerasimovski@hitachi-powergrids.com>
Cc: Andreas Biessmann <andreas@biessmann.org>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Valentin Longchamp <valentin.longchamp@hitachi-powergrids.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
2021-09-28 12:03:21 -04:00
Patrick Delaunay
a4f2d83414 mtd: spi: nor: force mtd name to "nor%d"
Force the mtd name of spi-nor to "nor" + the driver sequence number:
"nor0", "nor1"... beginning after the existing nor devices.

This patch is coherent with existing "nand" and "spi-nand"
mtd device names.

When CFI MTD NOR device are supported, the spi-nor index is chosen after
the last CFI device defined by CONFIG_SYS_MAX_FLASH_BANKS.

When CONFIG_SYS_MAX_FLASH_BANKS_DETECT is activated, this config
is replaced by to cfi_flash_num_flash_banks in the include file
mtd/cfi_flash.h.

This generic name "nor%d" can be use to identify the mtd spi-nor device
without knowing the real device name or the DT path of the device,
used with API get_mtd_device_nm() and is used in mtdparts command.

This patch also avoids issue when the same NOR device is present 2 times,
for example on STM32MP15F-EV1:

STM32MP> mtd list
SF: Detected mx66l51235l with page size 256 Bytes, erase size 64 KiB, \
total 64 MiB

List of MTD devices:
* nand0
  - type: NAND flash
  - block size: 0x40000 bytes
  - min I/O: 0x1000 bytes
  - OOB size: 224 bytes
  - OOB available: 118 bytes
  - ECC strength: 8 bits
  - ECC step size: 512 bytes
  - bitflip threshold: 6 bits
  - 0x000000000000-0x000040000000 : "nand0"
* mx66l51235l
  - device: mx66l51235l@0
  - parent: spi@58003000
  - driver: jedec_spi_nor
  - path: /soc/spi@58003000/mx66l51235l@0
  - type: NOR flash
  - block size: 0x10000 bytes
  - min I/O: 0x1 bytes
  - 0x000000000000-0x000004000000 : "mx66l51235l"
* mx66l51235l
  - device: mx66l51235l@1
  - parent: spi@58003000
  - driver: jedec_spi_nor
  - path: /soc/spi@58003000/mx66l51235l@1
  - type: NOR flash
  - block size: 0x10000 bytes
  - min I/O: 0x1 bytes
  - 0x000000000000-0x000004000000 : "mx66l51235l"

The same mtd name "mx66l51235l" identify the 2 instances
mx66l51235l@0 and mx66l51235l@1.

This patch fixes a ST32CubeProgrammer / stm32prog command issue
with nor0 target on STM32MP157C-EV1 board introduced by
commit b7f060565e ("mtd: spi-nor: allow registering multiple MTDs when
DM is enabled").

Fixes: b7f060565e ("mtd: spi-nor: allow registering multiple MTDs when DM is enabled")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
[trini: Add <dm/device.h> to <mtd.h> for DM_MAX_SEQ_STR]
Signed-off-by: Tom Rini <trini@konsulko.com>
2021-09-28 12:03:20 -04:00
Patrick Delaunay
b218f865e8 mtd: cfi_flash: use cfi_flash_num_flash_banks only when supported
When CONFIG_SYS_MAX_FLASH_BANKS_DETECT is activated,
CONFIG_SYS_MAX_FLASH_BANKS is replaced by cfi_flash_num_flash_banks,
but this variable is defined in drivers/mtd/cfi_flash.c, which is
compiled only when CONFIG_FLASH_CFI_DRIVER is activated, in U-Boot
or in SPL when CONFIG_SPL_MTD_SUPPORT is activated.

This patch deactivates this feature CONFIG_SYS_MAX_FLASH_BANKS_DETECT
when flash cfi driver is not activated to avoid compilation issue in
the next patch, when CONFIG_SYS_MAX_FLASH_BANKS is used in spi_nor_scan().

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2021-09-28 08:35:19 -04:00
Tom Rini
0b9bcf665c Prepare v2021.10-rc5
Signed-off-by: Tom Rini <trini@konsulko.com>
2021-09-27 09:34:20 -04:00
Tom Rini
78c16a969f Merge https://source.denx.de/u-boot/custodians/u-boot-marvell
- turris_omnia: fix leaked mtd device (Marek)
- phy: marvell: cp110: Fix SATA invert polarity (Denis)
2021-09-27 07:41:03 -04:00
Denis Odintsov
ccee8ea1dd phy: marvell: cp110: Support SATA invert polarity
In commit b24bb99d cp110 configuration initially done in u-boot
was removed and delegated to atf firmware as smc call.
That commit didn't account for later introduced in d13b740c SATA invert polarity support.

This patch adds support of passing SATA invert polarity flags to atf
firmware during the smc call.

Signed-off-by: Denis Odintsov <shiva@mail.ru>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Rabeeh Khoury <rabeeh@solid-run.com>
Cc: Stefan Roese <sr@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-09-27 07:46:13 +02:00
Marek Behún
0ef476e68e arm: mvebu: turris_omnia: fix leaked mtd device
After getting MTD device via get_mtd_device_nm(), we need to put it with
put_mtd_device(), otherwise we get

  Removing MTD device #0 (mx25l6405d) with use count 1

before booting kernel.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Pali Rohár <pali@kernel.org>
Tested-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-09-27 07:41:45 +02:00
Tom Rini
76ad024683 Pull request for efi-2021-10-rc5
Documentation:
 
 * add /config bindings to HTML documentation
 
 UEFI
 
 * Fix number_of_algorithms field in TCG EFI Protocol
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEK7wKXt3/btL6/yA+hO4vgnE3U0sFAmFQCsEACgkQhO4vgnE3
 U0vPzA/9FShpcSFLmAhxCmKlo8SZ/hc1a3NpnJj9MfC1EAVfc+BGc3W8DDKniw1A
 Cl33Sdt7Vm3jKJ9wgUJ8P46SG3bJ6KZOZ9wGyW6WzgGsvxzxaEfX5WVRAQVMj949
 UO9uqjGhEW2gjVpe6B+LTWZ90ZA6e/m4X+17nkXWoOKThiDQCB2VVOxg4RrAPHXZ
 Z71J8vui0ZCxB7CXH2X3cu5XNZ9wI1edhth2oe+tr/Etp+EXO0ONF/cS+Kgfin7F
 F2K6+n7GVGUmeW/Cf2qXyHbH8IsugALFcZWOXDcz1p9YoLjMiN/XDyEESBBuNl74
 VlV4+FlgOX/UZ/PnjAtnWseZGehj3P2cXKPer+GNOPqnuQrnU6Upfl3GIOcTEnkp
 JGCttkkvIkwvmD7+4Wr6zBLmv+WQfodMjNCN4dE94bPhiosDJ6url6YNcIt5flS4
 OYbmOworo+NLoUWh6/FTE/dHwKdnkzccV9nR36ujMdhjh4RE2tejjleLiWOzsvoF
 sqsGY3VOc4II4KywLsjb9S39esRbI5BzuOV7XLIv7/XzvKPhYJy0MRRkLPowLGSR
 H0R7cFsaBGBtkD+7xP3Ew8hk7/S/KQO4dCjeG9YwBbGYSOeK+t/j8eZCVR+BdzXI
 MG6Xnv2LqTj8QiXQ3N8Ko5esBEh10cEQh+j4riZNWy9t0gCqctk=
 =3J1S
 -----END PGP SIGNATURE-----

Merge tag 'efi-2021-10-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2021-10-rc5

Documentation:

* add /config bindings to HTML documentation

UEFI

* Fix number_of_algorithms field in TCG EFI Protocol
2021-09-26 14:15:14 -04:00