From patchwork Wed Apr 12 07:38:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathew McBride X-Patchwork-Id: 1767931 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=traverse.com.au header.i=@traverse.com.au header.a=rsa-sha256 header.s=fm2 header.b=N0dN6iGY; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=dXquCCbr; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PxF423vDrz1yZK for ; Wed, 12 Apr 2023 17:40:18 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E05F785F2B; Wed, 12 Apr 2023 09:39:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=traverse.com.au Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=traverse.com.au header.i=@traverse.com.au header.b="N0dN6iGY"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="dXquCCbr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D7DCB85BBE; Wed, 12 Apr 2023 09:39:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1CBC985AA1 for ; Wed, 12 Apr 2023 09:39:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=traverse.com.au Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=matt@traverse.com.au Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 8585E3200971; Wed, 12 Apr 2023 03:39:39 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 12 Apr 2023 03:39:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=traverse.com.au; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to; s=fm2; t=1681285179; x=1681371579; bh=06 RP4MuH6nE2tWmaT5VCVTGJHPL0/o1hd58feJ1O30M=; b=N0dN6iGYZNhj26KxMW s94uMmgSUzPsgUe2Ty0uQ4v3T97RC6HHWIKgSTxvU1YCeJC9vwAF1/B1+oZO667a /G2Uy++1+/ljpwiP8EYIvxavQFcxi1VejPsGntsXloOz7jkqNBFBxowML4oMdHnz JKjh7EgFgPfFxyAXHAMNofPI/239+t4IKOkPdoFlRL7zx0+SPqw3EWBJOTRGawJ2 4CXjCZCUmaOufltqH+D6SzJ4Lpbit8IEc/Y3j7afSDfMNok1dbsN+kTzcNbYRjav U+c+rc0oyD7NvOoXLscPUYxDqtV1gOQ4n9Q86Ddxhep8QQ+8i1CvmH+VBhwqtb/b qhrA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1681285179; x=1681371579; bh=06RP4MuH6nE2t WmaT5VCVTGJHPL0/o1hd58feJ1O30M=; b=dXquCCbrFC9ogebEZ/YIJQrsozAho iYM74QLuYLbuFKN5Qih7INr3geQ9pzizbXKlejdDYb11g+GNDF83JWW0usYifb08 00ss4kKdsftxVYBaQB6J4XAYBcwmK8biVC3KWu/dl9piBWrrICja05kURZfk2pUy +rZQOSXrzI5QTJJETEAhKOdTjrkta6nnQQFI/g9v7AI1C174U5y68w+RYPxzBUo0 w+io26AtCEA8/m7C+MmCIa0TUD6ZXNW3u+mC3hpWjjdUgHO2FUjMi7NGMwK+mjtv 7NTowilNNBVDFazsFdcoFZQhYBvI0PaQPxIQ2OHwYZS5HJ9Pm8v70jAgA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekhedguddvfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpeforghthhgv ficuofgtuehrihguvgcuoehmrghtthesthhrrghvvghrshgvrdgtohhmrdgruheqnecugg ftrfgrthhtvghrnhephedttddugffgffelffevfffgfeehjeehvdegfeeiledtkeffkeeu gfdvhfekfedtnecuffhomhgrihhnpehoiihlrggsshdrohhrghenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrghtthesthhrrghvvghrshgv rdgtohhmrdgruh X-ME-Proxy: Feedback-ID: i426947f3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Apr 2023 03:39:36 -0400 (EDT) From: Mathew McBride To: u-boot@lists.denx.de, Ioana Ciornei , Peng Fan , Gaurav Jain Cc: Mathew McBride Subject: [PATCH 00/18] Synchronise LS1088A/Ten64 device tree with Linux Date: Wed, 12 Apr 2023 07:38:12 +0000 Message-Id: <20230412073830.13928-1-matt@traverse.com.au> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean I am intensively working on updating the current "production" Ten64 (NXP LS1088A) firmware from v2020.07 to the latest U-Boot, with the hope of taking advantage of bootstd/bootflow and other improvements. One desire I have is to have U-Boot "supply" the device tree which is used for EFI boot, rather than our current method of reading the DTB from a flash partition with commands (sf read etc.) and plugging that into the distroboot process. Indeed, once we syncronise the U-Boot FDT with the Linux one, the bootflow method "Just Works" with the control FDT, without us having to plug an external FDT into the process. (Note: the bootstd conversion for Ten64 will be coming in a later commit. The DTS on it's own is only one part of the puzzle) The flow of this series is: - Fix a crash I found in the U-Boot FDT fixup for Layerscape The previous U-Boot copy of the fsl-ls1088a.dts did not have direct alias to the "crypto" node, triggering a crash when FDT fixup tried to operate on it. - Enable DM_SERIAL for Ten64 (mirrors how it was enabled for LS1088A-RDB and LS1088A-QDS recently) - Move all U-Boot "tweaks" into a -u-boot.dtsi file. Each board will have it's own -u-boot.dtsi, which includs the SoC-specific fsl-ls1088a-u-boot.dtsi. - For all hardware that was in U-Boot's fsl-ls1088a.dtsi, and not in the "correct" place (under /soc), move them into /soc and adopt the Linux kernel definition. PCIe needed special treatment as it's U-Boot binding was slightly different, as well as different compatible strings (match a different U-Boot driver) for MDIO, USB and fsl-mc among others. At this point, Linux is able to boot on the Ten64 using U-Boot's FDT (passed to it via EFI) with major hardware (Ethernet, USB, PCIe) functional. - Finally, copy over the U-Boot fsl-ls1088a.dtsi with the Linux kernel version. They are now bit-for-bit identical, with the U-Boot tweaks contained externally. - Similarly for the Ten64 DTS - fsl-ls1088a-ten64.dts is now identical to the kernel version. This builds upon the recent conversion of the LS1088A to DM_SERIAL[1]. I used a similar syncronisation for the LS1028A[2] as a guide. [1] - "Convert LS1088A and LX2160 to DM_SERIAL" patch series https://patchwork.ozlabs.org/project/uboot/list/?series=346392&state=%2A&archive=both [2] - "arm: dts: ls1028a: sync device tree with linux" patch series https://patchwork.ozlabs.org/project/uboot/list/?series=265457&state=%2A&archive=both Mathew McBride (18): armv8: fsl-layerscape: check for crypto node first in fdt_fixup_remove_jr configs: ten64: enable DM_SERIAL arm: dts: fsl-ls1088a: move u-boot bootph tags into u-boot only files arm: dts: fsl-ls1088a: move memory node into U-Boot specific file pci: layerscape: add support for kernel/official fsl,ls1088a-pcie binding arm: dts: fsl-ls1088a: import and sync full SMMU nodes with Linux arm: dts: fsl-ls1088a: sync PCIe controller definition with Linux arm: dts: fsl-ls1088a: match Linux FDT by disabling PCIe by default arm: dts: fsl-ls1088a: import CPU definition from Linux kernel arm: dts: fsl-ls1088a: move GPIO controller under "soc" per Linux arm: dts: fsl-ls1088a: move I2C nodes under "soc" and syncronize with Linux arm: dts: fsl-ls1088a: sync usb controller nodes with Linux arm: dts: fsl-ls1088a: syncronise MDIO+PCS U-Boot definitions with Linux arm: dts: fsl-ls1088a: syncronise fsl-mc definition with Linux arm: dts: fsl-ls1088a: move and sync existing bindings to be under /soc arm: dts: fsl-ls1088a: copy all missing bindings from Linux arm: dts: ten64: syncronise device tree with Linux arm: dts: ten64: fix header typo and update copyright arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 4 + arch/arm/dts/fsl-ls1088a-qds-u-boot.dtsi | 5 + arch/arm/dts/fsl-ls1088a-rdb-u-boot.dtsi | 5 + arch/arm/dts/fsl-ls1088a-ten64-u-boot.dtsi | 18 + arch/arm/dts/fsl-ls1088a-ten64.dts | 61 +- arch/arm/dts/fsl-ls1088a-u-boot.dtsi | 63 + arch/arm/dts/fsl-ls1088a.dtsi | 1216 +++++++++++++++----- configs/ten64_tfa_defconfig | 4 +- drivers/pci/pcie_layerscape_rc.c | 1 + 9 files changed, 1067 insertions(+), 310 deletions(-) create mode 100644 arch/arm/dts/fsl-ls1088a-qds-u-boot.dtsi create mode 100644 arch/arm/dts/fsl-ls1088a-rdb-u-boot.dtsi create mode 100644 arch/arm/dts/fsl-ls1088a-ten64-u-boot.dtsi create mode 100644 arch/arm/dts/fsl-ls1088a-u-boot.dtsi Reviewed-by: Ioana Ciornei Tested-by: Ioana Ciornei # on LS1088A-RDB