Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1815543imm; Sat, 4 Aug 2018 11:23:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeY++5CDS5jA8MKa5lMmW9EUwmZo/hvmmmmctT5waS6pcWe1Tf143o3JAzN0Qkk02P24eSO X-Received: by 2002:a62:464f:: with SMTP id t76-v6mr10060370pfa.118.1533407039159; Sat, 04 Aug 2018 11:23:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533407039; cv=none; d=google.com; s=arc-20160816; b=QrZa9UjBWjy77ER4rLodlnTIFGMafateGQKSzhcPVvnslfqMVwQrblzBaVTRrq2XeG XeJcAUkf2LBWL+bj8rKUvQag/kOg6NfZhUM0iDCMqaHHkeYoMgZdmm0/6Mvu1dyua/8B WhYwhQHPnvQ4DGz2b9ggX7lHPcP+d7ox6hNajkW5zhUMJxb2iKUIUsFLCXFCcQ4Bi7o/ 6ELucVz/xt9wY9Q3Ve6xLa7WxwqFvqLI6l3MLm92pcUXnD0t34Bwrobp3gUT2rKkj1z5 bhhuXsO4fRmY1PXWIncANt9cxAeJGRXM6+sc//LRqIr4AJsf2YAGzeG20+L0UlmCdPma dHLw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=oFFI0EISTPJdVf0+8pY3UPl0OPXEx7SkUOMOEODVh0Q=; b=sPdwt7UuCW7zFlGTeh1WboF0lmlKtH9xn5IJsCSf1PjfrYaA46WP3tDu7NRklyZ4gP /rrp5EebEhtIBKrw9LNPKeLANEf0nEC4v7BCj4HYWURjyA1WQIG+oqIrQZa9aUOMrF4j FWrQOIIhy9BUB0uVrk9S/BKWifTfwDtF/HuuPg8YBI4REQ5PKrPLKeGZqyGCHu8AVkTB PJk15hMp1uHdWeWb+TWSAbtM4mqZNs1OBaxgASFE79zYNpDwAkQobeqaAP5kzqJi1iYz bM13TrcVoZjnEqHyrBDP2rvWwVC8AvLnHNQVGMTylKZNNLn9SgRZ6NsqmZaNDUxh3wrK RO/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KJ8vyTGk; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a4-v6si8690565pgl.9.2018.08.04.11.23.44; Sat, 04 Aug 2018 11:23:59 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KJ8vyTGk; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729600AbeHDUXz (ORCPT + 99 others); Sat, 4 Aug 2018 16:23:55 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:35286 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728054AbeHDUXz (ORCPT ); Sat, 4 Aug 2018 16:23:55 -0400 Received: by mail-wr1-f65.google.com with SMTP id g1-v6so4936372wru.2; Sat, 04 Aug 2018 11:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oFFI0EISTPJdVf0+8pY3UPl0OPXEx7SkUOMOEODVh0Q=; b=KJ8vyTGkhoH7eUNCPEdo82+/LOA4qWmY6WkTP3/seeCF0uxO4avIFomW1Jk34YlwWL xw+DnPyA/xBGtHnpCIauq5lNHrCFLeXEQ3IiURrQIbpdLZvGxZg8YGRkaJhj8Q3Mh+59 6l+wo31a6QtSp4H3GJzEPgUd33M3Um/vIjjBTBfEg3lVUB7QWjbF446KawIehznxSRNy 044BOMoidmt+17q02hzDhx4k/YI5SzLaWnYmUQ8rIcB2Ury18BBMbXPSdYLN9UtmFfMs 5a1MWRkaIIavJ8H8ye1X6feZ3ASzDFIi+8rqOy8nzed2Sw4ukjs7HTmM2XRpR+dp+hkn edmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oFFI0EISTPJdVf0+8pY3UPl0OPXEx7SkUOMOEODVh0Q=; b=SQYGWe6wIqZS6U7h7GsgLi3DobSx1B81k5vGaQzzS9nf2RQjL18+Ehgna25MjH/BiI gZDbnY2FjFSqDWUf8MwsdMx8af2TGZJjqboILtbHbRBCjbUERQ9VAVc4fGTdzsg+R4dU ZjXYRWTeZ3eaYUiT8wkxLsvDMSL7zPgLvKZoEuct8m0EZyMRM43muMmxzvYpV5jMWtKV UA1T4ePi5CN/V51jYYDwHCNzAo3tZdB6sfW/OVDMy6k/ydg62IKmYMOBZ65ik1huRjqX rM9ZgotjvVewWUnmLyGDT5RnvDACa2Ca41Fr2VqLid08T62Ho0ShVrpc2tPS+A3eYlqo QcaQ== X-Gm-Message-State: AOUpUlGZXwQWZAL8L6F1j4CwlRwPGhWKMfVMo5T30GzTaOmeFhifxzGA AdnhKlFytOLKrK2JLg/bBBIerW3G X-Received: by 2002:adf:8481:: with SMTP id 1-v6mr5785088wrg.34.1533406942666; Sat, 04 Aug 2018 11:22:22 -0700 (PDT) Received: from debian64.daheim (p4FD09136.dip0.t-ipconnect.de. [79.208.145.54]) by smtp.gmail.com with ESMTPSA id v5-v6sm5795798wru.60.2018.08.04.11.22.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 Aug 2018 11:22:21 -0700 (PDT) Received: from localhost.daheim ([127.0.0.1] helo=debian64.localnet) by debian64.daheim with esmtp (Exim 4.91) (envelope-from ) id 1fm1C0-0003hH-Oz; Sat, 04 Aug 2018 20:22:20 +0200 From: Christian Lamparter To: Linus Walleij Cc: fe@dev.tdt.de, Andy Shevchenko , Mika Westerberg , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] gpio: Add driver for PC Engines APU2/APU3 GPIOs Date: Sat, 04 Aug 2018 20:22:20 +0200 Message-ID: <1846152.TW98f23PIX@debian64> In-Reply-To: References: <20180801111243.2848-1-fe@dev.tdt.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, August 2, 2018 11:30:00 PM CEST Linus Walleij wrote: > On Wed, Aug 1, 2018 at 1:12 PM Florian Eckert wrote: > > > Add a new device driver "gpio-apu" which will now handle the GPIOs on > > APU2 and APU3 devices from PC Engines. > > > > - APU2/APU3 -> front button reset support > > - APU3 -> SIM switch support > > > > Signed-off-by: Florian Eckert > > Hi Florian, thanks for the patch! There have been multiple attempts at upstreaming a gpio/pinctrl driver for the different APU SoC by now. The last attempt I remember took place on this ML too: But sadly most attempts stalled, because there is already a leds-apu driver (since the gpio-driver was never accepted) that will do in a pinch for the LEDs (which most people care about). > I looped in Andy Schevchenko and Mika Westerberg who are authorities on > x86 platform drivers in general and GPIO and pin control in particular > so they can help out with the review. Intel helping AMD. That's nice to see ;-) > I'm a bit confused whether these things are really GPIOs or just > switches but since they can change direction they seem to be GPIOs. Yes, it's a real gpio/pinctrl in AMDs Tech docs. Some of the pins are muxed. I.e GPIO167-170 can either be a GPIO or used for HD audio. "The HD audio controller supports up to four codecs with one AZ_SDIN pin from each codec. The four AZ_SDIN pins are multiplexed with GPIO167-170 (GPIOxA7-GPIOxAA). If a particular pin is to be used for HD audio functionality". There's a full table in "3.26.12.1 GPIO Registers". As for the APUs. The vendor (PC Engines) happily provides PDFs and schematics for their boards: So, it's possible to repurpose several test points as additional GPIOs and more. Note2: On both boards there is also a dedicated GPIO pin header J19, but these pins are controlled by the SuperIO Nuvoton NCT5104D. > > +config GPIO_APU > > + tristate "PC Engines APU2/APU3 GPIO support" > > + depends on X86 > > + select GPIO_GENERIC > > + help > > + Say Y here to support GPIO functionality on APU2/APU3 boards > > + from PC Engines. > > + - APU2/APU3 -> front button reset support > > + - APU3 -> SIM switch support Well, by design this driver will sort of clash with the leds-apu driver. Regards, Christian