From patchwork Thu Sep 16 08:52:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ChiaWei Wang X-Patchwork-Id: 512920 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp1012076jao; Thu, 16 Sep 2021 01:59:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqUq3cFqeuxWbA5st+7HIL3PnPO2V0BABWnCa6vhA6LGUQk117woYfx5FPwaTzsdzHoYsr X-Received: by 2002:a17:906:b1d5:: with SMTP id bv21mr4988316ejb.346.1631782772576; Thu, 16 Sep 2021 01:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631782772; cv=none; d=google.com; s=arc-20160816; b=NJ0fX2VKZCcjCCeY7afyHEaGUOtq9q4ed70OVDc4DtLyr+yj69IETgxlo45+oTUrWt esOarcID2UeGrfE8C2c83LB0W74b+3zo6UnWs3tye6jiyd4Ioxgo4PYul+Cu49q5zvb6 /+7vT99EoIz6GdSRafHf5IDP47TcqPydNyjaYXs5wB8PgBLpxg/plCTCwq8uLQs2OZ+p NsbI9OknHREB3yJgaXPA1EjlDdHe7NxDvNoG1m3wveaJdOd2RV5Wazw6PlCNWxqvdwK9 +SpOham5Z6ryxP7svPa0DOeicEbgoXuuynWPPzwXRzE0grVOpibYgTIWmzwnZhIHpVWK xhlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=WIzbJ1F4j4niM9YHvIakuiMIjGj9mROphRB55ASHg5U=; b=QsiKCeUkuBU4otz7KHhxO3Eo/XjY2q6zo/MbgmqrpJyUvmgO1nW5pG++MWcaX16dWw Enqd+gVMF0KXu9bLRalCVmOrq4iG73efz1zM5M3wrPVYxcnJNcoSC6pwDfhEZtK2etJz AzhgpRss4JD0ZQoQ7ByLFaqcTCi6hIpF1m28YJ9JUlC8wLuV7C95iv7330gJF9Ndurrm tYYiS1721u/6QZzAwS0v4o4tv6jl4k7bV7TJfvNfLU7gPH08DCbpTK9LqlKIwiHXis+l 34saswy1FpS5/4I1k9PJJSxUPw3WFEMSJuo3y6FSqiGTeAtZv7QGcYthDLcYx9AwsWTv Lifw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id y4si3266410edm.320.2021.09.16.01.59.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 01:59:32 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 58C4B8312C; Thu, 16 Sep 2021 10:59:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id B6B558312C; Thu, 16 Sep 2021 10:53:03 +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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) (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 E03D58317A for ; Thu, 16 Sep 2021 10:52:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=chiawei_wang@aspeedtech.com Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 18G8WNv7006328; Thu, 16 Sep 2021 16:32:23 +0800 (GMT-8) (envelope-from chiawei_wang@aspeedtech.com) Received: from ChiaWeiWang-PC.aspeed.com (192.168.2.66) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 16 Sep 2021 16:52:20 +0800 From: Chia-Wei Wang To: , , , CC: , , Subject: [PATCH next v4 02/11] clk: ast2600: Add YCLK control for HACE Date: Thu, 16 Sep 2021 16:52:12 +0800 Message-ID: <20210916085221.6388-3-chiawei_wang@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210916085221.6388-1-chiawei_wang@aspeedtech.com> References: <20210916085221.6388-1-chiawei_wang@aspeedtech.com> MIME-Version: 1.0 X-Originating-IP: [192.168.2.66] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 18G8WNv7006328 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean From: Joel Stanley Add YCLK enable for HACE, the HW hash engine of ASPEED AST2600 SoCs. Signed-off-by: Joel Stanley Signed-off-by: Chia-Wei Wang --- .../arm/include/asm/arch-aspeed/scu_ast2600.h | 5 +++-- drivers/clk/aspeed/clk_ast2600.c | 20 +++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/arch/arm/include/asm/arch-aspeed/scu_ast2600.h b/arch/arm/include/asm/arch-aspeed/scu_ast2600.h index a205fb1f76..d7b500f656 100644 --- a/arch/arm/include/asm/arch-aspeed/scu_ast2600.h +++ b/arch/arm/include/asm/arch-aspeed/scu_ast2600.h @@ -10,8 +10,9 @@ #define SCU_CLKGATE1_EMMC BIT(27) #define SCU_CLKGATE1_MAC2 BIT(21) #define SCU_CLKGATE1_MAC1 BIT(20) -#define SCU_CLKGATE1_USB_HUB BIT(14) -#define SCU_CLKGATE1_USB_HOST2 BIT(7) +#define SCU_CLKGATE1_USB_HUB BIT(14) +#define SCU_CLKGATE1_HACE BIT(13) +#define SCU_CLKGATE1_USB_HOST2 BIT(7) #define SCU_CLKGATE2_FSI BIT(30) #define SCU_CLKGATE2_MAC4 BIT(21) diff --git a/drivers/clk/aspeed/clk_ast2600.c b/drivers/clk/aspeed/clk_ast2600.c index 3a92739f5c..69128fd3c4 100644 --- a/drivers/clk/aspeed/clk_ast2600.c +++ b/drivers/clk/aspeed/clk_ast2600.c @@ -1013,6 +1013,23 @@ static ulong ast2600_enable_usbbhclk(struct ast2600_scu *scu) return 0; } +static ulong ast2600_enable_haceclk(struct ast2600_scu *scu) +{ + uint32_t reset_bit; + uint32_t clkgate_bit; + + reset_bit = BIT(ASPEED_RESET_HACE); + clkgate_bit = SCU_CLKGATE1_HACE; + + writel(reset_bit, &scu->modrst_ctrl1); + udelay(100); + writel(clkgate_bit, &scu->clkgate_clr1); + mdelay(20); + writel(reset_bit, &scu->modrst_clr1); + + return 0; +} + static int ast2600_clk_enable(struct clk *clk) { struct ast2600_clk_priv *priv = dev_get_priv(clk->dev); @@ -1051,6 +1068,9 @@ static int ast2600_clk_enable(struct clk *clk) case ASPEED_CLK_GATE_USBPORT2CLK: ast2600_enable_usbbhclk(priv->scu); break; + case ASPEED_CLK_GATE_YCLK: + ast2600_enable_haceclk(priv->scu); + break; default: pr_err("can't enable clk\n"); return -ENOENT; From patchwork Thu Sep 16 08:52:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ChiaWei Wang X-Patchwork-Id: 512916 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp1009101jao; Thu, 16 Sep 2021 01:53:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZiQEifak4wwVP/79U+TLIVYTOCUdiSZ1wNzc8fCX7NhjTe6ywzLaUbK+RnLPtZb+KkM9Q X-Received: by 2002:a05:6402:493:: with SMTP id k19mr5351076edv.386.1631782417795; Thu, 16 Sep 2021 01:53:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631782417; cv=none; d=google.com; s=arc-20160816; b=NmsZ5trK3TePuxcJESd7H629w4vcEC+wXiFQIZFOkbCickz3IH5q/k7jb+aUQJ7oOm l/PaSzXy9j9Te/Zf1Hk96yWyb2DlgFl+3rKMJGHW6ibbvOaj5QMNsG520/Bj37O+qblK LKtJ48H5PKnp/Bqa+YJmBzYVrZg2rTtXKRc1MKFMqLHniHLZ15w0HtWTKVS/Rz/Ojh2D lSRRoygPSQtztveO+J8WSx1/B5fwjKcys74siLkISM5RS3NB5BgjFz+u9DZl9A2Ngevs /emPjsD/PP9i2LwpAP5wQV5cqPhCUAKKXPRzlm7RKYQhh4qVVEF0xiReJckLMiZXw4a4 sHWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=qt2puGHybWP8iTVicF6ZmWP3UaJlQB/6E9qOBtG28+8=; b=Rx+dzTxDmlm8eVdhwJsIZxEVjMUqepy/RS2u0ay2CFJFszZ+mL8b31h+lMKivLh6Mn Vw3JBRCEYD8d8KF5McHPjmIXqRenpSHfl4LNwq8Xq7xv6IVYFakTrrdJtJW27zqu0zea sdUW0SHpF8JAUYC3JUgG62vokr9PwdawiytLcMVR+5xVrPbka5T3KZ8iFTgJ8mZJmHaa 4Hp4i6WZ0P7MHl4LZRRrU3O9ig/wzlgUqLCeaUQeFbeun/B/mm0mEOCc3eaM1UikG0kt 50IZIi5WIfhqj7nBS6bgu5QgdF22U0RgG0riEKOmPbQfrDfod3u3fSGe7kTLoAr9U9RE QI8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id g5si3390846ejo.390.2021.09.16.01.53.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 01:53:37 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 06A47831ED; Thu, 16 Sep 2021 10:53:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id C0FC582F4D; Thu, 16 Sep 2021 10:53:09 +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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) (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 46266831D6 for ; Thu, 16 Sep 2021 10:52:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=chiawei_wang@aspeedtech.com Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 18G8WN2o006329; Thu, 16 Sep 2021 16:32:23 +0800 (GMT-8) (envelope-from chiawei_wang@aspeedtech.com) Received: from ChiaWeiWang-PC.aspeed.com (192.168.2.66) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 16 Sep 2021 16:52:20 +0800 From: Chia-Wei Wang To: , , , CC: , , Subject: [PATCH next v4 04/11] ARM: dts: ast2600: Add HACE to device tree Date: Thu, 16 Sep 2021 16:52:14 +0800 Message-ID: <20210916085221.6388-5-chiawei_wang@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210916085221.6388-1-chiawei_wang@aspeedtech.com> References: <20210916085221.6388-1-chiawei_wang@aspeedtech.com> MIME-Version: 1.0 X-Originating-IP: [192.168.2.66] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 18G8WN2o006329 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean From: Joel Stanley Add HACE DTS node and enable it for AST2600 EVB. Signed-off-by: Joel Stanley Signed-off-by: Chia-Wei Wang --- arch/arm/dts/ast2600-evb.dts | 5 +++++ arch/arm/dts/ast2600.dtsi | 8 ++++++++ 2 files changed, 13 insertions(+) -- 2.17.1 diff --git a/arch/arm/dts/ast2600-evb.dts b/arch/arm/dts/ast2600-evb.dts index 2abd31341c..adb80a30ef 100644 --- a/arch/arm/dts/ast2600-evb.dts +++ b/arch/arm/dts/ast2600-evb.dts @@ -177,3 +177,8 @@ 0x08 0x04 0x08 0x04>; }; + +&hace { + u-boot,dm-pre-reloc; + status = "okay"; +}; diff --git a/arch/arm/dts/ast2600.dtsi b/arch/arm/dts/ast2600.dtsi index ac0f08b7ea..642206fb77 100644 --- a/arch/arm/dts/ast2600.dtsi +++ b/arch/arm/dts/ast2600.dtsi @@ -187,6 +187,14 @@ }; }; + hace: hace@1e6d0000 { + compatible = "aspeed,ast2600-hace"; + reg = <0x1e6d0000 0x200>; + interrupts = ; + clocks = <&scu ASPEED_CLK_GATE_YCLK>; + status = "disabled"; + }; + edac: sdram@1e6e0000 { compatible = "aspeed,ast2600-sdram-edac"; reg = <0x1e6e0000 0x174>;