lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250224111318.3wlbhpm7pggsbqdb@lcpd911>
Date: Mon, 24 Feb 2025 16:43:18 +0530
From: Dhruva Gole <d-gole@...com>
To: Robert Nelson <robertcnelson@...il.com>
CC: <linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
        <devicetree@...r.kernel.org>, Rob Herring <robh@...nel.org>,
        Krzysztof
 Kozlowski <krzk+dt@...nel.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Vignesh
 Raghavendra <vigneshr@...com>, Nishanth Menon <nm@...com>,
        Andrew Davis
	<afd@...com>, Roger Quadros <rogerq@...nel.org>,
        Siddharth Vadapalli
	<s-vadapalli@...com>, Judith Mendez <jm@...com>,
        Andrei Aldea
	<a-aldea@...com>,
        Jason Kridner <jkridner@...gleboard.org>,
        Deepak Khatri
	<lorforlinux@...gleboard.org>,
        Ayush Singh <ayush@...gleboard.org>
Subject: Re: [PATCH 2/2] arm64: dts: ti: Add k3-am62-pocketbeagle2

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@...il.com>
> CC: Rob Herring <robh@...nel.org>
> CC: Krzysztof Kozlowski <krzk+dt@...nel.org>
> CC: Conor Dooley <conor+dt@...nel.org>
> CC: Vignesh Raghavendra <vigneshr@...com>
> CC: Nishanth Menon <nm@...com>
> CC: Andrew Davis <afd@...com>
> CC: Roger Quadros <rogerq@...nel.org>
> CC: Siddharth Vadapalli <s-vadapalli@...com>
> CC: Judith Mendez <jm@...com>
> CC: Andrei Aldea <a-aldea@...com>
> CC: Jason Kridner <jkridner@...gleboard.org>
> CC: Deepak Khatri <lorforlinux@...gleboard.org>
> CC: Ayush Singh <ayush@...gleboard.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@...00000 {
> +		/* 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@...80000 {
> +			reg = <0x00 0x9e780000 0x00 0x80000>;
> +			no-map;
> +		};
> +
> +		secure_ddr: optee@...00000 {
> +			reg = <0x00 0x9e800000 0x00 0x01800000>;
> +			no-map;
> +		};
> +
> +		wkup_r5fss0_core0_dma_memory_region: r5f-dma-memory@...00000 {
> +			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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ