ARM: meson: initial support for MesonX SoCs
Subsystems (5)
cover ARM: meson: initial support for MesonX SoCs
This patchset is taken from http://www.spinics.net/lists/devicetree/msg48979.html
and contains the preliminary support for MesonX-based SoCs.
I would like to get these merged for upcoming 3.18 merge window if there are no concerns on this version.
Amlogic AML8726-MX (codename Meson6) is a highly integrated multimedia application processor SoC for Multimedia Internet Device (MID), tablet and Set Top Box (STB). It integrates a powerful CPU, a 2D/3D graphics subsystem and a state-of-the-art video decoding engine together with all major peripherals. It is manufactured by Amlogic, inc.
Amlogic doesn't release any documentation about their SoCs, so the code has been reverse-engineered from the messy source code released at:
http://openlinux.amlogic.com:8000/download/
Carlo Caione (6):
ARM: meson: debug: add debug UART for earlyprintk support
ARM: meson: documentation: add bindings documentation
ARM: meson: add basic support for MesonX SoCs
ARM: meson: dts: add basic Meson/Meson6/Meson6-atv1200 DTSI/DTS
ARM: meson: update multi_v7_defconfig
MAINTAINERS: Add entry for the Amlogic MesonX SoCs
Documentation/devicetree/bindings/arm/amlogic.txt | 8 ++ .../devicetree/bindings/arm/geniatech.txt | 5 + .../devicetree/bindings/vendor-prefixes.txt | 2 + MAINTAINERS | 6 ++ arch/arm/Kconfig | 2 + arch/arm/Kconfig.debug | 14 ++- arch/arm/Makefile | 1 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/meson.dtsi | 105 +++++++++++++++++++++ arch/arm/boot/dts/meson6-atv1200.dts | 66 +++++++++++++ arch/arm/boot/dts/meson6.dtsi | 78 +++++++++++++++ arch/arm/configs/multi_v7_defconfig | 3 + arch/arm/include/debug/meson.S | 35 +++++++ arch/arm/mach-meson/Kconfig | 13 +++ arch/arm/mach-meson/Makefile | 1 + arch/arm/mach-meson/meson.c | 27 ++++++ 16 files changed, 365 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/amlogic.txt create mode 100644 Documentation/devicetree/bindings/arm/geniatech.txt create mode 100644 arch/arm/boot/dts/meson.dtsi create mode 100644 arch/arm/boot/dts/meson6-atv1200.dts create mode 100644 arch/arm/boot/dts/meson6.dtsi create mode 100644 arch/arm/include/debug/meson.S create mode 100644 arch/arm/mach-meson/Kconfig create mode 100644 arch/arm/mach-meson/Makefile create mode 100644 arch/arm/mach-meson/meson.c
Signature · 1 line
1.9.1
PATCH 1/6 ARM: meson: debug: add debug UART for earlyprintk support
Add the UART definitions needed to support earlyprintk for MesonX SoCs on UARTAO.
--- arch/arm/Kconfig.debug | 14 ++++++++++++-- arch/arm/include/debug/meson.S | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 arch/arm/include/debug/meson.S
arch/arm/Kconfig.debug +12 -2
@@ -348,6 +348,13 @@ choice Say Y here if you want the debug print routines to direct their output to UART1 serial port on KEYSTONE2 devices. + config DEBUG_MESON_UARTAO + bool "Kernel low-level debugging via Meson6 UARTAO" + depends on ARCH_MESON + help + Say Y here if you want kernel low-lever debugging support + on Amlogic Meson6 based platforms on the UARTAO. + config DEBUG_MMP_UART2 bool "Kernel low-level debugging message via MMP UART2" depends on ARCH_MMP
@@ -1011,6 +1018,7 @@ config DEBUG_LL_INCLUDE string default "debug/8250.S" if DEBUG_LL_UART_8250 || DEBUG_UART_8250 default "debug/clps711x.S" if DEBUG_CLPS711X_UART1 || DEBUG_CLPS711X_UART2 + default "debug/meson.S" if DEBUG_MESON_UARTAO default "debug/pl01x.S" if DEBUG_LL_UART_PL01X || DEBUG_UART_PL01X default "debug/exynos.S" if DEBUG_EXYNOS_UART default "debug/efm32.S" if DEBUG_LL_UART_EFM32
@@ -1106,6 +1114,7 @@ config DEBUG_UART_PHYS default 0xc8000003 if ARCH_IXP4XX && CPU_BIG_ENDIAN default 0xd0000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX default 0xd0012000 if DEBUG_MVEBU_UART + default 0xc81004c0 if DEBUG_MESON_UARTAO default 0xd4017000 if DEBUG_MMP_UART2 default 0xd4018000 if DEBUG_MMP_UART3 default 0xe0000000 if ARCH_SPEAR13XX
@@ -1125,7 +1134,7 @@ config DEBUG_UART_PHYS default 0xfffff700 if ARCH_IOP33X depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ DEBUG_LL_UART_EFM32 || \ - DEBUG_UART_8250 || DEBUG_UART_PL01X || \ + DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \ DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART config DEBUG_UART_VIRT
@@ -1162,6 +1171,7 @@ config DEBUG_UART_VIRT default 0xfd012000 if ARCH_MV78XX0 default 0xfde12000 if ARCH_DOVE default 0xfe012000 if ARCH_ORION5X + default 0xf31004c0 if DEBUG_MESON_UARTAO default 0xfe017000 if DEBUG_MMP_UART2 default 0xfe018000 if DEBUG_MMP_UART3 default 0xfe100000 if DEBUG_IMX23_UART || DEBUG_IMX28_UART
@@ -1193,7 +1203,7 @@ config DEBUG_UART_VIRT default 0xff003000 if DEBUG_U300_UART default DEBUG_UART_PHYS if !MMU depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ - DEBUG_UART_8250 || DEBUG_UART_PL01X || \ + DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \ DEBUG_MSM_UART || DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART config DEBUG_UART_8250_SHIFT
arch/arm/include/debug/meson.S new file +35 -0
@@ -0,0 +1,35 @@ +/* + * Copyright (C) 2014 Carlo Caione + * Carlo Caione <[email protected]> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#define MESON_AO_UART_WFIFO 0x0 +#define MESON_AO_UART_STATUS 0xc + +#define MESON_AO_UART_TX_FIFO_EMPTY (1 << 22) +#define MESON_AO_UART_TX_FIFO_FULL (1 << 21) + + .macro addruart, rp, rv, tmp + ldr \rp, =(CONFIG_DEBUG_UART_PHYS) @ physical + ldr \rv, =(CONFIG_DEBUG_UART_VIRT) @ virtual + .endm + + .macro senduart,rd,rx + str \rd, [\rx, #MESON_AO_UART_WFIFO] + .endm + + .macro busyuart,rd,rx +1002: ldr \rd, [\rx, #MESON_AO_UART_STATUS] + tst \rd, #MESON_AO_UART_TX_FIFO_EMPTY + beq 1002b + .endm + + .macro waituart,rd,rx +1001: ldr \rd, [\rx, #MESON_AO_UART_STATUS] + tst \rd, #MESON_AO_UART_TX_FIFO_FULL + bne 1001b + .endm
Signature · 1 line
1.9.1
PATCH 2/6 ARM: meson: documentation: add bindings documentation
In reply to Carlo CaioneAdd vendor prefixes and basic documentation for MesonX SoCs bindings
--- Documentation/devicetree/bindings/arm/amlogic.txt | 8 ++++++++ Documentation/devicetree/bindings/arm/geniatech.txt | 5 +++++ Documentation/devicetree/bindings/vendor-prefixes.txt | 2 ++ 3 files changed, 15 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/amlogic.txt create mode 100644 Documentation/devicetree/bindings/arm/geniatech.txt
Documentation/devicetree/bindings/arm/amlogic.txt new file +8 -0
@@ -0,0 +1,8 @@ +Amlogic MesonX device tree bindings +------------------------------------------- + +Boards with the Amlogic Meson6 SoC shall have the following properties: + +Required root node property: + +compatible = "amlogic,meson6";
Documentation/devicetree/bindings/arm/geniatech.txt new file +5 -0
@@ -0,0 +1,5 @@ +Geniatech platforms device tree bindings +------------------------------------------- + +Geniatech ATV1200 + - compatible = "geniatech,atv1200"
Documentation/devicetree/bindings/vendor-prefixes.txt +2 -0
@@ -14,6 +14,7 @@ allwinner Allwinner Technology Co., Ltd. altr Altera Corp. amcc Applied Micro Circuits Corporation (APM, formally AMCC) amd Advanced Micro Devices (AMD), Inc. +amlogic Amlogic, Inc. ams AMS AG amstaos AMS-Taos Inc. apm Applied Micro Circuits Corporation (APM)
@@ -52,6 +53,7 @@ excito Excito fsl Freescale Semiconductor GEFanuc GE Fanuc Intelligent Platforms Embedded Systems, Inc. gef GE Fanuc Intelligent Platforms Embedded Systems, Inc. +geniatech Geniatech, Inc. globalscale Globalscale Technologies, Inc. gmt Global Mixed-mode Technology, Inc. google Google, Inc.
Signature · 1 line
1.9.1
PATCH 3/6 ARM: meson: add basic support for MesonX SoCs
In reply to Carlo CaioneThis patch adds the basic machine file for the MesonX SoCs. Only Meson6 is populated.
--- arch/arm/Kconfig | 2 ++ arch/arm/Makefile | 1 + arch/arm/mach-meson/Kconfig | 13 +++++++++++++ arch/arm/mach-meson/Makefile | 1 + arch/arm/mach-meson/meson.c | 27 +++++++++++++++++++++++++++ 5 files changed, 44 insertions(+) create mode 100644 arch/arm/mach-meson/Kconfig create mode 100644 arch/arm/mach-meson/Makefile create mode 100644 arch/arm/mach-meson/meson.c
arch/arm/Kconfig +2 -0
@@ -888,6 +888,8 @@ source "arch/arm/mach-keystone/Kconfig" source "arch/arm/mach-ks8695/Kconfig" +source "arch/arm/mach-meson/Kconfig" + source "arch/arm/mach-msm/Kconfig" source "arch/arm/mach-moxart/Kconfig"
arch/arm/Makefile +1 -0
@@ -168,6 +168,7 @@ machine-$(CONFIG_ARCH_IXP4XX) += ixp4xx machine-$(CONFIG_ARCH_KEYSTONE) += keystone machine-$(CONFIG_ARCH_KS8695) += ks8695 machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx +machine-$(CONFIG_ARCH_MESON) += meson machine-$(CONFIG_ARCH_MMP) += mmp machine-$(CONFIG_ARCH_MOXART) += moxart machine-$(CONFIG_ARCH_MSM) += msm
arch/arm/mach-meson/Kconfig new file +13 -0
@@ -0,0 +1,13 @@ +menuconfig ARCH_MESON + bool "Amlogic Meson SoCs" if ARCH_MULTI_V7 + select GENERIC_IRQ_CHIP + select ARM_GIC + +if ARCH_MESON + +config MACH_MESON6 + bool "Amlogic Meson6 (8726MX) SoCs support" + default ARCH_MESON + select MESON6_TIMER + +endif
arch/arm/mach-meson/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_ARCH_MESON) += meson.o
arch/arm/mach-meson/meson.c new file +27 -0
@@ -0,0 +1,27 @@ +/* +* Copyright (C) 2014 Carlo Caione <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +*/ + +#include <linux/of_platform.h> +#include <asm/mach/arch.h> + +static const char *const m6_common_board_compat[] = { +"amlogic,meson6" , +NULL , +}; + +DT_MACHINE_START (AML8726_MX ,"Amlogic Meson6 platform" ) + .dt_compat = m6_common_board_compat, +MACHINE_END +
Signature · 1 line
1.9.1
PATCH 4/6 ARM: meson: dts: add basic Meson/Meson6/Meson6-atv1200 DTSI/DTS
In reply to Carlo CaioneThe Meson6 SoC is produced by Amlogic inc. and it is based on 2 Cortex A9 and an ARM Mali-400 GPU.
This patch adds two basic DTSI for the preliminary support of Meson and Meson6 SoCs. Another DTS is also added for supporting the atv1200 board, produced by Geniatech inc.
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/meson.dtsi | 105 +++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/meson6-atv1200.dts | 66 ++++++++++++++++++++++ arch/arm/boot/dts/meson6.dtsi | 78 ++++++++++++++++++++++++++ 4 files changed, 250 insertions(+) create mode 100644 arch/arm/boot/dts/meson.dtsi create mode 100644 arch/arm/boot/dts/meson6-atv1200.dts create mode 100644 arch/arm/boot/dts/meson6.dtsi
arch/arm/boot/dts/Makefile +1 -0
@@ -159,6 +159,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += kirkwood-b3.dtb \ kirkwood-ts419-6282.dtb dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb +dtb-$(CONFIG_MACH_MESON6) += meson6-atv1200.dtb dtb-$(CONFIG_ARCH_MOXART) += moxart-uc7112lx.dtb dtb-$(CONFIG_ARCH_MXC) += \ imx25-eukrea-mbimxsd25-baseboard.dtb \
arch/arm/boot/dts/meson.dtsi new file +105 -0
105 lines not on this page · raw message
arch/arm/boot/dts/meson6-atv1200.dts new file +66 -0
66 lines not on this page · raw message
arch/arm/boot/dts/meson6.dtsi new file +78 -0
78 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 5/6 ARM: meson: update multi_v7_defconfig
In reply to Carlo CaioneThis patch updates the multi_v7_defconfig with the CONFIG_* needed by the just added Meson anch. It also adds a new defconfig specifically for the Meson SoCs.
--- arch/arm/configs/multi_v7_defconfig | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/configs/multi_v7_defconfig +3 -0
@@ -29,6 +29,7 @@ CONFIG_ARCH_HISI=y CONFIG_ARCH_HI3xxx=y CONFIG_ARCH_HIX5HD2=y CONFIG_ARCH_KEYSTONE=y +CONFIG_ARCH_MESON=y CONFIG_ARCH_MXC=y CONFIG_SOC_IMX51=y CONFIG_SOC_IMX53=y
@@ -173,6 +174,8 @@ CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DW=y CONFIG_SERIAL_AMBA_PL011=y CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_MESON=y +CONFIG_SERIAL_MESON_CONSOLE=y CONFIG_SERIAL_SAMSUNG=y CONFIG_SERIAL_SAMSUNG_CONSOLE=y CONFIG_SERIAL_SIRFSOC=y
Signature · 1 line
1.9.1
PATCH 6/6 MAINTAINERS: Add entry for the Amlogic MesonX SoCs
In reply to Carlo CaioneI'm going to maintain the platform.
--- MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+)
MAINTAINERS +6 -0
@@ -835,6 +835,12 @@ M: Emilio L?pez <[email protected]> S: Maintained F: drivers/clk/sunxi/ +ARM/Amlogic MesonX SoC support +M: Carlo Caione <[email protected]> +L: linux-arm-kernel at lists.infradead.org (moderated for non-subscribers) +S: Maintained +N: meson[x68] + ARM/ATMEL AT91RM9200 AND AT91SAM ARM ARCHITECTURES M: Andrew Victor <[email protected]> M: Nicolas Ferre <[email protected]>
Signature · 1 line
1.9.1
cover ARM: meson: initial support for MesonX SoCs
In reply to Carlo CaioneQuoted 11 lines · Carlo Caione
This patchset is taken from http://www.spinics.net/lists/devicetree/msg48979.html
and contains the preliminary support for MesonX-based SoCs.
I would like to get these merged for upcoming 3.18 merge window if there are no concerns on this version.Amlogic AML8726-MX (codename Meson6) is a highly integrated multimedia application processor SoC for Multimedia Internet Device (MID), tablet and Set Top Box (STB). It integrates a powerful CPU, a 2D/3D graphics subsystem and a state-of-the-art video decoding engine together with all major peripherals. It is manufactured by Amlogic, inc.
Quoted 4 lines
Amlogic doesn't release any documentation about their SoCs, so the code has been reverse-engineered from the messy source code released at:
Gentle ping,
cheers
Signature · 1 line
Carlo Caione