Message ID | 20230504033726.93-1-ychuang570808@gmail.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp38644vqo; Wed, 3 May 2023 21:04:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6C2XqNZEC8PeWfRyjGQZ6rhMblccjguQR3INY8xtJA1dwgjwNpcTCxBauUJOTXb3PFKgfj X-Received: by 2002:a05:6a20:3d8c:b0:f3:c08:cdef with SMTP id s12-20020a056a203d8c00b000f30c08cdefmr968274pzi.58.1683173053232; Wed, 03 May 2023 21:04:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683173053; cv=none; d=google.com; s=arc-20160816; b=eiDeltNsYnPv7RUHg9p5KlJP4nUvl/dAE/dfT//oy2qEGEdnalGDz+nyClkhsA0yIs jo7bUwYY2Yy/uSdLeGJ9aeIzh4qtewwkBmw6zyJdupCA3J1fZfimUH2o1IY92FF2H28K 2vd4wp5HB4WCZPZWDE34gklwqC/yVSBeUUNHifmJ3kNDMHt1zH54ZRKqxsoYr8Pwlc3u 2v7o1g/0rvmTzBlIwb702zgYLvhFwaRiyS1t+TG1YAzl0V7znOvvdlyP9/6RTC28TaL8 RheqoXx2TYlN1ZCs00y7x+LhY+42uB0Gv2wtUps+/gVFe+fqfg43fgzltXMPxswo3oVd VFOw== 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=LgN7t4ySVrsePI7gTpw7jm/XrMm27nwpeBG4Gq9yHWM=; b=Fa7pvCxAfaZ4LpGUyMf3HWSDw2teOSSXjpek1kiCqsIWBcpNgqrDhOyMt7C/iTtF9p 8TdlWug7j4mmDee1um8MB+dsjYLzj+2Bm/ieiKZLnix4IHrKQ77vRo11zPsd9nmz2pTn g75onsT1qfmY1fnNK3+TDO8d1IU2TQivwSW2PXtKl+jQe7N6q0Wdjdrx3QFHfe4bJKJe cg5wEWFVZt/b0ESGcNOQUa7FsiTkRjxZGF7l7vua3b3pg1gjKU3tuGbp3fchV1398th5 uGtRBvdMXzHH59ZHuoknySeMPS+T7ZpNEvJ9jrc6cSOTNUQaxwSYhPz2Va5pZz6ZuXIi KfMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=pEo0jS86; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i19-20020aa796f3000000b0063d26ee2cf0si34902330pfq.143.2023.05.03.21.03.58; Wed, 03 May 2023 21:04:13 -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=@gmail.com header.s=20221208 header.b=pEo0jS86; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229717AbjEDDhh (ORCPT <rfc822;lhua1029@gmail.com> + 99 others); Wed, 3 May 2023 23:37:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjEDDhf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 3 May 2023 23:37:35 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9787F10B; Wed, 3 May 2023 20:37:33 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1ab267e3528so8518875ad.0; Wed, 03 May 2023 20:37:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683171453; x=1685763453; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=LgN7t4ySVrsePI7gTpw7jm/XrMm27nwpeBG4Gq9yHWM=; b=pEo0jS86RBGaBUdC325/Uzz8UKWyJr7la/6/yXu6/+9GVnLYxGn7/46D9XYOQ58CU/ JTmjAXRBrbuLdmSCFO016EIMfMFRQo2YwHX7j8ebUhq/1kGk+DeumNiSVldDxe1Lu6hE /rO9R0izSGZyR3bdOD1z3MAbOmXUpsSXkpRcXXrIvrTYlt3LXsYJZiAlrmUYh0LPLiRM W+An6SxErPsQiOmyhILiKhXqbM67B03x9G4dvurUE79nAzeq2RAyGBqLvf6TwWUnAqjl eN05QPAj0MrGdTUytZXuxAmXIicZMd8sD6srvzv7vYsEmYKcGy7pk+SSh3ZM1hu/EfX0 Syng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683171453; x=1685763453; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LgN7t4ySVrsePI7gTpw7jm/XrMm27nwpeBG4Gq9yHWM=; b=Tgy69nRm7wuf4/gHI7Hx43JGamhEusiv708w2T8bdd2dZpaTcgyZ4SjlgR4RQ/4TPd 35pgQ45Wp66QWl993CXiuwcatO6x6UzpVKY2n/qafTYN7PTKEcg50xtvoP45zGM9wWzC iX95XUOJoJRiSA4LbdrLzjcKeAbTtby7yRh8MuXtOM1OIeG4diqHPQQGIYKXlp26TLDD YOfDUn+Bz4fO8yEMJklnvtEkCwIIMEEoiWAbS058MzP1RN+aema0ZOAij2FjN+pe+YTx suqTZv/RPto5pfiv+DfE+up5Pp4E5Yiz48O+6nUNf20QhgSdsxtv9gs5QTHHNWAxP+Sn NzBA== X-Gm-Message-State: AC+VfDxqj73LdhQz5dgM+TdM+frjnFKgLieQfCZkorBK2Dbe723G9/tO tgVUNmiJyvzsjYSYEzdARts= X-Received: by 2002:a17:902:b48d:b0:1ab:8f4:af2b with SMTP id y13-20020a170902b48d00b001ab08f4af2bmr1811115plr.38.1683171452874; Wed, 03 May 2023 20:37:32 -0700 (PDT) Received: from a28aa0606c51.. (60-250-192-107.hinet-ip.hinet.net. [60.250.192.107]) by smtp.gmail.com with ESMTPSA id jj3-20020a170903048300b001ab849b46d3sm468761plb.178.2023.05.03.20.37.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 May 2023 20:37:32 -0700 (PDT) From: Jacky Huang <ychuang570808@gmail.com> To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, lee@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, p.zabel@pengutronix.de, gregkh@linuxfoundation.org, jirislaby@kernel.org, tmaimon77@gmail.com, catalin.marinas@arm.com, will@kernel.org Cc: devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, arnd@arndb.de, schung@nuvoton.com, mjchen@nuvoton.com, Jacky Huang <ychuang3@nuvoton.com> Subject: [PATCH v9 00/10] Introduce Nuvoton ma35d1 SoC Date: Thu, 4 May 2023 03:37:16 +0000 Message-Id: <20230504033726.93-1-ychuang570808@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764934867463680434?= X-GMAIL-MSGID: =?utf-8?q?1764934867463680434?= |
Series |
Introduce Nuvoton ma35d1 SoC
|
|
Message
Jacky Huang
May 4, 2023, 3:37 a.m. UTC
From: Jacky Huang <ychuang3@nuvoton.com>
This patchset adds initial support for the Nuvoton ma35d1 SoC, including
initial device tree, clock driver, reset driver, and serial driver.
This patchset cover letter is based from the initial support for Nuvoton
ma35d1 to keep tracking the version history.
This patchset had been applied to Linux kernel 6.3.0-12728-g348551ddaf31-dirty
and tested on the Nuvoton ma35d1 SOM evaluation board.
(ma35d1 information: https://www.nuvoton.com/products/microprocessors/arm-cortex-a35-mpus/)
MA35D1 porting on linux-5.10.y can be found at: https://github.com/OpenNuvoton/MPU-Family
v9:
- Combine MAINTAINERS patch into patch 5 'dt-bindings: arm: Add initial bindings
for Nuvoton platform'
- Modify clock driver
- Use the helper function for 64-bit division
- Fixed minor issues
- Modify reset driver
- Refine coding style and add required header files
- Add spin_lock protection
- Add error return handling to the serial driver probe function
v8:
- Remove '0005-dt-bindings-mfd-syscon-Add-nuvoton-ma35d1-sys-compat.patch' as it was applied.
- Modify MAINTAINERS NUVOTON MA35 and NPCM path settings
- Remove 'syscon' from dtsi 'sys' node and modify the corresponding yaml
- Modify clock driver
- Remove the header file and move definitions into .c files.
- Use parent_data instead of parent name.
- Modify serial driver
- Modify reset driver
- Modify reset register/offset lookup table to be indexed by reset id
- Combined reset and reboot structure
v7:
- Fixed dts system-management node and compatible driver
- move 'nuvoton,npcm-gcr.yaml' from 'binding/arm/nuvoton' to 'binding/soc/nuvoton'
- In ma35d1.dtsi, create the soc node for ma35d1 SoC
- Modify the issues found in serial driver
- Modify the issues found in clock driver
- Modify the IDs of reset driver to be contiguous numbers and use lookup table
to find register offset and bit position.
- Modify MAINTAINERS NUVOTON NPCM path as npcm directory name to nuvoton
v6:
- Combine nuvoton,ma35d1-clk.yaml and nuvoton,ma35d1-clk.h into one patch
- Combine nuvoton,ma35d1-reset.yaml and nuvoton,ma35d1-reset.h into one patch
- rename Documentation/devicetree/bindings/arm/npcm directory as nuvoton
- Remove patch for adding include/linux/mfd/ma35d1-sys.h as it's not required
- Update dtsi & dts files and move board-specific nodes to dts
- Modify reset driver
- Modify serial driver, fix coding style issues
- Modify clock driver, rewrite the PLL calculation functions
v5:
- Add ARCH_NUVOTON to arm64 Kconfig
- Add ARCH_NUVOTON to defconfig
- Add the clock driver
- Add the reset driver
- Add the serial driver
- Add us to the maintainer
v4:
- patch 4/5 is a resend
- Fixed dt_binding_check errors of nuvoton,ma35d1-clk.yaml
- Modify ma35d1.dtsi
1. Add a node hxt_24m
2. Fixed the base address of gic node
3. Add clocks and clock-names to clock node
- Fixed borad binding mistakes of nuvoton.yaml
v3:
- added patch 4/5 and 5/5
- introduce CONFIG_ARCH_NUVOTON option
- add initial bindings for Nuvoton Platform boards
- fixed coding style problem of nuvoton,ma35d1-clk.h
- added CAPLL to clock-controller node
- modify the chosen node of ma35d1-evb.dts
- modify clock yaml "clk-pll-mode" to "nuvoton,clk-pll-mode"
v2:
- fixed dt_binding_check failed of nuvoton,ma35d1-clk.yaml
Jacky Huang (10):
arm64: Kconfig.platforms: Add config for Nuvoton MA35 platform
arm64: defconfig: Add support for Nuvoton MA35 family SoCs
dt-bindings: clock: nuvoton: add binding for ma35d1 clock controller
dt-bindings: reset: nuvoton: Document ma35d1 reset control
dt-bindings: arm: Add initial bindings for Nuvoton platform
dt-bindings: serial: Document ma35d1 uart controller
arm64: dts: nuvoton: Add initial ma35d1 device tree
clk: nuvoton: Add clock driver for ma35d1 clock controller
reset: Add Nuvoton ma35d1 reset driver support
tty: serial: Add Nuvoton ma35d1 serial driver support
.../bindings/arm/nuvoton/nuvoton,ma35d1.yaml | 30 +
.../npcm.yaml => nuvoton/nuvoton,npcm.yaml} | 2 +-
.../bindings/clock/nuvoton,ma35d1-clk.yaml | 63 ++
.../bindings/reset/nuvoton,ma35d1-reset.yaml | 45 +
.../serial/nuvoton,ma35d1-serial.yaml | 48 +
.../nuvoton/nuvoton,npcm-gcr.yaml} | 2 +-
MAINTAINERS | 13 +-
arch/arm64/Kconfig.platforms | 9 +
arch/arm64/boot/dts/nuvoton/Makefile | 2 +
.../boot/dts/nuvoton/ma35d1-iot-512m.dts | 56 ++
.../boot/dts/nuvoton/ma35d1-som-256m.dts | 56 ++
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi | 232 +++++
arch/arm64/configs/defconfig | 1 +
drivers/clk/Makefile | 1 +
drivers/clk/nuvoton/Kconfig | 19 +
drivers/clk/nuvoton/Makefile | 4 +
drivers/clk/nuvoton/clk-ma35d1-divider.c | 140 +++
drivers/clk/nuvoton/clk-ma35d1-pll.c | 365 +++++++
drivers/clk/nuvoton/clk-ma35d1.c | 948 ++++++++++++++++++
drivers/reset/Kconfig | 6 +
drivers/reset/Makefile | 1 +
drivers/reset/reset-ma35d1.c | 234 +++++
drivers/tty/serial/Kconfig | 18 +
drivers/tty/serial/Makefile | 1 +
drivers/tty/serial/ma35d1_serial.c | 796 +++++++++++++++
.../dt-bindings/clock/nuvoton,ma35d1-clk.h | 253 +++++
.../dt-bindings/reset/nuvoton,ma35d1-reset.h | 108 ++
27 files changed, 3450 insertions(+), 3 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/nuvoton/nuvoton,ma35d1.yaml
rename Documentation/devicetree/bindings/arm/{npcm/npcm.yaml => nuvoton/nuvoton,npcm.yaml} (93%)
create mode 100644 Documentation/devicetree/bindings/clock/nuvoton,ma35d1-clk.yaml
create mode 100644 Documentation/devicetree/bindings/reset/nuvoton,ma35d1-reset.yaml
create mode 100644 Documentation/devicetree/bindings/serial/nuvoton,ma35d1-serial.yaml
rename Documentation/devicetree/bindings/{arm/npcm/nuvoton,gcr.yaml => soc/nuvoton/nuvoton,npcm-gcr.yaml} (93%)
create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1-iot-512m.dts
create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1-som-256m.dts
create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1.dtsi
create mode 100644 drivers/clk/nuvoton/Kconfig
create mode 100644 drivers/clk/nuvoton/Makefile
create mode 100644 drivers/clk/nuvoton/clk-ma35d1-divider.c
create mode 100644 drivers/clk/nuvoton/clk-ma35d1-pll.c
create mode 100644 drivers/clk/nuvoton/clk-ma35d1.c
create mode 100644 drivers/reset/reset-ma35d1.c
create mode 100644 drivers/tty/serial/ma35d1_serial.c
create mode 100644 include/dt-bindings/clock/nuvoton,ma35d1-clk.h
create mode 100644 include/dt-bindings/reset/nuvoton,ma35d1-reset.h