[PATCH 2/2] arm64: dts: ti: Add k3-am62-pocketbeagle2
Andrew Davis
afd at ti.com
Wed Feb 26 07:49:57 PST 2025
On 2/24/25 5:13 AM, Dhruva Gole wrote:
> On Feb 11, 2025 at 12:18:39 -0600, Robert Nelson wrote:
>> BeagleBoard.org PocketBeagle 2 is an upgraded version of the popular
>> PocketBeagle. It is based on Texas Instruments AM6232 SoC. Its dual
>> A53 cores can provide higher performance than classic PocketBeagle.
>
> You can say that classic PB was based on AM335 just for more context,
> else it's not clear what the upgrade is w.r.t..
>
>> The new design comes with pre-soldered headers, a 3-pin JST-SH 1.00mm
>> UART debug port, a USB-C port, Texas Instruments MSPM0L1105 Cortex-M0+
>> MCU for ADC, 512MB RAM, and a LiPo Battery charger.
>>
>> https://www.beagleboard.org/boards/pocketbeagle-2
>> https://openbeagle.org/pocketbeagle/pocketbeagle-
>>
>> Signed-off-by: Robert Nelson <robertcnelson at gmail.com>
>> CC: Rob Herring <robh at kernel.org>
>> CC: Krzysztof Kozlowski <krzk+dt at kernel.org>
>> CC: Conor Dooley <conor+dt at kernel.org>
>> CC: Vignesh Raghavendra <vigneshr at ti.com>
>> CC: Nishanth Menon <nm at ti.com>
>> CC: Andrew Davis <afd at ti.com>
>> CC: Roger Quadros <rogerq at kernel.org>
>> CC: Siddharth Vadapalli <s-vadapalli at ti.com>
>> CC: Judith Mendez <jm at ti.com>
>> CC: Andrei Aldea <a-aldea at ti.com>
>> CC: Jason Kridner <jkridner at beagleboard.org>
>> CC: Deepak Khatri <lorforlinux at beagleboard.org>
>> CC: Ayush Singh <ayush at beagleboard.org>
>> ---
>> arch/arm64/boot/dts/ti/Makefile | 1 +
>> .../boot/dts/ti/k3-am62-pocketbeagle2.dts | 520 ++++++++++++++++++
>> 2 files changed, 521 insertions(+)
>> create mode 100644 arch/arm64/boot/dts/ti/k3-am62-pocketbeagle2.dts
>>
>> diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
>> index 8a4bdf87e2d4..46b9a667bda4 100644
>> --- a/arch/arm64/boot/dts/ti/Makefile
>> +++ b/arch/arm64/boot/dts/ti/Makefile
>> @@ -27,6 +27,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-wifi-yavia.dtb
>> dtb-$(CONFIG_ARCH_K3) += k3-am62x-phyboard-lyra-gpio-fan.dtbo
>> dtb-$(CONFIG_ARCH_K3) += k3-am62-lp-sk.dtb
>> dtb-$(CONFIG_ARCH_K3) += k3-am62-lp-sk-nand.dtbo
>> +dtb-$(CONFIG_ARCH_K3) += k3-am62-pocketbeagle2.dtb
>>
>> # Boards with AM62Ax SoC
>> dtb-$(CONFIG_ARCH_K3) += k3-am62a7-sk.dtb
>> diff --git a/arch/arm64/boot/dts/ti/k3-am62-pocketbeagle2.dts b/arch/arm64/boot/dts/ti/k3-am62-pocketbeagle2.dts
>> new file mode 100644
>> index 000000000000..ef79bd0bf238
>> --- /dev/null
>> +++ b/arch/arm64/boot/dts/ti/k3-am62-pocketbeagle2.dts
>> @@ -0,0 +1,520 @@
>> +// SPDX-License-Identifier: GPL-2.0-only OR MIT
>> +/*
>> + * https://www.beagleboard.org/boards/pocketbeagle-2
>> + *
>> + * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
>> + * Copyright (C) 2024 Robert Nelson, BeagleBoard.org Foundation
>
> Nit: Please update copyrights.
>
>> + */
>> +
>> +/dts-v1/;
>> +
>> +#include <dt-bindings/leds/common.h>
>> +#include <dt-bindings/gpio/gpio.h>
>> +#include <dt-bindings/input/input.h>
>> +#include "k3-am625.dtsi"
>
> Any particular reason we can't inherit from k3-am62x-sk-common.dtsi like
> the SK and LP-SK DTS do?
>
Because PocketBeagle 2 is not based on our TI SK boards.. Some
things are common (PMIC, some carveouts), but not nearly enough
to make this a good idea.
Any changes to the SK board DT would have to be checked against
this DTB, which will break things at some point as the DT becomes
more complete.
Andrew
> Also, you're calling out in the commit message that this is based on
> AM6232 - which has only 2 cores right? Do we not want to delete the
> additional 2 cores from the AM625 DT which has 4 cores?
>
>> +
>> +/ {
>> + compatible = "beagle,am62-pocketbeagle2", "ti,am625";
>> + model = "BeagleBoard.org PocketBeagle2";
>> +
>> + aliases {
>> + serial0 = &wkup_uart0;
>> + serial1 = &main_uart1;
>> + serial2 = &main_uart6;
>> + serial3 = &main_uart3;
>> + serial4 = &main_uart4;
>> + serial5 = &main_uart5;
>> + serial6 = &main_uart2;
>> + serial7 = &main_uart0;
>> + mmc0 = &sdhci0;
>> + mmc1 = &sdhci1;
>> + usb0 = &usb0;
>> + usb1 = &usb1;
>> + i2c0 = &main_i2c0;
>> + i2c1 = &wkup_i2c0;
>> + i2c2 = &main_i2c2;
>> + };
>> +
>> + chosen {
>> + stdout-path = &main_uart6;
>> + };
>> +
>> + memory at 80000000 {
>> + /* 512MB RAM */
>> + reg = <0x00000000 0x80000000 0x00000000 0x20000000>;
>> + device_type = "memory";
>> + bootph-pre-ram;
>> + };
>> +
>> + reserved_memory: reserved-memory {
>> + #address-cells = <2>;
>> + #size-cells = <2>;
>> + ranges;
>
> Let's try to follow [1] here and elsewhere
> [1] https://docs.kernel.org/devicetree/bindings/dts-coding-style.html
>
>> +
>> + secure_tfa_ddr: tfa at 9e780000 {
>> + reg = <0x00 0x9e780000 0x00 0x80000>;
>> + no-map;
>> + };
>> +
>> + secure_ddr: optee at 9e800000 {
>> + reg = <0x00 0x9e800000 0x00 0x01800000>;
>> + no-map;
>> + };
>> +
>> + wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory at 9db00000 {
>> + compatible = "shared-dma-pool";
>> + reg = <0x00 0x9db00000 0x00 0xc00000>;
>> + no-map;
>> + };
>
> Nothing for OPTEE/ M4/ etc...?
> CMA?
> Just trying to compare against sk-common... I understand the DDR is
> smaller but we can't just ignore OPTEE / shared DMA pool right?
>
>> + };
>> +
>> + vsys_5v0: regulator-1 {
>> + compatible = "regulator-fixed";
>> + regulator-name = "vsys_5v0";
>> + regulator-min-microvolt = <5000000>;
>> + regulator-max-microvolt = <5000000>;
>> + regulator-always-on;
>> + regulator-boot-on;
>> + bootph-all;
>> + };
>> +
>> + vdd_3v3: regulator-2 {
>> + compatible = "regulator-fixed";
>> + regulator-name = "vdd_3v3";
>> + regulator-min-microvolt = <3300000>;
>> + regulator-max-microvolt = <3300000>;
>> + vin-supply = <&vsys_5v0>;
>> + regulator-always-on;
>> + regulator-boot-on;
>> + bootph-all;
>> + };
>> +
>> + vdd_mmc1: regulator-3 {
>> + compatible = "regulator-fixed";
>> + regulator-name = "vdd_mmc1";
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&vdd_3v3_sd_pins_default>;
>> + regulator-min-microvolt = <3300000>;
>> + regulator-max-microvolt = <3300000>;
>> + regulator-boot-on;
>> + enable-active-high;
>> + regulator-always-on;
>> + vin-supply = <&vdd_3v3>;
>> + gpio = <&main_gpio0 0 GPIO_ACTIVE_HIGH>;
>> + bootph-all;
>> + };
>> +
>> + vdd_sd_dv: regulator-4 {
>> + compatible = "regulator-gpio";
>> + regulator-name = "sd_hs200_switch";
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&vdd_sd_dv_pins_default>;
>> + regulator-min-microvolt = <1800000>;
>> + regulator-max-microvolt = <3300000>;
>> + regulator-boot-on;
>> + vin-supply = <&vdd_3v3>;
>> + gpios = <&main_gpio1 49 GPIO_ACTIVE_HIGH>;
>> + states = <1800000 0x0>,
>> + <3300000 0x1>;
>> + bootph-all;
>> + };
>> +
>> + adc_vref: regulator-5 {
>> + compatible = "regulator-fixed";
>> + regulator-name = "default";
>> + regulator-min-microvolt = <3300000>;
>> + regulator-max-microvolt = <3300000>;
>> + regulator-boot-on;
>> + };
>> +
>> + leds {
>> + bootph-all;
>
> Is this needed? child nodes seem to have bootph-all already right?
>
>> + compatible = "gpio-leds";
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&led_pins_default>;
>> +
>> + led-1 {
>> + bootph-all;
>> + gpios = <&main_gpio0 6 GPIO_ACTIVE_HIGH>;
>> + color = <LED_COLOR_ID_GREEN>;
>> + linux,default-trigger = "heartbeat";
>> + function = LED_FUNCTION_HEARTBEAT;
>> + default-state = "on";
>> + };
>> +
>> + led-2 {
>> + bootph-all;
>> + gpios = <&main_gpio0 5 GPIO_ACTIVE_HIGH>;
>> + color = <LED_COLOR_ID_GREEN>;
>> + function = LED_FUNCTION_DISK_ACTIVITY;
>> + linux,default-trigger = "mmc1";
>> + };
>> +
>> + led-3 {
>> + bootph-all;
>> + gpios = <&main_gpio0 4 GPIO_ACTIVE_HIGH>;
>> + color = <LED_COLOR_ID_GREEN>;
>> + };
>> +
>> + led-4 {
>> + bootph-all;
>> + gpios = <&main_gpio0 3 GPIO_ACTIVE_HIGH>;
>> + color = <LED_COLOR_ID_GREEN>;
>> + function = LED_FUNCTION_INDICATOR;
>> + default-state = "off";
>> + };
>> + };
>> +};
> [....]
>> +
>> +&wkup_uart0 {
>> + /* WKUP UART0 is used by Device Manager firmware */
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&wkup_uart0_pins_default>;
>> + bootph-all;
>> + status = "reserved";
>> +};
>
> See things like these you get for free from k3-am62x-sk-common.dtsi ;)
>
>> +
>> +&wkup_i2c0 {
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&wkup_i2c0_pins_default>;
>> + clock-frequency = <100000>;
>> + bootph-all;
>
> Child nodes have bootph, no need for their parents to repeat it unless
> you've a good cause.
>
>> + status = "okay";
>> +
>> + tps65219: pmic at 30 {
>> + compatible = "ti,tps65219";
>> + reg = <0x30>;
>> + buck1-supply = <&vsys_5v0>;
>> + buck2-supply = <&vsys_5v0>;
>> + buck3-supply = <&vsys_5v0>;
>> + ldo1-supply = <&vdd_3v3>;
>> + ldo2-supply = <&buck2_reg>;
>> + ldo3-supply = <&vdd_3v3>;
>> + ldo4-supply = <&vdd_3v3>;
>> +
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&pmic_irq_pins_default>;
>> + interrupt-parent = <&gic500>;
>> + interrupts = <GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>;
>> + interrupt-controller;
>> + #interrupt-cells = <1>;
>> +
>> + bootph-all;
>> + system-power-controller;
>> + ti,power-button;
> [...]
>
> Overall I think the DT needs a bit of revisiting of which nodes to reuse
> from common-DT and what all to delete/ trim. Revisit all the bootph
> properties and remove the redundant one's...
>
More information about the linux-arm-kernel
mailing list