From mboxrd@z Thu Jan 1 00:00:00 1970 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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2EB91C433F5 for ; Fri, 14 Jan 2022 19:28:11 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 327A283420; Fri, 14 Jan 2022 20:28:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="pVnC/Uh3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 767CC8344C; Fri, 14 Jan 2022 20:28:07 +0100 (CET) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (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 E07518341A for ; Fri, 14 Jan 2022 20:28:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=nm@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 20EJRprd070052; Fri, 14 Jan 2022 13:27:51 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1642188471; bh=XyugFEImldvfW9EHnOB1uHjDNKGHK6p9MWkiL3bmy7Y=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=pVnC/Uh3SXdT366SKkFQ8wU0ixVlPeMoou5Wz/5tjPDVBjoJJejH16qX3iJy/FfGQ dEGJ3+/6xL6fRCs2g7gJEGyIDQTrnAxM0FwNB0nHieZqmvSBzMlf7rrekdvnuNGiRv l/jK7PirGHDEyogZa55lOURPkLbQnxSNJu1sVljQ= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 20EJRp68086738 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 14 Jan 2022 13:27:51 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Fri, 14 Jan 2022 13:27:51 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Fri, 14 Jan 2022 13:27:50 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 20EJRoqQ046039; Fri, 14 Jan 2022 13:27:50 -0600 Date: Fri, 14 Jan 2022 13:27:50 -0600 From: Nishanth Menon To: Christian Gmeiner , Tom Rini CC: , Michael Liebert , Dave Gerlach , Aswath Govindraju , Keerthy Subject: Re: [PATCH] arm: mach-k3: am642_init: Unlock MCU PADCFG regs Message-ID: <20220114192645.ccw54dfwr3prxyva@repeal> References: <20211215151430.102388-1-christian.gmeiner@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20211215151430.102388-1-christian.gmeiner@gmail.com> User-Agent: NeoMutt/20171215 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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.2 at phobos.denx.de X-Virus-Status: Clean On 16:14-20211215, Christian Gmeiner wrote: > From: Michael Liebert > > Currently only the PADCFG registers of the main domain are unlocked. > Also unlock PADCFG registers of MCU domain, so MCU pin muxing can be configured by u-boot or Linux. > > Signed-off-by: Michael Liebert > Tested-by: Christian Gmeiner > --- > arch/arm/mach-k3/am642_init.c | 3 +++ > arch/arm/mach-k3/include/mach/am64_hardware.h | 2 ++ > 2 files changed, 5 insertions(+) > > diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c > index 533905daeb..958fa05af4 100644 > --- a/arch/arm/mach-k3/am642_init.c > +++ b/arch/arm/mach-k3/am642_init.c > @@ -37,6 +37,9 @@ static void ctrl_mmr_unlock(void) > mmr_unlock(CTRL_MMR0_BASE, 3); > mmr_unlock(CTRL_MMR0_BASE, 5); > mmr_unlock(CTRL_MMR0_BASE, 6); > + > + /* Unlock all MCU_PADCFG_MMR1 module registers */ > + mmr_unlock(MCU_PADCFG_MMR1_BASE, 1); > } > > /* > diff --git a/arch/arm/mach-k3/include/mach/am64_hardware.h b/arch/arm/mach-k3/include/mach/am64_hardware.h > index 96383437d5..e06e1f9532 100644 > --- a/arch/arm/mach-k3/include/mach/am64_hardware.h > +++ b/arch/arm/mach-k3/include/mach/am64_hardware.h > @@ -12,6 +12,8 @@ > > #define PADCFG_MMR1_BASE 0xf0000 > > +#define MCU_PADCFG_MMR1_BASE 0x04080000 > + > #define MAIN_DEVSTAT_PRIMARY_BOOTMODE_MASK 0x00000078 > #define MAIN_DEVSTAT_PRIMARY_BOOTMODE_SHIFT 3 > Acked-by: Nishanth Menon -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D