Commit graph

24162 commits

Author SHA1 Message Date
Konrad Dybcio
3ead661633
clk/qcom: handle resets and clocks in one device
Qualcomm's clock controller blocks actually do much more than it
says on the tin.. They provide clocks, resets and power domains.
Currently, U-Boot requires one to spawn 2 separate devices for
controlling clocks and resets, both spanning the same register space.
Refactor the code to make it work with just a single DT node, making
it compatible with upstream Linux bindings and dropping the dedicated
reset driver in favour of including it in the clock driver.

Heavily inspired by Renesas code for a similar hw block.

[caleb: moved drivers to clk/qcom, added reset driver and adjusted bind
logic. Imported qcom,gcc-ipq4019.h from Linux]

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:23 +00:00
Caleb Connolly
fac2121a47
clk/qcom: move ipq4019 driver from mach-ipq40xx
This driver is just a stub, but it's necessary to support the upcoming
reset driver changes.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:23 +00:00
Caleb Connolly
a623c14f43
clk/qcom: move from mach-snapdragon
Clock drivers don't belong here, move them to the right place and
declutter mach-snapdragon a bit.

To de-couple these drivers from specific "target" platforms, add
additional config options to enable each clock driver gated behind a
common CLK_QCOM option and enable them by default for the respective
targets. This will make future work easier as we move towards a generic
Qualcomm target.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-01-16 12:26:23 +00:00
Marek Vasut
a1997a3892 clk: renesas: Synchronize RZ R8A774E1 RZ/G2H clock tables with Linux 6.6.3
Synchronize RZ R8A774E1 RZ/G2H clock tables with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
94c2f5b622 clk: renesas: Synchronize RZ R8A774C0 RZ/G2E clock tables with Linux 6.6.3
Synchronize RZ R8A774C0 RZ/G2E clock tables with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
0e2433efe0 clk: renesas: Synchronize RZ R8A774B1 RZ/G2N clock tables with Linux 6.6.3
Synchronize RZ R8A774B1 RZ/G2N clock tables with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
e811b03e4a clk: renesas: Synchronize RZ R8A774A1 RZ/G2M clock tables with Linux 6.6.3
Synchronize RZ R8A774A1 RZ/G2M clock tables with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
f26739e23b clk: renesas: Synchronize R-Car R8A77995 D3 clock tables with Linux 6.6.3
Synchronize R-Car R8A77995 D3 clock tables with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
aa580d8c80 clk: renesas: Synchronize R-Car R8A77990 E3 clock tables with Linux 6.6.3
Synchronize R-Car R8A77990 E3 clock tables with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
25558301d2 clk: renesas: Synchronize R-Car R8A77965 M3-N clock tables with Linux 6.6.3
Synchronize R-Car R8A77965 M3-N clock tables with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Marek Vasut
dca7e0c40e clk: renesas: Synchronize R-Car R8A77960 M3-W and R8A77961 M3-W+ clock tables with Linux 6.6.3
Synchronize R-Car R8A77960 M3-W and R8A77961 M3-W+ clock tables with Linux 6.6.3,
commit bd3a9e5771a8b332f466d06f7c130a69cab0d526 .

Add ZG clock macro into rcar-gen3-cpg.h to cover the new clock type .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-01-14 20:35:21 +01:00
Chunfeng Yun
4f6dd25800 phy: phy-mtk-tphy: add properties for phy tuning
Add properties to improve eye diagram which sometimes need adjust
some parameters of u2phy;
Add a property to tune disconnect threshold;

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
2024-01-11 21:19:25 -05:00
Tom Rini
2ee7a8ec6f Merge patch series "net fixes prior lwip"
Maxim Uvarov <maxim.uvarov@linaro.org> says:

Add small net fixes prior lwip patches.
2024-01-11 11:25:07 -05:00
Maxim Uvarov
c64a1e43ac driver/net/rtl8139: remove debug print
debug print delays reset of the driver. Finally I see
bunch of "rx error FFFF" errors in the screen. CI can
not handle many prints. While network works fine there

Reproduced with:
make CROSS_COMPILE=sh2-linux- r2dplus_defconfig all
qemu-system-sh4 -M r2d -nographic -serial null \
-serial mon:stdio -net user,tftp=`pwd` \
-net nic,model=rtl8139 -kernel ./u-boot.bin

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-11 11:24:58 -05:00
Maxim Uvarov
f5ead4c5fb net/smc911x: fix return from smc911x_send
return value of smc911x_send is ignored, but on sucesseful
send we need return 0 and or error -ETIMEOUT, not opposite.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-11 11:24:58 -05:00
Tom Rini
d3dba8a28b Merge tag 'u-boot-dfu-20240111' of https://source.denx.de/u-boot/custodians/u-boot-dfu
u-boot-dfu-20240111

- Implement fastboot multi-response. This allows multi-line response and
  most importantly, finally adds support for fastboot getvar all command.

- New 'fastboot oem console' command. Useful for debugging to send data
  the u-boot shell via fastboot

- Console recording fixes
2024-01-11 10:03:51 -05:00
Tom Rini
344667db64 Pull request smbios-2024-04-rc1
* make table_compute_checksum() arguments const
 * remove duplicate function verify_checksum()
 * enable setting processor family > 0xff
 * set correct SMBIOS processor family value for RISC-V
 * avoid importing ofnode.h in smbios.h
 * provide a UEFI tool to dump SMBIOS table
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEK7wKXt3/btL6/yA+hO4vgnE3U0sFAmWdDaQACgkQhO4vgnE3
 U0taKhAApj9/lSw6naB4L+/1x+caPIsrwmkp8muBiKlF3u9wXv7PoP+cpLe1+upE
 RlxiWtmN7nlBJqr7wdKQUGzL16zNQY4yWQbZz47tVUtcJ/l9feF2otcAI8OTcJz+
 GA9FR0dXWWFFrfIfCbJ/AyOA71KnzYS9Z9k95ek0ONpXC8uSMgdUn/tL4TO2ccBU
 Uz9EO2fjYTBTUu2dY+iOoc8Pfi3FVk7KiASIijSgs4lkNqx/xgOXf5cP+LjvUOkV
 N7hFtaIblewjPm6JzEhHRB/YaoTObolQw30HQQroz5vHhYhkmpEU15e4BhSPhsud
 ZQ8TZr9rm6nPrkeOaDSdbF7gBKE1IrMHKZnQStDq+40ADX5TOTlKvNMiVQhpt7Mg
 BIBbYG/k1SQQarSaZWaMlWVzZuAoN8dMS/NZXH2UUkS/OxxBAyR8bTxLapJIwZGP
 OrBCzR9AZzubXBpI2CzE3k1b5UyTVEBFkzDC6BXg+FbgDzaqWUPOW00kQhn1zpMM
 xajk1kXnedlhVQxtAquvwvdKS8OT5JGYRC+Obmfs8YZKp7F8Aw00C3Ex1Qvp4K6x
 45bxWBFboGLdPuZsZ/Vpsuvh4G5DLHoekHkFGOlbLHICq1WYXjnsgpLYtm9g5Ret
 y9WpUryayjjS0pGrQ6OAgr59+LODYic3rRYI595CtxDKNu4DkZ8=
 =oHtG
 -----END PGP SIGNATURE-----

Merge tag 'smbios-2024-04-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request smbios-2024-04-rc1

* make table_compute_checksum() arguments const
* remove duplicate function verify_checksum()
* enable setting processor family > 0xff
* set correct SMBIOS processor family value for RISC-V
* avoid importing ofnode.h in smbios.h
* provide a UEFI tool to dump SMBIOS table
2024-01-09 12:50:04 -05:00
Tom Rini
0727b10f6b Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-samsung 2024-01-09 10:59:29 -05:00
Sam Protsenko
5bf111b77c pinctrl: exynos: Convert to use livetree API for fdt access
Use counterpart dev_read_* functions instead of fdt* ones. It fixes
checkpatch warnings like this:

    WARNING: Use the livetree API (dev_read_...)
    #54: FILE: drivers/pinctrl/exynos/pinctrl-exynos.c:137:
        pinvals[idx] = fdtdec_get_int(fdt, node,

and also makes it possible to avoid using the global data pointer in the
driver.

No functional change.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-01-09 10:59:28 -05:00
Sam Protsenko
da06fefcef pinctrl: exynos: Reduce variables scope
Pull some variables declared in exynos_pinctrl_set_state() into its
loop, to reduce their scope. Style commit, no functional change.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-01-09 10:59:28 -05:00
Sam Protsenko
aad0f6abf1 pinctrl: exynos: Refactor handling the pin related dt properties
All pin related dt properties (pin-function, pin-pud and pin-drv) are
handled in a very similar way. Get rid of that code duplication by
extracting the corresponding data knowledge into an actual data
structure (array), and then just iterating over it.

No functional change, it's a refactoring commit.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-01-09 10:59:28 -05:00
Sam Protsenko
2ed4ba83fb pinctrl: exynos: Support different register types in pin banks
Get rid of hard-coded register offsets and widths. Instead provide a way
for pinctrl drivers to specify different pin bank register offsets and
widths. This in turn makes it possible to add support for new SoCs that
have registers with offset/width values different than generic ones
already available in pinctrl-exynos driver.

Offset constants (now unused in pinctrl-exynos.c) are moved to
pinctrl-exynos7420 driver, which is the single user of those constants.

The design of this patch follows Linux kernel pinctrl-exynos driver
design, in terms of added data structures and types. This patch doesn't
add support for any new SoCs and shouldn't introduce any functional
changes.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-01-09 10:59:28 -05:00
Sam Protsenko
2dfcb250d0 pinctrl: exynos: Rework pin_to_bank_base() to obtain data by name
Rework pin_to_bank_base() function to obtain bank data structure by bank
name instead of getting bank base address by pin name, and rename it to
get_bank() to reflect this change. This in turn leads to the extraction
of parse_pin(), so the caller has to use it before calling get_bank().

No functional change. This is a refactoring commit which prepares
pinctrl driver code for handling different sizes of register fields,
which will be added next.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-01-09 10:59:28 -05:00
Sam Protsenko
58e84bf3d7 pinctrl: exynos: Extract pin parsing code into a separate function
Next commits are going to re-design the pin_to_bank_base() function and
its usage in a way that the pin parsing code will be called separately.
Extract it into a separate function first, as a refactoring commit.

No functional change.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-01-09 10:59:28 -05:00
Sam Protsenko
7b34206e3f pinctrl: exynos: Improve coding style
Style commit, no functional change.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-01-09 10:59:28 -05:00
Ion Agorria
16f79dd4cd fastboot: add oem console command support
"oem console" serves to read console record buffer.

Signed-off-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20240105072212.6615-7-clamor95@gmail.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-01-09 14:58:33 +01:00
Ion Agorria
475aa9aabe fastboot: implement "getvar all"
This commit implements "fastboot getvar all" listing
by iterating the existing dispatchers that don't require
parameters (as we pass NULL), uses fastboot multiresponse.

Signed-off-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20240105072212.6615-3-clamor95@gmail.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-01-09 14:58:33 +01:00
Ion Agorria
85fcd69dc2 fastboot: multiresponse support
Currently u-boot fastboot can only send one message back to host,
so if there is a need to print more than one line messages must be
kept sending until all the required data is obtained. This behavior
can be adjusted using multiresponce ability (getting multiple lines
of response) proposed in this patch.

Signed-off-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20240105072212.6615-2-clamor95@gmail.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-01-09 14:58:33 +01:00
Heinrich Schuchardt
1b6228f28d cpu: riscv: set correct SMBIOS processor family value
The SMBIOS specification requires to set the processor family in the type 4
(Processor Information) table to specific values depending only on the
bitness of the system (0x200 for RV32 and 0x201 for RV64).

With this patch dmidecode shows

    Handle 0x0004, DMI type 4, 48 bytes
    Processor Information
	Socket Designation: Not Specified
	Type: Central Processor
	Family: RV64

for qemu-riscv64_smode_defconfig.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-01-09 10:09:15 +01:00
Heinrich Schuchardt
1351cd3b4b rng: detect RISC-V Zkr RNG device in bind method
The existence of devices should be checked in the bind method and not in
the probe method. Adjust the RISC-V Zkr RNG driver accordingly.

Use ENOENT (and not ENODEV) to signal that the device is not available.

Fixes: ceec977ba1 ("rng: Provide a RNG based on the RISC-V Zkr ISA extension")
Reported-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-01-09 07:37:05 +01:00
Heinrich Schuchardt
badef4cd4a rng: fix ARMv8.5 RNDR driver
In different parts of our code we assume that the first RNG device is the
one to be used. Therefore it is preferable to detect the availability of
the RNDR register already in the bind method.

For signaling the non-existence of a device the driver model requires using
ENOENT (and not ENODEV).

Fixes: 31565bb0aa ("driver: rng: Add DM_RNG interface for ARMv8.5 RNDR registers")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
2024-01-09 07:36:18 +01:00
Heinrich Schuchardt
638cc36348 acpi: enable writing ACPI tables on QEMU
Invoke write_acpi_tables() via EVT_LAST_STAGE_INIT on QEMU except on X86.
X86 calls write_acpi_tables() in write_tables().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-07 13:49:15 -07:00
Heinrich Schuchardt
27a66fc3f3 acpi: carve out qfw_acpi.c
Move the code related to copying tables from QEMU to a separate code
module.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-01-07 13:49:15 -07:00
Heinrich Schuchardt
b2f088c121 acpi: Kconfig symbol CONFIG_QFW_ACPI
We have two implementations of write_acpi_tables(). One for writing ACPI
tables based on ACPI_WRITER() entries another based on copying tables from
QEMU.

Create a symbol CONFIG_QFW_ACPI that signifies copying ACPI tables from
QEMU and use it consistently.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-01-07 13:49:15 -07:00
Tom Rini
93a0138acb Prepare v2024.01-rc6
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmWVa0gACgkQFHw5/5Y0
 tyyxaAv/XwG8mzltTwMHc65IHmeupJLhBPBJgrZyZPlHRWNThSKBcbtTKnJIxN/j
 ZAakyMFykkZCs+xfpckjzyY9CA2B5pkZ1RMKj5AgiWOH3+vbCPN92/wzs+NVpN78
 ek1Ht2McIM51pdLYe50hYuqIU/Y8rWsptpK9/t2rdGSa79G70uo3DTGNYVyGcLNF
 b63B42FLnu11+MkyfN7z2Q3y0OlKpT/oZHb6R4rWNWNQqDbpficpEvoJdA1LzeAg
 GouCZ7Ib1qffoydbj1wruYT7Pkg9AsPs1tNa2eENJldfthlx9PFrW4be1t8bRput
 WnpbSbxRBw1sS8dukjCi0st+lhUNyuapT2J7hmtuXSMVprxK0UzQMbdGo9suxSlT
 DwTuTsNvwGzIk5E4SRZZI+xSUqpeCKnnVC7OLcqGKSAsoZIv5s5Fq/VgIIQ7gzNY
 LA+kdSjVeiKfsPzXCXCvILMqffwS8J9zIYdoxmq4o9XsmksabDCDUZpEy9IQ3gbB
 6MPxZgnj
 =Sqkn
 -----END PGP SIGNATURE-----

Merge tag 'v2024.01-rc6' into next

Prepare v2024.01-rc6
2024-01-03 09:22:47 -05:00
Zong Li
64e8482f1c cache: add sifive private L2 cache driver
This driver is currently responsible for enabling the clock gating
feature of SiFive pre core's private L2 cache.

Signed-off-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-12-27 17:28:57 +08:00
Jim Liu
f03e3f0b8b spi: npcm_pspi: Fix the wrong clock divider calculation
Fix the wrong clock divider calculation.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2023-12-26 14:41:46 -05:00
Caleb Connolly
d3db45cb9c iommu: add qcom-hyp-smmu
Add a basic implementation of the ARM SMMU. This driver is intended for
use on Qualcomm platforms where the SMMU has been configured by a previous
bootloader, cannot be turned off, and doesn't support BYPASS streams.
It keeps all existing stream mappings and only creates new ones for stream
ids that aren't already configured.

This driver is necessary to support peripherals that perform DMA which
weren't configured by the previous stage bootloader (for example USB).
It works by allocating a context bank using identity mapping (as U-Boot
doesn't use virtual addresses).

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2023-12-21 11:59:49 -05:00
Caleb Connolly
76c53dad6b iommu: add a connect op
Add an optional iommu callback to be invoked before a device probes.
This can be used to configure the IOMMU in preparation for the device
(e.g. by allocating a context bank)

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2023-12-21 11:59:49 -05:00
Caleb Connolly
e96ecbe719 iommu: fix compilation when CONFIG_PCI disabled
The dev_pci_iommu_enable() function is only available when CONFIG_PCI is
enabled, replace the runtime check with a preprocessor one to fix
compilation with pci disabled.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2023-12-21 11:59:49 -05:00
Tom Rini
ac2370a856 global: Remove duplicate common.h inclusions
These files include <common.h> twice. Start by removing the second
inclusion of the file.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-12-21 08:54:37 -05:00
Tom Rini
cb3ce95401 global: Drop common.h inclusion
In order to make it easier to move on to dropping common.h from code
directly, remove common.h inclusion from the rest of the header file
which had been including it.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-12-21 08:54:37 -05:00
Tom Rini
7776960f4d arm: Partial cleanup and audit usage of <config.h>
We need to include <config.h> directly when a file needs to have
something such as CFG_SYS_SDRAM_SIZE referenced as this file is not
automatically globally included and is most commonly indirectly included
via common.h.  Remove most cases of arm including config.h directly, but
add it where needed. This includes a few board-specific fixes.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-12-21 08:54:37 -05:00
Tom Rini
b106961c2e global: Restrict use of '#include <linux/kconfig.h>'
In general terms, we -include include/linux/kconfig.h and so normal
U-Boot code does not need to also #include it. However, for code which
is shared with userspace we may need to add it so that either our full
config is available or so that macros such as CONFIG_IS_ENABLED() can be
evaluated. In this case make sure that we guard these includes with a
test for USE_HOSTCC so that it clear as to why we're doing this.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-12-21 08:54:05 -05:00
Tom Rini
f7655af980 - Add support for new GXL MDIO mux, with driver and Linux DT sync from v6.4
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmWCxMoACgkQd9zb2sjI
 SdFG2A//Zc/bbiy8GPZ5Hi3hgB90H5xVjsivgMW2Riw5ZiMiC3v8klKlzbKprzNy
 1Zf4002A/yn470YIDInUFEJVc1ZeGbyMj9u7HDId+/4FhtdXVWGjON+lINlShrWL
 FX9ITBbxBKEfno6uoDD1Gy5xq1LFl3kXSeingGZnm3W+b9FJb9mo2X1UgUE70Pkp
 Kw/dyL6ZVmvAGnuuonc55Kxgoc5m92Ww2wJxbLMCYmPwqHRveduGZfS6nQxJnJU7
 XT8fOK5GsAbYWMnI63Nf5Bue6yTCKJH8CE7Kg1mJjMNm+Ictqo/aCQX3S1nZiBL0
 CHvHOhrck3Db5+AfmKQDwYofb/Haaf97auf1sGCi/PVnmLn1c3BPON3qyK2Qvjbx
 1WAvWea5I97Pv8hMGEPecTMACgTF3XOJIBGXMuAc5ScO3rlckeSZdb/m5/3nHEei
 ZcwfxNMw8OqECnIG/13NoYkOGEWG22DtoNuD75ESztKGAz3YL5Rfr+siZniyGNsq
 9ZdFVf7AQwDSRUmcpFN9ETawfU8Y9rK7fp5L6yUTTCKtQBL1+qUPyYb2KvH1LvfH
 PKECA9D6XKpdgLHjyAJrMHlpaOQiqBDAUvZrdDGZWHMaKSL8XXZKPaj2a124RqtW
 NZfri43xj5a/AeeMBAkRrz3BzFfXn5EGoGdbduq+HXnJTaMCrdI=
 =aBS6
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-amlogic-next-20231220' of https://source.denx.de/u-boot/custodians/u-boot-amlogic into next

- Add support for new GXL MDIO mux, with driver and Linux DT sync from v6.4
2023-12-20 08:34:12 -05:00
Svyatoslav Ryhel
b98bed0e9c drivers: pinctrl: tegra: incorporate existing code
Move all existing pinmux and funcmux code into a dedicated folder in
pinctrl to simplify further maintenance.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2023-12-19 21:24:30 +02:00
Svyatoslav Ryhel
91069320a5 drivers: pinctrl: create Tegra DM pinctrl driver
The existing pinctrl driver available for Tegra SOC is well
designed, but it lacks DM support. Let's add a DM compatible
overlay, which allows use of the device tree, along with preserving
backward compatibility with all existing setups and the ability
to use it in SPL board configuration stage.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2023-12-19 21:24:30 +02:00
Peter Geis
34aeb386af mmc: tegra: use max-frequency from device tree if provided
The driver currently hard-codes the max freqency for the sdhci
controllers. If the controller is unable to operate at the max
frequency, the mmc card will not be available on the first scan.
Subsequent scans will eventually find a working combination.

Fix this by allowing the driver to check for the max-frequency
property and default to the original value if it doesn't exist.

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2023-12-19 21:24:12 +02:00
Svyatoslav Ryhel
c03cd98d1a drivers: gpio-uclass: support PMIC GPIO children
UCLASS_PMIC may have GPIO children without exposed fdt node,
in this case if requesting fails, check if uclass is PMIC.

Restrict build for supported devices only to save those precious
bytes on devices with no spare memory.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2023-12-19 21:23:47 +02:00
Svyatoslav Ryhel
52b6bbf162 drivers: gpio: implement PALMAS GPIO cell
Add gpio driver for TI Palmas series PMIC. This has 8 gpio which can
work as input/output.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2023-12-19 20:53:53 +02:00