devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] [New BSP] Add initial support for Freescale Kinetis TWR-K70F120M development kit
@ 2015-06-23 21:19 Paul Osmialowski
  2015-06-23 21:19 ` [PATCH 1/9] arm: select different compiler flags for ARM CortexM3 Paul Osmialowski
                   ` (6 more replies)
  0 siblings, 7 replies; 39+ messages in thread
From: Paul Osmialowski @ 2015-06-23 21:19 UTC (permalink / raw)
  To: Andrew Morton, Anson Huang, Ard Biesheuvel, Arnd Bergmann,
	Bhupesh Sharma, Daniel Lezcano, Frank Li, Geert Uytterhoeven,
	Greg Kroah-Hartman, Guenter Roeck, Haojian Zhuang, Ian Campbell,
	Jingchang Lu, Jiri Slaby, Kees Cook, Kumar Gala, Laurent Pinchart,
	Linus Walleij, Magnus Damm, Michael Turquette, Nathan Lynch,
	Nicolas
  Cc: Paul Osmialowski, Yuri Tikhonov, Sergei Poselenov,
	Dmitry Cherkassov, Alexander Potashev

This patchset adds a very basic initial support for TWR-K70F120M
development kit which is based on ARM Cortex-M4 Freescale Kinetis K70 SoC.

I've found this a very lovely piece of equipment which allowed me to
explore mysterious world of noMMU Linux. Therefore I think it deserves
proper support from upstream Linux kernel side.

I based my work on K70 Sub-Family Reference Manual Rev. 3,
K70P256M150SF3RM.pdf and commits published on Emcraft git repo:

https://github.com/EmcraftSystems/linux-emcraft.git

The BSP published by Emcraft is based on Linux 2.6.33, does not use
OF Device Tree and implements its own NVIC, clock source, IOMUX and DMA
controller support routines. I wrote clear remarks whenever I'd used parts
of the code from their repository.

I decided to make use of recent additions to linux-next whenever it was
suitable, i.e.:

o all devices are configured in .dts files
o for NVIC I used in-tree driver
o for systick I used recently added arm,armv7m-systick driver
o for clock sources I implemented drivers that in shape are similar
      to efm32gg drivers (another ARM Cortex-M4 based platform - already
      supported by upstream kernel so I could use it as a reference on how
      things should possibly be done)
o for IOMUX I implemented very simplified pinctrl OF-friendly driver
  (which is sufficient for now, at least to configure UART pins)
o for DMA I extended existing Freescale eDMA driver
o for UART I also extended existing Freescale lpuart driver

You may find the first three patches a bit controversial. They intrude into
sensitive parts of ARM support in kernel tree. You may not like it, but
that's how it started to work for me. I tried to minimize the impact as
much as I could, however any better proposals are more than welcome.

Note that U-boot on my TWR-K70F120M is a bit modest and does not support
DTBs. Therefore the only option for having bootable uImage is zImage with
DTB attached at the end. In short it can be done like this:

make uImage                  (this creates normal uImage along with zImage)
make kinetis-twr-k70f120m.dtb
cat arch/arm/boot/zImage arch/arm/boot/dts/kinetis-twr-k70f120m.dtb >Image
mkimage -A arm -O linux -C none -T kernel -a 0x08008000 -e 0x08008001 \
        -n 'Linux-next-with-dtb' -d Image uImage

I'm booting this image over local network using TFTP. The userspace resides
in initramfs and consists of busybox and a few very basic command line
tools.

This initial support is just a beginning. My TWR-K70F120M is equipped with
many interesting features to which many drivers can be written.

During my work I was using Segger J-Link PRO JTAG which works nicely with
this development board - I can't imagine myself doing all this stuff
without it.

Paul Osmialowski (9):
  arm: select different compiler flags for ARM CortexM3
  arm: do not place huge encoder tables on stack when it is too small
  arm: add call to CPU idle quirks handler
  arm: allow copying of vector table to internal SRAM memory
  arm: twr-k70f120m: basic support for Kinetis TWR-K70F120M
  arm: twr-k70f120m: clock source drivers for Kinetis SoC
  arm: twr-k70f120m: IOMUX driver for Kinetis SoC
  arm: twr-k70f120m: extend Freescale eDMA driver with ability to
    support Kinetis SoC
  arm: twr-k70f120m: extend Freescale lpuart driver with ability to
    support Kinetis SoC

 Documentation/devicetree/bindings/arm/fsl.txt      |   6 +
 .../devicetree/bindings/clock/kinetis-clock.txt    |  25 +
 Documentation/devicetree/bindings/dma/fsl-edma.txt |  38 +-
 .../bindings/pinctrl/fsl,kinetis-pinctrl.txt       |  31 ++
 .../devicetree/bindings/serial/fsl-lpuart.txt      |   6 +-
 .../bindings/timer/fsl,kinetis-pit-timer.txt       |  18 +
 arch/arm/Kconfig                                   |  29 +-
 arch/arm/Kconfig-nommu                             |  16 +
 arch/arm/Makefile                                  |   2 +
 arch/arm/boot/dts/kinetis-twr-k70f120m.dts         |  43 ++
 arch/arm/boot/dts/kinetis.dtsi                     | 215 +++++++++
 arch/arm/kernel/entry-v7m.S                        |   3 +
 arch/arm/kernel/process.c                          |   7 +
 arch/arm/mach-kinetis/Kconfig                      |  15 +
 arch/arm/mach-kinetis/Makefile                     |   5 +
 arch/arm/mach-kinetis/Makefile.boot                |   3 +
 arch/arm/mach-kinetis/include/mach/idle.h          |  33 ++
 arch/arm/mach-kinetis/include/mach/kinetis.h       | 170 +++++++
 arch/arm/mach-kinetis/include/mach/memory.h        |  61 +++
 arch/arm/mach-kinetis/include/mach/power.h         |  83 ++++
 arch/arm/mach-kinetis/kinetis_platform.c           |  61 +++
 arch/arm/mm/Kconfig                                |  12 +-
 arch/arm/mm/proc-v7m.S                             |  11 +
 arch/arm/tools/mach-types                          |   1 +
 drivers/clk/Makefile                               |   1 +
 drivers/clk/clk-kinetis.c                          | 297 ++++++++++++
 drivers/clocksource/Kconfig                        |   5 +
 drivers/clocksource/Makefile                       |   1 +
 drivers/clocksource/timer-kinetis.c                | 294 ++++++++++++
 drivers/dma/fsl-edma.c                             |  81 +++-
 drivers/pinctrl/freescale/Kconfig                  |   8 +
 drivers/pinctrl/freescale/Makefile                 |   1 +
 drivers/pinctrl/freescale/pinctrl-kinetis.c        | 529 +++++++++++++++++++++
 drivers/tty/serial/fsl_lpuart.c                    |  90 +++-
 include/dt-bindings/clock/kinetis-mcg.h            |  25 +
 lib/zlib_inflate/inflate.c                         |   5 +
 36 files changed, 2210 insertions(+), 21 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/kinetis-clock.txt
 create mode 100644 Documentation/devicetree/bindings/pinctrl/fsl,kinetis-pinctrl.txt
 create mode 100644 Documentation/devicetree/bindings/timer/fsl,kinetis-pit-timer.txt
 create mode 100644 arch/arm/boot/dts/kinetis-twr-k70f120m.dts
 create mode 100644 arch/arm/boot/dts/kinetis.dtsi
 create mode 100644 arch/arm/mach-kinetis/Kconfig
 create mode 100644 arch/arm/mach-kinetis/Makefile
 create mode 100644 arch/arm/mach-kinetis/Makefile.boot
 create mode 100644 arch/arm/mach-kinetis/include/mach/idle.h
 create mode 100644 arch/arm/mach-kinetis/include/mach/kinetis.h
 create mode 100644 arch/arm/mach-kinetis/include/mach/memory.h
 create mode 100644 arch/arm/mach-kinetis/include/mach/power.h
 create mode 100644 arch/arm/mach-kinetis/kinetis_platform.c
 create mode 100644 drivers/clk/clk-kinetis.c
 create mode 100644 drivers/clocksource/timer-kinetis.c
 create mode 100644 drivers/pinctrl/freescale/pinctrl-kinetis.c
 create mode 100644 include/dt-bindings/clock/kinetis-mcg.h

-- 
2.3.6

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-09-08 14:28 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-23 21:19 [PATCH 0/9] [New BSP] Add initial support for Freescale Kinetis TWR-K70F120M development kit Paul Osmialowski
2015-06-23 21:19 ` [PATCH 1/9] arm: select different compiler flags for ARM CortexM3 Paul Osmialowski
2015-06-23 21:19 ` [PATCH 2/9] arm: do not place huge encoder tables on stack when it is too small Paul Osmialowski
2015-06-24  7:10   ` Geert Uytterhoeven
2015-06-24  7:17     ` Paul Osmialowski
2015-06-23 21:19 ` [PATCH 3/9] arm: add call to CPU idle quirks handler Paul Osmialowski
2015-06-23 21:59   ` Arnd Bergmann
2015-06-25 16:42     ` Nicolas Pitre
     [not found]       ` <alpine.LFD.2.11.1506251237000.2617-fMhRO7WWcppj+hNMo8g0rg@public.gmane.org>
2015-06-26  5:30         ` Paul Osmialowski
2015-06-26  7:40           ` Arnd Bergmann
2015-06-26 21:52             ` Paul Osmialowski
     [not found]               ` <alpine.LNX.2.00.1506262324230.5744-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2015-06-26 22:27                 ` Russell King - ARM Linux
     [not found] ` <1435094387-20146-1-git-send-email-pawelo-rhuoMcPwk82rDJvtcaxF/A@public.gmane.org>
2015-06-23 21:19   ` [PATCH 1/9] arm: select different compiler flags for ARM CortexM3 Paul Osmialowski
2015-06-23 21:19   ` [PATCH 2/9] arm: do not place huge encoder tables on stack when it is too small Paul Osmialowski
2015-06-23 21:19   ` [PATCH 3/9] arm: add call to CPU idle quirks handler Paul Osmialowski
2015-06-23 21:19   ` [PATCH 4/9] arm: allow copying of vector table to internal SRAM memory Paul Osmialowski
2015-06-23 21:19   ` [PATCH 5/9] arm: twr-k70f120m: basic support for Kinetis TWR-K70F120M Paul Osmialowski
2015-06-23 22:05     ` Arnd Bergmann
2015-06-23 22:33       ` Russell King - ARM Linux
2015-06-24  4:42       ` Paul Osmialowski
2015-06-23 21:19   ` [PATCH 6/9] arm: twr-k70f120m: clock source drivers for Kinetis SoC Paul Osmialowski
2015-06-23 21:19   ` [PATCH 7/9] arm: twr-k70f120m: IOMUX driver " Paul Osmialowski
2015-06-23 21:19   ` [PATCH 8/9] arm: twr-k70f120m: extend Freescale eDMA driver with ability to support " Paul Osmialowski
     [not found]     ` <1435094387-20146-9-git-send-email-pawelo-rhuoMcPwk82rDJvtcaxF/A@public.gmane.org>
2015-06-24 16:14       ` Vinod Koul
2015-06-24 17:43         ` Paul Osmialowski
2015-06-23 21:19   ` [PATCH 9/9] arm: twr-k70f120m: extend Freescale lpuart " Paul Osmialowski
2015-06-23 21:19 ` [PATCH 4/9] arm: allow copying of vector table to internal SRAM memory Paul Osmialowski
2015-06-23 21:19 ` [PATCH 6/9] arm: twr-k70f120m: clock source drivers for Kinetis SoC Paul Osmialowski
     [not found]   ` <1435094387-20146-7-git-send-email-pawelo-rhuoMcPwk82rDJvtcaxF/A@public.gmane.org>
2015-06-23 22:24     ` Stephen Boyd
2015-06-24  5:09       ` Paul Osmialowski
2015-06-23 22:25   ` Arnd Bergmann
2015-06-24  7:53   ` Thomas Gleixner
2015-06-23 21:19 ` [PATCH 7/9] arm: twr-k70f120m: IOMUX driver " Paul Osmialowski
2015-06-24 10:21   ` Paul Bolle
2015-06-24 17:44     ` Paul Osmialowski
     [not found]   ` <1435094387-20146-8-git-send-email-pawelo-rhuoMcPwk82rDJvtcaxF/A@public.gmane.org>
2015-06-24 10:21     ` Paul Bolle
2015-07-14  8:53     ` Linus Walleij
2015-09-08  8:04       ` Paul Osmialowski
2015-09-08 14:28         ` Linus Walleij

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).