From patchwork Wed May 10 12:01:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan McDowell X-Patchwork-Id: 92078 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3596381vqo; Wed, 10 May 2023 05:52:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7IhqwMnGUXKiNqeaOt0M+data/C/splrZbPIAEC0YhGIHPFhRg/Y5uGPW5SN4YjnC5NF5j X-Received: by 2002:a17:90a:708e:b0:24e:344e:d239 with SMTP id g14-20020a17090a708e00b0024e344ed239mr16586277pjk.25.1683723136198; Wed, 10 May 2023 05:52:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683723136; cv=none; d=google.com; s=arc-20160816; b=krJI74OtmuBjGPpXZgSRtUFOITC3ihdjAoV/+a8aVV/66+xawUk0NgBWJjk0V+FO0T gSYf/dxaPAuOF3SY0ie3uBTLNo58ePk2Ur1SuWoeF89PztUstXVBsbi3GYPfBs0+SrUf Dvk5U69ax+8Ykfb/b+PIgpNBzlbPhUna681lucrpx8T1FovesvkS+YK3FLNS0y1IKkP/ S3mb4N0ElozqRkfYxr7i1jAOddET8n6pmNw9E+YNXM6Z08EDO3GaKHuE96hGTLIVVQwK us0Pw9lBt1C+Ib911uTC7n9xawONeEMyvn3dVYKTto5S0P/l6xz1CQfySdjNlUv2dr3x +Hpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WZc2CWWT9PY6W1Amft6ANxyKX2Ha1FRBNyCzwjZVPYg=; b=KXQg/FVwwP7IWGfOpTPbJaQor3P86T0Talb4Azb9RYrcieZkzZQ17Z7ZTKjLrefCb9 t/bJtF2u0QOpTTWeFB5uBT4rTyv/xR7D8GxnhU9yOEcOubo8uCO8OZQraCgWiLXvMNAt 4OBkviH8Cmuz9tV+SFAzGHFLTsCQdkeXTS9IsQ3NGBZP7awl6HeOdMre4DDcsghwLUYk TAqbgc9tEz29Fi9FXjXDMDCVWvJeaHMpJlPX8LhZPNOqlimxEkl1ggmx1v0asiY7x+4A yY0G73FbHMNdftrqFM4/g5DxWjsv7iUj1LnZp00SMK5H/Y+rtNREmHMXXambRX44q1z4 ULmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@earth.li header.s=the header.b=Js+NIJCG; 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 q43-20020a17090a1b2e00b0024df4dee56bsi24299739pjq.138.2023.05.10.05.51.42; Wed, 10 May 2023 05:52:16 -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; dkim=fail header.i=@earth.li header.s=the header.b=Js+NIJCG; 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 S236846AbjEJMgn (ORCPT + 99 others); Wed, 10 May 2023 08:36:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237127AbjEJMg2 (ORCPT ); Wed, 10 May 2023 08:36:28 -0400 Received: from the.earth.li (the.earth.li [IPv6:2a00:1098:86:4d:c0ff:ee:15:900d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BB4EA5D6; Wed, 10 May 2023 05:36:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=earth.li; s=the; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject: Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=WZc2CWWT9PY6W1Amft6ANxyKX2Ha1FRBNyCzwjZVPYg=; b=Js+NIJCG6i+ZeaI6QG27C4QooU wHQsJnryVS9mB/G3Q7YMnkH45yVXpMmBi5Z+dVU7WFpjqDlWCGO7cfMOqBRe3kgD0Z7r1qLo5I4Af dvCe4bl6PmrW2pgZqqBIoin0cUyzGetRRNWZDGe6HhU2lxWIuRZmuhlj9MP4GDiuotR8KEeKVH8zn i0u+Hc20/LN7dVV0IopbzkBsTiK2Wab8Qn/uVb+fEesBm5ZOsUlxeU6rlM+NKncYzkMMWeiFandkS IbEpx5xHjk+5iC/Y1XjKgUuTrQUjU32KVeJjYE5BuRtyUC3+/Ifp7/Qek6uKTAI8ICn55PEycgFAB xZPbhQAA==; Received: from [2001:4d48:ad59:1403::16a3] (helo=earth.li) by the.earth.li with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pwiVR-007ueJ-Go; Wed, 10 May 2023 13:01:17 +0100 Date: Wed, 10 May 2023 13:01:12 +0100 From: Jonathan McDowell To: Rob Herring , Krzysztof Kozlowski , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Linus Walleij , Bartosz Golaszewski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: [PATCH v2 1/5] dt-bindings: gpio: Add GPIO3 for AXP209 GPIO binding schema Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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?1765511671123131022?= X-GMAIL-MSGID: =?utf-8?q?1765511671123131022?= The AXP209 has a 4th GPIO, so add it in preparation for support in the driver. Signed-off-by: Jonathan McDowell Acked-by: Jernej Skrabec Acked-by: Conor Dooley --- Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml b/Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml index 31906c253940..1638cfe90f1c 100644 --- a/Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml +++ b/Documentation/devicetree/bindings/gpio/x-powers,axp209-gpio.yaml @@ -44,6 +44,7 @@ patternProperties: - GPIO0 - GPIO1 - GPIO2 + - GPIO3 function: enum: From patchwork Wed May 10 12:01:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan McDowell X-Patchwork-Id: 92075 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3588825vqo; Wed, 10 May 2023 05:38:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ruET9JUPA9H/T2GJZWqMWRpBEpCmSkxyPyJhtjwq8NnBmiDHZuoBW4u9dhkynzh2RZHXo X-Received: by 2002:a05:6a20:4658:b0:ec:7e0c:5546 with SMTP id eb24-20020a056a20465800b000ec7e0c5546mr18364516pzb.7.1683722327391; Wed, 10 May 2023 05:38:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683722327; cv=none; d=google.com; s=arc-20160816; b=JPftpG7VZglg0cwBAL2oldKz0NFP2C/ZE0B4wOtWf6J/nY0fzP2cc13S7BUiHUEyYP I4bIakBaynTxQRQLHU9KLkL5y3R8EYrDkUt6DD84mHLpLiC9dMzrZDf9bBJE3+hdwLS0 AR8OVDoOBmiGi0H2WN+KdHlMYAA7s3PNMjn6d5LPlc8ujdpdvoIq5D1gSYH/QbxNIceP Cq3TwHfpmD3ngsgQ468VmGSpcIfZf3VpxHNEIlxCxZPEArRSwSy0o0zNmfSpJWuuXcdq JbVPayeu0kXN928NQLPywPPEU0V5Ck6sSr5q18YLc6EbrvsjbzZr6i6O9nrql9aoMH9y PoCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1u21EgrVe1mbhCqk/BYORJb3V3qyKh1H63Bv4N/ch+M=; b=gld3zSE50ZPG/KYWRvpbZLb8mlZjDVqclltAu7sj5g1i/RAPXYG5KbSFb1s0aOZA9E SqG7CIVsIGhHC8XGve6uIQ4FBox+UAU2a/a/dTKBjQyLFM9DHQ7bIh0BtzZoo5du7HD9 +gU+ugSASILjsZgZC1naCstBn68d95CnLsk+5kSFNva+I+yqdH/FcxX0yUtst0mQRO87 v9lp31e6ilfaXVF9GenGVOH1MIHkWX6xmz0nC6OOY79qKDlD6vLDfSQ2k0EQy4XetubV /5lsWHCklh47dmcIdcNph0EVbS1F6Te0Vin8tm+5TWQX4I+HHhB4OXWaDcv144iDZr6N Slpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@earth.li header.s=the header.b=WnsnSvmk; 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 a4-20020a17090a854400b0024e35ef410fsi18944114pjw.131.2023.05.10.05.38.32; Wed, 10 May 2023 05:38:47 -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; dkim=fail header.i=@earth.li header.s=the header.b=WnsnSvmk; 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 S237091AbjEJMg4 (ORCPT + 99 others); Wed, 10 May 2023 08:36:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237096AbjEJMge (ORCPT ); Wed, 10 May 2023 08:36:34 -0400 Received: from the.earth.li (the.earth.li [IPv6:2a00:1098:86:4d:c0ff:ee:15:900d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7CEBA5FB; Wed, 10 May 2023 05:36:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=earth.li; s=the; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject: Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=1u21EgrVe1mbhCqk/BYORJb3V3qyKh1H63Bv4N/ch+M=; b=WnsnSvmkHYLNWWOhx1CJhmbR+A KsmPd5JHJIxztGWv2ZtBJurZb8vpzoz0ahKwDq3AvINTaxKOn0mNvl5+pMEDVeQaHOurjUJzoKJoD eJRCEBgyq2GHMvAres6z49rqNi74RNFv6LUiyHt/cSwFDl+2uSeRPZJWwaJkeIdg1BvH8xHrm6BCN vy47MrVOyURzUXNqpaD5Jlr92IA0Ghz2oTXcEsUJ425Q7QW4BPfDoeyXbEYGqbWHGF+/HJrAEgKTC mM/0O1z0I2Jm6WHno/RG45tQrlbWAYo4ZVNqK4Q71GDMNGqxlPDnOCSrjHUbsFJ58O3ifCIvQ2luL 8baLTsCA==; Received: from [2001:4d48:ad59:1403::16a3] (helo=earth.li) by the.earth.li with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pwiVh-007ufr-D5; Wed, 10 May 2023 13:01:33 +0100 Date: Wed, 10 May 2023 13:01:27 +0100 From: Jonathan McDowell To: Rob Herring , Krzysztof Kozlowski , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Linus Walleij , Bartosz Golaszewski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: [PATCH v2 2/5] pinctrl: axp209: Add support for GPIO3 on the AXP209 Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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?1765510823200968379?= X-GMAIL-MSGID: =?utf-8?q?1765510823200968379?= The AXP209 device has a 4th GPIO which has a slightly different register setup, where the control + status bits are held in a single register rather than sharing AXP20X_GPIO20_SS with GPIOs 0-2. Signed-off-by: Jonathan McDowell --- drivers/pinctrl/pinctrl-axp209.c | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/drivers/pinctrl/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp209.c index 0bc1b381a2b8..317691aee86b 100644 --- a/drivers/pinctrl/pinctrl-axp209.c +++ b/drivers/pinctrl/pinctrl-axp209.c @@ -30,6 +30,11 @@ #define AXP20X_GPIO_FUNCTION_OUT_HIGH 1 #define AXP20X_GPIO_FUNCTION_INPUT 2 +#define AXP20X_GPIO3_FUNCTIONS (BIT(2) | BIT(1)) +#define AXP20X_GPIO3_FUNCTION_OUT_LOW 0 +#define AXP20X_GPIO3_FUNCTION_OUT_HIGH BIT(1) +#define AXP20X_GPIO3_FUNCTION_INPUT BIT(2) + #define AXP20X_FUNC_GPIO_OUT 0 #define AXP20X_FUNC_GPIO_IN 1 #define AXP20X_FUNC_LDO 2 @@ -73,6 +78,7 @@ static const struct pinctrl_pin_desc axp209_pins[] = { PINCTRL_PIN(0, "GPIO0"), PINCTRL_PIN(1, "GPIO1"), PINCTRL_PIN(2, "GPIO2"), + PINCTRL_PIN(3, "GPIO3"), }; static const struct pinctrl_pin_desc axp22x_pins[] = { @@ -130,6 +136,14 @@ static int axp20x_gpio_get(struct gpio_chip *chip, unsigned int offset) unsigned int val; int ret; + /* AXP209 has GPIO3 status sharing the settings register */ + if (offset == 3) { + ret = regmap_read(pctl->regmap, AXP20X_GPIO3_CTRL, &val); + if (ret) + return ret; + return !!(val & BIT(0)); + } + ret = regmap_read(pctl->regmap, AXP20X_GPIO20_SS, &val); if (ret) return ret; @@ -144,6 +158,17 @@ static int axp20x_gpio_get_direction(struct gpio_chip *chip, unsigned int val; int reg, ret; + /* AXP209 GPIO3 settings have a different layout */ + if (offset == 3) { + ret = regmap_read(pctl->regmap, AXP20X_GPIO3_CTRL, &val); + if (ret) + return ret; + if (val & AXP20X_GPIO3_FUNCTION_INPUT) + return GPIO_LINE_DIRECTION_IN; + else + return GPIO_LINE_DIRECTION_OUT; + } + reg = axp20x_gpio_get_reg(offset); if (reg < 0) return reg; @@ -184,6 +209,15 @@ static void axp20x_gpio_set(struct gpio_chip *chip, unsigned int offset, struct axp20x_pctl *pctl = gpiochip_get_data(chip); int reg; + /* AXP209 has GPIO3 status sharing the settings register */ + if (offset == 3) { + regmap_update_bits(pctl->regmap, AXP20X_GPIO3_CTRL, + AXP20X_GPIO3_FUNCTIONS, + value ? AXP20X_GPIO3_FUNCTION_OUT_HIGH : + AXP20X_GPIO3_FUNCTION_OUT_LOW); + return; + } + reg = axp20x_gpio_get_reg(offset); if (reg < 0) return; @@ -200,6 +234,14 @@ static int axp20x_pmx_set(struct pinctrl_dev *pctldev, unsigned int offset, struct axp20x_pctl *pctl = pinctrl_dev_get_drvdata(pctldev); int reg; + /* AXP209 GPIO3 settings have a different layout */ + if (offset == 3) { + return regmap_update_bits(pctl->regmap, AXP20X_GPIO3_CTRL, + AXP20X_GPIO3_FUNCTIONS, + config == AXP20X_MUX_GPIO_OUT ? AXP20X_GPIO3_FUNCTION_OUT_LOW : + AXP20X_GPIO3_FUNCTION_INPUT); + } + reg = axp20x_gpio_get_reg(offset); if (reg < 0) return reg; From patchwork Wed May 10 12:01:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan McDowell X-Patchwork-Id: 92074 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3588502vqo; Wed, 10 May 2023 05:38:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5/LUp8ZI20qObnQ1W5ZaCx2xe43XROKWXo1s+pxyZY/2Ohm+fr4A/9dgRejmFWojvMEZ60 X-Received: by 2002:a17:903:44c:b0:1a6:e1ac:ecb8 with SMTP id iw12-20020a170903044c00b001a6e1acecb8mr17957451plb.43.1683722295050; Wed, 10 May 2023 05:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683722295; cv=none; d=google.com; s=arc-20160816; b=kmVVSZNhNp4AS4ZjW37FSJXLoskFTyXponmdg6E/ocKxuj1EC+sS5McGg1Q8zOr8JA 2okZUsbCGpnTWs0noYxesNKaGLnx6VeqAh3fKjF/p3VKPHgin2qYvUY0AFmislSBfKEA 4hvbMEkiKNL1x638j4r1jcmU8NnQRlKvaqE3tUHF9guFXlpoz+I5YACNvcPC4G2jvQ3c IdC5Sps5OKvIJBFrcEI8/2D7V60Bxo2QwNVEf8OD/9Kv/QwLmTKqzJElHCvWHgdDqpXQ tp9DXbEREvYFPKVgMufvJxHYIh5Xl6zdNas44ZLI4AsfQkBrxxIjHNAeEmQrnW+8Ie+g J0ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bKLK+W81vBKM/pECXVcxEnpWm3L3dUgY4C543mpVQh8=; b=Ez0lHnx7FopMOgS6N4JvuRsFIYaPu4H6XFGoOVpTj9eMKlgG1a+BYALUms8j0rI1Y9 mygHQNEA0rIo4A2cwkx0JM4+pzPbwc4XPjI5aChq/XAGZ4QLe/Y2MjIQjp8ow9ppJF0V NrnOOTAh/v+KXVoOdPHCUU9OLHwmNZDXThh85Qj70Kks9DTWQ/wg8Tt8CU36Tv7mDZCe mZhxM03J4+w6nI8mDBSmyfcJEIfq7ktLHbZW06sRenL3jZPyS9lXhNDV/ej+YAdNgyzz D32HvZX+BDSge7+5r5NewEZwnBnX1HZ8BvTmhur5lC56a2FRLSxzSkmGm5CtxH97jzex s0BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@earth.li header.s=the header.b=S3TggzWG; 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 o4-20020a170902d4c400b001a9b29b675csi4249594plg.317.2023.05.10.05.38.00; Wed, 10 May 2023 05:38:15 -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; dkim=fail header.i=@earth.li header.s=the header.b=S3TggzWG; 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 S237062AbjEJMgs (ORCPT + 99 others); Wed, 10 May 2023 08:36:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236872AbjEJMgb (ORCPT ); Wed, 10 May 2023 08:36:31 -0400 Received: from the.earth.li (the.earth.li [IPv6:2a00:1098:86:4d:c0ff:ee:15:900d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C4EEAD19; Wed, 10 May 2023 05:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=earth.li; s=the; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject: Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=bKLK+W81vBKM/pECXVcxEnpWm3L3dUgY4C543mpVQh8=; b=S3TggzWGud03/eGoUGKY/oIBIb 30ssvG04OkApn7aJUHLqdNHGpvG08YJQuDdPDCleZIu2Hj8XcdZR0+McddD85h7uBivQy/2heezeQ vRoqXe0vSGBnRQBgvskuFIiUVOg45Ti1vQjeqrhBLjp/c6BkmOPkfs/JxS6J8wJYopRcjDvyBNykG QFtlfUi8tIrJsWc6z2Dvx2MSltk2rWQhc+m6s1f2XXiQSWSOfiBxewdhhDcjluc+ETkmJEZSEJumz entf5Q6UF6vb1h0iVY+XNj96agLPdqjowBjhF2R3q1EDC6bdgf1UzKmSJGO3Zxqe+XFRgLYmfQijt CqTMJ4Ng==; Received: from [2001:4d48:ad59:1403::16a3] (helo=earth.li) by the.earth.li with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pwiVy-007ugz-AN; Wed, 10 May 2023 13:01:50 +0100 Date: Wed, 10 May 2023 13:01:43 +0100 From: Jonathan McDowell To: Rob Herring , Krzysztof Kozlowski , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Linus Walleij , Bartosz Golaszewski , Conor Dooley Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: [PATCH v2 3/5] ARM: dts: sun5i: chip: Enable bluetooth Message-ID: <49ff7f3cc79838a55a89baae09a4ba12c88573fb.1683719613.git.noodles@earth.li> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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?1763266008953076338?= X-GMAIL-MSGID: =?utf-8?q?1765510789225218372?= The C.H.I.P has an rtl8723bs device with the bluetooth interface hooked up on UART3. Support for this didn't exist in mainline when the DTS was initially added, but it does now, so enable it. Signed-off-by: Jonathan McDowell Acked-by: Jernej Skrabec --- arch/arm/boot/dts/sun5i-r8-chip.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/sun5i-r8-chip.dts b/arch/arm/boot/dts/sun5i-r8-chip.dts index fd37bd1f3920..4192c23848c3 100644 --- a/arch/arm/boot/dts/sun5i-r8-chip.dts +++ b/arch/arm/boot/dts/sun5i-r8-chip.dts @@ -255,6 +255,12 @@ &uart3 { pinctrl-0 = <&uart3_pg_pins>, <&uart3_cts_rts_pg_pins>; status = "okay"; + + bluetooth { + compatible = "realtek,rtl8723bs-bt"; + device-wake-gpios = <&axp_gpio 3 GPIO_ACTIVE_HIGH>; + host-wake-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */ + }; }; &usb_otg {