Skip to contentSkip to conversation

arm64: dts/bindings: Add support for BeagleBadge

PATCH Superseded Judith Mendez 3 participants 8 messages May 26 – May 28

Subsystems (2)

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v5 cover arm64: dts/bindings: Add support for BeagleBadge

Hi,

BeagleBoard.org BeagleBadge[1] is a compact, affordable open source hardware [2] single board computer based on the Texas Instruments AM62L3 SoC designed for IoT and embedded applications. Add base support for the same.

SD boot:

This patch series adds:
- Device tree bindings update for am62l3-badge
- Device tree source for BeagleBadge board
- Defconfig: drivers for BeagleBadge

Changelog since v4:
- Canonical URL fixed
- Switch gpio -> gpios in voltage regulator nodes
- Regulator-always-on removed in sensor_3v3
- Add bootph-all on pinmux nodes
- Fix gpio-line-names formatting
- Nodes: sdhci2, wlan_en regulator, & pinmux removed
- USB aliases removed
- Pickup Conor's review tag

v4

v3

V2

V1

Patch series depends on:

[1] https://www.beagleboard.org/boards/beaglebadge
[2] https://github.com/beagleboard/BeagleBadge/blob/main/design/BeagleBadge_RevA_V0.7_SCH_251107.pdf

Judith Mendez (3):
dt-bindings: arm: ti: Add am62l3-beaglebadge
arm64: dts: ti: Add k3-am62l3-beaglebadge
arm64: defconfig: Enable drivers for BeagleBadge

 .../devicetree/bindings/arm/ti/k3.yaml        |   1 +
 arch/arm64/boot/dts/ti/Makefile               |   1 +
 .../boot/dts/ti/k3-am62l3-beaglebadge.dts     | 658 ++++++++++++++++++
 arch/arm64/configs/defconfig                  |   5 +
 4 files changed, 665 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62l3-beaglebadge.dts
Signature · 1 line
2.54.0
#1 lore raw

PATCH v5 1/3 dt-bindings: arm: ti: Add am62l3-beaglebadge

This board is based on ti,am62l3.

https://www.beagleboard.org/boards/beaglebadge

---
Changelog since v4:
- Canonical URL fixed
- Pickup Conor's review tag

---
 Documentation/devicetree/bindings/arm/ti/k3.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/ti/k3.yaml +1 -0
index 2a6a9441c23de..d9cd3fb712fdd 100644
@@ -40,6 +40,7 @@ properties:
       - description: K3 AM62L3 SoC and Boards
         items:
           - enum:
+              - beagle,am62l3-beaglebadge
               - ti,am62l3-evm
           - const: ti,am62l3
 
Signature · 1 line
2.54.0
#2 lore raw

PATCH v5 2/3 arm64: dts: ti: Add k3-am62l3-beaglebadge

In reply to Judith Mendez

BeagleBoard.org BeagleBadge is a compact, affordable open source hardware single board computer based on the Texas Instruments AM62L3 SoC designed for IoT and embedded applications with low power consumption. Expansion is provided over open standards based headers including QWIIC and GPIO interfaces.

https://www.beagleboard.org/boards/beaglebadge

---
Changelog since v4:
- Canonical URL fixed
- Switch gpio -> gpios in voltage regulator nodes
- Regulator-always-on removed in sensor_3v3
- Add bootph-all on pinmux nodes
- Fix gpio-line-names formatting
- Nodes: sdhci2, wlan_en regulator, & pinmux removed
- USB aliases removed

---
 arch/arm64/boot/dts/ti/Makefile               |   1 +
 .../boot/dts/ti/k3-am62l3-beaglebadge.dts     | 658 ++++++++++++++++++
 2 files changed, 659 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62l3-beaglebadge.dts
arch/arm64/boot/dts/ti/Makefile +1 -0
index 5269c9619b65c..4e377ca011cd8 100644
@@ -41,6 +41,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62d2-evm.dtb
 
 # Boards with AM62Lx SoCs
 dtb-$(CONFIG_ARCH_K3) += k3-am62l3-evm.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-am62l3-beaglebadge.dtb
 
 # Boards with AM62Px SoC
 dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
arch/arm64/boot/dts/ti/k3-am62l3-beaglebadge.dts new file +658 -0

658 lines not on this page · raw message

Signature · 1 line
2.54.0
#3 lore raw

Re: [PATCH v5 2/3] arm64: dts: ti: Add k3-am62l3-beaglebadge

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider: - [High] The property `microchip,spi-present-mask` is incorrectly defined as an 8-bit integer, which will…

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] The property microchip,spi-present-mask is incorrectly defined as an 8-bit integer, which will cause a probe failure.
- [Medium] Missing serial0 alias and namespace collision with gpio2.
- [Low] Alphabetical sorting violation in the TI device tree Makefile.
--

commit ac1670e1647cc8bb2691b4ba5ca55b12fd24da41
Author: Judith Mendez <[email protected]>

arm64: dts: ti: Add k3-am62l3-beaglebadge

This commit adds the device tree for the BeagleBoard.org BeagleBadge, which is based on the AM62L3 SoC. It includes configurations for GPIO keys, LEDs, PWM beepers, regulators, PMIC, and several I2C and SPI peripherals.

arch/arm64/boot/dts/ti/Makefile dtb-$(CONFIG_ARCH_K3) += k3-am62d2-evm.dtb · line 44

Quoted 9 lines
arch/arm64/boot/dts/ti/Makefile +1 -0
index 5269c9619b65c..4e377ca011cd8 100644
@@ -41,6 +41,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62d2-evm.dtb
 
 # Boards with AM62Lx SoCs
 dtb-$(CONFIG_ARCH_K3) += k3-am62l3-evm.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-am62l3-beaglebadge.dtb

[Severity: Low]
This isn't a bug, but should this be sorted alphabetically? The other entries in this Makefile usually follow alphabetical order, so k3-am62l3-beaglebadge.dtb would normally be placed before k3-am62l3-evm.dtb.

[ ... ]

Quoted 22 lines
arch/arm64/boot/dts/ti/k3-am62l3-beaglebadge.dts new file +16 -0
new file mode 100644
index 0000000000000..8e816d21a586f
@@ -0,0 +1,658 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * https://www.beagleboard.org/boards/beaglebadge
+ *
+ * Copyright (C) 2026 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include "k3-am62l3.dtsi"
+#include "k3-pinctrl.h"
+
+/ {

arch/arm64/boot/dts/ti/k3-am62l3-beaglebadge.dts line 26

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62l3-beaglebadge.dts new file +10 -0
+	compatible = "beagle,am62l3-beaglebadge", "ti,am62l3";
+	model = "BeagleBoard.org BeagleBadge";
+
+	chosen {
+		stdout-path = &uart0;
+	};
+
+	aliases {
+		gpio0 = &gpio0;
+		gpio2 = &wkup_gpio0;

[Severity: Medium]
Will aliasing wkup_gpio0 to gpio2 cause an enumeration collision?

The base k3-am62l-main.dtsi already defines a physical gpio2 controller, so using ID 2 for wkup_gpio0 might conflict if the real gpio2 is ever enabled.

Also, since stdout-path uses uart0 and serial3 is aliased below, should there be a serial0 alias for uart0 to ensure predictable /dev/ttyS* numbering?

Quoted 7 lines
arch/arm64/boot/dts/ti/k3-am62l3-beaglebadge.dts new file +7 -0
+		i2c0 = &i2c0;
+		i2c1 = &i2c1;
+		i2c2 = &i2c2;
+		i2c4 = &wkup_i2c0;
+		mmc1 = &sdhci1;
+		serial3 = &uart1;
+	};

[ ... ]

Quoted 5 lines

+&spi1 {

arch/arm64/boot/dts/ti/k3-am62l3-beaglebadge.dts new file +4 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi1_pins_default>;
+	status = "okay";
+

arch/arm64/boot/dts/ti/k3-am62l3-beaglebadge.dts line 650

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62l3-beaglebadge.dts new file +10 -0
+	mcp23s18: gpio@0 {
+		compatible = "microchip,mcp23s18";
+		reg = <0>;
+		spi-max-frequency = <10000000>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		reset-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&mcp23s18_reset_pins_default>;
+		microchip,spi-present-mask = /bits/ 8 <0x01>;

[Severity: High]
Can this cause a probe failure?

The mcp23s08 pinctrl driver reads the microchip,spi-present-mask property using device_property_read_u32().

By defining the property as an 8-bit integer, the property length in the device tree is 1 byte instead of the 4 bytes required by device_property_read_u32().

This could lead to of_property_read_variable_u32_array() returning -EOVERFLOW, which would cause the mcp23s18 driver probe to fail and leave the 7-segment displays non-functional.

Quoted 2 lines
arch/arm64/boot/dts/ti/k3-am62l3-beaglebadge.dts new file +2 -0
+	};
+};
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
#4 lore raw

Re: [PATCH v5 2/3] arm64: dts: ti: Add k3-am62l3-beaglebadge

In reply to Judith Mendez
Quoted 31 lines · Judith Mendez

BeagleBoard.org BeagleBadge is a compact, affordable open source hardware single board computer based on the Texas Instruments AM62L3 SoC designed for IoT and embedded applications with low power consumption. Expansion is provided over open standards based headers including QWIIC and GPIO interfaces.

https://www.beagleboard.org/boards/beaglebadge

---
Changelog since v4:
- Canonical URL fixed
- Switch gpio -> gpios in voltage regulator nodes
- Regulator-always-on removed in sensor_3v3
- Add bootph-all on pinmux nodes
- Fix gpio-line-names formatting
- Nodes: sdhci2, wlan_en regulator, & pinmux removed
- USB aliases removed

---
 arch/arm64/boot/dts/ti/Makefile               |   1 +
 .../boot/dts/ti/k3-am62l3-beaglebadge.dts     | 658 ++++++++++++++++++
 2 files changed, 659 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62l3-beaglebadge.dts
arch/arm64/boot/dts/ti/Makefile +0 -0
index 5269c9619b65c..4e377ca011cd8 100644

arch/arm64/boot/dts/ti/Makefile dtb-$(CONFIG_ARCH_K3) += k3-am62d2-evm.dtb · line 44

Quoted 4 lines
arch/arm64/boot/dts/ti/Makefile +1 -0
@@ -41,6 +41,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62d2-evm.dtb
 
 # Boards with AM62Lx SoCs
 dtb-$(CONFIG_ARCH_K3) += k3-am62l3-evm.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-am62l3-beaglebadge.dtb

Sort this alphabetically please

arch/arm64/boot/dts/ti/k3-am62l3-beaglebadge.dts line 1

Quoted 10 lines
arch/arm64/boot/dts/ti/Makefile +0 -0
 # Boards with AM62Px SoC
 dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
arch/arm64/boot/dts/ti/k3-am62l3-beaglebadge.dts new file +1 -0
new file mode 100644
index 0000000000000..8e816d21a586f
@@ -0,0 +1,658 @@
+// SPDX-License-Identifier: GPL-2.0

Dual license this like other files

// SPDX-License-Identifier: GPL-2.0-only or MIT

[...]

Signature · 3 lines
Regards
Vignesh
https://ti.com/opensource
#5 lore raw

Re: [PATCH v5 2/3] arm64: dts: ti: Add k3-am62l3-beaglebadge

Hi Vignesh,

Quoted 35 lines · Vignesh Raghavendra
Quoted 32 lines · Judith Mendez

BeagleBoard.org BeagleBadge is a compact, affordable open source hardware single board computer based on the Texas Instruments AM62L3 SoC designed for IoT and embedded applications with low power consumption. Expansion is provided over open standards based headers including QWIIC and GPIO interfaces.

https://www.beagleboard.org/boards/beaglebadge

---
Changelog since v4:
- Canonical URL fixed
- Switch gpio -> gpios in voltage regulator nodes
- Regulator-always-on removed in sensor_3v3
- Add bootph-all on pinmux nodes
- Fix gpio-line-names formatting
- Nodes: sdhci2, wlan_en regulator, & pinmux removed
- USB aliases removed

---
  arch/arm64/boot/dts/ti/Makefile               |   1 +
  .../boot/dts/ti/k3-am62l3-beaglebadge.dts     | 658 ++++++++++++++++++
  2 files changed, 659 insertions(+)

create mode 100644 arch/arm64/boot/dts/ti/k3-am62l3-beaglebadge.dts

arch/arm64/boot/dts/ti/Makefile +0 -0
index 5269c9619b65c..4e377ca011cd8 100644
@@ -41,6 +41,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62d2-evm.dtb
 
Quoted 5 lines

arch/arm64/boot/dts/ti/Makefile dtb-$(CONFIG_ARCH_K3) += k3-am62d2-evm.dtb · line 44

Quoted 3 lines
arch/arm64/boot/dts/ti/Makefile +1 -0
  # Boards with AM62Lx SoCs
  dtb-$(CONFIG_ARCH_K3) += k3-am62l3-evm.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-am62l3-beaglebadge.dtb

Sort this alphabetically please

Will fix (:

Quoted 13 lines

arch/arm64/boot/dts/ti/k3-am62l3-beaglebadge.dts line 1

Quoted 11 lines
arch/arm64/boot/dts/ti/Makefile +0 -0
  # Boards with AM62Px SoC
  dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
arch/arm64/boot/dts/ti/k3-am62l3-beaglebadge.dts new file +1 -0
new file mode 100644
index 0000000000000..8e816d21a586f
@@ -0,0 +1,658 @@
+// SPDX-License-Identifier: GPL-2.0

Dual license this like other files

Ok no problem, will fix and send out v6

~ Judith

...

#6 lore raw

PATCH v5 3/3 arm64: defconfig: Enable drivers for BeagleBadge

In reply to Judith Mendez

Enable drivers used on BeagleBadge[1]:
- LED PWM Multicolor driver as a module
- MCP SPI IO Expander driver as a module
- Seven Segment display GPIO driver as module
- Temperature Sensor driver as a module

[1] https://www.beagleboard.org/boards/beaglebadge

---
Changelog since v4:
- Canonical URL fixed

---
 arch/arm64/configs/defconfig | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/configs/defconfig +5 -0
index d905a0777f939..5cfb7f6f2ae78 100644
@@ -634,6 +634,7 @@ CONFIG_PINCTRL_BRCMSTB=y
 CONFIG_PINCTRL_BCM2712=y
 CONFIG_PINCTRL_DA9062=m
 CONFIG_PINCTRL_MAX77620=y
+CONFIG_PINCTRL_MCP23S08=m
 CONFIG_PINCTRL_RK805=m
 CONFIG_PINCTRL_SINGLE=y
 CONFIG_PINCTRL_SX150X=m
@@ -766,6 +767,7 @@ CONFIG_SENSORS_LM90=m
 CONFIG_SENSORS_PWM_FAN=m
 CONFIG_SENSORS_RASPBERRYPI_HWMON=m
 CONFIG_SENSORS_SL28CPLD=m
+CONFIG_SENSORS_SHT4x=m
 CONFIG_SENSORS_AMC6821=m
 CONFIG_SENSORS_INA2XX=m
 CONFIG_SENSORS_INA3221=m
@@ -955,6 +957,8 @@ CONFIG_VIDEO_IMX412=m
 CONFIG_VIDEO_OV5640=m
 CONFIG_VIDEO_OV5645=m
 CONFIG_VIDEO_S5KJN1=m
+CONFIG_AUXDISPLAY=y
+CONFIG_SEG_LED_GPIO=m
 CONFIG_DRM=m
 CONFIG_DRM_I2C_NXP_TDA998X=m
 CONFIG_DRM_HDLCD=m
@@ -1332,6 +1336,7 @@ CONFIG_LEDS_GPIO=y
 CONFIG_LEDS_PWM=y
 CONFIG_LEDS_SYSCON=y
 CONFIG_LEDS_QCOM_FLASH=m
+CONFIG_LEDS_PWM_MULTICOLOR=m
 CONFIG_LEDS_QCOM_LPG=m
 CONFIG_LEDS_TRIGGER_TIMER=y
 CONFIG_LEDS_TRIGGER_DISK=y
Signature · 1 line
2.54.0
#7 lore raw

Re: [PATCH v5 3/3] arm64: defconfig: Enable drivers for BeagleBadge

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] The sht4x hwmon driver registers sysfs attributes outside the core hwmon locking but fails to implement its own locks, leading to race conditions on driver state and I2C communications. --

commit f3062b5d533df41f751a64a30b3c9b20072c21e4
Author: Judith Mendez <[email protected]>

arm64: defconfig: Enable drivers for BeagleBadge

This commit enables drivers used on the BeagleBadge as modules in the arm64 defconfig. This includes drivers for the LED PWM Multicolor, MCP SPI IO Expander, Seven Segment display GPIO, and Temperature Sensor.

Quoted 4 lines
arch/arm64/configs/defconfig +0 -0
index d905a0777f939..5cfb7f6f2ae78 100644

[ ... ]

arch/arm64/configs/defconfig CONFIG_SENSORS_LM90=m · line 770

Quoted 5 lines
arch/arm64/configs/defconfig +1 -0
@@ -766,6 +767,7 @@ CONFIG_SENSORS_LM90=m
 CONFIG_SENSORS_PWM_FAN=m
 CONFIG_SENSORS_RASPBERRYPI_HWMON=m
 CONFIG_SENSORS_SL28CPLD=m
+CONFIG_SENSORS_SHT4x=m

[Severity: High]
This is a pre-existing issue, but does the sht4x driver lack locking for its sysfs attributes?

The hardware monitoring subsystem guidelines state that drivers must implement their own locking for attributes registered outside the core, such as those in extra_groups. The sht4x driver registers heater attributes like heater_enable via extra_groups but does not appear to provide locking.

If a write to heater_enable occurs during the usleep_range() of a temperature read:

sht4x_read_values() {
    ret = i2c_master_send(client, cmd, SHT4X_CMD_LEN);
    ...
    usleep_range(SHT4X_MEAS_DELAY_HPM, ...);
    ...
    ret = i2c_master_recv(client, raw_data, SHT4X_RESPONSE_LENGTH);
}

Concurrent with a write to the heater:

heater_enable_store() {
    ret = i2c_master_send(data->client, &cmd, SHT4X_CMD_LEN);
    ...
    data->heating_complete = jiffies + msecs_to_jiffies(heating_time_bound);
    data->data_pending = true;
}

Could this interleave I2C traffic and cause the subsequent i2c_master_recv() to read the wrong response or abort the measurement?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3