From patchwork Tue Mar 22 10:58:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 12788255 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 84648C433EF for ; Tue, 22 Mar 2022 11:00:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=UDFsb7PFMIUvmGXsL+PTgwweAKOfTywf2dD5sG/F+xU=; b=BX1RYpOgnw4c7G jonyJ0SWfn7ds27KZfC/B2sMyhSF1KtL8JuE4dvvLK5spwWndzYJezVw4nObNFaC9E+T26gGyuWoh uXb5TkjUvHEd5Umn5XI7aXq8eJiYfqkuU+umpsDJoDDRnCu3hQW8R1CFx3RrLt8vMPyGBGEty+ja2 YB9RcK4wnzv9BCVV8WAU4UwbTG/juwuaEQagm6upx7dZDn6cvTvXqmeXRlkdD3sFQzH4B8ntZcgyF tdv0QRkJdWdWpJhqzDQHlv62WiBFa9OoxEEnES3PKYn29sclSs410+gwnJe/nXHZKKbSrOFGUrxhE 0tPnGxUZdGQ5gbjbWJhw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWcEH-00Al0E-Td; Tue, 22 Mar 2022 10:59:10 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWcEE-00Akzj-Ny for linux-arm-kernel@lists.infradead.org; Tue, 22 Mar 2022 10:59:08 +0000 Received: by mail-ej1-x631.google.com with SMTP id j15so21268585eje.9 for ; Tue, 22 Mar 2022 03:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura-hr.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zfghx/qEkC2ONfoEHoNhajwMqvVU/Rw6+xNqAELkwE4=; b=3ggq4f3T64nDuKSwbTf/6v4FwlZ/AFMKwVp+igZxWrKaF6n6Orwm1OAgFbA5Zm8EwI 0MzsmZOeTGQRLC93xUoEqVOCa3qKL8W8N48Ph8Ci544dyke+Dgi95sgCezM+4d9GE1S2 jdHBYObpDUd/YWJ34i0wcPkKigC2hEwzzakfhC7iGQPMQp+pkSJ1JyeSG4y1v0YfTcI2 lWZsZb6H8h1GXh6cF3j3Z5z0xQi3RRycMyZxZM6TKTiWP5LZsoaaTRRsx0au5lm8SwUl /ijvmNlzSWC1LWRZd+mvBRfwFjPoyAJqN58Gdf0d5gW+KcJzXDHxLixGiS0qdmPADSm6 WsKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zfghx/qEkC2ONfoEHoNhajwMqvVU/Rw6+xNqAELkwE4=; b=DfyvI8RzfTZ5plHYphYjS12NBLsuyxRZbpNpjjDyurDwgOCKCYwZELxkzsxqIH+rQG juvTO/vp/3hh1pHvJNLfJ0wEtVL1pG4VlXDateuB9M2xl2Q7Vsc3mQ563vAw1EpggyCQ fvNFzFh/1zzf+7Dpbb7TtDDqQjwXtLqweZ+LxANWourjPwrWCmYBEB+XVXOXmNjhZLPj MRh64tJZOe16RxdVPP02423SCn5AMIEVEi+3ooqZ8Xv5HT/dslBOhb7CpoVeGjX2zcPl s8I8y39XNqnUVxA9aA0NuGRhkS2L0t40kfj6YHXXbqWPEUlZE+Jk+t3wmD0suhjBkBoj 3oNA== X-Gm-Message-State: AOAM532JhfmXBx0zIgiL4zPViTfr9eWzsc67aON8It1gqCOqD1b4Za9k GprXVwiN/Th7bEMWNIbiCyzVxQ== X-Google-Smtp-Source: ABdhPJzmf1aOUH0Mk/vPLVvoQz/uaOiphL8+V2bJXKtiEls+synowm9ZyksG2v6vj+lPIw7QNwo2ew== X-Received: by 2002:a17:907:7f88:b0:6db:c308:c247 with SMTP id qk8-20020a1709077f8800b006dbc308c247mr25177763ejc.300.1647946744330; Tue, 22 Mar 2022 03:59:04 -0700 (PDT) Received: from fedora.robimarko.hr (cpezg-94-253-144-57-cbl.xnet.hr. [94.253.144.57]) by smtp.googlemail.com with ESMTPSA id b7-20020a056402084700b004190d2fc521sm6150240edz.89.2022.03.22.03.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Mar 2022 03:59:03 -0700 (PDT) From: Robert Marko To: andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, pali@kernel.org, marek.behun@nic.cz Cc: Robert Marko Subject: [PATCH v2 1/2] arm64: dts: uDPU: update partition table Date: Tue, 22 Mar 2022 11:58:56 +0100 Message-Id: <20220322105857.1107016-1-robert.marko@sartura.hr> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220322_035906_843146_77426785 X-CRM114-Status: GOOD ( 14.19 ) 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 Partition currently called "uboot" does not only contain U-boot, but rather it contains TF-A, U-boot and U-boot environment. So, to avoid accidentally deleting the U-boot environment which is located at 0x180000 split the partition. "uboot" is not the correct name as you can't boot these boards with U-boot only, TF-A must be present as well, so rename the "uboot" partition to "firmware". While we are here, describe the NOR node as "spi-flash@0" instead of "m25p80@0" which is the old SPI-NOR driver name. This won't break booting for existing devices as the SoC-s BootROM is not partition aware at all, it will simply try booting from 0x0 of the boot device that is set by bootstrap pins. This will however prevent accidental or automated flashing of just U-boot to the partition. Signed-off-by: Robert Marko Reviewed-by: Andrew Lunn Reviewed-by: Pali Rohár --- Changes in v2: * Update the commit description by adressing ABI breaking concerns --- arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts index 95d46e8d081c..ac64949bb53e 100644 --- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts @@ -99,7 +99,7 @@ &spi0 { pinctrl-names = "default"; pinctrl-0 = <&spi_quad_pins>; - m25p80@0 { + spi-flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <54000000>; @@ -108,10 +108,15 @@ partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; - /* only bootloader is located on the SPI */ + partition@0 { - label = "uboot"; - reg = <0 0x400000>; + label = "firmware"; + reg = <0x0 0x180000>; + }; + + partition@180000 { + label = "u-boot-env"; + reg = <0x180000 0x10000>; }; }; };