Re: [PATCH 0/8] arm: mach-snapdragon: Qualcomm clock driver cleanup

2023-10-25 Thread Caleb Connolly
Hi Sumit, On 25/10/2023 13:10, Sumit Garg wrote: > Hi Caleb, > > On Wed, 25 Oct 2023 at 01:54, Caleb Connolly > wrote: >> >> This series begins making some headway towards cleaning up Qualcomm >> platform support in u-boot. The following is a rough overview o

Re: [PATCH 8/8] clk/qcom: fix rcg divider value

2023-10-25 Thread Caleb Connolly
On 24/10/2023 21:23, Caleb Connolly wrote: > The RCG divider field takes a value of (2*h - 1) where h is the divisor. > This allows fractional dividers to be supported by calculating them at > compile time using a macro. > > However, the clk_rcg_set_rate_mnd() function was

Re: [PATCH 8/8] clk/qcom: fix rcg divider value

2023-10-27 Thread Caleb Connolly
On 27/10/2023 13:18, Sumit Garg wrote: > On Wed, 25 Oct 2023 at 19:14, Caleb Connolly > wrote: >> >> >> >> On 24/10/2023 21:23, Caleb Connolly wrote: >>> The RCG divider field takes a value of (2*h - 1) where h is the divisor. >>> This allows fr

Re: [PATCH 3/8] clk/qcom: move ipq4019 driver from mach-ipq40xx

2023-10-27 Thread Caleb Connolly
[...] >> diff --git a/arch/arm/mach-ipq40xx/clock-ipq4019.c >> b/drivers/clk/qcom/clock-ipq4019.c >> similarity index 56% >> rename from arch/arm/mach-ipq40xx/clock-ipq4019.c >> rename to drivers/clk/qcom/clock-ipq4019.c >> index c1d5c4ecdd81..04c99964df15 100644 >> ---

Re: [PATCH 3/8] clk/qcom: move ipq4019 driver from mach-ipq40xx

2023-10-27 Thread Caleb Connolly
On 27/10/2023 14:03, Sumit Garg wrote: > On Fri, 27 Oct 2023 at 18:27, Caleb Connolly > wrote: >> >> >> [...] >>>> diff --git a/arch/arm/mach-ipq40xx/clock-ipq4019.c >>>> b/drivers/clk/qcom/clock-ipq4019.c >>>> similarity inde

Re: [PATCH v2 7/7] clk/qcom: fix rcg divider value

2023-11-03 Thread Caleb Connolly
On 02/11/2023 08:24, Sumit Garg wrote: > On Tue, 31 Oct 2023 at 03:54, Caleb Connolly > wrote: >> >> The RCG divider field takes a value of (2*h - 1) where h is the divisor. >> This allows fractional dividers to be supported by calculating them at >> compile tim

Re: [PATCH] MAINTAINERS: update Qualcomm maintainer

2023-11-03 Thread Caleb Connolly
On 02/11/2023 11:49, Sumit Garg wrote: > On Tue, 31 Oct 2023 at 20:49, Caleb Connolly > wrote: >> >> As Ramon has been inactive for some time now, add myself and Neil >> Armstrong to maintain Qualcomm efforts going forwards. >> >> Signed-off-by: Caleb Conn

Please pull qcom-next-20231103

2023-11-03 Thread Caleb Connolly
:50 +) Caleb Connolly (1): MAINTAINERS: update Qualcomm maintainer MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Thanks, -- // Caleb (they/them)

[PATCH v3 3/7] clk/qcom: handle resets and clocks in one device

2023-11-03 Thread Caleb Connolly
and adjusted bind logic. Imported qcom,gcc-ipq4019.h from Linux] Signed-off-by: Konrad Dybcio Reviewed-by: Sumit Garg Signed-off-by: Caleb Connolly --- arch/arm/Kconfig | 1 + arch/arm/dts/qcom-ipq4019.dtsi | 14 +- arch/arm/dts/qcs404

[PATCH v3 5/7] clk/qcom: use function pointers for enable and set_rate

2023-11-03 Thread Caleb Connolly
are also inlined. Reviewed-by: Sumit Garg Signed-off-by: Caleb Connolly --- .../mach-snapdragon/include/mach/sysmap-apq8016.h | 39 -- .../mach-snapdragon/include/mach/sysmap-apq8096.h | 37 - .../mach-snapdragon/include/mach/sysmap-qcs404.h | 88 -- .../mach

[PATCH v3 6/7] clk/qcom: add mnd_width to clk_rcg_set_rate_mnd()

2023-11-03 Thread Caleb Connolly
This property is needed on some platforms to ensure that only the relevant bits are set in the M/N/D registers. Signed-off-by: Caleb Connolly Reviewed-by: Sumit Garg --- drivers/clk/qcom/clock-apq8016.c | 4 ++-- drivers/clk/qcom/clock-apq8096.c | 4 ++-- drivers/clk/qcom/clock-qcom.c

[PATCH v3 7/7] clk/qcom: fix rcg divider value

2023-11-03 Thread Caleb Connolly
-by: Caleb Connolly --- drivers/clk/qcom/clock-apq8016.c | 2 +- drivers/clk/qcom/clock-apq8096.c | 2 +- drivers/clk/qcom/clock-qcom.c| 64 +--- drivers/clk/qcom/clock-qcom.h| 11 +++ drivers/clk/qcom/clock-qcs404.c | 16 +- drivers/clk/qcom/clock

[PATCH v3 1/7] clk/qcom: move from mach-snapdragon

2023-11-03 Thread Caleb Connolly
by default for the respective targets. This will make future work easier as we move towards a generic Qualcomm target. Reviewed-by: Sumit Garg Signed-off-by: Caleb Connolly --- MAINTAINERS| 1 + arch/arm/mach-snapdragon/Kconfig | 4 ++ arch/arm/mach-

[PATCH v3 4/7] clk/qcom: sdm845: add register map for simple gate clocks

2023-11-03 Thread Caleb Connolly
Many gate clocks can be enabled with a single register write, add support for defining these simple gate clocks and add the ones found on SDM845. While we're here, inline clk_init_uart() into msm_set_rate(). Reviewed-by: Sumit Garg Signed-off-by: Caleb Connolly --- drivers/clk/qcom/clock

[PATCH v3 0/7] arm: mach-snapdragon: Qualcomm clock driver cleanup

2023-11-03 Thread Caleb Connolly
k-v1-0-9d96359b9...@linaro.org [1]: https://source.denx.de/u-boot/custodians/u-boot-snapdragon --- Caleb Connolly (6): clk/qcom: move from mach-snapdragon clk/qcom: move ipq4019 driver from mach-ipq40xx clk/qcom: sdm845: add register map for simple gate clocks clk/qcom: us

[PATCH v3 2/7] clk/qcom: move ipq4019 driver from mach-ipq40xx

2023-11-03 Thread Caleb Connolly
This driver is just a stub, but it's necessary to support the upcoming reset driver changes. Reviewed-by: Sumit Garg Signed-off-by: Caleb Connolly --- arch/arm/Kconfig | 1 + arch/arm/mach-ipq40xx/Makefile | 1 - drivers/clk/qcom/Kconfig

[PATCH v4 3/7] clk/qcom: handle resets and clocks in one device

2023-11-07 Thread Caleb Connolly
and adjusted bind logic. Imported qcom,gcc-ipq4019.h from Linux] Signed-off-by: Konrad Dybcio Reviewed-by: Sumit Garg Signed-off-by: Caleb Connolly --- arch/arm/Kconfig | 1 + arch/arm/dts/qcom-ipq4019.dtsi | 14 +- arch/arm/dts/qcs404

[PATCH v4 1/7] clk/qcom: move from mach-snapdragon

2023-11-07 Thread Caleb Connolly
by default for the respective targets. This will make future work easier as we move towards a generic Qualcomm target. Reviewed-by: Sumit Garg Signed-off-by: Caleb Connolly --- MAINTAINERS| 1 + arch/arm/mach-snapdragon/Kconfig | 4 ++ arch/arm/mach-

[PATCH v4 2/7] clk/qcom: move ipq4019 driver from mach-ipq40xx

2023-11-07 Thread Caleb Connolly
This driver is just a stub, but it's necessary to support the upcoming reset driver changes. Reviewed-by: Sumit Garg Signed-off-by: Caleb Connolly --- arch/arm/Kconfig | 1 + arch/arm/mach-ipq40xx/Makefile | 1 - drivers/clk/qcom/Kconfig

[PATCH v4 0/7] arm: mach-snapdragon: Qualcomm clock driver cleanup

2023-11-07 Thread Caleb Connolly
ectly in platform clock code. * avoid renaming msm_* to qcom_* for now * only add relevant gate_clks for sdm845 * Link to v1: https://lore.kernel.org/r/20231024-b4-qcom-clk-v1-0-9d96359b9...@linaro.org [1]: https://source.denx.de/u-boot/custodians/u-boot-snapdragon --- Caleb Connolly (6):

[PATCH v4 5/7] clk/qcom: use function pointers for enable and set_rate

2023-11-07 Thread Caleb Connolly
are also inlined. Reviewed-by: Sumit Garg Signed-off-by: Caleb Connolly --- .../mach-snapdragon/include/mach/sysmap-apq8016.h | 39 -- .../mach-snapdragon/include/mach/sysmap-apq8096.h | 37 - .../mach-snapdragon/include/mach/sysmap-qcs404.h | 88 -- .../mach

[PATCH v4 4/7] clk/qcom: sdm845: add register map for simple gate clocks

2023-11-07 Thread Caleb Connolly
Many gate clocks can be enabled with a single register write, add support for defining these simple gate clocks and add the ones found on SDM845. While we're here, inline clk_init_uart() into msm_set_rate(). Reviewed-by: Sumit Garg Signed-off-by: Caleb Connolly --- drivers/clk/qcom/clock

[PATCH v4 7/7] clk/qcom: fix rcg divider value

2023-11-07 Thread Caleb Connolly
-by: Caleb Connolly --- drivers/clk/qcom/clock-apq8016.c | 2 +- drivers/clk/qcom/clock-apq8096.c | 2 +- drivers/clk/qcom/clock-qcom.c| 64 +--- drivers/clk/qcom/clock-qcom.h| 11 +++ drivers/clk/qcom/clock-qcs404.c | 16 +- drivers/clk/qcom/clock

[PATCH v4 6/7] clk/qcom: add mnd_width to clk_rcg_set_rate_mnd()

2023-11-07 Thread Caleb Connolly
This property is needed on some platforms to ensure that only the relevant bits are set in the M/N/D registers. Signed-off-by: Caleb Connolly Reviewed-by: Sumit Garg --- drivers/clk/qcom/clock-apq8016.c | 4 ++-- drivers/clk/qcom/clock-apq8096.c | 4 ++-- drivers/clk/qcom/clock-qcom.c

Re: [PATCH 2/5] gpio: qcom_pmic: rework pwrkey driver into a button driver

2023-11-07 Thread Caleb Connolly
On 07/11/2023 13:27, Stephan Gerhold wrote: > On Mon, Nov 06, 2023 at 08:57:30PM +0000, Caleb Connolly wrote: >> The power and resin keys were implemented as GPIOs here, but their only >> use would be as buttons. Avoid the additional layer of introspection and >&g

Re: [PATCH v4 7/7] clk/qcom: fix rcg divider value

2023-11-07 Thread Caleb Connolly
On 07/11/2023 12:41, Caleb Connolly wrote: > The RCG divider field takes a value of (2*h - 1) where h is the divisor. > This allows fractional dividers to be supported by calculating them at > compile time using a macro. > > However, the clk_rcg_set_rate_mnd() function was

[PATCH v2 3/7] clk/qcom: handle resets and clocks in one device

2023-10-30 Thread Caleb Connolly
to clk/qcom, added reset driver and adjusted bind logic. Imported qcom,gcc-ipq4019.h from Linux] Signed-off-by: Caleb Connolly --- arch/arm/Kconfig | 1 + arch/arm/dts/qcom-ipq4019.dtsi | 14 +- arch/arm/dts/qcs404-evb.dts

[PATCH v2 5/7] clk/qcom: use function pointers for enable and set_rate

2023-10-30 Thread Caleb Connolly
are also inlined. Signed-off-by: Caleb Connolly --- .../mach-snapdragon/include/mach/sysmap-apq8016.h | 39 -- .../mach-snapdragon/include/mach/sysmap-apq8096.h | 37 - .../mach-snapdragon/include/mach/sysmap-qcs404.h | 88 -- .../mach-snapdragon/include/mach

[PATCH v2 6/7] clk/qcom: add mnd_width to clk_rcg_set_rate_mnd()

2023-10-30 Thread Caleb Connolly
This property is needed on some platforms to ensure that only the relevant bits are set in the M/N/D registers. Signed-off-by: Caleb Connolly Reviewed-by: Sumit Garg --- drivers/clk/qcom/clock-apq8016.c | 4 ++-- drivers/clk/qcom/clock-apq8096.c | 4 ++-- drivers/clk/qcom/clock-qcom.c

[PATCH v2 7/7] clk/qcom: fix rcg divider value

2023-10-30 Thread Caleb Connolly
-by: Caleb Connolly --- drivers/clk/qcom/clock-apq8016.c | 2 +- drivers/clk/qcom/clock-apq8096.c | 2 +- drivers/clk/qcom/clock-qcom.c| 66 +--- drivers/clk/qcom/clock-qcom.h| 11 +++ drivers/clk/qcom/clock-qcs404.c | 16 +- drivers/clk/qcom/clock

[PATCH v2 0/7] arm: mach-snapdragon: Qualcomm clock driver cleanup

2023-10-30 Thread Caleb Connolly
relevant gate_clks for sdm845 * Link to v1: https://lore.kernel.org/r/20231024-b4-qcom-clk-v1-0-9d96359b9...@linaro.org --- Caleb Connolly (6): clk/qcom: move from mach-snapdragon clk/qcom: move ipq4019 driver from mach-ipq40xx clk/qcom: sdm845: add register map for simple g

[PATCH v2 1/7] clk/qcom: move from mach-snapdragon

2023-10-30 Thread Caleb Connolly
by default for the respective targets. This will make future work easier as we move towards a generic Qualcomm target. Signed-off-by: Caleb Connolly --- arch/arm/mach-snapdragon/Kconfig | 4 ++ arch/arm/mach-snapdragon/Makefile | 5 --- drivers/c

[PATCH v2 4/7] clk/qcom: sdm845: add register map for simple gate clocks

2023-10-30 Thread Caleb Connolly
Many gate clocks can be enabled with a single register write, add support for defining these simple gate clocks and add the ones found on SDM845. While we're here, inline clk_init_uart() into msm_set_rate(). Signed-off-by: Caleb Connolly --- .../mach-snapdragon/include/mach/sysmap-sdm845.h

[PATCH v2 2/7] clk/qcom: move ipq4019 driver from mach-ipq40xx

2023-10-30 Thread Caleb Connolly
This driver is just a stub, but it's necessary to support the upcoming reset driver changes. Signed-off-by: Caleb Connolly --- arch/arm/Kconfig | 1 + arch/arm/mach-ipq40xx/Makefile | 1 - drivers/clk/qcom/Kconfig

[PATCH 5/6] pinctrl: qcom: move ipq4019 driver from mach-ipq40xx

2023-10-31 Thread Caleb Connolly
Drop the duplicated pinctrl-snapdragon driver from mach-ipq40xx and add it to drivers/pinctrl/qcom. Signed-off-by: Caleb Connolly --- arch/arm/Kconfig | 1 + arch/arm/mach-ipq40xx/Makefile | 8 - arch/arm/mach-ipq40xx/pinctrl

[PATCH 6/6] pinctrl: qcom: rename msm -> qcom

2023-10-31 Thread Caleb Connolly
The "MSM" naming hasn't been correct for quite a while now, in line with Linux lets rename all these msm_* functions to qcom_* as well as ensure namespacing is consistent across the pinctrl and GPIO drivers. Signed-off-by: Caleb Connolly --- configs/dragonboard410c_defconfig

[PATCH 1/6] pinctrl: qcom: move out of mach-snapdragon

2023-10-31 Thread Caleb Connolly
Move the Qualcomm pinctrl drivers out of mach-snapdragon and over to the rest of the pinctrl drivers, adjust the drivers so that support for each platform can be enabled/disabled individually and introduce platform specific configuration options. Signed-off-by: Caleb Connolly --- arch/arm/mach

[PATCH 3/6] pinctrl: qcom: handle reserved ranges

2023-10-31 Thread Caleb Connolly
to interact with these pins. Signed-off-by: Caleb Connolly --- drivers/gpio/msm_gpio.c | 15 + drivers/pinctrl/qcom/pinctrl-qcom.c | 64 + include/qcom-gpio.h | 15 + 3 files changed, 94 insertions(+) diff --git a/drivers

[PATCH 4/6] msm_qcom: use unsigned int

2023-10-31 Thread Caleb Connolly
Replaces the uses of "unsigned" with "unsigned int". Signed-off-by: Caleb Connolly --- drivers/gpio/msm_gpio.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/msm_gpio.c b/drivers/gpio/msm_gpio.c index 7a09abdafb2e..7d01fecf46f2 10064

[PATCH 2/6] pinctrl: qcom: make compatible with linux DTs

2023-10-31 Thread Caleb Connolly
t the GPIO driver to handle these too, and finally enable support for all pins with the same numbering as used in Linux. Signed-off-by: Caleb Connolly --- arch/arm/dts/dragonboard845c-uboot.dtsi | 2 +- arch/arm/dts/sdm845.dtsi| 16 +++- arch/arm/dts/starqltechn-uboot.dts

[PATCH 0/6] arm: mach-snapdragon: Qualcomm pinctrl driver cleanup

2023-10-31 Thread Caleb Connolly
es loosely depends on the associated clock driver cleanup which can be found here (Makefile and perhaps DTS conflicts): https://lore.kernel.org/u-boot/20231024-b4-qcom-clk-v1-0-9d96359b9...@linaro.org/ --- Caleb Connolly (6): pinctrl: qcom: move out of mach-snapdragon pinctrl: qcom: make

[PATCH] MAINTAINERS: update Qualcomm maintainer

2023-10-31 Thread Caleb Connolly
As Ramon has been inactive for some time now, add myself and Neil Armstrong to maintain Qualcomm efforts going forwards. Signed-off-by: Caleb Connolly --- I greatly appreciate the work done by Ramon Fried in keeping Qualcomm support alive in U-Boot the last few years. However it's clear that he

[PATCH 1/8] clk/qcom: move from mach-snapdragon

2023-10-24 Thread Caleb Connolly
Clock drivers don't belong here, move them to the right place and declutter mach-snapdragon a bit. Signed-off-by: Caleb Connolly --- arch/arm/mach-snapdragon/Makefile| 5 - drivers/clk/Makefile | 1 + drivers/clk

[PATCH 0/8] arm: mach-snapdragon: Qualcomm clock driver cleanup

2023-10-24 Thread Caleb Connolly
to resend this initial support pending acceptance of this series and several other cleanups. [1]: https://lore.kernel.org/u-boot/20230324080418.3856409-1-bhupesh.sha...@linaro.org/ --- Caleb Connolly (7): clk/qcom: move from mach-snapdragon clk/qcom: add per-platform configs clk/

[PATCH 3/8] clk/qcom: move ipq4019 driver from mach-ipq40xx

2023-10-24 Thread Caleb Connolly
This driver is just a stub, but it's necessary to support the upcoming reset driver changes. Signed-off-by: Caleb Connolly --- arch/arm/Kconfig | 1 + arch/arm/mach-ipq40xx/Makefile | 1 - drivers/clk/qcom/Kconfig

[PATCH 5/8] clk/qcom: sdm845: add register map for simple gate clocks

2023-10-24 Thread Caleb Connolly
Many gate clocks can be enabled with a single register write, add support for defining these simple gate clocks and add the ones found on SDM845. While we're here, inline clk_init_uart() into msm_set_rate(). Signed-off-by: Caleb Connolly --- .../mach-snapdragon/include/mach/sysmap-sdm845.h

[PATCH 4/8] clk/qcom: handle resets and clocks in one device

2023-10-24 Thread Caleb Connolly
. Heavily inspired by Renesas code for a similar hw block. Signed-off-by: Konrad Dybcio [caleb: moved drivers to clk/qcom, added reset driver and adjusted bind logic] Signed-off-by: Caleb Connolly --- arch/arm/Kconfig | 1 + arch/arm/dts/qcom-ipq4019.dtsi | 14 +-- arch/arm

[PATCH 7/8] clk/qcom: add mnd_width to clk_rcg_set_rate_mnd()

2023-10-24 Thread Caleb Connolly
This property is needed on some platforms to ensure that only the relevant bits are set in the M/N/D registers. Signed-off-by: Caleb Connolly --- drivers/clk/qcom/clock-apq8016.c | 4 ++-- drivers/clk/qcom/clock-apq8096.c | 4 ++-- drivers/clk/qcom/clock-qcom.c| 11 +++ drivers

[PATCH 6/8] clk/qcom: use function pointers for enable and set_rate

2023-10-24 Thread Caleb Connolly
to include the board specific sysmap header, include those explicitly to further reduce the dependency between the clock driver and a particular target configuration. Signed-off-by: Caleb Connolly --- drivers/clk/qcom/clock-apq8016.c | 12 ++-- drivers/clk/qcom/clock-apq8096.c | 12

[PATCH 2/8] clk/qcom: add per-platform configs

2023-10-24 Thread Caleb Connolly
Decouple the clock drivers from the mach-snapdragon TARGET configs by introducing CONFIG_CLK_QCOM and associated options to build each SoC. This will make future cleanup easier as we move towards a generic Qualcomm target. Signed-off-by: Caleb Connolly --- arch/arm/mach-snapdragon/Kconfig | 4

[PATCH v2] arm: init: add an option to use FDT from previous bootloader

2023-10-24 Thread Caleb Connolly
and instead determine it dynamically at runtime. Signed-off-by: Caleb Connolly --- This patch will improve generic support for Qualcomm boards by enabling us to configure the memory map at runtime rather than having hardcoded maps on a per-device basis. I've gone for this approach initially to try

[PATCH 8/8] clk/qcom: fix rcg divider value

2023-10-24 Thread Caleb Connolly
-by: Caleb Connolly --- drivers/clk/qcom/clock-apq8016.c | 2 +- drivers/clk/qcom/clock-apq8096.c | 2 +- drivers/clk/qcom/clock-qcom.c| 40 drivers/clk/qcom/clock-qcom.h| 11 +++ drivers/clk/qcom/clock-qcs404.c | 16 drivers/clk

Re: [PATCH] arm: init: add an option to use FDT from previous bootloader

2023-10-24 Thread Caleb Connolly
On 24/10/2023 19:03, Simon Glass wrote: > Hi Caleb, > > On Tue, 24 Oct 2023 at 04:32, Caleb Connolly > wrote: >> >> Add a new config option to allow u-boot to reuse the FDT provided by the > > U-Boot (please fix throughout) Will do! > >> p

Re: [PATCH] arm: init: add an option to use FDT from previous bootloader

2023-10-24 Thread Caleb Connolly
On 24/10/2023 20:25, Tom Rini wrote: > On Tue, Oct 24, 2023 at 12:32:35PM +0100, Caleb Connolly wrote: > >> Add a new config option to allow u-boot to reuse the FDT provided by the >> previous stage bootloader when available. >> >> On some boards the previous

Re: [PATCH v3 6/7] clk/qcom: add mnd_width to clk_rcg_set_rate_mnd()

2023-11-06 Thread Caleb Connolly
On 06/11/2023 07:06, Sumit Garg wrote: > On Fri, 3 Nov 2023 at 21:09, Caleb Connolly wrote: >> >> This property is needed on some platforms to ensure that only the >> relevant bits are set in the M/N/D registers. > > This commit broke qcs404 platform which is fixed

[PATCH v2 2/5] pinctrl: qcom: move ipq4019 driver from mach-ipq40xx

2023-11-06 Thread Caleb Connolly
Drop the duplicated pinctrl-snapdragon driver from mach-ipq40xx and add it to drivers/pinctrl/qcom. Acked-by: Sumit Garg Signed-off-by: Caleb Connolly --- arch/arm/Kconfig | 1 + arch/arm/mach-ipq40xx/Makefile | 8 - arch/arm/mach

[PATCH v2 0/5] arm: mach-snapdragon: Qualcomm pinctrl driver cleanup

2023-11-06 Thread Caleb Connolly
-pinctrl-v1-0-9123d6a21...@linaro.org --- Caleb Connolly (5): pinctrl: qcom: move out of mach-snapdragon pinctrl: qcom: move ipq4019 driver from mach-ipq40xx pinctrl: qcom: make compatible with linux DTs msm_gpio: use unsigned int fixup! pinctrl: qcom: make co

[PATCH v2 3/5] pinctrl: qcom: make compatible with linux DTs

2023-11-06 Thread Caleb Connolly
t the GPIO driver to handle these too, and finally enable support for all pins with the same numbering as used in Linux. Signed-off-by: Caleb Connolly --- arch/arm/dts/dragonboard845c-uboot.dtsi | 2 +- arch/arm/dts/sdm845.dtsi | 16 ++ arch/arm/dts/starqltechn-

[PATCH v2 1/5] pinctrl: qcom: move out of mach-snapdragon

2023-11-06 Thread Caleb Connolly
Move the Qualcomm pinctrl drivers out of mach-snapdragon and over to the rest of the pinctrl drivers, adjust the drivers so that support for each platform can be enabled/disabled individually and introduce platform specific configuration options. Reviewed-by: Sumit Garg Signed-off-by: Caleb

[PATCH v2 5/5] fixup! pinctrl: qcom: make compatible with linux DTs

2023-11-06 Thread Caleb Connolly
--- drivers/gpio/msm_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/msm_gpio.c b/drivers/gpio/msm_gpio.c index 3e4a0194b10a..80cd28bb231f 100644 --- a/drivers/gpio/msm_gpio.c +++ b/drivers/gpio/msm_gpio.c @@ -11,7 +11,7 @@ #include #include #include

[PATCH v2 4/5] msm_gpio: use unsigned int

2023-11-06 Thread Caleb Connolly
Replaces the uses of "unsigned" with "unsigned int". Reviewed-by: Sumit Garg Signed-off-by: Caleb Connolly --- drivers/gpio/msm_gpio.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/msm_gpio.c b/drivers/gpio/msm_gpio.c index 7d

[PATCH 0/5] Qualcomm PMIC fixes

2023-11-06 Thread Caleb Connolly
/ [2]: https://lore.kernel.org/u-boot/20231103-b4-qcom-clk-v3-0-8d2d460ec...@linaro.org/ --- Caleb Connolly (5): gpio: qcom_pmic: fix silent dev_read_addr downcast gpio: qcom_pmic: rework pwrkey driver into a button driver gpio: qcom_pmic: fix support for upstream DT spmi

[PATCH 2/5] gpio: qcom_pmic: rework pwrkey driver into a button driver

2023-11-06 Thread Caleb Connolly
t; to match upstream (Linux). The dragonboard410c and 820c boards are adjusted to benefit from this change too, simplify their custom board init code. Signed-off-by: Caleb Connolly --- arch/arm/dts/dragonboard410c-uboot.dtsi | 11 +- arch/arm/dts/dragonboard820c-uboot.dtsi |

[PATCH 1/5] gpio: qcom_pmic: fix silent dev_read_addr downcast

2023-11-06 Thread Caleb Connolly
priv->pid is uint32_t, but dev_read_addr() returns a uint64_t on arm64, with the upper bits being used for error codes. Do error checking before downcasting to u32 to prevent errors being silently ignored. Signed-off-by: Caleb Connolly --- drivers/gpio/qcom_pmic_gpio.c | 14 ++

[PATCH 4/5] spmi: msm: fix register range names

2023-11-06 Thread Caleb Connolly
The core and chnl register ranges were swapped on SDM845. Fix it, and fetch the register ranges by name instead of by index. Drop the cosmetic "version" variable and clean up the debug logging. Signed-off-by: Caleb Connolly --- arch/arm/dts/sdm845.dtsi | 2 +- drivers/spmi/spmi-m

[PATCH 5/5] pmic: qcom: dont use dev_read_addr to get USID

2023-11-06 Thread Caleb Connolly
have support for GSID handling, so just ignore the second value for now. Signed-off-by: Caleb Connolly --- drivers/power/pmic/pmic_qcom.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/power/pmic/pmic_qcom.c b/drivers/power/pmic/pmic_qcom.c index

[PATCH 3/5] gpio: qcom_pmic: fix support for upstream DT

2023-11-06 Thread Caleb Connolly
Linux devicetrees use the "gpio-ranges" property, add support for parsing it instead of "gpio-count" so that upstream DTs can be used with U-Boot. Signed-off-by: Caleb Connolly --- drivers/gpio/qcom_pmic_gpio.c | 26 ++ 1 file changed, 26 inser

Re: [PATCH 3/5] smbios: Use SMBIOS 3.0 to support an address above 4GB

2023-10-17 Thread Caleb Connolly
Hi Both, [...] >>> >>> @@ -513,13 +517,23 @@ ulong write_smbios_table(ulong addr) >>>*/ >>> table_addr = (ulong)map_sysmem(tables, 0); >>> if (sizeof(table_addr) > sizeof(u32) && table_addr > (ulong)UINT_MAX) >>> { >> >> You have to check the end address of the table not the

Re: [PATCH 3/5] smbios: Use SMBIOS 3.0 to support an address above 4GB

2023-10-18 Thread Caleb Connolly
On 18/10/2023 04:33, Simon Glass wrote: > Hi Caleb, > > On Tue, 17 Oct 2023 at 11:59, Caleb Connolly > wrote: >> >> Hi Both, >> >> [...] >>>>> >>>>> @@ -513,13 +517,23 @@ ulong write_smbios_table(ulong addr) &g

Re: [PATCH] smbios: arm64: Allow table to be written at a fixed addr

2023-10-21 Thread Caleb Connolly
Hi Simon, On 21/10/2023 01:45, Simon Glass wrote: U-Boot typically sets up its malloc() pool near the top of memory. On ARM64 systems this can result in an SMBIOS table above 4GB which is not supported by SMBIOSv2. Work around this problem by providing a new option to choose an address just

Re: [PATCH] smbios: arm64: Allow table to be written at a fixed addr

2023-10-23 Thread Caleb Connolly
On 23/10/2023 08:04, Simon Glass wrote: > Hi Caleb, > > On Sat, 21 Oct 2023 at 01:43, Caleb Connolly > wrote: >> >> Hi Simon, >> >> On 21/10/2023 01:45, Simon Glass wrote: >>> U-Boot typically sets up its malloc() pool near the top of memory. On &

[PATCH] arm: init: add an option to use FDT from previous bootloader

2023-10-24 Thread Caleb Connolly
and instead determine it dynamically at runtime. Signed-off-by: Caleb Connolly --- This patch will improve generic support for Qualcomm boards by enabling us to configure the memory map at runtime rather than having hardcoded maps on a per-device basis. I've gone for this approach initially to try

Re: [PATCH 3/3] treewide: use linux/time.h for time conversion defines

2023-11-10 Thread Caleb Connolly
On 09/11/2023 17:10, Igor Prusov wrote: > Now that we have time conversion defines from in time.h there is no need > for each driver to define their own version. > > Signed-off-by: Igor Prusov Reviewed-by: Caleb Connolly #qcom geni > --- > > board/friendly

[PATCH v2 2/5] gpio: qcom_pmic: rework pwrkey driver into a button driver

2023-11-08 Thread Caleb Connolly
t; to match upstream (Linux). The dragonboard410c and 820c boards are adjusted to benefit from this change too, simplify their custom board init code. Signed-off-by: Caleb Connolly --- MAINTAINERS | 1 + arch/arm/dts/dragonboard410c-uboot.dtsi |

[PATCH v2 0/5] Qualcomm PMIC fixes

2023-11-08 Thread Caleb Connolly
06-b4-qcom-dt-compat-v1-0-0ccbb7841...@linaro.org --- Caleb Connolly (5): gpio: qcom_pmic: fix silent dev_read_addr downcast gpio: qcom_pmic: rework pwrkey driver into a button driver gpio: qcom_pmic: fix support for upstream DT spmi: msm: fix register range names

[PATCH v2 1/5] gpio: qcom_pmic: fix silent dev_read_addr downcast

2023-11-08 Thread Caleb Connolly
priv->pid is uint32_t, but dev_read_addr() returns a uint64_t on arm64, with the upper bits being used for error codes. Do error checking before downcasting to u32 to prevent errors being silently ignored. Signed-off-by: Caleb Connolly --- drivers/gpio/qcom_pmic_gpio.c | 14 ++

[PATCH v2 3/5] gpio: qcom_pmic: fix support for upstream DT

2023-11-08 Thread Caleb Connolly
Linux devicetrees use the "gpio-ranges" property, add support for parsing it instead of "gpio-count" so that upstream DTs can be used with U-Boot. Signed-off-by: Caleb Connolly --- drivers/gpio/qcom_pmic_gpio.c | 26 ++ 1 file changed, 26 inser

[PATCH v2 4/5] spmi: msm: fix register range names

2023-11-08 Thread Caleb Connolly
The core and chnl register ranges were swapped on SDM845. Fix it, and fetch the register ranges by name instead of by index. Drop the cosmetic "version" variable and clean up the debug logging. Signed-off-by: Caleb Connolly --- arch/arm/dts/sdm845.dtsi | 2 +- drivers/spmi/spmi-m

[PATCH v2 5/5] pmic: qcom: dont use dev_read_addr to get USID

2023-11-08 Thread Caleb Connolly
have support for GSID handling, so just ignore the second value for now. Signed-off-by: Caleb Connolly --- drivers/power/pmic/pmic_qcom.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/power/pmic/pmic_qcom.c b/drivers/power/pmic/pmic_qcom.c index

[PATCH] button: qcom-pmic: demote "unknown button" message to debug

2024-02-09 Thread Caleb Connolly
This message isn't an error (there can be a watchdog subnode for example) but it shouldn't be printed unless this driver is being debugged. Demote it to a debug print. Signed-off-by: Caleb Connolly --- drivers/button/button-qcom-pmic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] test: dm: add button_cmd test

2024-02-14 Thread Caleb Connolly
and was removed when running save_defconfig. Signed-off-by: Caleb Connolly --- configs/sandbox_defconfig | 2 +- test/dm/button.c | 96 +++ 2 files changed, 97 insertions(+), 1 deletion(-) diff --git a/configs/sandbox_defconfig b/configs

Re: [PATCH] button: qcom-pmic: fix some error checking

2024-02-14 Thread Caleb Connolly
On Wed, 31 Jan 2024 10:09:15 +0300, Dan Carpenter wrote: > The pmic_reg_read() function can return errors. Add a check for that. > > Applied, thanks! [1/1] button: qcom-pmic: fix some error checking commit: 6b929e9f3c16bbddeffb85351e93db13eaa9b57d Best regards, -- // Caleb

[PATCH v4 02/39] usb: dwc3-generic: support external vbus regulator

2024-02-15 Thread Caleb Connolly
Add support for a vbus-supply regulator specified in devicetree. This provides generic support to avoid hardcoded GPIO configuration in board init code. Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- This patch has no dependencies Cc: Marek Vasut --- drivers/usb/dwc3/dwc3

[PATCH v4 13/39] pinctrl: qcom: stub support for special GPIOs

2024-02-15 Thread Caleb Connolly
ty is still an issue. Add support for allowing these to be specified after the other pins, and make all pinmux/pinconf calls for them nop. Signed-off-by: Caleb Connolly --- arch/arm/mach-snapdragon/include/mach/gpio.h | 2 ++ drivers/gpio/msm_gpio.c | 20

[PATCH v4 08/39] serial: msm: fix clock handling and pinctrl

2024-02-15 Thread Caleb Connolly
Use the modern helpers to fetch the clock and use the correct property ("clocks" instead of "clock"). Drop the call to pinctrl_select_state() as no boards have a "uart" pinctrl state and this prints confusing errors. Signed-off-by: Caleb Connolly --- arch/ar

[PATCH v4 16/39] board: dragonboard410c: add chainloaded config fragment

2024-02-15 Thread Caleb Connolly
Add a config fragment for building U-Boot such that it can be chainloaded by aboot/LK rather than being flashed directly to the aboot partition. Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- board/qualcomm/dragonboard410c/configs/chainloaded.config | 7 +++ 1 file changed

[PATCH v4 18/39] board: dragonboard410c: import board code from mach-snapdragon

2024-02-15 Thread Caleb Connolly
. Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- arch/arm/mach-snapdragon/Makefile| 2 - arch/arm/mach-snapdragon/dram.c | 99 arch/arm/mach-snapdragon/include/mach/dram.h | 12 --- arch/arm/mach-snapdragon/include/mach

[PATCH v4 10/39] gpio: qcom_pmic: add a quirk to skip GPIO configuration

2024-02-15 Thread Caleb Connolly
). Signed-off-by: Caleb Connolly --- drivers/gpio/qcom_pmic_gpio.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/qcom_pmic_gpio.c b/drivers/gpio/qcom_pmic_gpio.c index 2a4fef8d28cb..198cd84bc31e 100644 --- a/drivers/gpio/qcom_pmic_gpio.c +++ b

[PATCH v4 33/39] dt-bindings: import headers for MSM8996

2024-02-15 Thread Caleb Connolly
Import dt-binding headers for MSM8996/APQ8096 from Linux. Taken from kernel tag v6.7 Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- include/dt-bindings/clock/qcom,gcc-msm8996.h | 362 + include/dt-bindings/clock/qcom,mmcc-msm8996.h | 295

[PATCH v4 32/39] dts: msm8916: replace with upstream DTS

2024-02-15 Thread Caleb Connolly
Drop the U-Boot specific dragonboard410c.dts in favour of the upstream msm8916-sbc.dts. No additional changes are needed to this DTS for U-Boot support. Taken from kernel tag v6.7 Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- arch/arm/dts/Makefile |2

[PATCH v4 34/39] dts: msm8996: import PMIC dtsi files

2024-02-15 Thread Caleb Connolly
Import PM8994 and PMI8994 DTSI files in preparation for switching MSM8996 boards to upstream DTS. Taken from kernel tag v6.7 Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- arch/arm/dts/pm8994.dtsi | 152 ++ arch/arm/dts/pmi8994.dtsi

[PATCH v4 30/39] dt-bindings: import headers for MSM8916

2024-02-15 Thread Caleb Connolly
Import the dt-bindings headers in preparation for switching to upstream DTS for MSM8916. Taken from kernel tag v6.7 Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- include/dt-bindings/arm/coresight-cti-dt.h | 37 + include/dt-bindings/clock/qcom,rpmcc.h | 174

[PATCH v4 35/39] dts: dragonboard820c: use correct bindings for clocks

2024-02-15 Thread Caleb Connolly
Don't use hardcoded clock IDs, use the IDs from the dt-bindings to be compatible with upstream. Taken from kernel tag v6.7 Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- arch/arm/dts/dragonboard820c.dts | 5 +++-- drivers/clk/qcom/clock-apq8096.c | 5 +++-- 2 files changed, 6

[PATCH v4 37/39] dt-bindings: import headers for qcs404

2024-02-15 Thread Caleb Connolly
Import the headers needed for QCS404-evb. Taken from kernel tag v6.7 Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- include/dt-bindings/clock/qcom,turingcc-qcs404.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/include/dt-bindings/clock/qcom,turingcc

[PATCH v4 01/39] arm: init: export prev_bl_fdt_addr

2024-02-15 Thread Caleb Connolly
the FDT addr so that boards can use it over the built-in FDT. Don't check is_addr_accessible() here because we might not yet have a valid mem_map if it's going to be populated from the FDT, let the board do their own validation instead. Reviewed-by: Tom Rini Signed-off-by: Caleb Connolly

[PATCH v4 07/39] serial: msm: add debug UART

2024-02-15 Thread Caleb Connolly
Introduce support for early debugging. This relies on the previous stage bootloader to initialise the UART clocks, when running with U-Boot as the primary bootloader this feature doesn't work. It will require a way to configure the clocks before the driver model is available. Signed-off-by: Caleb

[PATCH v4 09/39] gpio: qcom_pmic: 1-based GPIOs

2024-02-15 Thread Caleb Connolly
Qualcomm PMICs number their GPIOs starting from 1, implement a custom .xlate method to handle this. Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- drivers/gpio/qcom_pmic_gpio.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/gpio

[PATCH v4 03/39] mmc: msm_sdhci: use modern clock handling

2024-02-15 Thread Caleb Connolly
Use the clk_* helper functions and the correct property name for clocks. Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- drivers/mmc/msm_sdhci.c | 69 + 1 file changed, 47 insertions(+), 22 deletions(-) diff --git a/drivers/mmc

[PATCH v4 12/39] sandbox: dts: fix qcom pmic gpio

2024-02-15 Thread Caleb Connolly
Adjust the DT to match upstream bindings. Signed-off-by: Caleb Connolly --- arch/sandbox/dts/sandbox.dtsi | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/sandbox/dts/sandbox.dtsi b/arch/sandbox/dts/sandbox.dtsi index 241f397ba6e7..c93ce7128942 100644 --- a/arch

[PATCH v4 27/39] dt-bindings: import headers for SDM845

2024-02-15 Thread Caleb Connolly
Import the DT bindings headers that are used by SDM845 from Linux. Taken from kernel tag v6.7 Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly --- include/dt-bindings/clock/qcom,camcc-sdm845.h | 116 ++ include/dt-bindings/clock/qcom,dispcc-sdm845.h | 56 +++ include/dt

  1   2   3   4   5   6   7   8   >