Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp93927rwb; Tue, 8 Nov 2022 22:58:45 -0800 (PST) X-Google-Smtp-Source: AMsMyM7nCOz6zhnAEHz9HFsaDDRqcICV7UgA0pCxrvl0P3kXPJ33R/HpQmcfaaSp1wEcaOs4oBMv X-Received: by 2002:a50:fa96:0:b0:463:56ff:4d3a with SMTP id w22-20020a50fa96000000b0046356ff4d3amr51575959edr.345.1667977124845; Tue, 08 Nov 2022 22:58:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667977124; cv=none; d=google.com; s=arc-20160816; b=NIqYXAaCrrqRPiWEMtkxlti6xXDkK/vV6HyxLWgGPnh/2ZPd5U/PxXNelXJ3WuazQc YNt57vH9UKdzq53rbN8ahegJ0Wdx/ZQMp+5rI06Z1jxRMPWnyk23uM/9H4CcdimfBH2q QtmLYBiZnHN1z8hlaoaSpW4YAZ4V08sso52EbUOiGc0fZUq5GGuEUYycVdwfJo808HP/ gzQXlGIRmD+deOqETAV+yTu4mpf6hIPb7WFDxqCphZX+7ujEXqSoVc4FD7BdhdDAzb/H jMNWPL/MrF9Hlld6OONkUB8jlT4Ilo3UuyyocgJHd9/Pc0zELoFWO4GDVarq2kEd4lLd AZmw== 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 :references:in-reply-to:message-id:date:subject:to:from; bh=hUkaM91WqPtM3Wzy75+4RQ+DBEmyXuJ5x2e2uvy2hKo=; b=0FiP5GA06v6ft6AzZg9E5cDyZUSfxpwiZ+hbuzXuBFn6M2PmIHx7irvrb6IhgTYX66 4Dyd898U7InyJwwCCK/pZRwPs9xg5ezkGLOezqR0M02wAJ3/trUQh2N1TmDF9gozBz3X 6RZiAcijWG+wLo5MVZm7yIZVLza+e9QBy0ZB66lx78uMhDlwclKNHZS3ssQOusXZT717 pvM8Uqr94gWoCY3M8kedVNLl4byIneHTQlNWRST00NDoQ2d5CjZZv5GT1GuBL5TvYgoD iGkVlxa3Gsr4ifMbiwz/OqmFcXpCcVaFm2zTDPIqphUR8h4XAsWI0NQCd/egO0oTCYDY /rmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wu11-20020a170906eecb00b0073d74bcac8dsi16988955ejb.513.2022.11.08.22.58.20; Tue, 08 Nov 2022 22:58:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229503AbiKIGNU (ORCPT + 94 others); Wed, 9 Nov 2022 01:13:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbiKIGNT (ORCPT ); Wed, 9 Nov 2022 01:13:19 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DC24FBE0B; Tue, 8 Nov 2022 22:13:16 -0800 (PST) Received: from loongson.cn (unknown [10.180.13.64]) by gateway (Coremail) with SMTP id _____8DxTtvxRGtjzHsFAA--.17793S3; Wed, 09 Nov 2022 14:13:05 +0800 (CST) Received: from localhost.localdomain (unknown [10.180.13.64]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxFleMRGtj_WAPAA--.24275S3; Wed, 09 Nov 2022 14:12:10 +0800 (CST) From: Yinbo Zhu To: Stephen Rothwell , Linus Walleij , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, zhanghongchen , Yinbo Zhu Subject: [PATCH v8 2/2] dt-bindings: pinctrl: add loongson-2 pinctrl Date: Wed, 9 Nov 2022 14:11:22 +0800 Message-Id: <20221109061122.786-2-zhuyinbo@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20221109061122.786-1-zhuyinbo@loongson.cn> References: <20221109061122.786-1-zhuyinbo@loongson.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8BxFleMRGtj_WAPAA--.24275S3 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoWxXF47tF47Zr4xKFyxtw4xZwb_yoWrAw1rpF 4fC3s3GF12qa1fu395Ga40vw1fGan7AFZrCanFv34jqr4qqa4vvay3Krn0qrWDuF43JFW5 WFy5u34UXF1UCw7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU b7xFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUAVWUZwA2ocxC64 kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26r1I6r4UM28E F7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJw A2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr1j6F4UJwAS0I0E0xvYzxvE52x082IY62kv0487 Mc804VCY07AIYIkI8VC2zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2 IY67AKxVWUAVWUtwAv7VC2z280aVAFwI0_Gr0_Cr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0 Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI48JMxAIw28IcVCjz48v1sIEY20_WwCFx2IqxV CFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r10 6r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxV WUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG 6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr 1UYxBIdaVFxhVjvjDU0xZFpf9x07jbHUDUUUUU= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the Loongson-2 pinctrl binding with DT schema format using json-schema. Signed-off-by: Yinbo Zhu --- Change in v8: 1. NO change, but other patch in this series patches set has change. Change in v7: 1. Add all change log information. Change in v6: 1. NO change, but other patch in this series patches set has change. Change in v5: 1. Drop dependencies. 2. Add spaces after '='. 3. Replace string loongson2 with loongson-2 in title. Change in v4: 1. Replace Loongson2 with Loongson-2. Change in v3: 1. Drop the quotes in "pinctrl.yaml#". 2. Remove the items in function node. 3. Add requird node for "group" and "function" in properties. Change in v2: 1. Add "$ref to pinctrl.yaml". 2. Put required after patternProperties. 3. Add "additionalProperties: false" after '-pins$' 4. Add "unevaluatedProperties: false" after 'pinmux$' 5. Fixup the broken indentation in patternProperties node. 6. Use 4 spaces for example indentation. .../pinctrl/loongson,ls2k-pinctrl.yaml | 125 ++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 126 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/loongson,ls2k-pinctrl.yaml diff --git a/Documentation/devicetree/bindings/pinctrl/loongson,ls2k-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/loongson,ls2k-pinctrl.yaml new file mode 100644 index 000000000000..34683a4856ad --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/loongson,ls2k-pinctrl.yaml @@ -0,0 +1,125 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/loongson,ls2k-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Loongson-2 SoC Pinctrl Controller + +maintainers: + - zhanghongchen + - Yinbo Zhu + +allOf: + - $ref: pinctrl.yaml# + +properties: + compatible: + const: loongson,ls2k-pinctrl + + reg: + maxItems: 1 + +patternProperties: + '-pins$': + type: object + + additionalProperties: false + + patternProperties: + 'pinmux$': + type: object + description: node for pinctrl. + $ref: pinmux-node.yaml# + + unevaluatedProperties: false + + properties: + groups: + description: + One or more groups of pins to mux to a certain function + items: + enum: [gpio, sdio, can1, can0, pwm3, pwm2, pwm1, pwm0, i2c1, i2c0, + nand, sata_led, lio, i2s, hda, uart2, uart1, camera, dv01, + dvo0] + function: + description: + The function that a group of pins is muxed to + enum: [gpio, sdio, can1, can0, pwm3, pwm2, pwm1, pwm0, i2c1, i2c0, + nand, sata_led, lio, i2s, hda, uart2, uart1, camera, dv01, + dvo0] + + required: + - groups + - function + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + pctrl: pinctrl@1fe00420 { + compatible = "loongson,ls2k-pinctrl"; + reg = <0x1fe00420 0x18>; + sdio_pins_default: sdio-pins { + sdio-pinmux { + groups = "sdio"; + function = "sdio"; + }; + + sdio-det-pinmux { + groups = "pwm2"; + function = "gpio"; + }; + }; + + pwm1_pins_default: pwm1-pins { + pinmux { + groups = "pwm1"; + function = "pwm1"; + }; + }; + + pwm0_pins_default: pwm0-pins { + pinmux { + groups = "pwm0"; + function = "pwm0"; + }; + }; + + i2c1_pins_default: i2c1-pins { + pinmux { + groups = "i2c1"; + function = "i2c1"; + }; + }; + + i2c0_pins_default: i2c0-pins { + pinmux { + groups = "i2c0"; + function = "i2c0"; + }; + }; + + nand_pins_default: nand-pins { + pinmux { + groups = "nand"; + function = "nand"; + }; + }; + + hda_pins_default: hda-pins { + grp0-pinmux { + groups = "hda"; + function = "hda"; + }; + + grp1-pinmux { + groups = "i2s"; + function = "gpio"; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 7c71cf2a6ddd..c4fc50eb260b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12041,6 +12041,7 @@ M: zhanghongchen M: Yinbo Zhu L: linux-gpio@vger.kernel.org S: Maintained +F: Documentation/devicetree/bindings/pinctrl/loongson,ls2k-pinctrl.yaml F: drivers/pinctrl/pinctrl-loongson2.c LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) -- 2.20.1