Received: by 10.223.185.116 with SMTP id b49csp6431718wrg; Wed, 28 Feb 2018 09:17:12 -0800 (PST) X-Google-Smtp-Source: AH8x225q88r+tTtZ1qAd5Cb+Y2a3iVjU412n4K6zwO5EAQJdOidqxOhAaF+YoCwWfes7FCX1y5SD X-Received: by 10.99.66.65 with SMTP id p62mr14459476pga.378.1519838232691; Wed, 28 Feb 2018 09:17:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519838232; cv=none; d=google.com; s=arc-20160816; b=Su3cTRk9xfRuCU/Hwhpcufbqzh5pOBRuFUxUiK3nqypXCwuvNjZqWXn4OCOxHJ+myR SB8AZkUVWg7kBuA72E49UClbx0INyUtJJUX+3HnpLKy6tdhnYPpmPradejfyNkUxxAJD v9YSMfYiZZ789ENCKbv6mrtVyxG4dTyDMR9pw3ia4taO4VdSMQrYzZ32g0RUE42R9g7b 608K/nz1IEnRk16ervJ6Ym7+hDki0b9BIhA+NTp8aFdwZMijlTbu7um8N49dGGyrOyZ9 qGRiCgF5tQWnfI2PlS+S5n5YxVQQAphXeny/k8lsE01nAmhmbgE1mFSrQIzFkEQsrojQ 3aFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=+z/jt2lQBQ/SJ9gPEyX8ZJhTdYGuOsCBXZEMjNT4850=; b=dsq1BQ5bqBXX0XhfFXbVUaTrhvnI+JiQdlyJcmcAUp5cUpre0V17JTPAh62hxo6Fjr qG/sc7d7YHf+ANOoOdc9TUKAGwl5F+8tL9s2pWWtudxoR6NNovapXxeibC1TYBbB6gOp 3kefasrvOS1xOzD2BFkCb9h5VXcgZHDqfB6Z/QmNVz9Mzsg+A0fJchIIvSRZ4lP6Y8fb PswiALgjEVeK5yoAbpri1QgPzRzCtD45jMB91ud0Q9hpJoge9EtLgCj6cw6z3ZPeKSGA ETApk5js4MMZe7eEXzL48DiK6vLJJHYXi9s5qpGp1tnu6UdGsjQPZgk76PqIRr3Lc3Rz 416g== 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 z7si1478086pfg.278.2018.02.28.09.16.57; Wed, 28 Feb 2018 09:17:12 -0800 (PST) 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 S933710AbeB1ROg (ORCPT + 99 others); Wed, 28 Feb 2018 12:14:36 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34267 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932362AbeB1Psh (ORCPT ); Wed, 28 Feb 2018 10:48:37 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yj-0006Xg-LJ; Wed, 28 Feb 2018 15:22:22 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yi-0000CL-Lk; Wed, 28 Feb 2018 15:22:20 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Gregory CLEMENT" , "Thomas Petazzoni" , "Andrew Lunn" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 173/254] ARM: dts: kirkwood: fix pin-muxing of MPP7 on OpenBlocks A7 In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Petazzoni commit 56aeb07c914a616ab84357d34f8414a69b140cdf upstream. MPP7 is currently muxed as "gpio", but this function doesn't exist for MPP7, only "gpo" is available. This causes the following error: kirkwood-pinctrl f1010000.pin-controller: unsupported function gpio on pin mpp7 pinctrl core: failed to register map default (6): invalid type given kirkwood-pinctrl f1010000.pin-controller: error claiming hogs: -22 kirkwood-pinctrl f1010000.pin-controller: could not claim hogs: -22 kirkwood-pinctrl f1010000.pin-controller: unable to register pinctrl driver kirkwood-pinctrl: probe of f1010000.pin-controller failed with error -22 So the pinctrl driver is not probed, all device drivers (including the UART driver) do a -EPROBE_DEFER, and therefore the system doesn't really boot (well, it boots, but with no UART, and no devices that require pin-muxing). Back when the Device Tree file for this board was introduced, the definition was already wrong. The pinctrl driver also always described as "gpo" this function for MPP7. However, between Linux 4.10 and 4.11, a hog pin failing to be muxed was turned from a simple warning to a hard error that caused the entire pinctrl driver probe to bail out. This is probably the result of commit 6118714275f0a ("pinctrl: core: Fix pinctrl_register_and_init() with pinctrl_enable()"). This commit fixes the Device Tree to use the proper "gpo" function for MPP7, which fixes the boot of OpenBlocks A7, which was broken since Linux 4.11. Fixes: f24b56cbcd9d ("ARM: kirkwood: add support for OpenBlocks A7 platform") Signed-off-by: Thomas Petazzoni Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT Signed-off-by: Ben Hutchings --- arch/arm/boot/dts/kirkwood-openblocks_a7.dts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) --- a/arch/arm/boot/dts/kirkwood-openblocks_a7.dts +++ b/arch/arm/boot/dts/kirkwood-openblocks_a7.dts @@ -53,7 +53,8 @@ }; pinctrl: pin-controller@10000 { - pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header>; + pinctrl-0 = <&pmx_dip_switches &pmx_gpio_header + &pmx_gpio_header_gpo>; pinctrl-names = "default"; pmx_uart0: pmx-uart0 { @@ -85,11 +86,16 @@ * ground. */ pmx_gpio_header: pmx-gpio-header { - marvell,pins = "mpp17", "mpp7", "mpp29", "mpp28", + marvell,pins = "mpp17", "mpp29", "mpp28", "mpp35", "mpp34", "mpp40"; marvell,function = "gpio"; }; + pmx_gpio_header_gpo: pxm-gpio-header-gpo { + marvell,pins = "mpp7"; + marvell,function = "gpo"; + }; + pmx_gpio_init: pmx-init { marvell,pins = "mpp38"; marvell,function = "gpio";