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: 681467 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F02C6C77B7D for ; Wed, 10 May 2023 12:36:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236681AbjEJMgm (ORCPT ); Wed, 10 May 2023 08:36:42 -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: Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The AXP209 has a 4th GPIO, so add it in preparation for support in the driver. Signed-off-by: Jonathan McDowell --- 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: 681466 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFE5CC7EE23 for ; Wed, 10 May 2023 12:36:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237050AbjEJMgz (ORCPT ); Wed, 10 May 2023 08:36:55 -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: Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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: 680757 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5E0BC7EE23 for ; Wed, 10 May 2023 12:36:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237013AbjEJMgq (ORCPT ); Wed, 10 May 2023 08:36:46 -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: Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 { From patchwork Wed May 10 12:02:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan McDowell X-Patchwork-Id: 680758 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01550C7EE22 for ; Wed, 10 May 2023 12:02:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236366AbjEJMCT (ORCPT ); Wed, 10 May 2023 08:02:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235752AbjEJMCS (ORCPT ); Wed, 10 May 2023 08:02:18 -0400 X-Greylist: delayed 61 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 10 May 2023 05:02:17 PDT 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 5ED444ED7; Wed, 10 May 2023 05:02:17 -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=z8H44rBFTZY4TjUWBjN6TrB1XXhRt5aeYvbMpCw9dXc=; b=umz3uG+c8l/FBlg+yh4/xaC1Zx cx6v/g0gitksL1b15tseps4BYnsdNDLhiF7OoeQaBLwqIGYqgmh1f941M6ml9nOgqWxrKDCbOfuTo pAW/eBRHbKiYv+l13qFHxsF3bNiKbvSyiQvMcfyEm2EtGVCYVENtoIWhHjlCh79gbhHdCbONx1DVX KdSy96olRByAMPO4wVSLv28Zu6lJVwnefohEone4TyJ+3BL46inO5h8cQq+nJahXJEtPCIBEmP5hU cRTB25iF6ihoYrci9Hn+PVP1csBmRi5Cp103GdHjFldUKVNIQBxSwPPA3YZTcAUVT7qmDrAC/RcZe DUJp0voQ==; 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 1pwiWF-007uiT-CU; Wed, 10 May 2023 13:02:07 +0100 Date: Wed, 10 May 2023 13:02:02 +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 4/5] ARM: dts: sun5i: Add port E pinmux settings for mmc2 Message-ID: <7949169f581cab37175602188f44bc26e79a45c0.1683719613.git.noodles@earth.li> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org These alternate pins for mmc2 are brought out to the 40 pin U14 header on the C.H.I.P and can be used to add an external MMC device with a 4 bit interface. See https://byteporter.com/ntc-chip-micro-sd-slot/ for further details on how. Signed-off-by: Jonathan McDowell Reviewed-by: Jernej Skrabec --- arch/arm/boot/dts/sun5i.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/sun5i.dtsi b/arch/arm/boot/dts/sun5i.dtsi index 250d6b87ab4d..ab7f675aeec4 100644 --- a/arch/arm/boot/dts/sun5i.dtsi +++ b/arch/arm/boot/dts/sun5i.dtsi @@ -517,6 +517,15 @@ mmc2_4bit_pc_pins: mmc2-4bit-pc-pins { bias-pull-up; }; + /omit-if-no-ref/ + mmc2_4bit_pe_pins: mmc2-4bit-pe-pins { + pins = "PE4", "PE5", "PE6", "PE7", + "PE8", "PE9"; + function = "mmc2"; + drive-strength = <30>; + bias-pull-up; + }; + mmc2_8bit_pins: mmc2-8bit-pins { pins = "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", From patchwork Wed May 10 12:02:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan McDowell X-Patchwork-Id: 681468 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22756C77B7D for ; Wed, 10 May 2023 12:02:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235752AbjEJMCx (ORCPT ); Wed, 10 May 2023 08:02:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236785AbjEJMCt (ORCPT ); Wed, 10 May 2023 08:02:49 -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 936467DB6; Wed, 10 May 2023 05:02:43 -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=CN7Du21sI7b6jGDaBlQmutgYmHF034Timd3PFCK1lso=; b=M2zpdK72/0OU+ZG8ALGEXrwrwo pbCuExJ9wxSviUCBdK/C6l3sKwYmBGSE6VrnOxgHXG6su0pMooB1N0aeEVjJUvlOumaGxmYxHdCNc wZisbB4/diwj151NoHNhkEsEW9tWL9A2wS5+c+68TnkUt9J7YzvFUGqv4+5F3L3UXmdBYzMgTk+pm Az9USfra7VkwiQ1wCLFVntirYXPfcOrErtfVN9ChS9lecVuC/s5jOh1zeXkcaWianIiITNRS9pVkT t3NuaT+qUvvWAmF8fvs3PGyVbVRg5NjX6zdrC9Qg316hiqRoLw98b3gDiSZlCNjglz4Oi2zeRW3ta mCcvrOmw==; 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 1pwiWf-007ujP-UW; Wed, 10 May 2023 13:02:34 +0100 Date: Wed, 10 May 2023 13:02:28 +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 5/5] ARM: dts: axp209: Add iio-hwmon node for internal temperature Message-ID: <2a9bd53a65c4a154cccba622c60cbffcdceaeb95.1683719613.git.noodles@earth.li> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This adds a DT node to hook up the internal temperature ADC to the iio-hwmon driver. The various voltage + current ADCs are consumed and exposed by their respective drivers, but this is not and is always available. Naming chosen to match the axp20x_ prefix the power sensors use. Signed-off-by: Jonathan McDowell --- arch/arm/boot/dts/axp209.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm/boot/dts/axp209.dtsi index ca240cd6f6c3..469d0f7d5185 100644 --- a/arch/arm/boot/dts/axp209.dtsi +++ b/arch/arm/boot/dts/axp209.dtsi @@ -48,6 +48,13 @@ * http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf */ +/ { + pmic-temp { + compatible = "iio-hwmon"; + io-channels = <&axp_adc 4>; /* Internal temperature */ + }; +}; + &axp209 { compatible = "x-powers,axp209"; interrupt-controller;