Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mtd: rawnand: Add Phytium NAND flash controller support #199

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions Documentation/devicetree/bindings/mtd/phytium,nfc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mtd/phytium,nfc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Phytium Nand Flash controller

maintainers:
- Chen Baozi <[email protected]>

properties:
compatible:
const: phytium,nfc

reg:
maxItems: 1

interrupts:
maxItems: 1

nand-ecc-strength:
const: 8

nand-ecc-step-size:
const: 512

allOf:
- $ref: "nand-controller.yaml#"

required:
- compatible
- reg
- interrupts

examples:
- |
nand0: nand@28002000 {
compatible = "phytium,nfc";
reg = <0x0 0x28002000 0x0 0x1000>;
interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
};
19 changes: 19 additions & 0 deletions drivers/mtd/nand/raw/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,25 @@ config MTD_NAND_ORION
No board specific support is done by this driver, each board
must advertise a platform_device for the driver to attach.

config MTD_NAND_PHYTIUM
tristate

config MTD_NAND_PHYTIUM_PCI
tristate "Support Phytium NAND controller as a PCI device"
select MTD_NAND_PHYTIUM
depends on PCI
help
Enable the driver for NAND flash controller of Phytium Px210 chipset,
using the Phytium NAND controller core.

config MTD_NAND_PHYTIUM_PLAT
tristate "Support Phytium NAND controller as a platform device"
select MTD_NAND_PHYTIUM
depends on ARCH_PHYTIUM
help
Enable the driver for NAND flash controller of Phytium CPU chipset,
using the Phytium NAND controller core.

config MTD_NAND_MARVELL
tristate "Marvell EBU NAND controller"
depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU || \
Expand Down
3 changes: 3 additions & 0 deletions drivers/mtd/nand/raw/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ obj-$(CONFIG_MTD_NAND_INTEL_LGM) += intel-nand-controller.o
obj-$(CONFIG_MTD_NAND_ROCKCHIP) += rockchip-nand-controller.o
obj-$(CONFIG_MTD_NAND_PL35X) += pl35x-nand-controller.o
obj-$(CONFIG_MTD_NAND_RENESAS) += renesas-nand-controller.o
obj-$(CONFIG_MTD_NAND_PHYTIUM) += phytium_nand.o
obj-$(CONFIG_MTD_NAND_PHYTIUM_PCI) += phytium_nand_pci.o
obj-$(CONFIG_MTD_NAND_PHYTIUM_PLAT) += phytium_nand_plat.o

nand-objs := nand_base.o nand_legacy.o nand_bbt.o nand_timings.o nand_ids.o
nand-objs += nand_onfi.o
Expand Down
Loading