]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
4 months agoMerge tag 'v2024.10-rc3' into next
Tom Rini [Tue, 20 Aug 2024 00:24:58 +0000 (18:24 -0600)]
Merge tag 'v2024.10-rc3' into next

Prepare v2024.10-rc3

4 months agoPrepare v2024.10-rc3
Tom Rini [Mon, 19 Aug 2024 23:15:10 +0000 (17:15 -0600)]
Prepare v2024.10-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
4 months agoMerge patch series "clk: mediatek: mt7622: clk migration for OF_UPSTREAM"
Tom Rini [Mon, 19 Aug 2024 22:15:47 +0000 (16:15 -0600)]
Merge patch series "clk: mediatek: mt7622: clk migration for OF_UPSTREAM"

Christian Marangi <ansuelsmth@gmail.com> says:

These are all the required patches to migrate clk and correctly support
OF_UPSTREAM. This will align the clk index to upstream to support the same
clk implementation with downstream and upstream DTS.

4 months agoclk: mediatek: mt7622: add missing A1/2SYS clock ID
Christian Marangi [Sat, 3 Aug 2024 08:43:26 +0000 (10:43 +0200)]
clk: mediatek: mt7622: add missing A1/2SYS clock ID

Add missing A1/2SYS clock ID just as a reference for OF_UPSTREAM
support. These clocks are not defined and are not usable as current
clock topckgen OPs doesn't support gates.

These special node won't ever be used by uboot hence just add them for
reference.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
4 months agoclk: mediatek: mt7622: add missing clock PERIBUS_SEL clock
Christian Marangi [Sat, 3 Aug 2024 08:43:25 +0000 (10:43 +0200)]
clk: mediatek: mt7622: add missing clock PERIBUS_SEL clock

Add missing PERIBUS_SEL clock to match upstream linux clk ID order. Also
convert pericfg to mux + gate implementation as now we have also mux on
top of gates.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7622: add missing clock PERI_UART4_PD
Christian Marangi [Sat, 3 Aug 2024 08:43:24 +0000 (10:43 +0200)]
clk: mediatek: mt7622: add missing clock PERI_UART4_PD

Add missing clock PERI_UART4_PD for peri clock gates. This is needed to
match upstream linux clk ID in preparation for OF_UPSTREAM.
Also convert infracfg to mux + gate implementation as now we have mux on
top of gates.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7622: add missing clock MUX1_SEL
Christian Marangi [Sat, 3 Aug 2024 08:43:23 +0000 (10:43 +0200)]
clk: mediatek: mt7622: add missing clock MUX1_SEL

Add missing infra clock MUX1_SEL needed for CPU clock. This is needed to
match the upstream clk ID order in preparation for OF_UPSTREAM.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7622: add missing clock define for MAIN_CORE_EN
Christian Marangi [Sat, 3 Aug 2024 08:43:22 +0000 (10:43 +0200)]
clk: mediatek: mt7622: add missing clock define for MAIN_CORE_EN

Add missing clock for MAIN_CORE_EN. This is a special clock as it's a
gate for the APMIXED clocks required as a parent for CPU clocks.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7622: move INFRA_TRNG to the bottom
Christian Marangi [Sat, 3 Aug 2024 08:43:21 +0000 (10:43 +0200)]
clk: mediatek: mt7622: move INFRA_TRNG to the bottom

Move INFRA_TRNG clock to the bottom of the clk ID to match upstream
linux order. This is in preparation of OF_UPSTREAM.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7622: rename AUDIO_AWB3 to AUDIO_AWB2
Christian Marangi [Sat, 3 Aug 2024 08:43:20 +0000 (10:43 +0200)]
clk: mediatek: mt7622: rename AUDIO_AWB3 to AUDIO_AWB2

Rename AUDIO_AWB3 to AUDIO_AWB2 to match upstream linux naming in
preparation for OF_UPSTREAM support.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7622: fix broken peri_cgs clk with XTAL parents
Christian Marangi [Sat, 3 Aug 2024 08:43:19 +0000 (10:43 +0200)]
clk: mediatek: mt7622: fix broken peri_cgs clk with XTAL parents

Fix broken peri_cgs clock with XTAL parents as they have wrong
definition of the parent type.

Correctly fix them and use CLK_PARENT_XTAL for them.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoMerge patch series "clk: mediatek: mt7986: clk migration for OF_UPSTREAM"
Tom Rini [Mon, 19 Aug 2024 22:15:13 +0000 (16:15 -0600)]
Merge patch series "clk: mediatek: mt7986: clk migration for OF_UPSTREAM"

Christian Marangi <ansuelsmth@gmail.com> says:

These are all the required patches to migrate clk and correctly support
OF_UPSTREAM. This will align the clk index to upstream to support the same
clk implementation with downstream and upstream DTS.

4 months agoclk: mediatek: mt7986: rename CK to CLK
Christian Marangi [Sat, 3 Aug 2024 08:40:48 +0000 (10:40 +0200)]
clk: mediatek: mt7986: rename CK to CLK

Rename each entry from CK to CLK to match the include in upstream kernel
linux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
4 months agoclk: mediatek: mt7986: convert to unified infracfg gates + muxes
Christian Marangi [Sat, 3 Aug 2024 08:40:47 +0000 (10:40 +0200)]
clk: mediatek: mt7986: convert to unified infracfg gates + muxes

Convert to infracfg gates + muxes implementation now that it's
supported.

Drop infracfg-ao nodes and rename all infracfg-ao clocks to infracfg.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: replace infracfg ID with upstream linux
Christian Marangi [Sat, 3 Aug 2024 08:40:46 +0000 (10:40 +0200)]
clk: mediatek: mt7986: replace infracfg ID with upstream linux

Replace infracfg clk ID with upstream linux version.

The same format is used here with the factor first, then mux and then
gates.

To correctly reference the gates in clk_gate function, define the
gates_offs value in clk_tree now that they are at an offset from mux and
factor.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: move INFRA_TRNG_CK to the bottom of the list
Christian Marangi [Sat, 3 Aug 2024 08:40:45 +0000 (10:40 +0200)]
clk: mediatek: mt7986: move INFRA_TRNG_CK to the bottom of the list

Move INFRA_TRNG_CK to the bottom of the list to have a 1:1 match with
upstream linux clock ID.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: comment out CK_TOP_A_TUNER as not used
Christian Marangi [Sat, 3 Aug 2024 08:40:44 +0000 (10:40 +0200)]
clk: mediatek: mt7986: comment out CK_TOP_A_TUNER as not used

Comment out CK_TOP_A_TUNER as not used and not defined in upstream
kernel linux. This is to permit support of OF_UPSTREAM and have a 1:1
match with upstream linux clock ID.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: drop 1/1 spurious factor for topckgen
Christian Marangi [Sat, 3 Aug 2024 08:40:43 +0000 (10:40 +0200)]
clk: mediatek: mt7986: drop 1/1 spurious factor for topckgen

Now that we can have advanced parent handling for mux, we can drop
spurious topckgen 1/1 factor. This is in preparation to make the clk
ID match the ID in upstream include for mt7986.

Drop the factor entry from mt7986-clk.h and reference to them in
mt7981.dtsi. Muxes and gates are updated to reference the apmixed clk
following how it's done in upstream kernel linux. Add relevant clk type
flag in clk_tree for apmixed.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: reorder TOPCKGEN factor ID
Christian Marangi [Sat, 3 Aug 2024 08:40:42 +0000 (10:40 +0200)]
clk: mediatek: mt7986: reorder TOPCKGEN factor ID

Reorder TOPCKGEN factor ID to put TOP_FACTOR first and then PLL. This is
to match how it's done in upstream kernel linux and in preparation for
OF_UPSTREAM support.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: rename TOPCKGEN factor clock to upstream naming
Christian Marangi [Sat, 3 Aug 2024 08:40:41 +0000 (10:40 +0200)]
clk: mediatek: mt7986: rename TOPCKGEN factor clock to upstream naming

Rename TOPCKGEN factor clock to upstream neaming.
Upstream kernel linux reference the factor clock for apmixedpll with the
"pll" suffix. Align the naming to the upstream naming format in
preparation for OF_UPSTREAM support.

Also rename rtc clock to drop the CB_ as upstream doesn't have that.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: fix typo for infra_i2c0_ck
Christian Marangi [Sat, 3 Aug 2024 08:40:40 +0000 (10:40 +0200)]
clk: mediatek: mt7986: fix typo for infra_i2c0_ck

Fix a typo for infra_i2c0_ck where 0 was misspelled as O.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: add missing entry for IPCIE_PIPE_CK infra gate
Christian Marangi [Sat, 3 Aug 2024 08:40:39 +0000 (10:40 +0200)]
clk: mediatek: mt7986: add missing entry for IPCIE_PIPE_CK infra gate

Add missing entry for IPCIE_PIPE_CK infra gate clock. Renumber the clock
order to match the expected offset in the gate array.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: drop 1/1 infracfg spurious factor
Christian Marangi [Sat, 3 Aug 2024 08:40:38 +0000 (10:40 +0200)]
clk: mediatek: mt7986: drop 1/1 infracfg spurious factor

Now that we can have advanced parent handling for mux, we can drop
spurious infracfg 1/1 factor. This is in preparation to make the clk
ID match the ID in upstream include for mt7986.

Drop the factor entry from mt7986-clk.h and reference to them in
mt7981.dtsi. Muxes and gates are updated to reference the topckgen clk
following how it's done in upstream kernel linux. Add relevant clk type
flag in clk_tree for infracfg and topckgen.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: fix wrong parent for INFRA_ADC_26M_CK
Christian Marangi [Sat, 3 Aug 2024 08:40:37 +0000 (10:40 +0200)]
clk: mediatek: mt7986: fix wrong parent for INFRA_ADC_26M_CK

Fix wrong parent for INFRA_ADC_26M_CK as should be INFRA_ADC_FRC_CK
instead of INFRA_CK_F26M. This is to match implementation on upstream
kernel linux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: rename 66M_MCK to SYSAXI_D2
Christian Marangi [Sat, 3 Aug 2024 08:40:36 +0000 (10:40 +0200)]
clk: mediatek: mt7986: rename 66M_MCK to SYSAXI_D2

Upstream kernel linux clock include use SYSAXI_D2 instead of 66M_MCK.
Rename this clock to the upstream kernel in preparation for support of
OF_UPSTREAM.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: rename CB_CKSQ_40M to TOP_XTAL
Christian Marangi [Sat, 3 Aug 2024 08:40:35 +0000 (10:40 +0200)]
clk: mediatek: mt7986: rename CB_CKSQ_40M to TOP_XTAL

Upstream kernel linux clock include use TOP_XTAL instead of CB_CKSQ_40M.
Rename this clock to the upstream kernel in preparation for support of
OF_UPSTREAM.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7986: fix wrong shift for PCIe clocks
Christian Marangi [Sat, 3 Aug 2024 08:40:34 +0000 (10:40 +0200)]
clk: mediatek: mt7986: fix wrong shift for PCIe clocks

Fix wrong shift for PCIe clocks. This cause the PCIe port to malfunction
as the gate clocks weren't correctly enabled.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoMerge patch series "clk: mediatek: mt7988: clk migration for OF_UPSTREAM"
Tom Rini [Mon, 19 Aug 2024 22:14:29 +0000 (16:14 -0600)]
Merge patch series "clk: mediatek: mt7988: clk migration for OF_UPSTREAM"

Christian Marangi <ansuelsmth@gmail.com> says:

These are all the required patches to migrate clk and correctly support
OF_UPSTREAM. This will align the clk index to upstream to support the same
clk implementation with downstream and upstream DTS.

4 months agoclk: mediatek: mt7988: rename CK to CLK
Christian Marangi [Sat, 3 Aug 2024 08:33:02 +0000 (10:33 +0200)]
clk: mediatek: mt7988: rename CK to CLK

Rename each entry from CK to CLK to match the include in upstream kernel
linux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
4 months agoclk: mediatek: mt7988: convert to unified infracfg gates + muxes
Christian Marangi [Sat, 3 Aug 2024 08:33:01 +0000 (10:33 +0200)]
clk: mediatek: mt7988: convert to unified infracfg gates + muxes

Convert to infracfg gates + muxes implementation now that it's
supported.

Drop infracfg-ao nodes and rename all infracfg-ao clocks to infracfg.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: replace clock ID with upstream linux
Christian Marangi [Sat, 3 Aug 2024 08:33:00 +0000 (10:33 +0200)]
clk: mediatek: mt7988: replace clock ID with upstream linux

Replace infracfg clk ID with upstream linux version.

The same format is used here with the factor first, then mux and then
gates.

To correctly reference the gates in clk_gate function, define the
gates_offs value in clk_tree now that they are at an offset from mux and
factor.

Drop any comment that reference the clock ID as we now have a 1:1 match
with upstream kernel linux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: comment out infracfg clk not defined
Christian Marangi [Sat, 3 Aug 2024 08:32:59 +0000 (10:32 +0200)]
clk: mediatek: mt7988: comment out infracfg clk not defined

Comment out infracfg clk not defined in upstream kernel linux clock ID
include. These clock are not used and can be safely commented. Keep them
just to have a reference of their existence.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: drop 1/1 spurious factor for topckgen
Christian Marangi [Sat, 3 Aug 2024 08:32:58 +0000 (10:32 +0200)]
clk: mediatek: mt7988: drop 1/1 spurious factor for topckgen

Now that we can have advanced parent handling for mux, we can drop
spurious topckgen 1/1 factor. This is in preparation to make the clk
ID match the ID in upstream include for mt7988.

Drop the factor entry from mt7988-clk.h and reference to them in
mt7988.dtsi. Muxes and gates are updated to reference the apmixed clk
following how it's done in upstream kernel linux. Add relevant clk type
flag in clk_tree for apmixed and topckgen.

Also move TOP_XTAL to the fixed clock table following how it's done in
upstream linux kernel.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: reorder TOPCKGEN factor ID
Christian Marangi [Sat, 3 Aug 2024 08:32:57 +0000 (10:32 +0200)]
clk: mediatek: mt7988: reorder TOPCKGEN factor ID

Reorder TOPCKGEN factor ID to put TOP_FACTOR first and then PLL. This is
to match how it's done in upstream kernel linux and in preparation for
OF_UPSTREAM support.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: rename TOPCKGEN factor clock to upstream naming
Christian Marangi [Sat, 3 Aug 2024 08:32:56 +0000 (10:32 +0200)]
clk: mediatek: mt7988: rename TOPCKGEN factor clock to upstream naming

Rename TOPCKGEN factor clock to upstream neaming.
Upstream kernel linux reference the factor clock for apmixedpll with the
"pll" suffix. Align the naming to the upstream naming format in
preparation for OF_UPSTREAM support.

Also rename rtc clock to drop the CB_ as upstream doesn't have that.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: drop 1/1 infracfg spurious factor
Christian Marangi [Sat, 3 Aug 2024 08:32:55 +0000 (10:32 +0200)]
clk: mediatek: mt7988: drop 1/1 infracfg spurious factor

Now that we can have advanced parent handling for mux, we can drop
spurious infracfg 1/1 factor. This is in preparation to make the clk
ID match the ID in upstream include for mt7988.

Drop the factor entry from mt7988-clk.h and reference to them in
mt7988.dtsi. Muxes and gates are updated to reference the topckgen clk
following how it's done in upstream kernel linux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: fix wrong parent for INFRA_PCIE_PERI_26M_CK_P2
Christian Marangi [Sat, 3 Aug 2024 08:32:54 +0000 (10:32 +0200)]
clk: mediatek: mt7988: fix wrong parent for INFRA_PCIE_PERI_26M_CK_P2

Fix wrong parent for INFRA_PCIE_PERI_26M_CK_P2 as should be
INFRA_PCIE_PERI_26M_CK_P3 instead of INFRA_F26M_O0. This is to match
implementation on upstream kernel linux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: move INFRA_PCIE_PERI_26M_CK_Px clock at top
Christian Marangi [Sat, 3 Aug 2024 08:32:53 +0000 (10:32 +0200)]
clk: mediatek: mt7988: move INFRA_PCIE_PERI_26M_CK_Px clock at top

Move INFRA_PCIE_PERI_26M_CK_Px clock at top of the infracfg gates
in preparation for support of OF_UPSTREAM to have a 1:1 match with
upstream clock ID.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: rename TOP_CK_NPU_SEL_CM_TOPS_SEL to TOP_NPU_SEL
Christian Marangi [Sat, 3 Aug 2024 08:32:52 +0000 (10:32 +0200)]
clk: mediatek: mt7988: rename TOP_CK_NPU_SEL_CM_TOPS_SEL to TOP_NPU_SEL

Upstream kernel linux clock include use TOP_NPU_SEL instead of
TOP_CK_NPU_SEL_CM_TOPS_SEL.
Rename this clock to the upstream kernel in preparation for support of
OF_UPSTREAM.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: rename TOP_DA_SELM_XTAL_SEL to TOP_DA_SEL
Christian Marangi [Sat, 3 Aug 2024 08:32:51 +0000 (10:32 +0200)]
clk: mediatek: mt7988: rename TOP_DA_SELM_XTAL_SEL to TOP_DA_SEL

Upstream kernel linux clock include use TOP_DA_SEL instead of
TOP_DA_SELM_XTAL_SEL.
Rename this clock to the upstream kernel in preparation for support of
OF_UPSTREAM.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7988: rename CB_CKSQ_40M to TOP_XTAL
Christian Marangi [Sat, 3 Aug 2024 08:32:50 +0000 (10:32 +0200)]
clk: mediatek: mt7988: rename CB_CKSQ_40M to TOP_XTAL

Upstream kernel linux clock include use TOP_XTAL instead of CB_CKSQ_40M.
Rename this clock to the upstream kernel in preparation for support of
OF_UPSTREAM.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoMerge patch series "clk: mediatek: mt7981: clk migration for OF_UPSTREAM"
Tom Rini [Mon, 19 Aug 2024 22:13:51 +0000 (16:13 -0600)]
Merge patch series "clk: mediatek: mt7981: clk migration for OF_UPSTREAM"

Christian Marangi <ansuelsmth@gmail.com> says:

These are all the required patches to migrate clk and correctly support
OF_UPSTREAM. This will align the clk index to upstream to support the same
clk implementation with downstream and upstream DTS.

4 months agoclk: mediatek: mt7981: rename CK to CLK
Christian Marangi [Fri, 2 Aug 2024 13:53:15 +0000 (15:53 +0200)]
clk: mediatek: mt7981: rename CK to CLK

Rename each entry from CK to CLK to match the include in upstream kernel
linux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: convert to unified infracfg gates + muxes
Christian Marangi [Fri, 2 Aug 2024 13:53:14 +0000 (15:53 +0200)]
clk: mediatek: mt7981: convert to unified infracfg gates + muxes

Convert to infracfg gates + muxes implementation now that it's
supported.

Drop infracfg-ao nodes and rename all infracfg-ao clocks to infracfg.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: fix support for pwm3 clock
Christian Marangi [Fri, 2 Aug 2024 13:53:13 +0000 (15:53 +0200)]
clk: mediatek: mt7981: fix support for pwm3 clock

Add and fix support for pwm3 clock. In the pwm DTSI node we were
actually using PWM2 clock for PWM3. Now that we have correct ID also add
the missing entry of gate and mux to support PWM3 clock.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: replace infracfg ID with upstream linux
Christian Marangi [Fri, 2 Aug 2024 13:53:12 +0000 (15:53 +0200)]
clk: mediatek: mt7981: replace infracfg ID with upstream linux

Replace infracfg clk ID with upstream linux version.

Add some missing clk for PWM3 and for PCIe. The same format is used here
with the factor first, then mux and then gates.

To correctly reference the gates in clk_gate function, define the
gates_offs value in clk_tree now that they are at an offset from mux and
factor.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: drop 1/1 spurious factor
Christian Marangi [Fri, 2 Aug 2024 13:53:11 +0000 (15:53 +0200)]
clk: mediatek: mt7981: drop 1/1 spurious factor

Now that we can have advanced parent handling for mux, we can drop
spurious infracfg 1/1 factor. This is in preparation to make the clk
ID match the ID in upstream include for mt7981.

Drop the factor entry from mt7981-clk.h and reference to them in
mt7981.dtsi. Muxes and gates are updated to reference the topckgen clk
following how it's done in upstream kernel linux. Add relevant clk type
flag in clk_tree for infracfg and topckgen.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: implement sgmii0/1 clock
Christian Marangi [Fri, 2 Aug 2024 13:53:10 +0000 (15:53 +0200)]
clk: mediatek: mt7981: implement sgmii0/1 clock

Implement missing sgmii0/1 clock and update the compatible the DTS to
match upstream kernel linux and in preparation for OF_UPSTREAM support
since the ethernet node define these additional clocks.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: fix wrong parent list for INFRA_PWM1_SEL mux
Christian Marangi [Fri, 2 Aug 2024 13:53:09 +0000 (15:53 +0200)]
clk: mediatek: mt7981: fix wrong parent list for INFRA_PWM1_SEL mux

Fix wrong parent list for INFRA_PWM1_SEL mux. The list is incorrect and
the parents are just 2. This also match the upstream linux
implementation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: fix wrong parent for TOP_FAUD clock
Christian Marangi [Fri, 2 Aug 2024 13:53:08 +0000 (15:53 +0200)]
clk: mediatek: mt7981: fix wrong parent for TOP_FAUD clock

Fix wrong parent for TOP_FAUD clock. Upstream linux sets the parent for
TOP_FAUD to TOP_AUD_SEL instead of CB_CKSQ_40M.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: swap wrong clock-names for spi nodes
Christian Marangi [Fri, 2 Aug 2024 13:53:07 +0000 (15:53 +0200)]
clk: mediatek: mt7981: swap wrong clock-names for spi nodes

Swap wrong clock-names for spi nodes as they were wrong and the spi-clk
was referencing the sel-clk and the sel-clk was referencing the spi-clk.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: add missing clock for spi1 node
Christian Marangi [Fri, 2 Aug 2024 13:53:06 +0000 (15:53 +0200)]
clk: mediatek: mt7981: add missing clock for spi1 node

Add missing clock for spi1 node. Clocks taken from upstream clock
definition and clock mux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: fix wrong clock definition for spi2
Christian Marangi [Fri, 2 Aug 2024 13:53:05 +0000 (15:53 +0200)]
clk: mediatek: mt7981: fix wrong clock definition for spi2

Fix wrong clock definition for spi2 node as they reference spi0 clock
instead of spi2.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: fix wrong mux width for pwm2 and pwm1 clock
Christian Marangi [Fri, 2 Aug 2024 13:53:04 +0000 (15:53 +0200)]
clk: mediatek: mt7981: fix wrong mux width for pwm2 and pwm1 clock

Fix wrong mux width for pwm2 and pwm1. Upstream have width 1 but U-Boot
have width set to 2. Change the value to follow upstream implementation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: fix typo for infra_i2c0_ck
Christian Marangi [Fri, 2 Aug 2024 13:53:03 +0000 (15:53 +0200)]
clk: mediatek: mt7981: fix typo for infra_i2c0_ck

Fix a typo for infra_i2c0_ck where 0 was misspelled as O.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7981: add missing clock for infra_ipcie_pipe
Christian Marangi [Fri, 2 Aug 2024 13:53:02 +0000 (15:53 +0200)]
clk: mediatek: mt7981: add missing clock for infra_ipcie_pipe

Add missing clock for infra_ipcie_pipe to make PCIe correctly work. This
clock is a parent of the fixed clock from topckgen cb_cksq_40m.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoMerge patch series "clk: mediatek: mt7623: clk migration for OF_UPSTREAM"
Tom Rini [Mon, 19 Aug 2024 22:13:01 +0000 (16:13 -0600)]
Merge patch series "clk: mediatek: mt7623: clk migration for OF_UPSTREAM"

Christian Marangi <ansuelsmth@gmail.com> says:

These are all the required patches to migrate clk and correctly support
OF_UPSTREAM. This will align the clk index to upstream to support the same
clk implementation with downstream and upstream DTS.

4 months agoclk: mediatek: mt7623: remap peri clock ID and add MUX
Christian Marangi [Fri, 2 Aug 2024 13:45:05 +0000 (15:45 +0200)]
clk: mediatek: mt7623: remap peri clock ID and add MUX

Upstream kernel linux makes use of peri clock MUX to setup UART.

Add definition for these and add remap table as in the upstream clock ID
order gates are before MUX but we require MUX first and then clocks in
our downstream driver.

Convert the peri clk tree to MUX + GATE implementation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
4 months agoclk: mediatek: mt7623: remap apmixedsys clock ID
Christian Marangi [Fri, 2 Aug 2024 13:45:04 +0000 (15:45 +0200)]
clk: mediatek: mt7623: remap apmixedsys clock ID

Define remap table also for apmixedsys clock ID. The clock ID starts
from 1 instead of 0 in upstream kernel linux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7623: define id_offs_map and import clk ID from upstream
Christian Marangi [Fri, 2 Aug 2024 13:45:03 +0000 (15:45 +0200)]
clk: mediatek: mt7623: define id_offs_map and import clk ID from upstream

Define id_offs_map and use clk ID form upstream linux kernel to have a
1:1 match for the TOPCKGEN clock and permit usage of OF_UPSTREAM with
upstream dtsi.

For all the gate clock, the clk ID starts from 1 instead of zero. Define
an additional clock tree for them and set the .gates_offs to 1 to
account for this.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7623: split clk tree to dedicated topckgen and apmixed
Christian Marangi [Fri, 2 Aug 2024 13:45:02 +0000 (15:45 +0200)]
clk: mediatek: mt7623: split clk tree to dedicated topckgen and apmixed

Split clk tree to dedicated topckgen and apmixed in preparation for
remap table.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoclk: mediatek: mt7623: fix broken peri_cgs clk with XTAL parents
Christian Marangi [Fri, 2 Aug 2024 13:45:01 +0000 (15:45 +0200)]
clk: mediatek: mt7623: fix broken peri_cgs clk with XTAL parents

Fix broken peri_cgs and infra_cgs clock with XTAL parents as they have
wrong definition of the parent type.

Correctly fix them and use CLK_PARENT_XTAL for them.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4 months agoext4: Fix zalloc()
Richard Weinberger [Fri, 9 Aug 2024 09:54:30 +0000 (11:54 +0200)]
ext4: Fix zalloc()

Currently, zalloc() calls uncondtionally memset(),
if the allocation failes, memset() will write to a null pointer.

Fix by using kzalloc().

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 months agocompiler: Ensure __builtin_*_overflow() support
Richard Weinberger [Fri, 9 Aug 2024 09:54:29 +0000 (11:54 +0200)]
compiler: Ensure __builtin_*_overflow() support

Both gcc and clang support this for a long time.
Make sure the feature is present.

Signed-off-by: Richard Weinberger <richard@nod.at>
4 months agoext4: Fix integer overflow in ext4fs_read_symlink()
Richard Weinberger [Fri, 9 Aug 2024 09:54:28 +0000 (11:54 +0200)]
ext4: Fix integer overflow in ext4fs_read_symlink()

While zalloc() takes a size_t type, adding 1 to the le32 variable
will overflow.
A carefully crafted ext4 filesystem can exhibit an inode size of 0xffffffff
and as consequence zalloc() will do a zero allocation.

Later in the function the inode size is again used for copying data.
So an attacker can overwrite memory.

Avoid the overflow by using the __builtin_add_overflow() helper.

Signed-off-by: Richard Weinberger <richard@nod.at>
4 months agosquashfs: Fix heap corruption in sqfs_search_dir()
Richard Weinberger [Fri, 2 Aug 2024 20:05:09 +0000 (22:05 +0200)]
squashfs: Fix heap corruption in sqfs_search_dir()

res needs to be large enough to store both strings rem and target,
plus the path separator and the terminator.
Currently the space for the path separator is not accounted, so
the heap is corrupted by one byte.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 months agosquashfs: Fix stack overflow while symlink resolving
Richard Weinberger [Fri, 2 Aug 2024 16:36:47 +0000 (18:36 +0200)]
squashfs: Fix stack overflow while symlink resolving

The squashfs driver blindly follows symlinks, and calls sqfs_size()
recursively. So an attacker can create a crafted filesystem and with
a deep enough nesting level a stack overflow can be achieved.

Fix by limiting the nesting level to 8.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 months agosquashfs: Check sqfs_find_inode() return value
Richard Weinberger [Fri, 2 Aug 2024 16:36:46 +0000 (18:36 +0200)]
squashfs: Check sqfs_find_inode() return value

The function can fail and return NULL.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 months agosquashfs: Fix integer overflow in sqfs_inode_size()
Richard Weinberger [Fri, 2 Aug 2024 16:36:45 +0000 (18:36 +0200)]
squashfs: Fix integer overflow in sqfs_inode_size()

A carefully crafted squashfs filesystem can exhibit an extremly large
inode size and overflow the calculation in sqfs_inode_size().
As a consequence, the squashfs driver will read from wrong locations.

Fix by using __builtin_add_overflow() to detect the overflow.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 months agosquashfs: Fix integer overflow in sqfs_resolve_symlink()
Richard Weinberger [Fri, 2 Aug 2024 16:36:44 +0000 (18:36 +0200)]
squashfs: Fix integer overflow in sqfs_resolve_symlink()

A carefully crafted squashfs filesystem can exhibit an inode size of 0xffffffff,
as a consequence malloc() will do a zero allocation.
Later in the function the inode size is again used for copying data.
So an attacker can overwrite memory.
Avoid the overflow by using the __builtin_add_overflow() helper.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 months agodlmalloc: Make sure allocation size is within malloc area
Richard Weinberger [Fri, 2 Aug 2024 10:08:46 +0000 (12:08 +0200)]
dlmalloc: Make sure allocation size is within malloc area

Since U-Boot does not support memory overcommit we can
enforce that the allocation size is within the malloc area.
This is a simple and efficient hardening measure to mitigate
further integer overflows in dlmalloc.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 months agodlmalloc: Fix integer overflow in sbrk()
Richard Weinberger [Fri, 2 Aug 2024 10:08:45 +0000 (12:08 +0200)]
dlmalloc: Fix integer overflow in sbrk()

Make sure that the new break is within mem_malloc_start
and mem_malloc_end before making progress.
ulong new = old + increment; can overflow for extremely large
increment values and memset() can get wrongly called.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 months agodlmalloc: Fix integer overflow in request2size()
Richard Weinberger [Fri, 2 Aug 2024 10:08:44 +0000 (12:08 +0200)]
dlmalloc: Fix integer overflow in request2size()

req is of type size_t, casting it to long opens the door
for an integer overflow.
Values between LONG_MAX - (SIZE_SZ + MALLOC_ALIGN_MASK) - 1 and LONG_MAX
cause and overflow such that request2size() returns MINSIZE.

Fix by removing the cast.
The origin of the cast is unclear, it's in u-boot and ppcboot since ever
and predates the CVS history.
Doug Lea's original dlmalloc implementation also doesn't have it.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 months agox86: Fix ptrdiff_t for x86_64
Richard Weinberger [Fri, 2 Aug 2024 10:08:43 +0000 (12:08 +0200)]
x86: Fix ptrdiff_t for x86_64

sbrk() assumes ptrdiff_t is large enough to enlarge/shrink the heap
by LONG_MIN/LONG_MAX.
So, use the long type, also to match the rest of the Linux ecosystem.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 months agoam335x_hs_evm_spi_defconfig: Add MAINTAINERS entry
Tom Rini [Thu, 15 Aug 2024 22:07:45 +0000 (16:07 -0600)]
am335x_hs_evm_spi_defconfig: Add MAINTAINERS entry

Add this to the existing entry for similar boards.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 months agobootstage: Fix out-of-bounds read in reloc_bootstage()
Richard Weinberger [Wed, 31 Jul 2024 16:07:54 +0000 (18:07 +0200)]
bootstage: Fix out-of-bounds read in reloc_bootstage()

bootstage_get_size() returns the total size of the data structure
including associated records.
When copying from gd->bootstage, only the allocation size of gd->bootstage
must be used. Otherwise too much memory is copied.

This bug caused no harm so far because gd->new_bootstage is always
large enough and reading beyond the allocation length of gd->bootstage
caused no problem due to the U-Boot memory layout.

Fix by using the correct size and perform the initial copy directly
in bootstage_relocate() to have the whole relocation process in the
same function.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 months agoext4: Improve feature checking
Richard Weinberger [Mon, 29 Jul 2024 21:37:31 +0000 (23:37 +0200)]
ext4: Improve feature checking

Evaluate the filesystem incompat and ro_compat bit fields to judge
whether the filesystem can be read or written.
For the read side only a scary warning is shown so far.
I'd love to abort mounting too, but I fear this will break some setups
where the driver works by chance.

Signed-off-by: Richard Weinberger <richard@nod.at>
4 months agolib: elf: Fix bootelf -p crash issue
JianfengA.Zhu@sony.com [Wed, 7 Aug 2024 02:20:07 +0000 (02:20 +0000)]
lib: elf: Fix bootelf -p crash issue

Do not load and flush segments whose program header type is not
PT_LOAD to avoid crash happen.

bootelf will load all program headers and then flush cache.
Since PT_GNU_STACK start address is 0x0, crash happens when
it flushes PT_GNU_STACK area for target that memory cannot be
accessed from address 0x0.

crash call stack:
====================================================================
bootelf -p
|-> do_bootelf (cmd/elf.c)
 |-> load_elf_image_phdr (lib/elf.c) /* Load each program header */
  |-> for (i = 0; i < ehdr->e_phnum; ++i) { /* e_phnum is 2 */
   |-> flush_cache(start=0, size=0) (arch/arm/lib/cache.c) (*1)
    |-> flush_dcache_range(start=0, 0); (arch/arm/cpu/armv8/cache_v8.c)
     |-> __asm_flush_dcache_range(start=0, 0) (arch/arm/cpu/armv8/cache.S)
      |-> /* clean & invalidate data or unified cache */
      |-> dc      civac, x0       <<== crash happen x0:start=0
====================================================================
*1 Here the p_paddr and p_filesz of the GNU_STACK program are 0.

hello_world elf image program headers
====================================================================
Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
  LOAD           0x0000000000000000 0x0000000080ff0000 0x0000000080ff0000
                 0x0000000000010390 0x0000000000010390  R E    0x10000
  GNU_STACK      0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000000000 0x0000000000000000  RW     0x10

 Section to Segment mapping:
  Segment Sections...
   00     .text .rodata .eh_frame
   01
====================================================================

bootelf -p crash error log
====================================================================
bootelf -p 0x80f00000
"Synchronous Abort" handler, esr 0x96000147, far 0x0
elr: 000000008f6035bc lr : 000000008f66ff54 (reloc)
elr: 00000000bd9475bc lr : 00000000bd9b3f54
x0 : 0000000000000000 x1 : 0000000000000000
x2 : 0000000000000040 x3 : 000000000000003f
x4 : 0000000081000390 x5 : 00000000bd12da98
x6 : 0000000000000010 x7 : 0000000000000010
x8 : 000000000000000a x9 : 00000000bd156b30
x10: 00000000bd1526e0 x11: 0000000000000000
x12: 0000000000000004 x13: 00000000bda00000
x14: 00000000ffffffff x15: 00000000bd12dab7
x16: 00000000bd957b14 x17: 0000000000000000
x18: 00000000bd13fd90 x19: 0000000080f000b0
x20: 0000000080f00000 x21: 0000000000000002
x22: 0000000000000000 x23: 0000000000000003
x24: 00000000bd9eacc0 x25: 0000000000000000
x26: 0000000000000000 x27: 0000000000000000
x28: 00000000bd154c80 x29: 00000000bd12da70

Code: d2800082 9ac32042 d1000443 8a230000 (d50b7e20)
====================================================================

Signed-off-by: Jianfeng Zhu <JianfengA.Zhu@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Reviewed-by: Toyama, Yoshihiro <Yoshihiro.Toyama@sony.com>
4 months agoarm: dts: keystone: Move to OF_UPSTREAM
Andrew Davis [Wed, 7 Aug 2024 14:56:51 +0000 (09:56 -0500)]
arm: dts: keystone: Move to OF_UPSTREAM

Enable OF_UPSTREAM for Keystone boards. Remove DT files that
are now available in dts/upstream.

Signed-off-by: Andrew Davis <afd@ti.com>
Acked-by: Neha Malcom Francis <n-francis@ti.com>
4 months agopinmux: generic: Use ENOENT instead of ENOSYS
Sean Anderson [Sat, 10 Aug 2024 13:59:37 +0000 (09:59 -0400)]
pinmux: generic: Use ENOENT instead of ENOSYS

ENOSYS should only be used when a subsystem is completely absent.
Convert its use in pinctrl-generic to ENOENT, which better reflects the
error condition (that a function/group/pin is missing).

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 months agodefconfig: Add a config for AM335x High Security EVM with SPI Boot support
Andrew Davis [Wed, 7 Aug 2024 15:26:59 +0000 (10:26 -0500)]
defconfig: Add a config for AM335x High Security EVM with SPI Boot support

Add a new defconfig file for the AM335x High Security EVM. This config
is specific for the case of SPI booting.

Signed-off-by: Andrew Davis <afd@ti.com>
4 months agoscripts/decodecode: update from Linux v6.10
Heinrich Schuchardt [Fri, 9 Aug 2024 18:22:33 +0000 (20:22 +0200)]
scripts/decodecode: update from Linux v6.10

For decoding RISC-V dumps we need to update the script.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
4 months agoenv: remove vars that are not in default env
Ravi Minnikanti [Sun, 11 Aug 2024 18:44:15 +0000 (11:44 -0700)]
env: remove vars that are not in default env

current env_set_default_vars() doesn't delete
var that are not in the imported env. hashtable
removes vars that are not in the imported
env but present in the current env only if H_NOCLEAR
flag is not set.

This change is to avoid passing H_NOCLEAR flag if
specific vars are passed to env_set_default_vars()

Without this change:
Marvell>> env default boot_mode
Marvell>>

With the change:
Marvell>> env default boot_mode
WARNING: 'boot_mode' not in imported env, deleting it!

Signed-off-by: Ravi Minnikanti <rminnikanti@marvell.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 months agosandbox: fix wget test failure after fixing wget issue
Yasuharu Shibata [Wed, 14 Aug 2024 12:41:07 +0000 (21:41 +0900)]
sandbox: fix wget test failure after fixing wget issue

After applying the following patch, wget test on sandbox failed[1].

  Commit: cab7867cff ("net: wget: Support retransmission a dropped packet")

Here are two reasons why the test is failed and how to fix it:

1. tcp_ack is calculated by the wrong value.
   tcp_ack needs to be calculated by the received TCP payload size.
2. wget command may have a problem that HTTP response from server
   must be divided into more than two packets.
   In this commit, HTTP response is divided into two packets.

In addition, I fixed the HTTP response returned at the correct timing.

[1] https://lore.kernel.org/u-boot/CAFLszThEbk2Jr8OZ6Hj21wPSnJjgJhaDe037RqwHvwt1KjB3_A@mail.gmail.com/

Signed-off-by: Yasuharu Shibata <yasuharu.shibata@gmail.com>
Reported-by: Simon Glass <sjg@chromium.org>
4 months agosandbox: Enable wget command
Yasuharu Shibata [Wed, 14 Aug 2024 12:41:06 +0000 (21:41 +0900)]
sandbox: Enable wget command

Enable this so that the tests run.

Fix a few warnings in the code so that CI passes.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Yasuharu Shibata <yasuharu.shibata@gmail.com>
4 months agocmd: led: fix led command usage for the LED_SW_BLINK enabled case
Mikhail Kshevetskiy [Wed, 14 Aug 2024 10:08:30 +0000 (14:08 +0400)]
cmd: led: fix led command usage for the LED_SW_BLINK enabled case

CONFIG_LED_BLINK and CONFIG_LED_SW_BLINK can be defined independently.
Led blinking works if any (or both) of them is enabled. Unfortunately
the led command help does not display blinking option if only
CONFIG_LED_SW_BLINK is enabled. This is definitely wrong.

This patch fix an issue.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Alexander Dahl <ada@thorsis.com>
4 months agospi: soft_spi: Parse cs-gpios only if num-chipselects is not <0>
Michael Polyntsov [Wed, 31 Jul 2024 04:11:29 +0000 (08:11 +0400)]
spi: soft_spi: Parse cs-gpios only if num-chipselects is not <0>

Some boards don't have chipselect lines for leds so cs-gpios is not
specified in the dts leading to probing error. Fix it by making
behavior similar to the one in Linux, parse num-chipselects and
if it is zero, ignore cs-gpios.

Signed-off-by: Michael Polyntsov <michael.polyntsov@iopsys.eu>
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
4 months agospi: soft_spi: fix miso gpio property name
Mikhail Kshevetskiy [Wed, 31 Jul 2024 04:11:28 +0000 (08:11 +0400)]
spi: soft_spi: fix miso gpio property name

The patch fix a missprint introduced in commit 2e9fe73a883a ("spi: soft_spi:
Support the recommended soft spi properties").

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 months agomaintainers: Update list of maintainers for Corstone-1000
Hugues Kamba Mpiana [Tue, 13 Aug 2024 15:53:05 +0000 (16:53 +0100)]
maintainers: Update list of maintainers for Corstone-1000

- Add new maintainer: Hugues KAMBA MPIANA
- Remove maintainer: Xueliang ZHONG
- Update contact information for current maintainer.

Signed-off-by: Hugues KAMBA MPIANA <hugues.kambampiana@arm.com>
4 months agoMerge tag 'u-boot-imx-master-20240813' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Tue, 13 Aug 2024 16:10:29 +0000 (10:10 -0600)]
Merge tag 'u-boot-imx-master-20240813' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

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

- Convert tqma6q_mba6 to watchdog DM to fix reset.
- Convert tqma6q_mba6 to PMIC and I2C DM.
- Convert tqma6q_mba6 to OF_UPSTREAM.
- Do not print the board name twice on tqma6.
- Enable CMD_ERASEENV for imx8mm/mp Phytec boards.
- Add imx8ulp binman support.
- Fix imx8 build when CONFIG_IMX_BOOTAUX is set.

4 months agoMerge tag 'i2c-dm-updates-for-v2024-10-next' of https://source.denx.de/u-boot/custodi...
Tom Rini [Tue, 13 Aug 2024 16:09:45 +0000 (10:09 -0600)]
Merge tag 'i2c-dm-updates-for-v2024-10-next' of https://source.denx.de/u-boot/custodians/u-boot-i2c into next

i2c DM updates for v2024.10 next

- Add series from Simon, which removes old content in i2c.h
  so that we can move towards having just the dm API.

  It does not remove any boards, but instead removes functionality.

4 months agotqma6: Do not print the board name twice
Fabio Estevam [Fri, 9 Aug 2024 17:58:09 +0000 (14:58 -0300)]
tqma6: Do not print the board name twice

Currently, the devicetree model as well as the board variant name
are shown:
...
Model: TQ TQMa6S/DL on MBa6x
Board: TQMa6DL on a MBa6x
...

Unselect the CONFIG_DISPLAY_BOARDINFO option so that the
board name is printed only once in board_late_init() instead.

Signed-off-by: Fabio Estevam <festevam@denx.de>
4 months agotqma6: Convert to PMIC and I2C driver model
Fabio Estevam [Fri, 9 Aug 2024 17:58:08 +0000 (14:58 -0300)]
tqma6: Convert to PMIC and I2C driver model

Currently, the power_init_board() function is not executed because
CONFIG_POWER_LEGACY is not selected.

Convert to PMIC driver model, which allows removing board I2C code in
favor of the I2C driver model.

Signed-off-by: Fabio Estevam <festevam@denx.de>
4 months agoimx6-tqma6: Convert to OF_UPSTREAM
Fabio Estevam [Fri, 9 Aug 2024 15:25:48 +0000 (12:25 -0300)]
imx6-tqma6: Convert to OF_UPSTREAM

Instead of using the local imx6-tqma6 devicetree copies from U-Boot,
convert the imx6-tqma6 target to OF_UPSTREAM so that the upstream
kernel devicetrees can be used instead.

Signed-off-by: Fabio Estevam <festevam@denx.de>
4 months agotqma6q_mba6: Convert to watchdog driver model
Fabio Estevam [Fri, 9 Aug 2024 15:12:47 +0000 (12:12 -0300)]
tqma6q_mba6: Convert to watchdog driver model

Commit 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()") caused
the 'reset' command in U-Boot to not cause a board reset.

Fix it by switching to the watchdog driver model via sysreset, which
is the preferred method for implementing the watchdog reset.

Signed-off-by: Fabio Estevam <festevam@denx.de>
4 months agoimx: imx8: fix build when CONFIG_IMX_BOOTAUX is set
Max Krummenacher [Wed, 7 Aug 2024 13:39:11 +0000 (15:39 +0200)]
imx: imx8: fix build when CONFIG_IMX_BOOTAUX is set

Use correct function name.

Fixes: e8cd1f60d964 ("imx: imx8: bootaux: Add i.MX8 M4 boot support")
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
4 months agoimx8ulp_evk: enable binman support
Gary Bisson [Mon, 5 Aug 2024 21:25:11 +0000 (23:25 +0200)]
imx8ulp_evk: enable binman support

Enable binman support and add documentation for the
imx8ul-evk board.

Signed-off-by: Gary Bisson <bisson.gary@gmail.com>
4 months agomach-imx: Add i.MX 8ULP binman support
Gary Bisson [Mon, 5 Aug 2024 21:25:10 +0000 (23:25 +0200)]
mach-imx: Add i.MX 8ULP binman support

- Re-use i.MX 93 Makefile target as similar boot process
- Create imx8ulp-u-boot.dtsi for binman image architecture
- Create both SPL and U-Boot containers configuration

Key differences between the 93 and 8ULP SPL container are:
- No LPDDR training library needed for 8ULP
- 8ULP requires a uPower binary (RISC-V core) for power management
- 8ULP also requires a M33 binary to work properly

Signed-off-by: Gary Bisson <bisson.gary@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
4 months agospl: binman: Disable u_boot_any symbols for i.MX 8ULP boards
Gary Bisson [Mon, 5 Aug 2024 21:25:09 +0000 (23:25 +0200)]
spl: binman: Disable u_boot_any symbols for i.MX 8ULP boards

This is extending commit da96f93cda9 ("spl: binman: Disable u_boot_any
symbols for i.MX93 boards") to i.MX 8ULP boards.

Signed-off-by: Gary Bisson <bisson.gary@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
4 months agotools: imx8image: add upower image support
Gary Bisson [Mon, 5 Aug 2024 21:25:08 +0000 (23:25 +0200)]
tools: imx8image: add upower image support

Part of the upower management was included in a previous commit [1].
This patch only adds the bits required to properly parse a config file
that would include the binary as follows:
IMAGE PWR upower.bin

[1] 6ec65c8558f (tools: image: support i.MX93)

Signed-off-by: Gary Bisson <bisson.gary@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>