From patchwork Wed Mar 10 12:55:02 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: 12128071 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 C0A49C433DB for ; Wed, 10 Mar 2021 13:21:25 +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 1BB3B64FC8 for ; Wed, 10 Mar 2021 13:21:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1BB3B64FC8 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=Dm33D+GcEDo3m/Vk1dFwbx3NI0gEGi+0BtCBXZDDzdI=; b=MOl85Z9Kuj9xyN8vg11qH7ODJ RNrjo1FviIm7sXaFFSZrYAGQcl72leqUiEx+N+zSc4Qg0vJtyYFuyF97B7HpG3FouU5FxRxgVAXqM nOqz9eXwnBvOYvzYTtiWoPXlNr6BECng2tzf7z7t/rEXWriLJcEeIf1V/8ui6u6uxZVLqzKa7hUWj ib+Oqm4QaOpS7qti1NpEr1o/nAFOC653x3WEAFNKaQBgGjIO/fUfGP1uPk0Ch3lRKaQVmVQnNl9Nd oSCVyjyZwBPIuR3S4LZ3cwMqCb3pyJxeod/vcBta39tWq0IcLpZCpbZhOf7dOvym2G0dAdyGTxD15 7HBEP5mgw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJyky-006syO-I0; Wed, 10 Mar 2021 13:20:08 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJykm-006swY-Hc for linux-arm-kernel@desiato.infradead.org; Wed, 10 Mar 2021 13:19:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description; bh=y8u4kFT2qxM7FYtrCCD41fyv9/nnLIXy8on97Apq5dE=; b=sbs4YfhGisILzCtbQ1gyJdlz6R khJ/59XjBZ6lB7eP95ppxuRMLOJw17d1vivOJMQwo7Oy6LeaKwShAUV4OUfcpAkA3+WTyjP3QEa8x Q5+vnWDCvMcUm2hvPqmxHA/zzI2jNu6vxQgMuWo9bN/GfwIgeWDrpU1RpnRT6tzo/khPzutLiqFwM tRU5F4EOoJJbbEsrGgt6XVjElZ48gh1fRR7I2Crn1jmbKqRERXyJhQiY0jGiWWDYhCSY9NQW9see9 2Ni028O6RxDtOfxFn/bcR/iIO3TbbPtcG17YFZV8pEI89UGccijD8WuHANB8CXdPP/kzcFS4NWHK+ QJlZEIVA==; Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by casper.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJyMx-003TC6-EF for linux-arm-kernel@lists.infradead.org; Wed, 10 Mar 2021 12:55:32 +0000 Received: by mail-wm1-x32a.google.com with SMTP id e23so7040106wmh.3 for ; Wed, 10 Mar 2021 04:55:19 -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=y8u4kFT2qxM7FYtrCCD41fyv9/nnLIXy8on97Apq5dE=; b=ZRkKSZnhf6UdaJSKh6/2gcPW5AiP4mmd+WzUJO4pGL01xHmK7Bj/aTAP+IalUOFdDZ 0fvw5u77sTiT4gcUlhEf+So141VPhYHfY3/U9AUm554J2MAxnhM5Vo0rz0Oc50PrOPHe wGNAtmEHnOAl7omJAYm/n3gPQgpGQN3MNkmH5lUP2i1b6sDA3ntl8wBpgOyuZfnk+7RY rk901sHX8vlyEw1hY/ZuwrLiHs9K8lxTCUkmtAagZcMBQ2DEfO8M3HGb0EdrkdfpMIGW BzkCGlssxYbGuhhMhfv4ck9OezFFNOfuYvKGvyICqGv/oyiS74fq+2AV/g7seS8ubi2e Fg/Q== 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=y8u4kFT2qxM7FYtrCCD41fyv9/nnLIXy8on97Apq5dE=; b=X7pXaudbKlZbArp2TcrXMu5hg2ogrVglLYqdtdK0NhZqe8bVgWmwDaYxnh4WJ0JhL3 sL+e0b8un7kwVJxqSoHrKYLuZXjK/XG6R9+UCiziczUDP9NvX3r9IBB7D9eYNWwM4mzz vZLyD8sAsIdRftZmVpNtkPgqK3C6ANKePrjVAHXP/KTRB8vrLI5QuRlstu4IsCk8UPon 8Rm7QfdpmmbOBkc57dD/cJ9u98uan/4MdpvF4UckYF9t8DYBSiqKVa6g/5EbTieP76Ay 8BiTYH0HsQQuLpDNI1ZkClHNIVhB7xgCAUahyH0mmerEVFirn7fSCLRHzz0XJPNNG0zw FUPg== X-Gm-Message-State: AOAM532TqLTWnWVYSArN5O4e5qpOFoyrIOHmSIeKInbE/+6O8hSsVyuO m+E+hFqx3tP1bhMCde5AfI4= X-Google-Smtp-Source: ABdhPJwNW57QpphtdWVVpEGbUaIk8dFMTC6Z8su8Zzs5LouB5u15zaOSha1HeEjVd8ZBQgzfBs0Jtw== X-Received: by 2002:a1c:c906:: with SMTP id f6mr3197968wmb.128.1615380918748; Wed, 10 Mar 2021 04:55:18 -0800 (PST) Received: from skynet.lan ([80.31.204.166]) by smtp.gmail.com with ESMTPSA id v6sm29403398wrx.32.2021.03.10.04.55.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 04:55:18 -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 14/15] dt-bindings: add BCM6318 pincontroller binding documentation Date: Wed, 10 Mar 2021 13:55:02 +0100 Message-Id: <20210310125504.31886-15-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_125522_273130_91D8533B X-CRM114-Status: GOOD ( 13.97 ) 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: 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,bcm6318-pinctrl.yaml | 190 ++++++++++++++++++ 1 file changed, 190 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..6b607bd8d003 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm6318-pinctrl.yaml @@ -0,0 +1,190 @@ +# 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 + + 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' + + additionalProperties: false + +patternProperties: + '^.*-pins$': + if: + type: object + then: + properties: + function: + $ref: "pinmux-node.yaml#/properties/function" + 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: "pinmux-node.yaml#/properties/pins" + enum: [ gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7, + gpio8, gpio9, gpio10, gpio11, gpio12, gpio13, gpio40 ] + +required: + - compatible + - gpio + +additionalProperties: false + +examples: + - | + gpio_cntl@10000080 { + compatible = "brcm,bcm6318-gpio-controller", "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-pins { + function = "ephy0_spd_led"; + pins = "gpio0"; + }; + + pinctrl_ephy1_spd_led: ephy1_spd_led-pins { + function = "ephy1_spd_led"; + pins = "gpio1"; + }; + + pinctrl_ephy2_spd_led: ephy2_spd_led-pins { + function = "ephy2_spd_led"; + pins = "gpio2"; + }; + + pinctrl_ephy3_spd_led: ephy3_spd_led-pins { + function = "ephy3_spd_led"; + pins = "gpio3"; + }; + + pinctrl_ephy0_act_led: ephy0_act_led-pins { + function = "ephy0_act_led"; + pins = "gpio4"; + }; + + pinctrl_ephy1_act_led: ephy1_act_led-pins { + function = "ephy1_act_led"; + pins = "gpio5"; + }; + + pinctrl_ephy2_act_led: ephy2_act_led-pins { + function = "ephy2_act_led"; + pins = "gpio6"; + }; + + pinctrl_ephy3_act_led: ephy3_act_led-pins { + function = "ephy3_act_led"; + pins = "gpio7"; + }; + + pinctrl_serial_led: serial_led-pins { + pinctrl_serial_led_data: serial_led_data-pins { + function = "serial_led_data"; + pins = "gpio6"; + }; + + pinctrl_serial_led_clk: serial_led_clk-pins { + function = "serial_led_clk"; + pins = "gpio7"; + }; + }; + + pinctrl_inet_act_led: inet_act_led-pins { + function = "inet_act_led"; + pins = "gpio8"; + }; + + pinctrl_inet_fail_led: inet_fail_led-pins { + function = "inet_fail_led"; + pins = "gpio9"; + }; + + pinctrl_dsl_led: dsl_led-pins { + function = "dsl_led"; + pins = "gpio10"; + }; + + pinctrl_post_fail_led: post_fail_led-pins { + function = "post_fail_led"; + pins = "gpio11"; + }; + + pinctrl_wlan_wps_led: wlan_wps_led-pins { + function = "wlan_wps_led"; + pins = "gpio12"; + }; + + pinctrl_usb_pwron: usb_pwron-pins { + function = "usb_pwron"; + pins = "gpio13"; + }; + + pinctrl_usb_device_led: usb_device_led-pins { + function = "usb_device_led"; + pins = "gpio13"; + }; + + pinctrl_usb_active: usb_active-pins { + function = "usb_active"; + pins = "gpio40"; + }; + }; + };