From patchwork Sat Oct 31 18:21:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 11871589 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42812C55178 for ; Sat, 31 Oct 2020 18:24:05 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EC9B3206E3 for ; Sat, 31 Oct 2020 18:24:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bwhDnMHz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC9B3206E3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=paulk.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oLge26a7w0GdtxMQZixi+rsmDJ0FEnWmq1s91eB+WJU=; b=bwhDnMHzN3vHoL1v6OFDg90sS KGm0Gsbikhma/vLT0xDP03Y2IZT+jMjqJDIjbOCwKbpKf6NzVy3+wsWDO6GRKuWAjc4qbQA4Mb8BC pQMM6l5N1iUwnCD+MmXJhUNT8Q/r38qGaIf1rPsQjoB6hH9ybtn62cCuGseuvCB2hZ0175aZy0d4R TEAs6bO02J0lFfjji3SU1HPTFo5v1RVtkjmYsCKDDyattCSrsmQLBe7Xq9rL1E/gXM44DYuQ95pgs CyBVR8rOs431KnGrrsOHStOOCGIzvFccYJcTRZvFkWOkO/RC/ngmtuO9pGeP16xZwf7RRvuNc3HBN wlC46N9tQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvWB-0004J4-4a; Sat, 31 Oct 2020 18:22:23 +0000 Received: from vpn-0-22.aquilenet.fr ([2a0c:e300:4:22::] helo=leonov.paulk.fr) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvW8-0004Ih-Az for linux-arm-kernel@lists.infradead.org; Sat, 31 Oct 2020 18:22:21 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id A1AE6C01C7 for ; Sat, 31 Oct 2020 19:22:18 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id DF5C4C1D75; Sat, 31 Oct 2020 19:22:17 +0100 (CET) Received: from localhost.localdomain (unknown [192.168.1.101]) by gagarine.paulk.fr (Postfix) with ESMTP id 4B0A3C1D65; Sat, 31 Oct 2020 19:21:54 +0100 (CET) From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/9] ARM: sunxi: Add machine match for the Allwinner V3 SoC Date: Sat, 31 Oct 2020 19:21:29 +0100 Message-Id: <20201031182137.1879521-2-contact@paulk.fr> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031182137.1879521-1-contact@paulk.fr> References: <20201031182137.1879521-1-contact@paulk.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201031_142220_558973_5C7A3736 X-CRM114-Status: GOOD ( 12.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matteo Scordino , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Rob Herring , Icenowy Zheng Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The Allwinner V3 SoC shares the same base as the V3s but comes with extra pins and features available. As a result, it has its dedicated compatible string (already used in device trees), which is added here. Signed-off-by: Paul Kocialkowski --- arch/arm/mach-sunxi/sunxi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c index 06da2747a90b..19635721013d 100644 --- a/arch/arm/mach-sunxi/sunxi.c +++ b/arch/arm/mach-sunxi/sunxi.c @@ -66,6 +66,7 @@ static const char * const sun8i_board_dt_compat[] = { "allwinner,sun8i-h2-plus", "allwinner,sun8i-h3", "allwinner,sun8i-r40", + "allwinner,sun8i-v3", "allwinner,sun8i-v3s", NULL, }; From patchwork Sat Oct 31 18:21:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 11871599 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFAEEC388F7 for ; Sat, 31 Oct 2020 18:24:44 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8529A206E3 for ; Sat, 31 Oct 2020 18:24:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iUWAs2Ll" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8529A206E3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=paulk.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uzZAkYUhqMxTpPa8IjF6p4hElEyR7Qljh1O2gbypYx8=; b=iUWAs2Ll/y8Im0wjJ8iimETmD GwqGLfPvO4A9NlSJEbWxmVEdw4iV6rwXiCeLSSzTG/7SgikdasT0saAPEq2TA5gH0p9H4lTGYgsNC 0iU+F+mb0o50IG+LctEJY3AA7+QJVRl7koeq5poTDz6ZwtyNy6Sx1tMoqoFvIbVU6Nx5uIOJnGE3x peXrjp0U2h7+CrRKNP0OQtbSz/wMI6ewA1/nTzuuMvrJLRtqtGiyAFHQznEGuu4DTaes6zLXfCeo7 OmT4Q7AX45wjbg7IWlCQgLmokL3KvP/ADiIUuHjyYnshjz8zIjKLwvSxEEwQItWL9sEGeyHb3wxbo uhDnR5Ndg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvWI-0004Jq-KZ; Sat, 31 Oct 2020 18:22:30 +0000 Received: from leonov.paulk.fr ([185.233.101.22]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvWG-0004JN-IC for linux-arm-kernel@lists.infradead.org; Sat, 31 Oct 2020 18:22:29 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id 5F3F3C026B for ; Sat, 31 Oct 2020 19:22:27 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id 6F614C1D65; Sat, 31 Oct 2020 19:22:26 +0100 (CET) Received: from localhost.localdomain (unknown [192.168.1.101]) by gagarine.paulk.fr (Postfix) with ESMTP id 8F05EC1D66; Sat, 31 Oct 2020 19:21:54 +0100 (CET) From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/9] ARM: dts: sun8i-v3: Add UART1 PG pins description Date: Sat, 31 Oct 2020 19:21:30 +0100 Message-Id: <20201031182137.1879521-3-contact@paulk.fr> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031182137.1879521-1-contact@paulk.fr> References: <20201031182137.1879521-1-contact@paulk.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201031_142228_771819_2B74ED29 X-CRM114-Status: GOOD ( 12.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matteo Scordino , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Rob Herring , Icenowy Zheng Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org UART1 is often exposed through the PG pins (usually for the debug console) on the V3. They are not available on V3s. Describe these pins in device-tree. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/sun8i-v3.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-v3.dtsi b/arch/arm/boot/dts/sun8i-v3.dtsi index ca4672ed2e02..edf48e0471ad 100644 --- a/arch/arm/boot/dts/sun8i-v3.dtsi +++ b/arch/arm/boot/dts/sun8i-v3.dtsi @@ -24,4 +24,10 @@ external_mdio: mdio@2 { &pio { compatible = "allwinner,sun8i-v3-pinctrl"; + + /omit-if-no-ref/ + uart1_pg_pins: uart1-pg-pins { + pins = "PG6", "PG7"; + function = "uart1"; + }; }; From patchwork Sat Oct 31 18:21:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 11871595 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3BDFC388F9 for ; Sat, 31 Oct 2020 18:24:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 88F6B206DB for ; Sat, 31 Oct 2020 18:24:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="p5Ob4tkt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 88F6B206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=paulk.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=AqMvFgSEwDMl2G5GyCuWYELi18q2Erfgh84RuMEhC8A=; b=p5Ob4tktaS7RoV8i+5OUwx5C6 Xx0v4lyIMnWTMflJXRI6wd0sbD2ScjtreK0DfJxMFksYSYEGiAjrX3SFH6hjy2xTc5ulpFqB04a5B JLr3jn9/zET33PiNA+QXiOrwiQ82DNSyTKhVpHmgoIr93TExZgujyhanMhnMJaeEvcknTcSvAXAfT R9SuNYDSkO9FcSRgfmyPTte+wFieWmm5Udo7NKRBkXmMssULKmybneFwt1srZxEBZzMispwZei8Iv i/MsGfEpK9/HEV1uunQbKD9Z1pDIol7IQ04bGn9qXb2Gjoe9QOTPE6e/bTt9/b1Eu8bcLXHS44+wm YP+NdKU/A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvWS-0004LO-6h; Sat, 31 Oct 2020 18:22:40 +0000 Received: from leonov.paulk.fr ([185.233.101.22]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvWP-0004Km-Js for linux-arm-kernel@lists.infradead.org; Sat, 31 Oct 2020 18:22:38 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id 980A5C0312 for ; Sat, 31 Oct 2020 19:22:36 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id 053AAC1D75; Sat, 31 Oct 2020 19:22:36 +0100 (CET) Received: from localhost.localdomain (unknown [192.168.1.101]) by gagarine.paulk.fr (Postfix) with ESMTP id B5C84C1D67; Sat, 31 Oct 2020 19:21:54 +0100 (CET) From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/9] ARM: dts: sun8i-v3s: Add I2C1 PB pins description Date: Sat, 31 Oct 2020 19:21:31 +0100 Message-Id: <20201031182137.1879521-4-contact@paulk.fr> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031182137.1879521-1-contact@paulk.fr> References: <20201031182137.1879521-1-contact@paulk.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201031_142237_831418_9B744600 X-CRM114-Status: GOOD ( 11.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matteo Scordino , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Rob Herring , Icenowy Zheng Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org I2C1 can be exposed through PB pins in addition to PE pins on the V3s. Add the device-tree description for these pins. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/sun8i-v3s.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi index 0c7341676921..7b2d684aeb97 100644 --- a/arch/arm/boot/dts/sun8i-v3s.dtsi +++ b/arch/arm/boot/dts/sun8i-v3s.dtsi @@ -347,6 +347,12 @@ i2c0_pins: i2c0-pins { function = "i2c0"; }; + /omit-if-no-ref/ + i2c1_pb_pins: i2c1-pb-pins { + pins = "PB8", "PB9"; + function = "i2c1"; + }; + /omit-if-no-ref/ i2c1_pe_pins: i2c1-pe-pins { pins = "PE21", "PE22"; From patchwork Sat Oct 31 18:21:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 11871591 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CA03C388F7 for ; Sat, 31 Oct 2020 18:24:17 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2A46E206DB for ; Sat, 31 Oct 2020 18:24:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="wOb9SChM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A46E206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=paulk.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=A9gyLR0oqGZR1Iqk6MvLuxopdJiNR8WWvR+uiqBrBjc=; b=wOb9SChMR3SdnDfXcPsCgdnhM xmAEO8EZVBeEuQfNPup0qZcx2whyj0/ksf0vTyjJMLpJLlUxvFjt7RvPOMzBu2bFDu+bAq/2g7Mjz DCLANvnLP7yMGD0G54+9SYJQns4My6xk0vxWxOZtIhn76om8eDWfKrf+oL5S18x8SqYEV19FwsjY3 YE6+LnZBE7PcPGAEJj74RFEJsxLaTPoQtpHcoMrsUSIylhVPJOX25NfEq3pbp3Akz4A/ct4WuLc8v 6H4U+gjNCTrnvQ5cj+3N3MmIfY1Es5oB/h7xiPgy+0nlfnZNlBVPTgNqWgYVuKYm/DCljUtwdplC7 4cKcWvtxQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvWg-0004OT-GL; Sat, 31 Oct 2020 18:22:54 +0000 Received: from leonov.paulk.fr ([185.233.101.22]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvWd-0004NX-IV for linux-arm-kernel@lists.infradead.org; Sat, 31 Oct 2020 18:22:52 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id 739FCC0342 for ; Sat, 31 Oct 2020 19:22:50 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id D5DDEC1D67; Sat, 31 Oct 2020 19:22:49 +0100 (CET) Received: from localhost.localdomain (unknown [192.168.1.101]) by gagarine.paulk.fr (Postfix) with ESMTP id 32357C1D69; Sat, 31 Oct 2020 19:21:55 +0100 (CET) From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/9] dt-bindings: irq: sun7i-nmi: Add binding for the V3s NMI Date: Sat, 31 Oct 2020 19:21:32 +0100 Message-Id: <20201031182137.1879521-5-contact@paulk.fr> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031182137.1879521-1-contact@paulk.fr> References: <20201031182137.1879521-1-contact@paulk.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201031_142251_764787_50D7B332 X-CRM114-Status: GOOD ( 12.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matteo Scordino , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Rob Herring , Icenowy Zheng Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The NMI interrupt controller takes a specific compatible for the V3s. Add it to the device-tree bindings documentation. Signed-off-by: Paul Kocialkowski --- .../interrupt-controller/allwinner,sun7i-a20-sc-nmi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun7i-a20-sc-nmi.yaml b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun7i-a20-sc-nmi.yaml index 8acca0ae3129..52364c2200ef 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun7i-a20-sc-nmi.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun7i-a20-sc-nmi.yaml @@ -26,6 +26,7 @@ properties: - const: allwinner,sun6i-a31-sc-nmi deprecated: true - const: allwinner,sun7i-a20-sc-nmi + - const: allwinner,sun8i-v3s-sc-nmi - items: - const: allwinner,sun8i-a83t-r-intc - const: allwinner,sun6i-a31-r-intc From patchwork Sat Oct 31 18:21:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 11871597 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A802C388F9 for ; Sat, 31 Oct 2020 18:24:44 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 395A5206DB for ; Sat, 31 Oct 2020 18:24:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hNn/iDmh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 395A5206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=paulk.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3yTKiAMsIOwTxyx+8EXXNqTmbU6j+KesHZ/IQR8xmEA=; b=hNn/iDmhVBF2smLGnudbACafE BGTXD3hrPtrmYD5zJ93esLVl12PmLge2I5EaiXqMvKlLFzmhRL7negkQlwX9BoOU+YnAgsm8Lg9uc e9s8kujfcUMRPph12rvEbzkO6wvsBBn+xSm9hrk6FB9cxJVpks/ZVfBwsbZbaAttItZVWeBxlKpNI gBii+hquZjjKSMjjNajagOsbXSZ31po/cXEO0OqhMCNqLTy2Ra5TTOHc21X+NW9EWJRfOPBD1NqZa Ckn6OUIpVtA7GtbGKiHC+aINE18fYZ1Y3x8d02fopK8tNWjpuVoO3D/NfpWEmS0CdUHJZsUu1iL/z OWjFhXGow==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvX2-0004UA-PZ; Sat, 31 Oct 2020 18:23:17 +0000 Received: from vpn-0-22.aquilenet.fr ([2a0c:e300:4:22::] helo=leonov.paulk.fr) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvWy-0004SZ-6q for linux-arm-kernel@lists.infradead.org; Sat, 31 Oct 2020 18:23:13 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id 1F6ABC036C for ; Sat, 31 Oct 2020 19:23:11 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id 532A4C1D67; Sat, 31 Oct 2020 19:23:10 +0100 (CET) Received: from localhost.localdomain (unknown [192.168.1.101]) by gagarine.paulk.fr (Postfix) with ESMTP id 7ECA4C1D6B; Sat, 31 Oct 2020 19:21:55 +0100 (CET) From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/9] irqchip/sunxi-nmi: Add support for the V3s NMI Date: Sat, 31 Oct 2020 19:21:33 +0100 Message-Id: <20201031182137.1879521-6-contact@paulk.fr> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031182137.1879521-1-contact@paulk.fr> References: <20201031182137.1879521-1-contact@paulk.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201031_142312_508978_9E8F6B4C X-CRM114-Status: GOOD ( 14.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matteo Scordino , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Rob Herring , Icenowy Zheng Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The V3s/V3 has a NMI IRQ controller, which is mainly used for the AXP209 interrupt. In great wisdom, Allwinner decided to invert the enable and pending register offsets, compared to the A20. As a result, a specific compatible and register description is required for the V3s. This was tested with an AXP209 on a V3 board. Signed-off-by: Paul Kocialkowski Acked-by: Maxime Ripard --- drivers/irqchip/irq-sunxi-nmi.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-sunxi-nmi.c b/drivers/irqchip/irq-sunxi-nmi.c index a412b5d5d0fa..59e0e4612ef7 100644 --- a/drivers/irqchip/irq-sunxi-nmi.c +++ b/drivers/irqchip/irq-sunxi-nmi.c @@ -44,6 +44,10 @@ #define SUN7I_NMI_PENDING 0x04 #define SUN7I_NMI_ENABLE 0x08 +#define SUN8I_V3S_NMI_CTRL 0x00 +#define SUN8I_V3S_NMI_ENABLE 0x04 +#define SUN8I_V3S_NMI_PENDING 0x08 + #define SUN9I_NMI_CTRL 0x00 #define SUN9I_NMI_ENABLE 0x04 #define SUN9I_NMI_PENDING 0x08 @@ -79,6 +83,12 @@ static const struct sunxi_sc_nmi_reg_offs sun7i_reg_offs __initconst = { .enable = SUN7I_NMI_ENABLE, }; +static const struct sunxi_sc_nmi_reg_offs sun8i_v3s_reg_offs __initconst = { + .ctrl = SUN8I_V3S_NMI_CTRL, + .pend = SUN8I_V3S_NMI_PENDING, + .enable = SUN8I_V3S_NMI_ENABLE, +}; + static const struct sunxi_sc_nmi_reg_offs sun9i_reg_offs __initconst = { .ctrl = SUN9I_NMI_CTRL, .pend = SUN9I_NMI_PENDING, @@ -165,7 +175,6 @@ static int __init sunxi_sc_nmi_irq_init(struct device_node *node, unsigned int clr = IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; int ret; - domain = irq_domain_add_linear(node, 1, &irq_generic_chip_ops, NULL); if (!domain) { pr_err("Could not register interrupt domain.\n"); @@ -254,6 +263,13 @@ static int __init sun7i_sc_nmi_irq_init(struct device_node *node, } IRQCHIP_DECLARE(sun7i_sc_nmi, "allwinner,sun7i-a20-sc-nmi", sun7i_sc_nmi_irq_init); +static int __init sun8i_v3s_sc_nmi_irq_init(struct device_node *node, + struct device_node *parent) +{ + return sunxi_sc_nmi_irq_init(node, &sun8i_v3s_reg_offs); +} +IRQCHIP_DECLARE(sun8i_v3s_sc_nmi, "allwinner,sun8i-v3s-sc-nmi", sun8i_v3s_sc_nmi_irq_init); + static int __init sun9i_nmi_irq_init(struct device_node *node, struct device_node *parent) { From patchwork Sat Oct 31 18:21:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 11871601 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27403C388F7 for ; Sat, 31 Oct 2020 18:24:48 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D410C206DB for ; Sat, 31 Oct 2020 18:24:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kfC0v2ur" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D410C206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=paulk.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ousyIUwtPZgC7AUDZLeOkj6dzYAShhvs2oQSFP5g+BA=; b=kfC0v2urt/GGMXhbjtUamqZc3 l7tWihiyf9DOgAOcorkmS5ngmR9NSjI0fQR32f0FutsO40M141+aJUJv0N4aA65R2ccK/P1CtGZxn VX+3ROSEeYMacVl9A/gIcdE4nV2ge+YKd4NAPq8h2NqlB3OrXJg/WpP/IuDUFqElVqI9M5nb627M2 wnEQozOUnK6QfOdDbBy36IElX1Tesz2uQVXKi/yrICcWDN5N8hXZLECD7xJKbJeFl8GxOay65Pqxe QdCuTGcwp4+Mvb/r/Tn3H+JbBjvE3fhB1eYLsa99RM0RhIRZSdcx41UNI9XBMJwha0RQSe94Ov9WK +dsdq45vg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvX9-0004W0-8W; Sat, 31 Oct 2020 18:23:23 +0000 Received: from leonov.paulk.fr ([185.233.101.22]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvX0-0004TY-O8 for linux-arm-kernel@lists.infradead.org; Sat, 31 Oct 2020 18:23:15 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id 960E2C036C for ; Sat, 31 Oct 2020 19:23:13 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id DCB5EC1D67; Sat, 31 Oct 2020 19:23:12 +0100 (CET) Received: from localhost.localdomain (unknown [192.168.1.101]) by gagarine.paulk.fr (Postfix) with ESMTP id 6EF8EC1D6C; Sat, 31 Oct 2020 19:21:56 +0100 (CET) From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/9] ARM: dts: sun8i-v3s: Add the V3s NMI IRQ controller Date: Sat, 31 Oct 2020 19:21:34 +0100 Message-Id: <20201031182137.1879521-7-contact@paulk.fr> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031182137.1879521-1-contact@paulk.fr> References: <20201031182137.1879521-1-contact@paulk.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201031_142315_025023_6C2FD503 X-CRM114-Status: GOOD ( 13.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matteo Scordino , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Rob Herring , Icenowy Zheng Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The V3s/V3 has a NMI interrupt controller, mainly used for the AXP209. Its address follows the sytsem controller block, which was previously incorrectly described as spanning over 0x1000 address bytes. This reduces the system controller address span up to the NMI controller and adds a node for the controller, with its dedicated compatible. While the interrupt number was found in Allwinner's documentation, the address for the controller is specified in any Allwinner SDK supporting sun8iw8 (V3/V3s) at: drivers/power/axp_power/axp20/axp20-board.c It was tested to work on a V3 board with an AXP209 connected to the NMI interrupt line. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/sun8i-v3s.dtsi | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi index 7b2d684aeb97..d2e2abd3869a 100644 --- a/arch/arm/boot/dts/sun8i-v3s.dtsi +++ b/arch/arm/boot/dts/sun8i-v3s.dtsi @@ -157,12 +157,20 @@ mixer0_out_tcon0: endpoint { syscon: system-control@1c00000 { compatible = "allwinner,sun8i-v3s-system-control", "allwinner,sun8i-h3-system-control"; - reg = <0x01c00000 0x1000>; + reg = <0x01c00000 0xd0>; #address-cells = <1>; #size-cells = <1>; ranges; }; + nmi_intc: interrupt-controller@1c000d0 { + compatible = "allwinner,sun8i-v3s-sc-nmi"; + interrupt-controller; + #interrupt-cells = <2>; + reg = <0x01c000d0 0x0c>; + interrupts = ; + }; + tcon0: lcd-controller@1c0c000 { compatible = "allwinner,sun8i-v3s-tcon"; reg = <0x01c0c000 0x1000>; From patchwork Sat Oct 31 18:21:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 11871603 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D170C388F9 for ; Sat, 31 Oct 2020 18:24:57 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B6C49206DB for ; Sat, 31 Oct 2020 18:24:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="L0KhwR/e" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B6C49206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=paulk.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IbBwvHIOL703dqXN9oDmdNRTLGhSVrSe3ulArxwgWKU=; b=L0KhwR/ep1UxyDTceuuzMXqVq 5LB+gBPhzJl0lH+UY4X1OE4p1dvskP0QVCnPeTCPpqZIwG32rQeZfcC8DAWXFwjqdrhU9J/GQOWvD Jh8lrxM0Ou9SfMVmYR/rSlbYdmsE8MKa6KNpykFavx85JCXI7nemRGvL4c06lpr5b4j54iAHTfWoF 3moUtfqULjFfi940s6r+QB6ATKB8mdWmRRN4DPjg1/giR0pRlpHnxAd0UKklx8J+zTMMg03BOWkbb GaQt7a72nWtAdu3WLovgqDFasgsr15JcD47KfuK+RqNt6R5OvsZJhbe9Gfo/u9ciQwZYadeX79/0E tEMymftxg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvXM-0004bf-3v; Sat, 31 Oct 2020 18:23:36 +0000 Received: from vpn-0-22.aquilenet.fr ([2a0c:e300:4:22::] helo=leonov.paulk.fr) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvXG-0004ZC-Hd for linux-arm-kernel@lists.infradead.org; Sat, 31 Oct 2020 18:23:32 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id 499ABC036E for ; Sat, 31 Oct 2020 19:23:29 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id B51BBC1D6C; Sat, 31 Oct 2020 19:23:28 +0100 (CET) Received: from localhost.localdomain (unknown [192.168.1.101]) by gagarine.paulk.fr (Postfix) with ESMTP id ED095C1D6D; Sat, 31 Oct 2020 19:21:56 +0100 (CET) From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/9] ARM: dts: sun8i: Cleanup the Pinecube AXP209 node Date: Sat, 31 Oct 2020 19:21:35 +0100 Message-Id: <20201031182137.1879521-8-contact@paulk.fr> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031182137.1879521-1-contact@paulk.fr> References: <20201031182137.1879521-1-contact@paulk.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201031_142330_772015_7FE7632B X-CRM114-Status: GOOD ( 13.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matteo Scordino , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Rob Herring , Icenowy Zheng Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This fixes a few things with the Pinecube AXP209 node: - No compatible is required since it is using an AXP209 (not AXP203) according to the schematics and this is what the included axp209.dtsi already has; - The interrupt-controller and #interrupt-cells properties are already described in the included axp209.dtsi; - The interrupt comes through the NMI controller, not directly through the GIC. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/sun8i-s3-pinecube.dts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/sun8i-s3-pinecube.dts b/arch/arm/boot/dts/sun8i-s3-pinecube.dts index 9bab6b7f4014..ed6b4e94088d 100644 --- a/arch/arm/boot/dts/sun8i-s3-pinecube.dts +++ b/arch/arm/boot/dts/sun8i-s3-pinecube.dts @@ -88,13 +88,9 @@ &i2c0 { status = "okay"; axp209: pmic@34 { - compatible = "x-powers,axp203", - "x-powers,axp209"; reg = <0x34>; - interrupt-parent = <&gic>; - interrupts = ; - interrupt-controller; - #interrupt-cells = <1>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; }; }; From patchwork Sat Oct 31 18:21:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 11871605 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8649EC388F9 for ; Sat, 31 Oct 2020 18:25:02 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 31B06206DB for ; Sat, 31 Oct 2020 18:25:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="A+hIq79d" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 31B06206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=paulk.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pYk9kwIn7P58JTrz0OL+9h0KqquuAEqKE30ER+4VwBA=; b=A+hIq79dIQvVONyhDRTI4La54 iQcdOxuG0wu5+p7eWj+EtAI83SllVAcI5kYfWaFL2rRvKoxbFGkmzgsDhBPWXJ7VPVY1ZnrFDJu8h eGUlwPXV7XTCmkbdFKy6z+3AaHgvtzeScBP8Tchgzb3ggjNBoKyW//d5sT/bIc7KeC/Cd3j2/jbtl Fh4AmubLT4jNLjD2QuyW77+IrYCdLgznmA45cxREiJb8blhP/GVEaywUKJjsbHDA6+hsLNkn8O4oq mLaDrzYDb/Se91MsPEnYDloQlbGJ4cg0cQfxvptbbGtb+FeW2un3EfbNF0PoPe9X+IoZ4QvnIQJNo Qz59NYppw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvXa-0004g3-9R; Sat, 31 Oct 2020 18:23:50 +0000 Received: from leonov.paulk.fr ([185.233.101.22]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvXH-0004Zc-Dh for linux-arm-kernel@lists.infradead.org; Sat, 31 Oct 2020 18:23:32 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id 2A994C0373 for ; Sat, 31 Oct 2020 19:23:30 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id 90089C1D6C; Sat, 31 Oct 2020 19:23:29 +0100 (CET) Received: from localhost.localdomain (unknown [192.168.1.101]) by gagarine.paulk.fr (Postfix) with ESMTP id 4F0A7C1D6E; Sat, 31 Oct 2020 19:21:57 +0100 (CET) From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 8/9] dt-bindings: arm: sunxi: Add SL631 with IMX179 bindings Date: Sat, 31 Oct 2020 19:21:36 +0100 Message-Id: <20201031182137.1879521-9-contact@paulk.fr> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031182137.1879521-1-contact@paulk.fr> References: <20201031182137.1879521-1-contact@paulk.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201031_142331_626461_1B8B383E X-CRM114-Status: GOOD ( 10.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matteo Scordino , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Rob Herring , Icenowy Zheng Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Document the compatible strings for the SL631 Action Camera with IMX179. Signed-off-by: Paul Kocialkowski --- Documentation/devicetree/bindings/arm/sunxi.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml index afa00268c7db..0fa0c0b5d89f 100644 --- a/Documentation/devicetree/bindings/arm/sunxi.yaml +++ b/Documentation/devicetree/bindings/arm/sunxi.yaml @@ -754,6 +754,12 @@ properties: - const: sinlinx,sina33 - const: allwinner,sun8i-a33 + - description: SL631 Action Camera with IMX179 + items: + - const: unknown,sl631-imx179 + - const: unknown,sl631 + - const: allwinner,sun8i-v3 + - description: Tanix TX6 items: - const: oranth,tanix-tx6 From patchwork Sat Oct 31 18:21:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 11871607 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF461C388F9 for ; Sat, 31 Oct 2020 18:25:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 88CE2206DB for ; Sat, 31 Oct 2020 18:25:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UWUP1d8e" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 88CE2206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=paulk.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7dCb+t77tXNXaQOcFYVT1ge1N14Jq+0lkrHIG/kpkgE=; b=UWUP1d8egwFqCMtAMFMoJTZwT QvGa2dFnQ20JZt2S3wsCj+4fZNSn8cTIzAl9Pj+oTSqmV17fpSzeEQtaJxHPvKYGAwhsbRsA3i9wH BProv4czyjT+9teOPBzUSGPzaiOo/6+MMuv0Fip1nlXo9ZcoczQpANl6jUyTzQAqaVVGbyemYBcKm RogaZUEHa1Chxhx0lpNbURncRI21gC85dV9eaBGM43aTJAd5mUbrW3Y4SxyBpEp3a9b7URNZsRGOW zVgXWlYf4BGFeo6Mto2B4HMHZLFx4087kq6zhPHNsQkIiRcN+3hWe2qKifwnauPuFLQlHiIlbU1gz fxgirHeKA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvXj-0004jl-GP; Sat, 31 Oct 2020 18:23:59 +0000 Received: from leonov.paulk.fr ([185.233.101.22]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYvXY-0004h6-Qf for linux-arm-kernel@lists.infradead.org; Sat, 31 Oct 2020 18:23:50 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id 69CE9C036D for ; Sat, 31 Oct 2020 19:23:47 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id CB91FC1D6E; Sat, 31 Oct 2020 19:23:46 +0100 (CET) Received: from localhost.localdomain (unknown [192.168.1.101]) by gagarine.paulk.fr (Postfix) with ESMTP id 77C0DC1D71; Sat, 31 Oct 2020 19:21:57 +0100 (CET) From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 9/9] ARM: dts: sun8i-v3: Add support for the SL631 Action Camera with IMX179 Date: Sat, 31 Oct 2020 19:21:37 +0100 Message-Id: <20201031182137.1879521-10-contact@paulk.fr> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031182137.1879521-1-contact@paulk.fr> References: <20201031182137.1879521-1-contact@paulk.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201031_142349_157898_BE7CF4CE X-CRM114-Status: GOOD ( 19.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matteo Scordino , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Rob Herring , Icenowy Zheng Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The SL631 is a family of Allwinner V3 action cameras sold under various names, such as SJCAM SJ4000 Air or F60 Action Camera. Devices in this family share a common board design but can be found with different image sensors, including the IMX179 and the OV4689. This adds support for a common dtsi for the SL631 family as well as a specific dts for the IMX179 fashion, which will later be populated with an IMX179 node when a driver is available. Features that were tested on the device include: - UART debug - MMC - USB peripheral (e.g. g_ether) - Buttons - SPI NOR flash Note that the exact designer/vendor of these boards is unknown. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/sun8i-v3-sl631-imx179.dts | 12 ++ arch/arm/boot/dts/sun8i-v3-sl631.dtsi | 145 ++++++++++++++++++++ 3 files changed, 158 insertions(+) create mode 100644 arch/arm/boot/dts/sun8i-v3-sl631-imx179.dts create mode 100644 arch/arm/boot/dts/sun8i-v3-sl631.dtsi diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 4363ba564bb4..b76bcda9a9df 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1196,6 +1196,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-s3-lichee-zero-plus.dtb \ sun8i-s3-pinecube.dtb \ sun8i-t3-cqa3t-bv3.dtb \ + sun8i-v3-sl631-imx179.dtb \ sun8i-v3s-licheepi-zero.dtb \ sun8i-v3s-licheepi-zero-dock.dtb \ sun8i-v40-bananapi-m2-berry.dtb diff --git a/arch/arm/boot/dts/sun8i-v3-sl631-imx179.dts b/arch/arm/boot/dts/sun8i-v3-sl631-imx179.dts new file mode 100644 index 000000000000..9e3b78000bdb --- /dev/null +++ b/arch/arm/boot/dts/sun8i-v3-sl631-imx179.dts @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR X11) +/* + * Copyright 2020 Paul Kocialkowski + */ + +#include "sun8i-v3-sl631.dtsi" + +/ { + model = "SL631 Action Camera with IMX179"; + compatible = "unknown,sl631-imx179", "unknown,sl631", + "allwinner,sun8i-v3"; +}; diff --git a/arch/arm/boot/dts/sun8i-v3-sl631.dtsi b/arch/arm/boot/dts/sun8i-v3-sl631.dtsi new file mode 100644 index 000000000000..9bc84d2812a6 --- /dev/null +++ b/arch/arm/boot/dts/sun8i-v3-sl631.dtsi @@ -0,0 +1,145 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR X11) +/* + * Copyright 2020 Paul Kocialkowski + */ + +/dts-v1/; + +#include "sun8i-v3.dtsi" + +#include +#include + +/ { + model = "SL631 Action Camera"; + compatible = "unknown,sl631", "allwinner,sun8i-v3"; + + aliases { + serial0 = &uart1; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +&i2c0 { + status = "okay"; + + axp209: pmic@34 { + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + }; +}; + +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pb_pins>; + status = "okay"; +}; + +&lradc { + vref-supply = <®_ldo2>; + status = "okay"; + + button@174 { + label = "Volume Down"; + linux,code = ; + channel = <0>; + voltage = <174603>; + }; + + button@384 { + label = "Volume Up"; + linux,code = ; + channel = <0>; + voltage = <384126>; + }; + + button@593 { + label = "Home"; + linux,code = ; + channel = <0>; + voltage = <593650>; + }; +}; + +&mmc0 { + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ + bus-width = <4>; + vmmc-supply = <®_dcdc3>; + status = "okay"; +}; + +&pio { + vcc-pd-supply = <®_dcdc3>; + vcc-pe-supply = <®_dcdc3>; +}; + +#include "axp209.dtsi" + +&ac_power_supply { + status = "okay"; +}; + +&battery_power_supply { + status = "okay"; +}; + +®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1250000>; + regulator-name = "vdd-sys-cpu"; +}; + +®_dcdc3 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vdd-3v3"; +}; + +®_ldo1 { + regulator-name = "vdd-rtc"; +}; + +®_ldo2 { + regulator-always-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-name = "avcc"; +}; + +®_ldo4 { + regulator-always-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-ep952"; +}; + +&spi0 { + status = "okay"; + + spi-flash@0 { + reg = <0>; + compatible = "macronix,mx25l6436f", "jedec,spi-nor"; + spi-max-frequency = <50000000>; + }; +}; + +&uart1 { + pinctrl-0 = <&uart1_pg_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&usb_otg { + dr_mode = "peripheral"; + status = "okay"; +}; + +&usbphy { + status = "okay"; +};