From patchwork Fri Mar 6 20:52:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1250625 X-Patchwork-Delegate: simon.k.r.goldschmidt@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=PpzyH0oI; 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Z0FK3t25z9sPJ for ; Sat, 7 Mar 2020 07:53:09 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 066A9802DB; Fri, 6 Mar 2020 21:52:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1583527955; bh=HQqzLMQPIdCc8GAzCFDZHCix1WdAlMQFioZom4BpEb4=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=PpzyH0oIET3VJ1T7xQ+IhCbkquZiGfa1Wp5fPCw0BSs4p1E1dt/r0LzUQDRovWdQa s96LZN2Sw42CUIzgcgNPfbi6O+Jer77DcD/3lPhMR+p9ld8bTHRa0O5XDvBT8PLIb9 e0EgCvg5epKe4LfAS3oK6fs7qczPpmqz6W0LCqcre7PiBz4/FBupBmPe2GxT0DzSm/ Ol+OmovCsF+PEDg0butZgtl6bgzOhXW8zkNtX1BhfkeCp2JwoHRkWbm0mEEbp6Tqax k5bZtmND6OLuUMuCOAKLNIdEgkWN9DjA2eFGVtQz2DVom5uHZZ6/K7r/tYIjTu1p9w cZZ9+AmmizQ6w== Received: by phobos.denx.de (Postfix, from userid 109) id 1568A804CD; Fri, 6 Mar 2020 21:52:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9D5F3801F1 for ; Fri, 6 Mar 2020 21:52:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marex@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 48Z0DZ2Tt8z1s2lq; Fri, 6 Mar 2020 21:52:30 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 48Z0DZ27P5z1qs9V; Fri, 6 Mar 2020 21:52:30 +0100 (CET) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 62AUxhNAdkIx; Fri, 6 Mar 2020 21:52:29 +0100 (CET) X-Auth-Info: 1d7dCsxuYWz7z4lhs4ZVFJxK2qi8s6+TRyOkNBISM6g= Received: from desktop.lan (ip-86-49-35-8.net.upcbroadband.cz [86.49.35.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 6 Mar 2020 21:52:29 +0100 (CET) From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Ley Foon Tan , Simon Goldschmidt Subject: [PATCH] ARM: socfpga: Enable DM RTC bootcount on ABB SECU1 Date: Fri, 6 Mar 2020 21:52:21 +0100 Message-Id: <20200306205221.64130-1-marex@denx.de> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.102.2 at phobos.denx.de X-Virus-Status: Clean Add and enable RTC-backed boot counter on ABB SECU1 platform. Signed-off-by: Marek Vasut Cc: Ley Foon Tan Cc: Simon Goldschmidt Reviewed-by: Ley Foon Tan --- arch/arm/dts/socfpga_arria5_secu1.dts | 6 ++++++ configs/socfpga_secu1_defconfig | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/arch/arm/dts/socfpga_arria5_secu1.dts b/arch/arm/dts/socfpga_arria5_secu1.dts index dadf766682..820e29ad6d 100644 --- a/arch/arm/dts/socfpga_arria5_secu1.dts +++ b/arch/arm/dts/socfpga_arria5_secu1.dts @@ -31,6 +31,12 @@ spi0 = &spi1; }; + bootcount@0 { + compatible = "u-boot,bootcount-rtc"; + rtc = <&rtc>; + offset = <0x9e>; + }; + i2c_gpio: i2c@0 { compatible = "i2c-gpio"; #address-cells = <1>; diff --git a/configs/socfpga_secu1_defconfig b/configs/socfpga_secu1_defconfig index 230959ec86..fcb38f1a41 100644 --- a/configs/socfpga_secu1_defconfig +++ b/configs/socfpga_secu1_defconfig @@ -48,6 +48,9 @@ CONFIG_ENV_IS_IN_NAND=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SPL_DM_SEQ_ALIAS=y # CONFIG_SPL_BLK is not set +CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_DM_BOOTCOUNT=y +CONFIG_DM_BOOTCOUNT_RTC=y CONFIG_DWAPB_GPIO=y CONFIG_DM_I2C=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y @@ -76,6 +79,8 @@ CONFIG_PHY_GIGE=y CONFIG_ETH_DESIGNWARE=y CONFIG_MII=y CONFIG_DM_RESET=y +CONFIG_DM_RTC=y +CONFIG_RTC_M41T62=y CONFIG_SPI=y CONFIG_SPI_MEM=y CONFIG_DESIGNWARE_SPI=y