All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
@ 2012-10-24 14:53 Andrew Lunn
  2012-10-24 14:53 ` [PATCH 1/9] ARM: Kirkwood: Convert TS219 " Andrew Lunn
                   ` (11 more replies)
  0 siblings, 12 replies; 58+ messages in thread
From: Andrew Lunn @ 2012-10-24 14:53 UTC (permalink / raw)
  To: linux-arm-kernel

This patchset converts all DT kirkwood boards to using pinctrl.

This patchset depends on an earlier patchset to allow the mvebu
pinctrl driver and gpio driver to be built for kirkwood.

Only the TS219 conversion has been tested on hardware. The remaining
are compile tested. Before merging upstream, it would be good if the
others could be tested on hardware.

This series along with the dependents can be found in:

git://github.com/lunn/linux.git v3.7-rc2-pinctrl

Andrew Lunn (9):
  ARM: Kirkwood: Convert TS219 to pinctrl.
  ARM: Kirkwood: Convert iConnect to pinctrl.
  ARM: Kirkwood: Convert dnskw to pinctrl
  ARM: Kirkwood: Convert dockstar to pinctrl.
  ARM: Kirkwood: Convert dreamplug to pinctrl.
  ARM: Kirkwood: Convert GoFlex Net to pinctrl.
  ARM: Kirkwood: Convert ib62x0 to pinctrl.
  ARM: Kirkwood: Convert lsxl boards to pinctrl.
  ARM: Kirkwood: Convert IX2-200 to pinctrl.

 arch/arm/boot/dts/kirkwood-dnskw.dtsi         |  136 +++++++++++++++++++++++++
 arch/arm/boot/dts/kirkwood-dockstar.dts       |   21 ++++
 arch/arm/boot/dts/kirkwood-dreamplug.dts      |   26 +++++
 arch/arm/boot/dts/kirkwood-goflexnet.dts      |   57 +++++++++++
 arch/arm/boot/dts/kirkwood-ib62x0.dts         |   41 ++++++++
 arch/arm/boot/dts/kirkwood-iconnect.dts       |   52 ++++++++++
 arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts |   90 ++++++++++++++++
 arch/arm/boot/dts/kirkwood-lsxl.dtsi          |   67 ++++++++++++
 arch/arm/boot/dts/kirkwood-ts219-6281.dts     |   56 ++++++++++
 arch/arm/boot/dts/kirkwood-ts219-6282.dts     |   56 ++++++++++
 arch/arm/mach-kirkwood/board-dnskw.c          |   37 -------
 arch/arm/mach-kirkwood/board-dockstar.c       |   10 --
 arch/arm/mach-kirkwood/board-dreamplug.c      |   14 ---
 arch/arm/mach-kirkwood/board-goflexnet.c      |   18 ----
 arch/arm/mach-kirkwood/board-ib62x0.c         |   21 ----
 arch/arm/mach-kirkwood/board-iconnect.c       |   17 ----
 arch/arm/mach-kirkwood/board-iomega_ix2_200.c |   24 -----
 arch/arm/mach-kirkwood/board-lsxl.c           |   19 ----
 arch/arm/mach-kirkwood/board-ts219.c          |   25 -----
 19 files changed, 602 insertions(+), 185 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/9] ARM: Kirkwood: Convert TS219 to pinctrl.
  2012-10-24 14:53 [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl Andrew Lunn
@ 2012-10-24 14:53 ` Andrew Lunn
  2012-10-24 19:31   ` Thomas Petazzoni
  2012-10-24 14:53 ` [PATCH 2/9] ARM: Kirkwood: Convert iConnect " Andrew Lunn
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 58+ messages in thread
From: Andrew Lunn @ 2012-10-24 14:53 UTC (permalink / raw)
  To: linux-arm-kernel

Make use of the pinctrl driver for configuring all the pins, instead
of using the Orion mpp code.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/kirkwood-ts219-6281.dts |   56 +++++++++++++++++++++++++++++
 arch/arm/boot/dts/kirkwood-ts219-6282.dts |   56 +++++++++++++++++++++++++++++
 arch/arm/mach-kirkwood/board-ts219.c      |   25 -------------
 3 files changed, 112 insertions(+), 25 deletions(-)

diff --git a/arch/arm/boot/dts/kirkwood-ts219-6281.dts b/arch/arm/boot/dts/kirkwood-ts219-6281.dts
index ccbf327..4d652ce 100644
--- a/arch/arm/boot/dts/kirkwood-ts219-6281.dts
+++ b/arch/arm/boot/dts/kirkwood-ts219-6281.dts
@@ -3,6 +3,62 @@
 /include/ "kirkwood-ts219.dtsi"
 
 / {
+	ocp at f1000000 {
+		pinctrl: pinctrl at 10000 {
+			compatible = "marvell,88f6281-pinctrl";
+			reg = <0x10000 0x20>;
+
+			pinctrl-0 = < &pmx_uart0 &pmx_uart1 &pmx_spi
+				      &pmx_twsi0 &pmx_sata0 &pmx_sata1
+				      &pmx_ram_size &pmx_reset_button
+				      &pmx_USB_copy_button &pmx_board_id>;
+			pinctrl-names = "default";
+
+			pmx_uart0: pmx-uart0 {
+				marvell,pins = "mpp10", "mpp11";
+				marvell,function = "uart0";
+			};
+			pmx_uart1: pmx-uart1 {
+				marvell,pins = "mpp13", "mpp14";
+				marvell,function = "uart1";
+			};
+			pmx_spi: pmx-spi {
+				marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3";
+				marvell,function = "spi";
+			};
+			pmx_twsi0: pmx-twsi0 {
+				marvell,pins = "mpp8", "mpp9";
+				marvell,function = "twsi0";
+			};
+			pmx_sata0: pmx-sata0 {
+				marvell,pins = "mpp5", "mpp21", "mpp23";
+				marvell,function = "sata0";
+			};
+			pmx_sata1: pmx-sata1 {
+				marvell,pins = "mpp4", "mpp20", "mpp22";
+				marvell,function = "sata1";
+			};
+			pmx_ram_size: pmx-ram-size {
+				/* RAM: 0: 256 MB, 1: 512 MB */
+				marvell,pins = "mpp36";
+				marvell,function = "gpio";
+			};
+			pmx_USB_copy_button: pmx-USB-copy-button {
+				marvell,pins = "mpp15";
+				marvell,function = "gpio";
+			};
+			pmx_reset_button: pmx-reset-button {
+				marvell,pins = "mpp16";
+				marvell,function = "gpio";
+			};
+			pmx_board_id: pmx-board-id {
+				/* 0: TS-11x, 1: TS-21x */
+				marvell,pins = "mpp44";
+				marvell,function = "gpio";
+			};
+		};
+	};
+
 	gpio_keys {
 		compatible = "gpio-keys";
 		#address-cells = <1>;
diff --git a/arch/arm/boot/dts/kirkwood-ts219-6282.dts b/arch/arm/boot/dts/kirkwood-ts219-6282.dts
index fbe9932..8c3d720 100644
--- a/arch/arm/boot/dts/kirkwood-ts219-6282.dts
+++ b/arch/arm/boot/dts/kirkwood-ts219-6282.dts
@@ -3,6 +3,62 @@
 /include/ "kirkwood-ts219.dtsi"
 
 / {
+	ocp at f1000000 {
+		pinctrl: pinctrl at 10000 {
+			compatible = "marvell,88f6282-pinctrl";
+			reg = <0x10000 0x20>;
+
+			pinctrl-0 = < &pmx_uart0 &pmx_uart1 &pmx_spi
+				      &pmx_twsi0 &pmx_sata0 &pmx_sata1
+				      &pmx_ram_size &pmx_reset_button
+				      &pmx_USB_copy_button &pmx_board_id>;
+			pinctrl-names = "default";
+
+			pmx_uart0: pmx-uart0 {
+				marvell,pins = "mpp10", "mpp11";
+				marvell,function = "uart0";
+			};
+			pmx_uart1: pmx-uart1 {
+				marvell,pins = "mpp13", "mpp14";
+				marvell,function = "uart1";
+			};
+			pmx_spi: pmx-spi {
+				marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3";
+				marvell,function = "spi";
+			};
+			pmx_twsi0: pmx-twsi0 {
+				marvell,pins = "mpp8", "mpp9";
+				marvell,function = "twsi0";
+			};
+			pmx_sata0: pmx-sata0 {
+				marvell,pins = "mpp5", "mpp21", "mpp23";
+				marvell,function = "sata0";
+			};
+			pmx_sata1: pmx-sata1 {
+				marvell,pins = "mpp4", "mpp20", "mpp22";
+				marvell,function = "sata1";
+			};
+			pmx_ram_size: pmx-ram-size {
+				/* RAM: 0: 256 MB, 1: 512 MB */
+				marvell,pins = "mpp36";
+				marvell,function = "gpio";
+			};
+			pmx_reset_button: pmx-reset-button {
+				marvell,pins = "mpp37";
+				marvell,function = "gpio";
+			};
+			pmx_USB_copy_button: pmx-USB-copy-button {
+				marvell,pins = "mpp43";
+				marvell,function = "gpio";
+			};
+			pmx_board_id: pmx-board-id {
+				/* 0: TS-11x, 1: TS-21x */
+				marvell,pins = "mpp44";
+				marvell,function = "gpio";
+			};
+		};
+	};
+
 	gpio_keys {
 		compatible = "gpio-keys";
 		#address-cells = <1>;
diff --git a/arch/arm/mach-kirkwood/board-ts219.c b/arch/arm/mach-kirkwood/board-ts219.c
index 1750e68..47c8287 100644
--- a/arch/arm/mach-kirkwood/board-ts219.c
+++ b/arch/arm/mach-kirkwood/board-ts219.c
@@ -26,41 +26,16 @@
 #include <asm/mach/arch.h>
 #include <mach/kirkwood.h>
 #include "common.h"
-#include "mpp.h"
 #include "tsx1x-common.h"
 
 static struct mv643xx_eth_platform_data qnap_ts219_ge00_data = {
 	.phy_addr	= MV643XX_ETH_PHY_ADDR(8),
 };
 
-static unsigned int qnap_ts219_mpp_config[] __initdata = {
-	MPP0_SPI_SCn,
-	MPP1_SPI_MOSI,
-	MPP2_SPI_SCK,
-	MPP3_SPI_MISO,
-	MPP4_SATA1_ACTn,
-	MPP5_SATA0_ACTn,
-	MPP8_TW0_SDA,
-	MPP9_TW0_SCK,
-	MPP10_UART0_TXD,
-	MPP11_UART0_RXD,
-	MPP13_UART1_TXD,	/* PIC controller */
-	MPP14_UART1_RXD,	/* PIC controller */
-	MPP15_GPIO,		/* USB Copy button (on devices with 88F6281) */
-	MPP16_GPIO,		/* Reset button (on devices with 88F6281) */
-	MPP36_GPIO,		/* RAM: 0: 256 MB, 1: 512 MB */
-	MPP37_GPIO,		/* Reset button (on devices with 88F6282) */
-	MPP43_GPIO,		/* USB Copy button (on devices with 88F6282) */
-	MPP44_GPIO,		/* Board ID: 0: TS-11x, 1: TS-21x */
-	0
-};
-
 void __init qnap_dt_ts219_init(void)
 {
 	u32 dev, rev;
 
-	kirkwood_mpp_conf(qnap_ts219_mpp_config);
-
 	kirkwood_pcie_id(&dev, &rev);
 	if (dev == MV88F6282_DEV_ID)
 		qnap_ts219_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 2/9] ARM: Kirkwood: Convert iConnect to pinctrl.
  2012-10-24 14:53 [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl Andrew Lunn
  2012-10-24 14:53 ` [PATCH 1/9] ARM: Kirkwood: Convert TS219 " Andrew Lunn
@ 2012-10-24 14:53 ` Andrew Lunn
  2012-10-24 14:53 ` [PATCH 3/9] ARM: Kirkwood: Convert dnskw " Andrew Lunn
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 58+ messages in thread
From: Andrew Lunn @ 2012-10-24 14:53 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/kirkwood-iconnect.dts |   52 +++++++++++++++++++++++++++++++
 arch/arm/mach-kirkwood/board-iconnect.c |   17 ----------
 2 files changed, 52 insertions(+), 17 deletions(-)

diff --git a/arch/arm/boot/dts/kirkwood-iconnect.dts b/arch/arm/boot/dts/kirkwood-iconnect.dts
index d97cd9d..7b926f7 100644
--- a/arch/arm/boot/dts/kirkwood-iconnect.dts
+++ b/arch/arm/boot/dts/kirkwood-iconnect.dts
@@ -18,6 +18,58 @@
 	};
 
 	ocp at f1000000 {
+		pinctrl: pinctrl at 10000 {
+			compatible = "marvell,88f6281-pinctrl";
+			reg = <0x10000 0x20>;
+
+			pinctrl-0 = < &pmx_gpio_12 &pmx_gpio_35
+				      &pmx_gpio_41 &pmx_gpio_42
+				      &pmx_gpio_43 &pmx_gpio_44
+				      &pmx_gpio_45 &pmx_gpio_46
+				      &pmx_gpio_47 &pmx_gpio_48 >;
+			pinctrl-names = "default";
+
+			pmx_gpio_12: pmx-gpio-12 {
+				marvell,pins = "mpp12";
+				marvell,function = "gpio";
+			};
+			pmx_gpio_35: pmx-gpio-35 {
+				marvell,pins = "mpp35";
+				marvell,function = "gpio";
+			};
+			pmx_gpio_41: pmx-gpio-41 {
+				marvell,pins = "mpp41";
+				marvell,function = "gpio";
+			};
+			pmx_gpio_42: pmx-gpio-42 {
+				marvell,pins = "mpp42";
+				marvell,function = "gpio";
+			};
+			pmx_gpio_43: pmx-gpio-43 {
+				marvell,pins = "mpp43";
+				marvell,function = "gpio";
+			};
+			pmx_gpio_44: pmx-gpio-44 {
+				marvell,pins = "mpp44";
+				marvell,function = "gpio";
+			};
+			pmx_gpio_45: pmx-gpio-45 {
+				marvell,pins = "mpp45";
+				marvell,function = "gpio";
+			};
+			pmx_gpio_46: pmx-gpio-46 {
+				marvell,pins = "mpp46";
+				marvell,function = "gpio";
+			};
+			pmx_gpio_47: pmx-gpio-47 {
+				marvell,pins = "mpp47";
+				marvell,function = "gpio";
+			};
+			pmx_gpio_48: pmx-gpio-48 {
+				marvell,pins = "mpp48";
+				marvell,function = "gpio";
+			};
+		};
 		i2c at 11000 {
 			status = "okay";
 
diff --git a/arch/arm/mach-kirkwood/board-iconnect.c b/arch/arm/mach-kirkwood/board-iconnect.c
index d084b1e..aeba479 100644
--- a/arch/arm/mach-kirkwood/board-iconnect.c
+++ b/arch/arm/mach-kirkwood/board-iconnect.c
@@ -21,30 +21,13 @@
 #include <asm/mach/arch.h>
 #include <mach/kirkwood.h>
 #include "common.h"
-#include "mpp.h"
 
 static struct mv643xx_eth_platform_data iconnect_ge00_data = {
 	.phy_addr	= MV643XX_ETH_PHY_ADDR(11),
 };
 
-static unsigned int iconnect_mpp_config[] __initdata = {
-	MPP12_GPIO,
-	MPP35_GPIO,
-	MPP41_GPIO,
-	MPP42_GPIO,
-	MPP43_GPIO,
-	MPP44_GPIO,
-	MPP45_GPIO,
-	MPP46_GPIO,
-	MPP47_GPIO,
-	MPP48_GPIO,
-	0
-};
-
 void __init iconnect_init(void)
 {
-	kirkwood_mpp_conf(iconnect_mpp_config);
-
 	kirkwood_ehci_init();
 	kirkwood_ge00_init(&iconnect_ge00_data);
 }
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 3/9] ARM: Kirkwood: Convert dnskw to pinctrl
  2012-10-24 14:53 [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl Andrew Lunn
  2012-10-24 14:53 ` [PATCH 1/9] ARM: Kirkwood: Convert TS219 " Andrew Lunn
  2012-10-24 14:53 ` [PATCH 2/9] ARM: Kirkwood: Convert iConnect " Andrew Lunn
@ 2012-10-24 14:53 ` Andrew Lunn
  2012-10-25 22:58   ` Jamie Lentin
  2012-10-24 14:53 ` [PATCH 4/9] ARM: Kirkwood: Convert dockstar " Andrew Lunn
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 58+ messages in thread
From: Andrew Lunn @ 2012-10-24 14:53 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/kirkwood-dnskw.dtsi |  136 +++++++++++++++++++++++++++++++++
 arch/arm/mach-kirkwood/board-dnskw.c  |   37 ---------
 2 files changed, 136 insertions(+), 37 deletions(-)

diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
index 9b32d02..5d8cf93 100644
--- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi
+++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
@@ -36,6 +36,142 @@
 	};
 
 	ocp at f1000000 {
+		pinctrl: pinctrl at 10000 {
+			compatible = "marvell,88f6281-pinctrl";
+			reg = <0x10000 0x20>;
+
+			pinctrl-0 = < &pmx_uart1 &pmx_sata1
+				      &pmx_gpio_24 &pmx_gpio_25
+				      &pmx_led_power &pmx_led_power
+				      &pmx_led_red_right_hdd
+				      &pmx_led_red_left_hdd
+				      &pmx_led_red_usb_325
+				      &pmx_gpio_30 &pmx_gpio_31
+				      &pmx_gpio_32 &pmx_gpio_33
+				      &pmx_button_power
+				      &pmx_led_red_usb_320
+				      &pmx_power_off &pmx_power_back_on
+				      &pmx_power_sata0 &pmx_power_sata1
+				      &pmx_present_sata0 &pmx_present_sata1
+				      &pmx_led_white_usb &pmx_fan_tacho
+				      &pmx_fan_high_speed &pmx_fan_low_speed
+				      &pmx_button_unmount &pmx_button_reset
+				      &pmx_temp_alarm >;
+			pinctrl-names = "default";
+
+			pmx_uart1: pmx-uart1 {
+				marvell,pins = "mpp13", "mpp14";
+				marvell,function = "uart1";
+			};
+			pmx_sata1: pmx-sata1 {
+				marvell,pins = "mpp4", "mpp20", "mpp22";
+				marvell,function = "sata1";
+			};
+			pmx_gpio_24: pmx-gpio-24 {
+				marvell,pins = "mpp24";
+				marvell,function = "gpio";
+			};
+			pmx_gpio_25: pmx-gpio-25 {
+				marvell,pins = "mpp25";
+				marvell,function = "gpio";
+			};
+			pmx_led_power: pmx-led-power {
+				marvell,pins = "mpp26";
+				marvell,function = "gpio";
+			};
+			pmx_led_red_right_hdd: pmx-led-red-right-hdd {
+				marvell,pins = "mpp27";
+				marvell,function = "gpio";
+			};
+			pmx_led_red_left_hdd: pmx-led-red-left-hdd {
+				marvell,pins = "mpp28";
+				marvell,function = "gpio";
+			};
+			pmx_led_red_usb_325: pmx-led-red-usb-325 {
+				marvell,pins = "mpp29";
+				marvell,function = "gpio";
+			};
+			pmx_gpio_30: pmx-gpio-30 {
+				marvell,pins = "mpp30";
+				marvell,function = "gpio";
+			};
+			pmx_gpio_31: pmx-gpio-31 {
+				marvell,pins = "mpp31";
+				marvell,function = "gpio";
+			};
+			pmx_gpio_32: pmx-gpio-32 {
+				marvell,pins = "mpp32";
+				marvell,function = "gpio";
+			};
+			pmx_gpio_33: pmx-gpio-33 {
+				marvell,pins = "mpp33";
+				marvell,function = "gpio";
+			};
+			pmx_button_power: pmx-button-power {
+				marvell,pins = "mpp34";
+				marvell,function = "gpio";
+			};
+			pmx_led_red_usb_320: pmx-led-red-usb-320 {
+				marvell,pins = "mpp35";
+				marvell,function = "gpio";
+			};
+			pmx_power_off: pmx-power-off {
+				marvell,pins = "mpp36";
+				marvell,function = "gpio";
+			};
+			pmx_power_back_on: pmx-power-back-on {
+				marvell,pins = "mpp37";
+				marvell,function = "gpio";
+			};
+			pmx_gpio_38: pmx-gpio-38 {
+				marvell,pins = "mpp38";
+				marvell,function = "gpio";
+			};
+			pmx_power_sata0: pmx-power-sata0 {
+				marvell,pins = "mpp39";
+				marvell,function = "gpio";
+			};
+			pmx_power_sata1: pmx-power-sata1 {
+				marvell,pins = "mpp40";
+				marvell,function = "gpio";
+			};
+			pmx_present_sata0: pmx-present-sata0 {
+				marvell,pins = "mpp41";
+				marvell,function = "gpio";
+			};
+			pmx_present_sata1: pmx-present-sata1 {
+				marvell,pins = "mpp42";
+				marvell,function = "gpio";
+			};
+			pmx_led_white_usb: pmx-led-white-usb {
+				marvell,pins = "mpp43";
+				marvell,function = "gpio";
+			};
+			pmx_fan_tacho: pmx-fan-tacho {
+				marvell,pins = "mpp44";
+				marvell,function = "gpio";
+			};
+			pmx_fan_high_speed: pmx-fan-high-speed {
+				marvell,pins = "mpp45";
+				marvell,function = "gpio";
+			};
+			pmx_fan_low_speed: pmx-fan-low-speed {
+				marvell,pins = "mpp46";
+				marvell,function = "gpio";
+			};
+			pmx_button_unmount: pmx-button-unmount {
+				marvell,pins = "mpp47";
+				marvell,function = "gpio";
+			};
+			pmx_button_reset: pmx-button-reset {
+				marvell,pins = "mpp48";
+				marvell,function = "gpio";
+			};
+			pmx_temp_alarm: pmx-temp-alarm {
+				marvell,pins = "mpp49";
+				marvell,function = "gpio";
+			};
+		};
 		sata at 80000 {
 			status = "okay";
 			nr-ports = <2>;
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c
index 43d16d6..ed93c09 100644
--- a/arch/arm/mach-kirkwood/board-dnskw.c
+++ b/arch/arm/mach-kirkwood/board-dnskw.c
@@ -17,46 +17,11 @@
 #include <linux/mv643xx_eth.h>
 #include <linux/gpio.h>
 #include "common.h"
-#include "mpp.h"
 
 static struct mv643xx_eth_platform_data dnskw_ge00_data = {
 	.phy_addr	= MV643XX_ETH_PHY_ADDR(8),
 };
 
-static unsigned int dnskw_mpp_config[] __initdata = {
-	MPP13_UART1_TXD,	/* Custom ... */
-	MPP14_UART1_RXD,	/* ... Controller (DNS-320 only) */
-	MPP20_SATA1_ACTn,	/* LED: White Right HDD */
-	MPP21_SATA0_ACTn,	/* LED: White Left HDD */
-	MPP24_GPIO,
-	MPP25_GPIO,
-	MPP26_GPIO,	/* LED: Power */
-	MPP27_GPIO,	/* LED: Red Right HDD */
-	MPP28_GPIO,	/* LED: Red Left HDD */
-	MPP29_GPIO,	/* LED: Red USB (DNS-325 only) */
-	MPP30_GPIO,
-	MPP31_GPIO,
-	MPP32_GPIO,
-	MPP33_GPO,
-	MPP34_GPIO,	/* Button: Front power */
-	MPP35_GPIO,	/* LED: Red USB (DNS-320 only) */
-	MPP36_GPIO,	/* Power: Turn off board */
-	MPP37_GPIO,	/* Power: Turn back on after power failure */
-	MPP38_GPIO,
-	MPP39_GPIO,	/* Power: SATA0 */
-	MPP40_GPIO,	/* Power: SATA1 */
-	MPP41_GPIO,	/* SATA0 present */
-	MPP42_GPIO,	/* SATA1 present */
-	MPP43_GPIO,	/* LED: White USB */
-	MPP44_GPIO,	/* Fan: Tachometer Pin */
-	MPP45_GPIO,	/* Fan: high speed */
-	MPP46_GPIO,	/* Fan: low speed */
-	MPP47_GPIO,	/* Button: Back unmount */
-	MPP48_GPIO,	/* Button: Back reset */
-	MPP49_GPIO,	/* Temp Alarm (DNS-325) Pin of U5 (DNS-320) */
-	0
-};
-
 static void dnskw_power_off(void)
 {
 	gpio_set_value(36, 1);
@@ -76,8 +41,6 @@ static void __init dnskw_gpio_register(unsigned gpio, char *name, int def)
 
 void __init dnskw_init(void)
 {
-	kirkwood_mpp_conf(dnskw_mpp_config);
-
 	kirkwood_ehci_init();
 	kirkwood_ge00_init(&dnskw_ge00_data);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 4/9] ARM: Kirkwood: Convert dockstar to pinctrl.
  2012-10-24 14:53 [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl Andrew Lunn
                   ` (2 preceding siblings ...)
  2012-10-24 14:53 ` [PATCH 3/9] ARM: Kirkwood: Convert dnskw " Andrew Lunn
@ 2012-10-24 14:53 ` Andrew Lunn
  2012-10-24 14:53 ` [PATCH 5/9] ARM: Kirkwood: Convert dreamplug " Andrew Lunn
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 58+ messages in thread
From: Andrew Lunn @ 2012-10-24 14:53 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/kirkwood-dockstar.dts |   21 +++++++++++++++++++++
 arch/arm/mach-kirkwood/board-dockstar.c |   10 ----------
 2 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/arch/arm/boot/dts/kirkwood-dockstar.dts b/arch/arm/boot/dts/kirkwood-dockstar.dts
index 08a5824..cc5e7ef 100644
--- a/arch/arm/boot/dts/kirkwood-dockstar.dts
+++ b/arch/arm/boot/dts/kirkwood-dockstar.dts
@@ -16,6 +16,27 @@
 	};
 
 	ocp at f1000000 {
+		pinctrl: pinctrl at 10000 {
+			compatible = "marvell,88f6281-pinctrl";
+			reg = <0x10000 0x20>;
+
+			pinctrl-0 = < &pmx_usb_power_enable
+				      &pmx_led_green &pmx_led_orange >;
+			pinctrl-names = "default";
+
+			pmx_usb_power_enable: pmx-usb-power-enable {
+				marvell,pins = "mpp29";
+				marvell,function = "gpio";
+			};
+			pmx_led_green: pmx-led-green {
+				marvell,pins = "mpp46";
+				marvell,function = "gpio";
+			};
+			pmx_led_orange: pmx-led-orange {
+				marvell,pins = "mpp47";
+				marvell,function = "gpio";
+			};
+		};
 		serial at 12000 {
 			clock-frequency = <200000000>;
 			status = "ok";
diff --git a/arch/arm/mach-kirkwood/board-dockstar.c b/arch/arm/mach-kirkwood/board-dockstar.c
index f2fbb02..3bd916b 100644
--- a/arch/arm/mach-kirkwood/board-dockstar.c
+++ b/arch/arm/mach-kirkwood/board-dockstar.c
@@ -32,26 +32,16 @@
 #include <mach/bridge-regs.h>
 #include <linux/platform_data/mmc-mvsdio.h>
 #include "common.h"
-#include "mpp.h"
 
 static struct mv643xx_eth_platform_data dockstar_ge00_data = {
 	.phy_addr	= MV643XX_ETH_PHY_ADDR(0),
 };
 
-static unsigned int dockstar_mpp_config[] __initdata = {
-	MPP29_GPIO,	/* USB Power Enable */
-	MPP46_GPIO,	/* LED green */
-	MPP47_GPIO,	/* LED orange */
-	0
-};
-
 void __init dockstar_dt_init(void)
 {
 	/*
 	 * Basic setup. Needs to be called early.
 	 */
-	kirkwood_mpp_conf(dockstar_mpp_config);
-
 	if (gpio_request(29, "USB Power Enable") != 0 ||
 	    gpio_direction_output(29, 1) != 0)
 		pr_err("can't setup GPIO 29 (USB Power Enable)\n");
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 5/9] ARM: Kirkwood: Convert dreamplug to pinctrl.
  2012-10-24 14:53 [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl Andrew Lunn
                   ` (3 preceding siblings ...)
  2012-10-24 14:53 ` [PATCH 4/9] ARM: Kirkwood: Convert dockstar " Andrew Lunn
@ 2012-10-24 14:53 ` Andrew Lunn
  2012-10-24 14:53 ` [PATCH 6/9] ARM: Kirkwood: Convert GoFlex Net " Andrew Lunn
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 58+ messages in thread
From: Andrew Lunn @ 2012-10-24 14:53 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/kirkwood-dreamplug.dts |   26 ++++++++++++++++++++++++++
 arch/arm/mach-kirkwood/board-dreamplug.c |   14 --------------
 2 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts
index 26e281f..4d1ef46 100644
--- a/arch/arm/boot/dts/kirkwood-dreamplug.dts
+++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts
@@ -16,6 +16,32 @@
 	};
 
 	ocp at f1000000 {
+		pinctrl: pinctrl at 10000 {
+			compatible = "marvell,88f6281-pinctrl";
+			reg = <0x10000 0x20>;
+
+			pinctrl-0 = < &pmx_spi
+				      &pmx_led_bluetooth &pmx_led_wifi
+				      &pmx_led_wifi_ap >;
+			pinctrl-names = "default";
+
+			pmx_spi: pmx-spi {
+				marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3";
+				marvell,function = "spi";
+			};
+			pmx_led_bluetooth: pmx-led-bluetooth {
+				marvell,pins = "mpp47";
+				marvell,function = "gpio";
+			};
+			pmx_led_wifi: pmx-led-wifi {
+				marvell,pins = "mpp48";
+				marvell,function = "gpio";
+			};
+			pmx_led_wifi_ap: pmx-led-wifi-ap {
+				marvell,pins = "mpp49";
+				marvell,function = "gpio";
+			};
+		};
 		serial at 12000 {
 			clock-frequency = <200000000>;
 			status = "ok";
diff --git a/arch/arm/mach-kirkwood/board-dreamplug.c b/arch/arm/mach-kirkwood/board-dreamplug.c
index 20af53a..db0c280 100644
--- a/arch/arm/mach-kirkwood/board-dreamplug.c
+++ b/arch/arm/mach-kirkwood/board-dreamplug.c
@@ -32,7 +32,6 @@
 #include <mach/bridge-regs.h>
 #include <linux/platform_data/mmc-mvsdio.h>
 #include "common.h"
-#include "mpp.h"
 
 static struct mv643xx_eth_platform_data dreamplug_ge00_data = {
 	.phy_addr	= MV643XX_ETH_PHY_ADDR(0),
@@ -46,24 +45,11 @@ static struct mvsdio_platform_data dreamplug_mvsdio_data = {
 	/* unfortunately the CD signal has not been connected */
 };
 
-static unsigned int dreamplug_mpp_config[] __initdata = {
-	MPP0_SPI_SCn,
-	MPP1_SPI_MOSI,
-	MPP2_SPI_SCK,
-	MPP3_SPI_MISO,
-	MPP47_GPIO,	/* Bluetooth LED */
-	MPP48_GPIO,	/* Wifi LED */
-	MPP49_GPIO,	/* Wifi AP LED */
-	0
-};
-
 void __init dreamplug_init(void)
 {
 	/*
 	 * Basic setup. Needs to be called early.
 	 */
-	kirkwood_mpp_conf(dreamplug_mpp_config);
-
 	kirkwood_ehci_init();
 	kirkwood_ge00_init(&dreamplug_ge00_data);
 	kirkwood_ge01_init(&dreamplug_ge01_data);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 6/9] ARM: Kirkwood: Convert GoFlex Net to pinctrl.
  2012-10-24 14:53 [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl Andrew Lunn
                   ` (4 preceding siblings ...)
  2012-10-24 14:53 ` [PATCH 5/9] ARM: Kirkwood: Convert dreamplug " Andrew Lunn
@ 2012-10-24 14:53 ` Andrew Lunn
  2012-10-26 17:28   ` Josh Coombs
  2012-10-28 14:31   ` Josh Coombs
  2012-10-24 14:53 ` [PATCH 7/9] ARM: Kirkwood: Convert ib62x0 " Andrew Lunn
                   ` (5 subsequent siblings)
  11 siblings, 2 replies; 58+ messages in thread
From: Andrew Lunn @ 2012-10-24 14:53 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/kirkwood-goflexnet.dts |   57 ++++++++++++++++++++++++++++++
 arch/arm/mach-kirkwood/board-goflexnet.c |   18 ----------
 2 files changed, 57 insertions(+), 18 deletions(-)

diff --git a/arch/arm/boot/dts/kirkwood-goflexnet.dts b/arch/arm/boot/dts/kirkwood-goflexnet.dts
index 7c8238f..46d16a2 100644
--- a/arch/arm/boot/dts/kirkwood-goflexnet.dts
+++ b/arch/arm/boot/dts/kirkwood-goflexnet.dts
@@ -16,6 +16,63 @@
 	};
 
 	ocp at f1000000 {
+		pinctrl: pinctrl at 10000 {
+			compatible = "marvell,88f6281-pinctrl";
+			reg = <0x10000 0x20>;
+
+			pinctrl-0 = < &pmx_usb_power_enable &pmx_led_orange
+				      &pmx_led_left_cap_0 &pmx_led_left_cap_1
+				      &pmx_led_left_cap_2 &pmx_led_left_cap_3
+				      &pmx_led_right_cap_0 &pmx_led_right_cap_1
+				      &pmx_led_right_cap_2 &pmx_led_right_cap_3
+				    >;
+			pinctrl-names = "default";
+
+			pmx_usb_power_enable: pmx-usb-power-enable {
+				marvell,pins = "mpp29";
+				marvell,function = "gpio";
+			};
+			pmx_led_right_cap_0: pmx-led_right_cap_0 {
+				marvell,pins = "mpp38";
+				marvell,function = "gpio";
+			};
+			pmx_led_right_cap_1: pmx-led_right_cap_1 {
+				marvell,pins = "mpp39";
+				marvell,function = "gpio";
+			};
+			pmx_led_right_cap_2: pmx-led_right_cap_2 {
+				marvell,pins = "mpp40";
+				marvell,function = "gpio";
+			};
+			pmx_led_right_cap_3: pmx-led_right_cap_3 {
+				marvell,pins = "mpp41";
+				marvell,function = "gpio";
+			};
+			pmx_led_left_cap_0: pmx-led_left_cap_0 {
+				marvell,pins = "mpp42";
+				marvell,function = "gpio";
+			};
+			pmx_led_left_cap_1: pmx-led_left_cap_1 {
+				marvell,pins = "mpp43";
+				marvell,function = "gpio";
+			};
+			pmx_led_left_cap_2: pmx-led_left_cap_2 {
+				marvell,pins = "mpp44";
+				marvell,function = "gpio";
+			};
+			pmx_led_left_cap_3: pmx-led_left_cap_3 {
+				marvell,pins = "mpp45";
+				marvell,function = "gpio";
+			};
+			pmx_led_green: pmx-led_green {
+				marvell,pins = "mpp46";
+				marvell,function = "gpio";
+			};
+			pmx_led_orange: pmx-led_orange {
+				marvell,pins = "mpp47";
+				marvell,function = "gpio";
+			};
+		};
 		serial at 12000 {
 			clock-frequency = <200000000>;
 			status = "ok";
diff --git a/arch/arm/mach-kirkwood/board-goflexnet.c b/arch/arm/mach-kirkwood/board-goflexnet.c
index 001ca8c..9643f4b 100644
--- a/arch/arm/mach-kirkwood/board-goflexnet.c
+++ b/arch/arm/mach-kirkwood/board-goflexnet.c
@@ -34,34 +34,16 @@
 #include <mach/bridge-regs.h>
 #include <linux/platform_data/mmc-mvsdio.h>
 #include "common.h"
-#include "mpp.h"
 
 static struct mv643xx_eth_platform_data goflexnet_ge00_data = {
 	.phy_addr	= MV643XX_ETH_PHY_ADDR(0),
 };
 
-static unsigned int goflexnet_mpp_config[] __initdata = {
-	MPP29_GPIO,	/* USB Power Enable */
-	MPP47_GPIO,	/* LED Orange */
-	MPP46_GPIO,	/* LED Green */
-	MPP45_GPIO,	/* LED Left Capacity 3 */
-	MPP44_GPIO,	/* LED Left Capacity 2 */
-	MPP43_GPIO,	/* LED Left Capacity 1 */
-	MPP42_GPIO,	/* LED Left Capacity 0 */
-	MPP41_GPIO,	/* LED Right Capacity 3 */
-	MPP40_GPIO,	/* LED Right Capacity 2 */
-	MPP39_GPIO,	/* LED Right Capacity 1 */
-	MPP38_GPIO,	/* LED Right Capacity 0 */
-	0
-};
-
 void __init goflexnet_init(void)
 {
 	/*
 	 * Basic setup. Needs to be called early.
 	 */
-	kirkwood_mpp_conf(goflexnet_mpp_config);
-
 	if (gpio_request(29, "USB Power Enable") != 0 ||
 	    gpio_direction_output(29, 1) != 0)
 		pr_err("can't setup GPIO 29 (USB Power Enable)\n");
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 7/9] ARM: Kirkwood: Convert ib62x0 to pinctrl.
  2012-10-24 14:53 [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl Andrew Lunn
                   ` (5 preceding siblings ...)
  2012-10-24 14:53 ` [PATCH 6/9] ARM: Kirkwood: Convert GoFlex Net " Andrew Lunn
@ 2012-10-24 14:53 ` Andrew Lunn
  2012-10-24 20:40   ` Simon Baatz
  2012-10-24 14:53 ` [PATCH 8/9] ARM: Kirkwood: Convert lsxl boards " Andrew Lunn
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 58+ messages in thread
From: Andrew Lunn @ 2012-10-24 14:53 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/kirkwood-ib62x0.dts |   41 +++++++++++++++++++++++++++++++++
 arch/arm/mach-kirkwood/board-ib62x0.c |   21 -----------------
 2 files changed, 41 insertions(+), 21 deletions(-)

diff --git a/arch/arm/boot/dts/kirkwood-ib62x0.dts b/arch/arm/boot/dts/kirkwood-ib62x0.dts
index 66794ed..713b39b 100644
--- a/arch/arm/boot/dts/kirkwood-ib62x0.dts
+++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts
@@ -16,6 +16,47 @@
 	};
 
 	ocp at f1000000 {
+		pinctrl: pinctrl at 10000 {
+			compatible = "marvell,88f6281-pinctrl";
+			reg = <0x10000 0x20>;
+
+			pinctrl-0 = < &pmx_nand
+				      &pmx_led_os_red &pmx_power_off
+				      &pmx_led_os_green &pmx_led_usb_transfer
+				      &pmx_button_reset &pmx_button_usb_copy >;
+			pinctrl-names = "default";
+
+			pmx_nand: pmx-nand {
+				marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3",
+					       "mpp04", "mpp5", "mpp18",
+					       "mpp19";
+				marvell,function = "nand";
+			};
+			pmx_led_os_red: pmx-led-os-red {
+				marvell,pins = "mpp22";
+				marvell,function = "gpio";
+			};
+			pmx_power_off: pmx-power-off {
+				marvell,pins = "mpp24";
+				marvell,function = "gpio";
+			};
+			pmx_led_os_green: pmx-led-os-green {
+				marvell,pins = "mpp25";
+				marvell,function = "gpio";
+			};
+			pmx_led_usb_transfer: pmx-led-usb-transfer {
+				marvell,pins = "mpp27";
+				marvell,function = "gpio";
+			};
+			pmx_button_reset: pmx-button-reset {
+				marvell,pins = "mpp28";
+				marvell,function = "gpio";
+			};
+			pmx_button_usb_copy: pmx-button-usb-copy {
+				marvell,pins = "mpp29";
+				marvell,function = "gpio";
+			};
+		};
 		serial at 12000 {
 			clock-frequency = <200000000>;
 			status = "okay";
diff --git a/arch/arm/mach-kirkwood/board-ib62x0.c b/arch/arm/mach-kirkwood/board-ib62x0.c
index cfc47f8..1b2a4a4 100644
--- a/arch/arm/mach-kirkwood/board-ib62x0.c
+++ b/arch/arm/mach-kirkwood/board-ib62x0.c
@@ -23,7 +23,6 @@
 #include <asm/mach/arch.h>
 #include <mach/kirkwood.h>
 #include "common.h"
-#include "mpp.h"
 
 #define IB62X0_GPIO_POWER_OFF	24
 
@@ -31,24 +30,6 @@ static struct mv643xx_eth_platform_data ib62x0_ge00_data = {
 	.phy_addr	= MV643XX_ETH_PHY_ADDR(8),
 };
 
-static unsigned int ib62x0_mpp_config[] __initdata = {
-	MPP0_NF_IO2,
-	MPP1_NF_IO3,
-	MPP2_NF_IO4,
-	MPP3_NF_IO5,
-	MPP4_NF_IO6,
-	MPP5_NF_IO7,
-	MPP18_NF_IO0,
-	MPP19_NF_IO1,
-	MPP22_GPIO,	/* OS LED red */
-	MPP24_GPIO,	/* Power off device */
-	MPP25_GPIO,	/* OS LED green */
-	MPP27_GPIO,	/* USB transfer LED */
-	MPP28_GPIO,	/* Reset button */
-	MPP29_GPIO,	/* USB Copy button */
-	0
-};
-
 static void ib62x0_power_off(void)
 {
 	gpio_set_value(IB62X0_GPIO_POWER_OFF, 1);
@@ -59,8 +40,6 @@ void __init ib62x0_init(void)
 	/*
 	 * Basic setup. Needs to be called early.
 	 */
-	kirkwood_mpp_conf(ib62x0_mpp_config);
-
 	kirkwood_ehci_init();
 	kirkwood_ge00_init(&ib62x0_ge00_data);
 	if (gpio_request(IB62X0_GPIO_POWER_OFF, "ib62x0:power:off") == 0 &&
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 8/9] ARM: Kirkwood: Convert lsxl boards to pinctrl.
  2012-10-24 14:53 [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl Andrew Lunn
                   ` (6 preceding siblings ...)
  2012-10-24 14:53 ` [PATCH 7/9] ARM: Kirkwood: Convert ib62x0 " Andrew Lunn
@ 2012-10-24 14:53 ` Andrew Lunn
  2012-10-24 20:37   ` Michael Walle
  2012-10-28 16:40   ` Michael Walle
  2012-10-24 14:53 ` [PATCH 9/9] ARM: Kirkwood: Convert IX2-200 " Andrew Lunn
                   ` (3 subsequent siblings)
  11 siblings, 2 replies; 58+ messages in thread
From: Andrew Lunn @ 2012-10-24 14:53 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/kirkwood-lsxl.dtsi |   67 ++++++++++++++++++++++++++++++++++
 arch/arm/mach-kirkwood/board-lsxl.c  |   19 ----------
 2 files changed, 67 insertions(+), 19 deletions(-)

diff --git a/arch/arm/boot/dts/kirkwood-lsxl.dtsi b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
index 8fea375..01d6e3a 100644
--- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi
+++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
@@ -6,6 +6,73 @@
 	};
 
 	ocp at f1000000 {
+		pinctrl: pinctrl at 10000 {
+			compatible = "marvell,88f6281-pinctrl";
+			reg = <0x10000 0x20>;
+
+			pinctrl-0 = < &pmx_power_hdd &pmx_usb_vbus
+				      &pmx_fan_low &pmx_fan_high
+				      &pmx_led_function_red &pmx_led_alarm
+				      &pmx_led_info &pmx_led_power
+				      &pmx_fan_lock &pmx_button_function
+				      &pmx_power_switch &pmx_power_auto_switch
+				      &pmx_led_function_blue >;
+			pinctrl-names = "default";
+
+			pmx_power_hdd: pmx-power-hdd {
+				marvell,pins = "mpp10";
+				marvell,function = "gpio";
+			};
+			pmx_usb_vbus: pmx-usb-vbus {
+				marvell,pins = "mpp11";
+				marvell,function = "gpio";
+			};
+			pmx_fan_high: pmx-fan-high {
+				marvell,pins = "mpp18";
+				marvell,function = "gpo";
+			};
+			pmx_fan_low: pmx-fan-low {
+				marvell,pins = "mpp19";
+				marvell,function = "gpo";
+			};
+			pmx_led_function_blue: pmx-led-function-blue {
+				marvell,pins = "mpp36";
+				marvell,function = "gpio";
+			};
+			pmx_led_alarm: pmx-led-alarm {
+				marvell,pins = "mpp37";
+				marvell,function = "gpio";
+			};
+			pmx_led_info: pmx-led-info {
+				marvell,pins = "mpp38";
+				marvell,function = "gpio";
+			};
+			pmx_led_power: pmx-led-power {
+				marvell,pins = "mpp39";
+				marvell,function = "gpio";
+			};
+			pmx_fan_lock: pmx-fan-lock {
+				marvell,pins = "mpp40";
+				marvell,function = "gpo";
+			};
+			pmx_button_function: pmx-button-function {
+				marvell,pins = "mpp41";
+				marvell,function = "gpio";
+			};
+			pmx_power_switch: pmx-power-switch {
+				marvell,pins = "mpp42";
+				marvell,function = "gpio";
+			};
+			pmx_power_auto_switch: pmx-power-auto-switch {
+				marvell,pins = "mpp43";
+				marvell,function = "gpio";
+			};
+			pmx_led_function_red: pmx-led-function_red {
+				marvell,pins = "mpp43";
+				marvell,function = "gpio";
+			};
+
+		};
 		sata at 80000 {
 			status = "okay";
 			nr-ports = <1>;
diff --git a/arch/arm/mach-kirkwood/board-lsxl.c b/arch/arm/mach-kirkwood/board-lsxl.c
index 83d8975..868bdb0 100644
--- a/arch/arm/mach-kirkwood/board-lsxl.c
+++ b/arch/arm/mach-kirkwood/board-lsxl.c
@@ -26,7 +26,6 @@
 #include <asm/mach/arch.h>
 #include <mach/kirkwood.h>
 #include "common.h"
-#include "mpp.h"
 
 static struct mv643xx_eth_platform_data lsxl_ge00_data = {
 	.phy_addr	= MV643XX_ETH_PHY_ADDR(0),
@@ -36,23 +35,6 @@ static struct mv643xx_eth_platform_data lsxl_ge01_data = {
 	.phy_addr	= MV643XX_ETH_PHY_ADDR(8),
 };
 
-static unsigned int lsxl_mpp_config[] __initdata = {
-	MPP10_GPO,	/* HDD Power Enable */
-	MPP11_GPIO,	/* USB Vbus Enable */
-	MPP18_GPO,	/* FAN High Enable# */
-	MPP19_GPO,	/* FAN Low Enable# */
-	MPP36_GPIO,	/* Function Blue LED */
-	MPP37_GPIO,	/* Alarm LED */
-	MPP38_GPIO,	/* Info LED */
-	MPP39_GPIO,	/* Power LED */
-	MPP40_GPIO,	/* Fan Lock */
-	MPP41_GPIO,	/* Function Button */
-	MPP42_GPIO,	/* Power Switch */
-	MPP43_GPIO,	/* Power Auto Switch */
-	MPP48_GPIO,	/* Function Red LED */
-	0
-};
-
 #define LSXL_GPIO_FAN_HIGH	18
 #define LSXL_GPIO_FAN_LOW	19
 #define LSXL_GPIO_FAN_LOCK	40
@@ -119,7 +101,6 @@ void __init lsxl_init(void)
 	/*
 	 * Basic setup. Needs to be called early.
 	 */
-	kirkwood_mpp_conf(lsxl_mpp_config);
 
 	/* usb and sata power on */
 	gpio_set_value(LSXL_GPIO_USB_POWER, 1);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 9/9] ARM: Kirkwood: Convert IX2-200 to pinctrl.
  2012-10-24 14:53 [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl Andrew Lunn
                   ` (7 preceding siblings ...)
  2012-10-24 14:53 ` [PATCH 8/9] ARM: Kirkwood: Convert lsxl boards " Andrew Lunn
@ 2012-10-24 14:53 ` Andrew Lunn
  2012-10-24 20:04   ` Thomas Petazzoni
  2012-10-24 15:29 ` [PATCH 0/9] ARM: Kirkwood: Convert " Josh Coombs
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 58+ messages in thread
From: Andrew Lunn @ 2012-10-24 14:53 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts |   90 +++++++++++++++++++++++++
 arch/arm/mach-kirkwood/board-iomega_ix2_200.c |   24 -------
 2 files changed, 90 insertions(+), 24 deletions(-)

diff --git a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
index 865aeec..d8fa8e8 100644
--- a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
+++ b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
@@ -16,6 +16,96 @@
 	};
 
 	ocp at f1000000 {
+		pinctrl: pinctrl at 10000 {
+			compatible = "marvell,88f6281-pinctrl";
+			reg = <0x10000 0x20>;
+
+			pinctrl-0 = < &pmx_button_reset &pmx_button_power
+				      &pmx_led_backup &pmx_led_power
+				      &pmx_button_otb &pmx_led_rebuild
+				      &pmx_led_health
+				      &pmx_led_sata_brt_ctrl_1
+				      &pmx_led_sata_brt_ctrl_2
+				      &pmx_led_backup_brt_ctrl_1
+				      &pmx_led_backup_brt_ctrl_2
+				      &pmx_led_power_brt_ctrl_1
+				      &pmx_led_power_brt_ctrl_2
+				      &pmx_led_health_brt_ctrl_1
+				      &pmx_led_health_brt_ctrl_2
+				      &pmx_led_rebuild_brt_ctrl_1
+				      &pmx_led_rebuild_brt_ctrl_2 >;
+			pinctrl-names = "default";
+
+			pmx_button_reset: pmx-button-reset {
+				marvell,pins = "mpp12";
+				marvell,function = "gpio";
+			};
+			pmx_button_power: pmx-button-power {
+				marvell,pins = "mpp14";
+				marvell,function = "gpio";
+			};
+			pmx_led_backup: pmx-led-backup {
+				marvell,pins = "mpp15";
+				marvell,function = "gpio";
+			};
+			pmx_led_power: pmx-led-power {
+				marvell,pins = "mpp16";
+				marvell,function = "gpio";
+			};
+			pmx_button_otb: pmx-button-otb {
+				marvell,pins = "mpp35";
+				marvell,function = "gpio";
+			};
+			pmx_led_rebuild: pmx-led-rebuild {
+				marvell,pins = "mpp36";
+				marvell,function = "gpio";
+			};
+			pmx_led_health: pmx-led_health {
+				marvell,pins = "mpp37";
+				marvell,function = "gpio";
+			};
+			pmx_led_sata_brt_ctrl_1: pmx-led-sata-brt-ctrl-1 {
+				marvell,pins = "mpp38";
+				marvell,function = "gpio";
+			};
+			pmx_led_sata_brt_ctrl_2: pmx-led-sata-brt-ctrl-2 {
+				marvell,pins = "mpp39";
+				marvell,function = "gpio";
+			};
+			pmx_led_backup_brt_ctrl_1: pmx-led-backup-brt-ctrl-1 {
+				marvell,pins = "mpp40";
+				marvell,function = "gpio";
+			};
+			pmx_led_backup_brt_ctrl_2: pmx-led-backup-brt-ctrl-2 {
+				marvell,pins = "mpp41";
+				marvell,function = "gpio";
+			};
+			pmx_led_power_brt_ctrl_1: pmx-led-power-brt-ctrl-1 {
+				marvell,pins = "mpp42";
+				marvell,function = "gpio";
+			};
+			pmx_led_power_brt_ctrl_2: pmx-led-power-brt-ctrl-2 {
+				marvell,pins = "mpp43";
+				marvell,function = "gpio";
+			};
+			pmx_led_health_brt_ctrl_1: pmx-led-health-brt-ctrl-1 {
+				marvell,pins = "mpp44";
+				marvell,function = "gpio";
+			};
+			pmx_led_health_brt_ctrl_2: pmx-led-health-brt-ctrl-2 {
+				marvell,pins = "mpp45";
+				marvell,function = "gpio";
+			};
+			pmx_led_rebuild_brt_ctrl_1: pmx-led-rebuild-brt-ctrl-1 {
+				marvell,pins = "mpp44";
+				marvell,function = "gpio";
+			};
+			pmx_led_rebuild_brt_ctrl_2: pmx-led-rebuild-brt-ctrl-2 {
+				marvell,pins = "mpp45";
+				marvell,function = "gpio";
+			};
+
+		};
 		i2c at 11000 {
 			status = "okay";
 
diff --git a/arch/arm/mach-kirkwood/board-iomega_ix2_200.c b/arch/arm/mach-kirkwood/board-iomega_ix2_200.c
index 158fb97..c144712 100644
--- a/arch/arm/mach-kirkwood/board-iomega_ix2_200.c
+++ b/arch/arm/mach-kirkwood/board-iomega_ix2_200.c
@@ -15,7 +15,6 @@
 #include <linux/ethtool.h>
 #include <mach/kirkwood.h>
 #include "common.h"
-#include "mpp.h"
 
 static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = {
 	.phy_addr       = MV643XX_ETH_PHY_NONE,
@@ -23,34 +22,11 @@ static struct mv643xx_eth_platform_data iomega_ix2_200_ge00_data = {
 	.duplex         = DUPLEX_FULL,
 };
 
-static unsigned int iomega_ix2_200_mpp_config[] __initdata = {
-	MPP12_GPIO,			/* Reset Button */
-	MPP14_GPIO,			/* Power Button */
-	MPP15_GPIO,			/* Backup LED (blue) */
-	MPP16_GPIO,			/* Power LED (white) */
-	MPP35_GPIO,			/* OTB Button */
-	MPP36_GPIO,			/* Rebuild LED (white) */
-	MPP37_GPIO,			/* Health LED (red) */
-	MPP38_GPIO,			/* SATA LED brightness control 1 */
-	MPP39_GPIO,			/* SATA LED brightness control 2 */
-	MPP40_GPIO,			/* Backup LED brightness control 1 */
-	MPP41_GPIO,			/* Backup LED brightness control 2 */
-	MPP42_GPIO,			/* Power LED brightness control 1 */
-	MPP43_GPIO,			/* Power LED brightness control 2 */
-	MPP44_GPIO,			/* Health LED brightness control 1 */
-	MPP45_GPIO,			/* Health LED brightness control 2 */
-	MPP46_GPIO,			/* Rebuild LED brightness control 1 */
-	MPP47_GPIO,			/* Rebuild LED brightness control 2 */
-	0
-};
-
 void __init iomega_ix2_200_init(void)
 {
 	/*
 	 * Basic setup. Needs to be called early.
 	 */
-	kirkwood_mpp_conf(iomega_ix2_200_mpp_config);
-
 	kirkwood_ehci_init();
 
 	kirkwood_ge01_init(&iomega_ix2_200_ge00_data);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-24 14:53 [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl Andrew Lunn
                   ` (8 preceding siblings ...)
  2012-10-24 14:53 ` [PATCH 9/9] ARM: Kirkwood: Convert IX2-200 " Andrew Lunn
@ 2012-10-24 15:29 ` Josh Coombs
  2012-10-24 15:35   ` Andrew Lunn
  2012-10-24 18:06 ` Michael Walle
  2012-10-28 16:57 ` Andrew Lunn
  11 siblings, 1 reply; 58+ messages in thread
From: Josh Coombs @ 2012-10-24 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

Andrew, are there any required kernel config changes to go along with
this?  I didn't see any updates to the default configs in the patches
so I want to make sure I'm testing with the right options enabled.

Josh C

On Wed, Oct 24, 2012 at 10:53 AM, Andrew Lunn <andrew@lunn.ch> wrote:
> This patchset converts all DT kirkwood boards to using pinctrl.
>
> This patchset depends on an earlier patchset to allow the mvebu
> pinctrl driver and gpio driver to be built for kirkwood.
>
> Only the TS219 conversion has been tested on hardware. The remaining
> are compile tested. Before merging upstream, it would be good if the
> others could be tested on hardware.
>
> This series along with the dependents can be found in:
>
> git://github.com/lunn/linux.git v3.7-rc2-pinctrl
>
> Andrew Lunn (9):
>   ARM: Kirkwood: Convert TS219 to pinctrl.
>   ARM: Kirkwood: Convert iConnect to pinctrl.
>   ARM: Kirkwood: Convert dnskw to pinctrl
>   ARM: Kirkwood: Convert dockstar to pinctrl.
>   ARM: Kirkwood: Convert dreamplug to pinctrl.
>   ARM: Kirkwood: Convert GoFlex Net to pinctrl.
>   ARM: Kirkwood: Convert ib62x0 to pinctrl.
>   ARM: Kirkwood: Convert lsxl boards to pinctrl.
>   ARM: Kirkwood: Convert IX2-200 to pinctrl.
>
>  arch/arm/boot/dts/kirkwood-dnskw.dtsi         |  136 +++++++++++++++++++++++++
>  arch/arm/boot/dts/kirkwood-dockstar.dts       |   21 ++++
>  arch/arm/boot/dts/kirkwood-dreamplug.dts      |   26 +++++
>  arch/arm/boot/dts/kirkwood-goflexnet.dts      |   57 +++++++++++
>  arch/arm/boot/dts/kirkwood-ib62x0.dts         |   41 ++++++++
>  arch/arm/boot/dts/kirkwood-iconnect.dts       |   52 ++++++++++
>  arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts |   90 ++++++++++++++++
>  arch/arm/boot/dts/kirkwood-lsxl.dtsi          |   67 ++++++++++++
>  arch/arm/boot/dts/kirkwood-ts219-6281.dts     |   56 ++++++++++
>  arch/arm/boot/dts/kirkwood-ts219-6282.dts     |   56 ++++++++++
>  arch/arm/mach-kirkwood/board-dnskw.c          |   37 -------
>  arch/arm/mach-kirkwood/board-dockstar.c       |   10 --
>  arch/arm/mach-kirkwood/board-dreamplug.c      |   14 ---
>  arch/arm/mach-kirkwood/board-goflexnet.c      |   18 ----
>  arch/arm/mach-kirkwood/board-ib62x0.c         |   21 ----
>  arch/arm/mach-kirkwood/board-iconnect.c       |   17 ----
>  arch/arm/mach-kirkwood/board-iomega_ix2_200.c |   24 -----
>  arch/arm/mach-kirkwood/board-lsxl.c           |   19 ----
>  arch/arm/mach-kirkwood/board-ts219.c          |   25 -----
>  19 files changed, 602 insertions(+), 185 deletions(-)
>
> --
> 1.7.10.4
>

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-24 15:29 ` [PATCH 0/9] ARM: Kirkwood: Convert " Josh Coombs
@ 2012-10-24 15:35   ` Andrew Lunn
  2012-10-24 19:26     ` Thomas Petazzoni
  0 siblings, 1 reply; 58+ messages in thread
From: Andrew Lunn @ 2012-10-24 15:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 24, 2012 at 11:29:08AM -0400, Josh Coombs wrote:
> Andrew, are there any required kernel config changes to go along with
> this?  I didn't see any updates to the default configs in the patches
> so I want to make sure I'm testing with the right options enabled.

Hi Josh

I've been testing with is:

make kirkwood_defconfig
make 

The _defconfig file now contains all boards and should build most
common drivers to get the boards booted. If something critical is
missing for your boards, please let us known and we will add it to
_defconfig.

    Andrew

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-24 14:53 [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl Andrew Lunn
                   ` (9 preceding siblings ...)
  2012-10-24 15:29 ` [PATCH 0/9] ARM: Kirkwood: Convert " Josh Coombs
@ 2012-10-24 18:06 ` Michael Walle
  2012-10-24 20:01   ` Andrew Lunn
  2012-10-28 16:57 ` Andrew Lunn
  11 siblings, 1 reply; 58+ messages in thread
From: Michael Walle @ 2012-10-24 18:06 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Andrew,

Am Mittwoch 24 Oktober 2012, 16:53:45 schrieb Andrew Lunn:
> This patchset converts all DT kirkwood boards to using pinctrl.
> 
> This patchset depends on an earlier patchset to allow the mvebu
> pinctrl driver and gpio driver to be built for kirkwood.
> 
> Only the TS219 conversion has been tested on hardware. The remaining
> are compile tested. Before merging upstream, it would be good if the
> others could be tested on hardware.
> 
> This series along with the dependents can be found in:

Unfortunately, this doesn't work for me. git bisect tells me its commit 
e01139ec82162f21875d09e820686aede4219695.

I guess it has something to do with the lsxl_init calling gpio_set_value().


Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0
Linux version 3.7.0-rc2-00015-g2773c33 (mw at thanatos) (gcc version 4.4.5 
(Debian 4.4.5-8) ) #8 PREEMPT Wed Oct 24 20:05:32 CEST 2012
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
CPU: VIVT data cache, VIVT instruction cache
Machine: Marvell Kirkwood (Flattened Device Tree), model: Buffalo Linkstation 
LS-CHLv2
bootconsole [earlycon0] enabled
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttyS0,115200 root=/dev/sda2 earlyprintk
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 55828k/55828k available, 9708k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc04e2660   (4970 kB)
      .init : 0xc04e3000 - 0xc0506cc0   ( 144 kB)
      .data : 0xc0508000 - 0xc0540280   ( 225 kB)
       .bss : 0xc05402a4 - 0xc05d7a3c   ( 606 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:114
sched_clock: 32 bits at 166MHz, resolution 5ns, wraps every 25769ms
Console: colour dummy device 80x30
Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x3baaa8 - 0x3baae4
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 1024 KiB pool for atomic coherent allocations
Kirkwood: MV88F6281-A1, TCLK=166666667.
Feroceon L2: Enabling L2
Feroceon L2: Cache support initialised.
Unable to handle kernel NULL pointer dereference at virtual address 0000003c
pgd = c0004000
[0000003c] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT ARM
Modules linked in:
CPU: 0    Not tainted  (3.7.0-rc2-00015-g2773c33 #8)
PC is at __gpio_set_value+0x20/0xb4
LR is at lsxl_init+0x14/0x58
pc : [<c01ab75c>]    lr : [<c04e99d0>]    psr: 20000053
sp : c342ff20  ip : 00000000  fp : 00000000
r10: 00000089  r9 : c0506878  r8 : c04e4498
r7 : 00000000  r6 : c05cea18  r5 : 00000000  r4 : 0000000b
r3 : 00000084  r2 : 00000001  r1 : 00000001  r0 : 0000000b
Flags: nzCv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
Control: 0005397f  Table: 00004000  DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc342e1b8)
Stack: (0xc342ff20 to 0xc3430000)
ff20: 00000037 c3b5508c c0516230 00000004 c05402c0 c04e99d0 c05005f8 c04e9640
ff40: c05005f8 c04e44b4 c05005f8 c0008614 00000003 00000003 00000000 c05005f8
ff60: c05005f8 00000004 c05402c0 c0500610 c04e31b0 00000089 00000000 c03ab064
ff80: 00000003 00000003 c04e31b0 c03aaf74 00000000 c03aaf74 00000000 00000000
ffa0: 00000000 00000000 00000000 c0008dd0 00000000 00000000 00000000 00000000
ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[<c01ab75c>] (__gpio_set_value+0x20/0xb4) from [<c04e99d0>] 
(lsxl_init+0x14/0x58)
[<c04e99d0>] (lsxl_init+0x14/0x58) from [<c04e9640>] 
(kirkwood_dt_init+0xe4/0x158)
[<c04e9640>] (kirkwood_dt_init+0xe4/0x158) from [<c04e44b4>] 
(customize_machine+0x1c/0x28)
[<c04e44b4>] (customize_machine+0x1c/0x28) from [<c0008614>] 
(do_one_initcall+0x30/0x174)
[<c0008614>] (do_one_initcall+0x30/0x174) from [<c03ab064>] 
(kernel_init+0xf0/0x2a0)
[<c03ab064>] (kernel_init+0xf0/0x2a0) from [<c0008dd0>] 
(ret_from_fork+0x14/0x24)
Code: e24dd008 e1a04000 e7965003 e1a02001 (e5d5303c) 
---[ end trace 1b75b31a2719ed1c ]---
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b



-- 
Michael

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-24 15:35   ` Andrew Lunn
@ 2012-10-24 19:26     ` Thomas Petazzoni
  0 siblings, 0 replies; 58+ messages in thread
From: Thomas Petazzoni @ 2012-10-24 19:26 UTC (permalink / raw)
  To: linux-arm-kernel

Andrew,

On Wed, 24 Oct 2012 17:35:02 +0200, Andrew Lunn wrote:

> I've been testing with is:
> 
> make kirkwood_defconfig
> make 
> 
> The _defconfig file now contains all boards and should build most
> common drivers to get the boards booted. If something critical is
> missing for your boards, please let us known and we will add it to
> _defconfig.

Are you sure you don't need to add a

	select PINCTRL

in the CONFIG_ARCH_KIRKWOOD symbol?

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/9] ARM: Kirkwood: Convert TS219 to pinctrl.
  2012-10-24 14:53 ` [PATCH 1/9] ARM: Kirkwood: Convert TS219 " Andrew Lunn
@ 2012-10-24 19:31   ` Thomas Petazzoni
  2012-10-24 19:49     ` Sebastian Hesselbarth
  0 siblings, 1 reply; 58+ messages in thread
From: Thomas Petazzoni @ 2012-10-24 19:31 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Andrew Lunn,

On Wed, 24 Oct 2012 16:53:46 +0200, Andrew Lunn wrote:

> +			pinctrl-0 = < &pmx_uart0 &pmx_uart1 &pmx_spi
> +				      &pmx_twsi0 &pmx_sata0 &pmx_sata1
> +				      &pmx_ram_size &pmx_reset_button
> +				      &pmx_USB_copy_button &pmx_board_id>;

It would be really better to have those under each device, rather than
globally declared here. For some devices such as UARTs, it is not yet
possible with the 8250 driver to associate pinctrl pins (but I'm
planning to work on that soon). However for the other drivers (SPI,
TWSI, SATA, button), it should be possible.

> +			pinctrl-names = "default";
> +
> +			pmx_uart0: pmx-uart0 {
> +				marvell,pins = "mpp10", "mpp11";
> +				marvell,function = "uart0";
> +			};
> +			pmx_uart1: pmx-uart1 {
> +				marvell,pins = "mpp13", "mpp14";
> +				marvell,function = "uart1";
> +			};
> +			pmx_spi: pmx-spi {
> +				marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3";
> +				marvell,function = "spi";
> +			};
> +			pmx_twsi0: pmx-twsi0 {
> +				marvell,pins = "mpp8", "mpp9";
> +				marvell,function = "twsi0";
> +			};
> +			pmx_sata0: pmx-sata0 {
> +				marvell,pins = "mpp5", "mpp21", "mpp23";
> +				marvell,function = "sata0";
> +			};
> +			pmx_sata1: pmx-sata1 {
> +				marvell,pins = "mpp4", "mpp20", "mpp22";
> +				marvell,function = "sata1";
> +			};

All those definitions are not board specific, they are common to the
SoC. So they should be in the corresponding .dtsi file.

Basically:

 * The SoC .dtsi file should define all the pinmux groups that are
   described in the datasheet and are used by boards. I.e, there may be
   conflicting groups defined, where one group configures pin X with
   function Y, while another group configures pin X with function Z.

 * The board .dts file should define the pinmux groups that are really
   board-specific (buttons, LEDs, etc.), and then for each device,
   point to the correct pinmux group (either defined in the .dtsi file
   or in the board file).

See for example imx28.dtsi, and then the boards such as
imx28-cfa10036.dts, imx28-evk.dts, imx28-m28evk.dts, imx28-tx28.dts.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/9] ARM: Kirkwood: Convert TS219 to pinctrl.
  2012-10-24 19:31   ` Thomas Petazzoni
@ 2012-10-24 19:49     ` Sebastian Hesselbarth
  2012-10-24 20:00       ` Thomas Petazzoni
  0 siblings, 1 reply; 58+ messages in thread
From: Sebastian Hesselbarth @ 2012-10-24 19:49 UTC (permalink / raw)
  To: linux-arm-kernel

On 10/24/2012 09:31 PM, Thomas Petazzoni wrote:
> Dear Andrew Lunn,
>
> On Wed, 24 Oct 2012 16:53:46 +0200, Andrew Lunn wrote:
>
>> +			pinctrl-0 =<  &pmx_uart0&pmx_uart1&pmx_spi
>> +				&pmx_twsi0&pmx_sata0&pmx_sata1
>> +				&pmx_ram_size&pmx_reset_button
>> +				&pmx_USB_copy_button&pmx_board_id>;
>
> It would be really better to have those under each device, rather than
> globally declared here. For some devices such as UARTs, it is not yet
> possible with the 8250 driver to associate pinctrl pins (but I'm
> planning to work on that soon). However for the other drivers (SPI,
> TWSI, SATA, button), it should be possible.

Thomas,

Agree, but for now a global pinhog on pinctrl node itself is the correct
way to go here. As soon as there is pinctrl support in the specific
device drivers we can move pinmux phandle there.

>> +			pmx_uart0: pmx-uart0 {
>> +				marvell,pins = "mpp10", "mpp11";
>> +				marvell,function = "uart0";
>> +			};
 >> ...
>
> All those definitions are not board specific, they are common to the
> SoC. So they should be in the corresponding .dtsi file.
>
> Basically:
>
>   * The SoC .dtsi file should define all the pinmux groups that are
>     described in the datasheet and are used by boards. I.e, there may be
>     conflicting groups defined, where one group configures pin X with
>     function Y, while another group configures pin X with function Z.

Here I disagree. Even quite simple interfaces like uart can have dozens
of possible mpp configurations, e.g. rx/tx on up to three different pins
each plus rts/cts on various pins plus all possible combinations.

Now consider some more complex interface with more than one mpp pin per
interface pin. Do you really want to predefine all possible combinations
even if it is more likely that in fact only one is used on all boards
because they are all based on the same reference design?

>   * The board .dts file should define the pinmux groups that are really
>     board-specific (buttons, LEDs, etc.), and then for each device,
>     point to the correct pinmux group (either defined in the .dtsi file
>     or in the board file).

With respect to mpp the actual configuration _is_ board specific. There
are maybe only some pins that are always used if a specific interface is
used, e.g. nand pins on dove can only be switched with gpio.

Sebastian

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/9] ARM: Kirkwood: Convert TS219 to pinctrl.
  2012-10-24 19:49     ` Sebastian Hesselbarth
@ 2012-10-24 20:00       ` Thomas Petazzoni
  2012-10-24 20:04         ` Andrew Lunn
  2012-10-24 20:14         ` Sebastian Hesselbarth
  0 siblings, 2 replies; 58+ messages in thread
From: Thomas Petazzoni @ 2012-10-24 20:00 UTC (permalink / raw)
  To: linux-arm-kernel

Sebastian,

On Wed, 24 Oct 2012 21:49:45 +0200, Sebastian Hesselbarth wrote:

> Agree, but for now a global pinhog on pinctrl node itself is the correct
> way to go here. As soon as there is pinctrl support in the specific
> device drivers we can move pinmux phandle there.

I agree.

> Here I disagree. Even quite simple interfaces like uart can have dozens
> of possible mpp configurations, e.g. rx/tx on up to three different pins
> each plus rts/cts on various pins plus all possible combinations.
> 
> Now consider some more complex interface with more than one mpp pin per
> interface pin. Do you really want to predefine all possible combinations
> even if it is more likely that in fact only one is used on all boards
> because they are all based on the same reference design?

Where did I say that you should define *all* possible configurations?

I said: "The SoC .dtsi file should define all the pinmux groups that are
described in the datasheet and are used by boards". Read again the "and
are used by boards".

So I'm clearly not advocating adding *all* possible configurations,
because there would be gazillions of them. But I'm in favor of moving
the *used* configurations to the .dtsi files.

> >   * The board .dts file should define the pinmux groups that are really
> >     board-specific (buttons, LEDs, etc.), and then for each device,
> >     point to the correct pinmux group (either defined in the .dtsi file
> >     or in the board file).
> 
> With respect to mpp the actual configuration _is_ board specific. There
> are maybe only some pins that are always used if a specific interface is
> used, e.g. nand pins on dove can only be switched with gpio.

I am not sure to follow you here. There is clearly some MPP pins whose
muxing groups can be defined in the SoC level file, and some other MPP
pins whose muxing should entirely be done at the board level file.

For a UART, the .dtsi file can define a pinmux configuration for
RX/TX/RTS/CTS, and the .dts file only needs to reference this
configuration.

For LEDs, buttons and similar things, the pinmux configuration should
be defined in the .dts file, and of course the .dts file will reference
this configuration.

I think what Shawn Guo did with i.MX 28 is really neat. In the current
patches posted by Andrew, for example, the following piece:

+			pmx_uart1: pmx-uart1 {
+				marvell,pins = "mpp13", "mpp14";
+				marvell,function = "uart1";
+			};

is needlessly repeated in kirkwood-ts219-6281.dts,
kirkwood-ts219-6282.dts and kirkwood-dnskw.dtsi. This is clearly a
pinmux configuration that sets up TXD/RXD of UART1, and it should be in
kirkwood.dtsi.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-24 18:06 ` Michael Walle
@ 2012-10-24 20:01   ` Andrew Lunn
  2012-10-24 20:47     ` Michael Walle
  2012-10-24 21:33     ` Thomas Petazzoni
  0 siblings, 2 replies; 58+ messages in thread
From: Andrew Lunn @ 2012-10-24 20:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 24, 2012 at 08:06:55PM +0200, Michael Walle wrote:
> Hi Andrew,
> 
> Am Mittwoch 24 Oktober 2012, 16:53:45 schrieb Andrew Lunn:
> > This patchset converts all DT kirkwood boards to using pinctrl.
> > 
> > This patchset depends on an earlier patchset to allow the mvebu
> > pinctrl driver and gpio driver to be built for kirkwood.
> > 
> > Only the TS219 conversion has been tested on hardware. The remaining
> > are compile tested. Before merging upstream, it would be good if the
> > others could be tested on hardware.
> > 
> > This series along with the dependents can be found in:
> 
> Unfortunately, this doesn't work for me. git bisect tells me its commit 
> e01139ec82162f21875d09e820686aede4219695.
> 
> I guess it has something to do with the lsxl_init calling gpio_set_value().

Humm.

I guess it is too early to use gpio. I don't think the gpio driver has
not been configured yet.

I need to think about this.

What happens if you comment out these two gpio_set_value calls?

     Andrew

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/9] ARM: Kirkwood: Convert TS219 to pinctrl.
  2012-10-24 20:00       ` Thomas Petazzoni
@ 2012-10-24 20:04         ` Andrew Lunn
  2012-10-24 20:05           ` Thomas Petazzoni
  2012-10-24 20:14         ` Sebastian Hesselbarth
  1 sibling, 1 reply; 58+ messages in thread
From: Andrew Lunn @ 2012-10-24 20:04 UTC (permalink / raw)
  To: linux-arm-kernel

> I think what Shawn Guo did with i.MX 28 is really neat. In the current
> patches posted by Andrew, for example, the following piece:
> 
> +			pmx_uart1: pmx-uart1 {
> +				marvell,pins = "mpp13", "mpp14";
> +				marvell,function = "uart1";
> +			};
> 
> is needlessly repeated in kirkwood-ts219-6281.dts,
> kirkwood-ts219-6282.dts and kirkwood-dnskw.dtsi. This is clearly a
> pinmux configuration that sets up TXD/RXD of UART1, and it should be in
> kirkwood.dtsi.

I did try that, but was getting errors from dtc.

  Andrew

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 9/9] ARM: Kirkwood: Convert IX2-200 to pinctrl.
  2012-10-24 14:53 ` [PATCH 9/9] ARM: Kirkwood: Convert IX2-200 " Andrew Lunn
@ 2012-10-24 20:04   ` Thomas Petazzoni
  2012-10-24 20:20     ` Andrew Lunn
  0 siblings, 1 reply; 58+ messages in thread
From: Thomas Petazzoni @ 2012-10-24 20:04 UTC (permalink / raw)
  To: linux-arm-kernel

Andrew,

On Wed, 24 Oct 2012 16:53:54 +0200, Andrew Lunn wrote:
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>  arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts |   90 +++++++++++++++++++++++++
>  arch/arm/mach-kirkwood/board-iomega_ix2_200.c |   24 -------
>  2 files changed, 90 insertions(+), 24 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
> index 865aeec..d8fa8e8 100644
> --- a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
> +++ b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
> @@ -16,6 +16,96 @@
>  	};
>  
>  	ocp at f1000000 {
> +		pinctrl: pinctrl at 10000 {
> +			compatible = "marvell,88f6281-pinctrl";
> +			reg = <0x10000 0x20>;

This definition (compatible + reg) should go in kirkwood.dtsi. The
pinctrl unit should be declared at the SoC level. Ditto for all other
patches.

> +			pinctrl-0 = < &pmx_button_reset &pmx_button_power
> +				      &pmx_led_backup &pmx_led_power
> +				      &pmx_button_otb &pmx_led_rebuild
> +				      &pmx_led_health
> +				      &pmx_led_sata_brt_ctrl_1
> +				      &pmx_led_sata_brt_ctrl_2
> +				      &pmx_led_backup_brt_ctrl_1
> +				      &pmx_led_backup_brt_ctrl_2
> +				      &pmx_led_power_brt_ctrl_1
> +				      &pmx_led_power_brt_ctrl_2
> +				      &pmx_led_health_brt_ctrl_1
> +				      &pmx_led_health_brt_ctrl_2
> +				      &pmx_led_rebuild_brt_ctrl_1
> +				      &pmx_led_rebuild_brt_ctrl_2 >;
> +			pinctrl-names = "default";
> +
> +			pmx_button_reset: pmx-button-reset {
> +				marvell,pins = "mpp12";
> +				marvell,function = "gpio";
> +			};
> +			pmx_button_power: pmx-button-power {
> +				marvell,pins = "mpp14";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_backup: pmx-led-backup {
> +				marvell,pins = "mpp15";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_power: pmx-led-power {
> +				marvell,pins = "mpp16";
> +				marvell,function = "gpio";
> +			};
> +			pmx_button_otb: pmx-button-otb {
> +				marvell,pins = "mpp35";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_rebuild: pmx-led-rebuild {
> +				marvell,pins = "mpp36";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_health: pmx-led_health {
> +				marvell,pins = "mpp37";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_sata_brt_ctrl_1: pmx-led-sata-brt-ctrl-1 {
> +				marvell,pins = "mpp38";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_sata_brt_ctrl_2: pmx-led-sata-brt-ctrl-2 {
> +				marvell,pins = "mpp39";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_backup_brt_ctrl_1: pmx-led-backup-brt-ctrl-1 {
> +				marvell,pins = "mpp40";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_backup_brt_ctrl_2: pmx-led-backup-brt-ctrl-2 {
> +				marvell,pins = "mpp41";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_power_brt_ctrl_1: pmx-led-power-brt-ctrl-1 {
> +				marvell,pins = "mpp42";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_power_brt_ctrl_2: pmx-led-power-brt-ctrl-2 {
> +				marvell,pins = "mpp43";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_health_brt_ctrl_1: pmx-led-health-brt-ctrl-1 {
> +				marvell,pins = "mpp44";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_health_brt_ctrl_2: pmx-led-health-brt-ctrl-2 {
> +				marvell,pins = "mpp45";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_rebuild_brt_ctrl_1: pmx-led-rebuild-brt-ctrl-1 {
> +				marvell,pins = "mpp44";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_rebuild_brt_ctrl_2: pmx-led-rebuild-brt-ctrl-2 {
> +				marvell,pins = "mpp45";
> +				marvell,function = "gpio";
> +			};

This is not a strong comment, but I am not sure it is really useful to
define one pinmux configuration for each pin. You can do something like:

	pmx_buttons: pmx-buttons {
		marvell,pins = "mpp45", "mpp46", "mpp47", "mpp48";
		marvell,function = "gpio";
	};

I think all the pins used for buttons or for LEDs kind of make sense to
be muxed together. And then, when you declare the LEDs in the DT, you
can do:

                leds {
                        compatible = "gpio-leds";
                        pinctrl-names = "default";
                        pinctrl-0 = <&led_pins>;

                        red_led {
                                   label = "red_led";
                                   gpios = <&gpio1 17 1>;
                                   default-state = "off";
                        };

                        yellow_led {
                                   label = "yellow_led";
                                   gpios = <&gpio1 19 1>;
                                   default-state = "off";
                        };

                        green_led {
                                   label = "green_led";
                                   gpios = <&gpio1 21 1>;
                                   default-state = "off";
                                   linux,default-trigger = "heartbeat";
                        };
                };

Where "led_pins" is a pinmux configuration that includes three pins.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/9] ARM: Kirkwood: Convert TS219 to pinctrl.
  2012-10-24 20:04         ` Andrew Lunn
@ 2012-10-24 20:05           ` Thomas Petazzoni
  0 siblings, 0 replies; 58+ messages in thread
From: Thomas Petazzoni @ 2012-10-24 20:05 UTC (permalink / raw)
  To: linux-arm-kernel

Andrew,

On Wed, 24 Oct 2012 22:04:00 +0200, Andrew Lunn wrote:

> > is needlessly repeated in kirkwood-ts219-6281.dts,
> > kirkwood-ts219-6282.dts and kirkwood-dnskw.dtsi. This is clearly a
> > pinmux configuration that sets up TXD/RXD of UART1, and it should be in
> > kirkwood.dtsi.
> 
> I did try that, but was getting errors from dtc.

I can probably help figuring out what the problem is. Do you have a
patch that exhibits the problem so I can test it here?

Thanks,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/9] ARM: Kirkwood: Convert TS219 to pinctrl.
  2012-10-24 20:00       ` Thomas Petazzoni
  2012-10-24 20:04         ` Andrew Lunn
@ 2012-10-24 20:14         ` Sebastian Hesselbarth
  2012-10-24 20:19           ` Thomas Petazzoni
  1 sibling, 1 reply; 58+ messages in thread
From: Sebastian Hesselbarth @ 2012-10-24 20:14 UTC (permalink / raw)
  To: linux-arm-kernel

On 10/24/2012 10:00 PM, Thomas Petazzoni wrote:
> On Wed, 24 Oct 2012 21:49:45 +0200, Sebastian Hesselbarth wrote:
>> Now consider some more complex interface with more than one mpp pin per
>> interface pin. Do you really want to predefine all possible combinations
>> even if it is more likely that in fact only one is used on all boards
>> because they are all based on the same reference design?
>
> Where did I say that you should define *all* possible configurations?
>
> I said: "The SoC .dtsi file should define all the pinmux groups that are
> described in the datasheet and are used by boards". Read again the "and
> are used by boards".

Ok, then I overread "and used by other boards". Sorry for that.

> So I'm clearly not advocating adding *all* possible configurations,
> because there would be gazillions of them. But I'm in favor of moving
> the *used* configurations to the .dtsi files.

Agreed.

Sebastian

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/9] ARM: Kirkwood: Convert TS219 to pinctrl.
  2012-10-24 20:14         ` Sebastian Hesselbarth
@ 2012-10-24 20:19           ` Thomas Petazzoni
  0 siblings, 0 replies; 58+ messages in thread
From: Thomas Petazzoni @ 2012-10-24 20:19 UTC (permalink / raw)
  To: linux-arm-kernel

Sebastian,

On Wed, 24 Oct 2012 22:14:10 +0200, Sebastian Hesselbarth wrote:

> > Where did I say that you should define *all* possible configurations?
> >
> > I said: "The SoC .dtsi file should define all the pinmux groups that are
> > described in the datasheet and are used by boards". Read again the "and
> > are used by boards".
> 
> Ok, then I overread "and used by other boards". Sorry for that.

No problem :)

> > So I'm clearly not advocating adding *all* possible configurations,
> > because there would be gazillions of them. But I'm in favor of moving
> > the *used* configurations to the .dtsi files.
> 
> Agreed.

Great!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 9/9] ARM: Kirkwood: Convert IX2-200 to pinctrl.
  2012-10-24 20:04   ` Thomas Petazzoni
@ 2012-10-24 20:20     ` Andrew Lunn
  2012-10-24 20:29       ` Thomas Petazzoni
  0 siblings, 1 reply; 58+ messages in thread
From: Andrew Lunn @ 2012-10-24 20:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 24, 2012 at 10:04:29PM +0200, Thomas Petazzoni wrote:
> Andrew,
> 
> On Wed, 24 Oct 2012 16:53:54 +0200, Andrew Lunn wrote:
> > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> > ---
> >  arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts |   90 +++++++++++++++++++++++++
> >  arch/arm/mach-kirkwood/board-iomega_ix2_200.c |   24 -------
> >  2 files changed, 90 insertions(+), 24 deletions(-)
> > 
> > diff --git a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
> > index 865aeec..d8fa8e8 100644
> > --- a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
> > +++ b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
> > @@ -16,6 +16,96 @@
> >  	};
> >  
> >  	ocp at f1000000 {
> > +		pinctrl: pinctrl at 10000 {
> > +			compatible = "marvell,88f6281-pinctrl";
> > +			reg = <0x10000 0x20>;
> 
> This definition (compatible + reg) should go in kirkwood.dtsi. The
> pinctrl unit should be declared at the SoC level. Ditto for all other
> patches.

The reg maybe. Compatibility not. We need to tell pinctrl which of the
5 different variants of kirkwood this particular kirkwood is. See

drivers/pinctrl/pinctrl-kirkwood.c

enum kirkwood_variant {
        VARIANT_MV88F6180 = V(1, 0, 0, 0, 0),
        VARIANT_MV88F6190 = V(0, 1, 0, 0, 0),
        VARIANT_MV88F6192 = V(0, 0, 1, 0, 0),
        VARIANT_MV88F6281 = V(0, 0, 0, 1, 0),
        VARIANT_MV88F6282 = V(0, 0, 0, 0, 1),
};

static struct of_device_id kirkwood_pinctrl_of_match[] __devinitdata = {
        { .compatible = "marvell,88f6180-pinctrl", .data = &mv88f6180_info },
        { .compatible = "marvell,88f6190-pinctrl", .data = &mv88f6190_info },
        { .compatible = "marvell,88f6192-pinctrl", .data = &mv88f6192_info },
        { .compatible = "marvell,88f6281-pinctrl", .data = &mv88f6281_info },
        { .compatible = "marvell,88f6282-pinctrl", .data = &mv88f6282_info },
        { }
};

What SoC is mounted on a board is a property of the board....

     Andrew

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 9/9] ARM: Kirkwood: Convert IX2-200 to pinctrl.
  2012-10-24 20:20     ` Andrew Lunn
@ 2012-10-24 20:29       ` Thomas Petazzoni
  0 siblings, 0 replies; 58+ messages in thread
From: Thomas Petazzoni @ 2012-10-24 20:29 UTC (permalink / raw)
  To: linux-arm-kernel

Andrew,

On Wed, 24 Oct 2012 22:20:10 +0200, Andrew Lunn wrote:

> The reg maybe. Compatibility not. We need to tell pinctrl which of the
> 5 different variants of kirkwood this particular kirkwood is. See

Agreed.

> drivers/pinctrl/pinctrl-kirkwood.c
> 
> enum kirkwood_variant {
>         VARIANT_MV88F6180 = V(1, 0, 0, 0, 0),
>         VARIANT_MV88F6190 = V(0, 1, 0, 0, 0),
>         VARIANT_MV88F6192 = V(0, 0, 1, 0, 0),
>         VARIANT_MV88F6281 = V(0, 0, 0, 1, 0),
>         VARIANT_MV88F6282 = V(0, 0, 0, 0, 1),
> };
> 
> static struct of_device_id kirkwood_pinctrl_of_match[] __devinitdata = {
>         { .compatible = "marvell,88f6180-pinctrl", .data = &mv88f6180_info },
>         { .compatible = "marvell,88f6190-pinctrl", .data = &mv88f6190_info },
>         { .compatible = "marvell,88f6192-pinctrl", .data = &mv88f6192_info },
>         { .compatible = "marvell,88f6281-pinctrl", .data = &mv88f6281_info },
>         { .compatible = "marvell,88f6282-pinctrl", .data = &mv88f6282_info },
>         { }
> };
> 
> What SoC is mounted on a board is a property of the board....

The way we solved that on Armada XP is that we have a common
armada-xp.dtsi file with definitions common to all SoCs in the family.
Then, we have sub .dtsi files named armada-xp-mv78230.dtsi,
armada-xp-mv78260.dtsi and armada-xp-mv78460.dtsi that handle the
differences between specific SoCs in the family. For example, the
differences are: different compatible string for the pinctrl driver,
different number of CPUs, different number of pins and
therefore different number of GPIOs, different number of PCIe ports,
etc. But besides those differences, most units have a lot of common
definitions, that we factor out in armada-xp.dtsi.

So we have the following hierarchy:

 + armada-xp.dtsi
   + armada-xp-mv78230.dtsi
     + someboard-here.dts
   + armada-xp-mv78260.dtsi
     + openblocks-ax3-4.dts
   + armada-xp-mv78460.dtsi
     + armada-xp-db.dts

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 8/9] ARM: Kirkwood: Convert lsxl boards to pinctrl.
  2012-10-24 14:53 ` [PATCH 8/9] ARM: Kirkwood: Convert lsxl boards " Andrew Lunn
@ 2012-10-24 20:37   ` Michael Walle
  2012-10-28 16:40   ` Michael Walle
  1 sibling, 0 replies; 58+ messages in thread
From: Michael Walle @ 2012-10-24 20:37 UTC (permalink / raw)
  To: linux-arm-kernel

Am Mittwoch 24 Oktober 2012, 16:53:53 schrieb Andrew Lunn:
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>  arch/arm/boot/dts/kirkwood-lsxl.dtsi |   67
> ++++++++++++++++++++++++++++++++++ arch/arm/mach-kirkwood/board-lsxl.c  | 
>  19 ----------
>  2 files changed, 67 insertions(+), 19 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/kirkwood-lsxl.dtsi
> b/arch/arm/boot/dts/kirkwood-lsxl.dtsi index 8fea375..01d6e3a 100644
> --- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi
> +++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
> @@ -6,6 +6,73 @@
>  	};
> 
>  	ocp at f1000000 {
> +		pinctrl: pinctrl at 10000 {
> +			compatible = "marvell,88f6281-pinctrl";
> +			reg = <0x10000 0x20>;
> +
> +			pinctrl-0 = < &pmx_power_hdd &pmx_usb_vbus
> +				      &pmx_fan_low &pmx_fan_high
> +				      &pmx_led_function_red &pmx_led_alarm
> +				      &pmx_led_info &pmx_led_power
> +				      &pmx_fan_lock &pmx_button_function
> +				      &pmx_power_switch &pmx_power_auto_switch
> +				      &pmx_led_function_blue >;
> +			pinctrl-names = "default";
> +
> +			pmx_power_hdd: pmx-power-hdd {
> +				marvell,pins = "mpp10";
> +				marvell,function = "gpio";
function is "gpo";

> +			};
> +			pmx_usb_vbus: pmx-usb-vbus {
> +				marvell,pins = "mpp11";
> +				marvell,function = "gpio";
> +			};
> +			pmx_fan_high: pmx-fan-high {
> +				marvell,pins = "mpp18";
> +				marvell,function = "gpo";
> +			};
> +			pmx_fan_low: pmx-fan-low {
> +				marvell,pins = "mpp19";
> +				marvell,function = "gpo";
> +			};
> +			pmx_led_function_blue: pmx-led-function-blue {
> +				marvell,pins = "mpp36";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_alarm: pmx-led-alarm {
> +				marvell,pins = "mpp37";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_info: pmx-led-info {
> +				marvell,pins = "mpp38";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_power: pmx-led-power {
> +				marvell,pins = "mpp39";
> +				marvell,function = "gpio";
> +			};
> +			pmx_fan_lock: pmx-fan-lock {
> +				marvell,pins = "mpp40";
> +				marvell,function = "gpo";
gpio

> +			};
> +			pmx_button_function: pmx-button-function {
> +				marvell,pins = "mpp41";
> +				marvell,function = "gpio";
> +			};
> +			pmx_power_switch: pmx-power-switch {
> +				marvell,pins = "mpp42";
> +				marvell,function = "gpio";
> +			};
> +			pmx_power_auto_switch: pmx-power-auto-switch {
> +				marvell,pins = "mpp43";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_function_red: pmx-led-function_red {
> +				marvell,pins = "mpp43";
> +				marvell,function = "gpio";
> +			};
> +
> +		};
>  		sata at 80000 {
>  			status = "okay";
>  			nr-ports = <1>;
> diff --git a/arch/arm/mach-kirkwood/board-lsxl.c
> b/arch/arm/mach-kirkwood/board-lsxl.c index 83d8975..868bdb0 100644
> --- a/arch/arm/mach-kirkwood/board-lsxl.c
> +++ b/arch/arm/mach-kirkwood/board-lsxl.c
> @@ -26,7 +26,6 @@
>  #include <asm/mach/arch.h>
>  #include <mach/kirkwood.h>
>  #include "common.h"
> -#include "mpp.h"
> 
>  static struct mv643xx_eth_platform_data lsxl_ge00_data = {
>  	.phy_addr	= MV643XX_ETH_PHY_ADDR(0),
> @@ -36,23 +35,6 @@ static struct mv643xx_eth_platform_data lsxl_ge01_data =
> { .phy_addr	= MV643XX_ETH_PHY_ADDR(8),
>  };
> 
> -static unsigned int lsxl_mpp_config[] __initdata = {
> -	MPP10_GPO,	/* HDD Power Enable */
> -	MPP11_GPIO,	/* USB Vbus Enable */
> -	MPP18_GPO,	/* FAN High Enable# */
> -	MPP19_GPO,	/* FAN Low Enable# */
> -	MPP36_GPIO,	/* Function Blue LED */
> -	MPP37_GPIO,	/* Alarm LED */
> -	MPP38_GPIO,	/* Info LED */
> -	MPP39_GPIO,	/* Power LED */
> -	MPP40_GPIO,	/* Fan Lock */
> -	MPP41_GPIO,	/* Function Button */
> -	MPP42_GPIO,	/* Power Switch */
> -	MPP43_GPIO,	/* Power Auto Switch */
> -	MPP48_GPIO,	/* Function Red LED */
> -	0
> -};
> -
>  #define LSXL_GPIO_FAN_HIGH	18
>  #define LSXL_GPIO_FAN_LOW	19
>  #define LSXL_GPIO_FAN_LOCK	40
> @@ -119,7 +101,6 @@ void __init lsxl_init(void)
>  	/*
>  	 * Basic setup. Needs to be called early.
>  	 */
> -	kirkwood_mpp_conf(lsxl_mpp_config);
> 
>  	/* usb and sata power on */
>  	gpio_set_value(LSXL_GPIO_USB_POWER, 1);


-- 
Michael

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 7/9] ARM: Kirkwood: Convert ib62x0 to pinctrl.
  2012-10-24 14:53 ` [PATCH 7/9] ARM: Kirkwood: Convert ib62x0 " Andrew Lunn
@ 2012-10-24 20:40   ` Simon Baatz
  0 siblings, 0 replies; 58+ messages in thread
From: Simon Baatz @ 2012-10-24 20:40 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Andrew,

first of all thanks for providing these patches!
Just a typo for now:

On Wed, Oct 24, 2012 at 04:53:52PM +0200, Andrew Lunn wrote:
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>  arch/arm/boot/dts/kirkwood-ib62x0.dts |   41 +++++++++++++++++++++++++++++++++
>  arch/arm/mach-kirkwood/board-ib62x0.c |   21 -----------------
>  2 files changed, 41 insertions(+), 21 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/kirkwood-ib62x0.dts b/arch/arm/boot/dts/kirkwood-ib62x0.dts
> index 66794ed..713b39b 100644
> --- a/arch/arm/boot/dts/kirkwood-ib62x0.dts
> +++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts
> @@ -16,6 +16,47 @@
>  	};
>  
>  	ocp at f1000000 {
> +		pinctrl: pinctrl at 10000 {
> +			compatible = "marvell,88f6281-pinctrl";
> +			reg = <0x10000 0x20>;
> +
> +			pinctrl-0 = < &pmx_nand
> +				      &pmx_led_os_red &pmx_power_off
> +				      &pmx_led_os_green &pmx_led_usb_transfer
> +				      &pmx_button_reset &pmx_button_usb_copy >;
> +			pinctrl-names = "default";
> +
> +			pmx_nand: pmx-nand {
> +				marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3",
> +					       "mpp04", "mpp5", "mpp18",

mpp04 -> mpp4


- Simon

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-24 20:01   ` Andrew Lunn
@ 2012-10-24 20:47     ` Michael Walle
  2012-10-24 21:33     ` Thomas Petazzoni
  1 sibling, 0 replies; 58+ messages in thread
From: Michael Walle @ 2012-10-24 20:47 UTC (permalink / raw)
  To: linux-arm-kernel

Am Mittwoch 24 Oktober 2012, 22:01:28 schrieb Andrew Lunn:
> What happens if you comment out these two gpio_set_value calls?

After commenting out and fixing the mpp funtions (see earlier mail from me) 
the kernel hangs after rtc-mv/before orion_wdt.


Your tree:

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0
Linux version 3.7.0-rc2-00015-g2773c33-dirty (mw at thanatos) (gcc version 4.4.5 
(Debian 4.4.5-8) ) #9 PREEMPT Wed Oct 24 22:27:07 CEST 2012
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
CPU: VIVT data cache, VIVT instruction cache
Machine: Marvell Kirkwood (Flattened Device Tree), model: Buffalo Linkstation 
LS-CHLv2
bootconsole [earlycon0] enabled
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttyS0,115200 root=/dev/sda2 earlyprintk
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 55828k/55828k available, 9708k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc04e2660   (4970 kB)
      .init : 0xc04e3000 - 0xc0506ca0   ( 144 kB)
      .data : 0xc0508000 - 0xc0540280   ( 225 kB)
       .bss : 0xc05402a4 - 0xc05d7a3c   ( 606 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:114
sched_clock: 32 bits at 166MHz, resolution 5ns, wraps every 25769ms
Console: colour dummy device 80x30
Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x3baaa8 - 0x3baae4
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 1024 KiB pool for atomic coherent allocations
Kirkwood: MV88F6281-A1, TCLK=166666667.
Feroceon L2: Enabling L2
Feroceon L2: Cache support initialised.
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
cfg80211: Calling CRDA to update world regulatory domain
Switching to clocksource orion_clocksource
NET: Registered protocol family 2
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
jffs2: version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.
msgmni has been set to 109
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
kirkwood-pinctrl f1010000.pinctrl: registered pinctrl driver
mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
loop: module loaded
sata_mv sata_mv.0: cannot get optional clkdev
sata_mv sata_mv.0: slots 32 ports 1
scsi0 : sata_mv
ata1: SATA max UDMA/133 irq 21
m25p80 spi0.0: m25p40 (512 Kbytes)
3 ofpart partitions found on MTD device spi0.0
Creating 3 MTD partitions on "spi0.0":
0x000000000000-0x000000060000 : "uboot"
0x000000060000-0x000000070000 : "dtb"
0x000000070000-0x000000080000 : "uboot_env"
mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
libphy: mv643xx_eth smi: probed
mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 
00:00:00:00:00:00
mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address 
4c:e6:76:61:b9:f7
libertas_sdio: Libertas SDIO driver
libertas_sdio: Copyright Pierre Ossman
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
mousedev: PS/2 mouse device common for all mice
rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
i2c /dev entries driver



v3.7rc2 tag:

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0
Linux version 3.7.0-rc2 (mw at thanatos) (gcc version 4.4.5 (Debian 4.4.5-8) ) 
#11 PREEMPT Wed Oct 24 22:42:25 CEST 2012
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
CPU: VIVT data cache, VIVT instruction cache
Machine: Marvell Kirkwood (Flattened Device Tree), model: Buffalo Linkstation 
LS-CHLv2
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttyS0,115200 root=/dev/sda2 earlyprintk
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 55884k/55884k available, 9652k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc04d82e4   (4929 kB)
      .init : 0xc04d9000 - 0xc04fcda0   ( 144 kB)
      .data : 0xc04fe000 - 0xc0533fa0   ( 216 kB)
       .bss : 0xc0533fc4 - 0xc05cb59c   ( 606 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:114
sched_clock: 32 bits at 166MHz, resolution 5ns, wraps every 25769ms
Console: colour dummy device 80x30
Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x3b41c8 - 0x3b4204
NET: Registered protocol family 16
DMA: preallocated 1024 KiB pool for atomic coherent allocations
Kirkwood: MV88F6281-A1, TCLK=166666667.
Feroceon L2: Enabling L2
Feroceon L2: Cache support initialised.
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
cfg80211: Calling CRDA to update world regulatory domain
Switching to clocksource orion_clocksource
NET: Registered protocol family 2
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
jffs2: version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.
msgmni has been set to 109
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
console [ttyS0] enabled
loop: module loaded
sata_mv sata_mv.0: cannot get optional clkdev
sata_mv sata_mv.0: slots 32 ports 1
scsi0 : sata_mv
ata1: SATA max UDMA/133 irq 21
m25p80 spi0.0: m25p40 (512 Kbytes)
3 ofpart partitions found on MTD device spi0.0
Creating 3 MTD partitions on "spi0.0":
0x000000000000-0x000000060000 : "uboot"
0x000000060000-0x000000070000 : "dtb"
0x000000070000-0x000000080000 : "uboot_env"
mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
libphy: mv643xx_eth smi: probed
mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 
00:00:00:00:00:00
mv643xx_eth_port mv643xx_eth_port.1 eth1: port 0 with MAC address 
4c:e6:76:61:b9:f7
libertas_sdio: Libertas SDIO driver
libertas_sdio: Copyright Pierre Ossman
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
mousedev: PS/2 mouse device common for all mice
rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
i2c /dev entries driver
orion_wdt: Initial timeout 25 sec
cpuidle: using governor ladder
cpuidle: using governor menu
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
oprofile: no performance counters
oprofile: using timer interrupt.
TCP: cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
input: gpio_keys.1 as /devices/gpio_keys.1/input/input0
rtc-mv f1010300.rtc: setting system clock to 2000-01-01 00:00:00 UTC 
(946684800)
ata1: SATA link down (SStatus 0 SControl F300)
VFS: Cannot open root device "sda2" or unknown-block(0,0): error -6


--
michael

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-24 20:01   ` Andrew Lunn
  2012-10-24 20:47     ` Michael Walle
@ 2012-10-24 21:33     ` Thomas Petazzoni
  2012-10-25  5:46       ` Andrew Lunn
  1 sibling, 1 reply; 58+ messages in thread
From: Thomas Petazzoni @ 2012-10-24 21:33 UTC (permalink / raw)
  To: linux-arm-kernel

Andrew,

On Wed, 24 Oct 2012 22:01:28 +0200, Andrew Lunn wrote:

> I guess it is too early to use gpio. I don't think the gpio driver has
> not been configured yet.
> 
> I need to think about this.
> 
> What happens if you comment out these two gpio_set_value calls?

The problem is (probably, I haven't tested) that in
mach-kirkwood/board-dt.c, the of_platform_populate() function is called
after all the board-specific init. So all the devices described in the
DT, including GPIO banks, have not been registered yet. Most likely the
of_platform_populate() should come before the board specific inits.

Also there should probably  be a gpio_request() before those
gpio_set_value().

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-24 21:33     ` Thomas Petazzoni
@ 2012-10-25  5:46       ` Andrew Lunn
  2012-10-25  6:28         ` Thomas Petazzoni
  0 siblings, 1 reply; 58+ messages in thread
From: Andrew Lunn @ 2012-10-25  5:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 24, 2012 at 11:33:56PM +0200, Thomas Petazzoni wrote:
> Andrew,
> 
> On Wed, 24 Oct 2012 22:01:28 +0200, Andrew Lunn wrote:
> 
> > I guess it is too early to use gpio. I don't think the gpio driver has
> > not been configured yet.
> > 
> > I need to think about this.
> > 
> > What happens if you comment out these two gpio_set_value calls?
> 
> The problem is (probably, I haven't tested) that in
> mach-kirkwood/board-dt.c, the of_platform_populate() function is called
> after all the board-specific init. So all the devices described in the
> DT, including GPIO banks, have not been registered yet. Most likely the
> of_platform_populate() should come before the board specific inits.

Thanks Thomas, i will play around with this.

I'm just wondering if we are going to get into ordering issues. These
gpio operations are providing power to subsystems. We probably need
that to happen before the driver is loaded. If we call
of_platform_populate() too early, do we have the danger the driver
probing is going to happen before the init routine can enable the
power?

It seems like we want pinctrl/gpio working first, with pins hogged as
specified in DT, then the board init() function, then the rest of DT
setup.

> Also there should probably  be a gpio_request() before those
> gpio_set_value().

Yes. That worked before, but might break now. Most of the init()
functions do actually make a gpip_request() call.

     Andrew

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-25  5:46       ` Andrew Lunn
@ 2012-10-25  6:28         ` Thomas Petazzoni
  2012-10-25  7:39           ` Michael Walle
  2012-10-25 22:57           ` Jamie Lentin
  0 siblings, 2 replies; 58+ messages in thread
From: Thomas Petazzoni @ 2012-10-25  6:28 UTC (permalink / raw)
  To: linux-arm-kernel

Andrew,

On Thu, 25 Oct 2012 07:46:38 +0200, Andrew Lunn wrote:

> Thanks Thomas, i will play around with this.
> 
> I'm just wondering if we are going to get into ordering issues. These
> gpio operations are providing power to subsystems. We probably need
> that to happen before the driver is loaded. If we call
> of_platform_populate() too early, do we have the danger the driver
> probing is going to happen before the init routine can enable the
> power?
> 
> It seems like we want pinctrl/gpio working first, with pins hogged as
> specified in DT, then the board init() function, then the rest of DT
> setup.

If those GPIO value settings are needed to get a particular driver to
work, then I'd recommend letting the driver do the GPIO value setting.
For example, in the lsxl board, I see:

        /* usb and sata power on */
        gpio_set_value(LSXL_GPIO_USB_POWER, 1);
        gpio_set_value(LSXL_GPIO_HDD_POWER, 1);

If the LSXL_GPIO_USB_POWER GPIO should be set to one to get the EHCI
driver to work properly, then I think we should let the EHCI driver set
this GPIO value in its ->probe() operation. Of course, the GPIO
reference will be passed in the platform_data (for old-style probing),
or through specific DT properties (for new-style, DT-based, probing).

Regarding the LSXL_GPIO_HDD_POWER GPIO, I am not sure. Is it required
to apply power on this GPIO to get the SATA driver to probe properly,
or is it possible to get the SATA driver to probe properly, then apply
power and have the HDD still being recognized? I haven't looked at all
at how SATA drivers were working, so I can't say.

Also, ultimately, if those GPIOs are providing power, then they should
probably not be handled as simple GPIOs, but rather as regulator, using
the gpio-regulator driver. But let's do things steps by steps :-)

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-25  6:28         ` Thomas Petazzoni
@ 2012-10-25  7:39           ` Michael Walle
  2012-10-25  7:43             ` Thomas Petazzoni
  2012-10-25 22:57           ` Jamie Lentin
  1 sibling, 1 reply; 58+ messages in thread
From: Michael Walle @ 2012-10-25  7:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, October 25, 2012 08:28, Thomas Petazzoni wrote:
> Andrew,
>
> On Thu, 25 Oct 2012 07:46:38 +0200, Andrew Lunn wrote:
>
>> Thanks Thomas, i will play around with this.
>>
>> I'm just wondering if we are going to get into ordering issues. These
>> gpio operations are providing power to subsystems. We probably need
>> that to happen before the driver is loaded. If we call
>> of_platform_populate() too early, do we have the danger the driver
>> probing is going to happen before the init routine can enable the
>> power?
>>
>> It seems like we want pinctrl/gpio working first, with pins hogged as
>> specified in DT, then the board init() function, then the rest of DT
>> setup.
>
> If those GPIO value settings are needed to get a particular driver to
> work, then I'd recommend letting the driver do the GPIO value setting.
> For example, in the lsxl board, I see:
>
>         /* usb and sata power on */
>         gpio_set_value(LSXL_GPIO_USB_POWER, 1);
>         gpio_set_value(LSXL_GPIO_HDD_POWER, 1);
>
> If the LSXL_GPIO_USB_POWER GPIO should be set to one to get the EHCI
> driver to work properly, then I think we should let the EHCI driver set
> this GPIO value in its ->probe() operation. Of course, the GPIO
> reference will be passed in the platform_data (for old-style probing),
> or through specific DT properties (for new-style, DT-based, probing).
>
> Regarding the LSXL_GPIO_HDD_POWER GPIO, I am not sure. Is it required
> to apply power on this GPIO to get the SATA driver to probe properly,
> or is it possible to get the SATA driver to probe properly, then apply
> power and have the HDD still being recognized? I haven't looked at all
> at how SATA drivers were working, so I can't say.

LSXL_GPIO_USB_POWER and LSXL_GPIO_HDD_POWER switches the power on the USB
and SATA connector. So they are not needed to be set before the driver
probes, at least in my case here.

But i can imagine boards where you have to enable some kind of
buffer/muxer/etc which are controlled by GPIO pins. And I don't think that
should be part of the actual driver, because that would be highly board
dependant.

> Also, ultimately, if those GPIOs are providing power, then they should
> probably not be handled as simple GPIOs, but rather as regulator, using
> the gpio-regulator driver. But let's do things steps by steps :-)

-- 
michael

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-25  7:39           ` Michael Walle
@ 2012-10-25  7:43             ` Thomas Petazzoni
  2012-10-25 20:19               ` Michael Walle
  2012-10-26 18:06               ` Michael Walle
  0 siblings, 2 replies; 58+ messages in thread
From: Thomas Petazzoni @ 2012-10-25  7:43 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Michael Walle,

On Thu, 25 Oct 2012 09:39:13 +0200, Michael Walle wrote:

> LSXL_GPIO_USB_POWER and LSXL_GPIO_HDD_POWER switches the power on the USB
> and SATA connector. So they are not needed to be set before the driver
> probes, at least in my case here.

Ok.

> But i can imagine boards where you have to enable some kind of
> buffer/muxer/etc which are controlled by GPIO pins. And I don't think that
> should be part of the actual driver, because that would be highly board
> dependant.

You'd have to provide a more specific example so I can imagine how it
will be solved. But for example, if you have a GPIO-controlled muxer
for an I2C bus, then the I2C devices behind the muxer are described as
sub-devices of the muxer, so the probing order is correct.

Of course, I'm not pretending I have ready-to-use solutions for all
situations, but I think we can solve this problem on a case-by-case
basis.

Regardless of those GPIOs, did you solve the hang that happened even
when you removed the gpio_set_value() calls? Or is it still a problem
currently?

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-25  7:43             ` Thomas Petazzoni
@ 2012-10-25 20:19               ` Michael Walle
  2012-10-26 18:06               ` Michael Walle
  1 sibling, 0 replies; 58+ messages in thread
From: Michael Walle @ 2012-10-25 20:19 UTC (permalink / raw)
  To: linux-arm-kernel

Am Donnerstag 25 Oktober 2012, 09:43:43 schrieb Thomas Petazzoni:
> Dear Michael Walle,
> 
> On Thu, 25 Oct 2012 09:39:13 +0200, Michael Walle wrote:
> > LSXL_GPIO_USB_POWER and LSXL_GPIO_HDD_POWER switches the power on the USB
> > and SATA connector. So they are not needed to be set before the driver
> > probes, at least in my case here.
> 
> Ok.
> 
> > But i can imagine boards where you have to enable some kind of
> > buffer/muxer/etc which are controlled by GPIO pins. And I don't think
> > that should be part of the actual driver, because that would be highly
> > board dependant.
> 
> You'd have to provide a more specific example so I can imagine how it
> will be solved. But for example, if you have a GPIO-controlled muxer
> for an I2C bus, then the I2C devices behind the muxer are described as
> sub-devices of the muxer, so the probing order is correct.

Assume an ethernet phy which needs a valid reference clock before it can be 
probed for example. Of course, this is pure theoretical. But should we impose 
restrictions on when we can do the GPIO settings? Esp. since it worked before 
(i guess).

> Of course, I'm not pretending I have ready-to-use solutions for all
> situations, but I think we can solve this problem on a case-by-case
> basis.

> Regardless of those GPIOs, did you solve the hang that happened even
> when you removed the gpio_set_value() calls? Or is it still a problem
> currently?
Still a problem. Haven't really looket into i atm. Hopefully i find some time 
this weekend.

-- 
michael

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-25  6:28         ` Thomas Petazzoni
  2012-10-25  7:39           ` Michael Walle
@ 2012-10-25 22:57           ` Jamie Lentin
  1 sibling, 0 replies; 58+ messages in thread
From: Jamie Lentin @ 2012-10-25 22:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 25 Oct 2012, Thomas Petazzoni wrote:

> Andrew,
>
> On Thu, 25 Oct 2012 07:46:38 +0200, Andrew Lunn wrote:
>
>> Thanks Thomas, i will play around with this.
>>
>> I'm just wondering if we are going to get into ordering issues. These
>> gpio operations are providing power to subsystems. We probably need
>> that to happen before the driver is loaded. If we call
>> of_platform_populate() too early, do we have the danger the driver
>> probing is going to happen before the init routine can enable the
>> power?
>>
>> It seems like we want pinctrl/gpio working first, with pins hogged as
>> specified in DT, then the board init() function, then the rest of DT
>> setup.
>
> If those GPIO value settings are needed to get a particular driver to
> work, then I'd recommend letting the driver do the GPIO value setting.
> For example, in the lsxl board, I see:
>
>        /* usb and sata power on */
>        gpio_set_value(LSXL_GPIO_USB_POWER, 1);
>        gpio_set_value(LSXL_GPIO_HDD_POWER, 1);
>
> If the LSXL_GPIO_USB_POWER GPIO should be set to one to get the EHCI
> driver to work properly, then I think we should let the EHCI driver set
> this GPIO value in its ->probe() operation. Of course, the GPIO
> reference will be passed in the platform_data (for old-style probing),
> or through specific DT properties (for new-style, DT-based, probing).
>
> Regarding the LSXL_GPIO_HDD_POWER GPIO, I am not sure. Is it required
> to apply power on this GPIO to get the SATA driver to probe properly,
> or is it possible to get the SATA driver to probe properly, then apply
> power and have the HDD still being recognized? I haven't looked at all
> at how SATA drivers were working, so I can't say.

FWIW, Applying power to the HDD after SATA probe works fine on my NAS 
(admittedly not an lsxl board, but close enough). Turning it off again is 
a little unclean, but works.

> Also, ultimately, if those GPIOs are providing power, then they should
> probably not be handled as simple GPIOs, but rather as regulator, using
> the gpio-regulator driver. But let's do things steps by steps :-)
>
> Best regards,
>
> Thomas
>

-- 
Jamie Lentin

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 3/9] ARM: Kirkwood: Convert dnskw to pinctrl
  2012-10-24 14:53 ` [PATCH 3/9] ARM: Kirkwood: Convert dnskw " Andrew Lunn
@ 2012-10-25 22:58   ` Jamie Lentin
  2012-10-26  6:01     ` Andrew Lunn
  0 siblings, 1 reply; 58+ messages in thread
From: Jamie Lentin @ 2012-10-25 22:58 UTC (permalink / raw)
  To: linux-arm-kernel

Thanks for doing all this. Some typos to fix, I've commented below but 
I thought it might be easier to push a version for you to steal. It's 
here:

git://github.com/lentinj/linux.git v3.7-rc2-pinctrl
https://raw.github.com/lentinj/linux/v3.7-rc2-pinctrl/arch/arm/boot/dts/kirkwood-dnskw.dtsi

Tested on a DNS-320, not a DNS-325 yet.

Similar to lsxl_init, the custom GPIO registrations fail:-

dnskw: failed to configure power-off GPIO
dnskw: Failed to register dnskw:power:sata0
dnskw: Failed to register dnskw:power:sata1
dnskw: Failed to register dnskw:power:recover

So I guess they will need a new home somewhere.

However most things (fan, buttons, SATA detect/power via sysfs, power via 
sysfs) work. The key thing that doesn't is LEDs. Registration looks 
reasonable:

Registered led device: dns320:blue:power
kirkwood-pinctrl f1010000.pinctrl: request pin 43 (PIN43) for mvebu-gpio:43
Registered led device: dns320:blue:usb
kirkwood-pinctrl f1010000.pinctrl: request pin 28 (PIN28) for mvebu-gpio:28
Registered led device: dns320:orange:l_hdd
kirkwood-pinctrl f1010000.pinctrl: request pin 27 (PIN27) for mvebu-gpio:27
Registered led device: dns320:orange:r_hdd
kirkwood-pinctrl f1010000.pinctrl: request pin 35 (PIN35) for mvebu-gpio:35
Registered led device: dns320:orange:usb

However setting brightness on/off does the following:
cat /sys/class/leds/dns320\:blue\:power/trigger

dns320:blue:power - No effect, LED continues to blink as bootloader 
configures it
dns320:orange:l_hdd - Works fine
dns320:orange:r_hdd - Works fine
dns320:orange:usb - Turns on, turning off locks NAS hard
dns320:blue:usb - Turns on, turning off locks NAS hard

Any ideas?

Cheers,

On Wed, 24 Oct 2012, Andrew Lunn wrote:

> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
> arch/arm/boot/dts/kirkwood-dnskw.dtsi |  136 +++++++++++++++++++++++++++++++++
> arch/arm/mach-kirkwood/board-dnskw.c  |   37 ---------
> 2 files changed, 136 insertions(+), 37 deletions(-)
>
> diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
> index 9b32d02..5d8cf93 100644
> --- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi
> +++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
> @@ -36,6 +36,142 @@
> 	};
>
> 	ocp at f1000000 {
> +		pinctrl: pinctrl at 10000 {
> +			compatible = "marvell,88f6281-pinctrl";
> +			reg = <0x10000 0x20>;
> +
> +			pinctrl-0 = < &pmx_uart1 &pmx_sata1

Need a &pmx_sata0 too (see below).

> +				      &pmx_gpio_24 &pmx_gpio_25
> +				      &pmx_led_power &pmx_led_power

Shouldn't be repeated, I'm guessing.

> +				      &pmx_led_red_right_hdd
> +				      &pmx_led_red_left_hdd
> +				      &pmx_led_red_usb_325
> +				      &pmx_gpio_30 &pmx_gpio_31
> +				      &pmx_gpio_32 &pmx_gpio_33
> +				      &pmx_button_power
> +				      &pmx_led_red_usb_320
> +				      &pmx_power_off &pmx_power_back_on
> +				      &pmx_power_sata0 &pmx_power_sata1
> +				      &pmx_present_sata0 &pmx_present_sata1
> +				      &pmx_led_white_usb &pmx_fan_tacho
> +				      &pmx_fan_high_speed &pmx_fan_low_speed
> +				      &pmx_button_unmount &pmx_button_reset
> +				      &pmx_temp_alarm >;
> +			pinctrl-names = "default";
> +
> +			pmx_uart1: pmx-uart1 {
> +				marvell,pins = "mpp13", "mpp14";
> +				marvell,function = "uart1";
> +			};
> +			pmx_sata1: pmx-sata1 {
> +				marvell,pins = "mpp4", "mpp20", "mpp22";

mpp4 is for the NAND. I'm guessing mpp22 should be mpp21, but this should 
have the "sata0" function.

On a related note, the NAND pins aren't registered. I probably should have 
done this before, although if the bootloader didn't set up the NAND pins 
then it'd probably not get this far :)

> +				marvell,function = "sata1";
> +			};
> +			pmx_gpio_24: pmx-gpio-24 {
> +				marvell,pins = "mpp24";
> +				marvell,function = "gpio";
> +			};
> +			pmx_gpio_25: pmx-gpio-25 {
> +				marvell,pins = "mpp25";
> +				marvell,function = "gpio";
> +			};

These don't actually do anything (there's no more NAS functions left to 
find now), so could they just be left out? They didn't serve any purpose
before other than making it easy to see where the gaps were.

> +			pmx_led_power: pmx-led-power {
> +				marvell,pins = "mpp26";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_red_right_hdd: pmx-led-red-right-hdd {
> +				marvell,pins = "mpp27";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_red_left_hdd: pmx-led-red-left-hdd {
> +				marvell,pins = "mpp28";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_red_usb_325: pmx-led-red-usb-325 {
> +				marvell,pins = "mpp29";
> +				marvell,function = "gpio";
> +			};
> +			pmx_gpio_30: pmx-gpio-30 {
> +				marvell,pins = "mpp30";
> +				marvell,function = "gpio";
> +			};
> +			pmx_gpio_31: pmx-gpio-31 {
> +				marvell,pins = "mpp31";
> +				marvell,function = "gpio";
> +			};
> +			pmx_gpio_32: pmx-gpio-32 {
> +				marvell,pins = "mpp32";
> +				marvell,function = "gpio";
> +			};
> +			pmx_gpio_33: pmx-gpio-33 {
> +				marvell,pins = "mpp33";
> +				marvell,function = "gpio";
> +			};

Should be "gpo", but could just leave out all 4.

> +			pmx_button_power: pmx-button-power {
> +				marvell,pins = "mpp34";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_red_usb_320: pmx-led-red-usb-320 {
> +				marvell,pins = "mpp35";
> +				marvell,function = "gpio";
> +			};
> +			pmx_power_off: pmx-power-off {
> +				marvell,pins = "mpp36";
> +				marvell,function = "gpio";
> +			};
> +			pmx_power_back_on: pmx-power-back-on {
> +				marvell,pins = "mpp37";
> +				marvell,function = "gpio";
> +			};
> +			pmx_gpio_38: pmx-gpio-38 {
> +				marvell,pins = "mpp38";
> +				marvell,function = "gpio";
> +			};

This one wasn't registered above, but not a used pin.

> +			pmx_power_sata0: pmx-power-sata0 {
> +				marvell,pins = "mpp39";
> +				marvell,function = "gpio";
> +			};
> +			pmx_power_sata1: pmx-power-sata1 {
> +				marvell,pins = "mpp40";
> +				marvell,function = "gpio";
> +			};
> +			pmx_present_sata0: pmx-present-sata0 {
> +				marvell,pins = "mpp41";
> +				marvell,function = "gpio";
> +			};
> +			pmx_present_sata1: pmx-present-sata1 {
> +				marvell,pins = "mpp42";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_white_usb: pmx-led-white-usb {
> +				marvell,pins = "mpp43";
> +				marvell,function = "gpio";
> +			};
> +			pmx_fan_tacho: pmx-fan-tacho {
> +				marvell,pins = "mpp44";
> +				marvell,function = "gpio";
> +			};
> +			pmx_fan_high_speed: pmx-fan-high-speed {
> +				marvell,pins = "mpp45";
> +				marvell,function = "gpio";
> +			};
> +			pmx_fan_low_speed: pmx-fan-low-speed {
> +				marvell,pins = "mpp46";
> +				marvell,function = "gpio";
> +			};
> +			pmx_button_unmount: pmx-button-unmount {
> +				marvell,pins = "mpp47";
> +				marvell,function = "gpio";
> +			};
> +			pmx_button_reset: pmx-button-reset {
> +				marvell,pins = "mpp48";
> +				marvell,function = "gpio";
> +			};
> +			pmx_temp_alarm: pmx-temp-alarm {
> +				marvell,pins = "mpp49";
> +				marvell,function = "gpio";
> +			};
> +		};
> 		sata at 80000 {
> 			status = "okay";
> 			nr-ports = <2>;
> diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c
> index 43d16d6..ed93c09 100644
> --- a/arch/arm/mach-kirkwood/board-dnskw.c
> +++ b/arch/arm/mach-kirkwood/board-dnskw.c
> @@ -17,46 +17,11 @@
> #include <linux/mv643xx_eth.h>
> #include <linux/gpio.h>
> #include "common.h"
> -#include "mpp.h"
>
> static struct mv643xx_eth_platform_data dnskw_ge00_data = {
> 	.phy_addr	= MV643XX_ETH_PHY_ADDR(8),
> };
>
> -static unsigned int dnskw_mpp_config[] __initdata = {
> -	MPP13_UART1_TXD,	/* Custom ... */
> -	MPP14_UART1_RXD,	/* ... Controller (DNS-320 only) */
> -	MPP20_SATA1_ACTn,	/* LED: White Right HDD */
> -	MPP21_SATA0_ACTn,	/* LED: White Left HDD */
> -	MPP24_GPIO,
> -	MPP25_GPIO,
> -	MPP26_GPIO,	/* LED: Power */
> -	MPP27_GPIO,	/* LED: Red Right HDD */
> -	MPP28_GPIO,	/* LED: Red Left HDD */
> -	MPP29_GPIO,	/* LED: Red USB (DNS-325 only) */
> -	MPP30_GPIO,
> -	MPP31_GPIO,
> -	MPP32_GPIO,
> -	MPP33_GPO,
> -	MPP34_GPIO,	/* Button: Front power */
> -	MPP35_GPIO,	/* LED: Red USB (DNS-320 only) */
> -	MPP36_GPIO,	/* Power: Turn off board */
> -	MPP37_GPIO,	/* Power: Turn back on after power failure */
> -	MPP38_GPIO,
> -	MPP39_GPIO,	/* Power: SATA0 */
> -	MPP40_GPIO,	/* Power: SATA1 */
> -	MPP41_GPIO,	/* SATA0 present */
> -	MPP42_GPIO,	/* SATA1 present */
> -	MPP43_GPIO,	/* LED: White USB */
> -	MPP44_GPIO,	/* Fan: Tachometer Pin */
> -	MPP45_GPIO,	/* Fan: high speed */
> -	MPP46_GPIO,	/* Fan: low speed */
> -	MPP47_GPIO,	/* Button: Back unmount */
> -	MPP48_GPIO,	/* Button: Back reset */
> -	MPP49_GPIO,	/* Temp Alarm (DNS-325) Pin of U5 (DNS-320) */
> -	0
> -};
> -
> static void dnskw_power_off(void)
> {
> 	gpio_set_value(36, 1);
> @@ -76,8 +41,6 @@ static void __init dnskw_gpio_register(unsigned gpio, char *name, int def)
>
> void __init dnskw_init(void)
> {
> -	kirkwood_mpp_conf(dnskw_mpp_config);
> -
> 	kirkwood_ehci_init();
> 	kirkwood_ge00_init(&dnskw_ge00_data);
>
>

-- 
Jamie Lentin

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 3/9] ARM: Kirkwood: Convert dnskw to pinctrl
  2012-10-25 22:58   ` Jamie Lentin
@ 2012-10-26  6:01     ` Andrew Lunn
  2012-10-26  9:42       ` Jamie Lentin
  0 siblings, 1 reply; 58+ messages in thread
From: Andrew Lunn @ 2012-10-26  6:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Oct 25, 2012 at 11:58:37PM +0100, Jamie Lentin wrote:
> Thanks for doing all this. Some typos to fix, I've commented below
> but I thought it might be easier to push a version for you to steal.
> It's here:
> 
> git://github.com/lentinj/linux.git v3.7-rc2-pinctrl
> https://raw.github.com/lentinj/linux/v3.7-rc2-pinctrl/arch/arm/boot/dts/kirkwood-dnskw.dtsi

Thanks. I will probably squash the three patches into my original, and
add a Signed-off-by: if that is O.K. for you.

> 
> Tested on a DNS-320, not a DNS-325 yet.
> 
> Similar to lsxl_init, the custom GPIO registrations fail:-
> 
> dnskw: failed to configure power-off GPIO
> dnskw: Failed to register dnskw:power:sata0
> dnskw: Failed to register dnskw:power:sata1
> dnskw: Failed to register dnskw:power:recover
> 
> So I guess they will need a new home somewhere.

I hope to look at this problem this weekend. Maybe a gpio regulator
could be a solution, or loading the pinctrl stuff earlier. We will
see.

> However most things (fan, buttons, SATA detect/power via sysfs,
> power via sysfs) work. The key thing that doesn't is LEDs.
> Registration looks reasonable:
> 
> Registered led device: dns320:blue:power
> kirkwood-pinctrl f1010000.pinctrl: request pin 43 (PIN43) for mvebu-gpio:43
> Registered led device: dns320:blue:usb
> kirkwood-pinctrl f1010000.pinctrl: request pin 28 (PIN28) for mvebu-gpio:28
> Registered led device: dns320:orange:l_hdd
> kirkwood-pinctrl f1010000.pinctrl: request pin 27 (PIN27) for mvebu-gpio:27
> Registered led device: dns320:orange:r_hdd
> kirkwood-pinctrl f1010000.pinctrl: request pin 35 (PIN35) for mvebu-gpio:35
> Registered led device: dns320:orange:usb
> 
> However setting brightness on/off does the following:
> cat /sys/class/leds/dns320\:blue\:power/trigger
> 
> dns320:blue:power - No effect, LED continues to blink as bootloader
> configures it
> dns320:orange:l_hdd - Works fine
> dns320:orange:r_hdd - Works fine
> dns320:orange:usb - Turns on, turning off locks NAS hard
> dns320:blue:usb - Turns on, turning off locks NAS hard
> 
> Any ideas?
First thing that comes to mind, is it registering them for the correct
GPIO controller. I think with the new setup, pinctrl and gpio are
closely linked, so maybe, its modifying pins on the wrong controller.
Bit of a long shot....

> >	ocp at f1000000 {
> >+		pinctrl: pinctrl at 10000 {
> >+			compatible = "marvell,88f6281-pinctrl";
> >+			reg = <0x10000 0x20>;
> >+
> >+			pinctrl-0 = < &pmx_uart1 &pmx_sata1
> 
> Need a &pmx_sata0 too (see below).

I just turned the existing MPP setup into pinctrl. Things like SATA,
SPI pins, etc, i left alone if they were not configured in the old C
code. I've no problems adding them here.

> 
> >+				      &pmx_gpio_24 &pmx_gpio_25
> >+				      &pmx_led_power &pmx_led_power
> 
> Shouldn't be repeated, I'm guessing.
> 
> >+				      &pmx_led_red_right_hdd
> >+				      &pmx_led_red_left_hdd
> >+				      &pmx_led_red_usb_325
> >+				      &pmx_gpio_30 &pmx_gpio_31
> >+				      &pmx_gpio_32 &pmx_gpio_33
> >+				      &pmx_button_power
> >+				      &pmx_led_red_usb_320
> >+				      &pmx_power_off &pmx_power_back_on
> >+				      &pmx_power_sata0 &pmx_power_sata1
> >+				      &pmx_present_sata0 &pmx_present_sata1
> >+				      &pmx_led_white_usb &pmx_fan_tacho
> >+				      &pmx_fan_high_speed &pmx_fan_low_speed
> >+				      &pmx_button_unmount &pmx_button_reset
> >+				      &pmx_temp_alarm >;
> >+			pinctrl-names = "default";
> >+
> >+			pmx_uart1: pmx-uart1 {
> >+				marvell,pins = "mpp13", "mpp14";
> >+				marvell,function = "uart1";
> >+			};
> >+			pmx_sata1: pmx-sata1 {
> >+				marvell,pins = "mpp4", "mpp20", "mpp22";
> 
> mpp4 is for the NAND. I'm guessing mpp22 should be mpp21, but this
> should have the "sata0" function.

        MPP_MODE(4,
                MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
                MPP_VAR_FUNCTION(0x1, "nand", "io6",     V(1, 1, 1, 1, 1)),
                MPP_VAR_FUNCTION(0x2, "uart0", "rxd",    V(1, 1, 1, 1, 1)),
                MPP_VAR_FUNCTION(0x5, "sata1", "act",    V(0, 0, 1, 1, 1)),
                MPP_VAR_FUNCTION(0xb, "lcd", "hsync",    V(0, 0, 0, 0, 1)),
                MPP_VAR_FUNCTION(0xd, "ptp", "clk",      V(1, 1, 1, 1, 0))),

4 can be both NAND and SATA. It looks like NAND has to use pins
mpp0-mpp5,mpp18-mmp19, they are not available anywhere else. SATA1 is
duplicated, so we have to be careful to get the right pins.

Maybe boot the old kernel and look these lines:

[   16.187814] initial MPP regs: 01112222 43303311 55550000 00000000 00000000 00000000 00000000
[   16.187833]   final MPP regs: 01552222 03303311 55550000 00000000 00000000 00000000 00000000

The first line is how uboot setup the MPP pins. The second is after
the init function was called.

    Andrew

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 3/9] ARM: Kirkwood: Convert dnskw to pinctrl
  2012-10-26  6:01     ` Andrew Lunn
@ 2012-10-26  9:42       ` Jamie Lentin
  2012-10-26 10:24         ` Andrew Lunn
  0 siblings, 1 reply; 58+ messages in thread
From: Jamie Lentin @ 2012-10-26  9:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 26 Oct 2012, Andrew Lunn wrote:

> On Thu, Oct 25, 2012 at 11:58:37PM +0100, Jamie Lentin wrote:
>> Thanks for doing all this. Some typos to fix, I've commented below
>> but I thought it might be easier to push a version for you to steal.
>> It's here:
>>
>> git://github.com/lentinj/linux.git v3.7-rc2-pinctrl
>> https://raw.github.com/lentinj/linux/v3.7-rc2-pinctrl/arch/arm/boot/dts/kirkwood-dnskw.dtsi
>
> Thanks. I will probably squash the three patches into my original, and
> add a Signed-off-by: if that is O.K. for you.
>

Sounds good.

>>
>> Tested on a DNS-320, not a DNS-325 yet.
>>
>> Similar to lsxl_init, the custom GPIO registrations fail:-
>>
>> dnskw: failed to configure power-off GPIO
>> dnskw: Failed to register dnskw:power:sata0
>> dnskw: Failed to register dnskw:power:sata1
>> dnskw: Failed to register dnskw:power:recover
>>
>> So I guess they will need a new home somewhere.
>
> I hope to look at this problem this weekend. Maybe a gpio regulator
> could be a solution, or loading the pinctrl stuff earlier. We will
> see.
>

I did look at using the gpio-regulator stuff a while back, and decided it 
wasn't quite the right shape. Although I can't remember why, and it might 
have changed since.

The power-off GPIO registration could happen in dnskw_power_off instead, 
or the attempt at a gpio-poweroff driver could be resurrected (I'd 
forgotten about it until now).

I could accept dnskw:power:recover is a weirdo configuration option that 
should be set in the bootloader / userland rather than the kernel 
supporting it. Although it would be nice if the kernel registered it's 
purpose. Maybe GPIO pins could be exported by adding sub-nodes to the GPIO 
chip, if that's not too hackish?

>> However most things (fan, buttons, SATA detect/power via sysfs,
>> power via sysfs) work. The key thing that doesn't is LEDs.
>> Registration looks reasonable:
>>
>> Registered led device: dns320:blue:power
>> kirkwood-pinctrl f1010000.pinctrl: request pin 43 (PIN43) for mvebu-gpio:43
>> Registered led device: dns320:blue:usb
>> kirkwood-pinctrl f1010000.pinctrl: request pin 28 (PIN28) for mvebu-gpio:28
>> Registered led device: dns320:orange:l_hdd
>> kirkwood-pinctrl f1010000.pinctrl: request pin 27 (PIN27) for mvebu-gpio:27
>> Registered led device: dns320:orange:r_hdd
>> kirkwood-pinctrl f1010000.pinctrl: request pin 35 (PIN35) for mvebu-gpio:35
>> Registered led device: dns320:orange:usb
>>
>> However setting brightness on/off does the following:
>> cat /sys/class/leds/dns320\:blue\:power/trigger
>>
>> dns320:blue:power - No effect, LED continues to blink as bootloader
>> configures it
>> dns320:orange:l_hdd - Works fine
>> dns320:orange:r_hdd - Works fine
>> dns320:orange:usb - Turns on, turning off locks NAS hard
>> dns320:blue:usb - Turns on, turning off locks NAS hard
>>
>> Any ideas?
> First thing that comes to mind, is it registering them for the correct
> GPIO controller. I think with the new setup, pinctrl and gpio are
> closely linked, so maybe, its modifying pins on the wrong controller.
> Bit of a long shot....
>

I did wonder that, but then why would turning the LEDs on work fine? I 
wonder if both pins are being toggled or something. I'll investigate 
further and report back. The two that cause the NAS to lock up are the 
only ones on &gpio1 though.

>>> 	ocp at f1000000 {
>>> +		pinctrl: pinctrl at 10000 {
>>> +			compatible = "marvell,88f6281-pinctrl";
>>> +			reg = <0x10000 0x20>;
>>> +
>>> +			pinctrl-0 = < &pmx_uart1 &pmx_sata1
>>
>> Need a &pmx_sata0 too (see below).
>
> I just turned the existing MPP setup into pinctrl. Things like SATA,
> SPI pins, etc, i left alone if they were not configured in the old C
> code. I've no problems adding them here.
>
>>
>>> +				      &pmx_gpio_24 &pmx_gpio_25
>>> +				      &pmx_led_power &pmx_led_power
>>
>> Shouldn't be repeated, I'm guessing.
>>
>>> +				      &pmx_led_red_right_hdd
>>> +				      &pmx_led_red_left_hdd
>>> +				      &pmx_led_red_usb_325
>>> +				      &pmx_gpio_30 &pmx_gpio_31
>>> +				      &pmx_gpio_32 &pmx_gpio_33
>>> +				      &pmx_button_power
>>> +				      &pmx_led_red_usb_320
>>> +				      &pmx_power_off &pmx_power_back_on
>>> +				      &pmx_power_sata0 &pmx_power_sata1
>>> +				      &pmx_present_sata0 &pmx_present_sata1
>>> +				      &pmx_led_white_usb &pmx_fan_tacho
>>> +				      &pmx_fan_high_speed &pmx_fan_low_speed
>>> +				      &pmx_button_unmount &pmx_button_reset
>>> +				      &pmx_temp_alarm >;
>>> +			pinctrl-names = "default";
>>> +
>>> +			pmx_uart1: pmx-uart1 {
>>> +				marvell,pins = "mpp13", "mpp14";
>>> +				marvell,function = "uart1";
>>> +			};
>>> +			pmx_sata1: pmx-sata1 {
>>> +				marvell,pins = "mpp4", "mpp20", "mpp22";
>>
>> mpp4 is for the NAND. I'm guessing mpp22 should be mpp21, but this
>> should have the "sata0" function.
>
>        MPP_MODE(4,
>                MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
>                MPP_VAR_FUNCTION(0x1, "nand", "io6",     V(1, 1, 1, 1, 1)),
>                MPP_VAR_FUNCTION(0x2, "uart0", "rxd",    V(1, 1, 1, 1, 1)),
>                MPP_VAR_FUNCTION(0x5, "sata1", "act",    V(0, 0, 1, 1, 1)),
>                MPP_VAR_FUNCTION(0xb, "lcd", "hsync",    V(0, 0, 0, 0, 1)),
>                MPP_VAR_FUNCTION(0xd, "ptp", "clk",      V(1, 1, 1, 1, 0))),
>
> 4 can be both NAND and SATA. It looks like NAND has to use pins
> mpp0-mpp5,mpp18-mmp19, they are not available anywhere else. SATA1 is
> duplicated, so we have to be careful to get the right pins.
>

The sata0 and sata1 activity leds are definitely MPP20 and MPP21---I've 
set them up as GPIO leds before successfully.

> Maybe boot the old kernel and look these lines:
>
> [   16.187814] initial MPP regs: 01112222 43303311 55550000 00000000 00000000 00000000 00000000
> [   16.187833]   final MPP regs: 01552222 03303311 55550000 00000000 00000000 00000000 00000000
>
> The first line is how uboot setup the MPP pins. The second is after
> the init function was called.

initial MPP regs: 01111111 03303311 00551100 00000000 00000000 00000000 00000000
   final MPP regs: 01111111 03303311 00551100 00000000 00000000 00000000 00000000

Although the initial MPP regs is also set by a recompiled u-boot with 
~identical MPP setup code.

>
>    Andrew
>

-- 
Jamie Lentin

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 3/9] ARM: Kirkwood: Convert dnskw to pinctrl
  2012-10-26  9:42       ` Jamie Lentin
@ 2012-10-26 10:24         ` Andrew Lunn
  2012-10-26 12:30           ` Jamie Lentin
  0 siblings, 1 reply; 58+ messages in thread
From: Andrew Lunn @ 2012-10-26 10:24 UTC (permalink / raw)
  To: linux-arm-kernel

> I did look at using the gpio-regulator stuff a while back, and
> decided it wasn't quite the right shape. Although I can't remember
> why, and it might have changed since.

O.K. I will look at it this weekend.
 
> The power-off GPIO registration could happen in dnskw_power_off
> instead, or the attempt at a gpio-poweroff driver could be
> resurrected (I'd forgotten about it until now).

I dusted the code off last weekend, but ran out of time.  I wanted to
make it also support the pxa use-case.

> I could accept dnskw:power:recover is a weirdo configuration option
> that should be set in the bootloader / userland rather than the
> kernel supporting it. Although it would be nice if the kernel
> registered it's purpose. Maybe GPIO pins could be exported by adding
> sub-nodes to the GPIO chip, if that's not too hackish?

We need some sort of solution. It is quite common to use GPIO this
way, to enable power, etc. So either we need some form of gpio
regulator, or the ability to set gpio defaults as you said in the gpio
DT node, or fix the ordering so the init function can set them up.
 
> >First thing that comes to mind, is it registering them for the correct
> >GPIO controller. I think with the new setup, pinctrl and gpio are
> >closely linked, so maybe, its modifying pins on the wrong controller.
> >Bit of a long shot....
> >
> 
> I did wonder that, but then why would turning the LEDs on work fine?
> I wonder if both pins are being toggled or something. I'll
> investigate further and report back. The two that cause the NAS to
> lock up are the only ones on &gpio1 though.

What would they map to on gpio0? NAND? 

> The sata0 and sata1 activity leds are definitely MPP20 and
> MPP21---I've set them up as GPIO leds before successfully.

O.K.

> >[   16.187814] initial MPP regs: 01112222 43303311 55550000 00000000 00000000 00000000 00000000
> >[   16.187833]   final MPP regs: 01552222 03303311 55550000 00000000 00000000 00000000 00000000
> >
> >The first line is how uboot setup the MPP pins. The second is after
> >the init function was called.
> 
> initial MPP regs: 01111111 03303311 00551100 00000000 00000000 00000000 00000000
>   final MPP regs: 01111111 03303311 00551100 00000000 00000000 00000000 00000000
> 
> Although the initial MPP regs is also set by a recompiled u-boot
> with ~identical MPP setup code.

It might be useful to generate the same sort of dumps with the new
driver, even if its code just hacked in for testing.

	Andrew

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 3/9] ARM: Kirkwood: Convert dnskw to pinctrl
  2012-10-26 10:24         ` Andrew Lunn
@ 2012-10-26 12:30           ` Jamie Lentin
  0 siblings, 0 replies; 58+ messages in thread
From: Jamie Lentin @ 2012-10-26 12:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 26 Oct 2012, Andrew Lunn wrote:

>> I did look at using the gpio-regulator stuff a while back, and
>> decided it wasn't quite the right shape. Although I can't remember
>> why, and it might have changed since.
>
> O.K. I will look at it this weekend.
>
>> The power-off GPIO registration could happen in dnskw_power_off
>> instead, or the attempt at a gpio-poweroff driver could be
>> resurrected (I'd forgotten about it until now).
>
> I dusted the code off last weekend, but ran out of time.  I wanted to
> make it also support the pxa use-case.

Okay, I'm unlikely to get a chance to have a play with it for a week or so 
but if I do I'll let you know.

>> I could accept dnskw:power:recover is a weirdo configuration option
>> that should be set in the bootloader / userland rather than the
>> kernel supporting it. Although it would be nice if the kernel
>> registered it's purpose. Maybe GPIO pins could be exported by adding
>> sub-nodes to the GPIO chip, if that's not too hackish?
>
> We need some sort of solution. It is quite common to use GPIO this
> way, to enable power, etc. So either we need some form of gpio
> regulator, or the ability to set gpio defaults as you said in the gpio
> DT node, or fix the ordering so the init function can set them up.

Setting the defaults in the DT gpio node would get my vote, as it pretty 
much removes board-dnskw.c, and there'd be easy sysfs files to turn the 
pins on/off (maybe someone out there doesn't want their NAS to turn back 
on after a power failure...).

>>> First thing that comes to mind, is it registering them for the correct
>>> GPIO controller. I think with the new setup, pinctrl and gpio are
>>> closely linked, so maybe, its modifying pins on the wrong controller.
>>> Bit of a long shot....
>>>
>>
>> I did wonder that, but then why would turning the LEDs on work fine?
>> I wonder if both pins are being toggled or something. I'll
>> investigate further and report back. The two that cause the NAS to
>> lock up are the only ones on &gpio1 though.
>
> What would they map to on gpio0? NAND?
>

3 & 11, so NAND and UART0 RX. But it's not just that the console is dead, 
I can't ping the NAS any more either. However the power LED is still 
blinking via. hardware GPIO blink.

>> The sata0 and sata1 activity leds are definitely MPP20 and
>> MPP21---I've set them up as GPIO leds before successfully.
>
> O.K.
>
>>> [   16.187814] initial MPP regs: 01112222 43303311 55550000 00000000 00000000 00000000 00000000
>>> [   16.187833]   final MPP regs: 01552222 03303311 55550000 00000000 00000000 00000000 00000000
>>>
>>> The first line is how uboot setup the MPP pins. The second is after
>>> the init function was called.
>>
>> initial MPP regs: 01111111 03303311 00551100 00000000 00000000 00000000 00000000
>>   final MPP regs: 01111111 03303311 00551100 00000000 00000000 00000000 00000000
>>
>> Although the initial MPP regs is also set by a recompiled u-boot
>> with ~identical MPP setup code.
>
> It might be useful to generate the same sort of dumps with the new
> driver, even if its code just hacked in for testing.

I'd been looking at the debugfs output if you hadn't spotted it:

root at rocoto:~# cat /debug/pinctrl/f1010000.pinctrl/pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
pin 0 (PIN0): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function nand group mpp0
pin 1 (PIN1): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function nand group mpp1
pin 2 (PIN2): f1010000.pinctrl (GPIO UNCLAIMED) (HOG) function nand group mpp2
  . . .

Although it doesn't say what the initial MPP setup was.

>
> 	Andrew
>

-- 
Jamie Lentin

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 6/9] ARM: Kirkwood: Convert GoFlex Net to pinctrl.
  2012-10-24 14:53 ` [PATCH 6/9] ARM: Kirkwood: Convert GoFlex Net " Andrew Lunn
@ 2012-10-26 17:28   ` Josh Coombs
  2012-10-27  8:51     ` Andrew Lunn
  2012-10-28 14:31   ` Josh Coombs
  1 sibling, 1 reply; 58+ messages in thread
From: Josh Coombs @ 2012-10-26 17:28 UTC (permalink / raw)
  To: linux-arm-kernel

Initial test with my 3.7-rc2 DT kernel config failed when it tried to
build modules:

  Building modules, stage 2.
  MODPOST 733 modules
ERROR: "read_current_timer" [drivers/video/udlfb.ko] undefined!
ERROR: "read_current_timer" [crypto/tcrypt.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

I didn't realize my play kernel test package still includes the
following patch, I thought it had been dealt with already.  Should I
start a new thread on this issue?

diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
index 60d3b73..6a37f8d 100644
--- a/arch/arm/kernel/armksyms.c
+++ b/arch/arm/kernel/armksyms.c
@@ -50,6 +50,7 @@ extern void fpundefinstr(void);

        /* platform dependent support */
 EXPORT_SYMBOL(arm_delay_ops);
+EXPORT_SYMBOL(read_current_timer);

        /* networking */
 EXPORT_SYMBOL(csum_partial);


In the mean time, I'll start a build with the default conf as
suggested and post test results once I have them.

Josh Coombs

On Wed, Oct 24, 2012 at 10:53 AM, Andrew Lunn <andrew@lunn.ch> wrote:
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>  arch/arm/boot/dts/kirkwood-goflexnet.dts |   57 ++++++++++++++++++++++++++++++
>  arch/arm/mach-kirkwood/board-goflexnet.c |   18 ----------
>  2 files changed, 57 insertions(+), 18 deletions(-)
>
> diff --git a/arch/arm/boot/dts/kirkwood-goflexnet.dts b/arch/arm/boot/dts/kirkwood-goflexnet.dts
> index 7c8238f..46d16a2 100644
> --- a/arch/arm/boot/dts/kirkwood-goflexnet.dts
> +++ b/arch/arm/boot/dts/kirkwood-goflexnet.dts
> @@ -16,6 +16,63 @@
>         };
>
>         ocp at f1000000 {
> +               pinctrl: pinctrl at 10000 {
> +                       compatible = "marvell,88f6281-pinctrl";
> +                       reg = <0x10000 0x20>;
> +
> +                       pinctrl-0 = < &pmx_usb_power_enable &pmx_led_orange
> +                                     &pmx_led_left_cap_0 &pmx_led_left_cap_1
> +                                     &pmx_led_left_cap_2 &pmx_led_left_cap_3
> +                                     &pmx_led_right_cap_0 &pmx_led_right_cap_1
> +                                     &pmx_led_right_cap_2 &pmx_led_right_cap_3
> +                                   >;
> +                       pinctrl-names = "default";
> +
> +                       pmx_usb_power_enable: pmx-usb-power-enable {
> +                               marvell,pins = "mpp29";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_right_cap_0: pmx-led_right_cap_0 {
> +                               marvell,pins = "mpp38";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_right_cap_1: pmx-led_right_cap_1 {
> +                               marvell,pins = "mpp39";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_right_cap_2: pmx-led_right_cap_2 {
> +                               marvell,pins = "mpp40";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_right_cap_3: pmx-led_right_cap_3 {
> +                               marvell,pins = "mpp41";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_left_cap_0: pmx-led_left_cap_0 {
> +                               marvell,pins = "mpp42";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_left_cap_1: pmx-led_left_cap_1 {
> +                               marvell,pins = "mpp43";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_left_cap_2: pmx-led_left_cap_2 {
> +                               marvell,pins = "mpp44";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_left_cap_3: pmx-led_left_cap_3 {
> +                               marvell,pins = "mpp45";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_green: pmx-led_green {
> +                               marvell,pins = "mpp46";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_orange: pmx-led_orange {
> +                               marvell,pins = "mpp47";
> +                               marvell,function = "gpio";
> +                       };
> +               };
>                 serial at 12000 {
>                         clock-frequency = <200000000>;
>                         status = "ok";
> diff --git a/arch/arm/mach-kirkwood/board-goflexnet.c b/arch/arm/mach-kirkwood/board-goflexnet.c
> index 001ca8c..9643f4b 100644
> --- a/arch/arm/mach-kirkwood/board-goflexnet.c
> +++ b/arch/arm/mach-kirkwood/board-goflexnet.c
> @@ -34,34 +34,16 @@
>  #include <mach/bridge-regs.h>
>  #include <linux/platform_data/mmc-mvsdio.h>
>  #include "common.h"
> -#include "mpp.h"
>
>  static struct mv643xx_eth_platform_data goflexnet_ge00_data = {
>         .phy_addr       = MV643XX_ETH_PHY_ADDR(0),
>  };
>
> -static unsigned int goflexnet_mpp_config[] __initdata = {
> -       MPP29_GPIO,     /* USB Power Enable */
> -       MPP47_GPIO,     /* LED Orange */
> -       MPP46_GPIO,     /* LED Green */
> -       MPP45_GPIO,     /* LED Left Capacity 3 */
> -       MPP44_GPIO,     /* LED Left Capacity 2 */
> -       MPP43_GPIO,     /* LED Left Capacity 1 */
> -       MPP42_GPIO,     /* LED Left Capacity 0 */
> -       MPP41_GPIO,     /* LED Right Capacity 3 */
> -       MPP40_GPIO,     /* LED Right Capacity 2 */
> -       MPP39_GPIO,     /* LED Right Capacity 1 */
> -       MPP38_GPIO,     /* LED Right Capacity 0 */
> -       0
> -};
> -
>  void __init goflexnet_init(void)
>  {
>         /*
>          * Basic setup. Needs to be called early.
>          */
> -       kirkwood_mpp_conf(goflexnet_mpp_config);
> -
>         if (gpio_request(29, "USB Power Enable") != 0 ||
>             gpio_direction_output(29, 1) != 0)
>                 pr_err("can't setup GPIO 29 (USB Power Enable)\n");
> --
> 1.7.10.4
>

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-25  7:43             ` Thomas Petazzoni
  2012-10-25 20:19               ` Michael Walle
@ 2012-10-26 18:06               ` Michael Walle
  2012-10-26 18:45                 ` Thomas Petazzoni
  1 sibling, 1 reply; 58+ messages in thread
From: Michael Walle @ 2012-10-26 18:06 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Thomas

Am Donnerstag 25 Oktober 2012, 09:43:43 schrieb Thomas Petazzoni:
> Regardless of those GPIOs, did you solve the hang that happened even
> when you removed the gpio_set_value() calls? Or is it still a problem
> currently?

quick update, i found out, that my board loops in the mvebu interrupt handler 
mvebu_gpio_irq_handler(). maybe this is also the lockup Jamie Lentin sees.

are interrupts always enabled, now? is there a way to control them? maybe 
there is something missing in the dts, now.

-- 
michael

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-26 18:06               ` Michael Walle
@ 2012-10-26 18:45                 ` Thomas Petazzoni
  2012-10-26 20:17                   ` Michael Walle
  0 siblings, 1 reply; 58+ messages in thread
From: Thomas Petazzoni @ 2012-10-26 18:45 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Michael Walle,

On Fri, 26 Oct 2012 20:06:15 +0200, Michael Walle wrote:

> Am Donnerstag 25 Oktober 2012, 09:43:43 schrieb Thomas Petazzoni:
> > Regardless of those GPIOs, did you solve the hang that happened even
> > when you removed the gpio_set_value() calls? Or is it still a
> > problem currently?
> 
> quick update, i found out, that my board loops in the mvebu interrupt
> handler mvebu_gpio_irq_handler(). maybe this is also the lockup Jamie
> Lentin sees.
> 
> are interrupts always enabled, now? is there a way to control them?
> maybe there is something missing in the dts, now.

Ah, this is interesting. It is not entirely surprising, since the gpio
driver is new. Even though it re-uses most of the previous gpio driver,
it is by far not impossible that there will be a few regressions.

Could you add a few debug prints to see if you're looping *inside* the
function (which I find pretty unlikely), or if the function gets called
over and over again? Could it be that the hang occurs during the
initialization of the gpio-leds or gpio-keys drivers?

Also, even though I'm pretty sure it isn't going to fix your problem,
note the following mvebu-gpio fix:

  http://article.gmane.org/gmane.linux.ports.arm.kernel/195018

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-26 18:45                 ` Thomas Petazzoni
@ 2012-10-26 20:17                   ` Michael Walle
  2012-10-27  8:59                     ` Andrew Lunn
  0 siblings, 1 reply; 58+ messages in thread
From: Michael Walle @ 2012-10-26 20:17 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Thomas.

Am Freitag 26 Oktober 2012, 20:45:05 schrieb Thomas Petazzoni:
> Ah, this is interesting. It is not entirely surprising, since the gpio
> driver is new. Even though it re-uses most of the previous gpio driver,
> it is by far not impossible that there will be a few regressions.
> 
> Could you add a few debug prints to see if you're looping *inside* the
> function (which I find pretty unlikely), or if the function gets called
> over and over again? 

ah sorry, my bad. of course the handler is called forever:

mvebu_gpio_to_irq pin=8
mvebu_gpio_irq_set_type pin=8
mvebu_gpio_edge_irq_unmask
mvebu_gpio_irq_handler irq=103
mvebu_gpio_level_irq_mask irq=103
mvebu_gpio_irq_handler irq=100
mvebu_gpio_level_irq_mask irq=100
mvebu_gpio_irq_handler irq=101
mvebu_gpio_level_irq_mask irq=101
mvebu_gpio_irq_handler irq=102
mvebu_gpio_level_irq_mask irq=102
mvebu_gpio_irq_handler irq=103
mvebu_gpio_level_irq_mask irq=103
mvebu_gpio_irq_handler irq=112
mvebu_gpio_level_irq_mask irq=112
mvebu_gpio_irq_handler irq=103
mvebu_gpio_level_irq_mask irq=103
mvebu_gpio_irq_handler irq=103
mvebu_gpio_level_irq_mask irq=103
mvebu_gpio_irq_handler irq=103
mvebu_gpio_level_irq_mask irq=103
mvebu_gpio_irq_handler irq=103
mvebu_gpio_level_irq_mask irq=103
mvebu_gpio_irq_handler irq=103
mvebu_gpio_level_irq_mask irq=103
mvebu_gpio_irq_handler irq=103
mvebu_gpio_level_irq_mask irq=103
mvebu_gpio_irq_handler irq=103
mvebu_gpio_level_irq_mask irq=103
mvebu_gpio_irq_handler irq=103
[..]

> Could it be that the hang occurs during the
> initialization of the gpio-leds or gpio-keys drivers?

yeah, if i disable gpio-leds, gpio-keys and gpio-fan the hang will disappear. 
But once i enable one of it the board hangs again.


> Also, even though I'm pretty sure it isn't going to fix your problem,
> note the following mvebu-gpio fix:
> 
>   http://article.gmane.org/gmane.linux.ports.arm.kernel/195018

thats already in andrew's tree.

-- 
michael

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 6/9] ARM: Kirkwood: Convert GoFlex Net to pinctrl.
  2012-10-26 17:28   ` Josh Coombs
@ 2012-10-27  8:51     ` Andrew Lunn
  0 siblings, 0 replies; 58+ messages in thread
From: Andrew Lunn @ 2012-10-27  8:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Oct 26, 2012 at 01:28:08PM -0400, Josh Coombs wrote:
> Initial test with my 3.7-rc2 DT kernel config failed when it tried to
> build modules:
> 
>   Building modules, stage 2.
>   MODPOST 733 modules
> ERROR: "read_current_timer" [drivers/video/udlfb.ko] undefined!
> ERROR: "read_current_timer" [crypto/tcrypt.ko] undefined!
> make[1]: *** [__modpost] Error 1
> make: *** [modules] Error 2
> 
> I didn't realize my play kernel test package still includes the
> following patch, I thought it had been dealt with already.  Should I
> start a new thread on this issue?

Hi Josh

It is a known issue which i've seen discussed on the lists. I expect
it to be fixed soon.

   Andrew

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-26 20:17                   ` Michael Walle
@ 2012-10-27  8:59                     ` Andrew Lunn
  0 siblings, 0 replies; 58+ messages in thread
From: Andrew Lunn @ 2012-10-27  8:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Oct 26, 2012 at 10:17:46PM +0200, Michael Walle wrote:
> Hi Thomas.
> 
> Am Freitag 26 Oktober 2012, 20:45:05 schrieb Thomas Petazzoni:
> > Ah, this is interesting. It is not entirely surprising, since the gpio
> > driver is new. Even though it re-uses most of the previous gpio driver,
> > it is by far not impossible that there will be a few regressions.
> > 
> > Could you add a few debug prints to see if you're looping *inside* the
> > function (which I find pretty unlikely), or if the function gets called
> > over and over again? 
> 
> ah sorry, my bad. of course the handler is called forever:
> 
> mvebu_gpio_to_irq pin=8
> mvebu_gpio_irq_set_type pin=8
> mvebu_gpio_edge_irq_unmask
> mvebu_gpio_irq_handler irq=103
> mvebu_gpio_level_irq_mask irq=103
> mvebu_gpio_irq_handler irq=100
> mvebu_gpio_level_irq_mask irq=100
> mvebu_gpio_irq_handler irq=101
> mvebu_gpio_level_irq_mask irq=101
> mvebu_gpio_irq_handler irq=102
> mvebu_gpio_level_irq_mask irq=102
> mvebu_gpio_irq_handler irq=103
> mvebu_gpio_level_irq_mask irq=103
> mvebu_gpio_irq_handler irq=112
> mvebu_gpio_level_irq_mask irq=112
> mvebu_gpio_irq_handler irq=103
> mvebu_gpio_level_irq_mask irq=103
> mvebu_gpio_irq_handler irq=103
> mvebu_gpio_level_irq_mask irq=103
> mvebu_gpio_irq_handler irq=103
> mvebu_gpio_level_irq_mask irq=103
> mvebu_gpio_irq_handler irq=103
> mvebu_gpio_level_irq_mask irq=103
> mvebu_gpio_irq_handler irq=103
> mvebu_gpio_level_irq_mask irq=103
> mvebu_gpio_irq_handler irq=103
> mvebu_gpio_level_irq_mask irq=103
> mvebu_gpio_irq_handler irq=103
> mvebu_gpio_level_irq_mask irq=103
> mvebu_gpio_irq_handler irq=103

That makes me think edge vs level triggering.

For gpio-keys you want edge triggered interrupts, but if the
controller is setup for level, you would see this.

Try adding some debug into the function mvebu_gpio_irq_set_type()

    Andrew

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 6/9] ARM: Kirkwood: Convert GoFlex Net to pinctrl.
  2012-10-24 14:53 ` [PATCH 6/9] ARM: Kirkwood: Convert GoFlex Net " Andrew Lunn
  2012-10-26 17:28   ` Josh Coombs
@ 2012-10-28 14:31   ` Josh Coombs
  1 sibling, 0 replies; 58+ messages in thread
From: Josh Coombs @ 2012-10-28 14:31 UTC (permalink / raw)
  To: linux-arm-kernel

Tested-by: Joshua Coombs <josh.coombs@gmail.com>

On Wed, Oct 24, 2012 at 10:53 AM, Andrew Lunn <andrew@lunn.ch> wrote:
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>  arch/arm/boot/dts/kirkwood-goflexnet.dts |   57 ++++++++++++++++++++++++++++++
>  arch/arm/mach-kirkwood/board-goflexnet.c |   18 ----------
>  2 files changed, 57 insertions(+), 18 deletions(-)
>
> diff --git a/arch/arm/boot/dts/kirkwood-goflexnet.dts b/arch/arm/boot/dts/kirkwood-goflexnet.dts
> index 7c8238f..46d16a2 100644
> --- a/arch/arm/boot/dts/kirkwood-goflexnet.dts
> +++ b/arch/arm/boot/dts/kirkwood-goflexnet.dts
> @@ -16,6 +16,63 @@
>         };
>
>         ocp at f1000000 {
> +               pinctrl: pinctrl at 10000 {
> +                       compatible = "marvell,88f6281-pinctrl";
> +                       reg = <0x10000 0x20>;
> +
> +                       pinctrl-0 = < &pmx_usb_power_enable &pmx_led_orange
> +                                     &pmx_led_left_cap_0 &pmx_led_left_cap_1
> +                                     &pmx_led_left_cap_2 &pmx_led_left_cap_3
> +                                     &pmx_led_right_cap_0 &pmx_led_right_cap_1
> +                                     &pmx_led_right_cap_2 &pmx_led_right_cap_3
> +                                   >;
> +                       pinctrl-names = "default";
> +
> +                       pmx_usb_power_enable: pmx-usb-power-enable {
> +                               marvell,pins = "mpp29";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_right_cap_0: pmx-led_right_cap_0 {
> +                               marvell,pins = "mpp38";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_right_cap_1: pmx-led_right_cap_1 {
> +                               marvell,pins = "mpp39";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_right_cap_2: pmx-led_right_cap_2 {
> +                               marvell,pins = "mpp40";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_right_cap_3: pmx-led_right_cap_3 {
> +                               marvell,pins = "mpp41";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_left_cap_0: pmx-led_left_cap_0 {
> +                               marvell,pins = "mpp42";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_left_cap_1: pmx-led_left_cap_1 {
> +                               marvell,pins = "mpp43";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_left_cap_2: pmx-led_left_cap_2 {
> +                               marvell,pins = "mpp44";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_left_cap_3: pmx-led_left_cap_3 {
> +                               marvell,pins = "mpp45";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_green: pmx-led_green {
> +                               marvell,pins = "mpp46";
> +                               marvell,function = "gpio";
> +                       };
> +                       pmx_led_orange: pmx-led_orange {
> +                               marvell,pins = "mpp47";
> +                               marvell,function = "gpio";
> +                       };
> +               };
>                 serial at 12000 {
>                         clock-frequency = <200000000>;
>                         status = "ok";
> diff --git a/arch/arm/mach-kirkwood/board-goflexnet.c b/arch/arm/mach-kirkwood/board-goflexnet.c
> index 001ca8c..9643f4b 100644
> --- a/arch/arm/mach-kirkwood/board-goflexnet.c
> +++ b/arch/arm/mach-kirkwood/board-goflexnet.c
> @@ -34,34 +34,16 @@
>  #include <mach/bridge-regs.h>
>  #include <linux/platform_data/mmc-mvsdio.h>
>  #include "common.h"
> -#include "mpp.h"
>
>  static struct mv643xx_eth_platform_data goflexnet_ge00_data = {
>         .phy_addr       = MV643XX_ETH_PHY_ADDR(0),
>  };
>
> -static unsigned int goflexnet_mpp_config[] __initdata = {
> -       MPP29_GPIO,     /* USB Power Enable */
> -       MPP47_GPIO,     /* LED Orange */
> -       MPP46_GPIO,     /* LED Green */
> -       MPP45_GPIO,     /* LED Left Capacity 3 */
> -       MPP44_GPIO,     /* LED Left Capacity 2 */
> -       MPP43_GPIO,     /* LED Left Capacity 1 */
> -       MPP42_GPIO,     /* LED Left Capacity 0 */
> -       MPP41_GPIO,     /* LED Right Capacity 3 */
> -       MPP40_GPIO,     /* LED Right Capacity 2 */
> -       MPP39_GPIO,     /* LED Right Capacity 1 */
> -       MPP38_GPIO,     /* LED Right Capacity 0 */
> -       0
> -};
> -
>  void __init goflexnet_init(void)
>  {
>         /*
>          * Basic setup. Needs to be called early.
>          */
> -       kirkwood_mpp_conf(goflexnet_mpp_config);
> -
>         if (gpio_request(29, "USB Power Enable") != 0 ||
>             gpio_direction_output(29, 1) != 0)
>                 pr_err("can't setup GPIO 29 (USB Power Enable)\n");
> --
> 1.7.10.4
>

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 8/9] ARM: Kirkwood: Convert lsxl boards to pinctrl.
  2012-10-24 14:53 ` [PATCH 8/9] ARM: Kirkwood: Convert lsxl boards " Andrew Lunn
  2012-10-24 20:37   ` Michael Walle
@ 2012-10-28 16:40   ` Michael Walle
  1 sibling, 0 replies; 58+ messages in thread
From: Michael Walle @ 2012-10-28 16:40 UTC (permalink / raw)
  To: linux-arm-kernel

[This is also includes the annotations from my previous reply. I missed the 
mpp43<->mpp48 in my previous reply]

Am Mittwoch 24 Oktober 2012, 16:53:53 schrieb Andrew Lunn:
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>  arch/arm/boot/dts/kirkwood-lsxl.dtsi |   67
> ++++++++++++++++++++++++++++++++++ arch/arm/mach-kirkwood/board-lsxl.c  | 
>  19 ----------
>  2 files changed, 67 insertions(+), 19 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/kirkwood-lsxl.dtsi
> b/arch/arm/boot/dts/kirkwood-lsxl.dtsi index 8fea375..01d6e3a 100644
> --- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi
> +++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
> @@ -6,6 +6,73 @@
>  	};
> 
>  	ocp at f1000000 {
> +		pinctrl: pinctrl at 10000 {
> +			compatible = "marvell,88f6281-pinctrl";
> +			reg = <0x10000 0x20>;
> +
> +			pinctrl-0 = < &pmx_power_hdd &pmx_usb_vbus
> +				      &pmx_fan_low &pmx_fan_high
> +				      &pmx_led_function_red &pmx_led_alarm
> +				      &pmx_led_info &pmx_led_power
> +				      &pmx_fan_lock &pmx_button_function
> +				      &pmx_power_switch &pmx_power_auto_switch
> +				      &pmx_led_function_blue >;
> +			pinctrl-names = "default";
> +
> +			pmx_power_hdd: pmx-power-hdd {
> +				marvell,pins = "mpp10";
> +				marvell,function = "gpio";
gpo

> +			};
> +			pmx_usb_vbus: pmx-usb-vbus {
> +				marvell,pins = "mpp11";
> +				marvell,function = "gpio";
> +			};
> +			pmx_fan_high: pmx-fan-high {
> +				marvell,pins = "mpp18";
> +				marvell,function = "gpo";
> +			};
> +			pmx_fan_low: pmx-fan-low {
> +				marvell,pins = "mpp19";
> +				marvell,function = "gpo";
> +			};
> +			pmx_led_function_blue: pmx-led-function-blue {
> +				marvell,pins = "mpp36";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_alarm: pmx-led-alarm {
> +				marvell,pins = "mpp37";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_info: pmx-led-info {
> +				marvell,pins = "mpp38";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_power: pmx-led-power {
> +				marvell,pins = "mpp39";
> +				marvell,function = "gpio";
> +			};
> +			pmx_fan_lock: pmx-fan-lock {
> +				marvell,pins = "mpp40";
> +				marvell,function = "gpo";
gpio

> +			};
> +			pmx_button_function: pmx-button-function {
> +				marvell,pins = "mpp41";
> +				marvell,function = "gpio";
> +			};
> +			pmx_power_switch: pmx-power-switch {
> +				marvell,pins = "mpp42";
> +				marvell,function = "gpio";
> +			};
> +			pmx_power_auto_switch: pmx-power-auto-switch {
> +				marvell,pins = "mpp43";
> +				marvell,function = "gpio";
> +			};
> +			pmx_led_function_red: pmx-led-function_red {
> +				marvell,pins = "mpp43";
mpp48

> +				marvell,function = "gpio";
> +			};
> +
> +		};
>  		sata at 80000 {
>  			status = "okay";
>  			nr-ports = <1>;
> diff --git a/arch/arm/mach-kirkwood/board-lsxl.c
> b/arch/arm/mach-kirkwood/board-lsxl.c index 83d8975..868bdb0 100644
> --- a/arch/arm/mach-kirkwood/board-lsxl.c
> +++ b/arch/arm/mach-kirkwood/board-lsxl.c
> @@ -26,7 +26,6 @@
>  #include <asm/mach/arch.h>
>  #include <mach/kirkwood.h>
>  #include "common.h"
> -#include "mpp.h"
> 
>  static struct mv643xx_eth_platform_data lsxl_ge00_data = {
>  	.phy_addr	= MV643XX_ETH_PHY_ADDR(0),
> @@ -36,23 +35,6 @@ static struct mv643xx_eth_platform_data lsxl_ge01_data =
> { .phy_addr	= MV643XX_ETH_PHY_ADDR(8),
>  };
> 
> -static unsigned int lsxl_mpp_config[] __initdata = {
> -	MPP10_GPO,	/* HDD Power Enable */
> -	MPP11_GPIO,	/* USB Vbus Enable */
> -	MPP18_GPO,	/* FAN High Enable# */
> -	MPP19_GPO,	/* FAN Low Enable# */
> -	MPP36_GPIO,	/* Function Blue LED */
> -	MPP37_GPIO,	/* Alarm LED */
> -	MPP38_GPIO,	/* Info LED */
> -	MPP39_GPIO,	/* Power LED */
> -	MPP40_GPIO,	/* Fan Lock */
> -	MPP41_GPIO,	/* Function Button */
> -	MPP42_GPIO,	/* Power Switch */
> -	MPP43_GPIO,	/* Power Auto Switch */
> -	MPP48_GPIO,	/* Function Red LED */
> -	0
> -};
> -
>  #define LSXL_GPIO_FAN_HIGH	18
>  #define LSXL_GPIO_FAN_LOW	19
>  #define LSXL_GPIO_FAN_LOCK	40
> @@ -119,7 +101,6 @@ void __init lsxl_init(void)
>  	/*
>  	 * Basic setup. Needs to be called early.
>  	 */
> -	kirkwood_mpp_conf(lsxl_mpp_config);
> 
>  	/* usb and sata power on */
>  	gpio_set_value(LSXL_GPIO_USB_POWER, 1);


-- 
Michael

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-24 14:53 [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl Andrew Lunn
                   ` (10 preceding siblings ...)
  2012-10-24 18:06 ` Michael Walle
@ 2012-10-28 16:57 ` Andrew Lunn
  2012-10-28 18:17   ` Michael Walle
                     ` (6 more replies)
  11 siblings, 7 replies; 58+ messages in thread
From: Andrew Lunn @ 2012-10-28 16:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 24, 2012 at 04:53:45PM +0200, Andrew Lunn wrote:
> This patchset converts all DT kirkwood boards to using pinctrl.

Thanks for the feedback everybody gave.

Progress has been made:

The bug causing the lockups has been found, fixed and passed upstream.

I factored out the repeated pinmux definitions for sata0, sata1, spi,
twsi0, uart0, uart1.

I fixed a few types reported by testers.

I found a solution to many of the gpio_request() failures. The ones
for controlling power to SATA or USB i've replaced with a regulator in
DT. The regulator will grab the GPIO, set it to output, and driver it
high/low as required. I just hope we don't have an ordering issue.
The regulator framework seems to load quite early and probes all the
regulators. This fails, because pinctrl has not yet loaded, so the
gpio framework returns EPROBE_DEFER. This is not fatal to the
regulator framework, it tries again later. But this later is after
most of the rest of the drivers have loaded. So we might get into
issues where uboot has not enabled power to USB/SATA, the driver is
probed and fails because of the lack of power, and once things of gone
wrong, we turn the power on.

I still expect problems with GPIOs used for power off. I've not yet
touched them. Again, a regulator makes sense, but there is no 'out of
the box' regulator type or property which adds itself to pm_power_off.

The last problem is:

        /* Set NAS to turn back on after a power failure */
        dnskw_gpio_register(37, "dnskw:power:recover", 1);

I think its a bit of a stretch calling this a regulator.

Since the current patchset is 18 patches, plus a few other bug fixes
and dependencies, i'm not going to post them all here. I think we are
still at the smoke/no-smoke stage of testing. Please pull from:

git://github.com/lunn/linux.git v3.7-rc2-pinctrl-v2

and let me know if things work, what typo's need fixing, where the
smoke comes out, etc.

      Thanks
	Andrew

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-28 16:57 ` Andrew Lunn
@ 2012-10-28 18:17   ` Michael Walle
  2012-10-28 19:50   ` Simon Baatz
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 58+ messages in thread
From: Michael Walle @ 2012-10-28 18:17 UTC (permalink / raw)
  To: linux-arm-kernel


Hi Andrew,

Am Sonntag 28 Oktober 2012, 17:57:11 schrieb Andrew Lunn:
> Since the current patchset is 18 patches, plus a few other bug fixes
> and dependencies, i'm not going to post them all here. I think we are
> still at the smoke/no-smoke stage of testing. Please pull from:
> 
> git://github.com/lunn/linux.git v3.7-rc2-pinctrl-v2
> 
> and let me know if things work, what typo's need fixing, where the
> smoke comes out, etc.

works for me now.

Thanks, Andrew

-- 
michael

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-28 16:57 ` Andrew Lunn
  2012-10-28 18:17   ` Michael Walle
@ 2012-10-28 19:50   ` Simon Baatz
  2012-10-28 20:01     ` Andrew Lunn
  2012-10-28 21:06   ` Jamie Lentin
                     ` (4 subsequent siblings)
  6 siblings, 1 reply; 58+ messages in thread
From: Simon Baatz @ 2012-10-28 19:50 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Andrew,

On Sun, Oct 28, 2012 at 05:57:11PM +0100, Andrew Lunn wrote:
> On Wed, Oct 24, 2012 at 04:53:45PM +0200, Andrew Lunn wrote:
> > This patchset converts all DT kirkwood boards to using pinctrl.
> 
> I still expect problems with GPIOs used for power off. I've not yet
> touched them. Again, a regulator makes sense, but there is no 'out of
> the box' regulator type or property which adds itself to pm_power_off.

the IB-NAS 62x0 works with the exception of the power off via GPIO. 
Additionally, the original U-Boot enables hardware blinking for the
power led and Jamie's patch might be needed here as well.  However, I
don't use this U-Boot anymore and can't test this.

- Simon

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-28 19:50   ` Simon Baatz
@ 2012-10-28 20:01     ` Andrew Lunn
  0 siblings, 0 replies; 58+ messages in thread
From: Andrew Lunn @ 2012-10-28 20:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Oct 28, 2012 at 08:50:18PM +0100, Simon Baatz wrote:
> Hi Andrew,
> 
> On Sun, Oct 28, 2012 at 05:57:11PM +0100, Andrew Lunn wrote:
> > On Wed, Oct 24, 2012 at 04:53:45PM +0200, Andrew Lunn wrote:
> > > This patchset converts all DT kirkwood boards to using pinctrl.
> > 
> > I still expect problems with GPIOs used for power off. I've not yet
> > touched them. Again, a regulator makes sense, but there is no 'out of
> > the box' regulator type or property which adds itself to pm_power_off.
> 
> the IB-NAS 62x0 works with the exception of the power off via GPIO. 
> Additionally, the original U-Boot enables hardware blinking for the
> power led and Jamie's patch might be needed here as well.  However, I
> don't use this U-Boot anymore and can't test this.

Hi Simon

Thanks for testing.

I hope Thomas Petazzoni will pickup the blinking patch and make sure
its O.K. for 370/XP. It can then be merged in.

power off via GPIO is next on my list of things to solve.

      Andrew

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-28 16:57 ` Andrew Lunn
  2012-10-28 18:17   ` Michael Walle
  2012-10-28 19:50   ` Simon Baatz
@ 2012-10-28 21:06   ` Jamie Lentin
  2012-10-31 22:38   ` Josh Coombs
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 58+ messages in thread
From: Jamie Lentin @ 2012-10-28 21:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 28 Oct 2012, Andrew Lunn wrote:

> On Wed, Oct 24, 2012 at 04:53:45PM +0200, Andrew Lunn wrote:
>> This patchset converts all DT kirkwood boards to using pinctrl.
>
> Thanks for the feedback everybody gave.
>
> Progress has been made:
>
> The bug causing the lockups has been found, fixed and passed upstream.
>
> I factored out the repeated pinmux definitions for sata0, sata1, spi,
> twsi0, uart0, uart1.
>
> I fixed a few types reported by testers.
>
> I found a solution to many of the gpio_request() failures. The ones
> for controlling power to SATA or USB i've replaced with a regulator in
> DT. The regulator will grab the GPIO, set it to output, and driver it
> high/low as required. I just hope we don't have an ordering issue.
> The regulator framework seems to load quite early and probes all the
> regulators. This fails, because pinctrl has not yet loaded, so the
> gpio framework returns EPROBE_DEFER. This is not fatal to the
> regulator framework, it tries again later. But this later is after
> most of the rest of the drivers have loaded. So we might get into
> issues where uboot has not enabled power to USB/SATA, the driver is
> probed and fails because of the lack of power, and once things of gone
> wrong, we turn the power on.
>
> I still expect problems with GPIOs used for power off. I've not yet
> touched them. Again, a regulator makes sense, but there is no 'out of
> the box' regulator type or property which adds itself to pm_power_off.
>
> The last problem is:
>
>        /* Set NAS to turn back on after a power failure */
>        dnskw_gpio_register(37, "dnskw:power:recover", 1);
>
> I think its a bit of a stretch calling this a regulator.

Definitely.

> Since the current patchset is 18 patches, plus a few other bug fixes
> and dependencies, i'm not going to post them all here. I think we are
> still at the smoke/no-smoke stage of testing. Please pull from:
>
> git://github.com/lunn/linux.git v3.7-rc2-pinctrl-v2
>
> and let me know if things work, what typo's need fixing, where the
> smoke comes out, etc.

No smoke came out, the SATA ports were both powered up. Beyond what's 
already known about, no problems.

>
>      Thanks
> 	Andrew
>

-- 
Jamie Lentin

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl
  2012-10-28 16:57 ` Andrew Lunn
                     ` (2 preceding siblings ...)
  2012-10-28 21:06   ` Jamie Lentin
@ 2012-10-31 22:38   ` Josh Coombs
  2012-11-07 16:13   ` [RFC PATCH 0/2] Kirkwood 98dx4122 pinctrl variant Valentin Longchamp
                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 58+ messages in thread
From: Josh Coombs @ 2012-10-31 22:38 UTC (permalink / raw)
  To: linux-arm-kernel

Sorry it took me so long to test on my GoFlex Net.  Working fine.

tested by: Joshua Coombs <josh.coombs@gmail.com>


On Sun, Oct 28, 2012 at 12:57 PM, Andrew Lunn <andrew@lunn.ch> wrote:

> On Wed, Oct 24, 2012 at 04:53:45PM +0200, Andrew Lunn wrote:
> > This patchset converts all DT kirkwood boards to using pinctrl.
>
> Thanks for the feedback everybody gave.
>
> Progress has been made:
>
> The bug causing the lockups has been found, fixed and passed upstream.
>
> I factored out the repeated pinmux definitions for sata0, sata1, spi,
> twsi0, uart0, uart1.
>
> I fixed a few types reported by testers.
>
> I found a solution to many of the gpio_request() failures. The ones
> for controlling power to SATA or USB i've replaced with a regulator in
> DT. The regulator will grab the GPIO, set it to output, and driver it
> high/low as required. I just hope we don't have an ordering issue.
> The regulator framework seems to load quite early and probes all the
> regulators. This fails, because pinctrl has not yet loaded, so the
> gpio framework returns EPROBE_DEFER. This is not fatal to the
> regulator framework, it tries again later. But this later is after
> most of the rest of the drivers have loaded. So we might get into
> issues where uboot has not enabled power to USB/SATA, the driver is
> probed and fails because of the lack of power, and once things of gone
> wrong, we turn the power on.
>
> I still expect problems with GPIOs used for power off. I've not yet
> touched them. Again, a regulator makes sense, but there is no 'out of
> the box' regulator type or property which adds itself to pm_power_off.
>
> The last problem is:
>
>         /* Set NAS to turn back on after a power failure */
>         dnskw_gpio_register(37, "dnskw:power:recover", 1);
>
> I think its a bit of a stretch calling this a regulator.
>
> Since the current patchset is 18 patches, plus a few other bug fixes
> and dependencies, i'm not going to post them all here. I think we are
> still at the smoke/no-smoke stage of testing. Please pull from:
>
> git://github.com/lunn/linux.git v3.7-rc2-pinctrl-v2
>
> and let me know if things work, what typo's need fixing, where the
> smoke comes out, etc.
>
>       Thanks
>         Andrew
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121031/08091f97/attachment-0001.html>

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [RFC PATCH 0/2] Kirkwood 98dx4122 pinctrl variant
  2012-10-28 16:57 ` Andrew Lunn
                     ` (3 preceding siblings ...)
  2012-10-31 22:38   ` Josh Coombs
@ 2012-11-07 16:13   ` Valentin Longchamp
  2012-11-07 17:36     ` Andrew Lunn
  2012-11-07 16:13   ` [PATCH 1/2] ARM: support 98DX412x kirkwoods with pinctrl Valentin Longchamp
  2012-11-07 16:13   ` [PATCH 2/2] ARM: convert the km_kirkwood board to pinctrl Valentin Longchamp
  6 siblings, 1 reply; 58+ messages in thread
From: Valentin Longchamp @ 2012-11-07 16:13 UTC (permalink / raw)
  To: linux-arm-kernel

These two patches add a pinctrl variant for the kirkwood embedded in the
98dx4122 SoC. Although it is based on a 6281 kirkwood, a lot of pins and
functionalities are absent ant that's why a new variant is needed.

These two patches are based on Andrew's v2 pinctrl branch:

git://github.com/lunn/linux.git v3.7-rc2-pinctrl-v2

Valentin Longchamp (2):
  ARM: support 98DX412x kirkwoods with pinctrl
  ARM: convert the km_kirkwood board to pinctrl

 .../bindings/pinctrl/marvell,kirkwood-pinctrl.txt  |   39 ++
 arch/arm/boot/dts/kirkwood-98dx4122.dtsi           |   31 ++
 arch/arm/boot/dts/kirkwood-km_kirkwood.dts         |   17 +
 arch/arm/mach-kirkwood/board-km_kirkwood.c         |   11 -
 drivers/pinctrl/mvebu/pinctrl-kirkwood.c           |  568 ++++++++++----------
 5 files changed, 377 insertions(+), 289 deletions(-)
 create mode 100644 arch/arm/boot/dts/kirkwood-98dx4122.dtsi

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/2] ARM: support 98DX412x kirkwoods with pinctrl
  2012-10-28 16:57 ` Andrew Lunn
                     ` (4 preceding siblings ...)
  2012-11-07 16:13   ` [RFC PATCH 0/2] Kirkwood 98dx4122 pinctrl variant Valentin Longchamp
@ 2012-11-07 16:13   ` Valentin Longchamp
  2012-11-07 16:13   ` [PATCH 2/2] ARM: convert the km_kirkwood board to pinctrl Valentin Longchamp
  6 siblings, 0 replies; 58+ messages in thread
From: Valentin Longchamp @ 2012-11-07 16:13 UTC (permalink / raw)
  To: linux-arm-kernel

The Marvell 98DX412x SoC embed a kirkwood variant that does not have
pinctrl support yet. Even though this kirkwood is very similar to the
88f6281, on the MPP front a lot of pins are not available. That's why a
new kirkwood pinctrl variant is needed.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
---
 .../bindings/pinctrl/marvell,kirkwood-pinctrl.txt  |   39 ++
 arch/arm/boot/dts/kirkwood-98dx4122.dtsi           |   31 ++
 drivers/pinctrl/mvebu/pinctrl-kirkwood.c           |  568 ++++++++++----------
 3 files changed, 360 insertions(+), 278 deletions(-)
 create mode 100644 arch/arm/boot/dts/kirkwood-98dx4122.dtsi

diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt
index 361bccb..95daf63 100644
--- a/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/marvell,kirkwood-pinctrl.txt
@@ -7,8 +7,10 @@ Required properties:
 - compatible: "marvell,88f6180-pinctrl",
               "marvell,88f6190-pinctrl", "marvell,88f6192-pinctrl",
               "marvell,88f6281-pinctrl", "marvell,88f6282-pinctrl"
+              "marvell,98dx4122-pinctrl"
 
 This driver supports all kirkwood variants, i.e. 88f6180, 88f619x, and 88f628x.
+It also support the 88f6281-based variant in the 98dx412x Bobcat SoCs.
 
 Available mpp pins/groups and functions:
 Note: brackets (x) are not part of the mpp name for marvell,function and given
@@ -277,3 +279,40 @@ mpp46         46       gpio, ts(mp10), tdm(fs), lcd(hsync)
 mpp47         47       gpio, ts(mp11), tdm(drx), lcd(vsync)
 mpp48         48       gpio, ts(mp12), tdm(dtx), lcd(d16)
 mpp49         49       gpo, tdm(rx0ql), pex(clkreq), lcd(d17)
+
+* Marvell Bobcat 98dx4122
+
+name          pins     functions
+================================================================================
+mpp0          0        gpio, nand(io2), spi(cs)
+mpp1          1        gpo, nand(io3), spi(mosi)
+mpp2          2        gpo, nand(io4), spi(sck)
+mpp3          3        gpo, nand(io5), spi(miso)
+mpp4          4        gpio, nand(io6), uart0(rxd)
+mpp5          5        gpo, nand(io7), uart0(txd)
+mpp6          6        sysrst(out), spi(mosi)
+mpp7          7        gpo, pex(rsto), spi(cs)
+mpp8          8        gpio, twsi0(sda), uart0(rts), uart1(rts)
+mpp9          9        gpio, twsi(sck), uart0(cts), uart1(cts)
+mpp10         10       gpo, spi(sck), uart0(txd)
+mpp11         11       gpio, spi(miso), uart0(rxd)
+mpp13         13       gpio, uart1(txd)
+mpp14         14       gpio, uart1(rxd)
+mpp15         15       gpio, uart0(rts)
+mpp16         16       gpio, uart0(cts)
+mpp18         18       gpo, nand(io0)
+mpp19         19       gpo, nand(io1)
+mpp34         34       gpio
+mpp35         35       gpio
+mpp36         36       gpio
+mpp37         37       gpio
+mpp38         38       gpio
+mpp39         39       gpio
+mpp40         40       gpio
+mpp41         41       gpio
+mpp42         42       gpio
+mpp43         43       gpio
+mpp44         44       gpio
+mpp45         45       gpio
+mpp49         49       gpio
+
diff --git a/arch/arm/boot/dts/kirkwood-98dx4122.dtsi b/arch/arm/boot/dts/kirkwood-98dx4122.dtsi
new file mode 100644
index 0000000..3271e4c
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-98dx4122.dtsi
@@ -0,0 +1,31 @@
+/ {
+	ocp at f1000000 {
+		pinctrl: pinctrl at 10000 {
+			compatible = "marvell,98dx4122-pinctrl";
+			reg = <0x10000 0x20>;
+
+			pmx_nand: pmx-nand {
+				marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3",
+					       "mpp4", "mpp5", "mpp18",
+					       "mpp19";
+				marvell,function = "nand";
+			};
+			pmx_spi: pmx-spi {
+				marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3";
+				marvell,function = "spi";
+			};
+			pmx_twsi0: pmx-twsi0 {
+				marvell,pins = "mpp8", "mpp9";
+				marvell,function = "twsi0";
+			};
+			pmx_uart0: pmx-uart0 {
+				marvell,pins = "mpp10", "mpp11";
+				marvell,function = "uart0";
+			};
+			pmx_uart1: pmx-uart1 {
+				marvell,pins = "mpp13", "mpp14";
+				marvell,function = "uart1";
+			};
+		};
+	};
+};
diff --git a/drivers/pinctrl/mvebu/pinctrl-kirkwood.c b/drivers/pinctrl/mvebu/pinctrl-kirkwood.c
index 9a74ef6..fa6ce31 100644
--- a/drivers/pinctrl/mvebu/pinctrl-kirkwood.c
+++ b/drivers/pinctrl/mvebu/pinctrl-kirkwood.c
@@ -21,340 +21,341 @@
 
 #include "pinctrl-mvebu.h"
 
-#define V(f6180, f6190, f6192, f6281, f6282)		\
+#define V(f6180, f6190, f6192, f6281, f6282, dx4122)	\
 	((f6180 << 0) | (f6190 << 1) | (f6192 << 2) |	\
-	 (f6281 << 3) | (f6282 << 4))
+	 (f6281 << 3) | (f6282 << 4) | (dx4122 << 5))
 
 enum kirkwood_variant {
-	VARIANT_MV88F6180 = V(1, 0, 0, 0, 0),
-	VARIANT_MV88F6190 = V(0, 1, 0, 0, 0),
-	VARIANT_MV88F6192 = V(0, 0, 1, 0, 0),
-	VARIANT_MV88F6281 = V(0, 0, 0, 1, 0),
-	VARIANT_MV88F6282 = V(0, 0, 0, 0, 1),
+	VARIANT_MV88F6180	= V(1, 0, 0, 0, 0, 0),
+	VARIANT_MV88F6190	= V(0, 1, 0, 0, 0, 0),
+	VARIANT_MV88F6192	= V(0, 0, 1, 0, 0, 0),
+	VARIANT_MV88F6281	= V(0, 0, 0, 1, 0, 0),
+	VARIANT_MV88F6282	= V(0, 0, 0, 0, 1, 0),
+	VARIANT_MV98DX4122	= V(0, 0, 0, 0, 0, 1),
 };
 
 static struct mvebu_mpp_mode mv88f6xxx_mpp_modes[] = {
 	MPP_MODE(0,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "nand", "io2",     V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "spi", "cs",       V(1, 1, 1, 1, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "nand", "io2",     V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x2, "spi", "cs",       V(1, 1, 1, 1, 1, 1))),
 	MPP_MODE(1,
-		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "nand", "io3",     V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "spi", "mosi",     V(1, 1, 1, 1, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "nand", "io3",     V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x2, "spi", "mosi",     V(1, 1, 1, 1, 1, 1))),
 	MPP_MODE(2,
-		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "nand", "io4",     V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "spi", "sck",      V(1, 1, 1, 1, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "nand", "io4",     V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x2, "spi", "sck",      V(1, 1, 1, 1, 1, 1))),
 	MPP_MODE(3,
-		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "nand", "io5",     V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "spi", "miso",     V(1, 1, 1, 1, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "nand", "io5",     V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x2, "spi", "miso",     V(1, 1, 1, 1, 1, 1))),
 	MPP_MODE(4,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "nand", "io6",     V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "uart0", "rxd",    V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x5, "sata1", "act",    V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "hsync",    V(0, 0, 0, 0, 1)),
-		MPP_VAR_FUNCTION(0xd, "ptp", "clk",      V(1, 1, 1, 1, 0))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "nand", "io6",     V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x2, "uart0", "rxd",    V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x5, "sata1", "act",    V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "hsync",    V(0, 0, 0, 0, 1, 0)),
+		MPP_VAR_FUNCTION(0xd, "ptp", "clk",      V(1, 1, 1, 1, 0, 0))),
 	MPP_MODE(5,
-		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "nand", "io7",     V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "uart0", "txd",    V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "ptp", "trig",     V(1, 1, 1, 1, 0)),
-		MPP_VAR_FUNCTION(0x5, "sata0", "act",    V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "vsync",    V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "nand", "io7",     V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x2, "uart0", "txd",    V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x4, "ptp", "trig",     V(1, 1, 1, 1, 0, 0)),
+		MPP_VAR_FUNCTION(0x5, "sata0", "act",    V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "vsync",    V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(6,
-		MPP_VAR_FUNCTION(0x0, "sysrst", "out",   V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "spi", "mosi",     V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "ptp", "trig",     V(1, 1, 1, 1, 0))),
+		MPP_VAR_FUNCTION(0x0, "sysrst", "out",   V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "spi", "mosi",     V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x2, "ptp", "trig",     V(1, 1, 1, 1, 0, 0))),
 	MPP_MODE(7,
-		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "pex", "rsto",     V(1, 1, 1, 1, 0)),
-		MPP_VAR_FUNCTION(0x2, "spi", "cs",       V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "ptp", "trig",     V(1, 1, 1, 1, 0)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "pwm",      V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "pex", "rsto",     V(1, 1, 1, 1, 0, 1)),
+		MPP_VAR_FUNCTION(0x2, "spi", "cs",       V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x3, "ptp", "trig",     V(1, 1, 1, 1, 0, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "pwm",      V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(8,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "twsi0", "sda",    V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "uart0", "rts",    V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "uart1", "rts",    V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "mii-1", "rxerr",  V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x5, "sata1", "prsnt",  V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xc, "ptp", "clk",      V(1, 1, 1, 1, 0)),
-		MPP_VAR_FUNCTION(0xd, "mii", "col",      V(1, 1, 1, 1, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "twsi0", "sda",    V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x2, "uart0", "rts",    V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x3, "uart1", "rts",    V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x4, "mii-1", "rxerr",  V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x5, "sata1", "prsnt",  V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xc, "ptp", "clk",      V(1, 1, 1, 1, 0, 0)),
+		MPP_VAR_FUNCTION(0xd, "mii", "col",      V(1, 1, 1, 1, 1, 0))),
 	MPP_MODE(9,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "twsi0", "sck",    V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "uart0", "cts",    V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "uart1", "cts",    V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x5, "sata0", "prsnt",  V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xc, "ptp", "evreq",    V(1, 1, 1, 1, 0)),
-		MPP_VAR_FUNCTION(0xd, "mii", "crs",      V(1, 1, 1, 1, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "twsi0", "sck",    V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x2, "uart0", "cts",    V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x3, "uart1", "cts",    V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x5, "sata0", "prsnt",  V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xc, "ptp", "evreq",    V(1, 1, 1, 1, 0, 0)),
+		MPP_VAR_FUNCTION(0xd, "mii", "crs",      V(1, 1, 1, 1, 1, 0))),
 	MPP_MODE(10,
-		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "spi", "sck",      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0X3, "uart0", "txd",    V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x5, "sata1", "act",    V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xc, "ptp", "trig",     V(1, 1, 1, 1, 0))),
+		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x2, "spi", "sck",      V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0X3, "uart0", "txd",    V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x5, "sata1", "act",    V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xc, "ptp", "trig",     V(1, 1, 1, 1, 0, 0))),
 	MPP_MODE(11,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "spi", "miso",     V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "uart0", "rxd",    V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "ptp-1", "evreq",  V(1, 1, 1, 1, 0)),
-		MPP_VAR_FUNCTION(0xc, "ptp-2", "trig",   V(1, 1, 1, 1, 0)),
-		MPP_VAR_FUNCTION(0xd, "ptp", "clk",      V(1, 1, 1, 1, 0)),
-		MPP_VAR_FUNCTION(0x5, "sata0", "act",    V(0, 1, 1, 1, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x2, "spi", "miso",     V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x3, "uart0", "rxd",    V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x4, "ptp-1", "evreq",  V(1, 1, 1, 1, 0, 0)),
+		MPP_VAR_FUNCTION(0xc, "ptp-2", "trig",   V(1, 1, 1, 1, 0, 0)),
+		MPP_VAR_FUNCTION(0xd, "ptp", "clk",      V(1, 1, 1, 1, 0, 0)),
+		MPP_VAR_FUNCTION(0x5, "sata0", "act",    V(0, 1, 1, 1, 1, 0))),
 	MPP_MODE(12,
-		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 0, 1)),
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 0)),
-		MPP_VAR_FUNCTION(0x1, "sdio", "clk",     V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xa, "audio", "spdifo", V(0, 0, 0, 0, 1)),
-		MPP_VAR_FUNCTION(0xb, "spi", "mosi",     V(0, 0, 0, 0, 1)),
-		MPP_VAR_FUNCTION(0xd, "twsi1", "sda",    V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 0, 1, 0)),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 0, 0)),
+		MPP_VAR_FUNCTION(0x1, "sdio", "clk",     V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xa, "audio", "spdifo", V(0, 0, 0, 0, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "spi", "mosi",     V(0, 0, 0, 0, 1, 0)),
+		MPP_VAR_FUNCTION(0xd, "twsi1", "sda",    V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(13,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "sdio", "cmd",     V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "uart1", "txd",    V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xa, "audio", "rmclk",  V(0, 0, 0, 0, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "pwm",      V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "sdio", "cmd",     V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "uart1", "txd",    V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0xa, "audio", "rmclk",  V(0, 0, 0, 0, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "pwm",      V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(14,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "sdio", "d0",      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "uart1", "rxd",    V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "sata1", "prsnt",  V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xa, "audio", "spdifi", V(0, 0, 0, 0, 1)),
-		MPP_VAR_FUNCTION(0xb, "audio-1", "sdi",  V(0, 0, 0, 0, 1)),
-		MPP_VAR_FUNCTION(0xd, "mii", "col",      V(1, 1, 1, 1, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "sdio", "d0",      V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "uart1", "rxd",    V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x4, "sata1", "prsnt",  V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xa, "audio", "spdifi", V(0, 0, 0, 0, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "audio-1", "sdi",  V(0, 0, 0, 0, 1, 0)),
+		MPP_VAR_FUNCTION(0xd, "mii", "col",      V(1, 1, 1, 1, 1, 0))),
 	MPP_MODE(15,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "sdio", "d1",      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "uart0", "rts",    V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "uart1", "txd",    V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "sata0", "act",    V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "spi", "cs",       V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "sdio", "d1",      V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "uart0", "rts",    V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x3, "uart1", "txd",    V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "sata0", "act",    V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "spi", "cs",       V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(16,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "sdio", "d2",      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "uart0", "cts",    V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "uart1", "rxd",    V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "sata1", "act",    V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "extclk",   V(0, 0, 0, 0, 1)),
-		MPP_VAR_FUNCTION(0xd, "mii", "crs",      V(1, 1, 1, 1, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "sdio", "d2",      V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "uart0", "cts",    V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x3, "uart1", "rxd",    V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "sata1", "act",    V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "extclk",   V(0, 0, 0, 0, 1, 0)),
+		MPP_VAR_FUNCTION(0xd, "mii", "crs",      V(1, 1, 1, 1, 1, 0))),
 	MPP_MODE(17,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "sdio", "d3",      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "sata0", "prsnt",  V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xa, "sata1", "act",    V(0, 0, 0, 0, 1)),
-		MPP_VAR_FUNCTION(0xd, "twsi1", "sck",    V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "sdio", "d3",      V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "sata0", "prsnt",  V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xa, "sata1", "act",    V(0, 0, 0, 0, 1, 0)),
+		MPP_VAR_FUNCTION(0xd, "twsi1", "sck",    V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(18,
-		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "nand", "io0",     V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "pex", "clkreq",   V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "nand", "io0",     V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x2, "pex", "clkreq",   V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(19,
-		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "nand", "io1",     V(1, 1, 1, 1, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "nand", "io1",     V(1, 1, 1, 1, 1, 1))),
 	MPP_MODE(20,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp0",       V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "tx0ql",    V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "ge1", "txd0",     V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x5, "sata1", "act",    V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d0",       V(0, 0, 0, 0, 1)),
-		MPP_VAR_FUNCTION(0xc, "mii", "rxerr",    V(1, 0, 0, 0, 0))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp0",       V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "tx0ql",    V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "ge1", "txd0",     V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x5, "sata1", "act",    V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d0",       V(0, 0, 0, 0, 1, 0)),
+		MPP_VAR_FUNCTION(0xc, "mii", "rxerr",    V(1, 0, 0, 0, 0, 0))),
 	MPP_MODE(21,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp1",       V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "rx0ql",    V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "ge1", "txd1",     V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(1, 0, 0, 0, 0)),
-		MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x5, "sata0", "act",    V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d1",       V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp1",       V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "rx0ql",    V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "ge1", "txd1",     V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(1, 0, 0, 0, 0, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x5, "sata0", "act",    V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d1",       V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(22,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp2",       V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "tx2ql",    V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "ge1", "txd2",     V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(1, 0, 0, 0, 0)),
-		MPP_VAR_FUNCTION(0x4, "audio", "rmclk",  V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x5, "sata1", "prsnt",  V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d2",       V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp2",       V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "tx2ql",    V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "ge1", "txd2",     V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(1, 0, 0, 0, 0, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "rmclk",  V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x5, "sata1", "prsnt",  V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d2",       V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(23,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp3",       V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "rx2ql",    V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "ge1", "txd3",     V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "rmclk",  V(1, 0, 0, 0, 0)),
-		MPP_VAR_FUNCTION(0x4, "audio", "bclk",   V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x5, "sata0", "prsnt",  V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d3",       V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp3",       V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "rx2ql",    V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "ge1", "txd3",     V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "rmclk",  V(1, 0, 0, 0, 0, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "bclk",   V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x5, "sata0", "prsnt",  V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d3",       V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(24,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp4",       V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs0",  V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "ge1", "rxd0",     V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "bclk",   V(1, 0, 0, 0, 0)),
-		MPP_VAR_FUNCTION(0x4, "audio", "sdo",    V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d4",       V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp4",       V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs0",  V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "ge1", "rxd0",     V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "bclk",   V(1, 0, 0, 0, 0, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "sdo",    V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d4",       V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(25,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp5",       V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "spi-sck",  V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "ge1", "rxd1",     V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "sdo",    V(1, 0, 0, 0, 0)),
-		MPP_VAR_FUNCTION(0x4, "audio", "lrclk",  V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d5",       V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp5",       V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "spi-sck",  V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "ge1", "rxd1",     V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "sdo",    V(1, 0, 0, 0, 0, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "lrclk",  V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d5",       V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(26,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp6",       V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "spi-miso", V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "ge1", "rxd2",     V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "lrclk",  V(1, 0, 0, 0, 0)),
-		MPP_VAR_FUNCTION(0x4, "audio", "mclk",   V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d6",       V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp6",       V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "spi-miso", V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "ge1", "rxd2",     V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "lrclk",  V(1, 0, 0, 0, 0, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "mclk",   V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d6",       V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(27,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp7",       V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "spi-mosi", V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "ge1", "rxd3",     V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "mclk",   V(1, 0, 0, 0, 0)),
-		MPP_VAR_FUNCTION(0x4, "audio", "sdi",    V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d7",       V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp7",       V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "spi-mosi", V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "ge1", "rxd3",     V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "mclk",   V(1, 0, 0, 0, 0, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "sdi",    V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d7",       V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(28,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp8",       V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "int",      V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "ge1", "col",      V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "sdi",    V(1, 0, 0, 0, 0)),
-		MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d8",       V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp8",       V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "int",      V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "ge1", "col",      V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "sdi",    V(1, 0, 0, 0, 0, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d8",       V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(29,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp9",       V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "rst",      V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "ge1", "txclk",    V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(1, 0, 0, 0, 0)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d9",       V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp9",       V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "rst",      V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "ge1", "txclk",    V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(1, 0, 0, 0, 0, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d9",       V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(30,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp10",      V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "pclk",     V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "ge1", "rxctl",    V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d10",      V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp10",      V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "pclk",     V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "ge1", "rxctl",    V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d10",      V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(31,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp11",      V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "fs",       V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "ge1", "rxclk",    V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d11",      V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp11",      V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "fs",       V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "ge1", "rxclk",    V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d11",      V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(32,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp12",      V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "drx",      V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "ge1", "txclko",   V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d12",      V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp12",      V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "drx",      V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "ge1", "txclko",   V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d12",      V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(33,
-		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "dtx",      V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "ge1", "txctl",    V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d13",      V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "dtx",      V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "ge1", "txctl",    V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d13",      V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(34,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs1",  V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "ge1", "txen",     V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x5, "sata1", "act",    V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d14",      V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs1",  V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "ge1", "txen",     V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x5, "sata1", "act",    V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d14",      V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(35,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "tx0ql",    V(0, 0, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x3, "ge1", "rxerr",    V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0x5, "sata0", "act",    V(0, 1, 1, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d15",      V(0, 0, 0, 0, 1)),
-		MPP_VAR_FUNCTION(0xc, "mii", "rxerr",    V(0, 1, 1, 1, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 1, 1, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "tx0ql",    V(0, 0, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x3, "ge1", "rxerr",    V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x5, "sata0", "act",    V(0, 1, 1, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d15",      V(0, 0, 0, 0, 1, 0)),
+		MPP_VAR_FUNCTION(0xc, "mii", "rxerr",    V(0, 1, 1, 1, 1, 0))),
 	MPP_MODE(36,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp0",       V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs1",  V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "twsi1", "sda",    V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp0",       V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs1",  V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "spdifi", V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "twsi1", "sda",    V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(37,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp1",       V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "tx2ql",    V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "twsi1", "sck",    V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp1",       V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "tx2ql",    V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "spdifo", V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "twsi1", "sck",    V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(38,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp2",       V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "rx2ql",    V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "rmclk",  V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d18",      V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp2",       V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "rx2ql",    V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "rmclk",  V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d18",      V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(39,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp3",       V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs0",  V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "bclk",   V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d19",      V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp3",       V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "spi-cs0",  V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "bclk",   V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d19",      V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(40,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp4",       V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "spi-sck",  V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "sdo",    V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d20",      V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp4",       V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "spi-sck",  V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "sdo",    V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d20",      V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(41,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp5",       V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "spi-miso", V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "lrclk",  V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d21",      V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp5",       V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "spi-miso", V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "lrclk",  V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d21",      V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(42,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp6",       V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "spi-mosi", V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "mclk",   V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d22",      V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp6",       V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "spi-mosi", V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "mclk",   V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d22",      V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(43,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp7",       V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "int",      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "sdi",    V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d23",      V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp7",       V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "int",      V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "sdi",    V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d23",      V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(44,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp8",       V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "rst",      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "clk",      V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp8",       V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "rst",      V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x4, "audio", "extclk", V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "clk",      V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(45,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp9",       V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "pclk",     V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "e",        V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1, 1)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp9",       V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "pclk",     V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "e",        V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(46,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp10",      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "fs",       V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "hsync",    V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp10",      V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "fs",       V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "hsync",    V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(47,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp11",      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "drx",      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "vsync",    V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp11",      V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "drx",      V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "vsync",    V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(48,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp12",      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "dtx",      V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d16",      V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp12",      V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "dtx",      V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d16",      V(0, 0, 0, 0, 1, 0))),
 	MPP_MODE(49,
-		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 0)),
-		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(0, 0, 0, 0, 1)),
-		MPP_VAR_FUNCTION(0x1, "ts", "mp9",       V(0, 0, 0, 1, 0)),
-		MPP_VAR_FUNCTION(0x2, "tdm", "rx0ql",    V(0, 0, 0, 1, 1)),
-		MPP_VAR_FUNCTION(0x5, "ptp", "clk",      V(0, 0, 0, 1, 0)),
-		MPP_VAR_FUNCTION(0xa, "pex", "clkreq",   V(0, 0, 0, 0, 1)),
-		MPP_VAR_FUNCTION(0xb, "lcd", "d17",      V(0, 0, 0, 0, 1))),
+		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 0, 1)),
+		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(0, 0, 0, 0, 1, 0)),
+		MPP_VAR_FUNCTION(0x1, "ts", "mp9",       V(0, 0, 0, 1, 0, 0)),
+		MPP_VAR_FUNCTION(0x2, "tdm", "rx0ql",    V(0, 0, 0, 1, 1, 0)),
+		MPP_VAR_FUNCTION(0x5, "ptp", "clk",      V(0, 0, 0, 1, 0, 0)),
+		MPP_VAR_FUNCTION(0xa, "pex", "clkreq",   V(0, 0, 0, 0, 1, 0)),
+		MPP_VAR_FUNCTION(0xb, "lcd", "d17",      V(0, 0, 0, 0, 1, 0))),
 };
 
 static struct mvebu_mpp_ctrl mv88f6180_mpp_controls[] = {
@@ -433,12 +434,23 @@ static struct mvebu_pinctrl_soc_info mv88f6282_info = {
 	.ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges),
 };
 
+static struct mvebu_pinctrl_soc_info mv98dx4122_info = {
+	.variant = VARIANT_MV98DX4122,
+	.controls = mv88f628x_mpp_controls,
+	.ncontrols = ARRAY_SIZE(mv88f628x_mpp_controls),
+	.modes = mv88f6xxx_mpp_modes,
+	.nmodes = ARRAY_SIZE(mv88f6xxx_mpp_modes),
+	.gpioranges = mv88f628x_gpio_ranges,
+	.ngpioranges = ARRAY_SIZE(mv88f628x_gpio_ranges),
+};
+
 static struct of_device_id kirkwood_pinctrl_of_match[] __devinitdata = {
 	{ .compatible = "marvell,88f6180-pinctrl", .data = &mv88f6180_info },
 	{ .compatible = "marvell,88f6190-pinctrl", .data = &mv88f6190_info },
 	{ .compatible = "marvell,88f6192-pinctrl", .data = &mv88f6192_info },
 	{ .compatible = "marvell,88f6281-pinctrl", .data = &mv88f6281_info },
 	{ .compatible = "marvell,88f6282-pinctrl", .data = &mv88f6282_info },
+	{ .compatible = "marvell,98dx4122-pinctrl", .data = &mv98dx4122_info },
 	{ }
 };
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [PATCH 2/2] ARM: convert the km_kirkwood board to pinctrl
  2012-10-28 16:57 ` Andrew Lunn
                     ` (5 preceding siblings ...)
  2012-11-07 16:13   ` [PATCH 1/2] ARM: support 98DX412x kirkwoods with pinctrl Valentin Longchamp
@ 2012-11-07 16:13   ` Valentin Longchamp
  6 siblings, 0 replies; 58+ messages in thread
From: Valentin Longchamp @ 2012-11-07 16:13 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
---
 arch/arm/boot/dts/kirkwood-km_kirkwood.dts |   17 +++++++++++++++++
 arch/arm/mach-kirkwood/board-km_kirkwood.c |   11 -----------
 2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts
index 75bdb93..1d4b23a 100644
--- a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts
+++ b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts
@@ -1,6 +1,7 @@
 /dts-v1/;
 
 /include/ "kirkwood.dtsi"
+/include/ "kirkwood-98dx4122.dtsi"
 
 / {
 	model = "Keymile Kirkwood Reference Design";
@@ -16,6 +17,22 @@
 	};
 
 	ocp at f1000000 {
+		pinctrl: pinctrl at 10000 {
+
+			pinctrl-0 = < &pmx_nand &pmx_i2c_gpio_sda
+				&pmx_i2c_gpio_scl >;
+			pinctrl-names = "default";	
+
+			pmx_i2c_gpio_sda: pmx-gpio-sda {
+				marvell,pins = "mpp8";
+				marvell,function = "gpio";
+			};
+			pmx_i2c_gpio_scl: pmx-gpio-scl {
+				marvell,pins = "mpp9";
+				marvell,function = "gpio";
+			};
+		};
+
 		serial at 12000 {
 			clock-frequency = <200000000>;
 			status = "ok";
diff --git a/arch/arm/mach-kirkwood/board-km_kirkwood.c b/arch/arm/mach-kirkwood/board-km_kirkwood.c
index f7d3283..58b2e07 100644
--- a/arch/arm/mach-kirkwood/board-km_kirkwood.c
+++ b/arch/arm/mach-kirkwood/board-km_kirkwood.c
@@ -24,21 +24,10 @@ static struct mv643xx_eth_platform_data km_kirkwood_ge00_data = {
 	.phy_addr	= MV643XX_ETH_PHY_ADDR(0),
 };
 
-static unsigned int km_kirkwood_mpp_config[] __initdata = {
-	MPP8_GPIO,	/* I2C SDA */
-	MPP9_GPIO,	/* I2C SCL */
-	0
-};
-
 void __init km_kirkwood_init(void)
 {
 	struct clk *sata_clk;
 	/*
-	 * Basic setup. Needs to be called early.
-	 */
-	kirkwood_mpp_conf(km_kirkwood_mpp_config);
-
-	/*
 	 * Our variant of kirkwood (integrated in the Bobcat) hangs on accessing
 	 * SATA bits (14-15) of the Clock Gating Control Register. Since these
 	 * devices are also not present in this variant, their clocks get
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 58+ messages in thread

* [RFC PATCH 0/2] Kirkwood 98dx4122 pinctrl variant
  2012-11-07 16:13   ` [RFC PATCH 0/2] Kirkwood 98dx4122 pinctrl variant Valentin Longchamp
@ 2012-11-07 17:36     ` Andrew Lunn
  0 siblings, 0 replies; 58+ messages in thread
From: Andrew Lunn @ 2012-11-07 17:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 07, 2012 at 05:13:10PM +0100, Valentin Longchamp wrote:
> These two patches add a pinctrl variant for the kirkwood embedded in the
> 98dx4122 SoC. Although it is based on a 6281 kirkwood, a lot of pins and
> functionalities are absent ant that's why a new variant is needed.
> 
> These two patches are based on Andrew's v2 pinctrl branch:
> 
> git://github.com/lunn/linux.git v3.7-rc2-pinctrl-v2
> 
> Valentin Longchamp (2):
>   ARM: support 98DX412x kirkwoods with pinctrl
>   ARM: convert the km_kirkwood board to pinctrl
> 
>  .../bindings/pinctrl/marvell,kirkwood-pinctrl.txt  |   39 ++
>  arch/arm/boot/dts/kirkwood-98dx4122.dtsi           |   31 ++
>  arch/arm/boot/dts/kirkwood-km_kirkwood.dts         |   17 +
>  arch/arm/mach-kirkwood/board-km_kirkwood.c         |   11 -
>  drivers/pinctrl/mvebu/pinctrl-kirkwood.c           |  568 ++++++++++----------
>  5 files changed, 377 insertions(+), 289 deletions(-)
>  create mode 100644 arch/arm/boot/dts/kirkwood-98dx4122.dtsi


Hi Valentin

Thanks for doing this. It looks great. I will pull them into my
pinctrl tree and if nobody makes any comments see about passing them
up to Jason.

   Thanks
	Andrew

^ permalink raw reply	[flat|nested] 58+ messages in thread

end of thread, other threads:[~2012-11-07 17:36 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-24 14:53 [PATCH 0/9] ARM: Kirkwood: Convert to pinctrl Andrew Lunn
2012-10-24 14:53 ` [PATCH 1/9] ARM: Kirkwood: Convert TS219 " Andrew Lunn
2012-10-24 19:31   ` Thomas Petazzoni
2012-10-24 19:49     ` Sebastian Hesselbarth
2012-10-24 20:00       ` Thomas Petazzoni
2012-10-24 20:04         ` Andrew Lunn
2012-10-24 20:05           ` Thomas Petazzoni
2012-10-24 20:14         ` Sebastian Hesselbarth
2012-10-24 20:19           ` Thomas Petazzoni
2012-10-24 14:53 ` [PATCH 2/9] ARM: Kirkwood: Convert iConnect " Andrew Lunn
2012-10-24 14:53 ` [PATCH 3/9] ARM: Kirkwood: Convert dnskw " Andrew Lunn
2012-10-25 22:58   ` Jamie Lentin
2012-10-26  6:01     ` Andrew Lunn
2012-10-26  9:42       ` Jamie Lentin
2012-10-26 10:24         ` Andrew Lunn
2012-10-26 12:30           ` Jamie Lentin
2012-10-24 14:53 ` [PATCH 4/9] ARM: Kirkwood: Convert dockstar " Andrew Lunn
2012-10-24 14:53 ` [PATCH 5/9] ARM: Kirkwood: Convert dreamplug " Andrew Lunn
2012-10-24 14:53 ` [PATCH 6/9] ARM: Kirkwood: Convert GoFlex Net " Andrew Lunn
2012-10-26 17:28   ` Josh Coombs
2012-10-27  8:51     ` Andrew Lunn
2012-10-28 14:31   ` Josh Coombs
2012-10-24 14:53 ` [PATCH 7/9] ARM: Kirkwood: Convert ib62x0 " Andrew Lunn
2012-10-24 20:40   ` Simon Baatz
2012-10-24 14:53 ` [PATCH 8/9] ARM: Kirkwood: Convert lsxl boards " Andrew Lunn
2012-10-24 20:37   ` Michael Walle
2012-10-28 16:40   ` Michael Walle
2012-10-24 14:53 ` [PATCH 9/9] ARM: Kirkwood: Convert IX2-200 " Andrew Lunn
2012-10-24 20:04   ` Thomas Petazzoni
2012-10-24 20:20     ` Andrew Lunn
2012-10-24 20:29       ` Thomas Petazzoni
2012-10-24 15:29 ` [PATCH 0/9] ARM: Kirkwood: Convert " Josh Coombs
2012-10-24 15:35   ` Andrew Lunn
2012-10-24 19:26     ` Thomas Petazzoni
2012-10-24 18:06 ` Michael Walle
2012-10-24 20:01   ` Andrew Lunn
2012-10-24 20:47     ` Michael Walle
2012-10-24 21:33     ` Thomas Petazzoni
2012-10-25  5:46       ` Andrew Lunn
2012-10-25  6:28         ` Thomas Petazzoni
2012-10-25  7:39           ` Michael Walle
2012-10-25  7:43             ` Thomas Petazzoni
2012-10-25 20:19               ` Michael Walle
2012-10-26 18:06               ` Michael Walle
2012-10-26 18:45                 ` Thomas Petazzoni
2012-10-26 20:17                   ` Michael Walle
2012-10-27  8:59                     ` Andrew Lunn
2012-10-25 22:57           ` Jamie Lentin
2012-10-28 16:57 ` Andrew Lunn
2012-10-28 18:17   ` Michael Walle
2012-10-28 19:50   ` Simon Baatz
2012-10-28 20:01     ` Andrew Lunn
2012-10-28 21:06   ` Jamie Lentin
2012-10-31 22:38   ` Josh Coombs
2012-11-07 16:13   ` [RFC PATCH 0/2] Kirkwood 98dx4122 pinctrl variant Valentin Longchamp
2012-11-07 17:36     ` Andrew Lunn
2012-11-07 16:13   ` [PATCH 1/2] ARM: support 98DX412x kirkwoods with pinctrl Valentin Longchamp
2012-11-07 16:13   ` [PATCH 2/2] ARM: convert the km_kirkwood board to pinctrl Valentin Longchamp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.