Skip to contentSkip to conversation

Macchiatobin updates

PATCH New Russell King - ARM Linux 3 participants 8 messages Jul 8, 2017 – Jul 12, 2017

Subsystems (3)
lore
Share & tools
lore

Russell King - ARM Linux

author maintainer
#0 lore raw

cover Macchiatobin updates

This series, based upon the 4.12-rc6 backports branch in the MISL tree:
- adds a maintainer entry for the Macchiatobin board.
- adds GPIO interrupt support to the CP110s
- adds the pinmux entries
- corrects the 5V regulator GPIO entry
- adds support for the I2C mux (used for the SFP slots)
- adds PCIe support

All entries include the appropriate pinmux and GPIO configuration.

PCIe support has not been tested locally as I have no PCIe cards to test with; this patch includes support for the PCIe reset GPIO signal. If others can test that patch and let me know whether it works, I would be most grateful.

 MAINTAINERS                                        |  6 ++
 arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts  | 89 +++++++++++++++++++++-
 .../boot/dts/marvell/armada-cp110-master.dtsi      | 11 ++-
 .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 11 ++-
 4 files changed, 112 insertions(+), 5 deletions(-)
Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
#1 lore raw

PATCH 1/6 MAINTAINERS: add Macchiatobin maintainers entry

Add a maintainers entry for the Macchiatobin board.

---
 MAINTAINERS | 6 ++++++
 1 file changed, 6 insertions(+)
MAINTAINERS +6 -0
index 91b149bc3206..0d236fe12597 100644
@@ -7976,6 +7976,12 @@ L:	libertas-dev at lists.infradead.org
 S:	Orphan
 F:	drivers/net/wireless/marvell/libertas/
 
+MARVELL MACCHIATOBIN SUPPORT
+M:	Russell King <[email protected]>
+L:	linux-arm-kernel at lists.infradead.org
+S:	Maintained
+F:	arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
+
 MARVELL MV643XX ETHERNET DRIVER
 M:	Sebastian Hesselbarth <[email protected]>
 L:	netdev at vger.kernel.org
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/6 arm64: dts: marvell: cp110: add GPIO interrupts

In reply to Russell King - ARM Linux

Add the GPIO interrupts for the CP110.

---
 arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 11 ++++++++++-
 arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi  | 11 ++++++++++-
 2 files changed, 20 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi +10 -1
index 68fb35f0386a..a2bfc3b0bef8 100644
@@ -131,8 +131,12 @@
 					gpio-controller;
 					#gpio-cells = <2>;
 					gpio-ranges = <&cpm_pinctrl 0 0 32>;
+					interrupt-controller;
+					interrupts = <ICU_GRP_NSR 86 IRQ_TYPE_LEVEL_HIGH>,
+						     <ICU_GRP_NSR 85 IRQ_TYPE_LEVEL_HIGH>,
+						     <ICU_GRP_NSR 84 IRQ_TYPE_LEVEL_HIGH>,
+						     <ICU_GRP_NSR 83 IRQ_TYPE_LEVEL_HIGH>;
 					status = "disabled";
-
 				};
 
 				cpm_gpio2: gpio at 140 {
@@ -142,6 +146,11 @@
 					gpio-controller;
 					#gpio-cells = <2>;
 					gpio-ranges = <&cpm_pinctrl 0 32 31>;
+					interrupt-controller;
+					interrupts = <ICU_GRP_NSR 82 IRQ_TYPE_LEVEL_HIGH>,
+						     <ICU_GRP_NSR 81 IRQ_TYPE_LEVEL_HIGH>,
+						     <ICU_GRP_NSR 80 IRQ_TYPE_LEVEL_HIGH>,
+						     <ICU_GRP_NSR 79 IRQ_TYPE_LEVEL_HIGH>;
 					status = "disabled";
 				};
 			};
arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi +10 -1
index d054684b79bc..036edf86b0f2 100644
@@ -138,8 +138,12 @@
 					gpio-controller;
 					#gpio-cells = <2>;
 					gpio-ranges = <&cps_pinctrl 0 0 32>;
+					interrupt-controller;
+					interrupts = <ICU_GRP_NSR 86 IRQ_TYPE_LEVEL_HIGH>,
+						     <ICU_GRP_NSR 85 IRQ_TYPE_LEVEL_HIGH>,
+						     <ICU_GRP_NSR 84 IRQ_TYPE_LEVEL_HIGH>,
+						     <ICU_GRP_NSR 83 IRQ_TYPE_LEVEL_HIGH>;
 					status = "disabled";
-
 				};
 
 				cps_gpio2: gpio at 140 {
@@ -149,6 +153,11 @@
 					gpio-controller;
 					#gpio-cells = <2>;
 					gpio-ranges = <&cps_pinctrl 0 32 31>;
+					interrupt-controller;
+					interrupts = <ICU_GRP_NSR 82 IRQ_TYPE_LEVEL_HIGH>,
+						     <ICU_GRP_NSR 81 IRQ_TYPE_LEVEL_HIGH>,
+						     <ICU_GRP_NSR 80 IRQ_TYPE_LEVEL_HIGH>,
+						     <ICU_GRP_NSR 79 IRQ_TYPE_LEVEL_HIGH>;
 					status = "disabled";
 				};
 
Signature · 1 line
2.7.4
#3 lore raw

PATCH 3/6 arm64: dts: marvell: mcbin: add pinctrl nodes

In reply to Russell King - ARM Linux

Add pinctrl nodes to describe the CPM I2C0 and CPS SPI1 settings.

---
 arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts | 31 +++++++++++++++++++++++
 1 file changed, 31 insertions(+)
arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts +31 -0
index dfced8c8f9e9..773a157e4af5 100644
@@ -115,10 +115,14 @@
 
 &cpm_i2c0 {
 	clock-frequency = <100000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&cpm_i2c0_pins>;
 	status = "okay";
 };
 
 &cpm_mdio {
+	pinctrl-names = "default";
+	pinctrl-0 = <&cpm_ge_mdio_pins>;
 	status = "okay";
 
 	ge_phy: ethernet-phy at 0 {
@@ -126,6 +130,22 @@
 	};
 };
 
+&cpm_pinctrl {
+	cpm_ge_mdio_pins: ge-mdio-pins {
+		marvell,pins = "mpp32", "mpp34";
+		marvell,function = "ge";
+	};
+	cpm_i2c0_pins: i2c0-pins {
+		marvell,pins = "mpp37", "mpp38";
+		marvell,function = "i2c0";
+	};
+	cpm_sdhci_pins: sdhci-pins {
+		marvell,pins = "mpp55", "mpp56", "mpp57", "mpp58", "mpp59",
+			       "mpp60", "mpp61";
+		marvell,function = "sdio";
+	};
+};
+
 &cpm_sata0 {
 	/* CPM Lane 0 - U29 */
 	status = "okay";
@@ -135,6 +155,8 @@
 	/* U6 */
 	broken-cd;
 	bus-width = <4>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&cpm_sdhci_pins>;
 	status = "okay";
 	vqmmc-supply = <&v_3_3>;
 };
@@ -160,6 +182,13 @@
 	phy-mode = "sgmii";
 };
 
+&cps_pinctrl {
+	cps_spi1_pins: spi1-pins {
+		marvell,pins = "mpp12", "mpp13", "mpp14", "mpp15", "mpp16";
+		marvell,function = "spi1";
+	};
+};
+
 &cps_sata0 {
 	/* CPS Lane 1 - U32 */
 	/* CPS Lane 3 - U31 */
@@ -167,6 +196,8 @@
 };
 
 &cps_spi1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&cps_spi1_pins>;
 	status = "okay";
 
 	spi-flash at 0 {
Signature · 1 line
2.7.4
#4 lore raw

PATCH 4/6 arm64: dts: marvell: mcbin: properly add GPIO

In reply to Russell King - ARM Linux

Proprely add GPIO specifications for the USB 5V regulator.

---
 arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts +8 -3
index 773a157e4af5..b20c17160cbb 100644
@@ -79,12 +79,13 @@
 
 	v_5v0_usb3_hst_vbus: regulator-usb3-vbus0 {
 		compatible = "regulator-fixed";
+		enable-active-high;
+		gpio = <&cpm_gpio2 15 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&cpm_xhci_vbus_pins>;
 		regulator-name = "v_5v0_usb3_hst_vbus";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
-		gpio = <&cpm_gpio2 15 GPIO_ACTIVE_HIGH>;
-		regulator-always-on;
-		enable-active-high;
 		status = "okay";
 	};
 
@@ -139,6 +140,10 @@
 		marvell,pins = "mpp37", "mpp38";
 		marvell,function = "i2c0";
 	};
+	cpm_xhci_vbus_pins: xhci0-vbus-pins {
+		marvell,pins = "mpp47";
+		marvell,function = "gpio";
+	};
 	cpm_sdhci_pins: sdhci-pins {
 		marvell,pins = "mpp55", "mpp56", "mpp57", "mpp58", "mpp59",
 			       "mpp60", "mpp61";
Signature · 1 line
2.7.4
#5 lore raw

PATCH 5/6 arm64: dts: marvell: mcbin: add support for i2c mux

In reply to Russell King - ARM Linux

The MACCHIATOBin board has a PCA9548 I2C mux for the SFP ports on CP100 master I2C bus 1. Add the DT description for it.

---
 arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts | 34 +++++++++++++++++++++++
 1 file changed, 34 insertions(+)
arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts +34 -0
index b20c17160cbb..1372558d037b 100644
@@ -121,6 +121,36 @@
 	status = "okay";
 };
 
+&cpm_i2c1 {
+	clock-frequency = <100000>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&cpm_i2c1_pins>;
+	status = "okay";
+
+	i2c-switch at 70 {
+		compatible = "nxp,pca9548";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		reg = <0x70>;
+
+		sfpp0_i2c: i2c at 0 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0>;
+		};
+		sfpp1_i2c: i2c at 1 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <1>;
+		};
+		sfp_1g_i2c: i2c at 2 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <2>;
+		};
+	};
+};
+
 &cpm_mdio {
 	pinctrl-names = "default";
 	pinctrl-0 = <&cpm_ge_mdio_pins>;
@@ -136,6 +166,10 @@
 		marvell,pins = "mpp32", "mpp34";
 		marvell,function = "ge";
 	};
+	cpm_i2c1_pins: i2c1-pins {
+		marvell,pins = "mpp35", "mpp36";
+		marvell,function = "i2c1";
+	};
 	cpm_i2c0_pins: i2c0-pins {
 		marvell,pins = "mpp37", "mpp38";
 		marvell,function = "i2c0";
Signature · 1 line
2.7.4
#6 lore raw

PATCH 6/6 arm64: dts: marvell: mcbin: add support for PCIe

In reply to Russell King - ARM Linux

Add support for PCIe with the the PCIe reset signal wired up to the appropriate GPIO pin.

---
 arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts +13 -0
index 1372558d037b..53346ccad6cf 100644
@@ -161,6 +161,15 @@
 	};
 };
 
+&cpm_pcie0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&cpm_pcie_pins>;
+	num-lanes = <4>;
+	num-viewport = <8>;
+	reset-gpio = <&cpm_gpio1 20 GPIO_ACTIVE_LOW>;
+	status = "okay";
+};
+
 &cpm_pinctrl {
 	cpm_ge_mdio_pins: ge-mdio-pins {
 		marvell,pins = "mpp32", "mpp34";
@@ -178,6 +187,10 @@
 		marvell,pins = "mpp47";
 		marvell,function = "gpio";
 	};
+	cpm_pcie_pins: pcie-pins {
+		marvell,pins = "mpp52";
+		marvell,function = "gpio";
+	};
 	cpm_sdhci_pins: sdhci-pins {
 		marvell,pins = "mpp55", "mpp56", "mpp57", "mpp58", "mpp59",
 			       "mpp60", "mpp61";
Signature · 1 line
2.7.4
#7 lore raw

cover Macchiatobin updates

In reply to Russell King - ARM Linux

Hi Russell King,

Quoted 8 lines · Russell King - ARM Linux

This series, based upon the 4.12-rc6 backports branch in the MISL tree:
- adds a maintainer entry for the Macchiatobin board.
- adds GPIO interrupt support to the CP110s
- adds the pinmux entries
- corrects the 5V regulator GPIO entry
- adds support for the I2C mux (used for the SFP slots)
- adds PCIe support

Quoted 7 lines

All entries include the appropriate pinmux and GPIO configuration.

PCIe support has not been tested locally as I have no PCIe cards to test with; this patch includes support for the PCIe reset GPIO signal. If others can test that patch and let me know whether it works, I would be most grateful.

The first patch had been applied on mvebu/arm64-for-4.14.

Patch 2 to 6 had been applied on mvebu/dt64-for-4.14.

For the patch 4, I merged it with the patch that Thomas previously sent
because it was not in mainline yet even if it was on the backport
branch. The resulting patch is attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-arm64-dts-marvell-fix-USB3-regulator-definition-on-M.patch
Type: text/x-diff
Size: 2133 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170712/7c7ddc27/attachment.bin>
-------------- next part --------------

Finally I tested the last patch with an Ethernet PCIe card it worked well, but the reset part was not tested as I don't know how it should be tested.

As soon as the v4.13-rc1 will be released then the branches will be rebased on it and renamed mvebu/arm64 and mvebu/dt64.

Thanks,

Gregory

Quoted 10 lines
 MAINTAINERS                                        |  6 ++
 arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts  | 89 +++++++++++++++++++++-
 .../boot/dts/marvell/armada-cp110-master.dtsi      | 11 ++-
 .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 11 ++-
 4 files changed, 112 insertions(+), 5 deletions(-)
Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com