From patchwork Fri Nov 11 03:50:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinbo Zhu X-Patchwork-Id: 18437 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp522850wru; Thu, 10 Nov 2022 19:51:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf7B8jEPM7JnveLGsDqbQGSg5ZcUY2wY1Ouhd+8XRMCb0hPjKwaPD5C9cj5twr6OEwRYxX6a X-Received: by 2002:a17:906:7707:b0:78d:9324:6f18 with SMTP id q7-20020a170906770700b0078d93246f18mr413761ejm.664.1668138713735; Thu, 10 Nov 2022 19:51:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668138713; cv=none; d=google.com; s=arc-20160816; b=qkgnR0p+isViYPWRxxDZ+ENY/am6NXZeMEpthAoRHqRLLZQZYxh8rfOt3GNE6PlA2n DeSmyfy3aueH1x9OUZpfUD9AYPvzILV3QjAELSs5T6XwkDknp1lXwvC9qH93QT6oO8Np ryYQRuRwJ28n6uEMx1MqdArpScTWJJuFwiHxP6f3BY/FOiqajy1AQIi5ImAGgpUa8QBA /8XbfxsGFHJX/Xj2ZZWenX68hWP8b6knejDkum+zIVw3qe68/DJQcbxp6VMWf0iYbyOK gtHpZG8WAxEYMGcZH4nKWrrU4zZy3LdBP2H8Wcd1oqTqX4qJXDmKw/JFn5UmraTmDVlj +rYw== 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=xNeMagk5IZccPAkjHTa6sX87WvADmUTgLMjgn74FEHs=; b=cmsw+ZIcTSy4NPktLy8NfucnDTKTG7Yjv3DkrcSj22Yuv9Szof9mjgjtHLnubf1qyB IDWG07F5DeVLer1ovCFWrGW3rKr1P1/jXuiBoes6pfF3SlT2MEUTDq9GG7NaTtzG7y+G L9Uyls08EfSFHXob64+uOO99gG0IjsIVP9leqI0jutrpzP6JnlPmEbpTXhkdgAJ+qKbq NcAYgvzQkxTZdYBMLQUVZi8BdkSt8iqvsaAA0Nrj2n6cC08fs/Ck684wuSPA5xaJAKwD Xk2pBweuY4s943wYIyS//43jli+N3qTfmPiHLfFPQYOvhlyBKMluSpBwvOoyskln29fy nYDw== 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 oz19-20020a1709077d9300b0078ddf8926d2si1060629ejc.827.2022.11.10.19.51.29; Thu, 10 Nov 2022 19:51:53 -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 S231167AbiKKDuo (ORCPT + 99 others); Thu, 10 Nov 2022 22:50:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbiKKDui (ORCPT ); Thu, 10 Nov 2022 22:50:38 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ED03A663D1; Thu, 10 Nov 2022 19:50:36 -0800 (PST) Received: from loongson.cn (unknown [10.180.13.64]) by gateway (Coremail) with SMTP id _____8BxWtiLxm1jCQAGAA--.17221S3; Fri, 11 Nov 2022 11:50:35 +0800 (CST) Received: from localhost.localdomain (unknown [10.180.13.64]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxmFeFxm1jXqIQAA--.27367S3; Fri, 11 Nov 2022 11:50:34 +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 v9 2/2] dt-bindings: pinctrl: add loongson-2 pinctrl Date: Fri, 11 Nov 2022 11:50:28 +0800 Message-Id: <20221111035028.14193-2-zhuyinbo@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20221111035028.14193-1-zhuyinbo@loongson.cn> References: <20221111035028.14193-1-zhuyinbo@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8BxmFeFxm1jXqIQAA--.27367S3 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoWxXF47tF4DJw47Ar45Aw45trb_yoWrCF4UpF 4fur93GF1jqa1fu395Ca40vw1fGan3AFZrCanFv34jqr4qq34vvay3Kwn0qrWDuF43J3y5 WFy5u347XF1UCw7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU b78Fc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUXVWUAwA2ocxC64 kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26r4j6ryUM28E F7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJw A2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr1j6F4UJwAS0I0E0xvYzxvE52x082IY62kv0487 Mc804VCY07AIYIkI8VC2zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2 IY67AKxVWUAVWUtwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0 Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI48JMxAIw28IcVCjz48v1sIEY20_WwCFx2IqxV CFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r10 6r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxV WUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG 6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_Gr UvcSsGvfC2KfnxnUUI43ZEXa7IU1E4iUUUUUU== 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?1749170220001299587?= X-GMAIL-MSGID: =?utf-8?q?1749170220001299587?= Add the Loongson-2 pinctrl binding with DT schema format using json-schema. Signed-off-by: Yinbo Zhu --- Change in v9: 1. NO change, but other patch in this series patches set has change. 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 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)