* [PATCH 0/4] Few dm816x fixes and improvments @ 2015-03-18 0:19 Tony Lindgren 2015-03-18 0:19 ` [PATCH 1/4] ARM: dts: Fix gpio interrupts for dm816x Tony Lindgren ` (3 more replies) 0 siblings, 4 replies; 9+ messages in thread From: Tony Lindgren @ 2015-03-18 0:19 UTC (permalink / raw) To: linux-arm-kernel Hi all, Here are few dm816x related fixes and improvments. Mostly to get GPIO interrupts working, and add DMA for the USB. Note that the USB still depends on the USB PHY driver posted in "[PATCH v2] phy: Add a driver for dm816x USB PHY". Regards, Tony Tony Lindgren (4): ARM: dts: Fix gpio interrupts for dm816x ARM: dts: Fix typo for dm816x usb0_pins ARM: dts: Add cppi41 support for dm816x MUSB ARM: dts: Remove PIN_INPUT for dm816x McSPI arch/arm/boot/dts/dm8168-evm.dts | 33 +++++++++++++---- arch/arm/boot/dts/dm816x.dtsi | 78 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 100 insertions(+), 11 deletions(-) -- 2.1.4 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/4] ARM: dts: Fix gpio interrupts for dm816x 2015-03-18 0:19 [PATCH 0/4] Few dm816x fixes and improvments Tony Lindgren @ 2015-03-18 0:19 ` Tony Lindgren 2015-03-18 0:19 ` [PATCH 2/4] ARM: dts: Fix typo for dm816x usb0_pins Tony Lindgren ` (2 subsequent siblings) 3 siblings, 0 replies; 9+ messages in thread From: Tony Lindgren @ 2015-03-18 0:19 UTC (permalink / raw) To: linux-arm-kernel Commit 7800064ba507 ("ARM: dts: Add basic dm816x device tree configuration") added basic devices for dm816x, but I was not able to test the GPIO interrupts earlier until I found some suitable pins to test with. We can mux the MMC card detect and write protect pins from SD_SDCD and SD_SDWP mode to use a normal GPIO interrupts that are also suitable for the MMC subsystem. This turned out several issues that need to be fixed: - I set the GPIO type wrong to be compatible with omap3 instead of omap4. The GPIO controller on dm816x has EOI interrupt register like omap4 and am335x. - I got the GPIO interrupt numbers wrong as each bank has two and we only use one. They need to be set up the same way as on am335x. - The gpio banks are missing interrupt controller related properties. With these changes the GPIO interrupts can be used with the MMC card detect pin, so let's wire that up. Let's also mux all the MMC lines for completeness while at it. For the first GPIO bank I tested using GPMC lines temporarily muxed to GPIOs on the dip switch 10. Cc: Brian Hutchinson <b.hutchman@gmail.com> Cc: Matthijs van Duin <matthijsvanduin@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com> --- arch/arm/boot/dts/dm8168-evm.dts | 19 +++++++++++++++++++ arch/arm/boot/dts/dm816x.dtsi | 18 ++++++++++++++---- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/dm8168-evm.dts b/arch/arm/boot/dts/dm8168-evm.dts index d3a29c1..afe678f 100644 --- a/arch/arm/boot/dts/dm8168-evm.dts +++ b/arch/arm/boot/dts/dm8168-evm.dts @@ -36,6 +36,20 @@ >; }; + mmc_pins: pinmux_mmc_pins { + pinctrl-single,pins = < + DM816X_IOPAD(0x0a70, MUX_MODE0) /* SD_POW */ + DM816X_IOPAD(0x0a74, MUX_MODE0) /* SD_CLK */ + DM816X_IOPAD(0x0a78, MUX_MODE0) /* SD_CMD */ + DM816X_IOPAD(0x0a7C, MUX_MODE0) /* SD_DAT0 */ + DM816X_IOPAD(0x0a80, MUX_MODE0) /* SD_DAT1 */ + DM816X_IOPAD(0x0a84, MUX_MODE0) /* SD_DAT2 */ + DM816X_IOPAD(0x0a88, MUX_MODE0) /* SD_DAT2 */ + DM816X_IOPAD(0x0a8c, MUX_MODE2) /* GP1[7] */ + DM816X_IOPAD(0x0a90, MUX_MODE2) /* GP1[8] */ + >; + }; + usb0_pins: pinmux_usb0_pins { pinctrl-single,pins = < DM816X_IOPAD(0x0d00, MUX_MODE0) /* USB0_DRVVBUS */ @@ -137,7 +151,12 @@ }; &mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc_pins>; vmmc-supply = <&vmmcsd_fixed>; + bus-width = <4>; + cd-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>; + wp-gpios = <&gpio2 8 GPIO_ACTIVE_LOW>; }; /* At least dm8168-evm rev c won't support multipoint, later may */ diff --git a/arch/arm/boot/dts/dm816x.dtsi b/arch/arm/boot/dts/dm816x.dtsi index 3c97b5f..f35715b 100644 --- a/arch/arm/boot/dts/dm816x.dtsi +++ b/arch/arm/boot/dts/dm816x.dtsi @@ -150,17 +150,27 @@ }; gpio1: gpio at 48032000 { - compatible = "ti,omap3-gpio"; + compatible = "ti,omap4-gpio"; ti,hwmods = "gpio1"; + ti,gpio-always-on; reg = <0x48032000 0x1000>; - interrupts = <97>; + interrupts = <96>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; }; gpio2: gpio at 4804c000 { - compatible = "ti,omap3-gpio"; + compatible = "ti,omap4-gpio"; ti,hwmods = "gpio2"; + ti,gpio-always-on; reg = <0x4804c000 0x1000>; - interrupts = <99>; + interrupts = <98>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; }; gpmc: gpmc at 50000000 { -- 2.1.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/4] ARM: dts: Fix typo for dm816x usb0_pins 2015-03-18 0:19 [PATCH 0/4] Few dm816x fixes and improvments Tony Lindgren 2015-03-18 0:19 ` [PATCH 1/4] ARM: dts: Fix gpio interrupts for dm816x Tony Lindgren @ 2015-03-18 0:19 ` Tony Lindgren 2015-03-18 0:19 ` [PATCH 3/4] ARM: dts: Add cppi41 support for dm816x MUSB Tony Lindgren 2015-03-18 0:19 ` [PATCH 4/4] ARM: dts: Remove PIN_INPUT for dm816x McSPI Tony Lindgren 3 siblings, 0 replies; 9+ messages in thread From: Tony Lindgren @ 2015-03-18 0:19 UTC (permalink / raw) To: linux-arm-kernel Commit a54879a00859 ("ARM: dts: Fix USB dts configuration for dm816x") attempted to fix the USB features introduced by commit 7800064ba507 ("ARM: dts: Add basic dm816x device tree configuration") but obviously I did not read the dmesg as more USB issues still keep trickling in. It should be usb1_pins instead not usb0_pins for the second interface to avoid warnings from pinctrl framework. Cc: Brian Hutchinson <b.hutchman@gmail.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Matthijs van Duin <matthijsvanduin@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com> --- arch/arm/boot/dts/dm8168-evm.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/dm8168-evm.dts b/arch/arm/boot/dts/dm8168-evm.dts index afe678f..b520a8b 100644 --- a/arch/arm/boot/dts/dm8168-evm.dts +++ b/arch/arm/boot/dts/dm8168-evm.dts @@ -52,13 +52,13 @@ usb0_pins: pinmux_usb0_pins { pinctrl-single,pins = < - DM816X_IOPAD(0x0d00, MUX_MODE0) /* USB0_DRVVBUS */ + DM816X_IOPAD(0x0d04, MUX_MODE0) /* USB0_DRVVBUS */ >; }; - usb1_pins: pinmux_usb0_pins { + usb1_pins: pinmux_usb1_pins { pinctrl-single,pins = < - DM816X_IOPAD(0x0d04, MUX_MODE0) /* USB1_DRVVBUS */ + DM816X_IOPAD(0x0d08, MUX_MODE0) /* USB1_DRVVBUS */ >; }; }; -- 2.1.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] ARM: dts: Add cppi41 support for dm816x MUSB 2015-03-18 0:19 [PATCH 0/4] Few dm816x fixes and improvments Tony Lindgren 2015-03-18 0:19 ` [PATCH 1/4] ARM: dts: Fix gpio interrupts for dm816x Tony Lindgren 2015-03-18 0:19 ` [PATCH 2/4] ARM: dts: Fix typo for dm816x usb0_pins Tony Lindgren @ 2015-03-18 0:19 ` Tony Lindgren 2015-03-18 0:31 ` Felipe Balbi 2015-03-18 0:19 ` [PATCH 4/4] ARM: dts: Remove PIN_INPUT for dm816x McSPI Tony Lindgren 3 siblings, 1 reply; 9+ messages in thread From: Tony Lindgren @ 2015-03-18 0:19 UTC (permalink / raw) To: linux-arm-kernel Looks like we have cppi41 on dm816x just like on am335x. Cc: Bin Liu <binmlist@gmail.com> Cc: Brian Hutchinson <b.hutchman@gmail.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Matthijs van Duin <matthijsvanduin@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com> --- arch/arm/boot/dts/dm816x.dtsi | 60 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/arch/arm/boot/dts/dm816x.dtsi b/arch/arm/boot/dts/dm816x.dtsi index f35715b..de8427b 100644 --- a/arch/arm/boot/dts/dm816x.dtsi +++ b/arch/arm/boot/dts/dm816x.dtsi @@ -396,6 +396,29 @@ mentor,num-eps = <16>; mentor,ram-bits = <12>; mentor,power = <500>; + + dmas = <&cppi41dma 0 0 &cppi41dma 1 0 + &cppi41dma 2 0 &cppi41dma 3 0 + &cppi41dma 4 0 &cppi41dma 5 0 + &cppi41dma 6 0 &cppi41dma 7 0 + &cppi41dma 8 0 &cppi41dma 9 0 + &cppi41dma 10 0 &cppi41dma 11 0 + &cppi41dma 12 0 &cppi41dma 13 0 + &cppi41dma 14 0 &cppi41dma 0 1 + &cppi41dma 1 1 &cppi41dma 2 1 + &cppi41dma 3 1 &cppi41dma 4 1 + &cppi41dma 5 1 &cppi41dma 6 1 + &cppi41dma 7 1 &cppi41dma 8 1 + &cppi41dma 9 1 &cppi41dma 10 1 + &cppi41dma 11 1 &cppi41dma 12 1 + &cppi41dma 13 1 &cppi41dma 14 1>; + dma-names = + "rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7", + "rx8", "rx9", "rx10", "rx11", "rx12", "rx13", + "rx14", "rx15", + "tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7", + "tx8", "tx9", "tx10", "tx11", "tx12", "tx13", + "tx14", "tx15"; }; usb1: usb at 47401800 { @@ -413,6 +436,43 @@ mentor,num-eps = <16>; mentor,ram-bits = <12>; mentor,power = <500>; + + dmas = <&cppi41dma 15 0 &cppi41dma 16 0 + &cppi41dma 17 0 &cppi41dma 18 0 + &cppi41dma 19 0 &cppi41dma 20 0 + &cppi41dma 21 0 &cppi41dma 22 0 + &cppi41dma 23 0 &cppi41dma 24 0 + &cppi41dma 25 0 &cppi41dma 26 0 + &cppi41dma 27 0 &cppi41dma 28 0 + &cppi41dma 29 0 &cppi41dma 15 1 + &cppi41dma 16 1 &cppi41dma 17 1 + &cppi41dma 18 1 &cppi41dma 19 1 + &cppi41dma 20 1 &cppi41dma 21 1 + &cppi41dma 22 1 &cppi41dma 23 1 + &cppi41dma 24 1 &cppi41dma 25 1 + &cppi41dma 26 1 &cppi41dma 27 1 + &cppi41dma 28 1 &cppi41dma 29 1>; + dma-names = + "rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7", + "rx8", "rx9", "rx10", "rx11", "rx12", "rx13", + "rx14", "rx15", + "tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7", + "tx8", "tx9", "tx10", "tx11", "tx12", "tx13", + "tx14", "tx15"; + }; + + cppi41dma: dma-controller at 47402000 { + compatible = "ti,am3359-cppi41"; + reg = <0x47400000 0x1000 + 0x47402000 0x1000 + 0x47403000 0x1000 + 0x47404000 0x4000>; + reg-names = "glue", "controller", "scheduler", "queuemgr"; + interrupts = <17>; + interrupt-names = "glue"; + #dma-cells = <2>; + #dma-channels = <30>; + #dma-requests = <256>; }; }; -- 2.1.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] ARM: dts: Add cppi41 support for dm816x MUSB 2015-03-18 0:19 ` [PATCH 3/4] ARM: dts: Add cppi41 support for dm816x MUSB Tony Lindgren @ 2015-03-18 0:31 ` Felipe Balbi 2015-03-18 1:18 ` Tony Lindgren 0 siblings, 1 reply; 9+ messages in thread From: Felipe Balbi @ 2015-03-18 0:31 UTC (permalink / raw) To: linux-arm-kernel Hi, On Tue, Mar 17, 2015 at 05:19:20PM -0700, Tony Lindgren wrote: > Looks like we have cppi41 on dm816x just like on am335x. > > Cc: Bin Liu <binmlist@gmail.com> > Cc: Brian Hutchinson <b.hutchman@gmail.com> > Cc: Felipe Balbi <balbi@ti.com> > Cc: Matthijs van Duin <matthijsvanduin@gmail.com> > Signed-off-by: Tony Lindgren <tony@atomide.com> Any logs available ? Any throughput improvements with DMA ? -- balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150317/47d68d58/attachment-0001.sig> ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/4] ARM: dts: Add cppi41 support for dm816x MUSB 2015-03-18 0:31 ` Felipe Balbi @ 2015-03-18 1:18 ` Tony Lindgren 2015-03-18 14:40 ` Felipe Balbi 0 siblings, 1 reply; 9+ messages in thread From: Tony Lindgren @ 2015-03-18 1:18 UTC (permalink / raw) To: linux-arm-kernel * Felipe Balbi <balbi@ti.com> [150317 17:32]: > Hi, > > On Tue, Mar 17, 2015 at 05:19:20PM -0700, Tony Lindgren wrote: > > Looks like we have cppi41 on dm816x just like on am335x. > > > > Cc: Bin Liu <binmlist@gmail.com> > > Cc: Brian Hutchinson <b.hutchman@gmail.com> > > Cc: Felipe Balbi <balbi@ti.com> > > Cc: Matthijs van Duin <matthijsvanduin@gmail.com> > > Signed-off-by: Tony Lindgren <tony@atomide.com> > > Any logs available ? Any throughput improvements with DMA ? So far I only logged with the debug option on. I can do some test runs with your for-next branch to a USB mass storage device if you prefer that, or got some other test in mind? Regards, Tony ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/4] ARM: dts: Add cppi41 support for dm816x MUSB 2015-03-18 1:18 ` Tony Lindgren @ 2015-03-18 14:40 ` Felipe Balbi 2015-03-18 16:25 ` Tony Lindgren 0 siblings, 1 reply; 9+ messages in thread From: Felipe Balbi @ 2015-03-18 14:40 UTC (permalink / raw) To: linux-arm-kernel On Tue, Mar 17, 2015 at 06:18:37PM -0700, Tony Lindgren wrote: > * Felipe Balbi <balbi@ti.com> [150317 17:32]: > > Hi, > > > > On Tue, Mar 17, 2015 at 05:19:20PM -0700, Tony Lindgren wrote: > > > Looks like we have cppi41 on dm816x just like on am335x. > > > > > > Cc: Bin Liu <binmlist@gmail.com> > > > Cc: Brian Hutchinson <b.hutchman@gmail.com> > > > Cc: Felipe Balbi <balbi@ti.com> > > > Cc: Matthijs van Duin <matthijsvanduin@gmail.com> > > > Signed-off-by: Tony Lindgren <tony@atomide.com> > > > > Any logs available ? Any throughput improvements with DMA ? > > So far I only logged with the debug option on. I can do some > test runs with your for-next branch to a USB mass storage device > if you prefer that, or got some other test in mind? mass storage should be fine, just wanna know if you're getting acceptable throughput. -- balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150318/869be06b/attachment.sig> ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/4] ARM: dts: Add cppi41 support for dm816x MUSB 2015-03-18 14:40 ` Felipe Balbi @ 2015-03-18 16:25 ` Tony Lindgren 0 siblings, 0 replies; 9+ messages in thread From: Tony Lindgren @ 2015-03-18 16:25 UTC (permalink / raw) To: linux-arm-kernel * Felipe Balbi <balbi@ti.com> [150318 07:41]: > On Tue, Mar 17, 2015 at 06:18:37PM -0700, Tony Lindgren wrote: > > * Felipe Balbi <balbi@ti.com> [150317 17:32]: > > > Hi, > > > > > > On Tue, Mar 17, 2015 at 05:19:20PM -0700, Tony Lindgren wrote: > > > > Looks like we have cppi41 on dm816x just like on am335x. > > > > > > > > Cc: Bin Liu <binmlist@gmail.com> > > > > Cc: Brian Hutchinson <b.hutchman@gmail.com> > > > > Cc: Felipe Balbi <balbi@ti.com> > > > > Cc: Matthijs van Duin <matthijsvanduin@gmail.com> > > > > Signed-off-by: Tony Lindgren <tony@atomide.com> > > > > > > Any logs available ? Any throughput improvements with DMA ? > > > > So far I only logged with the debug option on. I can do some > > test runs with your for-next branch to a USB mass storage device > > if you prefer that, or got some other test in mind? > > mass storage should be fine, just wanna know if you're getting > acceptable throughput. No luck with your current merge branch with DMA right now, it's producing an error both on bbb and dm816x: "musb-hdrc musb-hdrc.0.auto: Need DT for the DMA engine." So here are some test results against -rc4. CONFIG_MUSB_PIO_ONLY Copy a 10MB file to /dev/sda right after a reboot: # time /bin/sh -c 'cp filler /mnt/ && sync' real 0m2.480s user 0m0.000s sys 0m0.320s Run hdparm a few times: # hdparm -t /dev/sda /dev/sda: Timing buffered disk reads: 34 MB in 3.16 seconds = 10.75 MB/sec CONFIG_USB_TI_CPPI41_DMA Copy a 10MB file to /dev/sda right after a reboot: # time /bin/sh -c 'cp filler /mnt/ && sync' real 0m2.095s user 0m0.000s sys 0m0.310s Run hdparm a few times: # hdparm -t /dev/sda /dev/sda: Timing buffered disk reads: 52 MB in 3.07 seconds = 16.94 MB/sec Regards, Tony ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/4] ARM: dts: Remove PIN_INPUT for dm816x McSPI 2015-03-18 0:19 [PATCH 0/4] Few dm816x fixes and improvments Tony Lindgren ` (2 preceding siblings ...) 2015-03-18 0:19 ` [PATCH 3/4] ARM: dts: Add cppi41 support for dm816x MUSB Tony Lindgren @ 2015-03-18 0:19 ` Tony Lindgren 3 siblings, 0 replies; 9+ messages in thread From: Tony Lindgren @ 2015-03-18 0:19 UTC (permalink / raw) To: linux-arm-kernel On dm816x we have no PIN_INPUT vs PIN_OUTPUT configuration, there are just pulls. Let's remove the bogus flags. Cc: Brian Hutchinson <b.hutchman@gmail.com> Cc: Matthijs van Duin <matthijsvanduin@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com> --- arch/arm/boot/dts/dm8168-evm.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/dm8168-evm.dts b/arch/arm/boot/dts/dm8168-evm.dts index b520a8b..169a855 100644 --- a/arch/arm/boot/dts/dm8168-evm.dts +++ b/arch/arm/boot/dts/dm8168-evm.dts @@ -29,10 +29,10 @@ &dm816x_pinmux { mcspi1_pins: pinmux_mcspi1_pins { pinctrl-single,pins = < - DM816X_IOPAD(0x0a94, PIN_INPUT | MUX_MODE0) /* SPI_SCLK */ - DM816X_IOPAD(0x0a98, PIN_OUTPUT | MUX_MODE0) /* SPI_SCS0 */ - DM816X_IOPAD(0x0aa8, PIN_INPUT | MUX_MODE0) /* SPI_D0 */ - DM816X_IOPAD(0x0aac, PIN_INPUT | MUX_MODE0) /* SPI_D1 */ + DM816X_IOPAD(0x0a94, MUX_MODE0) /* SPI_SCLK */ + DM816X_IOPAD(0x0a98, MUX_MODE0) /* SPI_SCS0 */ + DM816X_IOPAD(0x0aa8, MUX_MODE0) /* SPI_D0 */ + DM816X_IOPAD(0x0aac, MUX_MODE0) /* SPI_D1 */ >; }; -- 2.1.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-03-18 16:25 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-03-18 0:19 [PATCH 0/4] Few dm816x fixes and improvments Tony Lindgren 2015-03-18 0:19 ` [PATCH 1/4] ARM: dts: Fix gpio interrupts for dm816x Tony Lindgren 2015-03-18 0:19 ` [PATCH 2/4] ARM: dts: Fix typo for dm816x usb0_pins Tony Lindgren 2015-03-18 0:19 ` [PATCH 3/4] ARM: dts: Add cppi41 support for dm816x MUSB Tony Lindgren 2015-03-18 0:31 ` Felipe Balbi 2015-03-18 1:18 ` Tony Lindgren 2015-03-18 14:40 ` Felipe Balbi 2015-03-18 16:25 ` Tony Lindgren 2015-03-18 0:19 ` [PATCH 4/4] ARM: dts: Remove PIN_INPUT for dm816x McSPI Tony Lindgren
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).