]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
5 months agocmd: add resize for FDT in bootelf
Maxim Moskalets [Fri, 28 Jun 2024 08:34:11 +0000 (11:34 +0300)]
cmd: add resize for FDT in bootelf

In some FDTs, there is not enough free memory to add nodes, so this
operation fails.

Signed-off-by: Maxim Moskalets <maximmosk4@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 months agogpt: allow spaces in partition list
Mikhail Kshevetskiy [Thu, 27 Jun 2024 11:29:04 +0000 (14:29 +0300)]
gpt: allow spaces in partition list

This allows spliting partition list to several lines in environment file

ex:
--------------------
gpt_partition_list=
name=boot1,size=5MiB,start=0x100000;
name=boot2,size=5MiB;
name=rootfs1,size=70MiB;
name=rootfs2,size=70MiB;
name=overlay1,size=20MiB;
name=overlay2,size=20MiB;
name=art,size=4MiB;

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Tested-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 months agoMerge patch series "mediatek: cumulative trivial fix for OF_UPSTREAM support"
Tom Rini [Mon, 8 Jul 2024 17:56:59 +0000 (11:56 -0600)]
Merge patch series "mediatek: cumulative trivial fix for OF_UPSTREAM support"

Christian Marangi <ansuelsmth@gmail.com> says:

This is an initial series that have all the initial trivial
fixes required for usage of OF_UPSTREAM for the mediatek SoC

This also contains the pcie-gen3 driver and the required tphy
support driver to make it work.

Subsequent series will follow with conversion of the mtk-clk
to permit usage of OF_UPSTREAM and upstream clk ID.

MT7981, MT7986 and MT7988 migration to upstream clock ID
is complete and working on MT7623.

Series CI tested with PR: https://github.com/u-boot/u-boot/pull/590

5 months agoclk: mediatek: mt7986: support alternative compatible for fixed-plls
Christian Marangi [Mon, 24 Jun 2024 21:03:40 +0000 (23:03 +0200)]
clk: mediatek: mt7986: support alternative compatible for fixed-plls

Support alternative compatible for fixed-plls clocks used upstream with
the compatible mediatek,mt7986-apmixedsys.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoclk: mediatek: mt7988: support alternative compatible for fixed-plls
Christian Marangi [Mon, 24 Jun 2024 21:03:39 +0000 (23:03 +0200)]
clk: mediatek: mt7988: support alternative compatible for fixed-plls

Support alternative compatible for fixed-plls clocks used upstream with
the compatible mediatek,mt7988-apmixedsys.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agopci: mediatek: make pcie-phy optional for gen3
Christian Marangi [Mon, 24 Jun 2024 21:03:38 +0000 (23:03 +0200)]
pci: mediatek: make pcie-phy optional for gen3

Set pcie-phy optional for PCIe gen3. MT7988 doesn't require it and
making it mandatory prevent the driver to correctly probe.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agopinctrl: mediatek: mt7981: init device before relocation
Christian Marangi [Mon, 24 Jun 2024 21:03:37 +0000 (23:03 +0200)]
pinctrl: mediatek: mt7981: init device before relocation

Upstream kernel linux define pinctrl for uart0, hence this pin group
and pinctrl driver is needed before relocation. Add DM_FLAG_PRE_RELOC
flag to init and mute mtk_serial error on early serial init.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agopinctrl: mediatek: add support for gpio-controller property in root node
Christian Marangi [Mon, 24 Jun 2024 21:03:36 +0000 (23:03 +0200)]
pinctrl: mediatek: add support for gpio-controller property in root node

Add support for gpio-controller property in root pinctrl node.
This is to follow upstream linux DTSI that doesn't define the
gpio-controller and cells in dedicated nodes.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoclk: mediatek: mt7981: support alternative compatible for fixed-plls
Christian Marangi [Mon, 24 Jun 2024 21:03:35 +0000 (23:03 +0200)]
clk: mediatek: mt7981: support alternative compatible for fixed-plls

Support alternative compatible for fixed-plls clocks used upstream with
the compatible mediatek,mt7981-apmixedsys.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agommc: mediatek: add support for upstream linux clock and property
Christian Marangi [Mon, 24 Jun 2024 21:03:34 +0000 (23:03 +0200)]
mmc: mediatek: add support for upstream linux clock and property

Add support for upstream linux clock and map U-Boot property to the one
use in upstream linux where supported.

Also add handling for the use_internal_cd that on upstream is hardcoded
enabled on mt7620.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoserial: mediatek: add special handling for highspeed and linux compat
Christian Marangi [Mon, 24 Jun 2024 21:03:33 +0000 (23:03 +0200)]
serial: mediatek: add special handling for highspeed and linux compat

Upstream linux serial driver use a different logic to setup serial regs.

They have 2 interval:
- < 115200 we use lowspeed regs and 16 * baud
- >= 115200 we use highspeed

We currently use force_highspeed property to force usage of highspeed
regs even with low baud rate.

Add special handling if the upstream compatible is used where we just
apply the same interval with anything >= 115200 in highspeed simulating
force_highspeed.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoserial: mediatek: add support for bus clock and enable it
Christian Marangi [Mon, 24 Jun 2024 21:03:32 +0000 (23:03 +0200)]
serial: mediatek: add support for bus clock and enable it

Upstream linux also provide the additional optional bus clock.

Add support for it and also enable the baud and bus clock on probe.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoi2c: mediatek: add support for optional arb and pmic clock
Christian Marangi [Mon, 24 Jun 2024 21:03:31 +0000 (23:03 +0200)]
i2c: mediatek: add support for optional arb and pmic clock

Add support for optional arb and pmic clock for i2c provided in upstream
linux DTSI.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 months agonet: mediatek: handle alternative name for pn_swap property
Christian Marangi [Mon, 24 Jun 2024 21:03:30 +0000 (23:03 +0200)]
net: mediatek: handle alternative name for pn_swap property

Handle alternative name for pn_swap property as upstream linux use
mediatek,pnswap.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agospi: mtk_spim: add support for upstream mediatek, spi-ipm compatible
Christian Marangi [Mon, 24 Jun 2024 21:03:29 +0000 (23:03 +0200)]
spi: mtk_spim: add support for upstream mediatek, spi-ipm compatible

Upstream kernel linux use a different compatible mediatek,spi-ipm.

Add support for this compatible and add handling for the additional
clock similar to how it's done by the upstream driver and handling for
all the property enabled by default.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agopci: mediatek: add PCIe controller support for filogic silicon
John Crispin [Mon, 24 Jun 2024 21:03:28 +0000 (23:03 +0200)]
pci: mediatek: add PCIe controller support for filogic silicon

Add MediaTek GEN3 PCIe controller support for filogic silicon.
This is adapted from the Linux version of the driver.

Signed-off-by: John Crispin <john@phrozen.org>
[ fix minor problems, fix checkpatch errors ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agophy: phy-mtk-tphy: add support for phy type switch
Christian Marangi [Mon, 24 Jun 2024 21:03:27 +0000 (23:03 +0200)]
phy: phy-mtk-tphy: add support for phy type switch

Add support for PHY type switch via the mediatek topmisc syscon.

This is needed on mt7981 to make the PCIe correctly work and display
LinkUp.

Follow the same implementation done on Linux kernel with the usage of
the mediatek,syscon-type property.

Example:

u3port0: usb-phy@11e10700 {
reg = <0x11e10700 0x900>;
clocks = <&topckgen CK_TOP_USB3_PHY_SEL>;
clock-names = "ref";
#phy-cells = <1>;
mediatek,syscon-type = <&topmisc 0x218 0>;
status = "okay";
};

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoRevert "buildman: Always use the full path in CROSS_COMPILE"
Tom Rini [Fri, 5 Jul 2024 20:34:07 +0000 (14:34 -0600)]
Revert "buildman: Always use the full path in CROSS_COMPILE"

There are operations in buildman that result in running the cross-tools
(such as performing size checks) and now that we have not modified PATH
to know where our tools are, these operations fail.

This reverts commit 6c0a3cf75f72370deec3ee516a9dd377397af207.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agoMerge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Mon, 8 Jul 2024 14:47:00 +0000 (08:47 -0600)]
Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-marvell

- Add mvebu_espressobin_ultra-88f3720_defconfig (Benjamin)
- Update DTS for Thecus N2350 board (Tony)
- Add "old" Marvell DDR3 training for Armada 38x and Turris Omnia
  (Marek)
- Misc turris_omnia changes (Marek)

5 months agoMerge tag 'u-boot-imx-master-20240706' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Mon, 8 Jul 2024 14:45:02 +0000 (08:45 -0600)]
Merge tag 'u-boot-imx-master-20240706' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/21504

- Fixes for i.MX8M and i.MX93 clk-composite.
- Set CAN oscillator frequency based on model on verdin-imx8mm.
- Enable CAAM for phycore-imx8mp_defconfig.
- Miscellaneous improvements for Gateworks i.MX8M boards.
- Fix initramfs boot on msc_sm2s_imx8mp.
- Fixe EQoS on imx8mp-beacon-kit.
- Fix error message in fsl_esdhc_imx.

5 months agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Mon, 8 Jul 2024 14:44:26 +0000 (08:44 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-usb

5 months agoMerge branch 'next-clk-sync' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Mon, 8 Jul 2024 14:43:56 +0000 (08:43 -0600)]
Merge branch 'next-clk-sync' of https://source.denx.de/u-boot/custodians/u-boot-sh

5 months agomvebu: armada-8k: respect CONFIG_DISTRO_DEFAULTS
Robert Marko [Fri, 21 Jun 2024 09:46:02 +0000 (11:46 +0200)]
mvebu: armada-8k: respect CONFIG_DISTRO_DEFAULTS

Currently, Armada 8k config header is setting boot devices and including
<config_distro_bootcmd.h> regardless of the CONFIG_DISTRO_DEFAULTS being
enabled or not, thus populating the environment for distro boot even on
devices that have no need for it.

So, lets simply respect the value of CONFIG_DISTRO_DEFAULTS.

Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoarm: mvebu: turris_omnia: Support old DDR3 training
Marek Behún [Tue, 18 Jun 2024 15:34:39 +0000 (17:34 +0200)]
arm: mvebu: turris_omnia: Support old DDR3 training

Support old DDR3 training code on Turris Omnia, selectable via EEPROM
field.

Users experiencing DDR3 initialization failures or random crashes of the
operating system due to incorrect DDR3 configuration can select the old
DDR3 training implementation to fix those issues by setting the EEPROM
field "Use old DDR training":
  eeprom update "Use old DDR training" 1

Signed-off-by: Marek Behún <kabel@kernel.org>
5 months agoarm: mvebu: a38x: Add optional support for using old DDR3 training code
Marek Behún [Tue, 18 Jun 2024 15:34:38 +0000 (17:34 +0200)]
arm: mvebu: a38x: Add optional support for using old DDR3 training code

Add optional support for using old DDR3 training code from 2017.

The code lives in drivers/ddr/marvell/a38x/old/. To prevent symbol
clashing with new DDR3 training code, a special header which renames all
clashing symbols via macros is included and the symbols are prefixed
with 'old_'.

If old DDR3 training support is selected for a board, then the SPL
initialization code calls a new function
  board_use_old_ddr3_training()
to check whether it should use old DDR3 training code. The default
weak implementation returns false, defaulting to new DDR3 training code.

Boards that wish to support this need to select the
  ARMADA_38X_SUPPORT_OLD_DDR3_TRAINING
config option and implement the old version of DDR topology provider,
ddr3_get_topology_map().

Signed-off-by: Marek Behún <kabel@kernel.org>
5 months agoddr: marvell: a38x: old: Backport immutable debug settings
Marek Behún [Tue, 18 Jun 2024 15:34:37 +0000 (17:34 +0200)]
ddr: marvell: a38x: old: Backport immutable debug settings

Backport the option to compile with immutable debug settings also to
the old implementation of the DDR3 training code.

The original PR for mv-ddr-marvell can be seen at
  https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell/pull/45/

Signed-off-by: Marek Behún <kabel@kernel.org>
5 months agoddr: marvell: a38x: old: Fix some compiler warning of the old code
Marek Behún [Tue, 18 Jun 2024 15:34:36 +0000 (17:34 +0200)]
ddr: marvell: a38x: old: Fix some compiler warning of the old code

Fix some compilation warning in the old DDR training code.

Signed-off-by: Marek Behún <kabel@kernel.org>
5 months agoddr: marvell: a38x: Import old DDR training code from 2017 version of U-Boot
Marek Behún [Tue, 18 Jun 2024 15:34:35 +0000 (17:34 +0200)]
ddr: marvell: a38x: Import old DDR training code from 2017 version of U-Boot

Import DDR training code from commit 1b69ce2fc0ec ("arm: mvebu:
ddr3_debug: remove self assignments") into
drivers/ddr/marvell/a38x/old/. The code is not used yet.

Explanation:

Since 2019, on some Turris Omnia boards we have been having problems
with newer versions of Marvell's DDR3 training code for Armada 38x,
which is ported from mv-ddr-marvell [1] to U-Boot into the
drivers/ddr/marvell/a38x/ directory:
- sometimes the DDR3 training fails on some older boards, sometime it
  fails on some newer boards
- other times it succeeds, but some boards experience crashes of the
  operating system after running for some time.

Using the stock version of Turris Omnia's U-Boot from solved these
issues, but this solution was not satisfactory, since we wanted
features from new U-Boot.

Back in 2020-2022 we have spent several months trying to debug the
issues, working with Marvell, on our own, and also with U-Boot
community, but these issues persist still.

One solution we used back in 2019 was a "hybrid U-Boot": the SPL part
(containing the DDR3 training code) was taken from the stock version,
while the proper part was current U-Boot at the time. This solution also
has its drawbacks, of which the main one is the need to glue binaries
from two separate builds.

Since then there have been some more changes to the DDR3 training code
in upstream mv-ddr-marvell that have been ported to U-Boot. We have
provided our users experimental builds of U-Boot in the TurrisOS so that
they could try upgrading the firmware and let us know if those problems
still exist. And they do.

We do not have the time nor manpower to debug this problem and fix it
properly. Marvell was also no able to provide a solution to this,
probably because they do not have the manpower as well.

I have therefore come up with this "not that pretty" solution: take the
DDR3 training code from an older version of U-Boot that is known to
work, put it into current U-Boot under old/ subdirectory within
drivers/ddr/marvell/a38x/, build into the SPL binary both the old and
new versions and make it possible to select the old version via an env
variable.

[1] https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell

Signed-off-by: Marek Behún <kabel@kernel.org>
5 months agoarm: mvebu: turris_omnia: Read DDR speed from EEPROM
Marek Behún [Tue, 18 Jun 2024 15:34:34 +0000 (17:34 +0200)]
arm: mvebu: turris_omnia: Read DDR speed from EEPROM

Some Turris Omnia boards experience memory issues, and by
experimentation we found that some of these issues can be solved by
slowing DDR speed.

Add a new field in the extended EEPROM information structure, ddr_speed.
Support several values in this field (for now 1066F, 1333H, and the
default, 1600K) and use it to overwrite the DDR topology parameters
used by the DDR training algorithm.

Signed-off-by: Marek Behún <kabel@kernel.org>
5 months agoarm: mvebu: turris_omnia: Extend EEPROM info structure
Marek Behún [Tue, 18 Jun 2024 15:34:33 +0000 (17:34 +0200)]
arm: mvebu: turris_omnia: Extend EEPROM info structure

Extend the Omnia EEPROM information structure in preparation for more
variables to be stored there.

Signed-off-by: Marek Behún <kabel@kernel.org>
5 months agoarm: mvebu: turris_omnia: Enable the 'eeprom' command
Marek Behún [Tue, 18 Jun 2024 15:34:32 +0000 (17:34 +0200)]
arm: mvebu: turris_omnia: Enable the 'eeprom' command

Enable the 'eeprom' command with support for EEPROM layout for Turris
Omnia. Enable the i2c-eeprom driver so that the EEPROM is accessed via
driver model.

Signed-off-by: Marek Behún <kabel@kernel.org>
5 months agoarm: mvebu: turris_omnia: Implement EEPROM layout for the 'eeprom' command
Marek Behún [Tue, 18 Jun 2024 15:34:31 +0000 (17:34 +0200)]
arm: mvebu: turris_omnia: Implement EEPROM layout for the 'eeprom' command

Implement Turris Omnia EEPROM layout for the 'eeprom' command.

When the 'eeprom' command (with layout support) is enabled, we can now
use the 'eeprom print' and 'eeprom update' commands, for example:

  => eeprom print
  Magic constant                34a04103
  RAM size in GB                2
  Wi-Fi Region
  CRC32 checksum                cecbc2a1

Signed-off-by: Marek Behún <kabel@kernel.org>
5 months agoarm: mvebu: turris_omnia: Fix ethernet PHY reset gpio FDT fixup
Marek Behún [Tue, 18 Jun 2024 15:34:30 +0000 (17:34 +0200)]
arm: mvebu: turris_omnia: Fix ethernet PHY reset gpio FDT fixup

For board revisions where the WAN ethernet PHY reset GPIO is controllable
via MCU we currently insert a phy-reset-gpios property into the ethernet
controller node. The mvneta driver parses this property and uses the
GPIO to reset the PHY.

But this phy-reset-gpios property is not a valid DT binding in upstream
kernel. Instead, a reset-gpios property should be inserted into the
ethernet PHY node. This correct DT binding is supported by the DM ETH PHY
U-Boot driver.

Insert the reset-gpios property into the WAN PHY node instead the
phy-reset-gpios property in WAN ETH node so that Linux will correctly use
the reset GPIO.

Enable the CONFIG_DM_ETH_PHY config option so that U-Boot will also use
the correct DT property.

Note: currently there are 4 ethernet controller drivers parsing the
wrong DT property: dwc_eth_qos, fex_mxc, mvneta and mvpp2. We should
convert all relevant device-trees to use reset-gpios so that we can get
rid of these drivers parsing this property.

Fixes: 1da53ae26afc ("arm: mvebu: turris_omnia: Add support for design with SW reset signals")
Signed-off-by: Marek Behún <kabel@kernel.org>
5 months agoarm: mvebu: turris_omnia: Enable immutable debug settings in DDR3 training by default
Marek Behún [Tue, 18 Jun 2024 15:34:29 +0000 (17:34 +0200)]
arm: mvebu: turris_omnia: Enable immutable debug settings in DDR3 training by default

Save 10 KiB in Turris Omnia's SPL binary by enabling immutable debug
settings for DDR3 training code.

Signed-off-by: Marek Behún <kabel@kernel.org>
5 months agoddr: marvell: a38x: debug: Allow compiling with immutable debug settings to reduce...
Marek Behún [Tue, 18 Jun 2024 15:34:28 +0000 (17:34 +0200)]
ddr: marvell: a38x: debug: Allow compiling with immutable debug settings to reduce binary size

Allow compiling with immutable debug settings:
- DEBUG_LEVEL is always set to DEBUG_LEVEL_ERROR
- register dumps are disabled

This can save around 10 KiB of space in the resulting binary, which is a
lot in U-Boot SPL.

Signed-off-by: Marek Behún <kabel@kernel.org>
5 months agoddr: marvell: a38x: debug: Define DDR_VIEWER_TOOL variables only if needed, and make...
Marek Behún [Tue, 18 Jun 2024 15:34:27 +0000 (17:34 +0200)]
ddr: marvell: a38x: debug: Define DDR_VIEWER_TOOL variables only if needed, and make them static

The variables is_validate_window_per_if, is_validate_window_per_pup,
sweep_cnt and is_run_leveling_sweep_tests are only used if
DDR_VIEWER_TOOL macro is defined, so define them only in that case.

Make them static since they are only used in ddr3_debug.c.

Signed-off-by: Marek Behún <kabel@kernel.org>
5 months agoddr: marvell: a38x: debug: Remove unused variables
Marek Behún [Tue, 18 Jun 2024 15:34:26 +0000 (17:34 +0200)]
ddr: marvell: a38x: debug: Remove unused variables

The variables is_default_centralization, is_tune_result and
is_bist_reset_bit are never used.

Signed-off-by: Marek Behún <kabel@kernel.org>
5 months agoddr: marvell: a38x: debug: return from ddr3_tip_print_log() early if we won't print...
Marek Behún [Tue, 18 Jun 2024 15:34:25 +0000 (17:34 +0200)]
ddr: marvell: a38x: debug: return from ddr3_tip_print_log() early if we won't print anything

Return from ddr3_tip_print_log() early if we won't print anything
anyway.

This way the compiler can optimize away the VALIDATE_IF_ACTIVE() calls
in the for-loop, so if the SILENT_LIB macro is defined, no code is
generated for the rest of the function, which saves some space.

Signed-off-by: Marek Behún <kabel@kernel.org>
5 months agoarm: mvebu: turris_omnia: Disable ext4 write support in defconfig
Marek Behún [Tue, 18 Jun 2024 15:34:24 +0000 (17:34 +0200)]
arm: mvebu: turris_omnia: Disable ext4 write support in defconfig

Turris Omnia defconfig is nearing image size limit. Disable ext4 write
support to reserve space for more important stuff.

This reduces the size of the KWB image by ~19 KiB.

If in the future U-Boot supports compressing itself and decompressing
on load, we may enable this again.

Signed-off-by: Marek Behún <kabel@kernel.org>
5 months agoarm: dts: mvebu: Update DTS for Thecus N2350 board
Tony Dinh [Mon, 10 Jun 2024 00:34:31 +0000 (17:34 -0700)]
arm: dts: mvebu: Update DTS for Thecus N2350 board

- Change the spi-max-frequency to 50000000 (50 Mhz). According to the
data sheet[1], the MX25L3205D max frequency is 86 Mhz. Using 50 Mhz in
the DTS to ensure u-boot is consistent with what Linux kernel expected.
- Update GPIO fan to conform to the latest DT binding.

[1]
https://www.macronix.com/Lists/Datasheet/Attachments/8575/MX25L3205D,%203V,%2032Mb,%20v1.5.pdf

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
5 months agoarm: mvebu: env_sf_get_env_addr() missing check for CONFIG_ENV_IS_IN_SPI_FLASH
Tony Dinh [Thu, 6 Jun 2024 00:12:01 +0000 (17:12 -0700)]
arm: mvebu: env_sf_get_env_addr() missing check for CONFIG_ENV_IS_IN_SPI_FLASH

The CONFIG_ENV_OFFSET is undefined if boot device is UART
(CONFIG_MVEBU_SPL_BOOT_DEVICE_UART), or envs are not stored on flash
(CONFIG_ENV_IS_NOWHERE). Check for CONFIG_ENV_IS_IN_SPI_FLASH as the first
condition to determine whether env_sf_get_env_addr() should be provided.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
5 months agoconfigs: add mvebu_espressobin_ultra-88f3720_defconfig
Benjamin Schneider [Thu, 30 May 2024 04:47:51 +0000 (21:47 -0700)]
configs: add mvebu_espressobin_ultra-88f3720_defconfig

Add support for a Marvell Armada 3720 device variant

Signed-off-by: Benjamin Schneider <ben@bens.haus>
5 months agoclk: imx: add mux ops for i.MX8M composite clk
Michael Trimarchi [Fri, 5 Jul 2024 07:19:52 +0000 (09:19 +0200)]
clk: imx: add mux ops for i.MX8M composite clk

Upstream Linux commit f90b68d6c8b0.

The CORE/BUS root slice has following design, simplied graph:
The difference is core not have pre_div block.
A composite core/bus clk has 8 inputs for mux to select, saying clk[0-7].

It support target(smart) interface and normal interface. Target interface
is exported for programmer easy to configure ccm root. Normal interface
is also exported, but we not use it in our driver, because it will
introduce more complexity compared with target interface.

The normal interface simplified as below:
            SEL_A  GA
            +--+  +-+
            |  +->+ +------+
CLK[0-7]--->+  |  +-+      |
       |    |  |      +----v---+    +----+
       |    +--+      |pre_diva+---->    |  +---------+
       |              +--------+    |mux +--+post_div |
       |    +--+      |pre_divb+--->+    |  +---------+
       |    |  |      +----^---+    +----+
       +--->+  |  +-+      |
            |  +->+ +------+
            +--+  +-+
            SEL_B  GB

The mux in the upper pic is not the target interface MUX, target
interface MUX is hiding SEL_A and SEL_B. When you choose clk[0-7],
you are actually writing SEL_A or SEL_B depends on the internal
counter which will also control the internal "mux".

The target interface simplified as below which is used by Linux Kernel:
CLK[0-7]--->MUX-->Gate-->pre_div-->post_div

A requirement of the Target Interface's software is that the
target clock source is active, it means when setting SEL_A, the
current input clk to SEL_A must be active, same to SEL_B.

We touch target interface, but hardware logic actually also need
configure normal interface.

There will be system hang, when doing the following steps:
The initial state:
SEL_A/SEL_B are both sourcing from clk0, the internal counter
choose SEL_A.
1. switch mux from clk0 to clk1
   The hardware logic will choose SEL_B and configure SEL_B to clk1.
   SEL_A no changed.
2. gate off clk0
   Disable clk0, then the input to SEL_A is off.
3. switch from clk1 to clk2
   The hardware logic will choose SEL_A and configure SEL_A to clk2,
   however the current SEL_A input clk0 is off, the system hang.

The solution to fix the issue is in step 1, write twice to
target interface MUX, it will make SEL_A/SEL_B both sources
from clk1, then no need to care about the state of clk0. And
finally system performs well.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
5 months agoclk: clk-mux: Make public the clk_fetch_parent_index
Michael Trimarchi [Fri, 5 Jul 2024 07:19:51 +0000 (09:19 +0200)]
clk: clk-mux: Make public the clk_fetch_parent_index

Make public the clk_fetch_parent_index and rename it. This allow
us to be reused in driver specialization

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
5 months agommc: fsl_esdhc_imx: Fix error message
Alexander Stein [Fri, 5 Jul 2024 13:27:24 +0000 (15:27 +0200)]
mmc: fsl_esdhc_imx: Fix error message

Add missing newline character and also add the return code of
regulator_set_value() to the output.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
5 months agoconfigs: phycore-imx8mp_defconfig: Initialize caam
Leonard Anderweit [Fri, 5 Jul 2024 12:11:21 +0000 (14:11 +0200)]
configs: phycore-imx8mp_defconfig: Initialize caam

Initialize the Cryptographic Accelerator and Assurance Module.

Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
5 months agoARM: dts: imx8mp-beacon-kit-u-boot: Drop EQoS clock work-around
Adam Ford [Thu, 4 Jul 2024 21:22:46 +0000 (16:22 -0500)]
ARM: dts: imx8mp-beacon-kit-u-boot: Drop EQoS clock work-around

Since commit ecb1c37a7b64 ("clk: imx8mp: Add EQoS MAC clock"),
the clocks for the DWMAC driver can be configured, and removing
them breaks operation.

Fixes: ecb1c37a7b64 ("clk: imx8mp: Add EQoS MAC clock")
Suggested-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 months agomsc_sm2s_imx8mp: Adjust the initrd_addr location
Fabio Estevam [Thu, 4 Jul 2024 12:03:37 +0000 (09:03 -0300)]
msc_sm2s_imx8mp: Adjust the initrd_addr location

Booting an initramfs with the current initrd_addr address may lead to
initramfs corruption and boot failure.

Fix the initramfs problem by applying the following layout
suggested by Tom Rini:

loadaddr=0x40480000 --> Gets moved to 0x40600000 in run-time:

   Uncompressing Kernel Image
Moving Image from 0x40480000 to 0x40600000, end=41e80000

fdt_addr_r= moved loadaddr + 128 MiB = 0x48600000

initrd_addr=fdt_addr_r + 512 KiB = 0x48680000

Signed-off-by: Fabio Estevam <festevam@denx.de>
Tested-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 months agopinctrl: renesas: Synchronize R-Car R8A779G0 V4H PFC tables with Linux 6.9.3
Marek Vasut [Tue, 18 Jun 2024 22:54:20 +0000 (00:54 +0200)]
pinctrl: renesas: Synchronize R-Car R8A779G0 V4H PFC tables with Linux 6.9.3

Synchronize R-Car R8A779G0 V4H PFC tables with Linux 6.9.3,
commit 1b4861e32e461b6fae14dc49ed0f1c7f20af5146 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agoclk: renesas: Synchronize R-Car R8A779H0 V4M clock tables with Linux 6.9.3
Marek Vasut [Tue, 18 Jun 2024 22:54:19 +0000 (00:54 +0200)]
clk: renesas: Synchronize R-Car R8A779H0 V4M clock tables with Linux 6.9.3

Synchronize R-Car R8A779H0 V4M clock tables with Linux 6.9.3,
commit 1b4861e32e461b6fae14dc49ed0f1c7f20af5146 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agoclk: renesas: Synchronize R-Car R8A779G0 V4H clock tables with Linux 6.9.3
Marek Vasut [Tue, 18 Jun 2024 22:54:18 +0000 (00:54 +0200)]
clk: renesas: Synchronize R-Car R8A779G0 V4H clock tables with Linux 6.9.3

Synchronize R-Car R8A779G0 V4H clock tables with Linux 6.9.3,
commit 1b4861e32e461b6fae14dc49ed0f1c7f20af5146 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agoclk: renesas: Synchronize R-Car R8A779F0 S4 clock tables with Linux 6.9.3
Marek Vasut [Tue, 18 Jun 2024 22:54:17 +0000 (00:54 +0200)]
clk: renesas: Synchronize R-Car R8A779F0 S4 clock tables with Linux 6.9.3

Synchronize R-Car R8A779F0 S4 clock tables with Linux 6.9.3,
commit 1b4861e32e461b6fae14dc49ed0f1c7f20af5146 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agoclk: renesas: Synchronize R-Car R8A779A0 V3U clock tables with Linux 6.9.3
Marek Vasut [Tue, 18 Jun 2024 22:54:16 +0000 (00:54 +0200)]
clk: renesas: Synchronize R-Car R8A779A0 V3U clock tables with Linux 6.9.3

Synchronize R-Car R8A779A0 V3U clock tables with Linux 6.9.3,
commit 1b4861e32e461b6fae14dc49ed0f1c7f20af5146 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agoclk: renesas: Synchronize R-Car R8A77951 H3 clock tables with Linux 6.9.3
Marek Vasut [Tue, 18 Jun 2024 22:54:15 +0000 (00:54 +0200)]
clk: renesas: Synchronize R-Car R8A77951 H3 clock tables with Linux 6.9.3

Synchronize R-Car R8A77951 H3 clock tables with Linux 6.9.3,
commit 1b4861e32e461b6fae14dc49ed0f1c7f20af5146 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agousb: Assimilate usb_get_descriptor() to linux
Philip Oberfichtner [Tue, 4 Jun 2024 10:18:11 +0000 (12:18 +0200)]
usb: Assimilate usb_get_descriptor() to linux

Before this commit, usb_get_descriptor() failed for some flakey USB
devices. We hereby adopt the more robust linux implementation [1].

For instance, for the "Alcor Micro Corp. Flash Drive" (VID 0x058f, PID
0x6387), the following behavior occurs from time to time:

=> usb start
starting USB...
Bus xhci_pci: Register 10000840 NbrPorts 16
Starting the controller
USB XHCI 1.20
scanning bus xhci_pci for devices... usb_new_device: Cannot read configuration, skipping device 058f:6387

Signed-off-by: Philip Oberfichtner <pro@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
[1] From a38297e3fb012 (Linux 6.9), see
    https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/usb/core/message.c?h=v6.9#n781

5 months agousb: xhci: Replace terrible formatting with different terrible formatting
Marek Vasut [Wed, 22 Nov 2023 23:50:52 +0000 (00:50 +0100)]
usb: xhci: Replace terrible formatting with different terrible formatting

Replace one type of terrible code formatting with a different
type of terrible code formatting. No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Hector Martin <marcan@marcan.st>
5 months agoclk: imx: Fix wrong flags assignment clk-composite-93
Michael Trimarchi [Tue, 2 Jul 2024 10:26:18 +0000 (12:26 +0200)]
clk: imx: Fix wrong flags assignment clk-composite-93

The mux flags (u8), div flags (u8), and gate flags (u8)  are not the clk
flags (unsigned long). They have different meanings

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
5 months agoclk: imx: Fix wrong flags assignment clk-composite-8m
Michael Trimarchi [Tue, 2 Jul 2024 10:26:17 +0000 (12:26 +0200)]
clk: imx: Fix wrong flags assignment clk-composite-8m

The mux flags (u8), div flags (u8), and gate flags (u8)  are not the clk
flags (unsigned long). They have different meanings

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
5 months agoARM: imx: Update Fast ethernet PHY MDIO addresses to match DH i.MX8MP DHCOM rev.200
Marek Vasut [Thu, 27 Jun 2024 00:13:16 +0000 (02:13 +0200)]
ARM: imx: Update Fast ethernet PHY MDIO addresses to match DH i.MX8MP DHCOM rev.200

The production DH i.MX8MP DHCOM SoM rev.200 uses updated PHY MDIO addresses
for the Fast ethernet PHYs. Update the base SoM DT and SoM rev.100 backward
compatibility DTO to cater for this change.

Since the MDIO address adjustment is now also in the rev.100 SoM DTO, not
only in the rev.100 PDK3 DTO, update Makefile accordingly as well, else the
DTC would complain about the DTO overriding the 'reg' property without also
updating the node unit-address, which is not doable without duplicating the
entire PHY node in the DTO, which leads to large amount of duplication with
no gain.

Fixes: 9de599ec3d59 ("arm64: dts: imx8mp: Update i.MX8MP DHCOM SoM DT to production rev.200")
Signed-off-by: Marek Vasut <marex@denx.de>
5 months agoARM: imx: Enable PCA953x driver on DH i.MX8MP DHCOM PDK2
Marek Vasut [Thu, 27 Jun 2024 00:13:15 +0000 (02:13 +0200)]
ARM: imx: Enable PCA953x driver on DH i.MX8MP DHCOM PDK2

Enable PCA953x GPIO expander driver in DH i.MX8MP DHCOM PDK2 configuration.
The PCA9539 GPIO expander is used on production DH i.MX8MP DHCOM SoM rev.200.
This is already enabled in DH i.MX8MP DHCOM PDK3 configuration so align the
two configurations.

Fixes: 9de599ec3d59 ("arm64: dts: imx8mp: Update i.MX8MP DHCOM SoM DT to production rev.200")
Signed-off-by: Marek Vasut <marex@denx.de>
5 months agoARM: imx: Enable cat and xxd commands on DH i.MX8M Plus DHCOM
Marek Vasut [Thu, 27 Jun 2024 00:01:21 +0000 (02:01 +0200)]
ARM: imx: Enable cat and xxd commands on DH i.MX8M Plus DHCOM

Enable 'cat' command to print file from filesystem to stdout.
Enable 'xxd' command to hexdump file from filesystem to stdout.

Signed-off-by: Marek Vasut <marex@denx.de>
5 months agoARM: imx: verdin-imx8mm: Set CAN oscillator frequency based on model
Marek Vasut [Tue, 25 Jun 2024 08:26:15 +0000 (10:26 +0200)]
ARM: imx: verdin-imx8mm: Set CAN oscillator frequency based on model

The older i.MX8M Mini Verdin SoMs may came with 20 MHz SPI CAN controller
oscillator, the newer SoMs always use 40 MHz oscillator. Handle both by
overriding the oscillator frequency just before booting the kernel.

These are the known variants with 20 MHz oscillator:
- 0055, V1.1A, V1.1B, V1.1C and V1.1D, use a 20MHz oscillator
- 0059, V1.1A and V1.1B, use a 20MHz oscillator

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
5 months agoMerge branch '2024-07-05-assorted-updates'
Tom Rini [Fri, 5 Jul 2024 22:36:43 +0000 (16:36 -0600)]
Merge branch '2024-07-05-assorted-updates'

- Re-instate the zlib update, so we can fix it for this release,
  assorted whitespace cleanups, allow mkimage to 'auto-conf' signing of
  scripts, enhance ELF image support, add more HW rev support to e1000
  driver, update am64x_evm config, correct mpc8xxx watchdog, update
  phycore-am6 docs.

5 months agoRevert "Revert "Merge patch series "zlib: Address CVE-2016-9841"""
Tom Rini [Fri, 5 Jul 2024 15:44:54 +0000 (09:44 -0600)]
Revert "Revert "Merge patch series "zlib: Address CVE-2016-9841"""

Now that the release has happened, bring back the update to zlib.

This reverts commit bbacdd3ef7762fbdeab43ceea5205d1fd0f25bbd.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agowatchdog: mpc8xxx: Fix timer value
Christophe Leroy [Thu, 27 Jun 2024 08:26:08 +0000 (10:26 +0200)]
watchdog: mpc8xxx: Fix timer value

Timer value is a 16 bits calculated from the wanted timeout and the
system clock. On powerpc/8xx, a timeout of 2s gives a value which
is over U16_MAX so U16_MAX shall be used. But the calculation is
casted to u16 so at the end the result is 63770 instead of 128906.

So the timer gets loaded with 63770 instead of 65535. It is not
a big difference in that case, but lets make the code correct and
cast to u32 instead of u16.

Fixes: 26e8ebcd7cb7 ("watchdog: mpc8xxx: Make it generic")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
5 months agopci_ids: fix i225 unprogrammed value
Marjolaine Amate [Mon, 24 Jun 2024 19:49:07 +0000 (19:49 +0000)]
pci_ids: fix i225 unprogrammed value

This patch fixes the I225 hardware default value
at 0x15FD meaning empty flash image
or the NVM configuration loading failed

Signed-off-by: Marjolaine Amate <marjolaine.amate@odyssee-systemes.fr>
5 months agoe1000: add support for i226
Marjolaine Amate [Mon, 24 Jun 2024 19:15:32 +0000 (19:15 +0000)]
e1000: add support for i226

This patch adds support for Intel Foxville I226
devices LM,V,I,K in e1000 driver.

Signed-off-by: Marjolaine Amate <marjolaine.amate@odyssee-systemes.fr>
5 months agoFix Kconfig coding style from spaces to tab
Anand Moon [Sun, 23 Jun 2024 17:40:21 +0000 (23:10 +0530)]
Fix Kconfig coding style from spaces to tab

Adjust indentation from spaces to tab (+optional two spaces) as in
coding style with command like:
$ sed -e 's/^        /\t/' -i */Kconfig

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
5 months agoconfigs: am64x_evm_a53_defconfig: Enable I2C GPIO drivers
Roger Quadros [Sun, 23 Jun 2024 07:41:19 +0000 (10:41 +0300)]
configs: am64x_evm_a53_defconfig: Enable I2C GPIO drivers

The board has the TCA9554 I2C GPIO expander chip for expansion
board presence detection logic.

Enable the relevant I2C GPIO drivers.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
5 months agocmd: bootm: add ELF file support
Maxim Moskalets [Fri, 21 Jun 2024 11:42:10 +0000 (14:42 +0300)]
cmd: bootm: add ELF file support

Some operating systems (e.g. seL4) and embedded applications are ELF
images. It is convenient to use FIT-images to implement trusted boot.
Added "elf" image type for booting using bootm command.

Signed-off-by: Maxim Moskalets <maximmosk4@gmail.com>
5 months agomkimage: Allow 'auto-conf' signing of scripts
Alexander Dahl [Thu, 20 Jun 2024 14:20:59 +0000 (16:20 +0200)]
mkimage: Allow 'auto-conf' signing of scripts

U-Boot configured for verified boot with the "required" option set to
"conf" also checks scripts put in FIT images for a valid signature, and
refuses to source and run such a script if the signature for the
configuration is bad or missing.  Such a script could not be packaged
before, because mkimage failed like this:

    % tools/mkimage -T script -C none -d tmp/my.scr -f auto-conf -k tmp -g dev -o sha256,rsa4096 my.uimg
    Failed to find any images for configuration 'conf-1/signature'
    tools/mkimage Can't add hashes to FIT blob: -1
    Error: Bad parameters for FIT image type

This is especially unfortunate if LEGACY_IMAGE_FORMAT is disabled as
recommended.

Listing the script configuration in a "sign-images" subnode instead,
would have added even more complexity to the already complex auto fit
generation code.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
5 months agodoc: board: phytec: phycore-am6: Describe UART based boot
Wadim Egorov [Thu, 20 Jun 2024 12:05:54 +0000 (14:05 +0200)]
doc: board: phytec: phycore-am6: Describe UART based boot

Describe how to boot via UART.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
5 months agoconfigs: Remove duplicate newlines
Marek Vasut [Sun, 16 Jun 2024 15:19:11 +0000 (17:19 +0200)]
configs: Remove duplicate newlines

Drop all duplicate newlines from config headers.
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agoMerge branch 'qcom-main' of https://source.denx.de/u-boot/custodians/u-boot-snapdragon
Tom Rini [Fri, 5 Jul 2024 16:22:53 +0000 (10:22 -0600)]
Merge branch 'qcom-main' of https://source.denx.de/u-boot/custodians/u-boot-snapdragon

Various minor fixes and improvements:

* Fix Qualcomm SPMI v5 support
* Move default environment to a file
* Add support for special pins (e.g ufs/mmc reset/data pins)
* IPQ moves to OF_UPSTREAM and receives some cleanup and MAINTAINERS
  changes
* Add a reset driver for devices without PSCI
* msm8916 USB clock improvements for mobile devices

5 months agoMerge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra
Tom Rini [Fri, 5 Jul 2024 14:09:23 +0000 (08:09 -0600)]
Merge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra

Branch contains minor improvemets for existing tegra devices along
with bring up of 4 new devices (ASUS Transformers T20, Microsoft
Surface RT, Lenovo Ideapad Yoga 11 and WEXLER Tab 7t).

5 months agoRevert "CI Changes"
Tom Rini [Fri, 5 Jul 2024 14:07:00 +0000 (08:07 -0600)]
Revert "CI Changes"

This change was brought in by accident, revert.

This reverts commit 51aabf50e57f5139de31a4850347edbad8bb338b.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agospmi: msm: correct max_channels for v5 controllers
Caleb Connolly [Mon, 24 Jun 2024 02:23:29 +0000 (04:23 +0200)]
spmi: msm: correct max_channels for v5 controllers

Commit ee1d8aa5ecf7 ("spmi: msm: support controller version 7") broke
support for channels > 128 on v5 controllers, resulting in some
peripherals (like the power button / pon) working but others (like
gpios) reading bogus data.

Correct max_channels for v5 controllers.

Fixes: ee1d8aa5ecf7 ("spmi: msm: support controller version 7")
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
5 months agomach-snapdragon: move default environment to a file
Caleb Connolly [Mon, 24 Jun 2024 12:31:59 +0000 (14:31 +0200)]
mach-snapdragon: move default environment to a file

Make use of CONFIG_DEFAULT_ENV_FILE and move the default qcom
environment to a file under board/qualcomm.

This is much cleaner and means we don't need to recompile on changing
the environment.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
5 months agospmi: msm: demote to debug()
Caleb Connolly [Mon, 24 Jun 2024 12:46:27 +0000 (14:46 +0200)]
spmi: msm: demote to debug()

Most devices have buttons exposed via the PMIC, the button polling
therefore triggers a log spam if debug logging is enabled.

Demote these to debug() so that they aren't printed unless LOG_DEBUG is
defined explicitly for this file.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
5 months agopinctrl: qcom: sm8650: add special pins pins configuration data
Neil Armstrong [Tue, 28 May 2024 08:31:57 +0000 (10:31 +0200)]
pinctrl: qcom: sm8650: add special pins pins configuration data

Add the special pins configuration data to allow setup the bias
of the UFS and SDCard pins on the SM8650 SoC.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
5 months agopinctrl: qcom: sm8550: add special pins pins configuration data
Neil Armstrong [Tue, 28 May 2024 08:31:56 +0000 (10:31 +0200)]
pinctrl: qcom: sm8550: add special pins pins configuration data

Add the special pins configuration data to allow setup the bias
of the UFS and SDCard pins on the SM8550 SoC.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
5 months agopinctrl: qcom: add support setting pin configuration for special pins
Neil Armstrong [Tue, 28 May 2024 08:31:55 +0000 (10:31 +0200)]
pinctrl: qcom: add support setting pin configuration for special pins

Use the previously introduced msm_special_pin_data to setup the special
pins configuration if the SoC driver have them specified.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
5 months agoarm: mach-snapdragon: gpio: introduce msm_special_pin_data
Neil Armstrong [Tue, 28 May 2024 08:31:54 +0000 (10:31 +0200)]
arm: mach-snapdragon: gpio: introduce msm_special_pin_data

In order to help setup pin configuration for special pins (UFS, SDCard),
introduce the msm_special_pin_data struct largely inspired from the
Linux conterpart but with only U-Boot required fields.

This struct is added to the pins_data to allow specifying the special
pins data for each SoC.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
5 months agopinctrl: qcom: add support for bias-pull-down
Neil Armstrong [Tue, 28 May 2024 08:31:53 +0000 (10:31 +0200)]
pinctrl: qcom: add support for bias-pull-down

Add support for bias-pull-down as an alternate of bias-pull-up.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
5 months agoclock: qcom: ipq4019: add I2C clocks
Robert Marko [Tue, 28 May 2024 12:31:04 +0000 (14:31 +0200)]
clock: qcom: ipq4019: add I2C clocks

I2C clocks are not initialized by the SBL, so lets add support for clocks
required by both of the QUP I2C controllers.

BLSP1 AHB clock is already initialized by SBL, but QUP I2C driver is
requesting it so we have to add it to the enable list.

Based off QCS404 clock driver.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
5 months agoMAINTAINERS: IPQ40XX: add pinctrl driver
Robert Marko [Wed, 24 Apr 2024 09:46:25 +0000 (11:46 +0200)]
MAINTAINERS: IPQ40XX: add pinctrl driver

Pinctrl drivers were moved to a dedicated directory but the entry was never
updated, so add the pinctrl-ipq4019 driver entry.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
5 months agoMAINTAINERS: IPQ40XX: add clock-ipq4019 instead of reset driver
Robert Marko [Wed, 24 Apr 2024 09:46:24 +0000 (11:46 +0200)]
MAINTAINERS: IPQ40XX: add clock-ipq4019 instead of reset driver

The reset handling was added to the clock drivers but the entry was never
updated, so add the clock-ipq4019 driver instead.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
5 months agoMAINTAINERS: IPQ40XX: update GCC dt-bindings
Robert Marko [Wed, 24 Apr 2024 09:46:23 +0000 (11:46 +0200)]
MAINTAINERS: IPQ40XX: update GCC dt-bindings

The separate clock and reset dt-bindings for IPQ40XX were merged into one
recently, but the entry was not updated so do it now.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
5 months agoMAINTAINERS: IPQ40XX: remove Luka Kovacic as maintainer
Robert Marko [Wed, 24 Apr 2024 09:46:22 +0000 (11:46 +0200)]
MAINTAINERS: IPQ40XX: remove Luka Kovacic as maintainer

Luka Kovacic is no longer at Sartura, so remove him as one of IPQ40xx
maintainers.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
5 months agoarm: dts: drop downstream IPQ4019 DTSI
Robert Marko [Tue, 14 May 2024 10:17:52 +0000 (12:17 +0200)]
arm: dts: drop downstream IPQ4019 DTSI

We want to use OF_UPSTREAM on IPQ40XX as its well supported upstream, so
lets drop our downstream DTSI.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Acked-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
5 months agomach-ipq40xx: use OF_UPSTREAM
Robert Marko [Tue, 14 May 2024 10:17:51 +0000 (12:17 +0200)]
mach-ipq40xx: use OF_UPSTREAM

Now that drivers are compatible enough with the upstream DTS, there is no
reason to not use the upstream DTS, so imply OF_UPSTREAM by default.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Acked-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
5 months agomach-ipq40xx: add CPU specific code
Robert Marko [Tue, 14 May 2024 10:17:50 +0000 (12:17 +0200)]
mach-ipq40xx: add CPU specific code

Provide basic DRAM info population from DT, cache setting and the
board_init stub.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Acked-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
5 months agosysreset: add Qualcomm PSHOLD reset driver
Robert Marko [Tue, 14 May 2024 10:15:02 +0000 (12:15 +0200)]
sysreset: add Qualcomm PSHOLD reset driver

Number of Qualcomm ARMv7 SoC-s did not use PSCI but rather used PSHOLD
(Qualcomm Power Supply Hold Reset) bit to trigger reset or poweroff.

Qualcomm IPQ40XX is one of them, so provide a simple sysreset driver based
on the upstream Linux one, it is DT compatible as well.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
5 months agoehci: msm: bring up iface + core clocks
Sam Day [Mon, 6 May 2024 10:26:58 +0000 (10:26 +0000)]
ehci: msm: bring up iface + core clocks

This seems to be necessary on my samsung-a5. Without this patch, the
first access of EHCI registers causes a bus stall and subsequent reset.

I am unsure why this wasn't already necessary for db410c, perhaps those
clocks are already enabled on boot.

Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: Sam Day <me@samcday.com>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
5 months agoclk/qcom: apq8016: add support for USB_HS clocks
Sam Day [Mon, 6 May 2024 10:26:54 +0000 (10:26 +0000)]
clk/qcom: apq8016: add support for USB_HS clocks

The newer "register map for simple gate clocks" support added for qcom
clocks is used. As a result gcc_apq8016 now has a mixture of the old and
new styles. I didn't (and still don't!) feel comfortable enough in this
area to update the existing code.

Signed-off-by: Sam Day <me@samcday.com>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
5 months agoqcom_defconfig: enable msm8916 and msm8996
Caleb Connolly [Tue, 7 May 2024 18:46:54 +0000 (18:46 +0000)]
qcom_defconfig: enable msm8916 and msm8996

Enable the clock/pinctrl drivers for these two SoCs. Previously left out
due to only being used on the db410c and db820c respectively which both
have their own board code. We can still boot these with most features
working without that board code.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: Sam Day <me@samcday.com>
5 months agoboard: lenovo: ideapad-yoga-11: add Lenovo Ideapad Yoga 11 support
Jonas Schwöbel [Sat, 2 Apr 2022 20:04:00 +0000 (22:04 +0200)]
board: lenovo: ideapad-yoga-11: add Lenovo Ideapad Yoga 11 support

The Lenovo IdeaPad Yoga 11 is a hybrid laptop/tablet Windows RT-based
computer released in late 2012. The device uses a 1.3 GHz quad-core
Nvidia Tegra 3 chipset with 2 GB of RAM, features a 11.6 inch 1366x768
screen and 32/64 GB of internal memory that can be supplemented with
a microSDXC card slot, full size SD card slot and 2 full size USB 2.0
ports.

Tested-by: Jethro Bull <jethrob@hotmail.com>
Signed-off-by: Jonas Schwöbel <jonasschwoebel@yahoo.de>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 months agoboard: microsoft: surface-rt: add Microsoft Surface RT support
Jonas Schwöbel [Mon, 24 Jan 2022 17:06:33 +0000 (18:06 +0100)]
board: microsoft: surface-rt: add Microsoft Surface RT support

Surface RT is a hybrid tablet computer developed and manufactured
by Microsoft and shipped with Windows RT. The tablet uses a 1.3 GHz
quad-core Nvidia Tegra 3 chipset with 2 GB of RAM, features 10.8
inch 1366x768 screen and 32/64 GB of internal memory that can be
supplemented with a microSDXC card giving up to 200 GB of
additional storage.

Tested-by: Jethro Bull <jethrob@hotmail.com>
Signed-off-by: Jonas Schwöbel <jonasschwoebel@yahoo.de>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 months agoboard: wexler: qc750: add WEXLER Tab 7t support
Svyatoslav Ryhel [Tue, 11 Jul 2023 10:47:02 +0000 (13:47 +0300)]
board: wexler: qc750: add WEXLER Tab 7t support

WEXLER Tab 7t is a mini tablet computer developed by WEXLER that
runs the Android operating system. The device features a 7.0-inch
(180 mm) HD display, an Nvidia Tegra 3 quad-core chip, 1 GB of RAM,
8, 16 or 32 GB of storage that can be supplemented with a microSDXC
card giving up to 64 GB of additional storage and a full size USB
port.

Tested-by: Maksim Kurnosenko <asusx2@mail.ru>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 months agoboard: asus: transformer: add ASUS Transformer T20 family support
Svyatoslav Ryhel [Thu, 27 Jan 2022 17:42:04 +0000 (19:42 +0200)]
board: asus: transformer: add ASUS Transformer T20 family support

The Asus Eee Pad Transformer family are 2-in-1 detachable/slider
tablets developed by Asus that run the Android operating system.
The Eee Pad Transformers feature a 10.1-inch (260 mm) display,
an Nvidia Tegra 2 dual-core chip, 1 GB of RAM, and 16/32 GB of storage.
Transformers board derives from Nvidia Ventana development board.

This patch brings support for all 3 known T20 Transformers:
- Asus Eee Pad Transformer TF101
- Asus Eee Pad Transformer TF101G
- Asus Eee Pad Slider SL101

Tested-by: Robert Eckelmann <longnoserob@gmail.com> # ASUS TF101
Tested-by: Antoni Aloy Torrens <aaloytorrens@gmail.com> # ASUS TF101
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>