Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1093892pxb; Thu, 4 Mar 2021 03:08:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxr23+ovSmPiJ9pTRxVxKCd4VuUDtDr+smQJK8GCO8QYtTABAfn5DFC2MFJPWD9puGFXDd X-Received: by 2002:a17:906:3603:: with SMTP id q3mr3409674ejb.201.1614856138319; Thu, 04 Mar 2021 03:08:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614856138; cv=none; d=google.com; s=arc-20160816; b=pwuLexqukN4Qv1fR+f1lKLaJOLscy8sx3CNg/1jfK0mPgeS/HAazUiH2LKoVbVQvJa C6SKqtFKA97UfZQS16ghdDEKrq7K0Uk+U1LZYM8IXTDhqgOPoFE+YVAv2/K34hK2nrI0 KY+OLfwP7QhaoFhYTZoNhlL8THVtXx3ULd3XJCjC3InYkv3nKFbdTOGu78P/QxlUJQfF LVHVaekHHnDsJXx82uFEIoxOLTudWE/Jcxp7AOSrVVDM+L/pDlcfUgK899+o7nPdND6I sPFFkOEtIEozwXe6Ek2ATsQNRgWa412cjWZLXNTYN/sro8Gezrnecxq09P9tpNGDefQ/ XiSg== 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=uQpzwtJdI15ee25ztpxpJETWP0dJNKVRVUGEhzQbTYI=; b=M3ek5Wqb/BYLIHU25HkMl8gDQqqeliJtHWC3PjYQh9TSEWBquy3EbRcrQ+kPVPphCP s0zscvjlt0CWAioZieLsSeLvzxbgtuWdeRqQeYZgefl4/GrlPUD0hEJxZzwg2qt2Hn50 RaecNI6R2of4xFBl3283QEkhIViqa99dqGCXkO2JAG4/KNn5TTxxIzKPDoqAc6xyKrjX yzCVXr3mZdUi8dUgXh05yiurLiuWdJIka06apfCI76UQHTlMNP9/U7zIlTZqART5bzoO FdRxq4R+Mm/Y9SOi2dnIoRWESGavgFvJstckQq6mhtra47Pd7hSmsOldf2MZnRm0XsBT 2r0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tLeAOwAl; 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 b8si6869738edz.99.2021.03.04.03.08.34; Thu, 04 Mar 2021 03:08:58 -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=tLeAOwAl; 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 S1576319AbhCCRr3 (ORCPT + 99 others); Wed, 3 Mar 2021 12:47:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383509AbhCCOjI (ORCPT ); Wed, 3 Mar 2021 09:39:08 -0500 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90BC9C06178A; Wed, 3 Mar 2021 06:23:13 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id u187so5322868wmg.4; Wed, 03 Mar 2021 06:23:13 -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=uQpzwtJdI15ee25ztpxpJETWP0dJNKVRVUGEhzQbTYI=; b=tLeAOwAlFtvcX5c2nCq/k9O3FtmgphgjThDiMWdxKh4+RXRkeUGL1SGOUZskuVU7Zl +FUAiqYvZsUNrX6zwKagVxSG104vOJML+pKVA51ylzCuDUPaDK1qGtbLd/PsqL0fZij0 yXW5Bche84TdLZg1E4DgihEHAl2dYvtwH+FznHCjriaITN23uW97Co3Pmw4GyHWNU3jZ ltTXlmQNU7YURHr+XGqXN/h2vYWHqwHwqyOZtrTPF2U9YsA3VOwSCG6FNQNq7tUmfntd iTicznmkW2LFuV1NwnXMpI0QFx8KnUyHOAxu+41ILjLSn3viGneTsF4t/7dWtuTEmdvi A/bg== 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=uQpzwtJdI15ee25ztpxpJETWP0dJNKVRVUGEhzQbTYI=; b=e/cmfNYBK6ftqw+hv6vtYWwIyGfQR87p0Y0ehm4g5FwpXP4Y2hOgjZUPzYdDiqV1vO uZwmomLQEYrudloAUXVWvPw2SUwSYvHdrXzJqhKQx1jC4gfqwuGDP7lfSBBUVxG2IU+i bjyUHx6ilrx77p9aGd2AAtjFk+9lHUsoUSp1loHqY3/d00fl38xpXzEy3uvqhQA2p2s0 MyrU0TxL2fk4jyFCyPhdAVDLxY3ekVqReXLxtG9llBecXBC/gNsiEcYM4MZ6YhZc10A1 gvnLlghcBAO7se1q6CfrVD0qdJidFVRMU2U0Ljydr6fQ5PQLESpXbMmC/tAsqcFkXfLX YX8A== X-Gm-Message-State: AOAM530JhsemexwuNbtQNCFxUD4EGg3hgc3NYLyXGjHXzi2PmV8JcoD0 cCRX7gL8zUHCRtisBX+jxMM= X-Received: by 2002:a1c:e041:: with SMTP id x62mr9070791wmg.95.1614781392247; Wed, 03 Mar 2021 06:23:12 -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 b15sm7876219wmd.41.2021.03.03.06.23.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Mar 2021 06:23:11 -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, Jonas Gorski , =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= , Necip Fazil Yildiran , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 00/14] pinctrl: add BCM63XX pincontrol support Date: Wed, 3 Mar 2021 15:22:56 +0100 Message-Id: <20210303142310.6371-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. 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 (14): 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 | 57 ++ 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 | 113 +++ drivers/pinctrl/bcm/pinctrl-bcm63xx.h | 46 ++ include/linux/gpio/regmap.h | 3 + 18 files changed, 4492 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