From patchwork Sun May 14 16:56:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 9311 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp6437855vqo; Sun, 14 May 2023 11:05:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4HTVmtUkUQAR4YvdTfq6q0WNdYYDHDVkk4QpFr0sFeROlFngUBLJjZ6dIhjeawbD/APRVT X-Received: by 2002:a17:90a:134a:b0:252:935b:cbde with SMTP id y10-20020a17090a134a00b00252935bcbdemr11847797pjf.19.1684087546582; Sun, 14 May 2023 11:05:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684087546; cv=none; d=google.com; s=arc-20160816; b=c3pg8bVg3wVw0bTz0uxrJlwgXy2b/a9GLc/nBAoxSqc6HGjvF2RosaSx1vrrB05hVr BB+/HVfNcHyuJU6/99rexnVt34PKW+QOLcabZ8GbFbyR0DlNAJhVA7BDOt25M7s+xqzu GDyQXKjfS85bVqrITb/3bqgdUQuNZProAAPXlNRwZi/iXiKyslG6KYnRdz+LuW542Ce9 C13/dD+dekFdLpsi0ci1N1P5lRGQpaRUiPq8Q6Om/gcpF723qaNfQ4iRWUtZPdKsGefN o1/a4uwv5TJa4DM7LAES21dxJwUN0tMrF1X9RtL4Oo+0XWPtBsY1133LPMukC43ozGsu 7NXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=nGZg1GLVhj8cSycFwSipBeIg7PrxpNARfzpwSxiLwuo=; b=Qo7/hNXZHnf7LnPLWA6r9GfGg/2lSHzfasszvNC+Wqalz+SAZdoB8I1WfwKTBhF5ZS c09zX2Vy70GKs7yWgZXGlHBafWqdxYbx7Eu1diB0E5mDm/lFsqYDV5o5eGrdXQV6+QPH 1PGdjZTEUbz9xuIEwGhYYUk5qJjSBsauuyMj2xvEvPnCcDLV1zkmH4mDLy/v1qbADKnu RqStvBzUB1mGcE/N1qS5V2gEfwVFXV9B/g/DpUKlyjrn+801t1GxOuM7cxDZeGR8JXRD qdlbTqYUZYNd/fBdQfLK1QMJhB9kA4/vNaOw7kAi9h9/3Iu1ajqxQI2EGBxJhKLXqlgM fbTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hhX7qZTc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv9-20020a632e09000000b0051b5de41857si13471820pgb.101.2023.05.14.11.05.32; Sun, 14 May 2023 11:05:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hhX7qZTc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233993AbjENRIN (ORCPT + 99 others); Sun, 14 May 2023 13:08:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230281AbjENRII (ORCPT ); Sun, 14 May 2023 13:08:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 607F54230; Sun, 14 May 2023 10:08:03 -0700 (PDT) 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 E04DB618B8; Sun, 14 May 2023 17:08:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 303B8C433D2; Sun, 14 May 2023 17:07:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684084082; bh=srHAo0Y9b1qf2rL+g1G7GWSxmyN50IIlO+TTLU3U41E=; h=From:To:Cc:Subject:Date:From; b=hhX7qZTcONw+c5MKoJz/MFIzS2L9mGoGHUx01wCjDsf9VjRwGicpXV1a0c+XIoQ2k StCZ2xLDojeV7i0RQTG3/yGXGc8kh+Tp0M2nyUfeFuCLbNlz8sd9LEFqPwzxX6DCZK +qYQ1hgxhy1iRVJbwBCDwSimRsMHXj/cez1MV7k/ZZNX6RhCwmGVom614WnumvF+7n IYbM7tXXu1kEFGVxPXmrxOwlOSjyZNLbKM2ueOB/trhKKEeDzKb1W0o6p9CXeXhk6A FPIcQDTiumYo2Q2i0p5fB1K/mdIop5yHkpvunXwXg1fsEkni5uLSrlsbR8epSfdOQX LcUE/gbPaNmKw== From: Jisheng Zhang To: Thomas Gleixner , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Palmer Dabbelt , Paul Walmsley , Albert Ou , Greg Kroah-Hartman , Jiri Slaby Cc: Samuel Holland , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-serial@vger.kernel.org Subject: [PATCH v3 00/10] riscv: add Bouffalolab bl808 support Date: Mon, 15 May 2023 00:56:41 +0800 Message-Id: <20230514165651.2199-1-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765893783497425770?= X-GMAIL-MSGID: =?utf-8?q?1765893783497425770?= This series adds Bouffalolab uart driver and basic devicetrees for Bouffalolab bl808 SoC and Sipeed M1s dock board. Since v2: - fix dt_binding_check and dtbs_check warnings - use uart_port_tx_limited() helper in uart driver - collect Acked-by/Reviewed-by tag - uart0 -> uart3 - update "riscv,ndev" property - mv vendor prefix binding as the first patch - add compatible string for bouffalolab bl808 plic 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 (10): dt-bindings: vendor-prefixes: add bouffalolab dt-bindings: interrupt-controller: Add bouffalolab bl808 plic 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: 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 .../sifive,plic-1.0.0.yaml | 1 + .../bindings/riscv/bouffalolab.yaml | 29 + .../serial/bouffalolab,bl808-uart.yaml | 47 ++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 7 + arch/riscv/Kconfig.socs | 5 + 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 | 73 +++ arch/riscv/configs/defconfig | 1 + drivers/tty/serial/Kconfig | 18 + drivers/tty/serial/Makefile | 1 + drivers/tty/serial/bflb_uart.c | 586 ++++++++++++++++++ include/uapi/linux/serial_core.h | 3 + 16 files changed, 822 insertions(+) create mode 100644 Documentation/devicetree/bindings/riscv/bouffalolab.yaml create mode 100644 Documentation/devicetree/bindings/serial/bouffalolab,bl808-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