From patchwork Wed Mar 3 14:23:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 12113683 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11F19C433DB for ; Wed, 3 Mar 2021 15:23:10 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9BE4F60231 for ; Wed, 3 Mar 2021 15:23:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9BE4F60231 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/nWmdpcAedx4vhPHR5CWySA7frjJyPGH0aLxi0WzX5M=; b=BsRwMkLXKsJXtJTdl/gr/mfyq hh1zft3jGQULamU+rLLdQCqXJyQVqo++bIhEnqfTShen8MoZLveqjDXxHFFeIMD3FPsbCxURbOtLb UH9WZ9BRI/me3LpZUIIFp/IMK0F1Nw2NsYiTl1kwU822/y5LdRlukX3WGRMvwcpCi1U2y9PQXTedG pWhhbr5Xk4+fNC4aKNRsHG3++6sMf3jhy9vdSkIiI90azGwmiGfkIHvFU6h/Sm43x1JZqwkYyz9f0 UWUklvaApol9f9YBaIle5rVyoF6CkV7Oaol/je8EyyWJD4PiSjJ71+M+xJGwyONCdpCFNJ3sgsyRd +6dVnoSig==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lHTJG-005MTt-4N; Wed, 03 Mar 2021 15:21:10 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHSPP-00574n-6J for linux-arm-kernel@lists.infradead.org; Wed, 03 Mar 2021 14:23:36 +0000 Received: by mail-wm1-x331.google.com with SMTP id w203-20020a1c49d40000b029010c706d0642so2948229wma.0 for ; Wed, 03 Mar 2021 06:23:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=rQVWm/dvrPCvRETVSo43Qa35BZE1UMcXhIp8lt3ID0o=; b=MTYdo0eSAMdnGnIBj9HnBTssSc7eFOFePXIZJ6VKCkbugHCLiL0dnCFmH3ZMjeARCp n8/wznuARdBRy5++/wWcz/Zq3SiWNpHEwj7+RwlXaIVFQZUw+61bCpNbCN5TbhwZavmo J7rDWHbADIERqqVE1UY7XWSmBgQOgfw85QpXYig+DxWlaa1n3ZBhoDtlcnmG9mgzEDa1 za8uE6qBPIH2WXTLa3i09w487LIReyL5lMUuxi3FwuVn0oTQ9+tLdrJvs4zNDR/A+V7x vN2CGb6yFdDARfh1FeE+4/JfWNpaOSAH3IOcpl6+NW+UFJz8tvWE5lN3Y4H32uIShcko GmYQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=rQVWm/dvrPCvRETVSo43Qa35BZE1UMcXhIp8lt3ID0o=; b=S72eNPjucGZ5aV3ErG5ao3Vv4twhfVUmWeNFqliAuyVu7Y60xhjXBUoF5JG0fDv76G 1hZZc2nTjBaNbR3wK8e/acmzppvPS0hy5ZRDjabwAvh5yqRUYiTF5vx/RqHZnGpNsAja 8p61bb98qaRoPcNj2BHcfwqSGiTxkLvONA1gBDhTnkt2YuOICcjmNWkd6x9Hlj8tuFJ9 vx1AGXgAPtQQSrNPIl1LrlZLMJ3nVqr3C+QHWpKQD2SqWfupyLWnQTmeb5ZNIfYIj7Xy WdQQ8hPVj2VUT2G4ItUwPAARxHjF/IIO/6tuNb0cw8ZUI9hPg7qxEbApbhvL9D/gWntF ZBOw== X-Gm-Message-State: AOAM530Y9HEiZ29mZ1BwbLO5QKb/KLCmgOp0FA8Jq6prRI0J89XOgWo2 DWOy/MAsq5mryfjigpDRh7o= X-Google-Smtp-Source: ABdhPJz9mGLb9IW4iTd1SOtKTngT/AeABEft+8pv1Zn9tq3tfbHg/W6U7KM2ttQTxLVb7Iu3GOEaxw== X-Received: by 2002:a1c:e388:: with SMTP id a130mr9457278wmh.187.1614781405171; Wed, 03 Mar 2021 06:23:25 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Mar 2021 06:23:24 -0800 (PST) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: Linus Walleij , Rob Herring , Michael Walle , Bartosz Golaszewski , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, Jonas Gorski , =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= , 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 13/14] Documentation: add BCM6318 pincontroller binding documentation Date: Wed, 3 Mar 2021 15:23:09 +0100 Message-Id: <20210303142310.6371-14-noltari@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210303142310.6371-1-noltari@gmail.com> References: <20210303142310.6371-1-noltari@gmail.com> MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add binding documentation for the pincontrol core found in BCM6318 SoCs. Signed-off-by: Álvaro Fernández Rojas Signed-off-by: Jonas Gorski --- v3: add new gpio node v2: remove interrupts .../pinctrl/brcm,bcm6318-pinctrl.yaml | 187 ++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6318-pinctrl.yaml diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,bcm6318-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/brcm,bcm6318-pinctrl.yaml new file mode 100644 index 000000000000..979b9d06de15 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm6318-pinctrl.yaml @@ -0,0 +1,187 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/brcm,bcm6318-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom BCM6318 pin controller + +maintainers: + - Álvaro Fernández Rojas + - Jonas Gorski + +description: |+ + The pin controller node should be the child of a syscon node. + + Refer to the the bindings described in + Documentation/devicetree/bindings/mfd/syscon.yaml + +properties: + compatible: + const: brcm,bcm6318-pinctrl + +patternProperties: + '^gpio$': + type: object + properties: + compatible: + const: brcm,bcm6318-gpio + + data: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Offset in the register map for the data register (in bytes). + + dirout: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Offset in the register map for the dirout register (in bytes). + + gpio-controller: true + + "#gpio-cells": + const: 2 + + gpio-ranges: + maxItems: 1 + + required: + - gpio-controller + - gpio-ranges + - '#gpio-cells' + + '^.*$': + if: + type: object + then: + properties: + function: + $ref: "/schemas/types.yaml#/definitions/string" + enum: [ ephy0_spd_led, ephy1_spd_led, ephy2_spd_led, ephy3_spd_led, + ephy0_act_led, ephy1_act_led, ephy2_act_led, ephy3_act_led, + serial_led_data, serial_led_clk, inet_act_led, inet_fail_led, + dsl_led, post_fail_led, wlan_wps_led, usb_pwron, + usb_device_led, usb_active ] + + pins: + $ref: "/schemas/types.yaml#/definitions/string" + enum: [ gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7, + gpio8, gpio9, gpio10, gpio11, gpio12, gpio13, gpio40 ] + +required: + - compatible + +additionalProperties: false + +examples: + - | + gpio_cntl@10000080 { + compatible = "syscon", "simple-mfd"; + reg = <0x10000080 0x80>; + + pinctrl: pinctrl { + compatible = "brcm,bcm6318-pinctrl"; + + gpio { + compatible = "brcm,bcm6318-gpio"; + data = <0xc>; + dirout = <0x4>; + + gpio-controller; + gpio-ranges = <&pinctrl 0 0 50>; + #gpio-cells = <2>; + }; + + pinctrl_ephy0_spd_led: ephy0_spd_led { + function = "ephy0_spd_led"; + pins = "gpio0"; + }; + + pinctrl_ephy1_spd_led: ephy1_spd_led { + function = "ephy1_spd_led"; + pins = "gpio1"; + }; + + pinctrl_ephy2_spd_led: ephy2_spd_led { + function = "ephy2_spd_led"; + pins = "gpio2"; + }; + + pinctrl_ephy3_spd_led: ephy3_spd_led { + function = "ephy3_spd_led"; + pins = "gpio3"; + }; + + pinctrl_ephy0_act_led: ephy0_act_led { + function = "ephy0_act_led"; + pins = "gpio4"; + }; + + pinctrl_ephy1_act_led: ephy1_act_led { + function = "ephy1_act_led"; + pins = "gpio5"; + }; + + pinctrl_ephy2_act_led: ephy2_act_led { + function = "ephy2_act_led"; + pins = "gpio6"; + }; + + pinctrl_ephy3_act_led: ephy3_act_led { + function = "ephy3_act_led"; + pins = "gpio7"; + }; + + pinctrl_serial_led: serial_led { + pinctrl_serial_led_data: serial_led_data { + function = "serial_led_data"; + pins = "gpio6"; + }; + + pinctrl_serial_led_clk: serial_led_clk { + function = "serial_led_clk"; + pins = "gpio7"; + }; + }; + + pinctrl_inet_act_led: inet_act_led { + function = "inet_act_led"; + pins = "gpio8"; + }; + + pinctrl_inet_fail_led: inet_fail_led { + function = "inet_fail_led"; + pins = "gpio9"; + }; + + pinctrl_dsl_led: dsl_led { + function = "dsl_led"; + pins = "gpio10"; + }; + + pinctrl_post_fail_led: post_fail_led { + function = "post_fail_led"; + pins = "gpio11"; + }; + + pinctrl_wlan_wps_led: wlan_wps_led { + function = "wlan_wps_led"; + pins = "gpio12"; + }; + + pinctrl_usb_pwron: usb_pwron { + function = "usb_pwron"; + pins = "gpio13"; + }; + + pinctrl_usb_device_led: usb_device_led { + function = "usb_device_led"; + pins = "gpio13"; + }; + + pinctrl_usb_active: usb_active { + function = "usb_active"; + pins = "gpio40"; + }; + }; + };