From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7E7FBC18E7C for ; Wed, 26 Feb 2025 15:52:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:CC:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VbW2t9EwpIS5Ha4EesUhK91rBFjcgNiBhbAE8z1q18s=; b=dt/GqUhaWpqhQ1kquZRogKTFIO u5xT4qyY5wcHnfOcRa5em+Nre7KiKY5RrBtr5mjscUMJo2cKuid1b2vk6eESGDTOcw9UgqvXmeMlT sdE18wwRvpJkuqTdvyn6gXJ9TJGwo7j2J928D+TGhMUQ5uIibdU3vQlbzx3YsnHZcYxcw17U0UxgT z+xPM2cFLZZy2n7SYD4Mk9GXDxmEWajpvXT5nKVYZXIk5bRhL71k1p4eZtu8cH/CwRj927VyKt/w2 CA7hc9punosMSfXNvPMhuZ09WunYSjijc9oL8zaM9TA4IQmNs72bgHhSDVOAs3Vr7KmObY1qZ2JrV aaMJT6qQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tnJhS-00000004P7V-0KA9; Wed, 26 Feb 2025 15:51:54 +0000 Received: from [198.47.23.235] (helo=lelvem-ot02.ext.ti.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tnJfh-00000004Ojy-3lGO for linux-arm-kernel@lists.infradead.org; Wed, 26 Feb 2025 15:50:08 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelvem-ot02.ext.ti.com (8.15.2/8.15.2) with ESMTPS id 51QFnxne2112906 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 26 Feb 2025 09:49:59 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1740584999; bh=VbW2t9EwpIS5Ha4EesUhK91rBFjcgNiBhbAE8z1q18s=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=q6xDfecG+mHPY30GFFkDvARlLSpp6aqSqsceAuiSoMHVfMkYUg8pKycQqI31gduNB anlVKTRgzBcKzolvqiitcmk3z1sZ7HB8Znb8IvJ0O4TNiikUhtmF4CjFtPgv1iUbAS w5HSbAM1OF+Vbzi1r/3nhEJEVwiV1KlDeZBt5Oac= Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTP id 51QFnxjj035621; Wed, 26 Feb 2025 09:49:59 -0600 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 26 Feb 2025 09:49:58 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 26 Feb 2025 09:49:58 -0600 Received: from [10.249.42.149] ([10.249.42.149]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 51QFnvkZ052803; Wed, 26 Feb 2025 09:49:57 -0600 Message-ID: <74b85562-15c2-42fc-8ee0-990f5718dcb0@ti.com> Date: Wed, 26 Feb 2025 09:49:57 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] arm64: dts: ti: Add k3-am62-pocketbeagle2 To: Dhruva Gole , Robert Nelson CC: , , , Rob Herring , "Krzysztof Kozlowski" , Conor Dooley , "Vignesh Raghavendra" , Nishanth Menon , Roger Quadros , Siddharth Vadapalli , Judith Mendez , Andrei Aldea , Jason Kridner , Deepak Khatri , Ayush Singh References: <20250211181839.1575497-1-robertcnelson@gmail.com> <20250211181839.1575497-2-robertcnelson@gmail.com> <20250224111318.3wlbhpm7pggsbqdb@lcpd911> Content-Language: en-US From: Andrew Davis In-Reply-To: <20250224111318.3wlbhpm7pggsbqdb@lcpd911> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250226_075006_055085_0B6D3D6F X-CRM114-Status: GOOD ( 29.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 >> CC: Rob Herring >> CC: Krzysztof Kozlowski >> CC: Conor Dooley >> CC: Vignesh Raghavendra >> CC: Nishanth Menon >> CC: Andrew Davis >> CC: Roger Quadros >> CC: Siddharth Vadapalli >> CC: Judith Mendez >> CC: Andrei Aldea >> CC: Jason Kridner >> CC: Deepak Khatri >> CC: Ayush Singh >> --- >> 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 >> +#include >> +#include >> +#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 = ; >> + linux,default-trigger = "heartbeat"; >> + function = LED_FUNCTION_HEARTBEAT; >> + default-state = "on"; >> + }; >> + >> + led-2 { >> + bootph-all; >> + gpios = <&main_gpio0 5 GPIO_ACTIVE_HIGH>; >> + color = ; >> + function = LED_FUNCTION_DISK_ACTIVITY; >> + linux,default-trigger = "mmc1"; >> + }; >> + >> + led-3 { >> + bootph-all; >> + gpios = <&main_gpio0 4 GPIO_ACTIVE_HIGH>; >> + color = ; >> + }; >> + >> + led-4 { >> + bootph-all; >> + gpios = <&main_gpio0 3 GPIO_ACTIVE_HIGH>; >> + color = ; >> + 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 = ; >> + 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... >