Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7155262ybi; Mon, 22 Jul 2019 08:02:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqxBYuKq7sCpdpWYdU+sTrgF2H0SoRoxPq9iwNOaP5q0zzq3rsyVnL71Nyx1u7ldQsaqUyJ1 X-Received: by 2002:aa7:8a0c:: with SMTP id m12mr712533pfa.2.1563807721624; Mon, 22 Jul 2019 08:02:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563807721; cv=none; d=google.com; s=arc-20160816; b=ofUU+GNZE2dwJ8J4icHty1wtgXAxjum7yeRXiYcTyKWJZoGPrJ9lEHSXVKD1MKNyx8 E/Qi76fVOfvuxrK42gJgiwo68nOE+CY2HEju20Dy4Av8OaQD43Ugw0HWbOueum02pBYs Bhitb6AmnOCS2zP6118LQPPWMicMCFNgRuNsRpx11x1RAhjYcWqJ+YpF8/0EXJHWW92I 2n9a17NcMVerZqDSFVmqwCC9VEOfrTLbnqe9HM1zQ8Zujzr40HRFzrGy/L3WqhyE9zkW 2y0y1po+k7VicoxxqzLK/Is23qCqUPGBalW+zwSaPbFds2ixXXOohV/9MEJTn++Ez4Vc SSBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=tmc467ySVsAxV3ZGzUjpWuz3HPR1RFDg1iUy0HkxVoA=; b=LCb+GUWDbHk1SZJon1dW18AViHhFszCXSKOyrhFoX+yxUP4vhkPem/AJ1RCG1AbQYo Hdvz7Cgyne0IkBtNktRnnm9UaaP4udgu3/NNPgClmQ1jyOKBV2+iKuv9h5tWAGKP+fD2 qQPBXfTGm6h4XMkF+NXgD9GcLV3SGlt0qsKPt55qg63jT1jMn/9v70Pu83FVOlOaDyuq QFVP2pQ2yH6lBdcATGeNLrL58CxD/WcCcWlMeIqkLv80U+1lPxQyVXeNNGH0pYFXbxwW rRRQ1VTlqVJngCdghiHOZ57dUzepyreJHYckk/ia1fgFZ0gJsXcljYT1MD8ihYnQim9I /zXA== 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 q13si9820549pjb.13.2019.07.22.08.01.45; Mon, 22 Jul 2019 08:02:01 -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 S1728798AbfGVLZb (ORCPT + 99 others); Mon, 22 Jul 2019 07:25:31 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:48423 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727848AbfGVLZb (ORCPT ); Mon, 22 Jul 2019 07:25:31 -0400 Received: from [192.168.1.110] ([77.2.59.209]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N8oKc-1iSW6V1Zd0-015oaD; Mon, 22 Jul 2019 13:25:25 +0200 Subject: Re: [PATCH 1/3] platform/x86/pcengines-apuv2: add mpcie reset gpio export To: Florian Eckert , 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 References: <20190704090205.19400-1-fe@dev.tdt.de> <20190704090205.19400-2-fe@dev.tdt.de> From: "Enrico Weigelt, metux IT consult" Organization: metux IT consult Message-ID: Date: Mon, 22 Jul 2019 13:25:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190704090205.19400-2-fe@dev.tdt.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:G92V9GI9odCx+apJy+6WJt8ElyhYVx670ohdqwCGQ7eByjdizIr IbRTm55fQ27qV4KCQYmVXEgfdIBtbJIBp6jxkpzpFfdaVQw0dITA6frvxs/F9fPSB6u481X jLmpT/jf0A9kXrU1APyw4jHpB8JxjLxEhyTNI9AA1qLqhYdLHqGr6gTxe7CiawBmzEZQPQW /Wz8UbMGYtjm9HjtMnbxA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Y2AOQk1AiLU=:xjLWTxiHZc0n2H2zRbEK2G 5nbCqAGK/WPU7AAoIX1tmv7V5Gid5DmJN7N13A6WrLENLPGw3Kn8872Pp9Ae6a7nWyVWv+jZz XduT71bo6p8vuEUrGslZwy/yRzLYdgE/0wo0COIDwhyCcOUfYnAg4hlTOJfm8piyzNesGD3Q0 V+6t/z/Bhcd5iQnaEAUQ94fPTp+YmL3eEX1m0RMEGwgrSyGIRpdS6t6U7/9tqQIWEL9CUnPad V0tWlOj+JOOVFf/QSp5aLk910EhLQ6lkzJlCrOmKqBxAaDP/HU/J5fQ8LA+31XLJ6UfCA628K XjcOcD0f4rKOPOS34eG6yMVVoe+wpxk7K7kRNX3SGayBNR+FDb3ke4PYHQVHSNwaj0ObZZ1E4 2MaHYrTUEKjrGR5Z0YTPNHH6er2TTO4WAcRNVLxC+yZHwLmD+4hsqDsOrWSSSp8qtbwNVU4gt trhES5j1pr7KrlLqejDJWl5RzimB1cBKT2FonFPG87szdfgWWKYtigJ4FaL0rfdKq78X6C4eH 4eGzv1CcuxjhAgCgOBRBcG3TiAweBbui5I3EWP73HnWo5rhTufk7pBGRpuXR3O+ld9psWtn5f DQJ4IEEZbnCgyQS9sr/2P1vf9K82LrxxzcWtD6oFKcCJOdAxnchpbvWMJ0xgILBJZVBNANf96 O3oLyYYtJNDriIW+JFmNlyzsdbL+YZSryWWriXmOkJJTiYTP+81eGjaQYQB4BUgtxNbZqJ4p1 Hu/iXAb5lrEqznaPfTk6mP1rNn35HB20zdJx+xfe4eFTFh6r8P9A1Qyz58g= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04.07.19 11:02, Florian Eckert wrote: > 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 > --- > 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 = { > Acked-by: Enrico Weigelt But note that these gpio's later will be bound to an appropriate driver. I've got a patch in the queue that uses LED subsystem, but haven't sorted out whether it's better to go via reset subsystem (and add a gpio-based reset driver first). --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering info@metux.net -- +49-151-27565287