Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11779244ybi; Thu, 25 Jul 2019 23:22:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3eiEFzg1MrlMv2FkRoo1piDy00qeT5DHTMq3mQf9pOTCizoa2QVg6dH8105bmxfhDwEC5 X-Received: by 2002:a17:90a:ac0e:: with SMTP id o14mr67999723pjq.142.1564122143791; Thu, 25 Jul 2019 23:22:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564122143; cv=none; d=google.com; s=arc-20160816; b=BJJLorK6IJjZ/GUJq3hG/ds5GUgrlCxBjpH9Piqa8WD9I9AFG5iLeZfViIOxan+Bq1 fNc8TnJ9tXwZG3ozbJJHqYC0/LAVh+fji7S9Zuh34r9t+Wc2IXme+KR6mwsU0BV29vmp jKvAr1NZ5ylUpshI7PPjO7UNYsN4GwgW1etX8l1gXofYhCCslmSiTohOVNlmswOm8jsR zroTF2GM46XeMdTKmIquPBHAYLRXQZn0W3Gmc9cOnsSlNI2cj/KoxY95llg1I/2Erroy YN8QP8jR6LdfgfuDh+EBSwguT53u1UKZTJCNiuUp+Mr1mPdd5bsk9otC/ml8+gLkRVL8 nwYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=XV8QAkBH1jRuQe21XVlcsalz0Hnm68KrCgGCuCB2fA4=; b=RlrO5Lug+HKZhY4F10nhwL+S7EJ7tlAmKaiXI98WQOfFjWhO0g/75rBhCZKsLIXpyi ZMDL2rk15ytP3hsU6e6YXIeOnsI4bBay+Wmno+b01E20Ogoui3c/vbyv4p9C0Wu7wvjO 8dSZOay2H+av5muYdTMgeio4X174gMROXdhhMOIneiBDm1+w2SRqcWdErMmiNMxbBL0o i8gh362fKR9pmPtiTrYYmroepATJ9hE5aFnlPU2nrphBWyAl6/7INyeca94sSNxtb5GA KGIKuzihun501JBL1OOO8dxlzuFldpDbHzBQYAVHp1ETfMUBIWF2/1peeusGnhgPd1+A RMnw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q10si5923905pff.223.2019.07.25.23.22.08; Thu, 25 Jul 2019 23:22:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726082AbfGZGVc (ORCPT + 99 others); Fri, 26 Jul 2019 02:21:32 -0400 Received: from host-88-217-225-28.customer.m-online.net ([88.217.225.28]:65147 "EHLO mail.dev.tdt.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725869AbfGZGVb (ORCPT ); Fri, 26 Jul 2019 02:21:31 -0400 Received: from feckert01.dev.tdt.de (unknown [10.2.3.40]) by mail.dev.tdt.de (Postfix) with ESMTPSA id 22E5A21602; Fri, 26 Jul 2019 06:21:29 +0000 (UTC) From: Florian Eckert To: Eckert.Florian@googlemail.com, info@metux.net, dvhart@infradead.org, andy@infradead.org Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Florian Eckert Subject: [PATCH v2 1/1] platform/x86/pcengines-apuv2: add mpcie reset gpio export Date: Fri, 26 Jul 2019 08:21:15 +0200 Message-Id: <20190726062115.16231-1-fe@dev.tdt.de> X-Mailer: git-send-email 2.11.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.dev.tdt.de Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On APUx we have also mpcie2/mpcie3 reset pins. To make it possible to reset the ports from the userspace, add the definition to this platform device. The gpio can then be exported by the legancy gpio subsystem to toggle the mpcie reset pin. Signed-off-by: Florian Eckert --- v2: Noting changed for this patch. Only resend because other patches of the series where dropped or updated and resend by other people drivers/platform/x86/pcengines-apuv2.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/platform/x86/pcengines-apuv2.c b/drivers/platform/x86/pcengines-apuv2.c index c1ca931e1fab..f6d8ed100cab 100644 --- a/drivers/platform/x86/pcengines-apuv2.c +++ b/drivers/platform/x86/pcengines-apuv2.c @@ -32,6 +32,8 @@ #define APU2_GPIO_REG_LED3 AMD_FCH_GPIO_REG_GPIO59_DEVSLP1 #define APU2_GPIO_REG_MODESW AMD_FCH_GPIO_REG_GPIO32_GE1 #define APU2_GPIO_REG_SIMSWAP AMD_FCH_GPIO_REG_GPIO33_GE2 +#define APU2_GPIO_REG_MPCIE2 AMD_FCH_GPIO_REG_GPIO59_DEVSLP0 +#define APU2_GPIO_REG_MPCIE3 AMD_FCH_GPIO_REG_GPIO51 /* order in which the gpio lines are defined in the register list */ #define APU2_GPIO_LINE_LED1 0 @@ -39,6 +41,8 @@ #define APU2_GPIO_LINE_LED3 2 #define APU2_GPIO_LINE_MODESW 3 #define APU2_GPIO_LINE_SIMSWAP 4 +#define APU2_GPIO_LINE_MPCIE2 5 +#define APU2_GPIO_LINE_MPCIE3 6 /* gpio device */ @@ -48,6 +52,8 @@ static int apu2_gpio_regs[] = { [APU2_GPIO_LINE_LED3] = APU2_GPIO_REG_LED3, [APU2_GPIO_LINE_MODESW] = APU2_GPIO_REG_MODESW, [APU2_GPIO_LINE_SIMSWAP] = APU2_GPIO_REG_SIMSWAP, + [APU2_GPIO_LINE_MPCIE2] = APU2_GPIO_REG_MPCIE2, + [APU2_GPIO_LINE_MPCIE3] = APU2_GPIO_REG_MPCIE3, }; static const char * const apu2_gpio_names[] = { @@ -56,6 +62,8 @@ static const char * const apu2_gpio_names[] = { [APU2_GPIO_LINE_LED3] = "front-led3", [APU2_GPIO_LINE_MODESW] = "front-button", [APU2_GPIO_LINE_SIMSWAP] = "simswap", + [APU2_GPIO_LINE_MPCIE2] = "mpcie2_reset", + [APU2_GPIO_LINE_MPCIE3] = "mpcie3_reset", }; static const struct amd_fch_gpio_pdata board_apu2 = { -- 2.11.0