* [PATCH v4 00/12] Add support for Airoha EN7523 SoC
@ 2021-11-25 11:07 Felix Fietkau
2021-11-25 11:07 ` [PATCH v4 08/12] dt-bindings: PCI: Add support for Airoha EN7532 Felix Fietkau
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Felix Fietkau @ 2021-11-25 11:07 UTC (permalink / raw)
To: linux-arm-kernel, Matthias Brugger; +Cc: john, linux-mediatek
This patchset adds support for the Airoha EN7523 SoC, intended primarily
for xPON/xDSL routers.
Felix Fietkau (3):
clk: en7523: Add clock driver for Airoha EN7523 SoC
PCI: mediatek: allow selecting controller driver for airoha arch
ARM: dts: Add PCIe support for Airoha EN7523
John Crispin (9):
dt-bindings: Add vendor prefix for Airoha
dt-bindings: arm: airoha: Add binding for EN7523 SoC and EVB
ARM: dts: Add basic support for Airoha EN7523
ARM: Add basic support for Airoha EN7523 SoC
ARM: multi_v7_defconfig: Add support for Airoha EN7523 SoC
dt-bindings: Add en7523-scu device tree binding documentation
dt-bindings: PCI: Add support for Airoha EN7532
dt-bindings: arm: airoha: Add binding for Airoha GPIO controller
gpio: Add support for Airoha EN7523 GPIO controller
.../devicetree/bindings/arm/airoha.yaml | 27 ++
.../bindings/clock/airoha,en7523-scu.yaml | 58 +++
.../bindings/gpio/airoha,en7523-gpio.yaml | 63 ++++
.../devicetree/bindings/pci/mediatek-pcie.txt | 1 +
.../devicetree/bindings/vendor-prefixes.yaml | 2 +
arch/arm/Kconfig | 14 +
arch/arm/boot/dts/Makefile | 2 +
arch/arm/boot/dts/en7523-evb.dts | 47 +++
arch/arm/boot/dts/en7523.dtsi | 203 ++++++++++
arch/arm/configs/multi_v7_defconfig | 1 +
drivers/clk/Kconfig | 9 +
drivers/clk/Makefile | 1 +
drivers/clk/clk-en7523.c | 356 ++++++++++++++++++
drivers/gpio/Kconfig | 9 +
drivers/gpio/Makefile | 1 +
drivers/gpio/gpio-en7523.c | 136 +++++++
drivers/pci/controller/Kconfig | 2 +-
include/dt-bindings/clock/en7523-clk.h | 17 +
18 files changed, 948 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/arm/airoha.yaml
create mode 100644 Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
create mode 100644 Documentation/devicetree/bindings/gpio/airoha,en7523-gpio.yaml
create mode 100644 arch/arm/boot/dts/en7523-evb.dts
create mode 100644 arch/arm/boot/dts/en7523.dtsi
create mode 100644 drivers/clk/clk-en7523.c
create mode 100644 drivers/gpio/gpio-en7523.c
create mode 100644 include/dt-bindings/clock/en7523-clk.h
--
2.30.1
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH v4 08/12] dt-bindings: PCI: Add support for Airoha EN7532 2021-11-25 11:07 [PATCH v4 00/12] Add support for Airoha EN7523 SoC Felix Fietkau @ 2021-11-25 11:07 ` Felix Fietkau 2021-11-28 23:32 ` Rob Herring 2021-11-25 11:07 ` [PATCH v4 09/12] PCI: mediatek: allow selecting controller driver for airoha arch Felix Fietkau 2021-11-25 11:07 ` [PATCH v4 10/12] ARM: dts: Add PCIe support for Airoha EN7523 Felix Fietkau 2 siblings, 1 reply; 6+ messages in thread From: Felix Fietkau @ 2021-11-25 11:07 UTC (permalink / raw) To: linux-arm-kernel, Ryder Lee, Jianjun Wang, Bjorn Helgaas, Rob Herring, Matthias Brugger Cc: john, linux-pci, linux-mediatek, devicetree, linux-kernel From: John Crispin <john@phrozen.org> EN7532 is an ARM based platform SoC integrating the same PCIe IP as MT7622, add a binding for it. Signed-off-by: John Crispin <john@phrozen.org> --- Documentation/devicetree/bindings/pci/mediatek-pcie.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie.txt b/Documentation/devicetree/bindings/pci/mediatek-pcie.txt index 57ae73462272..684227522267 100644 --- a/Documentation/devicetree/bindings/pci/mediatek-pcie.txt +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie.txt @@ -7,6 +7,7 @@ Required properties: "mediatek,mt7622-pcie" "mediatek,mt7623-pcie" "mediatek,mt7629-pcie" + "airoha,en7523-pcie" - device_type: Must be "pci" - reg: Base addresses and lengths of the root ports. - reg-names: Names of the above areas to use during resource lookup. -- 2.30.1 _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v4 08/12] dt-bindings: PCI: Add support for Airoha EN7532 2021-11-25 11:07 ` [PATCH v4 08/12] dt-bindings: PCI: Add support for Airoha EN7532 Felix Fietkau @ 2021-11-28 23:32 ` Rob Herring 0 siblings, 0 replies; 6+ messages in thread From: Rob Herring @ 2021-11-28 23:32 UTC (permalink / raw) To: Felix Fietkau Cc: linux-mediatek, linux-pci, Matthias Brugger, devicetree, Bjorn Helgaas, linux-kernel, Jianjun Wang, john, Ryder Lee, linux-arm-kernel, Rob Herring On Thu, 25 Nov 2021 12:07:34 +0100, Felix Fietkau wrote: > From: John Crispin <john@phrozen.org> > > EN7532 is an ARM based platform SoC integrating the same PCIe IP as > MT7622, add a binding for it. > > Signed-off-by: John Crispin <john@phrozen.org> > --- > Documentation/devicetree/bindings/pci/mediatek-pcie.txt | 1 + > 1 file changed, 1 insertion(+) > Acked-by: Rob Herring <robh@kernel.org> _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v4 09/12] PCI: mediatek: allow selecting controller driver for airoha arch 2021-11-25 11:07 [PATCH v4 00/12] Add support for Airoha EN7523 SoC Felix Fietkau 2021-11-25 11:07 ` [PATCH v4 08/12] dt-bindings: PCI: Add support for Airoha EN7532 Felix Fietkau @ 2021-11-25 11:07 ` Felix Fietkau 2021-11-25 11:07 ` [PATCH v4 10/12] ARM: dts: Add PCIe support for Airoha EN7523 Felix Fietkau 2 siblings, 0 replies; 6+ messages in thread From: Felix Fietkau @ 2021-11-25 11:07 UTC (permalink / raw) To: linux-arm-kernel, Lorenzo Pieralisi, Rob Herring, Krzysztof Wilczyński, Bjorn Helgaas, Matthias Brugger Cc: john, linux-pci, linux-kernel, linux-mediatek The EN7523 SoC uses the same controller as MT7622 Signed-off-by: Felix Fietkau <nbd@nbd.name> --- drivers/pci/controller/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig index 93b141110537..f1342059c2a3 100644 --- a/drivers/pci/controller/Kconfig +++ b/drivers/pci/controller/Kconfig @@ -233,7 +233,7 @@ config PCIE_ROCKCHIP_EP config PCIE_MEDIATEK tristate "MediaTek PCIe controller" - depends on ARCH_MEDIATEK || COMPILE_TEST + depends on ARCH_AIROHA || ARCH_MEDIATEK || COMPILE_TEST depends on OF depends on PCI_MSI_IRQ_DOMAIN help -- 2.30.1 _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v4 10/12] ARM: dts: Add PCIe support for Airoha EN7523 2021-11-25 11:07 [PATCH v4 00/12] Add support for Airoha EN7523 SoC Felix Fietkau 2021-11-25 11:07 ` [PATCH v4 08/12] dt-bindings: PCI: Add support for Airoha EN7532 Felix Fietkau 2021-11-25 11:07 ` [PATCH v4 09/12] PCI: mediatek: allow selecting controller driver for airoha arch Felix Fietkau @ 2021-11-25 11:07 ` Felix Fietkau 2021-11-25 12:15 ` Jianjun Wang 2 siblings, 1 reply; 6+ messages in thread From: Felix Fietkau @ 2021-11-25 11:07 UTC (permalink / raw) To: linux-arm-kernel, Rob Herring, Matthias Brugger Cc: john, devicetree, linux-kernel, linux-mediatek This uses the MediaTek MT7622 PCIe driver, since the PCIe IP block is nearly identical to the one in MT7622 Signed-off-by: Felix Fietkau <nbd@nbd.name> --- arch/arm/boot/dts/en7523-evb.dts | 12 +++++++ arch/arm/boot/dts/en7523.dtsi | 60 ++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/arch/arm/boot/dts/en7523-evb.dts b/arch/arm/boot/dts/en7523-evb.dts index e8e5c034cee7..af1a8dd40a41 100644 --- a/arch/arm/boot/dts/en7523-evb.dts +++ b/arch/arm/boot/dts/en7523-evb.dts @@ -25,3 +25,15 @@ memory@80000000 { reg = <0x80000000 0x20000000>; }; }; + +&pcie { + status = "okay"; +}; + +&pcie0 { + status = "okay"; +}; + +&pcie1 { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/en7523.dtsi b/arch/arm/boot/dts/en7523.dtsi index eabf3fdb3d52..d9bdb51614b5 100644 --- a/arch/arm/boot/dts/en7523.dtsi +++ b/arch/arm/boot/dts/en7523.dtsi @@ -119,4 +119,64 @@ uart1: serial@1fbf0000 { clock-frequency = <1843200>; status = "okay"; }; + + pcie: pcie@1a140000 { + compatible = "airoha,en7523-pcie", "mediatek,mt7622-pcie"; + device_type = "pci"; + reg = <0x1fa91000 0x1000>, + <0x1fa92000 0x1000>; + reg-names = "port0", "port1"; + #address-cells = <3>; + #size-cells = <2>; + interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&scu EN7523_CLK_PCIE>, + <&scu EN7523_CLK_PCIE>; + clock-names = "sys_ck0", "sys_ck1"; + bus-range = <0x00 0xff>; + ranges = <0x82000000 0 0x20000000 0x20000000 0 0x10000000>; + status = "disabled"; + + pcie0: pcie@0,0 { + device_type = "pci"; + reg = <0x0000 0 0 0 0>; + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <1>; + ranges; + status = "disabled"; + + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &pcie_intc0 0>, + <0 0 0 2 &pcie_intc0 1>, + <0 0 0 3 &pcie_intc0 2>, + <0 0 0 4 &pcie_intc0 3>; + pcie_intc0: interrupt-controller { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + }; + }; + + pcie1: pcie@1,0 { + device_type = "pci"; + reg = <0x0800 0 0 0 0>; + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <1>; + ranges; + status = "disabled"; + + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &pcie_intc1 0>, + <0 0 0 2 &pcie_intc1 1>, + <0 0 0 3 &pcie_intc1 2>, + <0 0 0 4 &pcie_intc1 3>; + pcie_intc1: interrupt-controller { + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + }; + }; + }; }; -- 2.30.1 _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v4 10/12] ARM: dts: Add PCIe support for Airoha EN7523 2021-11-25 11:07 ` [PATCH v4 10/12] ARM: dts: Add PCIe support for Airoha EN7523 Felix Fietkau @ 2021-11-25 12:15 ` Jianjun Wang 0 siblings, 0 replies; 6+ messages in thread From: Jianjun Wang @ 2021-11-25 12:15 UTC (permalink / raw) To: Felix Fietkau, linux-arm-kernel, Rob Herring, Matthias Brugger Cc: john, devicetree, linux-kernel, linux-mediatek Hi Felix, On Thu, 2021-11-25 at 12:07 +0100, Felix Fietkau wrote: > This uses the MediaTek MT7622 PCIe driver, since the PCIe IP block is > nearly > identical to the one in MT7622 > > Signed-off-by: Felix Fietkau <nbd@nbd.name> > --- > arch/arm/boot/dts/en7523-evb.dts | 12 +++++++ > arch/arm/boot/dts/en7523.dtsi | 60 > ++++++++++++++++++++++++++++++++ > 2 files changed, 72 insertions(+) > > diff --git a/arch/arm/boot/dts/en7523-evb.dts > b/arch/arm/boot/dts/en7523-evb.dts > index e8e5c034cee7..af1a8dd40a41 100644 > --- a/arch/arm/boot/dts/en7523-evb.dts > +++ b/arch/arm/boot/dts/en7523-evb.dts > @@ -25,3 +25,15 @@ memory@80000000 { > reg = <0x80000000 0x20000000>; > }; > }; > + > +&pcie { > + status = "okay"; > +}; > + > +&pcie0 { > + status = "okay"; > +}; > + > +&pcie1 { > + status = "okay"; > +}; > diff --git a/arch/arm/boot/dts/en7523.dtsi > b/arch/arm/boot/dts/en7523.dtsi > index eabf3fdb3d52..d9bdb51614b5 100644 > --- a/arch/arm/boot/dts/en7523.dtsi > +++ b/arch/arm/boot/dts/en7523.dtsi > @@ -119,4 +119,64 @@ uart1: serial@1fbf0000 { > clock-frequency = <1843200>; > status = "okay"; > }; > + > + pcie: pcie@1a140000 { > + compatible = "airoha,en7523-pcie", "mediatek,mt7622- > pcie"; > + device_type = "pci"; > + reg = <0x1fa91000 0x1000>, > + <0x1fa92000 0x1000>; > + reg-names = "port0", "port1"; > + #address-cells = <3>; > + #size-cells = <2>; > + interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&scu EN7523_CLK_PCIE>, > + <&scu EN7523_CLK_PCIE>; > + clock-names = "sys_ck0", "sys_ck1"; > + bus-range = <0x00 0xff>; > + ranges = <0x82000000 0 0x20000000 0x20000000 0 > 0x10000000>; > + status = "disabled"; > + > + pcie0: pcie@0,0 { > + device_type = "pci"; > + reg = <0x0000 0 0 0 0>; > + #address-cells = <3>; > + #size-cells = <2>; > + #interrupt-cells = <1>; > + ranges; > + status = "disabled"; > + > + interrupt-map-mask = <0 0 0 7>; > + interrupt-map = <0 0 0 1 &pcie_intc0 0>, > + <0 0 0 2 &pcie_intc0 1>, > + <0 0 0 3 &pcie_intc0 2>, > + <0 0 0 4 &pcie_intc0 3>; > + pcie_intc0: interrupt-controller { > + interrupt-controller; > + #address-cells = <0>; > + #interrupt-cells = <1>; > + }; > + }; > + > + pcie1: pcie@1,0 { > + device_type = "pci"; > + reg = <0x0800 0 0 0 0>; > + #address-cells = <3>; > + #size-cells = <2>; > + #interrupt-cells = <1>; > + ranges; > + status = "disabled"; > + > + interrupt-map-mask = <0 0 0 7>; > + interrupt-map = <0 0 0 1 &pcie_intc1 0>, > + <0 0 0 2 &pcie_intc1 1>, > + <0 0 0 3 &pcie_intc1 2>, > + <0 0 0 4 &pcie_intc1 3>; > + pcie_intc1: interrupt-controller { > + interrupt-controller; > + #address-cells = <0>; > + #interrupt-cells = <1>; > + }; > + }; > + }; There are some known issues with this device node style, please split the PCIe node into two independent nodes to comply with the hardware design. Here is the fix patch we sent before: https://lore.kernel.org/linux-pci/20210823032800.1660-6-chuanjia.liu@mediatek.com/ Thanks. > }; _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-11-28 23:33 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-11-25 11:07 [PATCH v4 00/12] Add support for Airoha EN7523 SoC Felix Fietkau 2021-11-25 11:07 ` [PATCH v4 08/12] dt-bindings: PCI: Add support for Airoha EN7532 Felix Fietkau 2021-11-28 23:32 ` Rob Herring 2021-11-25 11:07 ` [PATCH v4 09/12] PCI: mediatek: allow selecting controller driver for airoha arch Felix Fietkau 2021-11-25 11:07 ` [PATCH v4 10/12] ARM: dts: Add PCIe support for Airoha EN7523 Felix Fietkau 2021-11-25 12:15 ` Jianjun Wang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).