devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: arm: ti: Add PocketBeagle2
@ 2025-02-11 18:18 Robert Nelson
  2025-02-11 18:18 ` [PATCH 2/2] arm64: dts: ti: Add k3-am62-pocketbeagle2 Robert Nelson
  2025-02-11 18:46 ` [PATCH] dt-bindings: arm: ti: Add PocketBeagle2 Conor Dooley
  0 siblings, 2 replies; 7+ messages in thread
From: Robert Nelson @ 2025-02-11 18:18 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel, devicetree
  Cc: Robert Nelson, Nishanth Menon, Vignesh Raghavendra, Tero Kristo,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andrew Davis,
	Andrei Aldea, Jason Kridner, Deepak Khatri, Ayush Singh

This board is based on ti,am625 family using the am6232 variation.

https://www.beagleboard.org/boards/pocketbeagle-2
https://openbeagle.org/pocketbeagle/pocketbeagle-2

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
CC: Nishanth Menon <nm@ti.com>
CC: Vignesh Raghavendra <vigneshr@ti.com>
CC: Tero Kristo <kristo@kernel.org>
CC: Rob Herring <robh@kernel.org>
CC: Krzysztof Kozlowski <krzk+dt@kernel.org>
CC: Conor Dooley <conor+dt@kernel.org>
CC: Andrew Davis <afd@ti.com>
CC: Andrei Aldea <a-aldea@ti.com>
CC: Jason Kridner <jkridner@beagleboard.org>
CC: Deepak Khatri <lorforlinux@beagleboard.org>
CC: Ayush Singh <ayush@beagleboard.org>
---
 Documentation/devicetree/bindings/arm/ti/k3.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/ti/k3.yaml b/Documentation/devicetree/bindings/arm/ti/k3.yaml
index 18f155cd06c8..b7f6cd8d4b9e 100644
--- a/Documentation/devicetree/bindings/arm/ti/k3.yaml
+++ b/Documentation/devicetree/bindings/arm/ti/k3.yaml
@@ -46,6 +46,7 @@ properties:
       - description: K3 AM625 SoC
         items:
           - enum:
+              - beagle,am62-pocketbeagle2
               - beagle,am625-beagleplay
               - ti,am625-sk
               - ti,am62-lp-sk
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] arm64: dts: ti: Add k3-am62-pocketbeagle2
  2025-02-11 18:18 [PATCH] dt-bindings: arm: ti: Add PocketBeagle2 Robert Nelson
@ 2025-02-11 18:18 ` Robert Nelson
  2025-02-11 23:06   ` Robert Nelson
                     ` (2 more replies)
  2025-02-11 18:46 ` [PATCH] dt-bindings: arm: ti: Add PocketBeagle2 Conor Dooley
  1 sibling, 3 replies; 7+ messages in thread
From: Robert Nelson @ 2025-02-11 18:18 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel, devicetree
  Cc: Robert Nelson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Vignesh Raghavendra, Nishanth Menon, Andrew Davis, Roger Quadros,
	Siddharth Vadapalli, Judith Mendez, Andrei Aldea, Jason Kridner,
	Deepak Khatri, Ayush Singh

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.
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@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: Jason Kridner <jkridner@beagleboard.org>
CC: Deepak Khatri <lorforlinux@beagleboard.org>
CC: Ayush Singh <ayush@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
+ */
+
+/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;
+		i2c0 = &main_i2c0;
+		i2c1 = &wkup_i2c0;
+		i2c2 = &main_i2c2;
+	};
+
+	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;
+
+		secure_tfa_ddr: tfa@9e780000 {
+			reg = <0x00 0x9e780000 0x00 0x80000>;
+			no-map;
+		};
+
+		secure_ddr: optee@9e800000 {
+			reg = <0x00 0x9e800000 0x00 0x01800000>;
+			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;
+	};
+
+	main_gpio0_pins_default: main-gpio0-default-pins {
+		pinctrl-single,pins = <
+			AM62X_IOPAD(0x00c8, PIN_INPUT, 7) /* (Y25) VOUT0_DATA4.GPIO0_49 */
+			AM62X_IOPAD(0x00cc, PIN_INPUT, 7) /* (Y24) VOUT0_DATA5.GPIO0_50 */
+			AM62X_IOPAD(0x00d0, PIN_INPUT, 7) /* (Y23) VOUT0_DATA6.GPIO0_51 */
+			AM62X_IOPAD(0x00d4, PIN_INPUT, 7) /* (AA25) VOUT0_DATA7.GPIO0_52 */
+			AM62X_IOPAD(0x00d8, PIN_INPUT, 7) /* (V21) VOUT0_DATA8.GPIO0_53 */
+			AM62X_IOPAD(0x0100, PIN_INPUT, 7) /* (AC25) VOUT0_VSYNC.GPIO0_63 */
+		>;
+	};
+
+	main_gpio1_pins_default: main-gpio1-default-pins {
+		pinctrl-single,pins = <
+			AM62X_IOPAD(0x01a0, PIN_INPUT, 7) /* (E18) MCASP0_AXR0.GPIO1_10 */
+			AM62X_IOPAD(0x01a8, PIN_INPUT, 7) /* (D20) MCASP0_AFSX.GPIO1_12 */
+			AM62X_IOPAD(0x0180, PIN_INPUT, 7) /* (AD23) RGMII2_RXC.GPIO1_2 */
+		>;
+	};
+
+	main_spi2_pins_gpio: main-spi2-gpio-pins {
+		pinctrl-single,pins = <
+			AM62X_IOPAD(0x0194, PIN_INPUT, 7) /* (B19) MCASP0_AXR3.GPIO1_7 */
+			AM62X_IOPAD(0x0198, PIN_INPUT, 7) /* (A19) MCASP0_AXR2.GPIO1_8 */
+			AM62X_IOPAD(0x01ac, PIN_INPUT, 7) /* (E19) MCASP0_AFSR.GPIO1_13 */
+			AM62X_IOPAD(0x01b0, PIN_INPUT, 7) /* (A20) MCASP0_ACLKR.GPIO1_14 */
+		>;
+	};
+
+	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";
+};
+
+&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";
+};
+
+&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;
+	};
+};
+
+&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;
+			};
+		};
+	};
+};
+
+&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";
+};
+
+&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";
+};
+
+&epwm2 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&epwm2_pins_default>;
+};
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] dt-bindings: arm: ti: Add PocketBeagle2
  2025-02-11 18:18 [PATCH] dt-bindings: arm: ti: Add PocketBeagle2 Robert Nelson
  2025-02-11 18:18 ` [PATCH 2/2] arm64: dts: ti: Add k3-am62-pocketbeagle2 Robert Nelson
@ 2025-02-11 18:46 ` Conor Dooley
  1 sibling, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2025-02-11 18:46 UTC (permalink / raw)
  To: Robert Nelson
  Cc: linux-arm-kernel, linux-kernel, devicetree, Nishanth Menon,
	Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Andrew Davis, Andrei Aldea,
	Jason Kridner, Deepak Khatri, Ayush Singh

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

On Tue, Feb 11, 2025 at 12:18:38PM -0600, Robert Nelson wrote:
> This board is based on ti,am625 family using the am6232 variation.
> 
> https://www.beagleboard.org/boards/pocketbeagle-2
> https://openbeagle.org/pocketbeagle/pocketbeagle-2
> 
> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] arm64: dts: ti: Add k3-am62-pocketbeagle2
  2025-02-11 18:18 ` [PATCH 2/2] arm64: dts: ti: Add k3-am62-pocketbeagle2 Robert Nelson
@ 2025-02-11 23:06   ` Robert Nelson
  2025-02-24 11:13   ` Dhruva Gole
  2025-02-24 12:03   ` Vignesh Raghavendra
  2 siblings, 0 replies; 7+ messages in thread
From: Robert Nelson @ 2025-02-11 23:06 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel, devicetree
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Vignesh Raghavendra, Nishanth Menon, Andrew Davis, Roger Quadros,
	Siddharth Vadapalli, Judith Mendez, Andrei Aldea, Jason Kridner,
	Deepak Khatri, Ayush Singh

On Tue, Feb 11, 2025 at 12: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 SoC. Its dual
> 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-

Broken copy/paste by me, this is:
https://openbeagle.org/pocketbeagle/pocketbeagle-2

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] arm64: dts: ti: Add k3-am62-pocketbeagle2
  2025-02-11 18:18 ` [PATCH 2/2] arm64: dts: ti: Add k3-am62-pocketbeagle2 Robert Nelson
  2025-02-11 23:06   ` Robert Nelson
@ 2025-02-24 11:13   ` Dhruva Gole
  2025-02-26 15:49     ` Andrew Davis
  2025-02-24 12:03   ` Vignesh Raghavendra
  2 siblings, 1 reply; 7+ messages in thread
From: Dhruva Gole @ 2025-02-24 11:13 UTC (permalink / raw)
  To: Robert Nelson
  Cc: linux-arm-kernel, linux-kernel, devicetree, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vignesh Raghavendra,
	Nishanth Menon, Andrew Davis, Roger Quadros, Siddharth Vadapalli,
	Judith Mendez, Andrei Aldea, Jason Kridner, Deepak Khatri,
	Ayush Singh

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@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: Jason Kridner <jkridner@beagleboard.org>
> CC: Deepak Khatri <lorforlinux@beagleboard.org>
> CC: Ayush Singh <ayush@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?

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@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@9e780000 {
> +			reg = <0x00 0x9e780000 0x00 0x80000>;
> +			no-map;
> +		};
> +
> +		secure_ddr: optee@9e800000 {
> +			reg = <0x00 0x9e800000 0x00 0x01800000>;
> +			no-map;
> +		};
> +
> +		wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@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@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...

-- 
Best regards,
Dhruva Gole
Texas Instruments Incorporated

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] arm64: dts: ti: Add k3-am62-pocketbeagle2
  2025-02-11 18:18 ` [PATCH 2/2] arm64: dts: ti: Add k3-am62-pocketbeagle2 Robert Nelson
  2025-02-11 23:06   ` Robert Nelson
  2025-02-24 11:13   ` Dhruva Gole
@ 2025-02-24 12:03   ` Vignesh Raghavendra
  2 siblings, 0 replies; 7+ messages in thread
From: Vignesh Raghavendra @ 2025-02-24 12:03 UTC (permalink / raw)
  To: Robert Nelson, linux-arm-kernel, linux-kernel, devicetree
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Nishanth Menon,
	Andrew Davis, Roger Quadros, Siddharth Vadapalli, Judith Mendez,
	Andrei Aldea, Jason Kridner, Deepak Khatri, Ayush Singh

Hi

On 11/02/25 23:48, 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.
> 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@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: Jason Kridner <jkridner@beagleboard.org>
> CC: Deepak Khatri <lorforlinux@beagleboard.org>
> CC: Ayush Singh <ayush@beagleboard.org>


Please run make dtbs_check and fix the reported issues. Eg.:


+arch/arm64/boot/dts/ti/k3-am62-pocketbeagle2.dts: /bus@f0000/pinctrl@f4000/main_i2c2-default-pins: Character '_' not recommended in node name

[...]

> ----- 
Regards
Vignesh
https://ti.com/opensource


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] arm64: dts: ti: Add k3-am62-pocketbeagle2
  2025-02-24 11:13   ` Dhruva Gole
@ 2025-02-26 15:49     ` Andrew Davis
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Davis @ 2025-02-26 15:49 UTC (permalink / raw)
  To: Dhruva Gole, Robert Nelson
  Cc: linux-arm-kernel, linux-kernel, devicetree, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vignesh Raghavendra,
	Nishanth Menon, Roger Quadros, Siddharth Vadapalli, Judith Mendez,
	Andrei Aldea, Jason Kridner, Deepak Khatri, Ayush Singh

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@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: Jason Kridner <jkridner@beagleboard.org>
>> CC: Deepak Khatri <lorforlinux@beagleboard.org>
>> CC: Ayush Singh <ayush@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@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@9e780000 {
>> +			reg = <0x00 0x9e780000 0x00 0x80000>;
>> +			no-map;
>> +		};
>> +
>> +		secure_ddr: optee@9e800000 {
>> +			reg = <0x00 0x9e800000 0x00 0x01800000>;
>> +			no-map;
>> +		};
>> +
>> +		wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@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@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...
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-02-26 15:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-11 18:18 [PATCH] dt-bindings: arm: ti: Add PocketBeagle2 Robert Nelson
2025-02-11 18:18 ` [PATCH 2/2] arm64: dts: ti: Add k3-am62-pocketbeagle2 Robert Nelson
2025-02-11 23:06   ` Robert Nelson
2025-02-24 11:13   ` Dhruva Gole
2025-02-26 15:49     ` Andrew Davis
2025-02-24 12:03   ` Vignesh Raghavendra
2025-02-11 18:46 ` [PATCH] dt-bindings: arm: ti: Add PocketBeagle2 Conor Dooley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).