2023-01-23 07:36:51

by Li Chen

[permalink] [raw]
Subject: [PATCH 00/15] Ambarella S6LM SoC bring-up

This series brings up initial support for the Ambarella S6LM
SoC.

The following features are supported in this initial port:

- UART with console support
- Pinctrl with GPIO controller
- Nand flash controller
- Devicetree

Li Chen (15):
debugfs: allow to use regmap for print regs
dt-bindings: vendor-prefixes: add Ambarella prefix
dt-bindings: arm: ambarella: Add binding for Ambarella ARM platforms
dt-bindings: arm: add support for Ambarella SoC
arm64: Kconfig: Introduce CONFIG_ARCH_AMBARELLA
soc: add Ambarella driver
dt-bindings: clock: Add Ambarella clock bindings
clk: add support for Ambarella clocks
dt-bindings: serial: add support for Ambarella
serial: ambarella: add support for Ambarella uart_port
dt-bindings: mtd: Add binding for Ambarella
mtd: nand: add Ambarella nand support
dt-bindings: pinctrl: add support for Ambarella
pinctrl: Add pinctrl/GPIO for Ambarella SoCs
arm64: dts: ambarella: introduce Ambarella s6lm SoC

.../devicetree/bindings/arm/ambarella.yaml | 22 +
.../arm/ambarella/ambarella,cpuid.yaml | 24 +
.../bindings/arm/ambarella/ambarella,rct.yaml | 24 +
.../arm/ambarella/ambarella,scratchpad.yaml | 24 +
.../bindings/arm/ambarella/ambarella.yaml | 22 +
.../clock/ambarella,composite-clock.yaml | 52 +
.../bindings/clock/ambarella,pll-clock.yaml | 59 +
.../bindings/mtd/ambarella,nand.yaml | 77 +
.../bindings/pinctrl/ambarella,pinctrl.yaml | 160 ++
.../bindings/serial/ambarella_uart.yaml | 57 +
.../devicetree/bindings/vendor-prefixes.yaml | 2 +
Documentation/filesystems/debugfs.rst | 2 +
MAINTAINERS | 29 +
arch/arm64/Kconfig.platforms | 9 +
.../boot/dts/ambarella/ambarella-s6lm.dtsi | 332 ++++
.../boot/dts/ambarella/s6lm_pineapple.dts | 29 +
drivers/clk/Makefile | 1 +
drivers/clk/ambarella/Makefile | 5 +
drivers/clk/ambarella/clk-composite.c | 293 +++
drivers/clk/ambarella/clk-pll-common.c | 308 ++++
drivers/clk/ambarella/clk-pll-common.h | 96 +
drivers/clk/ambarella/clk-pll-normal.c | 328 ++++
drivers/mtd/nand/raw/Kconfig | 8 +
drivers/mtd/nand/raw/Makefile | 1 +
drivers/mtd/nand/raw/ambarella_combo_nand.c | 1519 ++++++++++++++++
drivers/mtd/nand/raw/ambarella_combo_nand.h | 370 ++++
drivers/mtd/nand/raw/nand_ids.c | 4 +
drivers/pinctrl/Kconfig | 6 +
drivers/pinctrl/Makefile | 1 +
drivers/pinctrl/pinctrl-ambarella.c | 1357 ++++++++++++++
drivers/soc/Makefile | 1 +
drivers/soc/ambarella/Makefile | 3 +
drivers/soc/ambarella/soc.c | 136 ++
drivers/tty/serial/Kconfig | 16 +
drivers/tty/serial/Makefile | 1 +
drivers/tty/serial/ambarella_uart.c | 1581 +++++++++++++++++
drivers/tty/serial/ambarella_uart.h | 120 ++
fs/debugfs/file.c | 43 +-
include/linux/debugfs.h | 11 +
include/soc/ambarella/misc.h | 17 +
40 files changed, 7149 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/arm/ambarella.yaml
create mode 100644 Documentation/devicetree/bindings/arm/ambarella/ambarella,cpuid.yaml
create mode 100644 Documentation/devicetree/bindings/arm/ambarella/ambarella,rct.yaml
create mode 100644 Documentation/devicetree/bindings/arm/ambarella/ambarella,scratchpad.yaml
create mode 100644 Documentation/devicetree/bindings/arm/ambarella/ambarella.yaml
create mode 100644 Documentation/devicetree/bindings/clock/ambarella,composite-clock.yaml
create mode 100644 Documentation/devicetree/bindings/clock/ambarella,pll-clock.yaml
create mode 100644 Documentation/devicetree/bindings/mtd/ambarella,nand.yaml
create mode 100644 Documentation/devicetree/bindings/pinctrl/ambarella,pinctrl.yaml
create mode 100644 Documentation/devicetree/bindings/serial/ambarella_uart.yaml
create mode 100644 arch/arm64/boot/dts/ambarella/ambarella-s6lm.dtsi
create mode 100644 arch/arm64/boot/dts/ambarella/s6lm_pineapple.dts
create mode 100644 drivers/clk/ambarella/Makefile
create mode 100644 drivers/clk/ambarella/clk-composite.c
create mode 100644 drivers/clk/ambarella/clk-pll-common.c
create mode 100644 drivers/clk/ambarella/clk-pll-common.h
create mode 100644 drivers/clk/ambarella/clk-pll-normal.c
create mode 100644 drivers/mtd/nand/raw/ambarella_combo_nand.c
create mode 100644 drivers/mtd/nand/raw/ambarella_combo_nand.h
create mode 100644 drivers/pinctrl/pinctrl-ambarella.c
create mode 100644 drivers/soc/ambarella/Makefile
create mode 100644 drivers/soc/ambarella/soc.c
create mode 100644 drivers/tty/serial/ambarella_uart.c
create mode 100644 drivers/tty/serial/ambarella_uart.h
create mode 100644 include/soc/ambarella/misc.h

--
2.34.1



2023-01-23 07:37:53

by Li Chen

[permalink] [raw]
Subject: [PATCH 02/15] dt-bindings: vendor-prefixes: add Ambarella prefix

Add vendor prefix for Ambarella, Inc.

Signed-off-by: Li Chen <[email protected]>
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 70ffb3780621..97bfd98fcae1 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -89,6 +89,8 @@ patternProperties:
description: Amarula Solutions
"^amazon,.*":
description: Amazon.com, Inc.
+ "^ambarella,.*":
+ description: Ambarella, Inc.
"^amcc,.*":
description: Applied Micro Circuits Corporation (APM, formally AMCC)
"^amd,.*":
--
2.34.1


2023-01-23 07:38:50

by Li Chen

[permalink] [raw]
Subject: [PATCH 05/15] arm64: Kconfig: Introduce CONFIG_ARCH_AMBARELLA

This adds a Kconfig option to toggle support
for Ambarella ARM SoCs.

Signed-off-by: Li Chen <[email protected]>
Change-Id: I41345f5052b08023d399cb9db3faa228ca54d265
---
arch/arm64/Kconfig.platforms | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index d1970adf80ab..8def8aaca0c4 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -8,6 +8,15 @@ config ARCH_ACTIONS
help
This enables support for the Actions Semiconductor S900 SoC family.

+config ARCH_AMBARELLA
+ bool "Ambarella ARMv8 SoC Family"
+ select PINCTRL
+ select PINCTRL_AMB
+ select RATIONAL
+ help
+ This enables support for Ambarella ARMv8 SoC Family starting
+ from s6lm.
+
config ARCH_SUNXI
bool "Allwinner sunxi 64-bit SoC Family"
select ARCH_HAS_RESET_CONTROLLER
--
2.34.1


2023-01-23 08:03:04

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 02/15] dt-bindings: vendor-prefixes: add Ambarella prefix

On 23/01/2023 08:32, Li Chen wrote:
> Add vendor prefix for Ambarella, Inc.
>
> Signed-off-by: Li Chen <[email protected]>


Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2023-01-23 08:33:29

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 05/15] arm64: Kconfig: Introduce CONFIG_ARCH_AMBARELLA

On Mon, Jan 23, 2023, at 08:32, Li Chen wrote:
> +config ARCH_AMBARELLA
> + bool "Ambarella ARMv8 SoC Family"
> + select PINCTRL
> + select PINCTRL_AMB
> + select RATIONAL
> + help
> + This enables support for Ambarella ARMv8 SoC Family starting
> + from s6lm.

The patch is ok, but drop the "ARMv8" from the "bool" prompt,
we are removing this from all the other entries as well.

Arnd

2023-01-23 08:40:09

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 00/15] Ambarella S6LM SoC bring-up

On Mon, Jan 23, 2023, at 08:32, Li Chen wrote:
> This series brings up initial support for the Ambarella S6LM
> SoC.
>
> The following features are supported in this initial port:
>
> - UART with console support
> - Pinctrl with GPIO controller
> - Nand flash controller
> - Devicetree

I seem to only have part of the series, please add both me and
the linux-arm-kernel mailing list to each part of the initial
submission.

It's possible that some patches were already Cc'd to
linux-arm-kernel but did not make it through because the Cc list
was too long (it has to fit within 1024 characters for many lists).
I think you too the Cc list from get_maintainers.pl, but when
sending new drivers this does not work well because it picks
up everyone that recently touched the Makefile/Kconfig.

Arnd

2023-01-24 02:09:10

by Bagas Sanjaya

[permalink] [raw]
Subject: Re: [PATCH 00/15] Ambarella S6LM SoC bring-up

On 1/23/23 15:39, Arnd Bergmann wrote:
> I seem to only have part of the series, please add both me and
> the linux-arm-kernel mailing list to each part of the initial
> submission.
>
> It's possible that some patches were already Cc'd to
> linux-arm-kernel but did not make it through because the Cc list
> was too long (it has to fit within 1024 characters for many lists).
> I think you too the Cc list from get_maintainers.pl, but when
> sending new drivers this does not work well because it picks
> up everyone that recently touched the Makefile/Kconfig.

Hi Arnd,

It is possible (and common) that people who recently touched these
files, when given new drivers patches, aren't interested in reviewing
them for many reasons.

In that case, you may want to see Alison's trick posted on kernel
outreachy list [1]. In summary, pass `--no-gitfallback` (don't give
addresses of recent commit authors) and `--norolestats` (only name and
email are printed; MLs don't get open list:-generated names). Also,
another trick that I use is to condense the list by passing
`--separator , ` so that it can be easily copy-pasted to
git-send-email(1).

Thanks.

[1]: https://lore.kernel.org/outreachy/20211015171331.GA431883@alison-desk/

--
An old man doll... just what I always wanted! - Clara