[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <85866e42-b3d4-462c-8890-e2a354627229@kernel.org>
Date: Wed, 28 May 2025 10:28:01 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Clément Le Goffic <clement.legoffic@...s.st.com>,
Linus Walleij <linus.walleij@...aro.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Bartosz Golaszewski <brgl@...ev.pl>
Cc: linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
devicetree@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3 3/9] pinctrl: stm32: Introduce HDP driver
On 23/05/2025 14:38, Clément Le Goffic wrote:
> This patch introduce the driver for the Hardware Debug Port available on
"Add driver...", see submitting patches
> STM32MP platforms. The HDP allows the observation of internal SoC
> signals by using multiplexers. Each HDP port can provide up to 16
> internal signals (one of them can be software controlled as a GPO).
>
> Signed-off-by: Clément Le Goffic <clement.legoffic@...s.st.com>
> ---
> drivers/pinctrl/stm32/Kconfig | 14 +
> drivers/pinctrl/stm32/Makefile | 1 +
> drivers/pinctrl/stm32/pinctrl-stm32-hdp.c | 720 ++++++++++++++++++++++++++++++
> 3 files changed, 735 insertions(+)
>
> diff --git a/drivers/pinctrl/stm32/Kconfig b/drivers/pinctrl/stm32/Kconfig
> index 2656d3d3ae40..4b474cfd1f2c 100644
> --- a/drivers/pinctrl/stm32/Kconfig
> +++ b/drivers/pinctrl/stm32/Kconfig
> @@ -57,4 +57,18 @@ config PINCTRL_STM32MP257
> depends on OF && HAS_IOMEM
> default MACH_STM32MP25
> select PINCTRL_STM32
> +
> +config PINCTRL_STM32_HDP
> + tristate "STMicroelectronics STM32 Hardware Debug Port (HDP) pin control"
> + depends on OF && HAS_IOMEM
> + default ARM64 || (ARM && CPU_V7)
I just cleaned this up and I still think this should be default for your
arch, not for every other platform during compile test. See bunch of my
commits "Do not enable by default during compile testing".
> + select PINMUX
> + select GENERIC_PINCONF
> + select GPIOLIB
> + help
> + The Hardware Debug Port allows the observation of internal signals.
> + It uses configurable multiplexer to route signals in a dedicated observation register.
> + This driver also permits the observation of signals on external SoC pins.
> + It permits the observation of up to 16 signals per HDP line.
> +
> endif
> diff --git a/drivers/pinctrl/stm32/Makefile b/drivers/pinctrl/stm32/Makefile
> index 7b17464d8de1..98a1bbc7e16c 100644
> --- a/drivers/pinctrl/stm32/Makefile
> +++ b/drivers/pinctrl/stm32/Makefile
> @@ -11,3 +11,4 @@ obj-$(CONFIG_PINCTRL_STM32H743) += pinctrl-stm32h743.o
> obj-$(CONFIG_PINCTRL_STM32MP135) += pinctrl-stm32mp135.o
> obj-$(CONFIG_PINCTRL_STM32MP157) += pinctrl-stm32mp157.o
> obj-$(CONFIG_PINCTRL_STM32MP257) += pinctrl-stm32mp257.o
> +obj-$(CONFIG_PINCTRL_STM32_HDP) += pinctrl-stm32-hdp.o
> diff --git a/drivers/pinctrl/stm32/pinctrl-stm32-hdp.c b/drivers/pinctrl/stm32/pinctrl-stm32-hdp.c
> new file mode 100644
> index 000000000000..e91442eb566b
> --- /dev/null
> +++ b/drivers/pinctrl/stm32/pinctrl-stm32-hdp.c
> @@ -0,0 +1,720 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (C) STMicroelectronics 2025 - All Rights Reserved
> + * Author: Clément Le Goffic <clement.legoffic@...s.st.com> for STMicroelectronics.
> + */
> +#include <linux/bits.h>
> +#include <linux/clk.h>
> +#include <linux/gpio/driver.h>
> +#include <linux/io.h>
> +#include <linux/of.h>
> +#include <linux/of_device.h>
Not used.
> +#include <linux/pinctrl/consumer.h>
> +#include <linux/pinctrl/pinconf-generic.h>
> +#include <linux/pinctrl/pinctrl.h>
> +#include <linux/pinctrl/pinmux.h>
> +#include <linux/platform_device.h>
> +#include <linux/pm.h>
> +
Best regards,
Krzysztof
Powered by blists - more mailing lists