Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756692AbdLTWZa (ORCPT ); Wed, 20 Dec 2017 17:25:30 -0500 Received: from mail-bl2nam02on0084.outbound.protection.outlook.com ([104.47.38.84]:24448 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754428AbdLTWZZ (ORCPT ); Wed, 20 Dec 2017 17:25:25 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=andrew.cooks@opengear.com; From: Andrew Cooks Subject: pinctrl-amd: What hardware does it apply to? To: Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Nehal Shah , Shyam Sundar S K , Ken Xue , Tobias Diedrich , Sudheesh Mavila , platypus-sw Message-ID: <6c675643-45ec-c57f-f1b2-afb25f3e947e@opengear.com> Date: Thu, 21 Dec 2017 08:25:03 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [59.167.150.161] X-ClientProxiedBy: ME1PR01CA0110.ausprd01.prod.outlook.com (10.171.8.147) To CO2PR15MB0026.namprd15.prod.outlook.com (10.161.86.141) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0ffd0b46-41e4-4a81-c005-08d547f88eb0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060);SRVR:CO2PR15MB0026; X-Microsoft-Exchange-Diagnostics: 1;CO2PR15MB0026;3:IoG74VlyOc4vP564Y+muZXYA6ADylzr5lH44v7KRf9ewgxJullF7wjdXJ47pN5memCGRdfnsxjGY982JPwP+rjLMv95b8wQBileaCwkvkXiuciRfohPQfNbmY975RBun1nhOLyOuyDjjLPDpTDI+6iwKJfA1j0STPAr2aXE17vcggSC7xW6RjVcQ6vb9wBUZZfJLYzWkdJpzVlbGven+QgMp25+4559imCWlN3RHsyEy/avimGFXQFiXqwx1Ap2X;25:J4m74wH/SZLVcwKMd0clOqA1lDUNwUotDVUA/35SfqmRbi+BjrC/LGQaGqCGfTgE0lljO214t6y7KAK7jAoLI5kKT6D6t+nyY0dFJSpt5R0aHFUHkLzHmSmsazRKdO4IDj0WBuO/WHmAqJkP0hrW+f70t2xjsCFJdHozpk1J2abseYNuHpHyp4vJy3ockMoD7MBSbX554z25rVMfPldy8XESHujdWUqIVmw85tPLdspTgaR+7zYjf2XDWhiJUkJJvXw2+vyophVj0zXhaoCMhsjMHaR/J0XK47cyZn4soA+S5e84dS/ygFVOHDYfWWDk8/E3l00AiSr2edj95h/LCbp3gHnORrpQmw8uDmUHsdQ=;31:s+kcrhde8DSiI09r9K3bDYQD42gkOoQ8U95vgxn6ZqNU2E2csFF36us0sgA0qPpHOTPOjrGxecxZP0jOfXQKmS7YG1mCeJEGm4UADzZ/PCZLX8U80CxGwibyKtiGlrGz5dS97Sjvn1enB9hfAZPoU9sn++5ti5bgB8NofZs+/FAq8B8i26h+JMDWN6kU1oDpr7i0aS6pjcsArBMhXj26rwoKqEpbfpV6WXSOM7HJofw= X-MS-TrafficTypeDiagnostic: CO2PR15MB0026: X-Microsoft-Exchange-Diagnostics: 1;CO2PR15MB0026;20:DzeDSdC+pavT54QXvZWX9rmdmIryuXS7Ggc5y+AW7g43Y1rFNedqBZuG/hC/J86f4h1CNZzRlS6+kJau5Wujem6xz7eGo7kBaDZnfchGFl2k++RCQ0k9rtGNaxczvUfGvLDvJnsmBsJNfV+p57KpykEVMMYboWQVwsl1FxE5ZFs=;4:X6lUa6SchgSFWBR+W3XqejmGmGJm7qkvQvre2XClwX3qP/HJDOJAW5cSfBkJRw2yWr2XdAAul83thw06vnwS3Nkt+xlmmXQP63zNfrWcmH/oYkwqaP0qXYxde34ccExwLttMN8Zq00DmMRAuA697e/pXHrTRPgvaL1cEycK7IIerkALeDPTaK4wBtKKlJ1VVkdBnfnHF32RwcRDbvlQeeUNULwqEOmgjtY3QFJ5EZbtlSrCo+kQPX7Dod0sFhWq5VG4Aj/xD7CQgmzedTq4wMjayZD9YYC7oQfS8/eCMc4yq/KIze/Uc4mpPr8lKzB4I X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(5005006)(8121501046)(3002001)(3231023)(10201501046)(93006095)(93001095)(6041268)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(6072148)(201708071742011);SRVR:CO2PR15MB0026;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:CO2PR15MB0026; X-Forefront-PRVS: 0527DFA348 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(366004)(39840400004)(396003)(376002)(346002)(39380400002)(199004)(189003)(36756003)(16526018)(90366009)(2486003)(52116002)(7736002)(31686004)(6116002)(31696002)(230700001)(81166006)(3846002)(6666003)(52146003)(4326008)(8676002)(305945005)(81156014)(47776003)(65806001)(23676004)(64126003)(54906003)(58126008)(66066001)(316002)(65956001)(16576012)(105586002)(6486002)(106356001)(77096006)(8936002)(25786009)(8666007)(83506002)(107886003)(6306002)(50466002)(966005)(117156002)(5660300001)(65826007)(68736007)(53936002)(97736004)(478600001)(386003)(86362001)(2906002);DIR:OUT;SFP:1101;SCL:1;SRVR:CO2PR15MB0026;H:[192.168.254.67];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDTzJQUjE1TUIwMDI2OzIzOjIrWUtvZXA4QTlhZ2hmZ1FDbnBqQ3ltNzVN?= =?utf-8?B?cHBFY3lWZkNYS0kzQ091Vzc4Mm5JVUZJQzRxeFd0VnBD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EpvLLdWwSo9hZqwOFF6wxLSy+wJT2EBuGY99t9QuvGvZuKiEPJDNwzFLbL0FwFrk5YR9/jJB1VY4Pv0oCpxJmw+flfTYnTemy9Os885XjueSoJHqOScqjlo3oW6iT2N3K5S/2DLJ35SsjyF8WSlTIXtN8xFe290p1DzqpijjOxjAvg+PrrzjZaDYQ7UBykQNwiOCROjQOFtUov6LzlGlcIAr00ZseLLzdBKxIYcAXh4BNUzpJMvogI0t0E7dcxDT513sco+gNHlBVx9nsTGbp3UbQaoDVvEzTpHfhCcSeNDvWEZ+3E7Wj7s894DuY=;5:SCjtpRu3hH5pPqiPTai6DHaV5emaAgaQsWgvgz4TbDHQHdezICl4gcV0tF8qxERJs89toEa3A42MWHOoWOtBngInOwqyOOf6hSNgtme0+gVcLGv6ixnaa49kPXO5j5MK8ROKoGUX3AYsJJCpfJ3SK+6hTVFE/R2ln5iTHqbjKog=;24:bFK2BFLawkD8siw4BX3PsHMHxw+GIzP0+DIsgYzgJMeawsYsg65zBvX7QN75sLeLXEyvMGZeqOYHab0M5mDqL38vrwBdQwzwA04WC/NPCxY=;7:74cFeE1+DRnvnTWUZ9Mgio6TxkdcivGaYL7d+sTo/Csas0mioR45oKH9vskZUUsis09fMt5uZZCPtWsKeKt+/CiZCSoSzR9f6n7RkFWZeYGHhnIsbLI93E6MeCzEwHhFg1OLL6cTD0FOUS22hTB0d1lfg4bxSbNld7HTRFbF4hQUAWfiyCiRVWSkXORp3rdOLVUvkd4MH+SHuxl1CeYNe3blm9pnrtkGaBGIA0Q/x/wWJXmg9E/vg4dzFI8s9jby SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: opengear.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2017 22:25:18.4515 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0ffd0b46-41e4-4a81-c005-08d547f88eb0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a6251c26-d21f-4164-a225-1f4eaebf5f9a X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR15MB0026 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2369 Lines: 34 Hi Linus 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: gpio-amd registers a platform driver that applies to { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS } gpio-sb8xx applies to { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS } and { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS } These IDs make it easy to cross reference with the datasheet, and keeps the coupling between ACPI and the driver low. These drivers do not provide a mechanism for firmware (ACPI or DT) to specify which gpios are safe to use or how to use them. In contrast, the pinctrl-amd driver only mentions the newer KERNCZ platform name and uses ACPI for probing without disclosing any Family or Model numbers. pinctrl-amd applies to "AMD0030" and "AMDI0030" The ACPI HID matching makes it difficult to determine what family and model the driver applies to, or rather, I have not been able to find such a mapping of HIDs to family and model numbers. It's also impossible to guess an ACPI _HID that may or may not exist for the Family 16h Model 30h platform and even if I allocate a new HID for our ACPI implementation, that HID has little hope of being accepted into the mainline driver. I would like to extend the generically named, but very specifically implemented pinctrl-amd driver to also work on Family 16h, Model 30h (specifically the FT3b package), and I propose to use the PCI_DEVICE_ID_AMD_16H_M30H_NB_F3 symbol to probe for the device. Does this seem like a sensible way forward? Thanks! Andrew 1. http://support.amd.com/TechDocs/52740_16h_Models_30h-3Fh_BKDG.pdf 2. http://git.yoctoproject.org/cgit/cgit.cgi/meta-amd/tree/meta-steppeeagle/recipes-kernel/amd-gpio/files/gpio-amd.c 3. https://lkml.org/lkml/2015/6/20/202