From patchwork Fri Sep 29 13:55:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 819990 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3y3Y593H45z9sPk for ; Fri, 29 Sep 2017 23:56:45 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752006AbdI2N4o (ORCPT ); Fri, 29 Sep 2017 09:56:44 -0400 Received: from mga06.intel.com ([134.134.136.31]:60990 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752003AbdI2N4n (ORCPT ); Fri, 29 Sep 2017 09:56:43 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP; 29 Sep 2017 06:56:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,452,1500966000"; d="scan'208";a="1177023210" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 29 Sep 2017 06:56:41 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 6F04711E; Fri, 29 Sep 2017 16:55:40 +0300 (EEST) From: Andy Shevchenko To: "linux-gpio @ vger . kernel . org" , Mika Westerberg , devicetree@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v2] pinctrl: intel: merrifield: Introduce OF device table Date: Fri, 29 Sep 2017 16:55:39 +0300 Message-Id: <20170929135539.4046-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.14.2 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Intel Merrifield the pin control device is a separate IP block without any PCI or ACPI ID assigned. We need some means to allow the device be enumerated in ACPI environment (*). To achieve this without allocation special ACPI ID, which is really long and pretty much unachievable procedure, we just re-use special ACPI ID and standard compatible string. (*) ACPI is enabled via second bootloader, i.e. U-Boot, firmware is still left untouched and being SFI enabled. Signed-off-by: Andy Shevchenko --- In v2: - add DT binding - we asked internally for ACPI ID about month ago with full silence in response .../devicetree/bindings/pinctrl/intel,FLIS-pinctrl.txt | 13 +++++++++++++ drivers/pinctrl/intel/pinctrl-merrifield.c | 7 +++++++ 2 files changed, 20 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/intel,FLIS-pinctrl.txt diff --git a/Documentation/devicetree/bindings/pinctrl/intel,FLIS-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/intel,FLIS-pinctrl.txt new file mode 100644 index 000000000000..8f5a32b2333b --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/intel,FLIS-pinctrl.txt @@ -0,0 +1,13 @@ +Intel Corporation, Family-Level Interface Shim (FLIS) pin controller + +FLIS pin controller is a separate IP block on non-ACPI enabled Intel +platforms, such as Intel Merrifield. Very known board based on it is +Intel Edison. + +There is an ongoing effort to emulate ACPI on that kind of boards +and, since it is near to impossible to allocate an ACPI ID for the +such controller, the compatible string may be used along with special +PRP0001 ACPI ID. + +Required properties for FLIS pin controller: +- compatible: "intel,merrifield-pinctrl" diff --git a/drivers/pinctrl/intel/pinctrl-merrifield.c b/drivers/pinctrl/intel/pinctrl-merrifield.c index 86c4b3fab7b0..46fe30702a79 100644 --- a/drivers/pinctrl/intel/pinctrl-merrifield.c +++ b/drivers/pinctrl/intel/pinctrl-merrifield.c @@ -931,10 +931,17 @@ static int mrfld_pinctrl_probe(struct platform_device *pdev) return 0; } +static const struct of_device_id mrfld_of_table[] = { + { .compatible = "intel,merrifield-pinctrl" }, + { }, +}; +MODULE_DEVICE_TABLE(of, mrfld_of_table); + static struct platform_driver mrfld_pinctrl_driver = { .probe = mrfld_pinctrl_probe, .driver = { .name = "pinctrl-merrifield", + .of_match_table = mrfld_of_table, }, };