Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753614AbdLUNCG (ORCPT ); Thu, 21 Dec 2017 08:02:06 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:42391 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751881AbdLUNCE (ORCPT ); Thu, 21 Dec 2017 08:02:04 -0500 X-Google-Smtp-Source: ACJfBovWQGNVvTkiZhfis8rXtCbxsLZbfmoXhYSrr5axiWCBnQfAlMO1V185oiGuwJfyETEoGaUW/Q== From: Christian Lamparter To: Andrew Cooks Cc: Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Nehal Shah , Shyam Sundar S K , Ken Xue , Tobias Diedrich , Sudheesh Mavila , platypus-sw , alan@mizrahi.com.ve Subject: Re: pinctrl-amd: What hardware does it apply to? Date: Thu, 21 Dec 2017 14:02:01 +0100 Message-ID: <2142688.oNeEzK9Weu@debian64> User-Agent: KMail/5.2.3 (Linux/4.15.0-rc3-wt+; KDE/5.37.0; x86_64; ; ) In-Reply-To: <6c675643-45ec-c57f-f1b2-afb25f3e947e@opengear.com> References: <6c675643-45ec-c57f-f1b2-afb25f3e947e@opengear.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1659 Lines: 41 On Thursday, December 21, 2017 8:25:03 AM CET Andrew Cooks wrote: > I'm working on gpio for an AMD Family 16h Model 30h system[1]. > The SoC is the same as the GX412-TC used in the PC Engines APU2. > > There is an out-of-tree gpio driver (gpio-amd) for this SoC in the > meta-amd yocto layer[2]. Another driver (gpio-sb8xx) was submitted > for upstream inclusion, but was knocked back with the suggestion > that pinctrl is the way forward[3]. > > I would much prefer to use a mainline driver for the system I'm > working on, so I'm looking at the pinctrl-amd driver to see > whether it applies to our SoC, or whether it could be extended, > or used as starting point for a new driver. > > The out-of-tree drivers apply to the GX412-TC SoC and uses PCI > for probing: Just a FYI: due to these difficulties with getting a gpio driver upstream, Alan Mizrahi upstreamed an in-kernel led-apu.c driver [0] that sort of bypasses the whole pinctrl vs gpio issue. |#define APU1_FCH_ACPI_MMIO_BASE 0xFED80000 |#define APU1_FCH_GPIO_BASE (APU1_FCH_ACPI_MMIO_BASE + 0x01BD) |#define APU1_LEDON 0x08 |#define APU1_LEDOFF 0xC8 |#define APU1_NUM_GPIO 3 |#define APU1_IOSIZE sizeof(u8) | |#define APU2_FCH_ACPI_MMIO_BASE 0xFED80000 |#define APU2_FCH_GPIO_BASE (APU2_FCH_ACPI_MMIO_BASE + 0x1500) |#define APU2_GPIO_BIT_WRITE 22 |#define APU2_APU2_NUM_GPIO 4 |#define APU2_IOSIZE sizeof(u32) If you are just after LEDs or gpio-keys you probably can go the same route? Thanks, Christian [0]