* [PATCH 00/15] Ambarella S6LM SoC bring-up
@ 2023-01-23 7:32 Li Chen
[not found] ` <20230123073305.149940-12-lchen@ambarella.com>
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Li Chen @ 2023-01-23 7:32 UTC (permalink / raw)
Cc: Li Chen, Andreas Böhler, Arnd Bergmann, Brian Norris,
Chris Morgan, Christian Lamparter, Chuanhong Guo, Conor Dooley,
Daniel Palmer,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Florian Fainelli, Greg Kroah-Hartman, Guenter Roeck,
Heiko Stuebner, Hitomi Hasegawa, Jean Delvare, Jonathan Corbet,
Krzysztof Kozlowski, Liang Yang, Li Chen, Linus Walleij,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
open list:COMMON CLK FRAMEWORK, open list:DOCUMENTATION,
open list:PIN CONTROL SUBSYSTEM, open list,
open list:MEMORY TECHNOLOGY DEVICES (MTD),
open list:SERIAL DRIVERS, Miquel Raynal, Nicolas Ferre,
Rafael J. Wysocki, Randy Dunlap, Richard Weinberger,
Rickard x Andersson, Rob Herring, Roger Quadros, Samuel Holland,
Shawn Guo, Sven Peter, Yinbo Zhu
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
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 11/15] dt-bindings: mtd: Add binding for Ambarella
[not found] ` <20230123073305.149940-12-lchen@ambarella.com>
@ 2023-01-23 8:13 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-23 8:13 UTC (permalink / raw)
To: Li Chen, Li Chen, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra, Rob Herring, Krzysztof Kozlowski
Cc: moderated list:ARM/Ambarella SoC support,
open list:MEMORY TECHNOLOGY DEVICES (MTD),
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list
On 23/01/2023 08:32, Li Chen wrote:
> Ambarella SoC contains nand flash controller.
> Add compatible for it.
>
> Signed-off-by: Li Chen <lchen@ambarella.com>
> Change-Id: I4108699a0678ba45e5d4347cbd860bc552dd91dd
> ---
> .../bindings/mtd/ambarella,nand.yaml | 77 +++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 78 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mtd/ambarella,nand.yaml
>
> diff --git a/Documentation/devicetree/bindings/mtd/ambarella,nand.yaml b/Documentation/devicetree/bindings/mtd/ambarella,nand.yaml
> new file mode 100644
> index 000000000000..7c2e7c2ebc7b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mtd/ambarella,nand.yaml
> @@ -0,0 +1,77 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mtd/ambarella,nand.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Ambarella NAND Controller
> +
> +maintainers:
> + - Li Chen <lchen@ambarella.com>
> +
> +properties:
> + compatible:
> + - const: ambarella,nand
> +
> + reg:
> + minItems: 1
> + maxItems: 1
All your patches are weirder and weirder. Do you see such syntax in any
patches before?
Drop minItems.
> +
> + interrupts:
> + minItems: 1
> + maxItems: 1
Drop both.
> + items:
> + - description: fio irq
> +
> + clocks:
> + maxItems: 1
> + description: reference to the clock for the NAND controller
> +
> + nand-on-flash-bbt:
OK, so this was for sure not tested.
Do not send untested patches.
Best regards,
Krzysztof
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 12/15] mtd: nand: add Ambarella nand support
[not found] ` <20230123073305.149940-13-lchen@ambarella.com>
@ 2023-01-23 8:32 ` Miquel Raynal
0 siblings, 0 replies; 6+ messages in thread
From: Miquel Raynal @ 2023-01-23 8:32 UTC (permalink / raw)
To: Li Chen
Cc: Richard Weinberger, Vignesh Raghavendra, Li Chen, Roger Quadros,
Florian Fainelli, Krzysztof Kozlowski, Chuanhong Guo, Liang Yang,
Jean Delvare, Andreas Böhler, Christian Lamparter,
Rickard x Andersson, open list, open list:NAND FLASH SUBSYSTEM,
moderated list:ARM/Ambarella SoC support
Hi Li,
I'm sorry, this is not going to work at all.
> + ambarella_nand_init(host);
> +
> + mtd = nand_to_mtd(&host->chip);
> + mtd->name = "amba_nand";
> +
> + nand_controller_init(&host->controller);
> + nand_set_controller_data(&host->chip, host);
> + nand_set_flash_node(&host->chip, dev->of_node);
> +
> + host->chip.controller = &host->controller;
> + host->chip.controller->ops = &ambarella_controller_ops;
> + host->chip.legacy.chip_delay = 0;
> + host->chip.legacy.read_byte = ambarella_nand_read_byte;
> + host->chip.legacy.write_buf = ambarella_nand_write_buf;
> + host->chip.legacy.read_buf = ambarella_nand_read_buf;
> + host->chip.legacy.select_chip = ambarella_nand_select_chip;
> + host->chip.legacy.cmd_ctrl = ambarella_nand_cmd_ctrl;
> + host->chip.legacy.dev_ready = ambarella_nand_dev_ready;
> + host->chip.legacy.waitfunc = ambarella_nand_waitfunc;
> + host->chip.legacy.cmdfunc = ambarella_nand_cmdfunc;
> + host->chip.legacy.set_features = nand_get_set_features_notsupp;
> + host->chip.legacy.get_features = nand_get_set_features_notsupp;
Please be aware that we no longer accept legacy introductions upstream.
You can look for ->exec_op() conversions using git-log.
> + host->chip.options |= NAND_NO_SUBPAGE_WRITE | NAND_USES_DMA;
> +
> + rval = nand_scan(&host->chip, 1);
> + if (rval < 0)
> + return rval;
> +
> + rval = mtd_device_register(mtd, NULL, 0);
> + if (rval < 0)
> + nand_cleanup(&host->chip);
> +
> + return rval;
> +}
[...]
> diff --git a/drivers/mtd/nand/raw/nand_ids.c
b/drivers/mtd/nand/raw/nand_ids.c
> index dacc5529b3df..9f264e2a6484 100644
> --- a/drivers/mtd/nand/raw/nand_ids.c
> +++ b/drivers/mtd/nand/raw/nand_ids.c
> @@ -62,6 +62,10 @@ struct nand_flash_dev nand_flash_ids[] = {
> { .id = {0x98, 0xd3, 0x91, 0x26, 0x76} },
> SZ_4K, SZ_1K, SZ_256K, 0, 5, 256, NAND_ECC_INFO(8, SZ_512)},
>
> + {"MT29F2G01ABAGD SPINAND 2G 3.3V 8-bit",
> + { .id = {0x2c, 0x24, 0x00, 0x00, 0x00} },
> + SZ_2K, SZ_256, SZ_128K, 0, 2, 128},
> +
Raw NAND != SPI-NAND. I don't get what you're doing here but either you
want to drive SPI-NANDs and this is a SPI controller driver that
implements spi-mem ops and should be located under drivers/spi/, or
this is a plain raw NAND controller which is wired to a parallel NAND
and this should be under drivers/mtd/nand/raw/.
ECC controllers can be shared with the ECC engine abstraction though.
> LEGACY_ID_NAND("NAND 4MiB 5V 8-bit", 0x6B, 4, SZ_8K, SP_OPTIONS),
> LEGACY_ID_NAND("NAND 4MiB 3,3V 8-bit", 0xE3, 4, SZ_8K, SP_OPTIONS),
> LEGACY_ID_NAND("NAND 4MiB 3,3V 8-bit", 0xE5, 4, SZ_8K, SP_OPTIONS),
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 00/15] Ambarella S6LM SoC bring-up
2023-01-23 7:32 [PATCH 00/15] Ambarella S6LM SoC bring-up Li Chen
[not found] ` <20230123073305.149940-12-lchen@ambarella.com>
[not found] ` <20230123073305.149940-13-lchen@ambarella.com>
@ 2023-01-23 8:39 ` Arnd Bergmann
2023-01-24 2:08 ` Bagas Sanjaya
2023-01-25 2:24 ` Li Chen
2 siblings, 2 replies; 6+ messages in thread
From: Arnd Bergmann @ 2023-01-23 8:39 UTC (permalink / raw)
To: Li Chen
Cc: Andreas Böhler, Brian Norris, Chris Morgan,
Christian Lamparter, Chuanhong Guo, Conor.Dooley, Daniel Palmer,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Florian Fainelli, Greg Kroah-Hartman, Guenter Roeck,
Heiko Stübner, Hitomi Hasegawa, Jean Delvare,
Jonathan Corbet, Krzysztof Kozlowski, Liang Yang, Li Chen,
Linus Walleij, moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
open list:COMMON CLK FRAMEWORK, open list:DOCUMENTATION,
open list:GPIO SUBSYSTEM, open list,
open list:MEMORY TECHNOLOGY DEVICES (MTD),
open list:SERIAL DRIVERS, Miquel Raynal, Nicolas Ferre,
Rafael J . Wysocki, Randy Dunlap, Richard Weinberger,
Rickard x Andersson, Rob Herring, Roger Quadros, Samuel Holland,
Shawn Guo, Sven Peter, Yinbo Zhu
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
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 00/15] Ambarella S6LM SoC bring-up
2023-01-23 8:39 ` [PATCH 00/15] Ambarella S6LM SoC bring-up Arnd Bergmann
@ 2023-01-24 2:08 ` Bagas Sanjaya
2023-01-25 2:24 ` Li Chen
1 sibling, 0 replies; 6+ messages in thread
From: Bagas Sanjaya @ 2023-01-24 2:08 UTC (permalink / raw)
To: Arnd Bergmann, Li Chen
Cc: Andreas Böhler, Brian Norris, Chris Morgan,
Christian Lamparter, Chuanhong Guo, Conor.Dooley, Daniel Palmer,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Florian Fainelli, Greg Kroah-Hartman, Guenter Roeck,
Heiko Stübner, Hitomi Hasegawa, Jean Delvare,
Jonathan Corbet, Krzysztof Kozlowski, Liang Yang, Li Chen,
Linus Walleij, moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
open list:COMMON CLK FRAMEWORK, open list:DOCUMENTATION,
open list:GPIO SUBSYSTEM, open list,
open list:MEMORY TECHNOLOGY DEVICES (MTD),
open list:SERIAL DRIVERS, Miquel Raynal, Nicolas Ferre,
Rafael J . Wysocki, Randy Dunlap, Richard Weinberger,
Rickard x Andersson, Rob Herring, Roger Quadros, Samuel Holland,
Shawn Guo, Sven Peter, Yinbo Zhu
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
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 00/15] Ambarella S6LM SoC bring-up
2023-01-23 8:39 ` [PATCH 00/15] Ambarella S6LM SoC bring-up Arnd Bergmann
2023-01-24 2:08 ` Bagas Sanjaya
@ 2023-01-25 2:24 ` Li Chen
1 sibling, 0 replies; 6+ messages in thread
From: Li Chen @ 2023-01-25 2:24 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Andreas Böhler, Brian Norris, Chris Morgan,
Christian Lamparter, Chuanhong Guo, Conor.Dooley, Daniel Palmer,
devicetree, Florian Fainelli, Greg Kroah-Hartman, Guenter Roeck,
Heiko Stübner, Hitomi Hasegawa, Jean Delvare,
Jonathan Corbet, Krzysztof Kozlowski, Liang Yang, Li Chen,
Linus Walleij, linux-arm-kernel, lkml, linux-mtd, Miquel Raynal,
Nicolas Ferre, Rafael J . Wysocki, Randy Dunlap,
Richard Weinberger, Rickard x Andersson, Rob Herring,
Roger Quadros, Samuel Holland, Shawn Guo, Sven Peter, Yinbo Zhu
Hi Arnd,
I've been on vacation recently (January 17-January 31), so please forgive me if I'm sometimes late in responding.
My outlook email (lchen@ambarella) is not suitable for replying on lkml, so I use my personal email.
Please reply to my personal email (me@linux.beauty) instead of my outlook email, thanks in advance.
> From: Arnd Bergmann <arnd@arndb.de>
> Sent: Monday, January 23, 2023 4:39 PM
> 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.
Sorry for inconvenience caused, I will double check since v2, thanks for
your kindness.
Regards,
Li
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-01-25 2:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-23 7:32 [PATCH 00/15] Ambarella S6LM SoC bring-up Li Chen
[not found] ` <20230123073305.149940-12-lchen@ambarella.com>
2023-01-23 8:13 ` [PATCH 11/15] dt-bindings: mtd: Add binding for Ambarella Krzysztof Kozlowski
[not found] ` <20230123073305.149940-13-lchen@ambarella.com>
2023-01-23 8:32 ` [PATCH 12/15] mtd: nand: add Ambarella nand support Miquel Raynal
2023-01-23 8:39 ` [PATCH 00/15] Ambarella S6LM SoC bring-up Arnd Bergmann
2023-01-24 2:08 ` Bagas Sanjaya
2023-01-25 2:24 ` Li Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox