From patchwork Sun Nov 27 13:24:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 13056767 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B80C6C352A1 for ; Sun, 27 Nov 2022 13:35:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=0HvKF1iYbGdPQSq95qjqojQ8pdyi/g0RfVxHYQtRS5I=; b=2LW4ZUOLADVdPm NrhW6zUE2lED3iu0W3+lCQQNeO2e3325ROD/f4XaaTTDgbQHZ6gxkCp9Q7xBIuVqwn4Kv7Als/Vri cEG4CK04sSsPsnZQD9oFuUd+Dbyp4Uq6a9yDlmAkKBb5wqxmXeGL/AWv9g0mbzQUuK9JlcNh/2Cv+ QK8x/J6oyGs4u2Wu8h6WNceY0pjbhGkYFWtMA5AFfNe/fJdTepYxrNyRKrR4nPxa75+xYiS+0n8lq Qvg8VHGvuQb6UYTK4MyKG1Ow+slBg3oykUvJaMO4lZxH8wPH6qBIPZUfEsgSNa4uijV0rtEAQ1/ZZ YliuC2N1o5OGUoPJyWRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozHo0-00BPhW-AR; Sun, 27 Nov 2022 13:34:48 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozHnx-00BPfF-Af for linux-riscv@lists.infradead.org; Sun, 27 Nov 2022 13:34:46 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6D7A560B7E; Sun, 27 Nov 2022 13:34:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EE47C433D6; Sun, 27 Nov 2022 13:34:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669556080; bh=XIThUy/xmyVPU1AnNTBmo5HzcB1h/80tTpyOzqgfD/c=; h=From:To:Cc:Subject:Date:From; b=XsPVbtbJ+9I6ZQHBQRh1m9zmrPTCZqoi4a0A++XQBEH3B/7CdZfugH8OcpCqpe5MZ 4P4UbR9Fipck/ageQfdx/qe59VFn409E/j7x4TkgLG5XUrXBCGRgAKkaqL8e7d/a/9 1uy7QYD3DYgqk3OkyolDkF6IXI4kNeK4a47DAETKOchYFP5E4HzTT8X2mZy7Omyya1 o3koz4MLAX3DxgNX4NECzL4PQTPI4g9IISGW/clinwpM+o/q1sn14Y3YYGVfUjXEdy 3a7aYyDvnycM1teq+JRjCaZlvNrZqNR3MmL5uHlIbqTSckli0L13UitdxYHV1rSKjd uchyoGxQHhP6w== From: Jisheng Zhang To: Rob Herring , Conor Dooley , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Greg Kroah-Hartman , Jiri Slaby , =?utf-8?q?Ilpo_J=C3=A4rvinen?= Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH v2 0/9] riscv: add Bouffalolab bl808 support Date: Sun, 27 Nov 2022 21:24:39 +0800 Message-Id: <20221127132448.4034-1-jszhang@kernel.org> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221127_053445_483572_260890F7 X-CRM114-Status: GOOD ( 14.23 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org This series adds Bouffalolab uart driver and basic devicetrees for Bouffalolab bl808 SoC and Sipeed M1s dock board. It's too late for v6.2-rc1, but I hope I can catch up the v6.3-rc1 window. I think I have addressed all review comments to v1, correct me if I missed anything. PS: this series assumes the "thead,c906" riscv cpu binding patch is merged(I see Conor has picked up it). Since v1: - use FIELD_PREP and FIELD_GET macro - rewrite bflb_uart_tx_chars() - add vendor prefix for bouffalolab - add dt binding for bl808 compatibles - enable SOC_BOUFFALOLAB in defconfig - collect Reviewed-by tag - modify commit-msg as suggested Jisheng Zhang (9): dt-bindings: serial: add documentation for Bouffalolab UART Driver serial: bflb_uart: add Bouffalolab UART Driver riscv: add the Bouffalolab SoC family Kconfig option dt-bindings: vendor-prefixes: add bouffalolab dt-bindings: riscv: Add bouffalolab bl808 board compatibles riscv: dts: bouffalolab: add the bl808 SoC base device tree riscv: dts: bouffalolab: add Sipeed M1s SoM and Dock devicetree MAINTAINERS: riscv: add entry for Bouffalolab SoC riscv: defconfig: enable BOUFFALOLAB SoC .../bindings/riscv/bouffalolab.yaml | 34 + .../bindings/serial/bouffalolab,uart.yaml | 47 ++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 9 + arch/riscv/Kconfig.socs | 6 + arch/riscv/boot/dts/Makefile | 1 + arch/riscv/boot/dts/bouffalolab/Makefile | 2 + .../dts/bouffalolab/bl808-sipeed-m1s-dock.dts | 25 + .../dts/bouffalolab/bl808-sipeed-m1s.dtsi | 21 + arch/riscv/boot/dts/bouffalolab/bl808.dtsi | 74 +++ arch/riscv/configs/defconfig | 1 + drivers/tty/serial/Kconfig | 18 + drivers/tty/serial/Makefile | 1 + drivers/tty/serial/bflb_uart.c | 610 ++++++++++++++++++ include/uapi/linux/serial_core.h | 3 + 15 files changed, 854 insertions(+) create mode 100644 Documentation/devicetree/bindings/riscv/bouffalolab.yaml create mode 100644 Documentation/devicetree/bindings/serial/bouffalolab,uart.yaml create mode 100644 arch/riscv/boot/dts/bouffalolab/Makefile create mode 100644 arch/riscv/boot/dts/bouffalolab/bl808-sipeed-m1s-dock.dts create mode 100644 arch/riscv/boot/dts/bouffalolab/bl808-sipeed-m1s.dtsi create mode 100644 arch/riscv/boot/dts/bouffalolab/bl808.dtsi create mode 100644 drivers/tty/serial/bflb_uart.c Acked-by: Palmer Dabbelt