Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1156541rwd; Thu, 18 May 2023 08:36:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7gI7RuIeIi+2wWavOYFWKbpwcsRLd18yzUSbqMmN19h2lrRQ3zF0RY/skAjjguBhTCNOMm X-Received: by 2002:a05:6a20:4323:b0:104:a053:12fb with SMTP id h35-20020a056a20432300b00104a05312fbmr3226250pzk.60.1684424184790; Thu, 18 May 2023 08:36:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684424184; cv=none; d=google.com; s=arc-20160816; b=L8gvUh+tMP+9XCXKP/qFU8fsqfj229tw1PQzmeSB0iF+ZxVkos5vIGvTCiN5nwWex9 qBvYgawyOhTFxLx7fjaH1gWETT2px9chOaIKIMK9PK72VZgwqX7CJg5p90g6ighZiD/f 47D+d3jOgOaRqbGqCYVh/lntyD+7T7zLzkakDlXRgsrJFWMotAVbnUbdY3RkmSOvP2D5 DslJOtYs/APEDuIMIb6bRECC9S82Z0B7HikCSM+bRgLUJmx3Atb+U3EpaK/t2sZNyiNn cSO9g0dT1pgW1iwjvbyBn7dbqhFuPpIScO1z/r3quXreaPDx0JLQVUlVT77BH+uU3gjh xZjw== 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=Bj9jGfSqMDERys7i4fJffryXC5JmPjTkhK5D81ZSLtw=; b=LC7EGERiz5RVKEnaBlMdQGsVjcYFsyx4BzYJ5+AWKmk7XPXJlvLMt5RSIVEJhF7Rul c9Lv36MKyY4ERNPmWpvo75SkOipBO4GsfdRoHewmOVCYBKCTl+2Sh23l3poP+o3Vnx/J CASwIC4v8pl21FaBV6zbHxFEwNKPHI/WWYloEYLOo7n21s4n19UnqdTqWMoxWpL/ixo8 hrMhldvmY8NkDbDkj/q0VzhvhX9IlQy8MgwGHFdSyEqbYkhL/fHmX4C7Jaom7Ckerx+t lHoaab7s1CO3Fjh3BglzHZH2vrHZv06NT6luf2grmcRSgYU/NJW/OBwKN0ysaRXOZMD4 l4aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NIF7wQwj; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l191-20020a6391c8000000b00528baa26739si1752054pge.336.2023.05.18.08.36.11; Thu, 18 May 2023 08:36:24 -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=NIF7wQwj; 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 S231518AbjERPd6 (ORCPT + 99 others); Thu, 18 May 2023 11:33:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230446AbjERPd5 (ORCPT ); Thu, 18 May 2023 11:33:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE5ABF9; Thu, 18 May 2023 08:33:56 -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 5CE9465026; Thu, 18 May 2023 15:33:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB67BC433D2; Thu, 18 May 2023 15:33:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684424035; bh=Idwi7pRttqveLxo342VgrsknBdG/Au/cKRfftR8uEfI=; h=From:To:Cc:Subject:Date:From; b=NIF7wQwjVOQEUO5xrDWJvv67MCL86sfKCsUrui3Tb0RW0bGUc7fXDF9W0AOwLaNV8 YeFFPfbhYUIHnZH/T/gY7jeug1/bCL1hryRXp9HdiWtYD6mWxkJVT0vrexNjYo1H8z Hz2O2lFWfjlW9RRIcHBIExnwnV6gW/DC+kEKzVCrXDyw9MpIr6J+Y2DQELB1OJEF0N FbcQyKTY/+mXNqyCnmRSCiRx8Sl3JRbm/CHRicQ2L0Fu/a65uQBZSWSKAnHdLhbfc+ voKTAOWOhPAeCNEKuafI4+en8us7bKh/TGXKArKdWv4KppBmDvLMmbcos1DXESE2eT UqQNBfpVbar2Q== 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: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH v4 00/10] riscv: add Bouffalolab bl808 support Date: Thu, 18 May 2023 23:22:34 +0800 Message-Id: <20230518152244.2178-1-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 This series adds Bouffalolab uart driver and basic devicetrees for Bouffalolab bl808 SoC and Sipeed M1s dock board. Since v3: - fix build error reported by lkp@intel.com - fix earlycon compatible string - fix dtbs_check - collect Reviewed-by tag 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 -- 2.40.0