Re: [PATCH 07/11] board: novena: convert to DM_I2C

2024-08-03 Thread Marek Vasut
On 8/3/24 6:15 PM, Anatolij Gustschin wrote: Conversion to DM_I2C is mandatory, enable DM_I2C to disable board removal warning. Convert EEPROM and IT6251 access to use DM_I2C API. Signed-off-by: Anatolij Gustschin --- Cc: Marek Vasut Cc: Fabio Estevam Cc: Tom Rini Reviewed-by: Marek Vasut

Re: [PATCH v4 14/38] arm: dts: exynos: Add upstream DW MMC properties to all Exynos dts

2024-08-03 Thread Henrik Grimler
Hi Sam, Thanks for working on this, makes switching to upstream dts'es easier :) I tested the series on exynos4412-odroid-u2 and exynos5422-odroid-xu4. One issue for exynos4412-odroid to resolve below, with that fixed booting from both eMMC and sdcard works on my devices. On Thu, Jul 25, 2024 at

Re: [PATCH v2 2/2] i2c: samsung: Support platforms other than EXYNOS4 and EXYNOS5

2024-08-03 Thread Henrik Grimler
Hi David, On Fri, Aug 02, 2024 at 09:19:16PM +0200, David Virag wrote: > Newer Samsung SoCs (including newer Exynos, ExynosAuto, Google Tensor) > still use these IPs, or slightly newer versions of it. > > Make these drivers available on these platforms by guarding > EXYNOS4/EXYNOS5 specific code

Re: [PATCH v3 3/7] board: rock5b-rk3588: add USB-C controller support

2024-08-03 Thread Sebastian Reichel
Hi Jonas, On Fri, Aug 02, 2024 at 10:42:56PM GMT, Jonas Karlman wrote: > On 2024-08-02 19:59, Sebastian Reichel wrote: > > Enable support for the fusb302 USB Type-C controller. > > > > This will do early USB PD (power deliver) negotiation, which must happen > > within 5 seconds after the USB-C co

Re: [PATCH v3 4/7] board: rock5b-rk3588: enable USB-C in operating system

2024-08-03 Thread Sebastian Reichel
Hi Jonas, On Fri, Aug 02, 2024 at 11:04:05PM GMT, Jonas Karlman wrote: > Hi Sebastian, > > On 2024-08-02 19:59, Sebastian Reichel wrote: > > Since older U-Boot releases do not negotiate USB PD, the kernel > > DT may not enable the USB-C controller by default to avoid a > > regression. The plan is

Re: [PATCH 9/9] sunxi: Add support for Anbernic RG35XX-2024

2024-08-03 Thread Mikhail Kalashnikov
On 02.08.2024 01:55, Chris Morgan wrote: From: Chris Morgan The Anbernic RG35XX series of devices are based around an Allwinner H700 SoC with 1GB of RAM, 2 SD cards, and multiple input buttons. This bootloader has been tested on the Anbernic RG35XX-2024 and RG35XX-H, but should be suitable f

Re: [PATCH 2/9] sunxi: H616: dram: LPDDR3: adjust settings

2024-08-03 Thread Mikhail Kalashnikov
On 02.08.2024 01:55, Chris Morgan wrote: From: Jernej Skrabec Adjust H616 LPDDR3 DRAM settings to be in line with vendor driver. Signed-off-by: Jernej Skrabec Tested-by: Chris Morgan --- arch/arm/mach-sunxi/dram_sun50i_h616.c | 2 +- arch/arm/mach-sunxi/dram_timings/h616_lpddr3.c

Re: [PATCH 3/9] sunxi: H616: dram: LPDDR4: adjust settings

2024-08-03 Thread Mikhail Kalashnikov
On 02.08.2024 01:55, Chris Morgan wrote: From: Jernej Skrabec Adjust H616 LPDDR4 DRAM settings to be in line with vendor driver. Signed-off-by: Jernej Skrabec Tested-by: Chris Morgan --- arch/arm/mach-sunxi/dram_sun50i_h616.c| 35 +-- .../dram_timings/h616_lpddr4

Re: [PATCH v4] board: phytec: phycore-imx93: Add phyBOARD-Segin-i.MX93 support

2024-08-03 Thread Christoph Stoidner
Hello Mathieu, after a few months I would like to come back to this patch series from you. I recognized you increased from patch v2 to v3 the CONFIG_SYS_MALLOC_F_LEN from 0x18000 to 0x2. See v2: https://lists.denx.de/pipermail/u-boot/2024-January/544396.html diff --git a/configs/imx93-phyboa

[PATCH v5] board: rockchip: add Radxa ROCK 3 Model C

2024-08-03 Thread Maxim Moskalets
From: Maxim Moskalets Based on rock-3a-rk3568_defconfig. Tested on v1.31 revision. Board Specifications: - Rockchip RK3566 - 1/2/4GB LPDDR4 2112MT/s - eMMC socket - uSD card slot - M.2 2230 Connector - GbE LAN with POE - 3.5mm jack with mic - HDMI 2.0, MIPI DSI/CSI - USB 3.0 Host, USB 2.0 Host/O

Re: [PATCH v4] board: rockchip: add Radxa ROCK 3 Model C

2024-08-03 Thread Maxim M. Moskalets
On 01.08.2024 01:58, FUKAUMI Naoki wrote: > Hi, > > please cherry-pick below too > https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git/commit/src/arm64/rockchip/rk3566-rock-3c.dts?h=v6.11-rc1-dts&id=dd40945a1d0e28ae6eaf9da04f8e2dcebf8233ea > > On 7/22/24 19:56, Maxim

[PATCH 11/11] board: vf610twr: convert to DM_I2C

2024-08-03 Thread Anatolij Gustschin
Conversion to DM_I2C is mandatory, enable DM_I2C to disable board removal warning. Signed-off-by: Anatolij Gustschin --- Cc: Alison Wang Cc: Fabio Estevam Cc: Tom Rini --- configs/vf610twr_defconfig | 2 +- configs/vf610twr_nand_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 delet

[PATCH 10/11] board: cm_fx6: convert to DM_I2C

2024-08-03 Thread Anatolij Gustschin
Conversion to DM_I2C is mandatory, enable DM_I2C to fix board removal warning. Convert EEPROM access to use DM_I2C API. Signed-off-by: Anatolij Gustschin --- Cc: Nikita Kiryanov Cc: Fabio Estevam Cc: Tom Rini --- board/compulab/cm_fx6/cm_fx6.c | 3 ++- board/compulab/common/Makefile | 2 +-

[PATCH 09/11] board: sniper: convert to DM_I2C

2024-08-03 Thread Anatolij Gustschin
Conversion to DM_I2C is mandatory, enable DM_I2C to disable board removal warning. Also enable OF_UPSTREAM since we do not have a default device tree. Signed-off-by: Anatolij Gustschin --- Cc: Paul Kocialkowski Cc: Tom Rini --- arch/arm/mach-omap2/omap3/Kconfig | 1 + configs/sniper_defconfig

[PATCH 08/11] board: vining_2000: convert to DM_I2C

2024-08-03 Thread Anatolij Gustschin
Conversion to DM_I2C is mandatory, enable DM_I2C to disable board removal warning. Signed-off-by: Anatolij Gustschin --- Cc: Silvio Fricke Cc: Fabio Estevam Cc: Tom Rini --- board/softing/vining_2000/vining_2000.c | 25 - configs/vining_2000_defconfig | 4 +-

[PATCH 07/11] board: novena: convert to DM_I2C

2024-08-03 Thread Anatolij Gustschin
Conversion to DM_I2C is mandatory, enable DM_I2C to disable board removal warning. Convert EEPROM and IT6251 access to use DM_I2C API. Signed-off-by: Anatolij Gustschin --- Cc: Marek Vasut Cc: Fabio Estevam Cc: Tom Rini --- board/kosagi/novena/novena.c | 10 +-- board/kosagi/novena/video.c

[PATCH 06/11] board: rut: convert to DM_I2C

2024-08-03 Thread Anatolij Gustschin
Conversion to DM_I2C is mandatory, enable DM_I2C to disable board removal warning. Signed-off-by: Anatolij Gustschin --- Cc: Enrico Leto Cc: Tom Rini --- configs/rut_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/rut_defconfig b/configs/rut_defconfig inde

[PATCH 05/11] board: sl50: convert to DM_I2C

2024-08-03 Thread Anatolij Gustschin
Conversion to DM_I2C is mandatory, enable DM_I2C to disable board removal warning. Signed-off-by: Anatolij Gustschin --- Cc: Enric Balletbo i Serra Cc: Tom Rini --- configs/am335x_sl50_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/am335x_sl50_defconfig b

[PATCH 04/11] board: igep003x: convert to DM_I2C

2024-08-03 Thread Anatolij Gustschin
Conversion to DM_I2C is mandatory, enable DM_I2C to disable board removal warning. Signed-off-by: Anatolij Gustschin --- Cc: Javier Martínez Canillas Cc: Tom Rini --- configs/am335x_igep003x_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/am335x_igep003x_d

[PATCH 03/11] board: cm-t43: convert to DM_I2C

2024-08-03 Thread Anatolij Gustschin
Conversion to DM_I2C is mandatory, enable DM_I2C to disable board removal warning. Signed-off-by: Anatolij Gustschin --- Cc: Nikita Kiryanov Cc: Tom Rini --- board/compulab/cm_t43/cm_t43.c | 2 -- configs/cm_t43_defconfig | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --

[PATCH 02/11] board: chiliboard: convert to DM_I2C

2024-08-03 Thread Anatolij Gustschin
Conversion to DM_I2C is mandatory, enable DM_I2C to disable board removal warning. Signed-off-by: Anatolij Gustschin --- Cc: Marcin Niestroj Cc: Tom Rini --- configs/chiliboard_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/chiliboard_defconfig b/configs/

[PATCH 01/11] board: shc: convert to DM_I2C

2024-08-03 Thread Anatolij Gustschin
Conversion to DM_I2C is mandatory, rework to remove use of legacy I2C API. Signed-off-by: Anatolij Gustschin --- Cc: Heiko Schocher Cc: Tom Rini --- board/bosch/shc/board.c | 22 +++--- configs/am335x_shc_defconfig | 4 +++- configs/am335x_shc_ict_defconfi

Re: [PATCH] mtd: nand: raw: omap_gpmc: Check return value of gpmc_nand_init

2024-08-03 Thread Roger Quadros
On 31/07/2024 17:58, Vignesh Raghavendra wrote: > If the function is called with no NAND device attached, then this > function can return error value, proceeding further ignoring the same > can cause system crash. This is seen when "mtd list" is run with no NAND > addon cards connected. > > Sig

Re: [PATCH 1/2] bootstage: Fix unstash of records from SPL

2024-08-03 Thread Tom Rini
On Sat, Aug 03, 2024 at 12:41:44PM +, Jonas Karlman wrote: > The commit b81e31a1e6c5 ("bootstash: Do not provide a default address > for all") changed a bootstage unstash call to bootstage stash, this > has resulted in bootstage records stashed in SPL no longer get unstaged > in U-Boot proper.

[PATCH 10/15] DONOTMERGE: arm64: dts: rockchip: add gpio-keys to Qnap-TS433

2024-08-03 Thread Heiko Stuebner
The TS433 has 3 buttons, power and copy in the front as well as a reset pinhole button on the back. The power-button is connected to the embedded controller while the other two buttons are just gpio connected. Add the gpio-keys definition for the two buttons we can handle right now. Tested-by: Uw

[PATCH 13/15] DONOTMERGE: arm64: dts: rockchip: enable gpu on Qnap-TS433

2024-08-03 Thread Heiko Stuebner
The TS433 doesn't provide display output, but the gpu nevertheless can be used for compute tasks for example. So there is no reason not to enable it. Tested-by: Uwe Kleine-König Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20240723195538.1133436-14-he...@sntech.de [this needs

[PATCH 14/15] DONOTMERGE: arm64: dts: rockchip: add 2 pmu_io_domain supplies for Qnap-TS433

2024-08-03 Thread Heiko Stuebner
Add the two supplies for the pmu-io-domains that are defined in the vendor devicetree for the TS433. Tested-by: Uwe Kleine-König Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20240723195538.1133436-15-he...@sntech.de [this needs to be replaced, once the patch hits the devicetree

[PATCH 12/15] DONOTMERGE: arm64: dts: rockchip: add missing pmic information on Qnap-TS433

2024-08-03 Thread Heiko Stuebner
Fill in the missing pieces for RK809 pmic used on the TS433. The regulator setup comes from the vendor-devicetree, so without proper schematics its accuracy is somewhat unclear, but it looks really similar to all the other rk3568 boards, so follows the reference design it seems. The one caveat is

[PATCH 11/15] DONOTMERGE: arm64: dts: rockchip: define cpu-supply on the Qnap-TS433

2024-08-03 Thread Heiko Stuebner
The TS433 seems to use a silergy,syr827 regulator for the cpu supply. At least that is the compatible used in the vendor devicetree, though it could very well also be another fan53555 clone. Define the needed regulator node and hook up the cpu-supply to the cpu cores. Tested-by: Uwe Kleine-König

[PATCH 15/15] board: rockchip: add support for Qnap TS433 devices

2024-08-03 Thread Heiko Stuebner
The Qnap TS433 is a 4-bay NAS based around the RK3568. Two SATA bays are connected to the RK3568's own SATA controllers while the other two are connected to a JMicron SATA controller living on the PCIe bus. It provides one 2.5Gb and one 1Gb ethernet port as well as 3 usb ports. Signed-off-by: He

[PATCH 09/15] DONOTMERGE: arm64: dts: rockchip: enable the tsadc on the Qnap-TS433

2024-08-03 Thread Heiko Stuebner
Enable the tsadc node to allow for temperature measurements of the soc. Tested-by: Uwe Kleine-König Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20240723195538.1133436-10-he...@sntech.de [this needs to be replaced, once the patch hits the devicetree-rebasing repo] Signed-off-b

[PATCH 08/15] DONOTMERGE: arm64: dts: rockchip: add hdd leds to Qnap-TS433

2024-08-03 Thread Heiko Stuebner
Add the 4 gpio-controlled LEDs to the Qnap-TS433. They are meant for individual disk activitivy, but I haven't found a way for how to connect them to their individual sata slot yet. Tested-by: Uwe Kleine-König Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20240723195538.1133436-

[PATCH 07/15] DONOTMERGE: arm64: dts: rockchip: add board-aliases for Qnap-TS433

2024-08-03 Thread Heiko Stuebner
Add the aliases for the internal network interface as well as the emmc on the board and make sure the dedicated RTC is always the first one. The TS433 actually has two rtc devices. One coming from the rk809 pmic without added functionality and also a dedicated RTC from Mycrocrystal that is battery

[PATCH 02/15] DONOTMERGE: arm64: dts: rockchip: enable second PCIe controller on the Qnap-TS433

2024-08-03 Thread Heiko Stuebner
The TS433 uses both pcie controllers for sata and the 2nd network interface. Set the needed data-lanes in the pcie3 phy and enable the second pcie controller, as well as remove the bifurcation comment. Tested-by: Uwe Kleine-König Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/2024

[PATCH 03/15] DONOTMERGE: arm64: dts: rockchip: enable uart0 on Qnap-TS433

2024-08-03 Thread Heiko Stuebner
Uart0 is connected to an MCU on the board that handles system control like the fan-speed. So far no driver for it is available though. Tested-by: Uwe Kleine-König Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20240723195538.1133436-4-he...@sntech.de [this needs to be replaced, o

[PATCH 05/15] DONOTMERGE: arm64: dts: rockchip: add stdout path on Qnap-TS433

2024-08-03 Thread Heiko Stuebner
As most Rockchip boards do, the TS433 also uses uart2 for its serial output. Set the correct chosen entry for it. Tested-by: Uwe Kleine-König Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20240723195538.1133436-6-he...@sntech.de [this needs to be replaced, once the patch hits th

[PATCH 06/15] DONOTMERGE: arm64: dts: rockchip: enable sata1+2 on Qnap-TS433

2024-08-03 Thread Heiko Stuebner
The TS433 has 4 bays. The last two are accessed via a pci-connected sata controller, while the first two are accessed via the rk3568's sata controllers. Enable these two now. Tested-by: Uwe Kleine-König Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20240723195538.1133436-7-he...@

[PATCH 04/15] DONOTMERGE: arm64: dts: rockchip: enable usb ports on Qnap-TS433

2024-08-03 Thread Heiko Stuebner
Enable usb controllers and phys and add regulator infrastructure for the usb ports on the TS433. Of course there are no schematics available for the device, so the regulator information comes from the vendor-devicetree with unknown accuracy. Tested-by: Uwe Kleine-König Signed-off-by: Heiko Stueb

[PATCH 01/15] DONOTMERGE: arm64: dts: rockchip: add PCIe supply regulator to Qnap-TS433

2024-08-03 Thread Heiko Stuebner
Add the vcc3v3-supply regulator and its link to the pcie controllers. Tested-by: Uwe Kleine-König Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20240723195538.1133436-2-he...@sntech.de [this needs to be replaced, once the patch hits the devicetree-rebasing repo] Signed-off-by:

[PATCH 00/15] Support for rk3568 based QNAP TS433 NAS

2024-08-03 Thread Heiko Stuebner
Currently QNAP builds a series of RK3568- (and RK3588-) based NAS systems. This series provides support for the 4-bay variant called TS433. The whole series is pretty similar so adding support for the other variants will be pretty easy, once device-specific devicetrees land. The DONOTMERGE label

[PATCH 2/2] bootstage: Do not sort records

2024-08-03 Thread Jonas Karlman
The timer counter on Rockchip SoCs may be reset in TF-A, this may cause the bootstage records to be printed out of order and with an incorrect elapsed time. Fix this by not sorting the bootstage records. Before on a Radxa ZERO 3W (RK3566) board: => bootstage report Timer summary in microseco

[PATCH 1/2] bootstage: Fix unstash of records from SPL

2024-08-03 Thread Jonas Karlman
The commit b81e31a1e6c5 ("bootstash: Do not provide a default address for all") changed a bootstage unstash call to bootstage stash, this has resulted in bootstage records stashed in SPL no longer get unstaged in U-Boot proper. Fix this by changing back to a unstage call. Fixes: b81e31a1e6c5 ("boo

[PATCH 0/2] bootstage: Fix unstash and sorting of records

2024-08-03 Thread Jonas Karlman
This series fixes two issues with bootstage observed trying to measure boot times on my Rockchip aarch64 boards. First patch fixes a regression in v2024.10-rc1 where bootstage records from SPL no longer is unstashed. Second patch change to not sort bootstage records in order to show correct elaps

[PATCH v2 8/8] clk: mediatek: mt7622: add missing A1/2SYS clock ID

2024-08-03 Thread Christian Marangi
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 --- i

[PATCH v2 7/8] clk: mediatek: mt7622: add missing clock PERIBUS_SEL clock

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7622.c | 22 +- include/dt-bindings/clock/mt7622-clk.h | 59

[PATCH v2 6/8] clk: mediatek: mt7622: add missing clock PERI_UART4_PD

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7622.c |

[PATCH v2 5/8] clk: mediatek: mt7622: add missing clock MUX1_SEL

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7622.c | 24 +++- include/dt-bindings/clock/mt7622-clk.h | 13 +++-

[PATCH v2 4/8] clk: mediatek: mt7622: add missing clock define for MAIN_CORE_EN

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7622.c | 29 +++--- include/dt-bindings/clock/mt7622-clk.h | 1 + 2 fil

[PATCH v2 3/8] clk: mediatek: mt7622: move INFRA_TRNG to the bottom

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7622.c | 2 +- include/dt-bindings/clock/mt7622-clk.h | 10 +- 2 files changed, 6 insertions(+), 6

[PATCH v2 2/8] clk: mediatek: mt7622: rename AUDIO_AWB3 to AUDIO_AWB2

2024-08-03 Thread Christian Marangi
Rename AUDIO_AWB3 to AUDIO_AWB2 to match upstream linux naming in preparation for OF_UPSTREAM support. Signed-off-by: Christian Marangi --- include/dt-bindings/clock/mt7622-clk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/dt-bindings/clock/mt7622-clk.h b/include

[PATCH v2 1/8] clk: mediatek: mt7622: fix broken peri_cgs clk with XTAL parents

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7622.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletio

[PATCH v2 0/8] clk: mediatek: mt7622: clk migration for OF_UPSTREAM

2024-08-03 Thread Christian Marangi
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. Changes v2: - Fix typo in commit description Christian Marangi (8): clk: mediatek: mt7622: fix

[PATCH 15/15] clk: mediatek: mt7986: rename CK to CLK

2024-08-03 Thread Christian Marangi
Rename each entry from CK to CLK to match the include in upstream kernel linux. Signed-off-by: Christian Marangi --- arch/arm/dts/mt7986.dtsi | 88 +++--- drivers/clk/mediatek/clk-mt7986.c | 404 - include/dt-bindings/clock/mt7986-clk.h | 284 -

[PATCH 14/15] clk: mediatek: mt7986: convert to unified infracfg gates + muxes

2024-08-03 Thread Christian Marangi
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 --- arch/arm/dts/mt7986.dtsi | 31 --- drivers/clk/mediatek/clk-mt7986.c | 26 +++

[PATCH 13/15] clk: mediatek: mt7986: replace infracfg ID with upstream linux

2024-08-03 Thread Christian Marangi
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: Chri

[PATCH 12/15] clk: mediatek: mt7986: move INFRA_TRNG_CK to the bottom of the list

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7986.c | 3 +- include/dt-bindings/clock/mt7986-clk.h | 54 +- 2 files changed, 29 insertions(+), 28 deleti

[PATCH 11/15] clk: mediatek: mt7986: comment out CK_TOP_A_TUNER as not used

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7986.c | 3 +- include/dt-bindings/clock/mt7986-clk.

[PATCH 10/15] clk: mediatek: mt7986: drop 1/1 spurious factor for topckgen

2024-08-03 Thread Christian Marangi
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 refer

[PATCH 09/15] clk: mediatek: mt7986: reorder TOPCKGEN factor ID

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7986.c | 70 include/dt-bindings/clock/mt798

[PATCH 08/15] clk: mediatek: mt7986: rename TOPCKGEN factor clock to upstream naming

2024-08-03 Thread Christian Marangi
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. Sign

[PATCH 07/15] clk: mediatek: mt7986: fix typo for infra_i2c0_ck

2024-08-03 Thread Christian Marangi
Fix a typo for infra_i2c0_ck where 0 was misspelled as O. Signed-off-by: Christian Marangi --- drivers/clk/mediatek/clk-mt7986.c | 2 +- include/dt-bindings/clock/mt7986-clk.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/mediatek/clk-mt7986.c b/drivers

[PATCH 06/15] clk: mediatek: mt7986: add missing entry for IPCIE_PIPE_CK infra gate

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7986.c | 3 ++- include/dt-bindings/clock/mt7986-clk.h | 7 --- 2 files changed, 6 insertions(+)

[PATCH 05/15] clk: mediatek: mt7986: drop 1/1 infracfg spurious factor

2024-08-03 Thread Christian Marangi
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 refer

[PATCH 04/15] clk: mediatek: mt7986: fix wrong parent for INFRA_ADC_26M_CK

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7986.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

[PATCH 03/15] clk: mediatek: mt7986: rename 66M_MCK to SYSAXI_D2

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7986.c | 20 ++-- include/dt-bindings/clock/mt7986-clk.h

[PATCH 02/15] clk: mediatek: mt7986: rename CB_CKSQ_40M to TOP_XTAL

2024-08-03 Thread Christian Marangi
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 --- arch/arm/dts/mt7986.dtsi | 2 +- drivers/clk/mediatek/clk-mt7986.c | 72 ++

[PATCH 01/15] clk: mediatek: mt7986: fix wrong shift for PCIe clocks

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7986.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/mediatek/clk-mt7986.c

[PATCH 00/15] clk: mediatek: mt7986: clk migration for OF_UPSTREAM

2024-08-03 Thread Christian Marangi
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. Christian Marangi (15): clk: mediatek: mt7986: fix wrong shift for PCIe clocks clk: mediatek:

[PATCH 13/13] clk: mediatek: mt7988: rename CK to CLK

2024-08-03 Thread Christian Marangi
Rename each entry from CK to CLK to match the include in upstream kernel linux. Signed-off-by: Christian Marangi --- arch/arm/dts/mt7988.dtsi | 84 +-- drivers/clk/mediatek/clk-mt7988.c | 768 - include/dt-bindings/clock/mt7988-clk.h | 450 +++-

[PATCH 12/13] clk: mediatek: mt7988: convert to unified infracfg gates + muxes

2024-08-03 Thread Christian Marangi
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 --- arch/arm/dts/mt7988.dtsi | 67 ++- drivers/clk/mediatek/clk-mt7988.c | 24 +--

[PATCH 11/13] clk: mediatek: mt7988: replace clock ID with upstream linux

2024-08-03 Thread Christian Marangi
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 th

[PATCH 10/13] clk: mediatek: mt7988: comment out infracfg clk not defined

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7988.c | 16 ++-- include/dt-bindings

[PATCH 09/13] clk: mediatek: mt7988: drop 1/1 spurious factor for topckgen

2024-08-03 Thread Christian Marangi
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 refer

[PATCH 08/13] clk: mediatek: mt7988: reorder TOPCKGEN factor ID

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7988.c | 80 +++ include/dt-bindings/clock/mt7988

[PATCH 07/13] clk: mediatek: mt7988: rename TOPCKGEN factor clock to upstream naming

2024-08-03 Thread Christian Marangi
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. Sign

[PATCH 06/13] clk: mediatek: mt7988: drop 1/1 infracfg spurious factor

2024-08-03 Thread Christian Marangi
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 refer

[PATCH 05/13] clk: mediatek: mt7988: fix wrong parent for INFRA_PCIE_PERI_26M_CK_P2

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7988.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 04/13] clk: mediatek: mt7988: move INFRA_PCIE_PERI_26M_CK_Px clock at top

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7988.c | 16 +-- include/dt-bindings/clock/mt7988-clk.h | 168

[PATCH 03/13] clk: mediatek: mt7988: rename TOP_CK_NPU_SEL_CM_TOPS_SEL to TOP_NPU_SEL

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7988.c | 2 +- include/dt-bindings/clock/mt7988-clk.

[PATCH 02/13] clk: mediatek: mt7988: rename TOP_DA_SELM_XTAL_SEL to TOP_DA_SEL

2024-08-03 Thread Christian Marangi
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 --- drivers/clk/mediatek/clk-mt7988.c | 2 +- include/dt-bindings/clock/mt7988-clk.h | 2 +

[PATCH 01/13] clk: mediatek: mt7988: rename CB_CKSQ_40M to TOP_XTAL

2024-08-03 Thread Christian Marangi
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 --- arch/arm/dts/mt7988.dtsi | 6 +- drivers/clk/mediatek/clk-mt7988.c | 100

[PATCH 00/13] clk: mediatek: mt7988: clk migration for OF_UPSTREAM

2024-08-03 Thread Christian Marangi
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. Christian Marangi (13): clk: mediatek: mt7988: rename CB_CKSQ_40M to TOP_XTAL clk: mediatek: m