From patchwork Sat Jun 13 18:44:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bakker X-Patchwork-Id: 11602947 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DB4AB6A2 for ; Sat, 13 Jun 2020 18:45:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CBFC0207BC for ; Sat, 13 Jun 2020 18:45:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726589AbgFMSpN (ORCPT ); Sat, 13 Jun 2020 14:45:13 -0400 Received: from mail-oln040092004050.outbound.protection.outlook.com ([40.92.4.50]:56033 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726378AbgFMSpL (ORCPT ); Sat, 13 Jun 2020 14:45:11 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DdCp7CWlfg0I395goLEGRK178qPatJ+NRc9yU4SWYrEq/l3TvRpllvBBbqg2aH88zTNy2tu5h2hIoUvKQRyBllZDJt/BCNc27fdmuGqQSZzQ8i05Zzzl9AdWtOfuypItnrNkGYzsQq96Qg5c9MPRBi7nzar8XYd0sLcWI6QZBQiGTQM2nJeJNWU3liiP9LOOmiCRqd+Cgd5/gg/ohE1NV9cP/yRoYabcXnDPCOtXwSEmGYNSVWjdijQR+Y5Z7Lx1y+O/wCmSO+/T+gM1Pi9ABYWR/nTVal7tqOOZ+dW+B6dwkAgsd2HWFsZ/hS2PraGFj84/Z/brsoOsVI+nqRBp/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GfWAQq/eyYyrofXUihp5lrUVsOlLv+NB/k6IzgxYowk=; b=NBs+RXYuxoiLka+nQ3GWlpZcs4o85H6sgjHsFdeUwquodsXg5NRcxKBv204qFDZ3Ey7T8WSmTqkmhZxTS/PuMNskP0Pk6anKdVKIHAO1Ph15FFqgSh6gZ1aLA5loWQMPxsSe82V0VW+MSAZezpG0lJR1T1v1IdCekeqwoWXTH7/rwSEaXdKvdAbnk/P2hM1GMQhXybA0NshRRDWJUzO34twXH5QcicoYsH53xo3JQeFwANe4uKtCy1MdDD/pAfJygZWBSZRgi0/w2EQRMAr4CF7rFy8IfLILJtt1pwmvIratycPsVwo/40cqTnEB0CQxn9I6h5m8MFPkV55NF5ciLA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from BL2NAM02FT048.eop-nam02.prod.protection.outlook.com (10.152.76.54) by BL2NAM02HT059.eop-nam02.prod.protection.outlook.com (10.152.76.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18; Sat, 13 Jun 2020 18:45:08 +0000 Received: from BN6PR04MB0660.namprd04.prod.outlook.com (2a01:111:e400:7e46::4a) by BL2NAM02FT048.mail.protection.outlook.com (2a01:111:e400:7e46::109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18 via Frontend Transport; Sat, 13 Jun 2020 18:45:08 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:8A49BA7CFB3EBB7820773D23750FFEE0A43C3DFAB8935D19BCE4B359B5050E7F;UpperCasedChecksum:B17E8088141B84EBC9F9A90E0D4E40943B6CE0104AC8151EBCA8020172328FED;SizeAsReceived:7769;Count:49 Received: from BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383]) by BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383%9]) with mapi id 15.20.3088.026; Sat, 13 Jun 2020 18:45:08 +0000 From: Jonathan Bakker To: kgene@kernel.org, krzk@kernel.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jonathan Bakker Subject: [PATCH 1/5] ARM: dts: s5pv210: Add interrupt-controller property to gph3 Date: Sat, 13 Jun 2020 11:44:23 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200613184427.23394-1-xc-racer2@live.ca> References: <20200613184427.23394-1-xc-racer2@live.ca> X-ClientProxiedBy: MWHPR07CA0022.namprd07.prod.outlook.com (2603:10b6:300:116::32) To BN6PR04MB0660.namprd04.prod.outlook.com (2603:10b6:404:d9::21) X-Microsoft-Original-Message-ID: <20200613184427.23394-2-xc-racer2@live.ca> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jon-hp-6570b.telus (2001:569:fb68:9c00:8067:f823:1e15:7520) by MWHPR07CA0022.namprd07.prod.outlook.com (2603:10b6:300:116::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18 via Frontend Transport; Sat, 13 Jun 2020 18:45:06 +0000 X-Mailer: git-send-email 2.20.1 X-Microsoft-Original-Message-ID: <20200613184427.23394-2-xc-racer2@live.ca> X-TMN: [FDl2LBaMeOoW0B/1WEHRD/LZ7yYkABA2Dk7ncubYxzU+aSPzsjr15FTtKdHjxe7Q] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 10dcf376-afd3-467a-1e14-08d80fc9e4bd X-MS-TrafficTypeDiagnostic: BL2NAM02HT059: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YnVz9IsULPG7WHKB8+HCREaelBJ+QRm5QPvtvOd3B42VmTDPXLjEXYgSkEXnW/9UULcPwEX7UytwssU+9HCxqOjNnPbgBcyZzZF1VCTkdC/33WB0ls2CvXkQSXAoEclCnOOhoJgLg7+P40YNKjX4pd4Fd2CtCYUcFHNm9tSzz8KTntjxGe96T3DW+p+r/V2QKSjcfRpJq2T2xiwH5mp1Jg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR04MB0660.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: kwjJG1tIlP/ZG3jLMn7ALl2Llv5KN1Z5mLEfJJ5pHO3P3KKKjjCl/CSm4/lJtExZWzhTSxXAHwzyF7sQaWxWsa4rHMsBCJNkxExP0W8/fFm0s/4uZ9xsC9Kdg7aRyYy7y2IIjZ7yD0KgqTi/108RsjErsdQvVLnH0AuFwE/HBsOO2+ckpWa3zAJkhIAqkNGJQ5xlbar4hbMCnne6IiIfeg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10dcf376-afd3-467a-1e14-08d80fc9e4bd X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2020 18:45:07.9304 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2NAM02HT059 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The GPH3 pins on s5pv210 have interrupt support and had the interrupt-cells property but was missing the interrupt-controller property. Signed-off-by: Jonathan Bakker --- arch/arm/boot/dts/s5pv210-pinctrl.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/s5pv210-pinctrl.dtsi b/arch/arm/boot/dts/s5pv210-pinctrl.dtsi index 5e8b66281f01..b8c5172c31dd 100644 --- a/arch/arm/boot/dts/s5pv210-pinctrl.dtsi +++ b/arch/arm/boot/dts/s5pv210-pinctrl.dtsi @@ -273,6 +273,8 @@ gph3: gph3 { gpio-controller; #gpio-cells = <2>; + + interrupt-controller; #interrupt-cells = <2>; }; From patchwork Sat Jun 13 18:44:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bakker X-Patchwork-Id: 11602943 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7BE626A2 for ; Sat, 13 Jun 2020 18:45:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 60BA220E65 for ; Sat, 13 Jun 2020 18:45:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726595AbgFMSpN (ORCPT ); Sat, 13 Jun 2020 14:45:13 -0400 Received: from mail-oln040092004023.outbound.protection.outlook.com ([40.92.4.23]:25859 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726317AbgFMSpL (ORCPT ); Sat, 13 Jun 2020 14:45:11 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GiCRU9zKcjrUrFyp4V4t5PQMV9curJjpB1DmSOtn/7GoBikTYAylHIbItjHqt9nGZ4GiuNSRM84c7hF4sNh7+MdLp5e698IgMr0VDaSl3vZOEq21iTzUvonncdEUQJ7v7pghLZH3vaUKyx/ggS0tGqgpsZCBfvMg8S9pLIWwGnp7CAtaoPsSBhKi1dZarcZ231UGqqWSpI1msaIuiKLy+N5bFflN5Lvr2HkJ0INHb0TNuslNF9YeKlb1SBvR+cLf+rXVdnS7dyfLNB3ZmU1j4RWkOLk9DmC7y8COAIItpZGVBZTELveWEUYYlf8wjKYjzes0A03+sJqiqZPt9sdcHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dvjGMlP0p4ydQzKylxk3TSXScYB3wHDWTcJTtH6GffU=; b=RECe3uodgeTQiYXq0nFY3fdemKQ+zNgNyUL8NDjt+WnAoGFYDeMFddgI/AWgHVDWaJgd3mBCGeLAyxhliz5MNpg/bdAaFmI8tuE8ibMRV9ZWXM+9g2+Eu4X5Lhn3A++t7qqLE+4BvZ+ycM24+q/7XlBJUiyCt++9jiH63S6OettatwTZwxabL/IoXp/ehlEn0t1m2/hIodj1vdf+10o5ZcnLHeWYH3WK4CsE2s62DcKh0ti97xZrZ2vXHOXAamgQ+ieC8oEkFpdW3LkA16zaK7LxPLBI477JoFRspFfCyKJLYFj7kNIbrqfVbUk7FFnUXCE2iwva4fGE/LThXb0jDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from BL2NAM02FT048.eop-nam02.prod.protection.outlook.com (10.152.76.53) by BL2NAM02HT181.eop-nam02.prod.protection.outlook.com (10.152.77.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18; Sat, 13 Jun 2020 18:45:09 +0000 Received: from BN6PR04MB0660.namprd04.prod.outlook.com (2a01:111:e400:7e46::4a) by BL2NAM02FT048.mail.protection.outlook.com (2a01:111:e400:7e46::109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18 via Frontend Transport; Sat, 13 Jun 2020 18:45:09 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:F1B6EFC42A91AA4AB3BF9AA783FEDF4AE4AB6C6168DA52F2C1DC481C15A5934F;UpperCasedChecksum:2490ADD929B36AFAEEFAD3D87D3A147F39496B506C089934DBD0E6E962EBC957;SizeAsReceived:7764;Count:49 Received: from BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383]) by BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383%9]) with mapi id 15.20.3088.026; Sat, 13 Jun 2020 18:45:09 +0000 From: Jonathan Bakker To: kgene@kernel.org, krzk@kernel.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jonathan Bakker Subject: [PATCH 2/5] ARM: dts: s5pv210: Correct fuelgauge definition on Aries Date: Sat, 13 Jun 2020 11:44:24 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200613184427.23394-1-xc-racer2@live.ca> References: <20200613184427.23394-1-xc-racer2@live.ca> X-ClientProxiedBy: MWHPR07CA0022.namprd07.prod.outlook.com (2603:10b6:300:116::32) To BN6PR04MB0660.namprd04.prod.outlook.com (2603:10b6:404:d9::21) X-Microsoft-Original-Message-ID: <20200613184427.23394-3-xc-racer2@live.ca> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jon-hp-6570b.telus (2001:569:fb68:9c00:8067:f823:1e15:7520) by MWHPR07CA0022.namprd07.prod.outlook.com (2603:10b6:300:116::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18 via Frontend Transport; Sat, 13 Jun 2020 18:45:08 +0000 X-Mailer: git-send-email 2.20.1 X-Microsoft-Original-Message-ID: <20200613184427.23394-3-xc-racer2@live.ca> X-TMN: [qTdsrgnN2aNsunrb55IcN7Q9u5SDxbjyNcrIoJHaKcZv9lJtJhnBr6tT41fcc4jT] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 475b9800-023d-4968-2ac3-08d80fc9e5b8 X-MS-TrafficTypeDiagnostic: BL2NAM02HT181: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F8heqOmyiFa4pPhKMVr2cTedQWrDNQJ3CT/aY16kdV7ZPFu7UMMs2s5TY2rmE1tjLP4kGPcvPpXIln7hJN1kx5aItjLWvNN6zks25B1kOgCu09JTGmUn3RFosthf7PNfjPIZ8i8tu7gffeQ8z4vG/VMivPkiTCV+Ltzi3YpDvq8zgUEM0D/LiIBTaALliB/yXvBQzVmoK7Egjplp5eqb0A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR04MB0660.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: IzJ2ByTPHPqrUqCgRu8ByG4X7zdhURA/s34RebJcAc+YqfOqkpmkehG65TBQxRZTlMqNt19dbhAOzbRiaB8JO4hGa2i6ATkjway9l2PULjKjXaZy6Lcg8SnedpPHMCL1yd/YKQ6ww0vQbRV8nUB7PMvySw7udrH9D7DpUQqmomur7sLxSabyA2JPs82CbKQVXMfiCEHxhCkcf4uD8IVA3g== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 475b9800-023d-4968-2ac3-08d80fc9e5b8 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2020 18:45:09.3058 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2NAM02HT181 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Correct the fuelgauge definition because only the fuelgauge on fascinate4g has interrupt support (and even then it was wrong). Also, assign the GPIO pinctrl so the interrupt is properly configured Signed-off-by: Jonathan Bakker --- arch/arm/boot/dts/s5pv210-aries.dtsi | 4 +--- arch/arm/boot/dts/s5pv210-fascinate4g.dts | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi index cf858029292e..d3aeafc0f650 100644 --- a/arch/arm/boot/dts/s5pv210-aries.dtsi +++ b/arch/arm/boot/dts/s5pv210-aries.dtsi @@ -425,10 +425,8 @@ pinctrl-names = "default"; pinctrl-0 = <&fg_i2c_pins>; - fuelgauge@36 { + fg: fuelgauge@36 { compatible = "maxim,max17040"; - interrupt-parent = <&vic0>; - interrupts = <7>; reg = <0x36>; }; }; diff --git a/arch/arm/boot/dts/s5pv210-fascinate4g.dts b/arch/arm/boot/dts/s5pv210-fascinate4g.dts index 5e1b81823a8d..65eed01cfced 100644 --- a/arch/arm/boot/dts/s5pv210-fascinate4g.dts +++ b/arch/arm/boot/dts/s5pv210-fascinate4g.dts @@ -37,10 +37,27 @@ }; }; +&fg { + compatible = "maxim,max77836-battery"; + + interrupt-parent = <&gph3>; + interrupts = <3 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-names = "default"; + pinctrl-0 = <&fg_irq>; +}; + &pinctrl0 { pinctrl-names = "default"; pinctrl-0 = <&sleep_cfg>; + fg_irq: fg-irq { + samsung,pins = "gph3-3"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + /* Based on vendor kernel v2.6.35.7 */ sleep_cfg: sleep-cfg { PIN_SLP(gpa0-0, PREV, NONE); From patchwork Sat Jun 13 18:44:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bakker X-Patchwork-Id: 11602953 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C1DE46A2 for ; Sat, 13 Jun 2020 18:45:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC414207BC for ; Sat, 13 Jun 2020 18:45:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726645AbgFMSpb (ORCPT ); Sat, 13 Jun 2020 14:45:31 -0400 Received: from mail-oln040092004013.outbound.protection.outlook.com ([40.92.4.13]:23362 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726582AbgFMSpM (ORCPT ); Sat, 13 Jun 2020 14:45:12 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f1QmpPwUJ1ZOB45gOZxvgG3gOxFwUbqJB0pNKAXgKaT0Fc+QWEsCS9B5VFVNo4GvrU9tmjadYUZxF4KWYveOJ4CRvppbOMSLMZi/5s7+KMOZT2/HucyLmO0x+xfic7xAMfHmHv0OZJtATOq4NFTzP98xMS7M3yQlvLCRsGpbEzOFytBuE1q/aNV81qQQ0x0S4Uw0jm1zTx5uqCZaQt2Dsjq1Ib1j5hY3b08unM67zMRjEcqNbUvXiv2XgOatRbjLjprV6PQ5AIQYyb5HhexkUgB9VwR/Ldt/ptBVLa5HD0RMpDW37uwHi6Nr61/E7e0iEE2GGt5M7B6qiguriF1OFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qLhibS2AH1uHRC3+TqD15Yd73eMQZgZCUXQlC9VcWuM=; b=haTmMhzmKugajKF7Eb1ixwnlAlPmS22UU4J0Nt72BZoP/QnVelfZZMYEpUuYMtIzdFXOLliBFz0QrhCDPZdLC5Abb5tz/DH7TuVPe4Lt8IC1EboHTY7TJ0hHmqaaJB6rO8Ad/3CgHYfqEaaAEoZJJRF0RhZphqtH/45ia/nL6LvRBLNyNQ4CVYcjv73eDE8UB1abD7IBFbUwo4XS2PN9PjwDpX9nG36yTolwDHK7DdvKwYeAzHoM5EpvfxEP0HVKZJvAomTZ21Zp/zpUiMT0wY3uQTvSYma8Rt50KhAI5AezpzA+Mu5wN0MHKiLBR8vXI7IxNvyh6+KarlP5rr+nfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from BL2NAM02FT048.eop-nam02.prod.protection.outlook.com (10.152.76.56) by BL2NAM02HT159.eop-nam02.prod.protection.outlook.com (10.152.76.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18; Sat, 13 Jun 2020 18:45:10 +0000 Received: from BN6PR04MB0660.namprd04.prod.outlook.com (2a01:111:e400:7e46::4a) by BL2NAM02FT048.mail.protection.outlook.com (2a01:111:e400:7e46::109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18 via Frontend Transport; Sat, 13 Jun 2020 18:45:10 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:81909DD91A124551B6F3A5C934F8A1FFBFF35ECFBCB5488D6CAC2B0DF9ABB496;UpperCasedChecksum:40F606CB59A2CC265E455992DC82BA9A985A790B6EE1E1F124840D1FE2FC3043;SizeAsReceived:7760;Count:49 Received: from BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383]) by BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383%9]) with mapi id 15.20.3088.026; Sat, 13 Jun 2020 18:45:10 +0000 From: Jonathan Bakker To: kgene@kernel.org, krzk@kernel.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jonathan Bakker Subject: [PATCH 3/5] ARM: dts: s5pv210: Add support for GP2A light sensor on Aries Date: Sat, 13 Jun 2020 11:44:25 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200613184427.23394-1-xc-racer2@live.ca> References: <20200613184427.23394-1-xc-racer2@live.ca> X-ClientProxiedBy: MWHPR07CA0022.namprd07.prod.outlook.com (2603:10b6:300:116::32) To BN6PR04MB0660.namprd04.prod.outlook.com (2603:10b6:404:d9::21) X-Microsoft-Original-Message-ID: <20200613184427.23394-4-xc-racer2@live.ca> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jon-hp-6570b.telus (2001:569:fb68:9c00:8067:f823:1e15:7520) by MWHPR07CA0022.namprd07.prod.outlook.com (2603:10b6:300:116::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18 via Frontend Transport; Sat, 13 Jun 2020 18:45:09 +0000 X-Mailer: git-send-email 2.20.1 X-Microsoft-Original-Message-ID: <20200613184427.23394-4-xc-racer2@live.ca> X-TMN: [auD5zsh+km3+wiZ5YA5nm0/ObBGK7MDtIZ+uBXWXBl9UORvQab2ctCBnF3A0oA5K] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: d6cb9b12-1faf-4121-4a69-08d80fc9e687 X-MS-TrafficTypeDiagnostic: BL2NAM02HT159: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gIq6PW2/IkMEdjEf2+BJ2qJdPrMpevBTfADPcPQIP4mBIBD3wBWlhG+4GPnGEqR9TwwSbe84ghWJ7xsQPRX/y4g5SF3slLLvxF39rNuLAvFq15X62mEuiYYXgjwKsr8kSwMQrk7YoVgouDQugyhRRmRwPerhIue9ione1YdxVGFj0Lkgip758yZnH9GzBD3GsXlio0lFDcSxGSGDVqailg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR04MB0660.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: HGkomBur/rGwcrrQVXalMKnIucVweivQeaPGW4LUz5ZKbr7QcxbCc+9ATZqoZz+wMWd3QNrhZ6VsvQsa4jwrsLafhEx4L3h6gGHy0Kml5hO2cpk8j8qiZZWMsARC6ttQGBj66VGAUBdbs9ugnuMhKyRMQT384nLPP2B+2IV4aooCDJdhql+wJGe008fTU2H7HVHcu7puQZ/1NSoO4m+1ig== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6cb9b12-1faf-4121-4a69-08d80fc9e687 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2020 18:45:10.6882 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2NAM02HT159 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Aries boards have a GP2A light/proximity sensor attached over i2c-gpio. As the chip outputs a current and the board has no current ADC, a current shunt resistor and a voltage ADC are used. Signed-off-by: Jonathan Bakker --- arch/arm/boot/dts/s5pv210-aries.dtsi | 50 ++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi index d3aeafc0f650..b27d7c2e6dca 100644 --- a/arch/arm/boot/dts/s5pv210-aries.dtsi +++ b/arch/arm/boot/dts/s5pv210-aries.dtsi @@ -69,6 +69,18 @@ pinctrl-0 = <&touchkey_vdd_ena>; }; + gp2a_vled: regulator-fixed-2 { + compatible = "regulator-fixed"; + regulator-name = "VLED"; + enable-active-high; + gpio = <&gpj1 4 GPIO_ACTIVE_HIGH>; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + + pinctrl-names = "default"; + pinctrl-0 = <&gp2a_power>; + }; + wifi_pwrseq: wifi-pwrseq { compatible = "mmc-pwrseq-simple"; reset-gpios = <&gpg1 2 GPIO_ACTIVE_LOW>; @@ -468,9 +480,21 @@ pinctrl-names = "default"; pinctrl-0 = <&prox_i2c_pins>; - status = "disabled"; + light-sensor@44 { + compatible = "sharp,gp2ap002a00f"; + reg = <0x44>; + interrupt-parent = <&gph0>; + interrupts = <2 IRQ_TYPE_EDGE_FALLING>; + vdd-supply = <&gp2a_vled>; + vio-supply = <&gp2a_vled>; + io-channels = <&gp2a_shunt>; + io-channel-names = "alsout"; + sharp,proximity-far-hysteresis = /bits/ 8 <0x40>; + sharp,proximity-close-hysteresis = /bits/ 8 <0x20>; - /* Sharp gp2a prox/light sensor, incomplete mainline binding */ + pinctrl-names = "default"; + pinctrl-0 = <&gp2a_irq>; + }; }; i2c_magnetometer: i2c-gpio-7 { @@ -543,6 +567,14 @@ vdd-supply = <&ldo4_reg>; status = "okay"; + + gp2a_shunt: current-sense-shunt { + compatible = "current-sense-shunt"; + io-channels = <&adc 9>; + shunt-resistor-micro-ohms = <47000000>; /* 47 ohms */ + #io-channel-cells = <0>; + io-channel-ranges; + }; }; &fimd { @@ -618,6 +650,13 @@ samsung,pin-pud = ; }; + gp2a_irq: gp2a-irq { + samsung,pins = "gph0-2"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + pmic_dvs_pins: pmic-dvs-pins { samsung,pins = "gph0-3", "gph0-4", "gph0-5"; samsung,pin-function = ; @@ -686,6 +725,13 @@ samsung,pin-drv = ; }; + gp2a_power: gp2a-power { + samsung,pins = "gpj1-4"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + touchkey_i2c_pins: touchkey-i2c-pins { samsung,pins = "gpj3-0", "gpj3-1"; samsung,pin-pud = ; From patchwork Sat Jun 13 18:44:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bakker X-Patchwork-Id: 11602949 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 825391667 for ; Sat, 13 Jun 2020 18:45:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 716532081A for ; Sat, 13 Jun 2020 18:45:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726335AbgFMSp0 (ORCPT ); Sat, 13 Jun 2020 14:45:26 -0400 Received: from mail-oln040092005052.outbound.protection.outlook.com ([40.92.5.52]:59811 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726597AbgFMSpO (ORCPT ); Sat, 13 Jun 2020 14:45:14 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cWcUucdivqT09L29kCdKxE2kO8qy6BoP4/CYPG3ArOlLVhq1cUSG95gl7Pf+ApzmbN3D0Ux619fo+sBITLHRld0wPROu7uFC7pjvDNoC1I0uJ1mq/KW8YO41J/19cV5Jw5smUgL8/PDvAccKw1QhHzIEs4eJVisdawmMt/FoagnKr/nkOhXNEkkk97nDLzvCvVH9CtpUfHAdiN10OS2lgLK6gWmQTlbnMeHvpqMq1uo8HhchVNvzbRCSORARfufxFlXye7vrw9vbqt/bWbkvNTZvB4FcnaUc69SdlNCy0w67Y8JPMO9AIJqc7Pf7rXEt+4hOvXoiRcI1ZoEa7tfRUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wFf4K4khEPNJM8o6627pEv+rF9F0AxwtAAgwsqdy1Bk=; b=D53+w+nOXBuxv5T7TwvUcxQeQ3oayeb6vxzpKHj3IxVn2WUxsNKsmgO4zF29LO+OXFE70uqHBgq7et0C7sFRa50cJ4dIRpuUHnerlReeerj/lyWJEp1zYm2kngd/4PLyc1lzH8R4RsUV8tJnY9YmV8W98ujbXe4hcrU8P0HSSKSW+QIjbBIjF/S3vZ/KBFkiLc7Az1e9mF6rOeeaSpIkjmh/sjn/Et9XatHeopJL8dgZqoVLk8tviyeCWplF7+/tvjwghGYoDAg3Q1aua8tG5UYA+Y1e0ZdRf2x4yq8PHtoYwKHGdpgco6f/tj5u3aFmRHQA4Rj+nV1xRi1W17UY8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from BL2NAM02FT048.eop-nam02.prod.protection.outlook.com (10.152.76.58) by BL2NAM02HT138.eop-nam02.prod.protection.outlook.com (10.152.77.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18; Sat, 13 Jun 2020 18:45:12 +0000 Received: from BN6PR04MB0660.namprd04.prod.outlook.com (2a01:111:e400:7e46::4a) by BL2NAM02FT048.mail.protection.outlook.com (2a01:111:e400:7e46::109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18 via Frontend Transport; Sat, 13 Jun 2020 18:45:12 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:006A9CC60C70A443D0FF6A1110AC46E1664D2D03D4ADD60286C8664298500BA9;UpperCasedChecksum:EED57D66A21F7192AAA8A3FB268901923D9CDF95850009AC979DD238F52DDCD0;SizeAsReceived:7759;Count:49 Received: from BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383]) by BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383%9]) with mapi id 15.20.3088.026; Sat, 13 Jun 2020 18:45:12 +0000 From: Jonathan Bakker To: kgene@kernel.org, krzk@kernel.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jonathan Bakker Subject: [PATCH 4/5] ARM: dts: s5pv210: Add BMA023 accelerometer support to Aries Date: Sat, 13 Jun 2020 11:44:26 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200613184427.23394-1-xc-racer2@live.ca> References: <20200613184427.23394-1-xc-racer2@live.ca> X-ClientProxiedBy: MWHPR07CA0022.namprd07.prod.outlook.com (2603:10b6:300:116::32) To BN6PR04MB0660.namprd04.prod.outlook.com (2603:10b6:404:d9::21) X-Microsoft-Original-Message-ID: <20200613184427.23394-5-xc-racer2@live.ca> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jon-hp-6570b.telus (2001:569:fb68:9c00:8067:f823:1e15:7520) by MWHPR07CA0022.namprd07.prod.outlook.com (2603:10b6:300:116::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18 via Frontend Transport; Sat, 13 Jun 2020 18:45:10 +0000 X-Mailer: git-send-email 2.20.1 X-Microsoft-Original-Message-ID: <20200613184427.23394-5-xc-racer2@live.ca> X-TMN: [4OzH7VKYy2RgfmVV1JfPNvQODrELG/AGPCSLf8ek5JpxaRhyh6bqUtdm8hwED2Lx] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 535f68b2-bccb-449f-0a04-08d80fc9e767 X-MS-TrafficTypeDiagnostic: BL2NAM02HT138: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WumNOr0o60wT6UP9eWB+UX5Enhw1ShhxECFoEFF34gli9Cxm/4A+esgW707VAppEe8meaPAXEwkwa6T0D8ciXUqPW+BxzDk7PARnfJYz2SsyYpFYTbbzNfs6umd8iX7UrDCi5fNGK47/23QbnsonmOruiFgtFtF14geeQFK8g+bK8MzBd4CfbAhWypVllSwA0tmUy5ICfVH68p8lOZ53Dg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR04MB0660.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: QxBeaHcfx0jtfdHdWu+o95iVsU+db0bfbZW6buV3ayYeBm8VBHok+IZqOpNG7YPB2xkGdS4xnUeGn6NgE8DW5lQEiKJQfjV9aRK2UhZI1MPgQMHVw8BCJ++1KhJ/qrTJBfqHZ6W2ufavV4LTReGf0yJeWR9l6JFB1vTG5YLniJz7zaVJs725Z5AjK3jNVeu0HdYIhPNDDycyzaKXmZakEw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 535f68b2-bccb-449f-0a04-08d80fc9e767 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2020 18:45:12.2216 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2NAM02HT138 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Aries boards have a BMA023 accelerometer attached over i2c-gpio. Signed-off-by: Jonathan Bakker --- arch/arm/boot/dts/s5pv210-aries.dtsi | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi index b27d7c2e6dca..92ec0e133b25 100644 --- a/arch/arm/boot/dts/s5pv210-aries.dtsi +++ b/arch/arm/boot/dts/s5pv210-aries.dtsi @@ -149,9 +149,13 @@ pinctrl-names = "default"; pinctrl-0 = <&accel_i2c_pins>; - status = "disabled"; + accelerometer@38 { + compatible = "bosch,bma023"; + reg = <0x38>; - /* bma023 accelerometer, no mainline binding */ + vdd-supply = <&ldo9_reg>; + vddio-supply = <&ldo9_reg>; + }; }; i2c_pmic: i2c-gpio-2 { From patchwork Sat Jun 13 18:44:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Bakker X-Patchwork-Id: 11602945 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A35F96A2 for ; Sat, 13 Jun 2020 18:45:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E7342081A for ; Sat, 13 Jun 2020 18:45:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726621AbgFMSpR (ORCPT ); Sat, 13 Jun 2020 14:45:17 -0400 Received: from mail-oln040092003013.outbound.protection.outlook.com ([40.92.3.13]:14558 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726605AbgFMSpQ (ORCPT ); Sat, 13 Jun 2020 14:45:16 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P507bCeM8Yn7Yn2v2otVQ7FwETBcyw9KJJwCKYF1oS/9II7Ds1giodur8KjVvSoSNXEcwIs47KHZWOaVf5jeMMym033en2pjgpURP0/HBaIc2lDsRsCRbU5LQHPsRt84wNuBPKn/vmNa9sazBH5SlehnsO4jlWxlhHOwzK6KQT3quiTv8mpykvPQNV7u1twVtdoI3RLqKAgvu40Al4P+p3BC0FcdnLHAxlqx29cBfo4Blh4SvFwCg32r1Meb6Ktg4PZy3Tll+G45xQopXZZvpB0N+CkC2JjWjRTCk1sAVVhxkOdnQQphkfMHXb3y/QFXnB6ebct34jpoU35Z3zK84A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bhgaG2itpjVJj2U6Sm2JnF3Q3J1Hcik19w9S1eepDcQ=; b=MNgJ4yr2Goyvk5bVRPa5fDtZhCrrL3ylz0EH96Lp2LTgmB+1j5uirqnQkg18yV/wrltP9yYn9z7m5O52arZDwWOzjPpU+bz4nBlwOgOwqCURnQ7vPP+hHxHeYxOAaVLVpYptAYUOjo6kaflijjlaabdQCJCmYlzsmLhIFyPkXKSirmU2ze4Hn3JvA484f7ed+JOZMF0kzFh3KfPG2mNPBAClcQP6DTUC3GLMO/EYyIfNUHLt+I/WshOkklomecRD2BCwaXIRnWQWfyL2meJJzPlfV5X+odJwKHX6K6c3BqmFnRW/NNmOdWTTjzEpCdRO6f7drHnfFUIzQVOm49w/yg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from BL2NAM02FT048.eop-nam02.prod.protection.outlook.com (10.152.76.53) by BL2NAM02HT181.eop-nam02.prod.protection.outlook.com (10.152.77.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18; Sat, 13 Jun 2020 18:45:13 +0000 Received: from BN6PR04MB0660.namprd04.prod.outlook.com (2a01:111:e400:7e46::4a) by BL2NAM02FT048.mail.protection.outlook.com (2a01:111:e400:7e46::109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18 via Frontend Transport; Sat, 13 Jun 2020 18:45:13 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:E8ED144F710C56955811B6AE5F20D011D162CCBB8A386BAD1C88BDF5BF958619;UpperCasedChecksum:9CCC785411FF0208F99FA5FE3D52CA827EDE11E2563E5AE8365DF47952D2EEF5;SizeAsReceived:7757;Count:49 Received: from BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383]) by BN6PR04MB0660.namprd04.prod.outlook.com ([fe80::b9c3:9bff:541d:f383%9]) with mapi id 15.20.3088.026; Sat, 13 Jun 2020 18:45:13 +0000 From: Jonathan Bakker To: kgene@kernel.org, krzk@kernel.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jonathan Bakker Subject: [PATCH 5/5] ARM: dts: s5pv210: Correct BCM4329 bluetooth node Date: Sat, 13 Jun 2020 11:44:27 -0700 Message-ID: X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200613184427.23394-1-xc-racer2@live.ca> References: <20200613184427.23394-1-xc-racer2@live.ca> X-ClientProxiedBy: MWHPR07CA0022.namprd07.prod.outlook.com (2603:10b6:300:116::32) To BN6PR04MB0660.namprd04.prod.outlook.com (2603:10b6:404:d9::21) X-Microsoft-Original-Message-ID: <20200613184427.23394-6-xc-racer2@live.ca> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jon-hp-6570b.telus (2001:569:fb68:9c00:8067:f823:1e15:7520) by MWHPR07CA0022.namprd07.prod.outlook.com (2603:10b6:300:116::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18 via Frontend Transport; Sat, 13 Jun 2020 18:45:12 +0000 X-Mailer: git-send-email 2.20.1 X-Microsoft-Original-Message-ID: <20200613184427.23394-6-xc-racer2@live.ca> X-TMN: [LYFzZFzZ4n/LJPyPcdS/qrkZLlAEZ1yIXF0/6owonAWsM0nRd3y2WN3nODK8Eowh] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 5d50a82d-92fc-4006-9140-08d80fc9e845 X-MS-TrafficTypeDiagnostic: BL2NAM02HT181: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /778A9UKMUFV9BDpn0rmzsqcrCDau5/J5P6vnu6yqSvGby0Ini/T30inqDkQgUg01R+RXgQmQIVtpyEFA9YvrNMK4aGYxyyHaUNY1FrLzvEhlMyQNQFj15cV2+iOFjeSW8ndGgC1nSU4gUUG4QXpEk0tLqQOx6c8skqKU70UOiugn0YIKkBaWqn6I+xDmslo4abIATXopvvqvJVakJuE5A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR04MB0660.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: h5d6o1pTkuW96zcrHKmflqPOz0LlyWxJmTysKjbjP1x8t+NVh6Qd6p9yl802w+/38ci7lHwP/hDGdt3oFldZSFXvZBJSv58U9e7m75HUL9EEqzcBZ8+6o+JVQ1UE0wk+9lMaHxI6yAhMRE+eWAExfBOZc32aytjLFTy+7BeFbgkDjZgJiwfVmeIz9Ox+6HIZQWcksSYiApCIJgbpRQxo9g== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d50a82d-92fc-4006-9140-08d80fc9e845 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2020 18:45:13.6290 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2NAM02HT181 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org There are several issues with the bluetooth node - the wrong compatible was used (because the bcm4329 compatible didn't exist when the node was added), the max rate was incorrect (due to limitations in the samsung TTY driver which have now been fixed), the clocks were not assigned properly so some rates didn't work, and the some pinctrl settings weren't explicitly set. Fix all of the above issues. While we're at it, update from the deprecated host-wakeup-gpios property to the host-wake interrupt. Signed-off-by: Jonathan Bakker --- arch/arm/boot/dts/s5pv210-aries.dtsi | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi index 92ec0e133b25..822207f63ee0 100644 --- a/arch/arm/boot/dts/s5pv210-aries.dtsi +++ b/arch/arm/boot/dts/s5pv210-aries.dtsi @@ -629,6 +629,13 @@ }; &pinctrl0 { + bt_reset: bt-reset { + samsung,pins = "gpb-3"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + wlan_bt_en: wlan-bt-en { samsung,pins = "gpb-5"; samsung,pin-function = ; @@ -654,6 +661,12 @@ samsung,pin-pud = ; }; + bt_wake: bt-wake { + samsung,pins = "gpg3-4"; + samsung,pin-function = ; + samsung,pin-pud = ; + }; + gp2a_irq: gp2a-irq { samsung,pins = "gph0-2"; samsung,pin-function = ; @@ -845,16 +858,23 @@ }; &uart0 { + assigned-clocks = <&clocks MOUT_UART0>, <&clocks SCLK_UART0>; + assigned-clock-rates = <0>, <111166667>; + assigned-clock-parents = <&clocks MOUT_MPLL>; + status = "okay"; bluetooth { - compatible = "brcm,bcm43438-bt"; - max-speed = <115200>; + compatible = "brcm,bcm4329-bt"; + max-speed = <3000000>; pinctrl-names = "default"; - pinctrl-0 = <&uart0_data &uart0_fctl &bt_host_wake>; + pinctrl-0 = <&uart0_data &uart0_fctl &bt_host_wake + &bt_reset &bt_wake>; shutdown-gpios = <&gpb 3 GPIO_ACTIVE_HIGH>; device-wakeup-gpios = <&gpg3 4 GPIO_ACTIVE_HIGH>; - host-wakeup-gpios = <&gph2 5 GPIO_ACTIVE_HIGH>; + interrupt-parent = <&gph2>; + interrupts = <5 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "host-wake"; }; };