From patchwork Wed Oct 10 18:39:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 148575 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1202053lji; Wed, 10 Oct 2018 11:39:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV61LXB3dYGE/w2DUL/d0NVlX42jT3AmtU665aauALoRh/uQPbjl0NcFT6dGsHJcnwKM8uPXz X-Received: by 2002:a62:8d16:: with SMTP id z22-v6mr35696020pfd.185.1539196767387; Wed, 10 Oct 2018 11:39:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539196767; cv=none; d=google.com; s=arc-20160816; b=HdWT0qbX9syqKWS0pFC8UO2wyFtgMP1bW2vMKIVmsWYBLSxWDhgo5xP/f5wjxFHxvd cMt+nPNGCQhXIM9A+gdurh5k0HUAeFu1oL3IjwYzLxqRCR6u27DClNuh8xy/eq9ZpIzd kP+0qpfPvtnnTvIaB14AtEDrN4lvrDsMBUMyj0qopcOs063lYFQpQqXlyQHPPDrLUx07 7vxDzH23w/JnL3K71ucaL5X5XocKLsihFlBVWnU5kUsl2YgPqRFaUF+aSZH8bC/v8tYz TqAYbTUs0LnfWRCE10u8+GxPYUyW16Pr7z+qzd/F8Muz8UMCdTFmBnhG05Vvqcp8JYIr e4Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=O7+OKpJ66RoEErEXEuRz5QUZZ40D5viSa6Bf/FQH4AQ=; b=SrTH83oCbeSilazOfmNUSDNEUY7LaG/sFNxdpLOq59WMxqQOMS/fWzq4JM/TD7blZv HzBxYmjvKsSPrfcRlOXvFhG983eRX64sUkHcq3hP1VrRpJx2UTQe87+CEmj8LzymzsWN fZ63cQZk3sfEg8GYPwHY5t1dLgnMpV8eLstQKQbai8z2PrfdIh222Ap9MpH9Msz+Cgp9 bZ/vVum43MmrLn/vnCAqayvOUIG5FjgDGD2breorMNc40KM7bsBPtXlkVxZCUrl1C2hj TZNDs53knawCKHgY4MFzk4Ed/plj1Axnop6ubcY6o3zasD1+bOE7MJLZTlTLDaXMR0el soyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RmkALhFn; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 185-v6si29762966pfa.199.2018.10.10.11.39.27; Wed, 10 Oct 2018 11:39:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-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=@linaro.org header.s=google header.b=RmkALhFn; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726970AbeJKCCu (ORCPT + 5 others); Wed, 10 Oct 2018 22:02:50 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:44879 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726525AbeJKCCt (ORCPT ); Wed, 10 Oct 2018 22:02:49 -0400 Received: by mail-lf1-f68.google.com with SMTP id m18-v6so4753707lfl.11 for ; Wed, 10 Oct 2018 11:39:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=O7+OKpJ66RoEErEXEuRz5QUZZ40D5viSa6Bf/FQH4AQ=; b=RmkALhFnvg6hr5nvOTmlY3gYR7M9xoEg32a7cpkKSn7XjJqJ1yHn6uXn/d3YlQSm9f 1qwQIgcmJeCCUCHVMq5OB5TA6o2jduwN7YHKKcZ6zEgEuAvFQYEbcjqqGUhfBjNzJ5cH HjqUOEXSFDWvJcgD0LsotF+rLia7YETFYTvW0= 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; bh=O7+OKpJ66RoEErEXEuRz5QUZZ40D5viSa6Bf/FQH4AQ=; b=LguDCX1y6YROqmiQS/GIM4B6XbB+ds5eZrajTlxs7dEtj7riASvT6U0y/0Nxgup8oh HrVG0C8ez0fsneQBf0F8WrKqBesLKSFu1OuTfKdlroObEi/tXr9tn6PphsZGmZzYd4xy aRnVnvTrpBqLZqct0ttA3i4WFXrDVx+caCWBsBICGJZKnB5dHeJHLdrgYLoSx+LH70X4 Z6El/h8uxMTzoGmXDV7xDZAeblX5Una9WytUVKDoUEIoZzEmhb1DbdO63gjlkUTE+oMn iyAqlbn1glbYKn8HEfKNR7Nsp+9NHSook44btf2PSr6I8+65n0fldBZJuiQnwWNuO76C lL0Q== X-Gm-Message-State: ABuFfogRMaQe1amfE1NpygttzR1LCR51hWmHZxdKIIBvQH8ka+OJQmNZ sA4PKa3fOcVLBqUUSg4Lsw5CwZYmCSM= X-Received: by 2002:a19:9e54:: with SMTP id h81-v6mr18191064lfe.155.1539196763279; Wed, 10 Oct 2018 11:39:23 -0700 (PDT) Received: from localhost.bredbandsbolaget (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id j73-v6sm5196644lfg.16.2018.10.10.11.39.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Oct 2018 11:39:21 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij Subject: [PATCH] pinctrl: gemini: Fix up TVC clock group Date: Wed, 10 Oct 2018 20:39:18 +0200 Message-Id: <20181010183918.29080-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The previous fix made the TVC clock get muxed in on the D-Link DIR-685 instead of giving nagging warnings of this not working. Not good. We didn't want that, as it breaks video. Create a specific group for the TVC CLK, and break out a specific GPIO group for it on the SL3516 so we can use that line as GPIO if we don't need the TVC CLK. Fixes: d17f477c5bc6 ("pinctrl: gemini: Mask and set properly") Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-gemini.c | 44 ++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 8 deletions(-) -- 2.17.1 diff --git a/drivers/pinctrl/pinctrl-gemini.c b/drivers/pinctrl/pinctrl-gemini.c index 1e484a36ff07..3535f9841861 100644 --- a/drivers/pinctrl/pinctrl-gemini.c +++ b/drivers/pinctrl/pinctrl-gemini.c @@ -591,13 +591,16 @@ static const unsigned int tvc_3512_pins[] = { 319, /* TVC_DATA[1] */ 301, /* TVC_DATA[2] */ 283, /* TVC_DATA[3] */ - 265, /* TVC_CLK */ 320, /* TVC_DATA[4] */ 302, /* TVC_DATA[5] */ 284, /* TVC_DATA[6] */ 266, /* TVC_DATA[7] */ }; +static const unsigned int tvc_clk_3512_pins[] = { + 265, /* TVC_CLK */ +}; + /* NAND flash pins */ static const unsigned int nflash_3512_pins[] = { 199, 200, 201, 202, 216, 217, 218, 219, 220, 234, 235, 236, 237, 252, @@ -629,7 +632,7 @@ static const unsigned int pflash_3512_pins_extended[] = { /* Serial flash pins CE0, CE1, DI, DO, CK */ static const unsigned int sflash_3512_pins[] = { 230, 231, 232, 233, 211 }; -/* The GPIO0A (0) pin overlap with TVC and extended parallel flash */ +/* The GPIO0A (0) pin overlap with TVC CLK and extended parallel flash */ static const unsigned int gpio0a_3512_pins[] = { 265 }; /* The GPIO0B (1-4) pins overlap with TVC and ICE */ @@ -823,7 +826,13 @@ static const struct gemini_pin_group gemini_3512_pin_groups[] = { .num_pins = ARRAY_SIZE(tvc_3512_pins), /* Conflict with character LCD and ICE */ .mask = LCD_PADS_ENABLE, - .value = TVC_PADS_ENABLE | TVC_CLK_PAD_ENABLE, + .value = TVC_PADS_ENABLE, + }, + { + .name = "tvcclkgrp", + .pins = tvc_clk_3512_pins, + .num_pins = ARRAY_SIZE(tvc_clk_3512_pins), + .value = TVC_CLK_PAD_ENABLE, }, /* * The construction is done such that it is possible to use a serial @@ -860,8 +869,8 @@ static const struct gemini_pin_group gemini_3512_pin_groups[] = { .name = "gpio0agrp", .pins = gpio0a_3512_pins, .num_pins = ARRAY_SIZE(gpio0a_3512_pins), - /* Conflict with TVC */ - .mask = TVC_PADS_ENABLE, + /* Conflict with TVC CLK */ + .mask = TVC_CLK_PAD_ENABLE, }, { .name = "gpio0bgrp", @@ -1531,13 +1540,16 @@ static const unsigned int tvc_3516_pins[] = { 311, /* TVC_DATA[1] */ 394, /* TVC_DATA[2] */ 374, /* TVC_DATA[3] */ - 333, /* TVC_CLK */ 354, /* TVC_DATA[4] */ 395, /* TVC_DATA[5] */ 312, /* TVC_DATA[6] */ 334, /* TVC_DATA[7] */ }; +static const unsigned int tvc_clk_3516_pins[] = { + 333, /* TVC_CLK */ +}; + /* NAND flash pins */ static const unsigned int nflash_3516_pins[] = { 243, 260, 261, 224, 280, 262, 281, 264, 300, 263, 282, 301, 320, 283, @@ -1570,7 +1582,7 @@ static const unsigned int pflash_3516_pins_extended[] = { static const unsigned int sflash_3516_pins[] = { 296, 338, 295, 359, 339 }; /* The GPIO0A (0-4) pins overlap with TVC and extended parallel flash */ -static const unsigned int gpio0a_3516_pins[] = { 333, 354, 395, 312, 334 }; +static const unsigned int gpio0a_3516_pins[] = { 354, 395, 312, 334 }; /* The GPIO0B (5-7) pins overlap with ICE */ static const unsigned int gpio0b_3516_pins[] = { 375, 396, 376 }; @@ -1602,6 +1614,9 @@ static const unsigned int gpio0j_3516_pins[] = { 359, 339 }; /* The GPIO0K (30,31) pins overlap with NAND flash */ static const unsigned int gpio0k_3516_pins[] = { 275, 298 }; +/* The GPIO0L (0) pins overlap with TVC_CLK */ +static const unsigned int gpio0l_3516_pins[] = { 333 }; + /* The GPIO1A (0-4) pins that overlap with IDE and parallel flash */ static const unsigned int gpio1a_3516_pins[] = { 221, 200, 222, 201, 220 }; @@ -1761,7 +1776,13 @@ static const struct gemini_pin_group gemini_3516_pin_groups[] = { .num_pins = ARRAY_SIZE(tvc_3516_pins), /* Conflict with character LCD */ .mask = LCD_PADS_ENABLE, - .value = TVC_PADS_ENABLE | TVC_CLK_PAD_ENABLE, + .value = TVC_PADS_ENABLE, + }, + { + .name = "tvcclkgrp", + .pins = tvc_clk_3516_pins, + .num_pins = ARRAY_SIZE(tvc_clk_3516_pins), + .value = TVC_CLK_PAD_ENABLE, }, /* * The construction is done such that it is possible to use a serial @@ -1872,6 +1893,13 @@ static const struct gemini_pin_group gemini_3516_pin_groups[] = { /* Conflict with parallel and NAND flash */ .value = PFLASH_PADS_DISABLE | NAND_PADS_DISABLE, }, + { + .name = "gpio0lgrp", + .pins = gpio0l_3516_pins, + .num_pins = ARRAY_SIZE(gpio0l_3516_pins), + /* Conflict with TVE CLK */ + .mask = TVC_CLK_PAD_ENABLE, + }, { .name = "gpio1agrp", .pins = gpio1a_3516_pins,