mbox

[GIT,PULL,RESEND] arm-soc: vt8500: Convert mach-vt8500 to devicetree

Message ID 1348119906.8199.3.camel@gitbox
State New
Headers show

Pull-request

git://git.code.sf.net/p/linuxwmt/code tags/vt8500-for-next

Message

Tony Prisk Sept. 20, 2012, 5:45 a.m. UTC
Please disregard the last pull request - commit id's were invalid.
This one is now correct.

The following changes since commit 55d512e245bc7699a8800e23df1a24195dd08217:

  Linux 3.6-rc5 (2012-09-08 16:43:45 -0700)

are available in the git repository at:

  git://git.code.sf.net/p/linuxwmt/code tags/vt8500-for-next

for you to fetch changes up to 0cd5434aae73698aa4a48542bd8d1428d44820cb:

  arm: vt8500: Update arch-vt8500 to devicetree support. (2012-09-20 07:23:26 +1200)

----------------------------------------------------------------
Update mach-vt8500 to devicetree and remove non-dt code.

----------------------------------------------------------------
Tony Prisk (8):
      arm: vt8500: Add device tree files for VIA/Wondermedia SoC's
      rtc: vt8500: Add devicetree support for vt8500-rtc
      serial: vt8500: Add devicetree support for vt8500-serial
      video: vt8500: Add devicetree support for vt8500-fb and wm8505-fb
      arm: vt8500: clk: Add Common Clock Framework support
      arm: vt8500: doc: Add device tree bindings for arch-vt8500 devices
      arm: vt8500: gpio: Devicetree support for arch-vt8500
      arm: vt8500: Update arch-vt8500 to devicetree support.

 Documentation/devicetree/bindings/arm/vt8500.txt   |   14 +
 .../bindings/arm/vt8500/via,vt8500-intc.txt        |   16 +
 .../bindings/arm/vt8500/via,vt8500-pmc.txt         |   13 +
 .../bindings/arm/vt8500/via,vt8500-timer.txt       |   15 +
 Documentation/devicetree/bindings/clock/vt8500.txt |   72 +++
 .../devicetree/bindings/gpio/gpio-vt8500.txt       |   24 +
 .../devicetree/bindings/rtc/via,vt8500-rtc.txt     |   15 +
 .../bindings/tty/serial/via,vt8500-uart.txt        |   17 +
 .../devicetree/bindings/usb/platform-uhci.txt      |   15 +
 .../devicetree/bindings/usb/via,vt8500-ehci.txt    |   15 +
 .../devicetree/bindings/vendor-prefixes.txt        |    2 +
 .../devicetree/bindings/video/via,vt8500-fb.txt    |   48 ++
 .../devicetree/bindings/video/wm,prizm-ge-rops.txt |   13 +
 .../devicetree/bindings/video/wm,wm8505-fb.txt     |   21 +
 arch/arm/Kconfig                                   |    5 +
 arch/arm/boot/dts/vt8500-bv07.dts                  |   31 ++
 arch/arm/boot/dts/vt8500.dtsi                      |  115 +++++
 arch/arm/boot/dts/wm8505-ref.dts                   |   31 ++
 arch/arm/boot/dts/wm8505.dtsi                      |  142 ++++++
 arch/arm/boot/dts/wm8650-mid.dts                   |   31 ++
 arch/arm/boot/dts/wm8650.dtsi                      |  146 ++++++
 arch/arm/mach-vt8500/Kconfig                       |   72 +--
 arch/arm/mach-vt8500/Makefile                      |    9 +-
 arch/arm/mach-vt8500/bv07.c                        |   80 ---
 arch/arm/mach-vt8500/common.h                      |   28 ++
 arch/arm/mach-vt8500/devices-vt8500.c              |   91 ----
 arch/arm/mach-vt8500/devices-wm8505.c              |   99 ----
 arch/arm/mach-vt8500/devices.c                     |  270 -----------
 arch/arm/mach-vt8500/devices.h                     |   88 ----
 arch/arm/mach-vt8500/gpio.c                        |  240 ---------
 arch/arm/mach-vt8500/include/mach/restart.h        |    4 +-
 arch/arm/mach-vt8500/include/mach/vt8500_irqs.h    |   88 ----
 arch/arm/mach-vt8500/include/mach/vt8500_regs.h    |   79 ---
 arch/arm/mach-vt8500/include/mach/wm8505_irqs.h    |  115 -----
 arch/arm/mach-vt8500/include/mach/wm8505_regs.h    |   78 ---
 arch/arm/mach-vt8500/irq.c                         |  209 ++++----
 arch/arm/mach-vt8500/restart.c                     |   54 ---
 arch/arm/mach-vt8500/timer.c                       |   67 ++-
 arch/arm/mach-vt8500/vt8500.c                      |  196 ++++++++
 arch/arm/mach-vt8500/wm8505_7in.c                  |   79 ---
 drivers/clk/Makefile                               |    1 +
 drivers/clk/clk-vt8500.c                           |  510 ++++++++++++++++++++
 drivers/gpio/Kconfig                               |    6 +
 drivers/gpio/Makefile                              |    1 +
 drivers/gpio/gpio-vt8500.c                         |  316 ++++++++++++
 drivers/rtc/rtc-vt8500.c                           |    9 +-
 drivers/tty/serial/vt8500_serial.c                 |   58 ++-
 drivers/video/Kconfig                              |    6 +-
 drivers/video/vt8500lcdfb.c                        |   79 ++-
 drivers/video/wm8505fb.c                           |   97 +++-
 drivers/video/wmt_ge_rops.c                        |    9 +-
 51 files changed, 2265 insertions(+), 1574 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/vt8500.txt
 create mode 100644 Documentation/devicetree/bindings/arm/vt8500/via,vt8500-intc.txt
 create mode 100644 Documentation/devicetree/bindings/arm/vt8500/via,vt8500-pmc.txt
 create mode 100644 Documentation/devicetree/bindings/arm/vt8500/via,vt8500-timer.txt
 create mode 100644 Documentation/devicetree/bindings/clock/vt8500.txt
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-vt8500.txt
 create mode 100644 Documentation/devicetree/bindings/rtc/via,vt8500-rtc.txt
 create mode 100644 Documentation/devicetree/bindings/tty/serial/via,vt8500-uart.txt
 create mode 100644 Documentation/devicetree/bindings/usb/platform-uhci.txt
 create mode 100644 Documentation/devicetree/bindings/usb/via,vt8500-ehci.txt
 create mode 100644 Documentation/devicetree/bindings/video/via,vt8500-fb.txt
 create mode 100644 Documentation/devicetree/bindings/video/wm,prizm-ge-rops.txt
 create mode 100644 Documentation/devicetree/bindings/video/wm,wm8505-fb.txt
 create mode 100644 arch/arm/boot/dts/vt8500-bv07.dts
 create mode 100644 arch/arm/boot/dts/vt8500.dtsi
 create mode 100644 arch/arm/boot/dts/wm8505-ref.dts
 create mode 100644 arch/arm/boot/dts/wm8505.dtsi
 create mode 100644 arch/arm/boot/dts/wm8650-mid.dts
 create mode 100644 arch/arm/boot/dts/wm8650.dtsi
 delete mode 100644 arch/arm/mach-vt8500/bv07.c
 create mode 100644 arch/arm/mach-vt8500/common.h
 delete mode 100644 arch/arm/mach-vt8500/devices-vt8500.c
 delete mode 100644 arch/arm/mach-vt8500/devices-wm8505.c
 delete mode 100644 arch/arm/mach-vt8500/devices.c
 delete mode 100644 arch/arm/mach-vt8500/devices.h
 delete mode 100644 arch/arm/mach-vt8500/gpio.c
 delete mode 100644 arch/arm/mach-vt8500/include/mach/vt8500_irqs.h
 delete mode 100644 arch/arm/mach-vt8500/include/mach/vt8500_regs.h
 delete mode 100644 arch/arm/mach-vt8500/include/mach/wm8505_irqs.h
 delete mode 100644 arch/arm/mach-vt8500/include/mach/wm8505_regs.h
 delete mode 100644 arch/arm/mach-vt8500/restart.c
 create mode 100644 arch/arm/mach-vt8500/vt8500.c
 delete mode 100644 arch/arm/mach-vt8500/wm8505_7in.c
 create mode 100644 drivers/clk/clk-vt8500.c
 create mode 100644 drivers/gpio/gpio-vt8500.c

Comments

Olof Johansson Sept. 20, 2012, 11:28 p.m. UTC | #1
Hi,

On Thu, Sep 20, 2012 at 05:45:06PM +1200, Tony Prisk wrote:
> Please disregard the last pull request - commit id's were invalid.
> This one is now correct.
> 
> The following changes since commit 55d512e245bc7699a8800e23df1a24195dd08217:
> 
>   Linux 3.6-rc5 (2012-09-08 16:43:45 -0700)
> 
> are available in the git repository at:
> 
>   git://git.code.sf.net/p/linuxwmt/code tags/vt8500-for-next
> 
> for you to fetch changes up to 0cd5434aae73698aa4a48542bd8d1428d44820cb:
> 
>   arm: vt8500: Update arch-vt8500 to devicetree support. (2012-09-20 07:23:26 +1200)
> 
> ----------------------------------------------------------------
> Update mach-vt8500 to devicetree and remove non-dt code.
> 
> ----------------------------------------------------------------
> Tony Prisk (8):
>       arm: vt8500: Add device tree files for VIA/Wondermedia SoC's
>       rtc: vt8500: Add devicetree support for vt8500-rtc
>       serial: vt8500: Add devicetree support for vt8500-serial
>       video: vt8500: Add devicetree support for vt8500-fb and wm8505-fb
>       arm: vt8500: clk: Add Common Clock Framework support
>       arm: vt8500: doc: Add device tree bindings for arch-vt8500 devices
>       arm: vt8500: gpio: Devicetree support for arch-vt8500
>       arm: vt8500: Update arch-vt8500 to devicetree support.

Overall this series looks great, however I pinged Rob Herring about it
since I didn't see his Acked-by on the bindings patch. It sounds like he
has some comments on the display pieces, so unless you can break those
out and do everything else for 3.7, we might need to hold off until that
has been settled.


-Olof
Tony Prisk Sept. 21, 2012, 6:07 a.m. UTC | #2
On Thu, 2012-09-20 at 16:28 -0700, Olof Johansson wrote:
> Hi,
> 
> On Thu, Sep 20, 2012 at 05:45:06PM +1200, Tony Prisk wrote:
> > Please disregard the last pull request - commit id's were invalid.
> > This one is now correct.
> > 
> > The following changes since commit 55d512e245bc7699a8800e23df1a24195dd08217:
> > 
> >   Linux 3.6-rc5 (2012-09-08 16:43:45 -0700)
> > 
> > are available in the git repository at:
> > 
> >   git://git.code.sf.net/p/linuxwmt/code tags/vt8500-for-next
> > 
> > for you to fetch changes up to 0cd5434aae73698aa4a48542bd8d1428d44820cb:
> > 
> >   arm: vt8500: Update arch-vt8500 to devicetree support. (2012-09-20 07:23:26 +1200)
> > 
> > ----------------------------------------------------------------
> > Update mach-vt8500 to devicetree and remove non-dt code.
> > 
> > ----------------------------------------------------------------
> > Tony Prisk (8):
> >       arm: vt8500: Add device tree files for VIA/Wondermedia SoC's
> >       rtc: vt8500: Add devicetree support for vt8500-rtc
> >       serial: vt8500: Add devicetree support for vt8500-serial
> >       video: vt8500: Add devicetree support for vt8500-fb and wm8505-fb
> >       arm: vt8500: clk: Add Common Clock Framework support
> >       arm: vt8500: doc: Add device tree bindings for arch-vt8500 devices
> >       arm: vt8500: gpio: Devicetree support for arch-vt8500
> >       arm: vt8500: Update arch-vt8500 to devicetree support.
> 
> Overall this series looks great, however I pinged Rob Herring about it
> since I didn't see his Acked-by on the bindings patch. It sounds like he
> has some comments on the display pieces, so unless you can break those
> out and do everything else for 3.7, we might need to hold off until that
> has been settled.
> 
> 
> -Olof

This was discussed when the series was originally posted. The display
mode binding was still floating around with V1 suggestions so I had to
make a best-guess as to how it would end up.

Without it, the patch will break support for 95% of users as framebuffer
is the only output device. 

Given that I can't fix it as the videomode helper patch is still getting
revisions (Last I saw v4 had outstanding queries against it) I guess it
will have to wait until next time around.

Regards

Tony P
Tony Prisk Sept. 21, 2012, 6:42 a.m. UTC | #3
On Fri, 2012-09-21 at 18:07 +0000, Tony Prisk wrote:
> On Thu, 2012-09-20 at 16:28 -0700, Olof Johansson wrote:
> > Hi,
> > 
> > On Thu, Sep 20, 2012 at 05:45:06PM +1200, Tony Prisk wrote:
> > > Please disregard the last pull request - commit id's were invalid.
> > > This one is now correct.
> > > 
> > > The following changes since commit 55d512e245bc7699a8800e23df1a24195dd08217:
> > > 
> > >   Linux 3.6-rc5 (2012-09-08 16:43:45 -0700)
> > > 
> > > are available in the git repository at:
> > > 
> > >   git://git.code.sf.net/p/linuxwmt/code tags/vt8500-for-next
> > > 
> > > for you to fetch changes up to 0cd5434aae73698aa4a48542bd8d1428d44820cb:
> > > 
> > >   arm: vt8500: Update arch-vt8500 to devicetree support. (2012-09-20 07:23:26 +1200)
> > > 
> > > ----------------------------------------------------------------
> > > Update mach-vt8500 to devicetree and remove non-dt code.
> > > 
> > > ----------------------------------------------------------------
> > > Tony Prisk (8):
> > >       arm: vt8500: Add device tree files for VIA/Wondermedia SoC's
> > >       rtc: vt8500: Add devicetree support for vt8500-rtc
> > >       serial: vt8500: Add devicetree support for vt8500-serial
> > >       video: vt8500: Add devicetree support for vt8500-fb and wm8505-fb
> > >       arm: vt8500: clk: Add Common Clock Framework support
> > >       arm: vt8500: doc: Add device tree bindings for arch-vt8500 devices
> > >       arm: vt8500: gpio: Devicetree support for arch-vt8500
> > >       arm: vt8500: Update arch-vt8500 to devicetree support.
> > 
> > Overall this series looks great, however I pinged Rob Herring about it
> > since I didn't see his Acked-by on the bindings patch. It sounds like he
> > has some comments on the display pieces, so unless you can break those
> > out and do everything else for 3.7, we might need to hold off until that
> > has been settled.
> > 
> > 
> > -Olof
> 
> This was discussed when the series was originally posted. The display
> mode binding was still floating around with V1 suggestions so I had to
> make a best-guess as to how it would end up.
> 
> Without it, the patch will break support for 95% of users as framebuffer
> is the only output device. 
> 
> Given that I can't fix it as the videomode helper patch is still getting
> revisions (Last I saw v4 had outstanding queries against it) I guess it
> will have to wait until next time around.
> 
> Regards
> 
> Tony P

I think I was a bit hasty in my reply.

Having looked at v4 of the videomode helper patch, there is only naming
differences between my display node and the v4 binding. These could be
fixed in a few minutes.

Given the late stage, how likely is it that the videomode helper is
going to make it in to 3.7?

If not, couldn't this patchset go through with the board file changes to
the display node to bring it inline with the expected binding? 

I plan to submit a new framebuffer driver for 3.8 which could be
modified to use the helper when its in 3.8 (assuming it doesn't make
3.7) - or the existing framebuffer driver could be patched to use the
of_helper. I realise this creates a bit of churn on the framebuffer
code, but more than likely its going to occur anyway if the new driver
is accepted.

Regards

Tony P
Tony Prisk Sept. 21, 2012, 7:30 a.m. UTC | #4
On Fri, 2012-09-21 at 18:42 +0000, Tony Prisk wrote:
> On Fri, 2012-09-21 at 18:07 +0000, Tony Prisk wrote:
> > On Thu, 2012-09-20 at 16:28 -0700, Olof Johansson wrote:
> > > Hi,
> > > 
> > > On Thu, Sep 20, 2012 at 05:45:06PM +1200, Tony Prisk wrote:
> > > > Please disregard the last pull request - commit id's were invalid.
> > > > This one is now correct.
> > > > 
> > > > The following changes since commit 55d512e245bc7699a8800e23df1a24195dd08217:
> > > > 
> > > >   Linux 3.6-rc5 (2012-09-08 16:43:45 -0700)
> > > > 
> > > > are available in the git repository at:
> > > > 
> > > >   git://git.code.sf.net/p/linuxwmt/code tags/vt8500-for-next
> > > > 
> > > > for you to fetch changes up to 0cd5434aae73698aa4a48542bd8d1428d44820cb:
> > > > 
> > > >   arm: vt8500: Update arch-vt8500 to devicetree support. (2012-09-20 07:23:26 +1200)
> > > > 
> > > > ----------------------------------------------------------------
> > > > Update mach-vt8500 to devicetree and remove non-dt code.
> > > > 
> > > > ----------------------------------------------------------------
> > > > Tony Prisk (8):
> > > >       arm: vt8500: Add device tree files for VIA/Wondermedia SoC's
> > > >       rtc: vt8500: Add devicetree support for vt8500-rtc
> > > >       serial: vt8500: Add devicetree support for vt8500-serial
> > > >       video: vt8500: Add devicetree support for vt8500-fb and wm8505-fb
> > > >       arm: vt8500: clk: Add Common Clock Framework support
> > > >       arm: vt8500: doc: Add device tree bindings for arch-vt8500 devices
> > > >       arm: vt8500: gpio: Devicetree support for arch-vt8500
> > > >       arm: vt8500: Update arch-vt8500 to devicetree support.
> > > 
> > > Overall this series looks great, however I pinged Rob Herring about it
> > > since I didn't see his Acked-by on the bindings patch. It sounds like he
> > > has some comments on the display pieces, so unless you can break those
> > > out and do everything else for 3.7, we might need to hold off until that
> > > has been settled.
> > > 
> > > 
> > > -Olof
> > 
> > This was discussed when the series was originally posted. The display
> > mode binding was still floating around with V1 suggestions so I had to
> > make a best-guess as to how it would end up.
> > 
> > Without it, the patch will break support for 95% of users as framebuffer
> > is the only output device. 
> > 
> > Given that I can't fix it as the videomode helper patch is still getting
> > revisions (Last I saw v4 had outstanding queries against it) I guess it
> > will have to wait until next time around.
> > 
> > Regards
> > 
> > Tony P
> 
> I think I was a bit hasty in my reply.
> 
> Having looked at v4 of the videomode helper patch, there is only naming
> differences between my display node and the v4 binding. These could be
> fixed in a few minutes.
> 
> Given the late stage, how likely is it that the videomode helper is
> going to make it in to 3.7?
> 
> If not, couldn't this patchset go through with the board file changes to
> the display node to bring it inline with the expected binding? 
> 
> I plan to submit a new framebuffer driver for 3.8 which could be
> modified to use the helper when its in 3.8 (assuming it doesn't make
> 3.7) - or the existing framebuffer driver could be patched to use the
> of_helper. I realise this creates a bit of churn on the framebuffer
> code, but more than likely its going to occur anyway if the new driver
> is accepted.
> 
> Regards
> 
> Tony P

To clarify, I have made the following changes to try bringing the code
in line with the videomode_helper patch. I guess this is really a
question for Rob - Does this help??

In the soc dtsi:
		fb@d8050800 {
			compatible = "wm,wm8505-fb";
			reg = <0xd8050800 0x200>;
			display = <&display>;
			default-mode = <&mode0>;
		};


In the board dts:
	display: display@0 {
		modes {
			mode0: mode@0 {
				hactive = <800>;
				vactive = <480>;
				hback-porch = <88>;
				hfront-porch = <40>;
				hsync-len = <0>;
				vback-porch = <32>;
				vfront-porch = <11>;
				vsync-len = <1>;
				clock = <0>;	/* unused but required */
				bpp = <16>;	/* non-standard but required */
			};
		};
	};


In the framebuffer driver:
	...
	np = of_parse_phandle(pdev->dev.of_node, "default-mode", 0);
	if (!np) {
		pr_err("%s: No display description in Device Tree\n", __func__);
		ret = -EINVAL;
		goto failed_free_res;
	}

	/*
	 * This code is copied from Sascha Hauer's of_videomode helper
	 * and can be replaced with a call to the helper once mainlined
	 */
	ret = 0;
	ret |= of_property_read_u32(np, "hactive", &of_mode.xres);
	ret |= of_property_read_u32(np, "vactive", &of_mode.yres);
	...


I realise this probably makes more sense to me than anyone else, so if
you would like a proper patch posted let me know.

Regards

Tony P
Arnd Bergmann Sept. 21, 2012, 9:17 a.m. UTC | #5
On Friday 21 September 2012, Tony Prisk wrote:
> > I plan to submit a new framebuffer driver for 3.8 which could be
> > modified to use the helper when its in 3.8 (assuming it doesn't make
> > 3.7) - or the existing framebuffer driver could be patched to use the
> > of_helper. I realise this creates a bit of churn on the framebuffer
> > code, but more than likely its going to occur anyway if the new driver
> > is accepted.

Slightly unrelated, but what is the state of this driver? I believe
"modern" drivers are supposed to register as a kernel modesetting
driver to the drivers/gpu/drm framwork rather than the traditional
drivers/video infrastructure.

> To clarify, I have made the following changes to try bringing the code
> in line with the videomode_helper patch. I guess this is really a
> question for Rob - Does this help??

>From all I can tell, the vt8500 platform code in the current (v3.6)
version is rather broken due to bitrot, and I think we should take
your code in the fixed version unless Rob has any serious objections.

You have done a great job on cleaning it up and I'd love to see this
all working again in 3.7, even if we have to adapt the bindings
in 3.8.

	Arnd