Message ID | 20250408231823.826163-2-robertcnelson@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2,1/2] dt-bindings: arm: ti: Add PocketBeagle2 | expand |
On Tue, Apr 8, 2025 at 6:18 PM Robert Nelson <robertcnelson@gmail.com> wrote: > > BeagleBoard.org PocketBeagle 2 is an upgraded version of the popular > PocketBeagle. It is based on Texas Instruments AM6232 or AM6254 SoC. > Its dual or quad A53 cores can provide higher performance than classic > PocketBeagle. 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-2 dmesg: https://gist.github.com/RobertCNelson/c68c96a8a1dc6e4d39d8c48fc13ca1c1 Regards,
On Apr 08, 2025 at 18:18:23 -0500, Robert Nelson wrote: > BeagleBoard.org PocketBeagle 2 is an upgraded version of the popular > PocketBeagle. It is based on Texas Instruments AM6232 or AM6254 SoC. > Its dual or quad A53 cores can provide higher performance than classic > PocketBeagle. 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-2 > > Signed-off-by: Robert Nelson <robertcnelson@gmail.com> > CC: Rob Herring <robh@kernel.org> > CC: Krzysztof Kozlowski <krzk+dt@kernel.org> > CC: Conor Dooley <conor+dt@kernel.org> > CC: Vignesh Raghavendra <vigneshr@ti.com> > CC: Nishanth Menon <nm@ti.com> > CC: Andrew Davis <afd@ti.com> > CC: Roger Quadros <rogerq@kernel.org> > CC: Siddharth Vadapalli <s-vadapalli@ti.com> > CC: Judith Mendez <jm@ti.com> > CC: Andrei Aldea <a-aldea@ti.com> > CC: Dhruva Gole <d-gole@ti.com> > CC: Jason Kridner <jkridner@beagleboard.org> > CC: Deepak Khatri <lorforlinux@beagleboard.org> > CC: Ayush Singh <ayush@beagleboard.org> > --- > Changes since v1: > - fix '_' in main-i2c2-default-pins > - aliases i2c match original pocketbeagle > - add mcu_m4fss with reseved memory and mailbox > - drop unused main_gpio0_pins_default pinmux > - drop unused main_gpio1_pins_default pinmux > - drop unused main_spi2_pins_gpio pinmux > - Reserve 128MiB of global CMA Thanks for addressing comments from last revision, Reviewed-by: Dhruva Gole <d-gole@ti.com>
On 18:19-20250408, Robert Nelson wrote: > On Tue, Apr 8, 2025 at 6:18 PM Robert Nelson <robertcnelson@gmail.com> wrote: > > > > BeagleBoard.org PocketBeagle 2 is an upgraded version of the popular > > PocketBeagle. It is based on Texas Instruments AM6232 or AM6254 SoC. > > Its dual or quad A53 cores can provide higher performance than classic > > PocketBeagle. 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-2 > > dmesg: > > https://gist.github.com/RobertCNelson/c68c96a8a1dc6e4d39d8c48fc13ca1c1 > Any idea why we are crashing? https://gist.github.com/RobertCNelson/c68c96a8a1dc6e4d39d8c48fc13ca1c1#file-gistfile1-txt-L311 I don't see the same crash in beagleplay: https://gist.github.com/nmenon/5709a8714d3ab31cac5c00b515d04752
On Wed, Apr 9, 2025 at 8:09 AM Nishanth Menon <nm@ti.com> wrote: > > On 18:19-20250408, Robert Nelson wrote: > > On Tue, Apr 8, 2025 at 6:18 PM Robert Nelson <robertcnelson@gmail.com> wrote: > > > > > > BeagleBoard.org PocketBeagle 2 is an upgraded version of the popular > > > PocketBeagle. It is based on Texas Instruments AM6232 or AM6254 SoC. > > > Its dual or quad A53 cores can provide higher performance than classic > > > PocketBeagle. 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-2 > > > > dmesg: > > > > https://gist.github.com/RobertCNelson/c68c96a8a1dc6e4d39d8c48fc13ca1c1 > > > > > > Any idea why we are crashing? > https://gist.github.com/RobertCNelson/c68c96a8a1dc6e4d39d8c48fc13ca1c1#file-gistfile1-txt-L311 > > I don't see the same crash in beagleplay: > https://gist.github.com/nmenon/5709a8714d3ab31cac5c00b515d04752 On 6.14.x i have a little more, info... I've got all the CRYPTO stuff enabled, pretty sure that comes from CONFIG_CRYPTO_MANAGER CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER2=y CONFIG_CRYPTO_USER=y # CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set # CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is not set https://openbeagle.org/RobertCNelson/arm64-multiplatform/-/blob/v6.15.x-arm64-k3/patches/defconfig?ref_type=heads#L9578 [ 2.940076] alg: aead: authenc(hmac(sha256),cbc(aes))-sa2ul encryption test failed (wrong result) on test vector 0, cfg="uneven misaligned splits, may sleep" [ 2.940183] alg: self-tests for authenc(hmac(sha256),cbc(aes)) using authenc(hmac(sha256),cbc(aes))-sa2ul failed (rc=-22) [ 2.940191] ------------[ cut here ]------------ [ 2.940194] alg: self-tests for authenc(hmac(sha256),cbc(aes)) using authenc(hmac(sha256),cbc(aes))-sa2ul failed (rc=-22) [ 2.940276] WARNING: CPU: 1 PID: 207 at crypto/testmgr.c:6026 alg_test+0x4f8/0x610 [ 2.940303] Modules linked in: [ 2.940317] CPU: 1 UID: 0 PID: 207 Comm: cryptomgr_test Not tainted 6.14.0-arm64-k3-r10 #1bookworm [ 2.940328] Hardware name: BeagleBoard.org PocketBeagle2 (DT) [ 2.940334] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 2.940343] pc : alg_test+0x4f8/0x610 [ 2.940351] lr : alg_test+0x4f8/0x610 [ 2.940359] sp : ffff800083e13d10 [ 2.940363] x29: ffff800083e13d10 x28: 000000000000000e x27: 000000000000000d [ 2.940375] x26: 0000000000000000 x25: ffff80008151ce08 x24: ffff800082625e40 [ 2.940386] x23: 000000000000000e x22: 0000000000001183 x21: ffff000004e37880 [ 2.940397] x20: ffff000004e37800 x19: 000000000000000d x18: 00000000fffffffe [ 2.940408] x17: 636e656874756120 x16: 676e697375202929 x15: ffff800083e13900 [ 2.940419] x14: 0000000000000000 x13: ffff8000825c3ad2 x12: 65742d666c657320 [ 2.940430] x11: 0000000000000001 x10: 0000000000000029 x9 : ffff80008014d9e4 [ 2.940441] x8 : 0000000000000029 x7 : 0000000000000002 x6 : 0000000000000029 [ 2.940452] x5 : ffff00001da6c508 x4 : 0000000000000000 x3 : 0000000000000027 [ 2.940462] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff000004ee4a00 [ 2.940475] Call trace: [ 2.940480] alg_test+0x4f8/0x610 (P) [ 2.940492] cryptomgr_test+0x2c/0x50 [ 2.940502] kthread+0x138/0x220 [ 2.940518] ret_from_fork+0x10/0x20 [ 2.940531] ---[ end trace 0000000000000000 ]--- Maybe enable iwd support will trigger it, as iwd needs built-in kernel support: https://git.kernel.org/pub/scm/network/wireless/iwd.git/ #iwd ./scripts/config --enable CONFIG_CRYPTO_USER_API_SKCIPHER ./scripts/config --enable CONFIG_CRYPTO_USER_API_HASH ./scripts/config --enable CONFIG_CRYPTO_HMAC ./scripts/config --enable CONFIG_CRYPTO_CMAC ./scripts/config --enable CONFIG_CRYPTO_MD4 ./scripts/config --enable CONFIG_CRYPTO_MD5 ./scripts/config --enable CONFIG_CRYPTO_SHA256 ./scripts/config --enable CONFIG_CRYPTO_SHA512 ./scripts/config --enable CONFIG_CRYPTO_AES ./scripts/config --enable CONFIG_CRYPTO_ECB ./scripts/config --enable CONFIG_CRYPTO_DES ./scripts/config --enable CONFIG_CRYPTO_CBC ./scripts/config --enable CONFIG_KEY_DH_OPERATIONS Regards,
On 10:12-20250409, Robert Nelson wrote: [..] > > Any idea why we are crashing? > > https://gist.github.com/RobertCNelson/c68c96a8a1dc6e4d39d8c48fc13ca1c1#file-gistfile1-txt-L311 > > > > I don't see the same crash in beagleplay: > > https://gist.github.com/nmenon/5709a8714d3ab31cac5c00b515d04752 > > On 6.14.x i have a little more, info... > > I've got all the CRYPTO stuff enabled, pretty sure that comes from > CONFIG_CRYPTO_MANAGER > > CONFIG_CRYPTO_MANAGER=y > CONFIG_CRYPTO_MANAGER2=y > CONFIG_CRYPTO_USER=y > # CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set > # CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is not set > > https://openbeagle.org/RobertCNelson/arm64-multiplatform/-/blob/v6.15.x-arm64-k3/patches/defconfig?ref_type=heads#L9578 OK this looks like to be a independent pre-existing bug then and needs to be investigated, but it is probably independent of this patch itself. Could you share a clean defconfig bootlog? I have no existing scheme to test this on my end. In the logs, please also print /sys/kernel/debug/devices_deferred to ensure we have nothing sticking out in our defconfig?
On 18:18-20250408, Robert Nelson wrote: > BeagleBoard.org PocketBeagle 2 is an upgraded version of the popular > PocketBeagle. It is based on Texas Instruments AM6232 or AM6254 SoC. > Its dual or quad A53 cores can provide higher performance than classic > PocketBeagle. 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-2 > > Signed-off-by: Robert Nelson <robertcnelson@gmail.com> > CC: Rob Herring <robh@kernel.org> > CC: Krzysztof Kozlowski <krzk+dt@kernel.org> > CC: Conor Dooley <conor+dt@kernel.org> > CC: Vignesh Raghavendra <vigneshr@ti.com> > CC: Nishanth Menon <nm@ti.com> > CC: Andrew Davis <afd@ti.com> > CC: Roger Quadros <rogerq@kernel.org> > CC: Siddharth Vadapalli <s-vadapalli@ti.com> > CC: Judith Mendez <jm@ti.com> > CC: Andrei Aldea <a-aldea@ti.com> > CC: Dhruva Gole <d-gole@ti.com> > CC: Jason Kridner <jkridner@beagleboard.org> > CC: Deepak Khatri <lorforlinux@beagleboard.org> > CC: Ayush Singh <ayush@beagleboard.org> > --- > Changes since v1: > - fix '_' in main-i2c2-default-pins > - aliases i2c match original pocketbeagle > - add mcu_m4fss with reseved memory and mailbox > - drop unused main_gpio0_pins_default pinmux > - drop unused main_gpio1_pins_default pinmux > - drop unused main_spi2_pins_gpio pinmux > - Reserve 128MiB of global CMA > --- > arch/arm64/boot/dts/ti/Makefile | 1 + > .../boot/dts/ti/k3-am62-pocketbeagle2.dts | 528 ++++++++++++++++++ > 2 files changed, 529 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 03d4cecfc001..4f8fcb69a2c1 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..65000ed8196f > --- /dev/null > +++ b/arch/arm64/boot/dts/ti/k3-am62-pocketbeagle2.dts > @@ -0,0 +1,528 @@ > +// SPDX-License-Identifier: GPL-2.0-only OR MIT > +/* > + * https://www.beagleboard.org/boards/pocketbeagle-2 > + * > + * Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/ > + * Copyright (C) 2025 Robert Nelson, BeagleBoard.org Foundation > + */ > + > +/dts-v1/; > + > +#include <dt-bindings/leds/common.h> > +#include <dt-bindings/gpio/gpio.h> > +#include <dt-bindings/input/input.h> > +#include "k3-am625.dtsi" > + > +/ { > + 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; We just seem to have 3 uarts pinned out. so why alias the rest? those seem unused? > + mmc0 = &sdhci0; Same - unused? > + mmc1 = &sdhci1; > + usb0 = &usb0; > + usb1 = &usb1; > + i2c1 = &main_i2c1; same - unused? > + i2c2 = &main_i2c2; > + i2c3 = &wkup_i2c0; > + }; > + > + chosen { > + stdout-path = &main_uart6; > + }; > + > + memory@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; > + > + /* global cma region */ > + linux,cma { > + compatible = "shared-dma-pool"; > + reusable; > + size = <0x00 0x8000000>; > + linux,cma-default; > + }; > + > + mcu_m4fss_dma_memory_region: m4f-dma-memory@9cb00000 { > + compatible = "shared-dma-pool"; > + reg = <0x00 0x9cb00000 0x00 0x100000>; > + no-map; > + }; > + > + mcu_m4fss_memory_region: m4f-memory@9cc00000 { > + compatible = "shared-dma-pool"; > + reg = <0x00 0x9cc00000 0x00 0xe00000>; > + no-map; > + }; > + > + secure_tfa_ddr: tfa@9e780000 { > + reg = <0x00 0x9e780000 0x00 0x80000>; > + alignment = <0x1000>; > + no-map; > + }; > + > + secure_ddr: optee@9e800000 { > + reg = <0x00 0x9e800000 0x00 0x01800000>; > + alignment = <0x1000>; > + no-map; > + }; > + > + wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9db00000 { > + compatible = "shared-dma-pool"; > + reg = <0x00 0x9db00000 0x00 0xc00000>; > + no-map; > + }; > + }; > + > + 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; > + compatible = "gpio-leds"; > + pinctrl-names = "default"; > + pinctrl-0 = <&led_pins_default>; bootph-all here? Please check Documentation/devicetree/bindings/dts-coding-style.rst 1. "compatible" 2. "reg" 3. "ranges" 4. Standard/common properties (defined by common bindings, e.g. without vendor-prefixes) ^^ bootph property last one here. 5. Vendor-specific properties 6. "status" (if applicable) 7. Child nodes, where each node is preceded with a blank line Could you make sure that all the nodes follow the convention? > + > + 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"; Same > + }; > + > + 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"; > + }; > + }; > +}; > + > +&main_pmx0 { > + led_pins_default: led-default-pins { > + pinctrl-single,pins = < > + AM62X_IOPAD(0x000c, PIN_OUTPUT, 7) /* (E25) OSPI0_D0.GPIO0_3 */ > + AM62X_IOPAD(0x0010, PIN_OUTPUT, 7) /* (G24) OSPI0_D1.GPIO0_4 */ > + AM62X_IOPAD(0x0014, PIN_OUTPUT, 7) /* (F25) OSPI0_D2.GPIO0_5 */ > + AM62X_IOPAD(0x0018, PIN_OUTPUT, 7) /* (F24) OSPI0_D3.GPIO0_6 */ > + >; > + bootph-all; > + }; > + > + main_i2c0_pins_default: main-i2c0-default-pins { > + pinctrl-single,pins = < > + AM62X_IOPAD(0x01e0, PIN_INPUT_PULLUP, 0) /* (B16) I2C0_SCL */ > + AM62X_IOPAD(0x01e4, PIN_INPUT_PULLUP, 0) /* (A16) I2C0_SDA */ > + >; > + bootph-all; > + }; > + > + main_i2c2_pins_default: main-i2c2-default-pins { > + pinctrl-single,pins = < > + AM62X_IOPAD(0x00b0, PIN_INPUT_PULLUP, 1) /* (K22) GPMC0_CSn2.I2C2_SCL */ > + AM62X_IOPAD(0x00b4, PIN_INPUT_PULLUP, 1) /* (K24) GPMC0_CSn3.I2C2_SDA */ > + >; > + bootph-all; > + }; > + > + main_uart0_pins_default: main-uart0-default-pins { > + pinctrl-single,pins = < > + AM62X_IOPAD(0x1c8, PIN_INPUT, 0) /* (D14/A13) UART0_RXD */ > + AM62X_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (E14/E11) UART0_TXD */ > + >; > + bootph-all; > + }; > + > + main_uart1_pins_default: main-uart1-default-pins { > + pinctrl-single,pins = < > + AM62X_IOPAD(0x194, PIN_INPUT, 2) /* (B19/B18) MCASP0_AXR3.UART1_CTSn */ > + AM62X_IOPAD(0x198, PIN_OUTPUT, 2) /* (A19/B17) MCASP0_AXR2.UART1_RTSn */ > + AM62X_IOPAD(0x1ac, PIN_INPUT, 2) /* (E19/D15) MCASP0_AFSR.UART1_RXD */ > + AM62X_IOPAD(0x1b0, PIN_OUTPUT, 2) /* (A20/D16) MCASP0_ACLKR.UART1_TXD */ > + >; > + bootph-all; > + }; > + > + main_uart6_pins_default: main-uart6-default-pins { > + pinctrl-single,pins = < > + AM62X_IOPAD(0x001c, PIN_INPUT, 3) /* (J23) OSPI0_D4.UART6_RXD */ > + AM62X_IOPAD(0x0020, PIN_OUTPUT, 3) /* (J25) OSPI0_D5.UART6_TXD */ > + >; > + }; > + > + main_mmc1_pins_default: main-mmc1-default-pins { > + pinctrl-single,pins = < > + AM62X_IOPAD(0x23c, PIN_INPUT, 0) /* (A21/C18) MMC1_CMD */ > + AM62X_IOPAD(0x234, PIN_INPUT, 0) /* (B22/A20) MMC1_CLK */ > + AM62X_IOPAD(0x230, PIN_INPUT, 0) /* (A22/A19) MMC1_DAT0 */ > + AM62X_IOPAD(0x22c, PIN_INPUT, 0) /* (B21/B19) MMC1_DAT1 */ > + AM62X_IOPAD(0x228, PIN_INPUT, 0) /* (C21/B20) MMC1_DAT2 */ > + AM62X_IOPAD(0x224, PIN_INPUT, 0) /* (D22/C19) MMC1_DAT3 */ > + AM62X_IOPAD(0x240, PIN_INPUT, 7) /* (D17/C15) MMC1_SDCD.GPIO1_48 */ > + >; > + bootph-all; > + }; > + > + vdd_sd_dv_pins_default: vdd-sd-dv-default-pins { > + pinctrl-single,pins = < > + AM62X_IOPAD(0x0244, PIN_OUTPUT, 7) /* (P25) GPMC0_CLK.GPIO1_49 */ > + >; > + bootph-all; > + }; > + > + pmic_irq_pins_default: pmic-irq-default-pins { > + pinctrl-single,pins = < > + AM62X_IOPAD(0x01f4, PIN_INPUT_PULLUP, 0) /* (D16) EXTINTn */ > + >; > + bootph-all; > + }; > + > + vdd_3v3_sd_pins_default: vdd-3v3-sd-default-pins { > + pinctrl-single,pins = < > + AM62X_IOPAD(0x0000, PIN_OUTPUT, 7) /* (H24) OSPI0_CLK.GPIO0_0 */ > + >; > + bootph-all; > + }; > + > + usb1_pins_default: usb1-default-pins { > + pinctrl-single,pins = < > + AM62X_IOPAD(0x0258, PIN_INPUT, 0) /* (F18) USB1_DRVVBUS */ > + >; > + bootph-all; > + }; > + > + epwm2_pins_default: epwm2-default-pins { > + pinctrl-single,pins = < > + AM62X_IOPAD(0x01e8, PIN_OUTPUT, 8) /* (B17) I2C1_SCL.EHRPWM2_A */ > + >; > + }; > +}; > + > +&cpsw3g { > + status = "disabled"; > +}; This should have been disabled at am62-main.dtsi level (like it was done in j784s4) - lets fix that then apply the pb2 without these disabled nodes. > + > +&cpsw_port1 { > + status = "disabled"; > +}; > + > +&cpsw_port2 { > + status = "disabled"; > +}; > + > +&epwm2 { > + status = "okay"; > + pinctrl-names = "default"; > + pinctrl-0 = <&epwm2_pins_default>; > +}; > + > +&mailbox0_cluster0 { > + mbox_m4_0: mbox-m4-0 { > + ti,mbox-rx = <0 0 0>; > + ti,mbox-tx = <1 0 0>; > + }; > +}; > + > +&main_uart0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&main_uart0_pins_default>; > + bootph-all; > + status = "okay"; > +}; > + > +&main_uart1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&main_uart1_pins_default>; > + bootph-pre-ram; > + status = "reserved"; > +}; > + > +&main_uart6 { > + pinctrl-names = "default"; > + pinctrl-0 = <&main_uart6_pins_default>; > + bootph-all; > + status = "okay"; > +}; > + > +&main_i2c0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&main_i2c0_pins_default>; > + clock-frequency = <400000>; > + bootph-all; > + status = "okay"; > + > + ad7291: adc@20 { > + compatible = "adi,ad7291"; I think the commit message says MSPM0L1105 ? is this in emulation mode? if so, we should document this. > + reg = <0x20>; > + vref-supply = <&adc_vref>; > + }; > + > + eeprom: eeprom@50 { > + compatible = "atmel,24c32"; is this the same? MSPM0L1105 doing eeprom? if so, please document. > + reg = <0x50>; > + }; > +}; > + > +&main_i2c2 { > + pinctrl-names = "default"; > + pinctrl-0 = <&main_i2c2_pins_default>; > + clock-frequency = <400000>; > + bootph-all; > + status = "okay"; > +}; > + > +&mcu_m4fss { > + mboxes = <&mailbox0_cluster0 &mbox_m4_0>; > + memory-region = <&mcu_m4fss_dma_memory_region>, > + <&mcu_m4fss_memory_region>; > + status = "okay"; > +}; > + > +&mcu_pmx0 { > + wkup_uart0_pins_default: wkup-uart0-default-pins { > + pinctrl-single,pins = < > + AM62X_MCU_IOPAD(0x02c, PIN_INPUT, 0) /* (C6/A7) WKUP_UART0_CTSn */ > + AM62X_MCU_IOPAD(0x030, PIN_OUTPUT, 0) /* (A4/B4) WKUP_UART0_RTSn */ > + AM62X_MCU_IOPAD(0x024, PIN_INPUT, 0) /* (B4/B5) WKUP_UART0_RXD */ > + AM62X_MCU_IOPAD(0x028, PIN_OUTPUT, 0) /* (C5/C6) WKUP_UART0_TXD */ > + >; > + bootph-all; > + }; > + > + wkup_i2c0_pins_default: wkup-i2c0-default-pins { > + pinctrl-single,pins = < > + AM62X_MCU_IOPAD(0x004c, PIN_INPUT_PULLUP, 0) /* (B9) WKUP_I2C0_SCL */ > + AM62X_MCU_IOPAD(0x0050, PIN_INPUT_PULLUP, 0) /* (A9) WKUP_I2C0_SDA */ > + >; > + bootph-all; > + }; > +}; > + > +&sdhci1 { > + /* SD/MMC */ > + vmmc-supply = <&vdd_mmc1>; > + vqmmc-supply = <&vdd_sd_dv>; > + pinctrl-names = "default"; > + pinctrl-0 = <&main_mmc1_pins_default>; > + disable-wp; > + cd-gpios = <&main_gpio1 48 GPIO_ACTIVE_LOW>; > + cd-debounce-delay-ms = <100>; > + bootph-all; > + ti,fails-without-test-cd; > + status = "okay"; > +}; > + > +&usbss0 { > + bootph-all; > + ti,vbus-divider; > + status = "okay"; > +}; > + > +&usb0 { > + bootph-all; > + dr_mode = "peripheral"; Can this operate in "otg" instead? maybe use a type-c dock? > +}; > + > +&usbss1 { > + ti,vbus-divider; > + status = "okay"; > +}; > + > +&usb1 { > + dr_mode = "host"; > + pinctrl-names = "default"; > + pinctrl-0 = <&usb1_pins_default>; > +}; is'nt this over https://www.beagleboard.org/boards/techlab or https://www.beagleboard.org/boards/pocketbeagle-gamepup-cape or https://github.com/mwelling/pocket-bob ? I think it is better as an overlay? Let us not enable something that will add power for no benefit :) Further USB1.ID has options for PRU as well. Let the daughter overlay deal with it. On the flip side, we could work the other way - since majority of daughter cards use USB host, it could be that the other overlays can just disable usbss1 and usb1 Thoughts? > + > +&wkup_uart0 { > + /* WKUP UART0 is used by Device Manager firmware */ > + pinctrl-names = "default"; > + pinctrl-0 = <&wkup_uart0_pins_default>; > + bootph-all; > + status = "reserved"; > +}; > + > +&wkup_i2c0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&wkup_i2c0_pins_default>; > + clock-frequency = <100000>; > + bootph-all; > + status = "okay"; > + > + tps65219: pmic@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; > + > + regulators { > + buck1_reg: buck1 { > + regulator-name = "VDD_CORE"; > + regulator-min-microvolt = <850000>; > + regulator-max-microvolt = <850000>; > + regulator-boot-on; > + regulator-always-on; > + }; > + > + buck2_reg: buck2 { > + regulator-name = "VDD_1V8"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-boot-on; > + regulator-always-on; > + }; > + > + buck3_reg: buck3 { > + regulator-name = "VDD_1V2"; > + regulator-min-microvolt = <1200000>; > + regulator-max-microvolt = <1200000>; > + regulator-boot-on; > + regulator-always-on; > + }; > + > + ldo1_reg: ldo1 { > + /* > + * Regulator is left as is unused, vdd_sd > + * is controlled via GPIO with bypass config > + * as per the NVM configuration > + */ > + regulator-name = "VDD_SD_3V3"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-allow-bypass; > + regulator-boot-on; > + regulator-always-on; > + }; > + > + ldo2_reg: ldo2 { > + regulator-name = "VDDA_0V85"; > + regulator-min-microvolt = <850000>; > + regulator-max-microvolt = <850000>; > + regulator-boot-on; > + regulator-always-on; > + }; > + > + ldo3_reg: ldo3 { > + regulator-name = "VDDA_1V8"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-boot-on; > + regulator-always-on; > + }; > + > + ldo4_reg: ldo4 { > + regulator-name = "VDD_2V5"; > + regulator-min-microvolt = <2500000>; > + regulator-max-microvolt = <2500000>; > + regulator-boot-on; > + regulator-always-on; > + }; > + }; > + }; > +}; > -- > 2.47.2 >
On Thu, Apr 10, 2025 at 7:08 AM Nishanth Menon <nm@ti.com> wrote: > > On 10:12-20250409, Robert Nelson wrote: > [..] > > > > Any idea why we are crashing? > > > https://gist.github.com/RobertCNelson/c68c96a8a1dc6e4d39d8c48fc13ca1c1#file-gistfile1-txt-L311 > > > > > > I don't see the same crash in beagleplay: > > > https://gist.github.com/nmenon/5709a8714d3ab31cac5c00b515d04752 > > > > On 6.14.x i have a little more, info... > > > > I've got all the CRYPTO stuff enabled, pretty sure that comes from > > CONFIG_CRYPTO_MANAGER > > > > CONFIG_CRYPTO_MANAGER=y > > CONFIG_CRYPTO_MANAGER2=y > > CONFIG_CRYPTO_USER=y > > # CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set > > # CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is not set > > > > https://openbeagle.org/RobertCNelson/arm64-multiplatform/-/blob/v6.15.x-arm64-k3/patches/defconfig?ref_type=heads#L9578 > > OK this looks like to be a independent pre-existing bug then and needs > to be investigated, but it is probably independent of this patch itself. > > Could you share a clean defconfig bootlog? I have no existing scheme to > test this on my end. In the logs, please also print > /sys/kernel/debug/devices_deferred to ensure we have nothing sticking > out in our defconfig? Okay stable v6.15-rc1 with arm64 defconfig.. https://gist.github.com/RobertCNelson/666638abac8eee4ed573997996362450 root@am6232-pb2-87:~# ls -lha /sys/kernel/debug/device_component/ total 0 drwxr-xr-x 2 root root 0 Dec 31 1969 . drwx------ 44 root root 0 Dec 31 1969 .. Regards,
On Thu, Apr 10, 2025 at 12:15 PM Nishanth Menon <nm@ti.com> wrote: > > On 18:18-20250408, Robert Nelson wrote: > > BeagleBoard.org PocketBeagle 2 is an upgraded version of the popular > > PocketBeagle. It is based on Texas Instruments AM6232 or AM6254 SoC. > > Its dual or quad A53 cores can provide higher performance than classic > > PocketBeagle. 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-2 > > > > Signed-off-by: Robert Nelson <robertcnelson@gmail.com> > > CC: Rob Herring <robh@kernel.org> > > CC: Krzysztof Kozlowski <krzk+dt@kernel.org> > > CC: Conor Dooley <conor+dt@kernel.org> > > CC: Vignesh Raghavendra <vigneshr@ti.com> > > CC: Nishanth Menon <nm@ti.com> > > CC: Andrew Davis <afd@ti.com> > > CC: Roger Quadros <rogerq@kernel.org> > > CC: Siddharth Vadapalli <s-vadapalli@ti.com> > > CC: Judith Mendez <jm@ti.com> > > CC: Andrei Aldea <a-aldea@ti.com> > > CC: Dhruva Gole <d-gole@ti.com> > > CC: Jason Kridner <jkridner@beagleboard.org> > > CC: Deepak Khatri <lorforlinux@beagleboard.org> > > CC: Ayush Singh <ayush@beagleboard.org> > > --- > > Changes since v1: > > - fix '_' in main-i2c2-default-pins > > - aliases i2c match original pocketbeagle > > - add mcu_m4fss with reseved memory and mailbox > > - drop unused main_gpio0_pins_default pinmux > > - drop unused main_gpio1_pins_default pinmux > > - drop unused main_spi2_pins_gpio pinmux > > - Reserve 128MiB of global CMA > > --- > > arch/arm64/boot/dts/ti/Makefile | 1 + > > .../boot/dts/ti/k3-am62-pocketbeagle2.dts | 528 ++++++++++++++++++ > > 2 files changed, 529 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 03d4cecfc001..4f8fcb69a2c1 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..65000ed8196f > > --- /dev/null > > +++ b/arch/arm64/boot/dts/ti/k3-am62-pocketbeagle2.dts > > @@ -0,0 +1,528 @@ > > +// SPDX-License-Identifier: GPL-2.0-only OR MIT > > +/* > > + * https://www.beagleboard.org/boards/pocketbeagle-2 > > + * > > + * Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/ > > + * Copyright (C) 2025 Robert Nelson, BeagleBoard.org Foundation > > + */ > > + > > +/dts-v1/; > > + > > +#include <dt-bindings/leds/common.h> > > +#include <dt-bindings/gpio/gpio.h> > > +#include <dt-bindings/input/input.h> > > +#include "k3-am625.dtsi" > > + > > +/ { > > + 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; > > > We just seem to have 3 uarts pinned out. so why alias the rest? those > seem unused? > > > + mmc0 = &sdhci0; > Same - unused? > > + mmc1 = &sdhci1; > > + usb0 = &usb0; > > + usb1 = &usb1; > > + i2c1 = &main_i2c1; > > same - unused? > > > + i2c2 = &main_i2c2; > > + i2c3 = &wkup_i2c0; > > + }; > > + > > + chosen { > > + stdout-path = &main_uart6; > > + }; > > + > > + memory@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; > > + > > + /* global cma region */ > > + linux,cma { > > + compatible = "shared-dma-pool"; > > + reusable; > > + size = <0x00 0x8000000>; > > + linux,cma-default; > > + }; > > + > > + mcu_m4fss_dma_memory_region: m4f-dma-memory@9cb00000 { > > + compatible = "shared-dma-pool"; > > + reg = <0x00 0x9cb00000 0x00 0x100000>; > > + no-map; > > + }; > > + > > + mcu_m4fss_memory_region: m4f-memory@9cc00000 { > > + compatible = "shared-dma-pool"; > > + reg = <0x00 0x9cc00000 0x00 0xe00000>; > > + no-map; > > + }; > > + > > + secure_tfa_ddr: tfa@9e780000 { > > + reg = <0x00 0x9e780000 0x00 0x80000>; > > + alignment = <0x1000>; > > + no-map; > > + }; > > + > > + secure_ddr: optee@9e800000 { > > + reg = <0x00 0x9e800000 0x00 0x01800000>; > > + alignment = <0x1000>; > > + no-map; > > + }; > > + > > + wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9db00000 { > > + compatible = "shared-dma-pool"; > > + reg = <0x00 0x9db00000 0x00 0xc00000>; > > + no-map; > > + }; > > + }; > > + > > + 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; > > + compatible = "gpio-leds"; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&led_pins_default>; > bootph-all here? > Please check Documentation/devicetree/bindings/dts-coding-style.rst > > 1. "compatible" > 2. "reg" > 3. "ranges" > 4. Standard/common properties (defined by common bindings, e.g. without > vendor-prefixes) > > ^^ bootph property last one here. > > 5. Vendor-specific properties > 6. "status" (if applicable) > 7. Child nodes, where each node is preceded with a blank line > > Could you make sure that all the nodes follow the convention? > > > + > > + 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"; > Same > > + }; > > + > > + 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"; > > + }; > > + }; > > +}; > > + > > +&main_pmx0 { > > + led_pins_default: led-default-pins { > > + pinctrl-single,pins = < > > + AM62X_IOPAD(0x000c, PIN_OUTPUT, 7) /* (E25) OSPI0_D0.GPIO0_3 */ > > + AM62X_IOPAD(0x0010, PIN_OUTPUT, 7) /* (G24) OSPI0_D1.GPIO0_4 */ > > + AM62X_IOPAD(0x0014, PIN_OUTPUT, 7) /* (F25) OSPI0_D2.GPIO0_5 */ > > + AM62X_IOPAD(0x0018, PIN_OUTPUT, 7) /* (F24) OSPI0_D3.GPIO0_6 */ > > + >; > > + bootph-all; > > + }; > > + > > + main_i2c0_pins_default: main-i2c0-default-pins { > > + pinctrl-single,pins = < > > + AM62X_IOPAD(0x01e0, PIN_INPUT_PULLUP, 0) /* (B16) I2C0_SCL */ > > + AM62X_IOPAD(0x01e4, PIN_INPUT_PULLUP, 0) /* (A16) I2C0_SDA */ > > + >; > > + bootph-all; > > + }; > > + > > + main_i2c2_pins_default: main-i2c2-default-pins { > > + pinctrl-single,pins = < > > + AM62X_IOPAD(0x00b0, PIN_INPUT_PULLUP, 1) /* (K22) GPMC0_CSn2.I2C2_SCL */ > > + AM62X_IOPAD(0x00b4, PIN_INPUT_PULLUP, 1) /* (K24) GPMC0_CSn3.I2C2_SDA */ > > + >; > > + bootph-all; > > + }; > > + > > + main_uart0_pins_default: main-uart0-default-pins { > > + pinctrl-single,pins = < > > + AM62X_IOPAD(0x1c8, PIN_INPUT, 0) /* (D14/A13) UART0_RXD */ > > + AM62X_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (E14/E11) UART0_TXD */ > > + >; > > + bootph-all; > > + }; > > + > > + main_uart1_pins_default: main-uart1-default-pins { > > + pinctrl-single,pins = < > > + AM62X_IOPAD(0x194, PIN_INPUT, 2) /* (B19/B18) MCASP0_AXR3.UART1_CTSn */ > > + AM62X_IOPAD(0x198, PIN_OUTPUT, 2) /* (A19/B17) MCASP0_AXR2.UART1_RTSn */ > > + AM62X_IOPAD(0x1ac, PIN_INPUT, 2) /* (E19/D15) MCASP0_AFSR.UART1_RXD */ > > + AM62X_IOPAD(0x1b0, PIN_OUTPUT, 2) /* (A20/D16) MCASP0_ACLKR.UART1_TXD */ > > + >; > > + bootph-all; > > + }; > > + > > + main_uart6_pins_default: main-uart6-default-pins { > > + pinctrl-single,pins = < > > + AM62X_IOPAD(0x001c, PIN_INPUT, 3) /* (J23) OSPI0_D4.UART6_RXD */ > > + AM62X_IOPAD(0x0020, PIN_OUTPUT, 3) /* (J25) OSPI0_D5.UART6_TXD */ > > + >; > > + }; > > + > > + main_mmc1_pins_default: main-mmc1-default-pins { > > + pinctrl-single,pins = < > > + AM62X_IOPAD(0x23c, PIN_INPUT, 0) /* (A21/C18) MMC1_CMD */ > > + AM62X_IOPAD(0x234, PIN_INPUT, 0) /* (B22/A20) MMC1_CLK */ > > + AM62X_IOPAD(0x230, PIN_INPUT, 0) /* (A22/A19) MMC1_DAT0 */ > > + AM62X_IOPAD(0x22c, PIN_INPUT, 0) /* (B21/B19) MMC1_DAT1 */ > > + AM62X_IOPAD(0x228, PIN_INPUT, 0) /* (C21/B20) MMC1_DAT2 */ > > + AM62X_IOPAD(0x224, PIN_INPUT, 0) /* (D22/C19) MMC1_DAT3 */ > > + AM62X_IOPAD(0x240, PIN_INPUT, 7) /* (D17/C15) MMC1_SDCD.GPIO1_48 */ > > + >; > > + bootph-all; > > + }; > > + > > + vdd_sd_dv_pins_default: vdd-sd-dv-default-pins { > > + pinctrl-single,pins = < > > + AM62X_IOPAD(0x0244, PIN_OUTPUT, 7) /* (P25) GPMC0_CLK.GPIO1_49 */ > > + >; > > + bootph-all; > > + }; > > + > > + pmic_irq_pins_default: pmic-irq-default-pins { > > + pinctrl-single,pins = < > > + AM62X_IOPAD(0x01f4, PIN_INPUT_PULLUP, 0) /* (D16) EXTINTn */ > > + >; > > + bootph-all; > > + }; > > + > > + vdd_3v3_sd_pins_default: vdd-3v3-sd-default-pins { > > + pinctrl-single,pins = < > > + AM62X_IOPAD(0x0000, PIN_OUTPUT, 7) /* (H24) OSPI0_CLK.GPIO0_0 */ > > + >; > > + bootph-all; > > + }; > > + > > + usb1_pins_default: usb1-default-pins { > > + pinctrl-single,pins = < > > + AM62X_IOPAD(0x0258, PIN_INPUT, 0) /* (F18) USB1_DRVVBUS */ > > + >; > > + bootph-all; > > + }; > > + > > + epwm2_pins_default: epwm2-default-pins { > > + pinctrl-single,pins = < > > + AM62X_IOPAD(0x01e8, PIN_OUTPUT, 8) /* (B17) I2C1_SCL.EHRPWM2_A */ > > + >; > > + }; > > +}; > > + > > +&cpsw3g { > > + status = "disabled"; > > +}; > > This should have been disabled at am62-main.dtsi level (like it was done > in j784s4) - lets fix that then apply the pb2 without these disabled > nodes. > > + > > +&cpsw_port1 { > > + status = "disabled"; > > +}; > > + > > +&cpsw_port2 { > > + status = "disabled"; > > +}; > > + > > +&epwm2 { > > + status = "okay"; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&epwm2_pins_default>; > > +}; > > + > > +&mailbox0_cluster0 { > > + mbox_m4_0: mbox-m4-0 { > > + ti,mbox-rx = <0 0 0>; > > + ti,mbox-tx = <1 0 0>; > > + }; > > +}; > > + > > +&main_uart0 { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&main_uart0_pins_default>; > > + bootph-all; > > + status = "okay"; > > +}; > > + > > +&main_uart1 { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&main_uart1_pins_default>; > > + bootph-pre-ram; > > + status = "reserved"; > > +}; > > + > > +&main_uart6 { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&main_uart6_pins_default>; > > + bootph-all; > > + status = "okay"; > > +}; > > + > > +&main_i2c0 { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&main_i2c0_pins_default>; > > + clock-frequency = <400000>; > > + bootph-all; > > + status = "okay"; > > + > > + ad7291: adc@20 { > > + compatible = "adi,ad7291"; > > I think the commit message says MSPM0L1105 ? is this in emulation mode? > if so, we should document this. > > > + reg = <0x20>; > > + vref-supply = <&adc_vref>; > > + }; > > + > > + eeprom: eeprom@50 { > > + compatible = "atmel,24c32"; > > is this the same? MSPM0L1105 doing eeprom? if so, please document. > > + reg = <0x50>; > > + }; > > +}; > > + > > +&main_i2c2 { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&main_i2c2_pins_default>; > > + clock-frequency = <400000>; > > + bootph-all; > > + status = "okay"; > > +}; > > + > > +&mcu_m4fss { > > + mboxes = <&mailbox0_cluster0 &mbox_m4_0>; > > + memory-region = <&mcu_m4fss_dma_memory_region>, > > + <&mcu_m4fss_memory_region>; > > + status = "okay"; > > +}; > > + > > +&mcu_pmx0 { > > + wkup_uart0_pins_default: wkup-uart0-default-pins { > > + pinctrl-single,pins = < > > + AM62X_MCU_IOPAD(0x02c, PIN_INPUT, 0) /* (C6/A7) WKUP_UART0_CTSn */ > > + AM62X_MCU_IOPAD(0x030, PIN_OUTPUT, 0) /* (A4/B4) WKUP_UART0_RTSn */ > > + AM62X_MCU_IOPAD(0x024, PIN_INPUT, 0) /* (B4/B5) WKUP_UART0_RXD */ > > + AM62X_MCU_IOPAD(0x028, PIN_OUTPUT, 0) /* (C5/C6) WKUP_UART0_TXD */ > > + >; > > + bootph-all; > > + }; > > + > > + wkup_i2c0_pins_default: wkup-i2c0-default-pins { > > + pinctrl-single,pins = < > > + AM62X_MCU_IOPAD(0x004c, PIN_INPUT_PULLUP, 0) /* (B9) WKUP_I2C0_SCL */ > > + AM62X_MCU_IOPAD(0x0050, PIN_INPUT_PULLUP, 0) /* (A9) WKUP_I2C0_SDA */ > > + >; > > + bootph-all; > > + }; > > +}; > > + > > +&sdhci1 { > > + /* SD/MMC */ > > + vmmc-supply = <&vdd_mmc1>; > > + vqmmc-supply = <&vdd_sd_dv>; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&main_mmc1_pins_default>; > > + disable-wp; > > + cd-gpios = <&main_gpio1 48 GPIO_ACTIVE_LOW>; > > + cd-debounce-delay-ms = <100>; > > + bootph-all; > > + ti,fails-without-test-cd; > > + status = "okay"; > > +}; > > + > > +&usbss0 { > > + bootph-all; > > + ti,vbus-divider; > > + status = "okay"; > > +}; > > + > > +&usb0 { > > + bootph-all; > > + dr_mode = "peripheral"; > > Can this operate in "otg" instead? maybe use a type-c dock? > > > +}; > > + > > +&usbss1 { > > + ti,vbus-divider; > > + status = "okay"; > > +}; > > + > > +&usb1 { > > + dr_mode = "host"; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&usb1_pins_default>; > > +}; > > is'nt this over https://www.beagleboard.org/boards/techlab or > https://www.beagleboard.org/boards/pocketbeagle-gamepup-cape or > https://github.com/mwelling/pocket-bob ? > > I think it is better as an overlay? Let us not enable something that > will add power for no benefit :) > Further USB1.ID has options for PRU as well. Let the daughter overlay > deal with it. > > On the flip side, we could work the other way - since majority of > daughter cards use USB host, it could be that the other overlays can > just disable usbss1 and usb1 > > Thoughts? Since you asked, Being the somewhat unique state of PocketBeagle 2 and other Beagle single-board computers as rapid-prototyping development platforms, my personal general preference is to see all the stuff turned on by default and then to provide some clear direction on what is not necessary such that it lives as documentation forhow to enable it and simplify the development of overlays. Some of the rationale for this was discussed a couple of years back in a series of blog posts by Michael Opdenacker. [1][2][3] My perspective is that the interfaces need to be enabled to define the header connector to the device tree and that the muxes should further be fully described to the system, rather than leaving those bits of metadata regarding the running system as an exercise for the reader. The aforementioned approach of removing all the "dead bits" is great until someone is left with the challenge of figuring out how to turn them on and/or select between them. Providing an overlay that disables all the unnecessary bits seems reasonable to me. Otherwise, I think we can put the entirety of the header description into an overlay for cape-specific overlays to use, but I find the lack of an upstream definition to make it difficult to enable cape makers to define overlays that are likely to actually work. Just my $0.0000002. [1] https://www.beagleboard.org/blog/2022-02-15-using-device-tree-overlays-example-on-beaglebone-cape-add-on-boards [2] https://www.beagleboard.org/blog/2022-03-31-device-tree-supporting-similar-boards-the-beaglebone-example [3] https://www.beagleboard.org/blog/2022-06-06-using-the-u-boot-extension-board-manager-beaglebone-boards-example > > > + > > +&wkup_uart0 { > > + /* WKUP UART0 is used by Device Manager firmware */ > > + pinctrl-names = "default"; > > + pinctrl-0 = <&wkup_uart0_pins_default>; > > + bootph-all; > > + status = "reserved"; > > +}; > > + > > +&wkup_i2c0 { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&wkup_i2c0_pins_default>; > > + clock-frequency = <100000>; > > + bootph-all; > > + status = "okay"; > > + > > + tps65219: pmic@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; > > + > > + regulators { > > + buck1_reg: buck1 { > > + regulator-name = "VDD_CORE"; > > + regulator-min-microvolt = <850000>; > > + regulator-max-microvolt = <850000>; > > + regulator-boot-on; > > + regulator-always-on; > > + }; > > + > > + buck2_reg: buck2 { > > + regulator-name = "VDD_1V8"; > > + regulator-min-microvolt = <1800000>; > > + regulator-max-microvolt = <1800000>; > > + regulator-boot-on; > > + regulator-always-on; > > + }; > > + > > + buck3_reg: buck3 { > > + regulator-name = "VDD_1V2"; > > + regulator-min-microvolt = <1200000>; > > + regulator-max-microvolt = <1200000>; > > + regulator-boot-on; > > + regulator-always-on; > > + }; > > + > > + ldo1_reg: ldo1 { > > + /* > > + * Regulator is left as is unused, vdd_sd > > + * is controlled via GPIO with bypass config > > + * as per the NVM configuration > > + */ > > + regulator-name = "VDD_SD_3V3"; > > + regulator-min-microvolt = <3300000>; > > + regulator-max-microvolt = <3300000>; > > + regulator-allow-bypass; > > + regulator-boot-on; > > + regulator-always-on; > > + }; > > + > > + ldo2_reg: ldo2 { > > + regulator-name = "VDDA_0V85"; > > + regulator-min-microvolt = <850000>; > > + regulator-max-microvolt = <850000>; > > + regulator-boot-on; > > + regulator-always-on; > > + }; > > + > > + ldo3_reg: ldo3 { > > + regulator-name = "VDDA_1V8"; > > + regulator-min-microvolt = <1800000>; > > + regulator-max-microvolt = <1800000>; > > + regulator-boot-on; > > + regulator-always-on; > > + }; > > + > > + ldo4_reg: ldo4 { > > + regulator-name = "VDD_2V5"; > > + regulator-min-microvolt = <2500000>; > > + regulator-max-microvolt = <2500000>; > > + regulator-boot-on; > > + regulator-always-on; > > + }; > > + }; > > + }; > > +}; > > -- > > 2.47.2 > > > > -- > Regards, > Nishanth Menon > Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
On 12:15-20250410, Robert Nelson wrote: > On Thu, Apr 10, 2025 at 7:08 AM Nishanth Menon <nm@ti.com> wrote: > > > > On 10:12-20250409, Robert Nelson wrote: > > [..] > > > > > > Any idea why we are crashing? > > > > https://gist.github.com/RobertCNelson/c68c96a8a1dc6e4d39d8c48fc13ca1c1#file-gistfile1-txt-L311 > > > > > > > > I don't see the same crash in beagleplay: > > > > https://gist.github.com/nmenon/5709a8714d3ab31cac5c00b515d04752 > > > > > > On 6.14.x i have a little more, info... > > > > > > I've got all the CRYPTO stuff enabled, pretty sure that comes from > > > CONFIG_CRYPTO_MANAGER > > > > > > CONFIG_CRYPTO_MANAGER=y > > > CONFIG_CRYPTO_MANAGER2=y > > > CONFIG_CRYPTO_USER=y > > > # CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set > > > # CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is not set > > > > > > https://openbeagle.org/RobertCNelson/arm64-multiplatform/-/blob/v6.15.x-arm64-k3/patches/defconfig?ref_type=heads#L9578 > > > > OK this looks like to be a independent pre-existing bug then and needs > > to be investigated, but it is probably independent of this patch itself. > > > > Could you share a clean defconfig bootlog? I have no existing scheme to > > test this on my end. In the logs, please also print > > /sys/kernel/debug/devices_deferred to ensure we have nothing sticking > > out in our defconfig? > > Okay stable v6.15-rc1 with arm64 defconfig.. > > https://gist.github.com/RobertCNelson/666638abac8eee4ed573997996362450 > > root@am6232-pb2-87:~# ls -lha /sys/kernel/debug/device_component/ umm.. It was cat /sys/kernel/debug/devices_deferred > total 0 > drwxr-xr-x 2 root root 0 Dec 31 1969 . > drwx------ 44 root root 0 Dec 31 1969 .. Thank you Robert. I will assume there are no deferred devices or additional defconfig components to enable.
On 13:26-20250410, Jason Kridner wrote: [...] > > > +&usb1 { > > > + dr_mode = "host"; > > > + pinctrl-names = "default"; > > > + pinctrl-0 = <&usb1_pins_default>; > > > +}; > > > > is'nt this over https://www.beagleboard.org/boards/techlab or > > https://www.beagleboard.org/boards/pocketbeagle-gamepup-cape or > > https://github.com/mwelling/pocket-bob ? > > > > I think it is better as an overlay? Let us not enable something that > > will add power for no benefit :) > > Further USB1.ID has options for PRU as well. Let the daughter overlay > > deal with it. > > > > On the flip side, we could work the other way - since majority of > > daughter cards use USB host, it could be that the other overlays can > > just disable usbss1 and usb1 > > > > Thoughts? > > Since you asked, Being the somewhat unique state of PocketBeagle 2 and > other Beagle > single-board computers as rapid-prototyping development platforms, my > personal general > preference is to see all the stuff turned on by default and then to > provide some clear direction > on what is not necessary such that it lives as documentation forhow to > enable it and simplify > the development of overlays. Some of the rationale for this was > discussed a couple > of years back in a series of blog posts by Michael Opdenacker. [1][2][3] OK - Let us document that in the device tree then. For the i2c ports and usb ports that are implemented in the cape, just add a documentation note saying enabled for cape header or something for that effect. all these main USB pins are dedicated functions anyways, so it is unlikely to see capes that can even attempt to reuse the generic USB data pins for alternate functions. If folks do not use that header in some specific overlay, they can disable the node based on at least some guidance from the documentation. > > My perspective is that the interfaces need to be enabled to define the > header connector to > the device tree and that the muxes should further be fully described > to the system, rather than > leaving those bits of metadata regarding the running system as an > exercise for the reader. > > The aforementioned approach of removing all the "dead bits" is great > until someone is left with > the challenge of figuring out how to turn them on and/or select > between them. Providing an > overlay that disables all the unnecessary bits seems reasonable to me. I understand the rationale, but, we as Linux community came to this guideline: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/dts-coding-style.rst#n207 " Hardware components that are present on the board shall be placed in the board DTS, not in the SoC or SoM DTSI " PB2 being an partial "SOM". It is a trade-off unfortunately. > > Otherwise, I think we can put the entirety of the header description > into an overlay for > cape-specific overlays to use, but I find the lack of an upstream > definition to make it difficult to > enable cape makers to define overlays that are likely to actually work. This is not an unknown problem, though not something pleasant to live with. Linux community is always happy to review options around this, there has been attempts to help standardize these daughter card ecosystems in the past, but none have achieved acceptance. What we have today is the scheme where we have dts and overlays and ability to generate a dtb that stitches the two together in a specific order. That is usually requested to be demonstrated to work prior to acceptance in upstream. That provides folks at least one specific combination of things that is known to work. (testing is a case of effort spent by the community to test things - including overlay, which is no different from the core dtb). But, yes, there is no do what you want and it will just work option today. > > Just my $0.0000002. > > [1] https://www.beagleboard.org/blog/2022-02-15-using-device-tree-overlays-example-on-beaglebone-cape-add-on-boards > [2] https://www.beagleboard.org/blog/2022-03-31-device-tree-supporting-similar-boards-the-beaglebone-example > [3] https://www.beagleboard.org/blog/2022-06-06-using-the-u-boot-extension-board-manager-beaglebone-boards-example Thank you for sharing your thoughts. [...]
diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index 03d4cecfc001..4f8fcb69a2c1 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..65000ed8196f --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am62-pocketbeagle2.dts @@ -0,0 +1,528 @@ +// SPDX-License-Identifier: GPL-2.0-only OR MIT +/* + * https://www.beagleboard.org/boards/pocketbeagle-2 + * + * Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/ + * Copyright (C) 2025 Robert Nelson, BeagleBoard.org Foundation + */ + +/dts-v1/; + +#include <dt-bindings/leds/common.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> +#include "k3-am625.dtsi" + +/ { + 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; + i2c1 = &main_i2c1; + i2c2 = &main_i2c2; + i2c3 = &wkup_i2c0; + }; + + chosen { + stdout-path = &main_uart6; + }; + + memory@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; + + /* global cma region */ + linux,cma { + compatible = "shared-dma-pool"; + reusable; + size = <0x00 0x8000000>; + linux,cma-default; + }; + + mcu_m4fss_dma_memory_region: m4f-dma-memory@9cb00000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9cb00000 0x00 0x100000>; + no-map; + }; + + mcu_m4fss_memory_region: m4f-memory@9cc00000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9cc00000 0x00 0xe00000>; + no-map; + }; + + secure_tfa_ddr: tfa@9e780000 { + reg = <0x00 0x9e780000 0x00 0x80000>; + alignment = <0x1000>; + no-map; + }; + + secure_ddr: optee@9e800000 { + reg = <0x00 0x9e800000 0x00 0x01800000>; + alignment = <0x1000>; + no-map; + }; + + wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@9db00000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9db00000 0x00 0xc00000>; + no-map; + }; + }; + + 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; + 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"; + }; + }; +}; + +&main_pmx0 { + led_pins_default: led-default-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x000c, PIN_OUTPUT, 7) /* (E25) OSPI0_D0.GPIO0_3 */ + AM62X_IOPAD(0x0010, PIN_OUTPUT, 7) /* (G24) OSPI0_D1.GPIO0_4 */ + AM62X_IOPAD(0x0014, PIN_OUTPUT, 7) /* (F25) OSPI0_D2.GPIO0_5 */ + AM62X_IOPAD(0x0018, PIN_OUTPUT, 7) /* (F24) OSPI0_D3.GPIO0_6 */ + >; + bootph-all; + }; + + main_i2c0_pins_default: main-i2c0-default-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x01e0, PIN_INPUT_PULLUP, 0) /* (B16) I2C0_SCL */ + AM62X_IOPAD(0x01e4, PIN_INPUT_PULLUP, 0) /* (A16) I2C0_SDA */ + >; + bootph-all; + }; + + main_i2c2_pins_default: main-i2c2-default-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x00b0, PIN_INPUT_PULLUP, 1) /* (K22) GPMC0_CSn2.I2C2_SCL */ + AM62X_IOPAD(0x00b4, PIN_INPUT_PULLUP, 1) /* (K24) GPMC0_CSn3.I2C2_SDA */ + >; + bootph-all; + }; + + main_uart0_pins_default: main-uart0-default-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x1c8, PIN_INPUT, 0) /* (D14/A13) UART0_RXD */ + AM62X_IOPAD(0x1cc, PIN_OUTPUT, 0) /* (E14/E11) UART0_TXD */ + >; + bootph-all; + }; + + main_uart1_pins_default: main-uart1-default-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x194, PIN_INPUT, 2) /* (B19/B18) MCASP0_AXR3.UART1_CTSn */ + AM62X_IOPAD(0x198, PIN_OUTPUT, 2) /* (A19/B17) MCASP0_AXR2.UART1_RTSn */ + AM62X_IOPAD(0x1ac, PIN_INPUT, 2) /* (E19/D15) MCASP0_AFSR.UART1_RXD */ + AM62X_IOPAD(0x1b0, PIN_OUTPUT, 2) /* (A20/D16) MCASP0_ACLKR.UART1_TXD */ + >; + bootph-all; + }; + + main_uart6_pins_default: main-uart6-default-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x001c, PIN_INPUT, 3) /* (J23) OSPI0_D4.UART6_RXD */ + AM62X_IOPAD(0x0020, PIN_OUTPUT, 3) /* (J25) OSPI0_D5.UART6_TXD */ + >; + }; + + main_mmc1_pins_default: main-mmc1-default-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x23c, PIN_INPUT, 0) /* (A21/C18) MMC1_CMD */ + AM62X_IOPAD(0x234, PIN_INPUT, 0) /* (B22/A20) MMC1_CLK */ + AM62X_IOPAD(0x230, PIN_INPUT, 0) /* (A22/A19) MMC1_DAT0 */ + AM62X_IOPAD(0x22c, PIN_INPUT, 0) /* (B21/B19) MMC1_DAT1 */ + AM62X_IOPAD(0x228, PIN_INPUT, 0) /* (C21/B20) MMC1_DAT2 */ + AM62X_IOPAD(0x224, PIN_INPUT, 0) /* (D22/C19) MMC1_DAT3 */ + AM62X_IOPAD(0x240, PIN_INPUT, 7) /* (D17/C15) MMC1_SDCD.GPIO1_48 */ + >; + bootph-all; + }; + + vdd_sd_dv_pins_default: vdd-sd-dv-default-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x0244, PIN_OUTPUT, 7) /* (P25) GPMC0_CLK.GPIO1_49 */ + >; + bootph-all; + }; + + pmic_irq_pins_default: pmic-irq-default-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x01f4, PIN_INPUT_PULLUP, 0) /* (D16) EXTINTn */ + >; + bootph-all; + }; + + vdd_3v3_sd_pins_default: vdd-3v3-sd-default-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x0000, PIN_OUTPUT, 7) /* (H24) OSPI0_CLK.GPIO0_0 */ + >; + bootph-all; + }; + + usb1_pins_default: usb1-default-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x0258, PIN_INPUT, 0) /* (F18) USB1_DRVVBUS */ + >; + bootph-all; + }; + + epwm2_pins_default: epwm2-default-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x01e8, PIN_OUTPUT, 8) /* (B17) I2C1_SCL.EHRPWM2_A */ + >; + }; +}; + +&cpsw3g { + status = "disabled"; +}; + +&cpsw_port1 { + status = "disabled"; +}; + +&cpsw_port2 { + status = "disabled"; +}; + +&epwm2 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&epwm2_pins_default>; +}; + +&mailbox0_cluster0 { + mbox_m4_0: mbox-m4-0 { + ti,mbox-rx = <0 0 0>; + ti,mbox-tx = <1 0 0>; + }; +}; + +&main_uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&main_uart0_pins_default>; + bootph-all; + status = "okay"; +}; + +&main_uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&main_uart1_pins_default>; + bootph-pre-ram; + status = "reserved"; +}; + +&main_uart6 { + pinctrl-names = "default"; + pinctrl-0 = <&main_uart6_pins_default>; + bootph-all; + status = "okay"; +}; + +&main_i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&main_i2c0_pins_default>; + clock-frequency = <400000>; + bootph-all; + status = "okay"; + + ad7291: adc@20 { + compatible = "adi,ad7291"; + reg = <0x20>; + vref-supply = <&adc_vref>; + }; + + eeprom: eeprom@50 { + compatible = "atmel,24c32"; + reg = <0x50>; + }; +}; + +&main_i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&main_i2c2_pins_default>; + clock-frequency = <400000>; + bootph-all; + status = "okay"; +}; + +&mcu_m4fss { + mboxes = <&mailbox0_cluster0 &mbox_m4_0>; + memory-region = <&mcu_m4fss_dma_memory_region>, + <&mcu_m4fss_memory_region>; + status = "okay"; +}; + +&mcu_pmx0 { + wkup_uart0_pins_default: wkup-uart0-default-pins { + pinctrl-single,pins = < + AM62X_MCU_IOPAD(0x02c, PIN_INPUT, 0) /* (C6/A7) WKUP_UART0_CTSn */ + AM62X_MCU_IOPAD(0x030, PIN_OUTPUT, 0) /* (A4/B4) WKUP_UART0_RTSn */ + AM62X_MCU_IOPAD(0x024, PIN_INPUT, 0) /* (B4/B5) WKUP_UART0_RXD */ + AM62X_MCU_IOPAD(0x028, PIN_OUTPUT, 0) /* (C5/C6) WKUP_UART0_TXD */ + >; + bootph-all; + }; + + wkup_i2c0_pins_default: wkup-i2c0-default-pins { + pinctrl-single,pins = < + AM62X_MCU_IOPAD(0x004c, PIN_INPUT_PULLUP, 0) /* (B9) WKUP_I2C0_SCL */ + AM62X_MCU_IOPAD(0x0050, PIN_INPUT_PULLUP, 0) /* (A9) WKUP_I2C0_SDA */ + >; + bootph-all; + }; +}; + +&sdhci1 { + /* SD/MMC */ + vmmc-supply = <&vdd_mmc1>; + vqmmc-supply = <&vdd_sd_dv>; + pinctrl-names = "default"; + pinctrl-0 = <&main_mmc1_pins_default>; + disable-wp; + cd-gpios = <&main_gpio1 48 GPIO_ACTIVE_LOW>; + cd-debounce-delay-ms = <100>; + bootph-all; + ti,fails-without-test-cd; + status = "okay"; +}; + +&usbss0 { + bootph-all; + ti,vbus-divider; + status = "okay"; +}; + +&usb0 { + bootph-all; + dr_mode = "peripheral"; +}; + +&usbss1 { + ti,vbus-divider; + status = "okay"; +}; + +&usb1 { + dr_mode = "host"; + pinctrl-names = "default"; + pinctrl-0 = <&usb1_pins_default>; +}; + +&wkup_uart0 { + /* WKUP UART0 is used by Device Manager firmware */ + pinctrl-names = "default"; + pinctrl-0 = <&wkup_uart0_pins_default>; + bootph-all; + status = "reserved"; +}; + +&wkup_i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&wkup_i2c0_pins_default>; + clock-frequency = <100000>; + bootph-all; + status = "okay"; + + tps65219: pmic@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; + + regulators { + buck1_reg: buck1 { + regulator-name = "VDD_CORE"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <850000>; + regulator-boot-on; + regulator-always-on; + }; + + buck2_reg: buck2 { + regulator-name = "VDD_1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + buck3_reg: buck3 { + regulator-name = "VDD_1V2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo1_reg: ldo1 { + /* + * Regulator is left as is unused, vdd_sd + * is controlled via GPIO with bypass config + * as per the NVM configuration + */ + regulator-name = "VDD_SD_3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-allow-bypass; + regulator-boot-on; + regulator-always-on; + }; + + ldo2_reg: ldo2 { + regulator-name = "VDDA_0V85"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <850000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo3_reg: ldo3 { + regulator-name = "VDDA_1V8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo4_reg: ldo4 { + regulator-name = "VDD_2V5"; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; + regulator-boot-on; + regulator-always-on; + }; + }; + }; +};
BeagleBoard.org PocketBeagle 2 is an upgraded version of the popular PocketBeagle. It is based on Texas Instruments AM6232 or AM6254 SoC. Its dual or quad A53 cores can provide higher performance than classic PocketBeagle. 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-2 Signed-off-by: Robert Nelson <robertcnelson@gmail.com> CC: Rob Herring <robh@kernel.org> CC: Krzysztof Kozlowski <krzk+dt@kernel.org> CC: Conor Dooley <conor+dt@kernel.org> CC: Vignesh Raghavendra <vigneshr@ti.com> CC: Nishanth Menon <nm@ti.com> CC: Andrew Davis <afd@ti.com> CC: Roger Quadros <rogerq@kernel.org> CC: Siddharth Vadapalli <s-vadapalli@ti.com> CC: Judith Mendez <jm@ti.com> CC: Andrei Aldea <a-aldea@ti.com> CC: Dhruva Gole <d-gole@ti.com> CC: Jason Kridner <jkridner@beagleboard.org> CC: Deepak Khatri <lorforlinux@beagleboard.org> CC: Ayush Singh <ayush@beagleboard.org> --- Changes since v1: - fix '_' in main-i2c2-default-pins - aliases i2c match original pocketbeagle - add mcu_m4fss with reseved memory and mailbox - drop unused main_gpio0_pins_default pinmux - drop unused main_gpio1_pins_default pinmux - drop unused main_spi2_pins_gpio pinmux - Reserve 128MiB of global CMA --- arch/arm64/boot/dts/ti/Makefile | 1 + .../boot/dts/ti/k3-am62-pocketbeagle2.dts | 528 ++++++++++++++++++ 2 files changed, 529 insertions(+) create mode 100644 arch/arm64/boot/dts/ti/k3-am62-pocketbeagle2.dts