Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1235107lfc; Wed, 1 Jun 2022 12:35:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsd8v7+FvgN0A+V+Bl/iPfHqc+h89SuS5tYsiVb9k8Q6Km1b6y/8K+7pEUBSqdGV5MznWI X-Received: by 2002:a17:902:e78f:b0:163:7572:f83f with SMTP id cp15-20020a170902e78f00b001637572f83fmr1032395plb.60.1654112132800; Wed, 01 Jun 2022 12:35:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654112132; cv=none; d=google.com; s=arc-20160816; b=Lm9uUy777e/QvMtGMlfFfkz92tWfzK1q3Yz3JUA+WIsgL43czGNuqav+FszvBhTDDm wnPfKjyEu5O4y6TibQrDUuxrjdePtaEzFdq/7k4wt7KSlD8+MY48bjBbPWMKFjdFU6/I LrOHbD+8TIGS13fCJexhROqVxuilRv6sc5oZnNulE9R5gdHZofG+t5d62FjuU0471aIJ S3uoAlwE9Wn6+iwAkDKELvZl6Z6zApvn0SYQmGSs62w7/QbtaAQPxtA5O8z4icNSckNy yFPP01d8esb0MBycUeEM14Ze9SutkLdEIBvkoLWx0YRcWQ9oxZ86MHXFTZOyAsFgzoBS mIxA== 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:cc:to:from :dkim-signature; bh=jljYKWf/QXLVt6YBctd9A4hWB2aGEBypCbsRssIP/Rk=; b=rtfDQ42Ir0HhBpehYHi7cdXgIoWsSxbaKRuRH6b0DNexU8tsMEWrXLrfsAewGxOKVH ba81c7eTg1bP+HcCKl7uJUawbskydJdy7kRrrRnzl7YBZpSaix9emKrAVfK4xqB+HZ2P /LhbmHwlXtbiyTqPasA5JHCBv80carN8vBd3+1yZJlX0aAxUfTA+8yW6GWAGpyib0viA wYnvMfUtNrp9LjRqWTfR6hffDTTzBYmB6pDAMT5ZMm1IZdTzjnUtjh5bybuoU5QnOqsJ LpCiQtxfi5XF8WkOWTy/KYawLrpX3WwGna63L4RsArZHQJN6WKEJZ7N+7suwPzdydIJq QmwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=IAn59dev; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d14-20020a170902cece00b0016397d8ddeesi1644593plg.517.2022.06.01.12.35.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 12:35:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=IAn59dev; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C61691A358B; Wed, 1 Jun 2022 12:04:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348388AbiEaWUU (ORCPT + 99 others); Tue, 31 May 2022 18:20:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348390AbiEaWUF (ORCPT ); Tue, 31 May 2022 18:20:05 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F14419CF75; Tue, 31 May 2022 15:20:03 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nfraprado) with ESMTPSA id 5F16E1F43F21 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1654035602; bh=L1LFzcY2SS+Xz1rYP87W08WXZ151oxr1ApyX6lLzl/U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IAn59devWIMazgWA7WDdvX0I0LbRSMtm0nt30y1Udmz5jAZFslhBo9e5n7YK7fr4W IggvPxKYDtv/URk7XK+WQAN4SqG4qSi25nc7+qGTMaj++sWApmbJg1su2ka8Sjpn3m OG6eJnctPu5ooxqe+axl14PPOjy0vt7vd9JTOeJjo5mSV8gSyexL0yRWNnX/Xds+2M krTSzkWItWuGBkyIicZAvO+trl/anG7Wp/mJtZg9t9X/GC3/kHlhX08jFhhV6tBwqJ rGgb3SsajXHC1uAJvTXPGzsaBfDtCbB8OaUf5jBuxeeStzOzDno/l3e+z9Ql+GbHNt NxsgkrV/mPEpQ== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Linus Walleij Cc: AngeloGioacchino Del Regno , kernel@collabora.com, =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Krzysztof Kozlowski , Matthias Brugger , Rob Herring , Sean Wang , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v2 2/2] dt-bindings: pinctrl: mt8192: Use generic bias instead of pull-*-adv Date: Tue, 31 May 2022 18:19:54 -0400 Message-Id: <20220531221954.160036-3-nfraprado@collabora.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220531221954.160036-1-nfraprado@collabora.com> References: <20220531221954.160036-1-nfraprado@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=no 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 Commit cafe19db7751 ("pinctrl: mediatek: Backward compatible to previous Mediatek's bias-pull usage") allowed the bias-pull-up and bias-pull-down properties to be used for setting PUPD/R1/R0 type bias on mtk-paris based SoC's, which was previously only supported by the custom mediatek,pull-up-adv and mediatek,pull-down-adv properties. Since the bias-pull-{up,down} properties already have defines associated thus being more descriptive and is more universal on MediaTek platforms, and given that there are no mediatek,pull-{up,down}-adv users on mt8192 yet, remove the custom adv properties in favor of the generic ones. Note that only mediatek,pull-up-adv was merged in the binding, but not its down counterpart. While at it, also add 'if' blocks to prevent bias-disable, bias-pull-up and bias-pull-down to be used together, since they're mutually exclusive. Signed-off-by: NĂ­colas F. R. A. Prado Reviewed-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno --- Changes in v2: - Dropped Fixes tag - Added 'if' blocks to make bias-disable, bias-pull-up and bias-pull-down mutually exclusive .../bindings/pinctrl/pinctrl-mt8192.yaml | 44 +++++++++++++------ 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml index c8092b218f2f..6ce7e458d6fe 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml @@ -83,20 +83,21 @@ patternProperties: drive-strength-microamp: enum: [125, 250, 500, 1000] - mediatek,pull-up-adv: - description: | - Pull up settings for 2 pull resistors, R0 and R1. User can - configure those special pins. Valid arguments are described as below: - 0: (R1, R0) = (0, 0) which means R1 disabled and R0 disabled. - 1: (R1, R0) = (0, 1) which means R1 disabled and R0 enabled. - 2: (R1, R0) = (1, 0) which means R1 enabled and R0 disabled. - 3: (R1, R0) = (1, 1) which means R1 enabled and R0 enabled. - $ref: /schemas/types.yaml#/definitions/uint32 - enum: [0, 1, 2, 3] - - bias-pull-down: true - - bias-pull-up: true + bias-pull-down: + oneOf: + - type: boolean + description: normal pull down. + - enum: [100, 101, 102, 103] + description: PUPD/R1/R0 pull down type. See MTK_PUPD_SET_R1R0_ + defines in dt-bindings/pinctrl/mt65xx.h. + + bias-pull-up: + oneOf: + - type: boolean + description: normal pull up. + - enum: [100, 101, 102, 103] + description: PUPD/R1/R0 pull up type. See MTK_PUPD_SET_R1R0_ + defines in dt-bindings/pinctrl/mt65xx.h. bias-disable: true @@ -123,6 +124,21 @@ patternProperties: properties: drive-strength: false + - if: + required: + - bias-disable + then: + properties: + bias-pull-up: false + bias-pull-down: false + + - if: + required: + - bias-pull-up + then: + properties: + bias-pull-down: false + additionalProperties: false allOf: -- 2.36.1