Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1605171pxb; Thu, 4 Mar 2021 16:07:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvcBta5Kp078iyuPKR/hU4Z7tx0peTxQCEstp5GuaOiCQip+Qtb+dL7iE4bZXFkfOSs43D X-Received: by 2002:a5d:8d92:: with SMTP id b18mr5901395ioj.167.1614902868955; Thu, 04 Mar 2021 16:07:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614902868; cv=none; d=google.com; s=arc-20160816; b=wdy0S78zqcYUrqmBVxnBqOenHxL/Z5lO49g6ZsUg6/AeInyiF32x0Ni77N9OZCQFFM qzy3bWx1aAeu9GOaE9SgihHt7sZ+0y+XLQBiX3onH0imFG/lA6KbsBGucMk+Y3SLL2zK Qck6wlBKlNhrDiQzvcRgd04J05JvVS9DXpiN4MW1B76DFp6mDQDsF5zHymfrSsm6ROMp oqnQcVbqoJ/RSK0/sYIx6gV7NoBclg260DLdi657b/eZAjFiFr1ks7n5A/xHymrRm6kt 0Kh+jOtkPV7kWjUsoNy7V5iIVLKYMHQNGmuh59X0p6fbLDyzLhMV1ofB2MSPL+0ytk/m TpfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=3oAkVo4bUtNk2syG2eiAd8DZ4+uW2EV8B2cJWAv57Ag=; b=uSENmjm37qaCHqR1uH24F5XVrf/AFlJb7mSzF+aq38Ijfii3fGLx5JqJwzbcWLWDN9 8p8O0VaWIg8hmi1wNg61G6+GUfRlLIy+IVWGinnUA2Y9zHEJzSGFJ+zvRIcYzEci5V7X QPLEw9L+YTfnZ6IHHtoWzH6s+6qbKO8lBWmSpI72RwII/BNHoaBp9OwWB7/JqQiPofn8 D8aIsm/O78D04S5TrAqlF5+fJHxZOnwEYpP0F9ORoSkXHIXhRFNEampo+xcYuoRZ5zMx 8RsWu7IbGsbp3mePgTFKRml2d7fsFB8MNaC+YbHF1kDfPawf9SG++PHf2Zg4VL5MtyES mMPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GeMyvmQR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x19si938068jat.82.2021.03.04.16.07.36; Thu, 04 Mar 2021 16:07:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GeMyvmQR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236925AbhCDI6F (ORCPT + 99 others); Thu, 4 Mar 2021 03:58:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236954AbhCDI54 (ORCPT ); Thu, 4 Mar 2021 03:57:56 -0500 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2CD5C061574; Thu, 4 Mar 2021 00:57:15 -0800 (PST) Received: by mail-wr1-x432.google.com with SMTP id u16so8706542wrt.1; Thu, 04 Mar 2021 00:57:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=3oAkVo4bUtNk2syG2eiAd8DZ4+uW2EV8B2cJWAv57Ag=; b=GeMyvmQRKZlrFF90QBFnajKEbIHsYBI8CLj2+kSS1IBdt13fiZzsYN8uietG0xhMPC sUQ4tpEgccZ/VPlRLGbtP7PzwTg2y6CN1nzeDi2dhyUPs/hIUQWxbB/YpxqlxLbZCcI7 k2FLidUzJnOzPCwsJr9oEXyQSZRCTtDK6P/Ys7TSFjRtDlIa6/G4vpzRBgTHVKcJpwr4 Igw6ITx5rQPWrXvSucEXgszSQOTn+q2Cqpb5dIy93L6tgl7UkVrlPIOJetum9+hM6hq9 p7LqtD+x7nLkXZXYo7T/YTnt1msiDJeXJuJf55kXRBCcW3Ge4RKBk1QMiaXwndd0ypF4 eibQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=3oAkVo4bUtNk2syG2eiAd8DZ4+uW2EV8B2cJWAv57Ag=; b=kna00h+eBPajDyBTsIitulAqmNPgIHTs0iFVOWxJ9OZ1H2J2yLxKRoa0NhTxGwj1YI NZOC1EEKTTOuNzQU4Tuo4KKs8CvvpZSSATxKgVxpiHOWF5+dAnXy3x0f8IpQ03aVt9ou +27wuAU+tPj6x7bWBpjEAJQRfY7ZjB/TUG7y7Won5ZHovkhaL/ezV0cfIVP/NRbR8zMl ATSzx8V6+AVVvNzDOFydxCO56FUCIX34+Tg0/7mT9v6al3oV4xmIJ44mCfiPElrrZ/XW RU+JMYVGOIxsoR0vfq5q1tBO5XtGjn1mNgHRJ3zNO4UhglZP6RcXWNCMohNRo5b5v+de byDA== X-Gm-Message-State: AOAM530oac8apt+ctTA/5IIFhP3IV4xT0QGGs3LKpL8wzDaHSaRMM2++ qdWp2tRQZVWQK5/u/SZMDU4= X-Received: by 2002:adf:ea8d:: with SMTP id s13mr2879947wrm.32.1614848234550; Thu, 04 Mar 2021 00:57:14 -0800 (PST) Received: from skynet.lan (170.red-88-1-105.dynamicip.rima-tde.net. [88.1.105.170]) by smtp.gmail.com with ESMTPSA id q15sm2828976wrx.56.2021.03.04.00.57.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Mar 2021 00:57:14 -0800 (PST) From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= To: Linus Walleij , Rob Herring , Michael Walle , Bartosz Golaszewski , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= , Jonas Gorski , Necip Fazil Yildiran , Andy Shevchenko , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 00/15] pinctrl: add BCM63XX pincontrol support Date: Thu, 4 Mar 2021 09:56:55 +0100 Message-Id: <20210304085710.7128-1-noltari@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org First of all, I've based this on the patches sent by Jonas Gorski back in 2016: https://www.spinics.net/lists/linux-gpio/msg15983.html http://patchwork.ozlabs.org/project/linux-gpio/patch/1471604025-21575-2-git-send-email-jonas.gorski@gmail.com/ I've tried to address all coments from Linus Walleij, but I know that this may still need some other modifications This patchset adds appropriate binding documentation and drivers for pin controller cores found in the BCM63XX MIPS SoCs currently supported. While the GPIO part is always the same, the pinmux part varies quite a lot between different SoCs. Sometimes they have defined groups which can be muxed into different functions, sometimes each function has a different group. Sometimes you can mux individual pins. Often it is a combination of single pins and groups. Some core versions require the GPIO direction to be set according to the function, most do not. Sometimes the mux register(s) contain bits for unrelated other functions. v4: fix gpiochip_irqchip_add_domain(), remove IRQ Kconfig selections and add missing of_node_put(). v3: introduce new files for shared code and add more changes suggested by Linus Walleij. Also add a new patch needed for properly parsing gpio-ranges. v2: introduce changes suggested by Linus Walleij and remove interrupts - In order to use GPIO_REGMAP, the need to get gpio_chip from gpio_regmap and use it for pinctrl_add_gpio_range() and gpio_chip.direction_input() and gpio_chip.direction_output(). Álvaro Fernández Rojas (15): gpio: guard gpiochip_irqchip_add_domain() with GPIOLIB_IRQCHIP gpio: regmap: set gpio_chip of_node pinctrl: bcm: add bcm63xx base code Documentation: add BCM6328 pincontroller binding documentation pinctrl: add a pincontrol driver for BCM6328 Documentation: add BCM6358 pincontroller binding documentation pinctrl: add a pincontrol driver for BCM6358 Documentation: add BCM6362 pincontroller binding documentation pinctrl: add a pincontrol driver for BCM6362 Documentation: add BCM6368 pincontroller binding documentation pinctrl: add a pincontrol driver for BCM6368 Documentation: add BCM63268 pincontroller binding documentation pinctrl: add a pincontrol driver for BCM63268 Documentation: add BCM6318 pincontroller binding documentation pinctrl: add a pincontrol driver for BCM6318 .../pinctrl/brcm,bcm6318-pinctrl.yaml | 187 +++++ .../pinctrl/brcm,bcm63268-pinctrl.yaml | 208 ++++++ .../pinctrl/brcm,bcm6328-pinctrl.yaml | 171 +++++ .../pinctrl/brcm,bcm6358-pinctrl.yaml | 137 ++++ .../pinctrl/brcm,bcm6362-pinctrl.yaml | 250 +++++++ .../pinctrl/brcm,bcm6368-pinctrl.yaml | 261 +++++++ drivers/gpio/gpio-regmap.c | 1 + drivers/pinctrl/bcm/Kconfig | 55 ++ drivers/pinctrl/bcm/Makefile | 7 + drivers/pinctrl/bcm/pinctrl-bcm6318.c | 496 ++++++++++++++ drivers/pinctrl/bcm/pinctrl-bcm63268.c | 643 ++++++++++++++++++ drivers/pinctrl/bcm/pinctrl-bcm6328.c | 403 +++++++++++ drivers/pinctrl/bcm/pinctrl-bcm6358.c | 369 ++++++++++ drivers/pinctrl/bcm/pinctrl-bcm6362.c | 617 +++++++++++++++++ drivers/pinctrl/bcm/pinctrl-bcm6368.c | 523 ++++++++++++++ drivers/pinctrl/bcm/pinctrl-bcm63xx.c | 114 ++++ drivers/pinctrl/bcm/pinctrl-bcm63xx.h | 46 ++ include/linux/gpio/driver.h | 9 + include/linux/gpio/regmap.h | 3 + 19 files changed, 4500 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6318-pinctrl.yaml create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm63268-pinctrl.yaml create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6328-pinctrl.yaml create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6358-pinctrl.yaml create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6362-pinctrl.yaml create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6368-pinctrl.yaml create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm6318.c create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm63268.c create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm6328.c create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm6358.c create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm6362.c create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm6368.c create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm63xx.c create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm63xx.h -- 2.20.1