From: Roland Stigge <hidden> Date: 2012-06-11 11:02:35
This patch set includes various updates for mach-lpc32xx, including DT binding
for serial and dts updates. A new reference board is supported (EA3250). The
board support file phy3250.c is updated to become more general, useable for
other boards also. There is still board specific stuff in it, though (some
devicetree auxdata).
Further, clock updates, DMA support, MMC support and a defconfig update for
LPC32xx is included.
Signed-off-by: Roland Stigge <redacted>
--
Applies to v3.5-rc2
You can also pull from
git://git.antcom.de/linux-2.6.git lpc32xx-next
Roland Stigge (14):
ARM: LPC32xx: Add NAND flash timing to PHY3250 board dts
ARM: LPC32xx: Clock initialization for NAND controllers
ARM: LPC32xx: Remove SLC controller initialization from platform init
ARM: LPC32xx: Add DMA configuration to platform data
ARM: LPC32xx: Adjust dtsi file for MLC controller configuration
ARM: LPC32xx: Add dts for EA3250 reference board
ARM: LPC32xx: DTS adjustment for key matrix controller
ARM: LPC32xx: Clock adjustment for key matrix controller
ARM: LPC32xx: Defconfig update
ARM: LPC32xx: Add MMC controller support
ARM: LPC32xx: DTS adjustment for using pl18x primecell
ARM: LPC32xx: DT conversion of Standard UARTs
ARM: LPC32xx: High Speed UART configuration via DT
ARM: LPC32xx: Remove mach specific ARCH_NR_GPIOS, use default
arch/arm/Kconfig | 2
arch/arm/boot/dts/ea3250.dts | 157 ++++++++++++++++++++++++++++++
arch/arm/boot/dts/lpc32xx.dtsi | 60 ++++++++---
arch/arm/boot/dts/phy3250.dts | 40 +++++++
arch/arm/configs/lpc32xx_defconfig | 22 +++-
arch/arm/mach-lpc32xx/Kconfig | 32 ------
arch/arm/mach-lpc32xx/clock.c | 18 ++-
arch/arm/mach-lpc32xx/include/mach/gpio.h | 2
arch/arm/mach-lpc32xx/phy3250.c | 77 +++++++++++++-
arch/arm/mach-lpc32xx/serial.c | 85 ----------------
10 files changed, 343 insertions(+), 152 deletions(-)
From: Roland Stigge <hidden> Date: 2012-06-11 11:02:34
This patch adds clock initialization for the MLC NAND controller of the LPC32xx
SoC and adjusts it for the SLC controller.
Signed-off-by: Roland Stigge <redacted>
---
arch/arm/mach-lpc32xx/clock.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
From: Roland Stigge <hidden> Date: 2012-06-11 11:02:42
This patch takes into account that the MTD NAND MLC controller needs more
registers, located actually before the previously allocated memory range,
already starting at 200a8000 instead of 200b0000.
Further, the interrupt for the controller is configured.
Signed-off-by: Roland Stigge <redacted>
---
arch/arm/boot/dts/lpc32xx.dtsi | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
From: Roland Stigge <hidden> Date: 2012-06-11 11:02:44
There is another reference/development board for the LPC32xx SoC (besides the
Phytec 3250): The Embedded Artists LPC3250 board. This patch adds a default dts
file for it.
Signed-off-by: Roland Stigge <redacted>
---
arch/arm/boot/dts/ea3250.dts | 157 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 157 insertions(+)
From: Roland Stigge <hidden> Date: 2012-06-11 11:02:45
The clock.c file needs to be changed to match the automatic device name to its
clock.
Signed-off-by: Roland Stigge <redacted>
Acked-by: Rob Herring <redacted>
---
arch/arm/mach-lpc32xx/clock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Roland Stigge <hidden> Date: 2012-06-11 11:02:47
This patch adds support for the MMC controller of the LPC32xx SoC to the
platform initialization via the pl08x primecell driver. Lacking more complete
DT support, done via DT auxdata.
Signed-off-by: Roland Stigge <redacted>
---
arch/arm/mach-lpc32xx/phy3250.c | 43 ++++++++++++++++++++++++++++++++++++----
1 file changed, 39 insertions(+), 4 deletions(-)
@@ -259,11 +263,32 @@ static struct pl08x_platform_data pl08x_.mem_buses=PL08X_AHB1,};+staticintmmc_handle_ios(structdevice*dev,structmmc_ios*ios)+{+/* Only on and off are supported */+if(ios->power_mode==MMC_POWER_OFF)+gpio_set_value(MMC_PWR_ENABLE_GPIO,0);+else+gpio_set_value(MMC_PWR_ENABLE_GPIO,1);+return0;+}++staticstructmmci_platform_datalpc32xx_mmci_data={+.ocr_mask=MMC_VDD_30_31|MMC_VDD_31_32|+MMC_VDD_32_33|MMC_VDD_33_34,+.ios_handler=mmc_handle_ios,+.dma_filter=NULL,+/* No DMA for now since AMBA PL080 dmaengine driver only does scatter+*gather,andtheMMCIdriverdoesn'tdoitthisway*/+};+staticconststructof_dev_auxdatalpc32xx_auxdata_lookup[]__initconst={OF_DEV_AUXDATA("arm,pl022",0x20084000,"dev:ssp0",&lpc32xx_ssp0_data),OF_DEV_AUXDATA("arm,pl022",0x2008C000,"dev:ssp1",&lpc32xx_ssp1_data),OF_DEV_AUXDATA("arm,pl110",0x31040000,"dev:clcd",&lpc32xx_clcd_data),OF_DEV_AUXDATA("arm,pl080",0x31000000,"pl08xdmac",&pl08x_pd),+OF_DEV_AUXDATA("arm,pl18x",0x20098000,"20098000.sd",+&lpc32xx_mmci_data),{}};
From: Roland Stigge <hidden> Date: 2012-06-11 11:02:53
This patch switches from static serial driver initialization to devicetree
configuration. This way, the Standard UARTs of the LPC32xx SoC can be enabled
individually via DT.
E.g., instead of Kconfig configuration, the phy3250.dts activates
UARTs 3 and 5.
Signed-off-by: Roland Stigge <redacted>
---
arch/arm/Kconfig | 2
arch/arm/boot/dts/lpc32xx.dtsi | 34 ++++++++++++----
arch/arm/boot/dts/phy3250.dts | 8 +++
arch/arm/mach-lpc32xx/Kconfig | 32 ---------------
arch/arm/mach-lpc32xx/serial.c | 85 -----------------------------------------
5 files changed, 35 insertions(+), 126 deletions(-)
@@ -1,32 +0,0 @@-ifARCH_LPC32XX--menu"Individual UART enable selections"--configARCH_LPC32XX_UART3_SELECT-bool"Add support for standard UART3"-help-AddssupportforstandardUART3whenthe8250serialsupport-isenabled.--configARCH_LPC32XX_UART4_SELECT-bool"Add support for standard UART4"-help-AddssupportforstandardUART4whenthe8250serialsupport-isenabled.--configARCH_LPC32XX_UART5_SELECT-bool"Add support for standard UART5"-defaulty-help-AddssupportforstandardUART5whenthe8250serialsupport-isenabled.--configARCH_LPC32XX_UART6_SELECT-bool"Add support for standard UART6"-help-AddssupportforstandardUART6whenthe8250serialsupport-isenabled.--endmenu--endif---linux-2.6.orig/arch/arm/mach-lpc32xx/serial.c+++linux-2.6/arch/arm/mach-lpc32xx/serial.c
From: Roland Stigge <hidden> Date: 2012-06-11 11:02:55
This patch fixes the DTS files for the High Speed UARTs 1, 2 and 7 of the
LPC32xx SoC, adjusting the compatible strings, adding interrupts and status
configuration. On the PHY3250 reference board, UART2 is enabled.
Signed-off-by: Roland Stigge <redacted>
---
arch/arm/boot/dts/lpc32xx.dtsi | 16 +++++++++++-----
arch/arm/boot/dts/phy3250.dts | 4 ++++
2 files changed, 15 insertions(+), 5 deletions(-)
From: Roland Stigge <hidden> Date: 2012-06-11 11:03:18
ARCH_NR_GPIOS was defined statically to include exactly all SoC specific GPIOs.
Now if additional GPIOs need to be added dynamically, e.g. via DT, none are
available. Removing the mach specific setting, leaving ARCH_NR_GPIOS to the
default of 256 (currently in include/asm-generic/gpio.h).
Signed-off-by: Roland Stigge <redacted>
---
arch/arm/mach-lpc32xx/include/mach/gpio.h | 2 --
1 file changed, 2 deletions(-)
From: Roland Stigge <hidden> Date: 2012-06-11 11:04:23
This defconfig update for the LPC32xx SoC platform adds the new drivers in v3.5
and drivers typically used in systems with the LPC32xx chip.
Signed-off-by: Roland Stigge <redacted>
---
arch/arm/configs/lpc32xx_defconfig | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
@@ -16,8 +18,6 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_BLK_DEV_BSG is not set CONFIG_PARTITION_ADVANCED=y CONFIG_ARCH_LPC32XX=y-CONFIG_NO_HZ=y-CONFIG_HIGH_RES_TIMERS=y CONFIG_PREEMPT=y CONFIG_AEABI=y CONFIG_ZBOOT_ROM_TEXT=0x0
@@ -79,16 +82,22 @@ CONFIG_LPC_ENET=y # CONFIG_NET_VENDOR_STMICRO is not set CONFIG_SMSC_PHY=y # CONFIG_WLAN is not set+CONFIG_INPUT_MATRIXKMAP=y # CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_MOUSEDEV_SCREEN_X=240 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320 CONFIG_INPUT_EVDEV=y+# CONFIG_KEYBOARD_ATKBD is not set+CONFIG_KEYBOARD_LPC32XX=y # CONFIG_INPUT_MOUSE is not set CONFIG_INPUT_TOUCHSCREEN=y CONFIG_TOUCHSCREEN_LPC32XX=y+CONFIG_SERIO_LIBPS2=y # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y+CONFIG_SERIAL_HS_LPC32XX=y+CONFIG_SERIAL_OF_PLATFORM=y # CONFIG_HW_RANDOM is not set CONFIG_I2C=y CONFIG_I2C_CHARDEV=y
@@ -96,7 +105,8 @@ CONFIG_I2C_PNX=y CONFIG_SPI=y CONFIG_SPI_PL022=y CONFIG_GPIO_SYSFS=y-# CONFIG_HWMON is not set+CONFIG_SENSORS_DS620=y+CONFIG_SENSORS_MAX6639=y CONFIG_WATCHDOG=y CONFIG_PNX4008_WATCHDOG=y CONFIG_FB=y
From: Roland Stigge <hidden> Date: 2012-06-11 11:04:49
This patch connects the lpc32xx-key driver to the LPC32xx platform (via
lpc32xx.dtsi), and more specifically to the reference board via its dts file.
Signed-off-by: Roland Stigge <redacted>
Acked-by: Rob Herring <redacted>
---
arch/arm/boot/dts/lpc32xx.dtsi | 2 ++
arch/arm/boot/dts/phy3250.dts | 9 +++++++++
2 files changed, 11 insertions(+)
From: Roland Stigge <hidden> Date: 2012-06-11 11:05:20
This patch adds DMA channel configuration to the LPC32xx platform file. The
configured DMA signalling is generic for LPC32xx SoC and is not board specific.
Signed-off-by: Roland Stigge <redacted>
---
arch/arm/mach-lpc32xx/phy3250.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
From: Roland Stigge <hidden> Date: 2012-06-11 11:05:57
This patch adds necessary NAND flash timings to the board specific dts file of
the PHY3250 reference board of the LPC32xx SoC.
Signed-off-by: Roland Stigge <redacted>
---
arch/arm/boot/dts/phy3250.dts | 11 +++++++++++
1 file changed, 11 insertions(+)
From: Roland Stigge <hidden> Date: 2012-06-11 11:06:20
Since we now support two MTD NAND controllers (MLC and SLC) for LPC32xx via DT,
we don't initialize the SLC controller statically anymore, but do it via the
clock setup (see previous patch).
Signed-off-by: Roland Stigge <redacted>
---
arch/arm/mach-lpc32xx/phy3250.c | 4 ----
1 file changed, 4 deletions(-)
These change in my unstable/dma-pl08x branch, patches have been posted
already, but I don't deem them to be totally stable yet. Waiting on
OMAP people to get their mainline kernel restored to a buildable state
so I can continue my DMA engine work.
The clock.c file needs to be changed to match the automatic device name to its
clock.
Signed-off-by: Roland Stigge <redacted>
Acked-by: Rob Herring <redacted>
Should this not be in the same patch as the one that moves the device over
to DT probing? Otherwise you have a non-working setup if only one patch
is applied.
Arnd
The proper way to write this is 'status = "disabled";', with a 'd' at
the end.
Thanks for the note!
Funnily, I always did it this way. Looks like initially, I copied from
somewhere else (wrongly). Indeed, we have lots of "disable", see also:
omap3-beagle.dts
omap4-panda.dts
omap4-sdp.dts
tegra20.dtsi
tegra30.dtsi
Roland
From: Roland Stigge <hidden> Date: 2012-06-11 14:34:46
Hi,
On 06/11/2012 04:16 PM, Arnd Bergmann wrote:
On Monday 11 June 2012, Roland Stigge wrote:
quoted
The clock.c file needs to be changed to match the automatic device name to its
clock.
Signed-off-by: Roland Stigge <redacted>
Acked-by: Rob Herring <redacted>
Should this not be in the same patch as the one that moves the device over
to DT probing? Otherwise you have a non-working setup if only one patch
is applied.
The actual driver is new for v3.6 (hopefully), DT-only.
Rather than merging the patches, I'd let the key driver go in via input,
and the clock.c adjustment via arm-soc.
Roland
Thanks for the note!
Funnily, I always did it this way. Looks like initially, I copied from
somewhere else (wrongly). Indeed, we have lots of "disable", see also:
omap3-beagle.dts
omap4-panda.dts
omap4-sdp.dts
tegra20.dtsi
tegra30.dtsi
Ah, right. Note that the kernel checks only for "ok" and "okay" strings,
anything else is interpreted as "disabled". We should use the correct
string anyway of course.
Arnd
The clock.c file needs to be changed to match the automatic device name to its
clock.
Signed-off-by: Roland Stigge <redacted>
Acked-by: Rob Herring <redacted>
Should this not be in the same patch as the one that moves the device over
to DT probing? Otherwise you have a non-working setup if only one patch
is applied.
The actual driver is new for v3.6 (hopefully), DT-only.
Rather than merging the patches, I'd let the key driver go in via input,
and the clock.c adjustment via arm-soc.
From: Alexandre Pereira da Silva <hidden> Date: 2012-06-11 22:19:23
On Mon, Jun 11, 2012 at 8:02 AM, Roland Stigge [off-list ref] wrote:
This patch adds necessary NAND flash timings to the board specific dts file of
the PHY3250 reference board of the LPC32xx SoC.
Signed-off-by: Roland Stigge <redacted>
From: Alexandre Pereira da Silva <hidden> Date: 2012-06-11 22:19:48
On Mon, Jun 11, 2012 at 8:02 AM, Roland Stigge [off-list ref] wrote:
Since we now support two MTD NAND controllers (MLC and SLC) for LPC32xx via DT,
we don't initialize the SLC controller statically anymore, but do it via the
clock setup (see previous patch).
Signed-off-by: Roland Stigge <redacted>
From: Alexandre Pereira da Silva <hidden> Date: 2012-06-11 22:20:15
On Mon, Jun 11, 2012 at 8:02 AM, Roland Stigge [off-list ref] wrote:
This patch takes into account that the MTD NAND MLC controller needs more
registers, located actually before the previously allocated memory range,
already starting at 200a8000 instead of 200b0000.
Further, the interrupt for the controller is configured.
Signed-off-by: Roland Stigge <redacted>
From: Alexandre Pereira da Silva <hidden> Date: 2012-06-11 22:20:54
On Mon, Jun 11, 2012 at 8:02 AM, Roland Stigge [off-list ref] wrote:
There is another reference/development board for the LPC32xx SoC (besides the
Phytec 3250): The Embedded Artists LPC3250 board. This patch adds a default dts
file for it.
Signed-off-by: Roland Stigge <redacted>
From: Alexandre Pereira da Silva <hidden> Date: 2012-06-11 22:21:48
On Mon, Jun 11, 2012 at 8:02 AM, Roland Stigge [off-list ref] wrote:
This patch connects the lpc32xx-key driver to the LPC32xx platform (via
lpc32xx.dtsi), and more specifically to the reference board via its dts file.
Signed-off-by: Roland Stigge <redacted>
Acked-by: Rob Herring <redacted>
From: Alexandre Pereira da Silva <hidden> Date: 2012-06-11 22:22:32
On Mon, Jun 11, 2012 at 8:02 AM, Roland Stigge [off-list ref] wrote:
This defconfig update for the LPC32xx SoC platform adds the new drivers in v3.5
and drivers typically used in systems with the LPC32xx chip.
Signed-off-by: Roland Stigge <redacted>
From: Alexandre Pereira da Silva <hidden> Date: 2012-06-11 22:23:16
On Mon, Jun 11, 2012 at 8:02 AM, Roland Stigge [off-list ref] wrote:
This patch adds support for the MMC controller of the LPC32xx SoC to the
platform initialization via the pl08x primecell driver. Lacking more complete
DT support, done via DT auxdata.
Signed-off-by: Roland Stigge <redacted>
From: Alexandre Pereira da Silva <hidden> Date: 2012-06-11 22:23:47
On Mon, Jun 11, 2012 at 8:02 AM, Roland Stigge [off-list ref] wrote:
This patch switches from static serial driver initialization to devicetree
configuration. This way, the Standard UARTs of the LPC32xx SoC can be enabled
individually via DT.
E.g., instead of Kconfig configuration, the phy3250.dts activates
UARTs 3 and 5.
Signed-off-by: Roland Stigge <redacted>
From: Alexandre Pereira da Silva <hidden> Date: 2012-06-11 22:24:56
On Mon, Jun 11, 2012 at 8:02 AM, Roland Stigge [off-list ref] wrote:
ARCH_NR_GPIOS was defined statically to include exactly all SoC specific GPIOs.
Now if additional GPIOs need to be added dynamically, e.g. via DT, none are
available. Removing the mach specific setting, leaving ARCH_NR_GPIOS to the
default of 256 (currently in include/asm-generic/gpio.h).
Signed-off-by: Roland Stigge <redacted>
From: Alexandre Pereira da Silva <hidden> Date: 2012-06-11 22:25:37
On Mon, Jun 11, 2012 at 8:02 AM, Roland Stigge [off-list ref] wrote:
This patch fixes the DTS files for the High Speed UARTs 1, 2 and 7 of the
LPC32xx SoC, adjusting the compatible strings, adding interrupts and status
configuration. On the PHY3250 reference board, UART2 is enabled.
Signed-off-by: Roland Stigge <redacted>
These change in my unstable/dma-pl08x branch, patches have been posted
already, but I don't deem them to be totally stable yet. Waiting on
OMAP people to get their mainline kernel restored to a buildable state
so I can continue my DMA engine work.
We have a few options here:
1) Take the patch as I posted it (needs adjustments as soon as the API
changed and becomes stable)
2) Remove the DMA related patches from the LPC32xx series for now (which
would be unfortunate)
3) Let me build upon some tree that already looks worthwhile to play
with already (which one?)
What would you suggest?
Thanks in advance,
Roland