From patchwork Thu Nov 3 08:02:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinbo Zhu X-Patchwork-Id: 14739 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp384726wru; Thu, 3 Nov 2022 01:10:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Q/Z4YS2Bc1eKEnuUkmnIohxaNI9tY+77gIlT4MfQo6NZe2YGpHayX5t+jBhzSHNJXtkcY X-Received: by 2002:a17:907:808:b0:730:54cc:b597 with SMTP id wv8-20020a170907080800b0073054ccb597mr27725512ejb.434.1667463037556; Thu, 03 Nov 2022 01:10:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667463037; cv=none; d=google.com; s=arc-20160816; b=QdT6Yf/Qxb2ncyIj9S0GTnoFB/80pHlnbJkIaP5Fqn5xUvWGD5svVKY8w5+S9IeEXP zfXB3/2TFBCqWTlxiUtMel63RVxPV8c96R0lvMGREBg2Hvi0nqfT9JgJQTf3zW69waji YewyRrk86PnkObm2NYP/h5fpd06UQ1WtmSsWjH17tbcF+Edf02dSFmCd4JAkH2K7FMic 0TiJ2+SQRqclzipcO8VIB+nFV79AYIko/z9ST8NY7Z/g0r+JfcC7B8qyCOH91jb5T6zw H1ULjM8zRI774eIy5F2KaNVOl4ToJMCaAWKIGliubuq6ybskCp358ljT2lkTWmksOTO0 rhRQ== 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=kks3WEhu6nxWCXXTtePS7t5z9YBteY9XviNbQOUD4VU=; b=VPQYBpp+sUBu6C6F8kZCTHCxdnDt3Dxf6tUr6wPh/jsb+iVHlMQpNi2wm9fjQooj9I 9kMgY9T6EBPCYOpYW3hqBf5NhJMJn1+cIFM3tffLiOuxFOsSoRtchmDTdwBaGjqb0xGR 9xU2l97dbOvDfC/cRrsqNEtR/V3kP5lw0FHDX2YSjiXdaBc0i/fhNjQAJHtEYhEwPI5X 7bx2g9C3gVXcKx4Y3OA+Jk7ekd3y/GumYEl1byEPJOfBuAl5DStKiOPnTXlwFq6lS+Fv 38kUMAqlG0ti1ntbAORnqVvQdyBJAdXZDUroMBiS9B6mzMuuG/vg3ZOh1FigqoM34KSr UX9A== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq40-20020a1709073f2800b0073146b3f95asi519462ejc.632.2022.11.03.01.10.13; Thu, 03 Nov 2022 01:10:37 -0700 (PDT) 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 S230520AbiKCICe (ORCPT + 99 others); Thu, 3 Nov 2022 04:02:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229759AbiKCICa (ORCPT ); Thu, 3 Nov 2022 04:02:30 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E3214273B; Thu, 3 Nov 2022 01:02:28 -0700 (PDT) Received: from loongson.cn (unknown [10.180.13.64]) by gateway (Coremail) with SMTP id _____8DxvreTdWNjoC4EAA--.9635S3; Thu, 03 Nov 2022 16:02:27 +0800 (CST) Received: from localhost.localdomain (unknown [10.180.13.64]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxTuCLdWNjXnwLAA--.33791S3; Thu, 03 Nov 2022 16:02:26 +0800 (CST) From: Yinbo Zhu To: Linus Walleij , Rob Herring , Krzysztof Kozlowski , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, zhanghongchen , Yinbo Zhu Subject: [PATCH v7 2/2] dt-bindings: pinctrl: add loongson-2 pinctrl Date: Thu, 3 Nov 2022 16:02:17 +0800 Message-Id: <20221103080217.2533-2-zhuyinbo@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20221103080217.2533-1-zhuyinbo@loongson.cn> References: <20221103080217.2533-1-zhuyinbo@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8BxTuCLdWNjXnwLAA--.33791S3 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoWxXF47tF4rJr1fCrykAFW7CFg_yoWrAr43pF 4fC3sxGF1jqa1fu395Ja40vw1fGan7AFZrCanFv34jqr4qqa4vvay5Krn0qrWDuF43JrW5 WFy5u347XF1UCr7anT9S1TB71UUUUUDqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU b7xFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUGVWUXwA2ocxC64 kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26r4j6ryUM28E F7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJw A2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr1j6F4UJwAS0I0E0xvYzxvE52x082IY62kv0487 Mc804VCY07AIYIkI8VC2zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2 IY67AKxVWUAVWUtwAv7VC2z280aVAFwI0_Gr0_Cr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0 Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI48JMxAIw28IcVCjz48v1sIEY20_WwCFx2IqxV CFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r10 6r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxV WUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG 6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr 1UYxBIdaVFxhVjvjDU0xZFpf9x07j8miiUUUUU= 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748461722016178491?= X-GMAIL-MSGID: =?utf-8?q?1748461722016178491?= Add the Loongson-2 pinctrl binding with DT schema format using json-schema. Signed-off-by: Yinbo Zhu --- 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 f75464dadaaa..c9dc5ddbd9fe 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12038,6 +12038,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)