Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1274550lfc; Wed, 1 Jun 2022 13:52:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMaVIDKIGnpFYznnpn7EfBEGVZfnhMWCLgxNTi7MUYGvkCyQ8/h7Aa+bArG9bLOeF4IoZA X-Received: by 2002:a17:90a:740e:b0:1e2:a631:87e6 with SMTP id a14-20020a17090a740e00b001e2a63187e6mr1274604pjg.115.1654116729007; Wed, 01 Jun 2022 13:52:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654116729; cv=none; d=google.com; s=arc-20160816; b=d6KClZWAojGHjyOJv1fqgJmebclAThSF2cUFnHBudX6TLvtXeWfd0o41STgMJwMHRy hmcybzJEEkeFA+ZZ81vE12Tj+o82XMVOQQyEaHi1DFooV//eWrL1kGexxI2OURjGDuE9 fYX5gKe2Hc8vEZK8NC0B1Yy0jj9nyouUhaxY9rImKdOt+URYFe2Kms1vmn1aumJU7Rdp DZ1rGspxLAsKiRLiotHQHpf9d7eYhetD34pxMo4jXpJp0i4oHvbrLjiKF5H5hNE/Ph/J +WELG8QRpVeSXjnSlyVxGvvHtN0ASG7D8zy603RrLkGA5OWoZDcCInFbwQru1MpSfjvJ RZLg== 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=FHBcfO0uAYUybVdtJK5lNI/fu56aKrYcpqv1l8BgzSU=; b=AZxbdIs0Z7FuWIUb0Lnsl8QSPXgThNUQ7Gulx7SuTRlteBmbHhljXnbreIWEXtM82d lFOT6KMTcC0jvbd7114oR8IxVBs3m3h+Bhl7gR2jv/Tge8XDjq86ynUU70ddAm7pDBUC XcxKEmwPKFIELfJmW07FIkqxTz+3mSyEQZ519mQv2WukiGcORZ87yzfm5H1F4W4FTWvn ZDvVmN01uFa/cuw/uGWPpGwZ7C1c/k3XXjqv+CeCL87Ckwp8/rFzePVlY4iBDuifgW4D WJePg2kvH3lNPvdajzsUKQVzour+DT3b6/ij5cHHZd/wNhCtZNUEaKRNbp7SaaL+H90w /6yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=KUux18MM; 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 pj5-20020a17090b4f4500b001e336c884c7si7738877pjb.182.2022.06.01.13.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:52:08 -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=KUux18MM; 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 2AD2A2BF2BF; Wed, 1 Jun 2022 12:59:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348365AbiEaWUQ (ORCPT + 99 others); Tue, 31 May 2022 18:20:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348389AbiEaWUF (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 36D4D9E9C3; Tue, 31 May 2022 15:20:02 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nfraprado) with ESMTPSA id 90A671F43F1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1654035601; bh=dqvPbD0+LyE8BrCyvcj4tkNdD3HuNjmZ6QAi2jlf4lY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KUux18MMXlb51shdebtxX+3nedmXE19+HQ65ny3FB5b7mvKStmQbMrQrhnRE6giNC /EMiebD2qDDTbz1uEfP9PCMOJXrSyMrTSIAEJT7i/paBPNcZRTtQxKlPl8G8FjsNAb ytuWmbomZTbqlPaqDBdFow89+M6nIrqE1cRPhnftfQ6jWYO7Ch9jue4Gu1P57Y9091 8TLKZ6Ph4C3kZw/UDE2Sc/StNoAY+0oCu/YiiqK4BFgWZyvAX1ETJ8+YV9OBkksNFz kZx8duSUqP7ZGjSPdSrocuIGABHGsAwWktMdgZG7Pxyl+ElW8UKdsASUU6scbTxBxF gXyofvy9WtO6g== 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 1/2] dt-bindings: pinctrl: mt8192: Switch drive-strength-adv for -microamp Date: Tue, 31 May 2022 18:19:53 -0400 Message-Id: <20220531221954.160036-2-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 e5fabbe43f3f ("pinctrl: mediatek: paris: Support generic PIN_CONFIG_DRIVE_STRENGTH_UA") added support for using drive-strength-microamp instead of mediatek,drive-strength-adv. Since there aren't any users of mediatek,drive-strength-adv on mt8192 yet, remove this property and add drive-strength-microamp in its place, which has a clearer meaning. While at it, add a new 'if' block to validate that drive-strength and drive-strength-microamp aren't 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: - Added 'if' block to make drive-strength and drive-strength-microamp mutually exclusive - Changed commit title to be more precise - Dropped Fixes tag .../bindings/pinctrl/pinctrl-mt8192.yaml | 35 ++++++------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml index c90a132fbc79..c8092b218f2f 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml @@ -80,31 +80,8 @@ patternProperties: dt-bindings/pinctrl/mt65xx.h. It can only support 2/4/6/8/10/12/14/16mA in mt8192. enum: [2, 4, 6, 8, 10, 12, 14, 16] - mediatek,drive-strength-adv: - description: | - Describe the specific driving setup property. - For I2C pins, the existing generic driving setup can only support - 2/4/6/8/10/12/14/16mA driving. But in specific driving setup, they - can support 0.125/0.25/0.5/1mA adjustment. If we enable specific - driving setup, the existing generic setup will be disabled. - The specific driving setup is controlled by E1E0EN. - When E1=0/E0=0, the strength is 0.125mA. - When E1=0/E0=1, the strength is 0.25mA. - When E1=1/E0=0, the strength is 0.5mA. - When E1=1/E0=1, the strength is 1mA. - EN is used to enable or disable the specific driving setup. - Valid arguments are described as below: - 0: (E1, E0, EN) = (0, 0, 0) - 1: (E1, E0, EN) = (0, 0, 1) - 2: (E1, E0, EN) = (0, 1, 0) - 3: (E1, E0, EN) = (0, 1, 1) - 4: (E1, E0, EN) = (1, 0, 0) - 5: (E1, E0, EN) = (1, 0, 1) - 6: (E1, E0, EN) = (1, 1, 0) - 7: (E1, E0, EN) = (1, 1, 1) - So the valid arguments are from 0 to 7. - $ref: /schemas/types.yaml#/definitions/uint32 - enum: [0, 1, 2, 3, 4, 5, 6, 7] + drive-strength-microamp: + enum: [125, 250, 500, 1000] mediatek,pull-up-adv: description: | @@ -138,6 +115,14 @@ patternProperties: required: - pinmux + allOf: + - if: + required: + - drive-strength-microamp + then: + properties: + drive-strength: false + additionalProperties: false allOf: -- 2.36.1