Commit graph

81584 commits

Author SHA1 Message Date
Sumit Garg
54e77ad17d qcs404evb_defconfig: Enable USB configs
Enable USB config options along with its dependencies like PHY, RESET,
PMIC GPIO etc. config options.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26 10:55:46 -04:00
Sumit Garg
106822de5e board: qcs404-evb: Enable USB3 specific PMIC GPIO
For USB3 host controller to detect devices on the bus it is required to
enable a PMIC GPIO: usb_vbus_boost_pin. So enable that during board
specific initialization.

And since this PMIC GPIO parsing is quite u-boot specific, so add a
DT override to qcs404-evb-uboot.dtsi to represent usb_vbus_boost_pin.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26 10:55:46 -04:00
Sumit Garg
9c96a0c62a dts: qcs404-evb: Add PMIC GPIO controller node
PMIC GPIOs are special GPIOs which are accessible through SPMI bus. So
add corresponding DT nodes.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26 10:55:46 -04:00
Sumit Garg
cf515842b9 gpio: qcom_pmic: Add support for GPIO LV/MV subtype
GPIO LV (low voltage)/MV (medium voltage) subtypes have different
features and register mappings than 4CH/8CH subtypes. Add support
for LV and MV subtypes.

With GPIO LV/MV subtype available, add "qcom,pms405-gpio" compatible
which requires support for GPIO MV subtype.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26 10:55:46 -04:00
Sumit Garg
e555d4caac pmic: Convert pm8916 driver to a generic Qcom PMIC driver
Since both pm8916.c and pm8916_gpio.c are already supporting multiple
Qcom SoCs, it makes sense to rename these drivers to pmic_qcom.c and
qcom_pmic_gpio.c respectively. Also, these driver can be extended to
support additional functionality if required for other Qcom SoCs.

Along with this import latest DT binding: qcom,spmi-pmic.txt from Linux
kernel and thereby remove pm8916.txt.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26 10:55:45 -04:00
Sumit Garg
0c1eab6f75 dts: qcs404-evb: Add USB controller and PHY nodes
QCS404 SoC provides support for two USB controllers: one USB3 and the
other one being USB2. The USB3 controller supports further 2 PHY: one high
speed PHY and the other super speed PHY. The USB2 controller supports a
single high speed PHY. So add corresponding DT nodes.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26 10:55:45 -04:00
Sumit Garg
968597b85c clocks: qcs404: Add support for USB clocks
Add support for USB controller and PHY clocks for QCS404 SoC.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26 10:55:45 -04:00
Sumit Garg
c9e384e9b6 clocks: qcom: Add clock enable callback support
Drivers like USB, ethernet etc. uses ".enable" hook to enable clocks.
So add corresponding support for Qcom clock drivers.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26 10:55:45 -04:00
Sumit Garg
21ed4563cb dts: qcs404-evb: Add reset controller node
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26 10:55:45 -04:00
Sumit Garg
9b6f90ca92 reset: qcom: Add support for QCS404 SoC reset table
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26 10:55:45 -04:00
Sumit Garg
42588276b3 reset: Convert ipq4019 driver to a generic Qcom driver
Since the base functionality remains the same for a reset driver on Qcom
SoCs, so leverage that to convert ipq4019 specific reset driver to a
generic Qcom reset driver. With that one just need to provide SoC specific
reset table.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26 10:55:45 -04:00
Sumit Garg
0b746d287c phy: Add support for drivers to enable USB on QCS404 SoC
QCS404 SoC supports two types of PHY, one supports high speed mode or
USB2 PHY and the other supports super speed mode or USB3 PHY. So add
corresponding PHY drivers.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26 10:55:45 -04:00
Sumit Garg
23ba5f34c8 phy: Move qcom SoCs specific phy drivers to qcom folder
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2022-08-26 10:55:45 -04:00
Davidson K
42f051ceb6 arm: total_compute: enable psci
psci is used for system reset

Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
2022-08-26 10:55:45 -04:00
Jayesh Choudhary
11d8439e09 configs: j721s2_evm_a72_defconfig: fix the bootcmd
Remove the main_cpsw0_qsgmii_phyinit variable from the boot
command as there is no ethernet firmware in j721s2.

Fixes: 8886341aa6 ('configs: j721s2_evm_a72_defconfig: Add A72 specific defconfig')
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
2022-08-26 10:55:45 -04:00
Tom Rini
a2aa7d6550 Merge commit 'ac30d240dbb520d0980f0687630feb702a14f51a' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash into next
Re-sync again on some linux part, add some fixes for fsl_elbc from
Pali and switch
imx8mn bsh to use nand base ident

For nand subsystem tested on:
 - imx8mn  Macronix MX30LF4G18AC
 - P2020 based board Turris 1.1 for fsl_elbc
2022-08-24 17:30:29 -04:00
Tom Rini
aea087a665 Merge https://source.denx.de/u-boot/custodians/u-boot-marvell
- kirkwood: pogo_v4 & nsa310s: Add distro boot (Tony)
- kirkwood: add DM timer support and use it on lsxl boards (Michael)
- kirkwood: convert the Buffalo Linkstation LS-CHLv2 and XHL boards
  to DM (Michael)
- mvebu: turris_mox/omnia: misc improments (Pali)
- mvebu: mbus: Fix mbus driver to work also after U-Boot relocation (Pali)
2022-08-23 15:44:54 -04:00
Tom Rini
1247c35c80 configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-08-23 15:24:14 -04:00
Michael Walle
560a5c3bb3 board: lsxl: update the README
Update the board's README to reflect all the recent changes.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:40:34 +02:00
Michael Walle
5dbf2f0de7 board: lsxl: disable eth0
The board has only one network interface. The linux kernel will
gracefully skip a the ethernet interface if no connected PHY could be
probed. u-boot on the other hand will throw an error message. The kernel
device tree is about to be fixed. For now, just disable the ethernet
interface in our -u-boot.dtsi.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:40:27 +02:00
Michael Walle
d9055e8656 board: lsxl: convert to CONFIG_TIMER
Enable the orion timer driver and we are good.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:40:23 +02:00
Michael Walle
7e3084eda4 board: lsxl: convert to DM_SERIAL
DM_SERIAL needs early malloc. The on-chip RAM is pretty tight, it's only
2kiB, with DM_SERIAL enabled, this doesn't work anymore. Fortunately for
us, we don't need the on-chip RAM because the DRAM is already
initialized before u-boot starts. Just put the early malloc area there
and use the default early malloc size.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:40:16 +02:00
Michael Walle
cb75d02ab1 board: lsxl: convert to DM_ETH
Just enabling the Kconfig option for DM_ETH and DM_MDIO is enough.
Additionally, we can remove the old hardcoded config.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:40:11 +02:00
Michael Walle
7c9bd92eea board: lsxl: convert to DM_GPIO
Use the new mvebu GPIO driver and convert all the function calls to the
former kirkwood GPIO driver. This means that we are now using the LED
uclass and the regulator uclass. Unfortunately, the GPIO LED doesn't
offer a blinking method. Thus we are now stuck with solid on and off
states, which makes debugging a bit harder. Also, there is no GPIO fan
driver for now.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:40:06 +02:00
Michael Walle
aa088beac3 board: lsxl: make last resort recovery more reliable
If something is wrong with the environment, we cannot rely on a proper
u-boot operation anymore. In fact, it is possible, that we never reach
misc_init_r() with a broken environment.

Also don't enable the netconsole by environment settings. This way the
user don't have to reconfigure the environment. Instead the network
console is only enabled when the push button is pressed during boot.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:40:00 +02:00
Michael Walle
18794c192a board: lsxl: enable ATAGS support
We still need to be able to boot legacy images. Esp. the debian
installer will have a kernel with an appended DTB.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:39:55 +02:00
Michael Walle
f5631b2c84 board: lsxl: use proper *_r variables
Use the common kernel_addr_r, ramdisk_addr_r and fdt_addr_r variable
names.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:39:49 +02:00
Michael Walle
148b3aef9a board: lsxl: reorder image loading and remove ramdisk_len
We can load the ramdisk as the last step. This way we don't have to set
the intermediate variable 'ramdisk_len' and can remove it.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:39:45 +02:00
Michael Walle
111e1e110b board: lsxl: use CONFIG_DEFAULT_FDT_FILE
Drop our own CONFIG_FDTFILE handling in favor of the generic
CONFIG_DEFAULT_FDT_FILE one.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:39:41 +02:00
Michael Walle
7717c2faf8 board: lsxl: automatically select CONFIG_MISC_INIT_R
The board code needs this to be set. Otherwise, the recovery mechanism
doesn't work. Therefore, select this option automatically with the
board.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:39:36 +02:00
Michael Walle
b6a0683fe6 board: lsxl: remove unused header files
Cleanup the included header files in the board code. These are all
leftovers from earlier days.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:39:31 +02:00
Michael Walle
48f80e28a2 board: lsxl: remove CONFIG_ENV_OVERWRITE
This is not needed. The user can force setting the variables with
"setenv -f".

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:39:27 +02:00
Michael Walle
857065403a board: lsxl: remove eraseenv script
This is not needed. The user can do a "env default -f -a".

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:39:22 +02:00
Michael Walle
29c670b70f board: lsxl: remove unused features
Make the binary smaller by removing unused features.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:39:16 +02:00
Michael Walle
a39f3dc351 board: lsxl: limit size to 384kiB
The board only has a 4Mbit flash and two sectors are reserved for the
u-boot environment and the device tree.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:39:11 +02:00
Michael Walle
1b34339c50 button: gpio: add DM_GPIO dependency
The gpio-button driver depends on DM_GPIO, add it to Kconfig to avoid
build errors.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:39:06 +02:00
Michael Walle
e9e73d78a8 timer: add orion-timer support
Add timer support for Kirkwood and MVEBU devices.

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:39:00 +02:00
Michael Walle
78c9b85df8 arm: kirkwood: make it CONFIG_TIMER aware
If we switch to CONFIG_TIMER, we don't need the legacy timer macros and
functions anymore. Add the proper guards to exclude them from compiling.

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:38:54 +02:00
Pali Rohár
f395cf9cac arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register
Bit 21 in SAR register specifies if TCLK is running at 166 MHz or 200 MHz.
This information is undocumented in public Marvell Kirkwood Functional
Specifications [2], but is available in Linux v3.15 kirkwood code [1].

Commit 8ac303d49f ("arm: kirkwood: Do not overwrite CONFIG_SYS_TCLK")
broke support for Marvell 88F6281 SoCs because it was expected that all
those SoCs have TCLK running at 200 MHz as specified in Marvell 88F6281
Hardware Specifications [3].

Fix broken support for 88F6281 by detecting CONFIG_SYS_TCLK from SAR
register, like it was doing Linux v3.15.

[1] - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/mach-kirkwood/common.c?h=v3.15#n542
[2] - https://web.archive.org/web/20130730091033/http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
[3] - https://web.archive.org/web/20120620073511/http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf

Update by Stefan 2022-08-23:
- Fix compilation error for ds109

Fixes: 8ac303d49f ("arm: kirkwood: Do not overwrite CONFIG_SYS_TCLK")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:38:47 +02:00
Michael Walle
616278bd2c time: move the CONFIG_SYS_TIMER_RATE handling to the compiler
CONFIG_SYS_TIMER_RATE might be a dynamic value, i.e. a function call
instead of a static value, thus it has to be evaluated at runtime. If it
is a static value, the compiler should be able to optimize the unused
branches out.

This will be needed for kirkwoods dynamic CONFIG_SYS_TCLK setting.

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:38:30 +02:00
Tony Dinh
7875f8019c arm: kirkwood: nsa310s: Add Distro boot capability
- Add distro boot to board include file and deconfig file
- Miscellaneous changes:
	- Remove Gerald from maintainer list (email bounced)
	- Add CONFIG_SUPPORT_PASSING_ATAGS and friends to support legacy
	kernel method of booting (e.g. OpenWrt) with appended DTB.
	- Add CONFIG_UBIFS_SILENCE_MSG to reduce binary size.

Note that this patch is depended on the following patch:
https://patchwork.ozlabs.org/project/uboot/patch/20220807192709.21717-1-pali@kernel.org/

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
2022-08-23 12:35:37 +02:00
Pali Rohár
5692e5b244 arm: mvebu: mbus: Fix mbus driver to work also after U-Boot relocation
mbus driver is initialized from arch_cpu_init() callback which is called
before relocation. This driver stores lot of functions and structure
pointers into global variables, so it is data position dependent.

Therefore after relocations all pointers are invalid and driver does not
work anymore as all pointers referes to the old memory, which overlaps with
CONFIG_SYS_LOAD_ADDR and ${loadaddr}.

For example U-Boot fuse command crashes if loadaddr memory is cleared or
rewritten by some image loaded by U-Boot load command.

  mw.w ${loadaddr} 0x0 10000
  fuse read 0 1 2

Fix this issue by removing of all mbus global variables in which are stored
pointers to structures or functions which changes during relocation. And
replace it by direct function calls (not via pointers). With this change
fuse command finally works.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:35:37 +02:00
Pali Rohár
c02eff8fcf arm: mvebu: turris_mox: Set "sfp" label in eth1 DT node when only Mox SFP is detected
When Mox SFP module is connected after Topaz or Peridot module then port DT
node already contains "sfp" label. But Mox SFP module can be connected also
without Topaz or Peridot module in which case it is connected directly into
he eth1 DT node, which is without any label. So add "sfp" label into eth1
DT node in this case.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:35:37 +02:00
Pali Rohár
455f55e4a3 arm: mvebu: turris_omnia: Show MCU version
There are already more MCU firmware versions for Turris Omnia in
production, so display git commit (version) of the MCU firmware during
U-Boot startup. It will help to identify what version of MCU firmware is
Turris Omnia using.

MCU firmware for Turris Omnia is open source and available at website:
https://gitlab.nic.cz/turris/hw/omnia_hw_ctrl

It can be updated from running system via i2c bus with this tool:
https://gitlab.nic.cz/turris/omnia-mcutool

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 12:35:37 +02:00
Tony Dinh
5a86d67e31 arm: kirkwood: pogo_v4: Add Distro boot capability
- Add distro boot to board include file and deconfig file
- Miscellaneous changes:
	- Add CONFIG_SUPPORT_PASSING_ATAGS and friends to support legacy
	kernel method of booting (e.g. OpenWrt) with appended DTB.
	- Add CONFIG_LTO and CONFIG_UBIFS_SILENCE_MSG, and disable some
	unused configs	to reduce binary size.

Note that this patch is depended on the following patch:
https://patchwork.ozlabs.org/project/uboot/patch/20220807192709.21717-1-pali@kernel.org/

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
2022-08-23 10:48:59 +02:00
Pali Rohár
397626ced6 arm: mvebu: Define env_sf_get_env_addr() for all Armada boards in SPL
SPI0 CS0 Flash is mapped to address range 0xD4000000 - 0xD7FFFFFF by BootROM.
Proper U-Boot removes this direct mapping. So it is available only in SPL.
This applies for all 32-bit Armada BootROMs. SPL mvebu code is used only on
32-bit Armada SoCs. So move env_sf_get_env_addr() function from Turris
Omnia board to common SPL mvebu code and add proper checks for SPI0 CS0.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-23 10:48:59 +02:00
Tom Rini
1d323d8306 Prepare v2022.10-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-08-22 18:54:48 -04:00
Tom Rini
850ac7ceb7 binman fixes for various things
binman clean-up of compression and addition of utilities
 -----BEGIN PGP SIGNATURE-----
 
 iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAmMBd6MRHHNqZ0BjaHJv
 bWl1bS5vcmcACgkQfxc6PpAIreau9wf/YQD9GsZh1HrgG5EGfaMN+NV4rGkSywZX
 8AxKCscTiLVtCzUlYOEZ3mFRpli9RJ5H9eWvwcOx8GyyHkvsIdGlzdvG4PZSLd/T
 bOqqtkAZxEDi0ZzQAd0bqKQ9D2ujPbatmElhBNMxyMap+Jkww7LDJvIpCKXSsGEN
 881a+CafAQfYICw9TtlVLzn+WirLiIXtWMxmCuZH3hrxFVjU6T1vxoyMPIBIEzkt
 SMAxRRvzjLwmYEajlDlAFwykcHJCdGbCyyoBQg1OYEIl/XZYyEN2IzdiiJFzAxn+
 QA4ctAQk4gASnZfoSzTWgbeyLZqqYy8j0+z+wZaF/+dp/veZWQBLlg==
 =Kn1x
 -----END PGP SIGNATURE-----

Merge tag 'dm-pull-20aug22' of https://source.denx.de/u-boot/custodians/u-boot-dm

binman fixes for various things
binman clean-up of compression and addition of utilities
2022-08-22 12:41:07 -04:00
Tom Rini
61e887fb9c Merge branch '2022-08-22-platform-removals-CI-updates'
- Remove a few more platforms, update CI to Ubuntu 22.04 and perform
  some other other minor updates to Azure.
2022-08-22 12:32:52 -04:00
Tom Rini
b6d4e0850b CI: Move to Ubuntu 2022.04 "Jammy" for CI base
- We now have a new enough sbsigntools in the distro, stop building.
- Use the 20220801 tag for Jammy.
- Move to pygit2 1.9.2 (current version) as the old one doesn't build on
 "Jammy".
- Add the working directory to the list of safe directories for git.
- Move to pytest 6.2.5 to address other issues.
- This move exposed a number of minor issues in the existing scripts we
  used within CI to perform the jobs themselves.  The most notable changes
  here involve using 'set +e / set -e' to enforce when we should or should
  not make non-zero buildman status be a fatal error.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-08-22 08:01:34 -04:00