i.MX7 PCIe related device tree changes
v2 cover i.MX7 PCIe related device tree changes
Shawn, everyone:
This is second version of the series that includes changes made to device-tree in order to support PCIe on i.MX7 platform.
Changes since [v1]:
- All 'anatop-enable-bit' patches are squashed into one
- Added patch to enable GPCv2 driver on i.MX7
- Dropped accidentally introduced unsupported DT properties
- A number of node renaming for readability/clarity purpose
[v1] http://lkml.kernel.org/r/20170413133242.5068-1-andrew.smirnov at gmail.com
Andrey Smirnov (7):
ARM: dts: i.MX: Reintroduce 'anatop-enable-bit' where appropriate
ARM: imx: Select GPCv2 for i.MX7
ARM: dts: imx7s: Add node for GPC
ARM: dts: imx7s: Mark 'gpr' compatible with i.MX6 variant
ARM: dts: imx7d-sdb: Add GPIO expander node
ARM: dts: imx7d: Add node for PCIe controller
ARM: dts: imx7d-sdb: Enable PCIe peripheral
arch/arm/boot/dts/imx6qdl.dtsi | 3 +++ arch/arm/boot/dts/imx6sl.dtsi | 3 +++ arch/arm/boot/dts/imx6sx.dtsi | 3 +++ arch/arm/boot/dts/imx6ul.dtsi | 1 + arch/arm/boot/dts/imx7d-sdb.dts | 35 +++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx7d.dtsi | 37 +++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx7s.dtsi | 30 ++++++++++++++++++++++++++++-- arch/arm/mach-imx/Kconfig | 1 + 8 files changed, 111 insertions(+), 2 deletions(-)
Signature · 1 line
2.9.3
PATCH v2 1/7 ARM: dts: i.MX: Reintroduce 'anatop-enable-bit' where appropriate
Now that support for 'anatop-enable-bit' has been added to ANADIG driver, reintroduce 'anatop-enable-bit' for all applicable LDOs.
--- arch/arm/boot/dts/imx6qdl.dtsi | 3 +++ arch/arm/boot/dts/imx6sl.dtsi | 3 +++ arch/arm/boot/dts/imx6sx.dtsi | 3 +++ arch/arm/boot/dts/imx6ul.dtsi | 1 + arch/arm/boot/dts/imx7s.dtsi | 1 + 5 files changed, 11 insertions(+)
arch/arm/boot/dts/imx6qdl.dtsi +3 -0
@@ -643,6 +643,7 @@ anatop-min-bit-val = <4>; anatop-min-voltage = <800000>; anatop-max-voltage = <1375000>; + anatop-enable-bit = <0>; }; regulator-3p0 {
@@ -657,6 +658,7 @@ anatop-min-bit-val = <0>; anatop-min-voltage = <2625000>; anatop-max-voltage = <3400000>; + anatop-enable-bit = <0>; }; regulator-2p5 {
@@ -671,6 +673,7 @@ anatop-min-bit-val = <0>; anatop-min-voltage = <2100000>; anatop-max-voltage = <2875000>; + anatop-enable-bit = <0>; }; reg_arm: regulator-vddcore {
arch/arm/boot/dts/imx6sl.dtsi +3 -0
@@ -530,6 +530,7 @@ anatop-min-bit-val = <4>; anatop-min-voltage = <800000>; anatop-max-voltage = <1375000>; + anatop-enable-bit = <0>; }; regulator-3p0 {
@@ -544,6 +545,7 @@ anatop-min-bit-val = <0>; anatop-min-voltage = <2625000>; anatop-max-voltage = <3400000>; + anatop-enable-bit = <0>; }; regulator-2p5 {
@@ -558,6 +560,7 @@ anatop-min-bit-val = <0>; anatop-min-voltage = <2100000>; anatop-max-voltage = <2850000>; + anatop-enable-bit = <0>; }; reg_arm: regulator-vddcore {
arch/arm/boot/dts/imx6sx.dtsi +3 -0
@@ -586,6 +586,7 @@ anatop-min-bit-val = <4>; anatop-min-voltage = <800000>; anatop-max-voltage = <1375000>; + anatop-enable-bit = <0>; }; regulator-3p0 {
@@ -600,6 +601,7 @@ anatop-min-bit-val = <0>; anatop-min-voltage = <2625000>; anatop-max-voltage = <3400000>; + anatop-enable-bit = <0>; }; regulator-2p5 {
@@ -614,6 +616,7 @@ anatop-min-bit-val = <0>; anatop-min-voltage = <2100000>; anatop-max-voltage = <2875000>; + anatop-enable-bit = <0>; }; reg_arm: regulator-vddcore {
arch/arm/boot/dts/imx6ul.dtsi +1 -0
@@ -542,6 +542,7 @@ anatop-min-bit-val = <0>; anatop-min-voltage = <2625000>; anatop-max-voltage = <3400000>; + anatop-enable-bit = <0>; }; reg_arm: regulator-vddcore {
arch/arm/boot/dts/imx7s.dtsi +1 -0
@@ -517,6 +517,7 @@ anatop-min-bit-val = <8>; anatop-min-voltage = <800000>; anatop-max-voltage = <1200000>; + anatop-enable-bit = <0>; }; };
Signature · 1 line
2.9.3
Re: [PATCH v2 1/7] ARM: dts: i.MX: Reintroduce 'anatop-enable-bit' where appropriate
Quoted 15 lines · Andrey Smirnov
Now that support for 'anatop-enable-bit' has been added to ANADIG driver, reintroduce 'anatop-enable-bit' for all applicable LDOs.
Cc yurovsky at gmail.comCc Dong Aisheng <[email protected]>Cc Shawn Guo <[email protected]>Cc Sascha Hauer <[email protected]>Cc Fabio Estevam <[email protected]>Cc Rob Herring <[email protected]>Cc Mark Rutland <[email protected]>Cc Russell King <[email protected]>Cc devicetree at vger.kernel.orgCc linux-kernel at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgSigned-off-by Andrey Smirnov <[email protected]>
Please use 'imx' instead of 'i.MX' in subject prefix to make it more consistent with other patches in the series.
Shawn
PATCH v2 2/7 ARM: imx: Select GPCv2 for i.MX7
In reply to Andrey SmirnovGPCv2 IP block is a part of i.MX7 SoC. Select it to make corresponding driver availible to support DT changes following this patch.
--- arch/arm/mach-imx/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-imx/Kconfig +1 -0
@@ -532,6 +532,7 @@ config SOC_IMX7D bool "i.MX7 Dual support" select PINCTRL_IMX7D select ARM_GIC + select IMX_GPCV2 select HAVE_ARM_ARCH_TIMER select HAVE_IMX_ANATOP select HAVE_IMX_MMDC
Signature · 1 line
2.9.3
Re: [PATCH v2 2/7] ARM: imx: Select GPCv2 for i.MX7
Quoted 24 lines · Andrey Smirnov
GPCv2 IP block is a part of i.MX7 SoC. Select it to make corresponding driver availible to support DT changes following this patch.
Cc yurovsky at gmail.comCc Dong Aisheng <[email protected]>Cc Shawn Guo <[email protected]>Cc Sascha Hauer <[email protected]>Cc Fabio Estevam <[email protected]>Cc Rob Herring <[email protected]>Cc Mark Rutland <[email protected]>Cc Russell King <[email protected]>Cc devicetree at vger.kernel.orgCc linux-kernel at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgSigned-off-by Andrey Smirnov <[email protected]>--- arch/arm/mach-imx/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/arm/mach-imx/Kconfig +0
-0
arch/arm/mach-imx/Kconfig config SOC_IMX7D · line 535
Quoted 4 lines
arch/arm/mach-imx/Kconfig +1
-0@@ -532,6 +532,7 @@ config SOC_IMX7D bool "i.MX7 Dual support" select PINCTRL_IMX7D select ARM_GIC + select IMX_GPCV2
Yes, PINCTRL_IMX7D is already out of order, but still please keep new added one sorted in alphabetic order.
Shawn
Quoted 6 lines
arch/arm/mach-imx/Kconfig +0
-0select HAVE_ARM_ARCH_TIMER select HAVE_IMX_ANATOP select HAVE_IMX_MMDCSignature · 1 line
2.9.3
PATCH v2 3/7 ARM: dts: imx7s: Add node for GPC
In reply to Andrey SmirnovAdd node for GPC and specify as a parent interrupt controller for SoC bus.
--- arch/arm/boot/dts/imx7s.dtsi | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx7s.dtsi +25 -1
@@ -42,6 +42,7 @@ */ #include <dt-bindings/clock/imx7d-clock.h> +#include <dt-bindings/power/imx7-power.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/input/input.h> #include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -119,7 +120,7 @@ #address-cells = <1>; #size-cells = <1>; compatible = "simple-bus"; - interrupt-parent = <&intc>; + interrupt-parent = <&gpc>; ranges; funnel at 30041000 {
@@ -301,6 +302,7 @@ interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; #interrupt-cells = <3>; interrupt-controller; + interrupt-parent = <&intc>; reg = <0x31001000 0x1000>, <0x31002000 0x2000>, <0x31004000 0x2000>,
@@ -309,6 +311,7 @@ timer { compatible = "arm,armv7-timer"; + interrupt-parent = <&intc>; interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
@@ -565,6 +568,27 @@ interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>; #reset-cells = <1>; }; + + gpc: gpc at 303a0000 { + compatible = "fsl,imx7d-gpc"; + reg = <0x303a0000 0x10000>; + interrupt-controller; + interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>; + #interrupt-cells = <3>; + interrupt-parent = <&intc>; + #power-domain-cells = <1>; + + pgc { + #address-cells = <1>; + #size-cells = <0>; + + pgc_pcie_phy: pgc-power-domain at IMX7_POWER_DOMAIN_PCIE_PHY { + #power-domain-cells = <0>; + reg = <IMX7_POWER_DOMAIN_PCIE_PHY>; + power-supply = <®_1p0d>; + }; + }; + }; }; aips2: aips-bus at 30400000 {
Signature · 1 line
2.9.3
Re: [PATCH v2 3/7] ARM: dts: imx7s: Add node for GPC
Quoted 23 lines · Andrey Smirnov
Add node for GPC and specify as a parent interrupt controller for SoC bus.
Cc yurovsky at gmail.comCc Dong Aisheng <[email protected]>Cc Shawn Guo <[email protected]>Cc Sascha Hauer <[email protected]>Cc Fabio Estevam <[email protected]>Cc Rob Herring <[email protected]>Cc Mark Rutland <[email protected]>Cc Russell King <[email protected]>Cc devicetree at vger.kernel.orgCc linux-kernel at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgSigned-off-by Andrey Smirnov <[email protected]>--- arch/arm/boot/dts/imx7s.dtsi | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-)arch/arm/boot/dts/imx7s.dtsi +0
-0
arch/arm/boot/dts/imx7s.dtsi line 45
Quoted 4 lines
arch/arm/boot/dts/imx7s.dtsi +1
-0@@ -42,6 +42,7 @@ */ #include <dt-bindings/clock/imx7d-clock.h> +#include <dt-bindings/power/imx7-power.h>
It has dependency on imx7 power domain driver, and I need to wait for v4.12-rc1 to apply the patch.
Shawn
Quoted 3 lines
arch/arm/boot/dts/imx7s.dtsi +0
-0#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/input/input.h> #include <dt-bindings/interrupt-controller/arm-gic.h>
PATCH v2 4/7 ARM: dts: imx7s: Mark 'gpr' compatible with i.MX6 variant
In reply to Andrey SmirnovList GPR block as compatible "fsl,imx6q-iomuxc-gpr" to support drivers requesting it that way (PCIe driver is one example).
--- arch/arm/boot/dts/imx7s.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx7s.dtsi +2 -1
@@ -491,7 +491,8 @@ }; gpr: iomuxc-gpr at 30340000 { - compatible = "fsl,imx7d-iomuxc-gpr", "syscon"; + compatible = "fsl,imx7d-iomuxc-gpr", + "fsl,imx6q-iomuxc-gpr", "syscon"; reg = <0x30340000 0x10000>; };
Signature · 1 line
2.9.3
PATCH v2 5/7 ARM: dts: imx7d-sdb: Add GPIO expander node
In reply to Andrey SmirnovAdd node for U38, a 74LV595PW serial-in shift register that acts as a GPIO expander on the board.
--- arch/arm/boot/dts/imx7d-sdb.dts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
arch/arm/boot/dts/imx7d-sdb.dts +29 -0
@@ -52,6 +52,27 @@ reg = <0x80000000 0x80000000>; }; + spi4 { + compatible = "spi-gpio"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spi4>; + gpio-sck = <&gpio1 13 GPIO_ACTIVE_HIGH>; + gpio-mosi = <&gpio1 9 GPIO_ACTIVE_HIGH>; + cs-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; + num-chipselects = <1>; + #address-cells = <1>; + #size-cells = <0>; + + extended_io: gpio-expander at 0 { + compatible = "fairchild,74hc595"; + gpio-controller; + #gpio-cells = <2>; + reg = <0>; + registers-number = <1>; + spi-max-frequency = <100000>; + }; + }; + regulators { compatible = "simple-bus"; #address-cells = <1>;
@@ -642,5 +663,13 @@ fsl,pins = < MX7D_PAD_LPSR_GPIO1_IO01__PWM1_OUT 0x110b0 >; + + pinctrl_spi4: spi4grp { + fsl,pins = < + MX7D_PAD_GPIO1_IO09__GPIO1_IO9 0x59 + MX7D_PAD_GPIO1_IO12__GPIO1_IO12 0x59 + MX7D_PAD_GPIO1_IO13__GPIO1_IO13 0x59 + >; + }; }; };
Signature · 1 line
2.9.3
PATCH v2 6/7 ARM: dts: imx7d: Add node for PCIe controller
In reply to Andrey Smirnov--- arch/arm/boot/dts/imx7d.dtsi | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+)
arch/arm/boot/dts/imx7d.dtsi +37 -0
@@ -42,6 +42,7 @@ */ #include "imx7s.dtsi" +#include <dt-bindings/reset/imx7-reset.h> / { cpus {
@@ -127,6 +128,42 @@ fsl,num-rx-queues=<3>; status = "disabled"; }; + + pcie: pcie at 0x33800000 { + compatible = "fsl,imx7d-pcie", "snps,dw-pcie"; + reg = <0x33800000 0x4000>, + <0x4ff00000 0x80000>; + reg-names = "dbi", "config"; + #address-cells = <3>; + #size-cells = <2>; + device_type = "pci"; + ranges = <0x81000000 0 0 0x4ff80000 0 0x00010000 /* downstream I/O */ + 0x82000000 0 0x40000000 0x40000000 0 0x0ff00000>; /* non-prefetchable memory */ + num-lanes = <1>; + interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "msi"; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 0x7>; + interrupt-map = <0 0 0 1 &intc GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 2 &intc GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 3 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 4 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clks IMX7D_PCIE_CTRL_ROOT_CLK>, + <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>, + <&clks IMX7D_PCIE_PHY_ROOT_CLK>; + clock-names = "pcie", "pcie_bus", "pcie_phy"; + assigned-clocks = <&clks IMX7D_PCIE_CTRL_ROOT_SRC>, + <&clks IMX7D_PCIE_PHY_ROOT_SRC>; + assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_250M_CLK>, + <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>; + + fsl,max-link-speed = <2>; + power-domains = <&pgc_pcie_phy>; + resets = <&src IMX7_RESET_PCIEPHY>, + <&src IMX7_RESET_PCIE_CTRL_APPS_EN>; + reset-names = "pciephy", "apps"; + status = "disabled"; + }; }; &ca_funnel_ports {
Signature · 1 line
2.9.3
Re: [PATCH v2 6/7] ARM: dts: imx7d: Add node for PCIe controller
Quoted 21 lines · Andrey Smirnov
Cc yurovsky at gmail.comCc Dong Aisheng <[email protected]>Cc Shawn Guo <[email protected]>Cc Sascha Hauer <[email protected]>Cc Fabio Estevam <[email protected]>Cc Rob Herring <[email protected]>Cc Mark Rutland <[email protected]>Cc Russell King <[email protected]>Cc devicetree at vger.kernel.orgCc linux-kernel at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgSigned-off-by Andrey Smirnov <[email protected]>--- arch/arm/boot/dts/imx7d.dtsi | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+)arch/arm/boot/dts/imx7d.dtsi +0
-0
arch/arm/boot/dts/imx7d.dtsi line 45
Quoted 4 lines
arch/arm/boot/dts/imx7d.dtsi +1
-0@@ -42,6 +42,7 @@ */ #include "imx7s.dtsi" +#include <dt-bindings/reset/imx7-reset.h>
It has dependency on imx7 reset driver, and I need to wait for v4.12-rc1 to apply the patch.
Shawn
PATCH v2 7/7 ARM: dts: imx7d-sdb: Enable PCIe peripheral
In reply to Andrey SmirnovEnable PCIe peripheral on this board.
--- arch/arm/boot/dts/imx7d-sdb.dts | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/imx7d-sdb.dts +6 -0
@@ -349,6 +349,12 @@ }; }; +&pcie { + pinctrl-names = "default"; + reset-gpio = <&extended_io 1 GPIO_ACTIVE_LOW>; + status = "okay"; +}; + &pwm1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm1>;
Signature · 1 line
2.9.3
Re: [PATCH v2 7/7] ARM: dts: imx7d-sdb: Enable PCIe peripheral
Quoted 23 lines · Andrey Smirnov
Enable PCIe peripheral on this board.
Cc yurovsky at gmail.comCc Dong Aisheng <[email protected]>Cc Shawn Guo <[email protected]>Cc Sascha Hauer <[email protected]>Cc Fabio Estevam <[email protected]>Cc Rob Herring <[email protected]>Cc Mark Rutland <[email protected]>Cc Russell King <[email protected]>Cc devicetree at vger.kernel.orgCc linux-kernel at vger.kernel.orgCc linux-arm-kernel at lists.infradead.orgSigned-off-by Andrey Smirnov <[email protected]>--- arch/arm/boot/dts/imx7d-sdb.dts | 6 ++++++ 1 file changed, 6 insertions(+)arch/arm/boot/dts/imx7d-sdb.dts +0
-0
arch/arm/boot/dts/imx7d-sdb.dts line 353
Quoted 5 lines
arch/arm/boot/dts/imx7d-sdb.dts +2
-0@@ -349,6 +349,12 @@ }; }; +&pcie { + pinctrl-names = "default";
No corresponding pinctrl-0 entry? In that case, there is no point to have pinctrl-names.
Shawn
Quoted 10 lines
arch/arm/boot/dts/imx7d-sdb.dts +4
-0+ reset-gpio = <&extended_io 1 GPIO_ACTIVE_LOW>; + status = "okay"; +}; + &pwm1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pwm1>;Signature · 1 line
2.9.3