* [PATCH 0/2] arm64: dts: ti: k3-am67a-beagley-ai: GPIO improvements
@ 2026-07-28 19:44 David Lechner (TI)
2026-07-28 19:44 ` [PATCH 1/2] arm64: dts: ti: k3-am67a-beagley-ai: Add gpio ranges David Lechner (TI)
2026-07-28 19:44 ` [PATCH 2/2] arm64: dts: ti: k3-am67a-beagley-ai: Add gpio line names David Lechner (TI)
0 siblings, 2 replies; 5+ messages in thread
From: David Lechner (TI) @ 2026-07-28 19:44 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Robert Nelson, linux-arm-kernel, devicetree, linux-kernel,
David Lechner (TI)
This is picking up a few downstream changes from [1] to make GPIOs
easier to use that I missed when using the BeagleY-AI with a mainline
kernel.
[1]: https://openbeagle.org/beagleboard/linux/-/blob/v6.6.58-ti-arm64-r35/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai-pinmux.dtsi?ref_type=heads
Signed-off-by: David Lechner (TI) <dlechner@baylibre.com>
---
David Lechner (TI) (2):
arm64: dts: ti: k3-am67a-beagley-ai: Add gpio ranges
arm64: dts: ti: k3-am67a-beagley-ai: Add gpio line names
arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts | 45 ++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
---
base-commit: 3652b49adac266a3d27cb41cdfdb7d8790fc3633
change-id: 20260728-arm-dts-beagleyai-gpio-info-793ed8b4d55e
Best regards,
--
David Lechner (TI) <dlechner@baylibre.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] arm64: dts: ti: k3-am67a-beagley-ai: Add gpio ranges
2026-07-28 19:44 [PATCH 0/2] arm64: dts: ti: k3-am67a-beagley-ai: GPIO improvements David Lechner (TI)
@ 2026-07-28 19:44 ` David Lechner (TI)
2026-07-28 19:57 ` sashiko-bot
2026-07-28 19:44 ` [PATCH 2/2] arm64: dts: ti: k3-am67a-beagley-ai: Add gpio line names David Lechner (TI)
1 sibling, 1 reply; 5+ messages in thread
From: David Lechner (TI) @ 2026-07-28 19:44 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Robert Nelson, linux-arm-kernel, devicetree, linux-kernel,
David Lechner (TI)
Add pinctrl-single,gpio-range properties to the BeagleY-AI .dts so that
GPIOs get the correct pin mux when requested.
Signed-off-by: David Lechner (TI) <dlechner@baylibre.com>
---
arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts b/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts
index 5255e04b9ac7..599d576f694f 100644
--- a/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts
+++ b/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts
@@ -149,6 +149,19 @@ led-1 {
};
&main_pmx0 {
+ pinctrl-single,gpio-range =
+ <&main_pmx0_range 0 32 PIN_GPIO_RANGE_IOPAD>,
+ <&main_pmx0_range 33 38 PIN_GPIO_RANGE_IOPAD>,
+ <&main_pmx0_range 72 17 PIN_GPIO_RANGE_IOPAD>,
+ <&main_pmx0_range 101 25 PIN_GPIO_RANGE_IOPAD>,
+ <&main_pmx0_range 137 5 PIN_GPIO_RANGE_IOPAD>,
+ <&main_pmx0_range 143 3 PIN_GPIO_RANGE_IOPAD>,
+ <&main_pmx0_range 149 2 PIN_GPIO_RANGE_IOPAD>;
+
+ main_pmx0_range: gpio-range {
+ #pinctrl-single,gpio-range-cells = <3>;
+ };
+
main_i2c0_pins_default: main-i2c0-default-pins {
pinctrl-single,pins = <
J722S_IOPAD(0x01e0, PIN_INPUT_PULLUP, 0) /* (D23) I2C0_SCL */
@@ -267,6 +280,15 @@ &main_uart0 {
};
&mcu_pmx0 {
+ pinctrl-single,gpio-range =
+ <&mcu_pmx_range 0 21 PIN_GPIO_RANGE_IOPAD>,
+ <&mcu_pmx_range 23 1 PIN_GPIO_RANGE_IOPAD>,
+ <&mcu_pmx_range 32 2 PIN_GPIO_RANGE_IOPAD>;
+
+ mcu_pmx_range: gpio-range {
+ #pinctrl-single,gpio-range-cells = <3>;
+ };
+
wkup_uart0_pins_default: wkup-uart0-default-pins {
pinctrl-single,pins = <
J722S_MCU_IOPAD(0x02c, PIN_INPUT, 0) /* (C7) WKUP_UART0_CTSn */
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] arm64: dts: ti: k3-am67a-beagley-ai: Add gpio line names
2026-07-28 19:44 [PATCH 0/2] arm64: dts: ti: k3-am67a-beagley-ai: GPIO improvements David Lechner (TI)
2026-07-28 19:44 ` [PATCH 1/2] arm64: dts: ti: k3-am67a-beagley-ai: Add gpio ranges David Lechner (TI)
@ 2026-07-28 19:44 ` David Lechner (TI)
1 sibling, 0 replies; 5+ messages in thread
From: David Lechner (TI) @ 2026-07-28 19:44 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: Robert Nelson, linux-arm-kernel, devicetree, linux-kernel,
David Lechner (TI)
Add gpio-line-names properties to the BeagleY-AI .dts so that gpios
can be requested by the documented name on the 40-pin header (and a
few other board functions).
Signed-off-by: David Lechner (TI) <dlechner@baylibre.com>
---
arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts b/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts
index 599d576f694f..173c091116d5 100644
--- a/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts
+++ b/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts
@@ -267,9 +267,32 @@ &cpsw_port1 {
status = "okay";
};
+&main_gpio0 {
+ gpio-line-names = "", "", "", "", "", /* 0-4 */
+ "", "", "", "", "", /* 5-9 */
+ "", "", "", "", "", /* 10-14 */
+ "", "", "", "", "", /* 15-19 */
+ "", "", "", "", "", /* 20-24 */
+ "", "", "", "", "", /* 25-29 */
+ "", "", "USB_RST", "GPIO27", "", /* 30-34 */
+ "", "GPIO26", "", "GPIO4", "", /* 35-39 */
+ "", "GPIO22", "GPIO25", "", ""; /* 40-44 */
+};
+
&main_gpio1 {
bootph-all;
status = "okay";
+ gpio-line-names = "", "", "", "", "", /* 0-4 */
+ "", "", "GPIO16", "GPIO17", "GPIO21", /* 5-9 */
+ "GPIO20", "GPIO18", "GPIO19", "GPIO15", "GPIO14", /* 10-14 */
+ "GPIO5", "GPIO12", "GPIO6", "GPIO13", ""; /* 15-19 */
+};
+
+&mcu_gpio0 {
+ gpio-line-names = "GPIO8", "", "GPIO11", "GPIO10", "GPIO9", /* 0-4 */
+ "", "", "GPIO23", "", "GPIO7", /* 5-9 */
+ "GPIO24", "", "", "HDMI_RSTn", "HDMI_INTn", /* 10-14 */
+ "", "", "GPIO3", "GPIO2", ""; /* 15-19 */
};
&main_uart0 {
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] arm64: dts: ti: k3-am67a-beagley-ai: Add gpio ranges
2026-07-28 19:44 ` [PATCH 1/2] arm64: dts: ti: k3-am67a-beagley-ai: Add gpio ranges David Lechner (TI)
@ 2026-07-28 19:57 ` sashiko-bot
2026-07-28 21:30 ` David Lechner
0 siblings, 1 reply; 5+ messages in thread
From: sashiko-bot @ 2026-07-28 19:57 UTC (permalink / raw)
To: David Lechner (TI); +Cc: conor+dt, devicetree, robh
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Adding `pinctrl-single,gpio-range` on K3 platforms causes dynamic GPIO requests to silently overwrite the entire pad configuration register, destroying previously applied board-specific settings like pull-ups and drive strengths.
--
--- Patch [1]: [PATCH 1/2] arm64: dts: ti: k3-am67a-beagley-ai: Add gpio ranges ---
commit c5d1a1cd5d0bb91d0c680ae90328952c44500103
Author: David Lechner (TI) <dlechner@baylibre.com>
arm64: dts: ti: k3-am67a-beagley-ai: Add gpio ranges
Add pinctrl-single,gpio-range properties to the BeagleY-AI .dts so that
GPIOs get the correct pin mux when requested.
> diff --git a/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts b/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts
> index 5255e04b9ac76..599d576f694f6 100644
> --- a/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts
> +++ b/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts
> @@ -149,6 +149,19 @@ led-1 {
> };
>
> &main_pmx0 {
> + pinctrl-single,gpio-range =
> + <&main_pmx0_range 0 32 PIN_GPIO_RANGE_IOPAD>,
> + <&main_pmx0_range 33 38 PIN_GPIO_RANGE_IOPAD>,
[Severity: High]
Does adding pinctrl-single,gpio-range here cause dynamic GPIO requests to
silently overwrite the entire pad configuration register?
On K3 platforms, the pinctrl-single,function-mask is typically <0xffffffff>,
meaning the pad electrical properties and mux mode share the same register.
When a GPIO in these ranges is requested via gpiod_get(), the gpiolib path
calls the pinctrl driver's pcs_request_gpio().
Since the function mask is 0xffffffff, pcs_request_gpio() will execute:
data &= ~pcs->fmask;
data |= frange->gpiofunc;
Could this completely erase any previously applied board-specific settings
like pull-ups or drive strengths from a device's pinctrl-0 property, and
replace them with PIN_GPIO_RANGE_IOPAD (which includes PULL_DISABLE)?
[ ... ]
> @@ -267,6 +280,15 @@ &main_uart0 {
> };
>
> &mcu_pmx0 {
> + pinctrl-single,gpio-range =
> + <&mcu_pmx_range 0 21 PIN_GPIO_RANGE_IOPAD>,
> + <&mcu_pmx_range 23 1 PIN_GPIO_RANGE_IOPAD>,
[Severity: High]
Will this have the same pad configuration overwrite issue for the MCU domain
GPIOs when requested?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260728-arm-dts-beagleyai-gpio-info-v1-0-783ec90d54da@baylibre.com?part=1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] arm64: dts: ti: k3-am67a-beagley-ai: Add gpio ranges
2026-07-28 19:57 ` sashiko-bot
@ 2026-07-28 21:30 ` David Lechner
0 siblings, 0 replies; 5+ messages in thread
From: David Lechner @ 2026-07-28 21:30 UTC (permalink / raw)
To: sashiko-reviews, Tony Lindgren, Haojian Zhuang
Cc: conor+dt, devicetree, robh, moderated list:ARM PORT,
Linux OMAP Mailing List, Nishanth Menon, Vignesh Raghavendra,
Tero Kristo, Robert Nelson
Hi Tony,
Mostly a question for you since you are the pinctrl-single dt-bindings
maintainer.
On 7/28/26 2:57 PM, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [High] Adding `pinctrl-single,gpio-range` on K3 platforms causes dynamic GPIO requests to silently overwrite the entire pad configuration register, destroying previously applied board-specific settings like pull-ups and drive strengths.
> --
>
> --- Patch [1]: [PATCH 1/2] arm64: dts: ti: k3-am67a-beagley-ai: Add gpio ranges ---
> commit c5d1a1cd5d0bb91d0c680ae90328952c44500103
> Author: David Lechner (TI) <dlechner@baylibre.com>
>
> arm64: dts: ti: k3-am67a-beagley-ai: Add gpio ranges
>
> Add pinctrl-single,gpio-range properties to the BeagleY-AI .dts so that
> GPIOs get the correct pin mux when requested.
>
>> diff --git a/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts b/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts
>> index 5255e04b9ac76..599d576f694f6 100644
>> --- a/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts
>> +++ b/arch/arm64/boot/dts/ti/k3-am67a-beagley-ai.dts
>> @@ -149,6 +149,19 @@ led-1 {
>> };
>>
>> &main_pmx0 {
>> + pinctrl-single,gpio-range =
>> + <&main_pmx0_range 0 32 PIN_GPIO_RANGE_IOPAD>,
>> + <&main_pmx0_range 33 38 PIN_GPIO_RANGE_IOPAD>,
>
> [Severity: High]
> Does adding pinctrl-single,gpio-range here cause dynamic GPIO requests to
> silently overwrite the entire pad configuration register?
>
> On K3 platforms, the pinctrl-single,function-mask is typically <0xffffffff>,
Is pinctrl-single,function-mask supposed to just contain the mask for the
mux bits (function) rather than all config bits?
The DT binding description is vague:
Mask of the allowed register bits
Does it mean all bits in the register even not related to function or all
bits related only to function?
Looking at the code, it seems like it should just be the mux bits (function)
since pinctrl-single,function-mask is stored in pcs->fmask and pcs->fmask is
only used by pcs_set_mux() and pcs_request_gpio().
> meaning the pad electrical properties and mux mode share the same register.
> When a GPIO in these ranges is requested via gpiod_get(), the gpiolib path
> calls the pinctrl driver's pcs_request_gpio().
>
> Since the function mask is 0xffffffff, pcs_request_gpio() will execute:
>
> data &= ~pcs->fmask;
> data |= frange->gpiofunc;
>
> Could this completely erase any previously applied board-specific settings
> like pull-ups or drive strengths from a device's pinctrl-0 property, and
> replace them with PIN_GPIO_RANGE_IOPAD (which includes PULL_DISABLE)?
>
> [ ... ]
>
>> @@ -267,6 +280,15 @@ &main_uart0 {
>> };
>>
>> &mcu_pmx0 {
>> + pinctrl-single,gpio-range =
>> + <&mcu_pmx_range 0 21 PIN_GPIO_RANGE_IOPAD>,
>> + <&mcu_pmx_range 23 1 PIN_GPIO_RANGE_IOPAD>,
>
> [Severity: High]
> Will this have the same pad configuration overwrite issue for the MCU domain
> GPIOs when requested?
>
So in order for pinctrl-single,gpio-range to actually work correctly, we would
need to make this fix first.
---
diff --git a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
index f130c7cb998d..cae21cf92ca7 100644
--- a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
@@ -280,7 +280,7 @@ main_pmx0: pinctrl@f4000 {
reg = <0x00 0xf4000 0x00 0x2b0>;
#pinctrl-cells = <1>;
pinctrl-single,register-width = <32>;
- pinctrl-single,function-mask = <0xffffffff>;
+ pinctrl-single,function-mask = <0xf>;
bootph-all;
};
diff --git a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi
index 5288c959f3c1..1aa73526bba4 100644
--- a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi
@@ -11,7 +11,7 @@ mcu_pmx0: pinctrl@4084000 {
reg = <0x00 0x04084000 0x00 0x88>;
#pinctrl-cells = <1>;
pinctrl-single,register-width = <32>;
- pinctrl-single,function-mask = <0xffffffff>;
+ pinctrl-single,function-mask = <0xf>;
bootph-all;
};
---
And then we would want this change as well...
---
diff --git a/arch/arm64/boot/dts/ti/k3-pinctrl.h b/arch/arm64/boot/dts/ti/k3-pinctrl.h
index 4491898d8294..29e401f16bc9 100644
--- a/arch/arm64/boot/dts/ti/k3-pinctrl.h
+++ b/arch/arm64/boot/dts/ti/k3-pinctrl.h
@@ -112,7 +112,7 @@
#define PIN_WKUP_EN (WKUP_ENABLE | WKUP_ON_EDGE)
/* Default mux configuration for gpio-ranges to use with pinctrl */
-#define PIN_GPIO_RANGE_IOPAD (PIN_INPUT | 7)
+#define PIN_GPIO_RANGE_IOPAD (7)
#define AM62AX_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
#define AM62AX_MCU_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
---
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-07-28 21:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-28 19:44 [PATCH 0/2] arm64: dts: ti: k3-am67a-beagley-ai: GPIO improvements David Lechner (TI)
2026-07-28 19:44 ` [PATCH 1/2] arm64: dts: ti: k3-am67a-beagley-ai: Add gpio ranges David Lechner (TI)
2026-07-28 19:57 ` sashiko-bot
2026-07-28 21:30 ` David Lechner
2026-07-28 19:44 ` [PATCH 2/2] arm64: dts: ti: k3-am67a-beagley-ai: Add gpio line names David Lechner (TI)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.