*** SUBJECT HERE ***
Subsystems (4)
cover *** SUBJECT HERE ***
From: Ken Ma <[email protected]>
The below patches introduce aardvark pcie driver and enable pcie for Armada 37xx.
Ken Ma (1):
arm64: a37xx: defconfigs: enable PCI_CMD and E1000 driver
Wilson Ding (4):
arm64: a37xx: populate pcie memory region
arm64: a37xx: pci: add support for aardvark pcie driver
arm64: a37xx: defconfigs: enable aardvark pcie driver
arm64: a37xx: dts: enable pcie port
arch/arm/dts/armada-3720-db.dts | 8 + arch/arm/dts/armada-3720-espressobin.dts | 7 + arch/arm/dts/armada-37xx.dtsi | 16 + arch/arm/mach-mvebu/armada3700/cpu.c | 8 + configs/mvebu_db-88f3720_defconfig | 5 + configs/mvebu_espressobin-88f3720_defconfig | 5 + drivers/pci/Kconfig | 10 + drivers/pci/Makefile | 1 + drivers/pci/pci-aardvark.c | 690 ++++++++++++++++++++++++++++ 9 files changed, 750 insertions(+) create mode 100644 drivers/pci/pci-aardvark.c
Signature · 1 line
1.9.1
PATCH 1/5 arm64: a37xx: populate pcie memory region
From: Wilson Ding <[email protected]>
This patch added a new region of 32MiB AT 0xe800.0000 to Armada37x0's memory map. This region is supposed to be mapped in MMU in order to enable the access to the PCI I/O or MEM resources.
Reviewed-on: http://vgitil04.il.marvell.com:8080/38724
--- arch/arm/mach-mvebu/armada3700/cpu.c | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm/mach-mvebu/armada3700/cpu.c +8 -0
@@ -46,6 +46,14 @@ static struct mm_region mvebu_mem_map[] = {PTE_BLOCK_NON_SHARE }, { +/* PCI regions */ + .phys = 0xe8000000UL, + .virt = 0xe8000000UL, + .size = 0x02000000UL, /* 32MiB master PCI space */ + .attrs =PTE_BLOCK_MEMTYPE (MT_DEVICE_NGNRNE ) | +PTE_BLOCK_NON_SHARE + }, + {/* List terminator */ 0, }
Signature · 1 line
1.9.1
PATCH 1/5 arm64: a37xx: populate pcie memory region
Quoted 28 lines · make at marvell.com
From: Wilson Ding <[email protected]>
This patch added a new region of 32MiB AT 0xe800.0000 to Armada37x0's memory map. This region is supposed to be mapped in MMU in order to enable the access to the PCI I/O or MEM resources.
Signed-off-by Wilson Ding <[email protected]>Reviewed-on: http://vgitil04.il.marvell.com:8080/38724
Tested-by iSoC Platform CI <[email protected]>Reviewed-by Victor Gu <[email protected]>Signed-off-by Ken Ma <[email protected]>Cc Simon Glass <[email protected]>Cc Stefan Roese <[email protected]>--- arch/arm/mach-mvebu/armada3700/cpu.c | 8 ++++++++ 1 file changed, 8 insertions(+)arch/arm/mach-mvebu/armada3700/cpu.c +1
-0@@ -46,6 +46,14 @@ static struct mm_region mvebu_mem_map[] = {PTE_BLOCK_NON_SHARE }, { +/* PCI regions */
arch/arm/mach-mvebu/armada3700/cpu.c static struct mm_region mvebu_mem_map[] = { · line 59
Quoted 10 lines
arch/arm/mach-mvebu/armada3700/cpu.c +7
-0+ .phys = 0xe8000000UL, + .virt = 0xe8000000UL, + .size = 0x02000000UL, /* 32MiB master PCI space */ + .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | + PTE_BLOCK_NON_SHARE + }, + {/* List terminator */ 0, }
Complete series applied to u-boot-marvell/master.
Thanks,
Stefan
PATCH 2/5 arm64: a37xx: pci: add support for aardvark pcie driver
In reply to make at marvell.comFrom: Wilson Ding <[email protected]>
This patch introduced the Aardvark PCIe driver based driver model.
The PCIe driver is supposed to work in Root Complex mode. It only supports X1 lane width.
Reviewed-on: http://vgitil04.il.marvell.com:8080/38725
--- drivers/pci/Kconfig | 10 + drivers/pci/Makefile | 1 + drivers/pci/pci-aardvark.c | 690 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 701 insertions(+) create mode 100644 drivers/pci/pci-aardvark.c
drivers/pci/Kconfig +10 -0
@@ -26,6 +26,16 @@ config DM_PCI_COMPAT measure when porting a board to use driver model for PCI. Once the board is fully supported, this option should be disabled. +config PCI_AARDVARK + bool "Enable Aardvark PCIe driver" + default n + depends on DM_PCI + depends on ARMADA_3700 + help + Say Y here if you want to enable PCIe controller support on + Armada37x0 SoCs. The PCIe controller on Armada37x0 is based on + Aardvark hardware. + config PCI_PNP bool "Enable Plug & Play support for PCI" depends on PCI || DM_PCI
drivers/pci/Makefile +1 -0
@@ -30,6 +30,7 @@ obj-$(CONFIG_SH4_PCI) += pci_sh4.o obj-$(CONFIG_SH7751_PCI) +=pci_sh7751.o obj-$(CONFIG_SH7780_PCI) +=pci_sh7780.o obj-$(CONFIG_PCI_TEGRA) += pci_tegra.o +obj-$(CONFIG_PCI_AARDVARK) += pci-aardvark.o obj-$(CONFIG_PCIE_DW_MVEBU) += pcie_dw_mvebu.o obj-$(CONFIG_PCIE_LAYERSCAPE) += pcie_layerscape.o obj-$(CONFIG_PCIE_LAYERSCAPE) += pcie_layerscape_fixup.o
drivers/pci/pci-aardvark.c new file +690 -0
690 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 3/5 arm64: a37xx: defconfigs: enable aardvark pcie driver
In reply to make at marvell.comFrom: Wilson Ding <[email protected]>
--- configs/mvebu_db-88f3720_defconfig | 3 +++ configs/mvebu_espressobin-88f3720_defconfig | 3 +++ 2 files changed, 6 insertions(+)
configs/mvebu_db-88f3720_defconfig +3 -0
@@ -44,6 +44,9 @@ CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y CONFIG_PHY_GIGE=y +CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_PCI_AARDVARK=y CONFIG_MVEBU_COMPHY_SUPPORT=y CONFIG_PINCTRL=y CONFIG_PINCTRL_ARMADA_37XX=y
configs/mvebu_espressobin-88f3720_defconfig +3 -0
@@ -44,6 +44,9 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_WINBOND=y CONFIG_PHYLIB=y CONFIG_PHY_GIGE=y +CONFIG_PCI=y +CONFIG_DM_PCI=y +CONFIG_PCI_AARDVARK=y CONFIG_MVEBU_COMPHY_SUPPORT=y CONFIG_PINCTRL=y CONFIG_PINCTRL_ARMADA_37XX=y
Signature · 1 line
1.9.1
PATCH 4/5 arm64: a37xx: dts: enable pcie port
In reply to make at marvell.comFrom: Wilson Ding <[email protected]>
This patch enabled PCIe port on both devel-board
and espressobin board.
--- arch/arm/dts/armada-3720-db.dts | 8 ++++++++ arch/arm/dts/armada-3720-espressobin.dts | 7 +++++++ arch/arm/dts/armada-37xx.dtsi | 16 ++++++++++++++++ 3 files changed, 31 insertions(+)
arch/arm/dts/armada-3720-db.dts +8 -0
@@ -154,3 +154,11 @@ &usb3 { status = "okay"; }; + +/* CON17 */ +&pcie0 { + pinctrl-names = "default"; + pinctrl-0 = <&pcie_pins>; + reset-gpio = <&gpiosb 3 GPIO_ACTIVE_HIGH>; + status = "okay"; +};
arch/arm/dts/armada-3720-espressobin.dts +7 -0
@@ -141,3 +141,10 @@ &usb3 { status = "okay"; }; + +&pcie0 { + pinctrl-names = "default"; + pinctrl-0 = <&pcie_pins>; + reset-gpio = <&gpiosb 3 GPIO_ACTIVE_HIGH>; + status = "okay"; +};
arch/arm/dts/armada-37xx.dtsi +16 -0
@@ -294,5 +294,21 @@ max-lanes = <2>; }; }; + + pcie0: pcie at d0070000 { + compatible = "marvell,armada-37xx-pcie"; + reg = <0 0xd0070000 0 0x20000>; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; + num-lanes = <1>; + status = "disabled"; + + bus-range = <0 0xff>; + ranges = <0x82000000 0 0xe8000000 + 0 0xe8000000 0 0x1000000 /* Port 0 MEM */ + 0x81000000 0 0xe9000000 + 0 0xe9000000 0 0x10000>; /* Port 0 IO*/ + }; }; };
Signature · 1 line
1.9.1
PATCH 5/5 arm64: a37xx: defconfigs: enable PCI_CMD and E1000 driver
In reply to make at marvell.comFrom: Ken Ma <[email protected]>
--- configs/mvebu_db-88f3720_defconfig | 2 ++ configs/mvebu_espressobin-88f3720_defconfig | 2 ++ 2 files changed, 4 insertions(+)
configs/mvebu_db-88f3720_defconfig +2 -0
@@ -17,6 +17,7 @@ CONFIG_BOARD_EARLY_INIT_F=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_PCI=y CONFIG_CMD_SF=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y
@@ -44,6 +45,7 @@ CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_PHYLIB=y CONFIG_PHY_GIGE=y +CONFIG_E1000=y CONFIG_PCI=y CONFIG_DM_PCI=y CONFIG_PCI_AARDVARK=y
configs/mvebu_espressobin-88f3720_defconfig +2 -0
@@ -17,6 +17,7 @@ CONFIG_BOARD_EARLY_INIT_F=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_PCI=y CONFIG_CMD_SF=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y
@@ -44,6 +45,7 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_WINBOND=y CONFIG_PHYLIB=y CONFIG_PHY_GIGE=y +CONFIG_E1000=y CONFIG_PCI=y CONFIG_DM_PCI=y CONFIG_PCI_AARDVARK=y
Signature · 1 line
1.9.1