Skip to content

RFC Use fdt to init mvrtc driver for dreamplug

Jason Cooper u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4fdt: remove i2c example code.common/fdt_decode.c include/fdt_decode.h+0 -461 reply
1/4fdt: remove i2c example code.+0 -00 replies
2/4fdt_decode: make more available.common/fdt_decode.c include/fdt_decode.h+18 -61 reply
2/4fdt_decode: make more available.+0 -00 replies
3/4mvrtc: add fdt support.common/fdt_decode.c drivers/rtc/mvrtc.c drivers/rtc/mvrtc.h +1 more+68 -34 replies
3/4mvrtc: add fdt support.+0 -00 replies
4/4dreamplug: enable fdtboard/Marvell/dreamplug/kirkwood-dreamplug.dts board/Marvell/dreamplug/kirkwood.dtsi include/configs/dreamplug.h+42 -01 reply
4/4dreamplug: enable fdt+0 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [U-Boot] [RFC PATCH 0/4 v1] Use fdt to init mvrtc driver for dreamplug

Simon, All,

This patch series is my attempt to learn device tree with a driver I'm familiar with. Also, to create a real, working example for fdt in U-boot.

To make this work, I applied v2 of Simon Glass' patch series (what this email is in reply to) against v2011.09-rc1. I then cherry picked my dreamplug board support patch. Last, I applied the following series.

It works, although with CONFIG_OF_EMBED. I haven't tried _SEPARATE yet.

Some thoughts:

1.) 'kirkwood-dreamplug.dts' can be renamed 'dreamplug.dts'. Due to
machine_is_XXX 'dreamplug' will be unique, concise, and descriptive. This requires changes to Simon Glass' patchset.

2.) The fdt files should be moved up one directory level, in the end, it
should look like:

board/Marvell/armada100-dt.c
board/Marvell/armada100-dt.h
board/Marvell/armada100.dtsi
board/Marvell/dreamplug.dts
board/Marvell/gplugd.dts # this includes armada100.dtsi
board/Marvell/guruplug.dts
board/Marvell/kirkwood.dtsi
board/Marvell/kirkwood-dt.c
board/Marvell/kirkwood-dt.h
board/Marvell/openrd.dts
board/Marvell/sheevaplug.dts
...
board/Marvell/<other boards>.dts

This also requires changes to Simon's patchset.

3.) Since mach names (dreamplug) and SoC names (kirkwood) are unique,
should we put all .dts and .dtsi files in one dir? eg /dts ? This would facilitate migration to Grant Likely's device-tree.git whereever and whenever it lands. This is also similar to how Linux currently does it (arch/arm/boot/dts/)

Jason Cooper (4):
fdt: remove i2c example code.
fdt_decode: make more available.
mvrtc: add fdt support.
dreamplug: enable fdt

 board/Marvell/dreamplug/kirkwood-dreamplug.dts |   12 +++++
 board/Marvell/dreamplug/kirkwood.dtsi          |   25 ++++++++++
 common/fdt_decode.c                            |   26 ++--------
 drivers/rtc/mvrtc.c                            |   62 ++++++++++++++++++++++-
 drivers/rtc/mvrtc.h                            |    7 +++
 include/configs/dreamplug.h                    |    5 ++
 include/fdt_decode.h                           |   46 +++++------------
 7 files changed, 128 insertions(+), 55 deletions(-)
 create mode 100644 board/Marvell/dreamplug/kirkwood-dreamplug.dts
 create mode 100644 board/Marvell/dreamplug/kirkwood.dtsi