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 2415BC43334 for ; Tue, 14 Jun 2022 12:05:28 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 17537840D8; Tue, 14 Jun 2022 14:05:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.b="NOck1hYn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5633C84211; Tue, 14 Jun 2022 14:05:24 +0200 (CEST) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 6B52883F40 for ; Tue, 14 Jun 2022 14:05:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Eugen.Hristev@microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1655208321; x=1686744321; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=IMpttytGzywWbRFoQrRTICrXZEXFuJsKMo9ssbHhmEE=; b=NOck1hYnpHBRh2yPpoiG/WktfX7eOBUE1/B5uHU7xiX15K1BbwC/A35f 7WqTrLPcm1IzXa36cjYqZi+MSPXgXhLcDv+FsUqseCfXOgOi0gRilNEP4 yHehnh0kg6o71obqsObJnGqg30aLjYMgOx/3bTdbv5Es3/BKTQSa3JeMg ahKC86tLEbhie9fUYMrTdPJsEYiCbKJ+EmIfxw3WSPaX80saWeR2tSRCU 4u4OX/hWZcV+pZMXpw928E6h7I2yyv280LG6vL/XzZEtgCpUKBA6aBMM9 sJ2xWdIjZKq/d8CBjjjFb+ubCsgFiyseQiip/UACgxaswlHLEqx1lZ3hS Q==; X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="168037742" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 14 Jun 2022 05:05:18 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 14 Jun 2022 05:05:18 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 14 Jun 2022 05:05:16 -0700 From: Eugen Hristev To: CC: , Mihai Sain Subject: [PATCH] gpio: atmel_pio4: add support for PIO_PORTE on sama7g5 Date: Tue, 14 Jun 2022 15:05:12 +0300 Message-ID: <20220614120512.14721-1-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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.5 at phobos.denx.de X-Virus-Status: Clean From: Mihai Sain Add support for gpio PORT E on sama7g5 soc. Signed-off-by: Mihai Sain --- arch/arm/mach-at91/include/mach/atmel_pio4.h | 1 + drivers/gpio/atmel_pio4.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/arch/arm/mach-at91/include/mach/atmel_pio4.h b/arch/arm/mach-at91/include/mach/atmel_pio4.h index c3bd9140df..b712be8051 100644 --- a/arch/arm/mach-at91/include/mach/atmel_pio4.h +++ b/arch/arm/mach-at91/include/mach/atmel_pio4.h @@ -74,6 +74,7 @@ struct atmel_pio4_port { #define AT91_PIO_PORTB 0x1 #define AT91_PIO_PORTC 0x2 #define AT91_PIO_PORTD 0x3 +#define AT91_PIO_PORTE 0x4 int atmel_pio4_set_gpio(u32 port, u32 pin, u32 config); int atmel_pio4_set_a_periph(u32 port, u32 pin, u32 config); diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c index bea609db9d..77a76c1d50 100644 --- a/drivers/gpio/atmel_pio4.c +++ b/drivers/gpio/atmel_pio4.c @@ -36,6 +36,11 @@ static struct atmel_pio4_port *atmel_pio4_port_base(u32 port) case AT91_PIO_PORTD: base = (struct atmel_pio4_port *)ATMEL_BASE_PIOD; break; +#if (ATMEL_PIO_PORTS > 4) + case AT91_PIO_PORTE: + base = (struct atmel_pio4_port *)ATMEL_BASE_PIOE; + break; +#endif default: printf("Error: Atmel PIO4: Failed to get PIO base of port#%d!\n", port); -- 2.25.1