From patchwork Tue Aug 22 09:23:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Skvortsov X-Patchwork-Id: 13360406 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 C40B9EE4993 for ; Tue, 22 Aug 2023 09:24:51 +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:References:In-Reply-To: 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: List-Owner; bh=awtcOtXpYdaGlDLVRvH80GowYZRq8gpKi85wFi3myxg=; b=P6kIPMTk9KfxyB FcJ6m6Izu8ciyp93eGiTFOPaVSyGmR+jdpUBkUZr8GcLgJul98K6pInV2e6AQPqBwp5sw5Huq1J0r CzyMzsZrL/Sa4UTMioTtSoPHa6AI4EKNqvT0m2fhA6hWZ/Rncz4r9muWgSTzox+9ruo2aPjVd2fZp hlHGveg2MDb8N/56WM7Fbx/YwjPcj3DUcKwQsuYhIuYXPxlT9jEN0/zlPgXSdomiMmviB1g2k0k4I iu0PW1xZFPMwfYOHv0y9j6tek/Mg33TpWLIUVJ2S8rzmgUp9eYHSHoR9nxrHV0xdCC7bDbA4IOat6 NfNqibUEmXUBXkvIGF6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qYNcf-00FXuX-1e; Tue, 22 Aug 2023 09:24:25 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qYNcb-00FXtp-2L for linux-arm-kernel@lists.infradead.org; Tue, 22 Aug 2023 09:24:23 +0000 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4fe11652b64so6456179e87.0 for ; Tue, 22 Aug 2023 02:24:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692696259; x=1693301059; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zI3MgR1LXRyYEK7UHlSxA4reZwr5ug/du2XE/mti7jk=; b=khyvXxUFO523zkQYiAnT5nDsilCeLi/EH+bHe8RZfETTspSimNLq6iWbWx5M/HgIfR WhiNsCK7mRAOXC5B+82L3JLSP+XCLo4NLN2e+QbEhvep3hcn7cUnS1j3c+Q/Q9w20J7o GrBajaauq4sMPZG7y3WRXg5x4d+HwMJXOuaHjQ/2ceGRVJRpj5gHLPif9cfyaGHDgKot ZrqqQ2d3YwPhZsL+4cLmB9hGFvShDPhrGbrw2YD2wiqd1W+jOtzhtWic4ZZ82OuChvxd v7kn+AGL9gNXcvAMuimRiUU1J3DShIAHJBK5KsNv2KQ8ggIE5DK8VNZLRwkyp7734waW 8REQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692696259; x=1693301059; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zI3MgR1LXRyYEK7UHlSxA4reZwr5ug/du2XE/mti7jk=; b=Odb30EY8/44GwJEaKIGm05rftxiEFQrlv3ulwAVKYB534JB8G7UBrmTR9zcgZIZkpe aINhZh2Q+5DivSFPwhWWGSu0mfQhLSF/gvf4yTxi+RhXtnZd6D/Vf40SqPu4COSWIQim 01EARDqQZLoKErYSQSQFaZKWdXkVG76lhRuAD4XdjtbPnJ+eHtsrTHecBZ0hr5AjDOsg V/TrSJ7FUHk61uMZKnYXu3MJj8AaijpvSSGaSUlPE7JhEGNjErIOR4VsYB0/FlzdW3y+ qzHKY1usFJn4Peyra/d/PZ/v17m+MGYjqL5s5PkmvNZWojWFEWQncX9wgG+9DPdZSYf2 YzGA== X-Gm-Message-State: AOJu0YxfA8VTBbglgaksYwxmPEvAebUguvU3P7J8NSQfexJLgz1uNkgn TngfDSvI3JC2YNUHAr/kXlQ= X-Google-Smtp-Source: AGHT+IFgl1be/hZeWP4yJbdiroqhm01VYXbNSKEn50xeY1C5Tc/vVDIi451lfLVqFug/63K3oboHSA== X-Received: by 2002:a05:6512:2029:b0:4fb:740a:81ae with SMTP id s9-20020a056512202900b004fb740a81aemr5613049lfs.16.1692696258484; Tue, 22 Aug 2023 02:24:18 -0700 (PDT) Received: from localhost.localdomain ([2a05:3580:f312:6c00:826c:ae47:61a7:8af8]) by smtp.gmail.com with ESMTPSA id j5-20020ac253a5000000b005007c6ea158sm1109372lfh.254.2023.08.22.02.24.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 02:24:17 -0700 (PDT) From: Andrey Skvortsov To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Kees Cook , Tony Luck , "Guilherme G. Piccoli" , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, Jarrah Gosbell , Arnaud Ferraris , Pavel Machek Cc: Andrey Skvortsov Subject: [PATCH v2] arm64: dts: pinephone: Add pstore support for PinePhone A64 Date: Tue, 22 Aug 2023 12:23:58 +0300 Message-Id: <20230822092358.309835-1-andrej.skvortzov@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230821160817.GA2227@bug> References: <20230821160817.GA2227@bug> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230822_022421_789484_E73BDD11 X-CRM114-Status: GOOD ( 15.42 ) 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 This patch reserves some memory in the DTS and sets up a pstore device tree node to enable pstore support. In general any DRAM address, that isn't overwritten during a boot is suitable for pstore. Range from 0x40000000 - 0x50000000 is heavily used by u-boot for internal use and to load kernel, fdt, fdto, scripts, pxefile and ramdisk later in the boot process. Ramdisk start address is 0x4FF00000, initramfs for kernel with some hacking features and debug info enabled can take more than 100Mb and final address will be around 0x58000000. Address 0x61000000 will most likely not overlap with that. Signed-off-by: Andrey Skvortsov --- Changes in v2: - Update commit description with information about why this base address is used. .../boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi index 87847116ab6d..84f9410b0b70 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi @@ -19,6 +19,22 @@ aliases { serial0 = &uart0; }; + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + pstore_mem: ramoops@61000000 { + compatible = "ramoops"; + reg = <0x61000000 0x100000>; + record-size = <0x20000>; + console-size = <0x20000>; + ftrace-size = <0x20000>; + pmsg-size = <0x20000>; + ecc-size = <16>; + }; + }; + backlight: backlight { compatible = "pwm-backlight"; pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>;