From patchwork Sun Mar 8 16:32:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11425739 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 BC8B5139A for ; Sun, 8 Mar 2020 16:33:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 9A4B720866 for ; Sun, 8 Mar 2020 16:33:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jEgztc8g" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A4B720866 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=62PaKUGSMh3v+qujAHaYJbPURTsl/8/Vbu15D2sGHuc=; b=jEgztc8gnIvqcr zGGaYHFofvrE0qTvckKF01DlJPU3/guXo/sf4q+gJtgNQek6C2WhXct1uTRa+3tgFQAUHKHQNvtT7 pDtESskOao3Tz8bPtv8CztkPg+F+Ee7mr1E0SIAuMJCPLx1rtMsyQPinA4Z+EhuZLfywuq1q3emOD z9rgJP0i3dnzCKUNGQs3OP6i3n7wCbXMtW2GCvn8XYwrS4Ak/0VGn3t1QmEg17i9U95ViVhZJkOBc ng/L4nMmac0uL34jNzUAlXytgrzBUxQwJHGbyaZbIIhTCJBlVGfGvIhs1YeVLVfvtWhVDJTWvEI/G jitLQCRpUPD3Yy8ZdVaw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jAys0-0001EC-NE; Sun, 08 Mar 2020 16:33:40 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jAyrF-0000dV-Fj for linux-arm-kernel@lists.infradead.org; Sun, 08 Mar 2020 16:32:56 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 61ED5AD77; Sun, 8 Mar 2020 16:32:45 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-arm-kernel@lists.infradead.org Subject: [RFC 00/11] ARM: Initial Sunplus Plus1 SP7021 and BPI-F2S support Date: Sun, 8 Mar 2020 17:32:18 +0100 Message-Id: <20200308163230.4002-1-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200308_093253_816635_06434600 X-CRM114-Status: GOOD ( 15.80 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: devicetree@vger.kernel.org, Marc Zyngier , =?utf-8?b?V2VsbHMgTHUg5ZGC6Iqz6aiw?= , Dvorkin Dmitry , linux-kernel@vger.kernel.org, Rob Herring , linux-serial@vger.kernel.org, Greg Kroah-Hartman , Thomas Gleixner , =?utf-8?q?Andreas_F=C3=A4rber?= , Jason Cooper Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hello, This patch series adds initial drivers and Device Trees for Sunplus Plus1 series (codename Pentagram) SP7021 SoC and Banana Pi BPI-F2S SBC. First, minimal Kconfig, DT and earlycon driver are prepared to get serial output at all. Next, interrupt controller and full serial driver are added that allow to boot into an initrd with interactive serial console. Device Tree files added are for the CPU-Chip (aka A-Chip) with quad Cortex-A7, but the file split prepares for also adding the Peripheral-Chip (B-Chip) with ARM9 later. However, for now this is not reflected in the .dts filename; this corresponds to the vf610- vs. vf610m4- naming scheme, whereas an alternative would be to use sp7021-cchip- vs. -pchip- prefix (as sp7021-cpu- looks weird). It is assumed we can reuse the same SoC and board bindings for CA7 and ARM9 and only differ for IP blocks where needed. My inquiry to Sunplus about their GIC (anticipating complaints from Marc) remained unanswered, so I've added the two extra regions and irq myself, without being able to test KVM due to BSP U-Boot not booting in HYP mode. According to Sunplus the mode can be changed in U-Boot (but where/how?). Similarly, the architectural timer is not properly initialized in BSP U-Boot, so that I currently have a mach- hack in my tree below. Unlike RTD1195, we do have U-Boot sources (v2019.04 based), so should be able to fix this in the bootloader rather than in the kernel, thus not included as patch here. Based on SoC online manual [1] and downstream BPI-F2S BSP tree [2] as well as my previous Actions serial and Realtek irqchip drivers and DTs. More details at: https://en.opensuse.org/HCL:BananaPi_F2S Latest experimental patches at: https://github.com/afaerber/linux/commits/f2s-next Have a lot of fun! Cheers, Andreas [1] https://sunplus-tibbo.atlassian.net/wiki/spaces/doc/pages/470450252/SP7021+Technical+Manual [2] https://github.com/BPI-SINOVOIP/BPI-F2S-bsp Cc: devicetree@vger.kernel.org Cc: Rob Herring Cc: Greg Kroah-Hartman Cc: linux-serial@vger.kernel.org Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: Wells Lu 呂芳騰 Cc: Dvorkin Dmitry Andreas Färber (11): dt-bindings: vendor-prefixes: Add Sunplus dt-bindings: arm: Add Sunplus SP7021 and Banana Pi BPI-F2S ARM: Prepare Sunplus Plus1 SoC family dt-bindings: interrupt-controller: Add Sunplus SP7021 mux dt-bindings: serial: Add Sunplus SP7021 UART tty: serial: Add Sunplus Plus1 UART earlycon ARM: dts: Add Sunplus Plus1 SP7021 and Banana Pi F2S tty: serial: sunplus: Implement full UART driver irqchip: Add Sunplus SP7021 interrupt (mux) controller ARM: dts: sp7021-cpu: Add interrupt controller node ARM: dts: sp7021-cpu: Add dummy UART0 clock and interrupt Documentation/devicetree/bindings/arm/sunplus.yaml | 22 + .../sunplus,pentagram-intc.yaml | 50 ++ .../bindings/serial/sunplus,pentagram-uart.yaml | 24 + .../devicetree/bindings/vendor-prefixes.yaml | 2 + arch/arm/Kconfig | 2 + arch/arm/Makefile | 1 + arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/pentagram-sp7021-bpi-f2s.dts | 29 + arch/arm/boot/dts/pentagram-sp7021-cpu.dtsi | 93 +++ arch/arm/boot/dts/pentagram-sp7021.dtsi | 61 ++ arch/arm/mach-sunplus/Kconfig | 10 + drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-sp7021.c | 285 ++++++++ drivers/tty/serial/Kconfig | 19 + drivers/tty/serial/Makefile | 1 + drivers/tty/serial/sunplus-uart.c | 770 +++++++++++++++++++++ include/uapi/linux/serial_core.h | 3 + 17 files changed, 1375 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/sunplus.yaml create mode 100644 Documentation/devicetree/bindings/interrupt-controller/sunplus,pentagram-intc.yaml create mode 100644 Documentation/devicetree/bindings/serial/sunplus,pentagram-uart.yaml create mode 100644 arch/arm/boot/dts/pentagram-sp7021-bpi-f2s.dts create mode 100644 arch/arm/boot/dts/pentagram-sp7021-cpu.dtsi create mode 100644 arch/arm/boot/dts/pentagram-sp7021.dtsi create mode 100644 arch/arm/mach-sunplus/Kconfig create mode 100644 drivers/irqchip/irq-sp7021.c create mode 100644 drivers/tty/serial/sunplus-uart.c