From patchwork Wed Mar 10 12:54:54 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: 12128043 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 24352C433DB for ; Wed, 10 Mar 2021 13:00:03 +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 CBB4A64F4D for ; Wed, 10 Mar 2021 13:00:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CBB4A64F4D 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=0YAny9TxGlFICfif+TcnreD0BR9/WRaw1mMJ2lyRMQE=; b=mbOJgPJJF+JIvziLJ4Ucy5DuB a43BDER3rgzGUQCG48shqTPjp+lI81+dlsHQhu4RR7mHe6AsgvVZzmXajksAek1mCn5d9+VWhaDgx 1iSlIfLGI7JOVHXz/fhlpbdfs5vjyc+ZGPjZieAIDc3FKkvAKHv+uOwCbPCTIjSSLU8WtfdRZzClh kpG2XaxYhv/jiZ/BlfrbnSLfzAfa8yV/qjFBUzq6Ois7YMFXCwx5fMovNQ+g+migUh3aP1vp7gPrz GaM7wGXIX67lrB8+0UDljbxPqGfFInBS0zVw6PIE/8JlFFW0pCx5XNMtrE0Cgx0kZoF4AGYoCENKA 4qqdcwqhw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJyPs-006qEO-BC; Wed, 10 Mar 2021 12:58:21 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJyMq-006pij-6u for linux-arm-kernel@lists.infradead.org; Wed, 10 Mar 2021 12:57:14 +0000 Received: by mail-wr1-x435.google.com with SMTP id e10so23181936wro.12 for ; Wed, 10 Mar 2021 04:55:12 -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=pV/Tba5lRESMsvkIpxHTDVYOP0X8Hx1nnfc86bQlUA0=; b=QAp7bWIVIDuxhm0ZzzJRxO8SavdYrFt8jUPAzqUTIDH3aPxHs2vzNcLPpJlefDNjHb AdlmBgmbcqdQSPIV58BH9lC2VVisKgWnhsrnJG39BLqApk7T42n+f5aBOzEr/pBozbMA cbEKhdxnOjg7Wi198L7kLBBwV0MH9YCD30vRG/J7itdXxp4U8rYqBH7WgqIkfgbWxqZq aPjhXSo07FvVWp7TDidPrftsk6kXcb44wjZhEtH79g93vb2/nPscWyLtbZzAZ3m92HRe VQXjvWX8aLexkW3g91hRehbDzN6bup1Ga4KJ2n2RsbQ+Ww6HokoD/+zy0Eajw/Z0znNh yZbA== 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=pV/Tba5lRESMsvkIpxHTDVYOP0X8Hx1nnfc86bQlUA0=; b=TjPqhc5t/SEhCFg74h8RiYbyzgxFw73AuneU5VjGcZ4O5E1Nh+LWdKhiyYiimeRpmL v0JtPpKphSwydJtn6eQ0ibUA6SCw4u8sc1ux7fU6NMM51cfX+Y+NFjp/Z0UloNPGBWr9 yxL2p9uRRnzDqHseAqrXDmjtOfBoswdRMaGdOh2/KZq+Bu4m0+rAs0JI9R+wykiP+aBQ RJHc6NKIixDK8YqQeHDTUZSIHC7NkWwqqm0b3fgrEudJnFWAI5HmalIn7/mGoMENca19 EbeaXzxkb8bBdeODTJk6Xs8Pbu4v4qhYpM9ZbQp7KTYkzNn+cAi/0cV4kRmwkIcQg/CD Yzug== X-Gm-Message-State: AOAM530N5PxrpsCQYgZWZVNKN6eXeJsTt4ws2cR1RNZ/1SWp3H521ZeE gtQC3aoeysbhWWvNJpEKI7E= X-Google-Smtp-Source: ABdhPJz7HpJUq/Sy1FHe9XKK6zPuGXaPCf2rfpIoDb82vNKrdG9WrV0yX3/jMZ1o1YKjUAD75qoHrA== X-Received: by 2002:a5d:538d:: with SMTP id d13mr3492993wrv.92.1615380911868; Wed, 10 Mar 2021 04:55:11 -0800 (PST) Received: from skynet.lan ([80.31.204.166]) by smtp.gmail.com with ESMTPSA id v6sm29403398wrx.32.2021.03.10.04.55.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 04:55:11 -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 , Andy Shevchenko , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v6 06/15] dt-bindings: add BCM6358 pincontroller binding documentation Date: Wed, 10 Mar 2021 13:54:54 +0100 Message-Id: <20210310125504.31886-7-noltari@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210310125504.31886-1-noltari@gmail.com> References: <20210310125504.31886-1-noltari@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210310_125712_614520_A1C312D2 X-CRM114-Status: GOOD ( 17.10 ) 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 BCM6358 SoCs. Signed-off-by: Jonas Gorski Co-developed-by: Jonas Gorski Signed-off-by: Álvaro Fernández Rojas --- v6: add changes suggested by Rob Herring v5: change Documentation to dt-bindings in commit title v4: no changes v3: add new gpio node v2: remove interrupts .../pinctrl/brcm,bcm6358-pinctrl.yaml | 140 ++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6358-pinctrl.yaml diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,bcm6358-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/brcm,bcm6358-pinctrl.yaml new file mode 100644 index 000000000000..a04fc445c761 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm6358-pinctrl.yaml @@ -0,0 +1,140 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/brcm,bcm6358-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom BCM6358 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,bcm6358-pinctrl + + gpio: + type: object + properties: + compatible: + const: brcm,bcm6358-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' + + additionalProperties: false + +patternProperties: + '^.*-pins$': + if: + type: object + then: + properties: + function: + $ref: "pinmux-node.yaml#/properties/function" + enum: [ ebi_cs, uart1, serial_led, legacy_led, led, spi_cs, utopia, + pwm_syn_clk, sys_irq ] + + pins: + $ref: "pinmux-node.yaml#/properties/pins" + enum: [ ebi_cs_grp, uart1_grp, serial_led_grp, legacy_led_grp, + led_grp, spi_cs_grp, utopia_grp, pwm_syn_clk, sys_irq_grp ] + +required: + - compatible + - gpio + +additionalProperties: false + +examples: + - | + gpio_cntl@fffe0080 { + compatible = "brcm,bcm6358-gpio-controller", "syscon", "simple-mfd"; + reg = <0xfffe0080 0x80>; + + pinctrl: pinctrl { + compatible = "brcm,bcm6358-pinctrl"; + + gpio { + compatible = "brcm,bcm6358-gpio"; + data = <0xc>; + dirout = <0x4>; + + gpio-controller; + gpio-ranges = <&pinctrl 0 0 40>; + #gpio-cells = <2>; + }; + + pinctrl_ebi_cs: ebi_cs-pins { + function = "ebi_cs"; + groups = "ebi_cs_grp"; + }; + + pinctrl_uart1: uart1-pins { + function = "uart1"; + groups = "uart1_grp"; + }; + + pinctrl_serial_led: serial_led-pins { + function = "serial_led"; + groups = "serial_led_grp"; + }; + + pinctrl_legacy_led: legacy_led-pins { + function = "legacy_led"; + groups = "legacy_led_grp"; + }; + + pinctrl_led: led-pins { + function = "led"; + groups = "led_grp"; + }; + + pinctrl_spi_cs_23: spi_cs-pins { + function = "spi_cs"; + groups = "spi_cs_grp"; + }; + + pinctrl_utopia: utopia-pins { + function = "utopia"; + groups = "utopia_grp"; + }; + + pinctrl_pwm_syn_clk: pwm_syn_clk-pins { + function = "pwm_syn_clk"; + groups = "pwm_syn_clk_grp"; + }; + + pinctrl_sys_irq: sys_irq-pins { + function = "sys_irq"; + groups = "sys_irq_grp"; + }; + }; + };