ARM: meson: Add support for G12A based U200 board
Subsystems (9)
v2 cover ARM: meson: Add support for G12A based U200 board
This patchset adds basic support for the recent Amlogic G12A SoC family.
This SoC family embeds 4xCortex A53 CPUs, and is very similar to the AXG SoC Family with the multimedia features of previous families.
This patchset adds :
- pinctrl support
- clk driver atfer a rework of the drivers files
- import Linux 5.1-rc1 G12A & U200 DT files
- add board/amlogic/u200 to support the U200 reference design
Changes since v1:
- add fixup for pinctrl like for AXG
Jerome Brunet (5):
pinctrl: meson: add g12a support
clk: create meson directory and move related drivers
clk: meson: add g12a support
ARM: meson: add G12a support
boards: meson: add g12a u200
Neil Armstrong (1):
ARM: dts: Import Amlogic G12A u200 DT from Linux 5.1-rc1
MAINTAINERS | 2 +-
arch/arm/dts/Makefile | 3 +-
arch/arm/dts/meson-g12a-u200.dts | 29 +
arch/arm/dts/meson-g12a.dtsi | 192 +++
arch/arm/include/asm/arch-meson/clock-g12a.h | 104 ++
arch/arm/include/asm/arch-meson/g12a.h | 66 +
arch/arm/mach-meson/Kconfig | 9 +-
arch/arm/mach-meson/Makefile | 1 +
arch/arm/mach-meson/board-g12a.c | 150 ++
board/amlogic/u200/MAINTAINERS | 5 +
board/amlogic/u200/Makefile | 6 +
board/amlogic/u200/README | 128 ++
board/amlogic/u200/u200.c | 22 +
configs/u200_defconfig | 40 +
drivers/clk/Kconfig | 1 +
drivers/clk/Makefile | 2 +-
drivers/clk/meson/Kconfig | 23 +
drivers/clk/meson/Makefile | 9 +
drivers/clk/{clk_meson_axg.c => meson/axg.c} | 0
drivers/clk/{ => meson}/clk_meson.h | 0
drivers/clk/meson/g12a.c | 315 ++++
drivers/clk/{clk_meson.c => meson/gxbb.c} | 0
drivers/pinctrl/meson/Kconfig | 4 +
drivers/pinctrl/meson/Makefile | 1 +
drivers/pinctrl/meson/pinctrl-meson-g12a.c | 1294 +++++++++++++++++
drivers/pinctrl/meson/pinctrl-meson.c | 17 +-
drivers/pinctrl/meson/pinctrl-meson.h | 1 +
include/dt-bindings/clock/g12a-aoclkc.h | 34 +
include/dt-bindings/clock/g12a-clkc.h | 135 ++
include/dt-bindings/gpio/meson-g12a-gpio.h | 114 ++
.../reset/amlogic,meson-g12a-reset.h | 134 ++
include/dt-bindings/reset/g12a-aoclkc.h | 18 +
32 files changed, 2850 insertions(+), 9 deletions(-)
create mode 100644 arch/arm/dts/meson-g12a-u200.dts
create mode 100644 arch/arm/dts/meson-g12a.dtsi
create mode 100644 arch/arm/include/asm/arch-meson/clock-g12a.h
create mode 100644 arch/arm/include/asm/arch-meson/g12a.h
create mode 100644 arch/arm/mach-meson/board-g12a.c
create mode 100644 board/amlogic/u200/MAINTAINERS
create mode 100644 board/amlogic/u200/Makefile
create mode 100644 board/amlogic/u200/README
create mode 100644 board/amlogic/u200/u200.c
create mode 100644 configs/u200_defconfig
create mode 100644 drivers/clk/meson/Kconfig
create mode 100644 drivers/clk/meson/Makefile
rename drivers/clk/{clk_meson_axg.c => meson/axg.c} (100%)
rename drivers/clk/{ => meson}/clk_meson.h (100%)
create mode 100644 drivers/clk/meson/g12a.c
rename drivers/clk/{clk_meson.c => meson/gxbb.c} (100%)
create mode 100644 drivers/pinctrl/meson/pinctrl-meson-g12a.c
create mode 100644 include/dt-bindings/clock/g12a-aoclkc.h
create mode 100644 include/dt-bindings/clock/g12a-clkc.h
create mode 100644 include/dt-bindings/gpio/meson-g12a-gpio.h
create mode 100644 include/dt-bindings/reset/amlogic,meson-g12a-reset.h
create mode 100644 include/dt-bindings/reset/g12a-aoclkc.hSignature · 1 line
2.21.0
PATCH v2 1/6 pinctrl: meson: add g12a support
From: Jerome Brunet <[email protected]>
Add pinctrl support for the Amlogic G12A SoC, which is very similar to the Amlogic AXG support but with an additionnal drive-strength register bank.
--- drivers/pinctrl/meson/Kconfig | 4 + drivers/pinctrl/meson/Makefile | 1 + drivers/pinctrl/meson/pinctrl-meson-g12a.c | 1294 ++++++++++++++++++++ drivers/pinctrl/meson/pinctrl-meson.c | 17 +- drivers/pinctrl/meson/pinctrl-meson.h | 1 + 5 files changed, 1312 insertions(+), 5 deletions(-) create mode 100644 drivers/pinctrl/meson/pinctrl-meson-g12a.c
drivers/pinctrl/meson/Kconfig +4 -0
@@ -25,4 +25,8 @@ config PINCTRL_MESON_AXG bool "Amlogic Meson AXG SoC pinctrl driver" select PINCTRL_MESON_AXG_PMX +config PINCTRL_MESON_G12A + bool "Amlogic Meson G12a SoC pinctrl driver" + select PINCTRL_MESON_AXG_PMX + endif
drivers/pinctrl/meson/Makefile +1 -0
@@ -6,3 +6,4 @@ obj-$(CONFIG_PINCTRL_MESON_AXG_PMX) += pinctrl-meson-axg-pmx.o obj-$(CONFIG_PINCTRL_MESON_GXBB) += pinctrl-meson-gxbb.o obj-$(CONFIG_PINCTRL_MESON_GXL) += pinctrl-meson-gxl.o obj-$(CONFIG_PINCTRL_MESON_AXG) += pinctrl-meson-axg.o +obj-$(CONFIG_PINCTRL_MESON_G12A) += pinctrl-meson-g12a.o
drivers/pinctrl/meson/pinctrl-meson-g12a.c new file +1294 -0
1,294 lines not on this page · raw message
drivers/pinctrl/meson/pinctrl-meson.c +12 -5
@@ -314,11 +314,11 @@ int meson_pinctrl_probe(struct udevice *dev) priv->reg_gpio = (void __iomem *)addr; addr =parse_address (gpio,"pull" , na, ns); -if (addr ==FDT_ADDR_T_NONE ) { -debug ("pull address not found\n" ); -return -EINVAL ; - } - priv->reg_pull = (void __iomem *)addr; +/* Use gpio region if pull one is not present */ +if (addr ==FDT_ADDR_T_NONE ) + priv->reg_pull = priv->reg_gpio; +else + priv->reg_pull = (void __iomem *)addr; addr =parse_address (gpio,"pull-enable" , na, ns);/* Use pull region if pull-enable one is not present */
@@ -327,6 +327,13 @@ int meson_pinctrl_probe(struct udevice *dev)else priv->reg_pullen = (void __iomem *)addr; + addr =parse_address (gpio,"ds" , na, ns); +/* Drive strength region is optional */ +if (addr ==FDT_ADDR_T_NONE ) + priv->reg_ds =NULL ; +else + priv->reg_ds = (void __iomem *)addr; + priv->data = (struct meson_pinctrl_data *)dev_get_driver_data (dev);/* Lookup GPIO driver */
drivers/pinctrl/meson/pinctrl-meson.h +1 -0
@@ -41,6 +41,7 @@ struct meson_pinctrl {void __iomem *reg_gpio;void __iomem *reg_pull;void __iomem *reg_pullen; +void __iomem *reg_ds; };/**
Signature · 1 line
2.21.0
PATCH v2 2/6 clk: create meson directory and move related drivers
In reply to Neil ArmstrongFrom: Jerome Brunet <[email protected]>
In order to support the Amlogic G12A clock controller, re-architect the clock files into a meson directory.
No functionnal changes.
MAINTAINERS entry is also updated.
---
MAINTAINERS | 2 +-
drivers/clk/Kconfig | 1 +
drivers/clk/Makefile | 2 +-
drivers/clk/meson/Kconfig | 15 +++++++++++++++
drivers/clk/meson/Makefile | 8 ++++++++
drivers/clk/{clk_meson_axg.c => meson/axg.c} | 0
drivers/clk/{ => meson}/clk_meson.h | 0
drivers/clk/{clk_meson.c => meson/gxbb.c} | 0
8 files changed, 26 insertions(+), 2 deletions(-)
create mode 100644 drivers/clk/meson/Kconfig
create mode 100644 drivers/clk/meson/Makefile
rename drivers/clk/{clk_meson_axg.c => meson/axg.c} (100%)
rename drivers/clk/{ => meson}/clk_meson.h (100%)
rename drivers/clk/{clk_meson.c => meson/gxbb.c} (100%)MAINTAINERS +1 -1
@@ -93,7 +93,7 @@ L: u-boot-amlogic at groups.io T: git git://git.denx.de/u-boot-amlogic.git F: arch/arm/mach-meson/ F: arch/arm/include/asm/arch-meson/ -F: drivers/clk/clk_meson* +F: drivers/clk/meson/ F: drivers/serial/serial_meson.c F: drivers/reset/reset-meson.c F: drivers/i2c/meson_i2c.c
drivers/clk/Kconfig +1 -0
@@ -101,6 +101,7 @@ config CLK_STM32MP1 source "drivers/clk/at91/Kconfig" source "drivers/clk/exynos/Kconfig" source "drivers/clk/imx/Kconfig" +source "drivers/clk/meson/Kconfig" source "drivers/clk/mvebu/Kconfig" source "drivers/clk/owl/Kconfig" source "drivers/clk/renesas/Kconfig"
drivers/clk/Makefile +1 -1
@@ -12,7 +12,7 @@ obj-y += imx/ obj-y += tegra/ obj-$(CONFIG_ARCH_ASPEED) += aspeed/ obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/ -obj-$(CONFIG_ARCH_MESON) += clk_meson.o clk_meson_axg.o +obj-$(CONFIG_ARCH_MESON) += meson/ obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/ obj-$(CONFIG_ARCH_SOCFPGA) += altera/ obj-$(CONFIG_CLK_AT91) += at91/
drivers/clk/meson/Kconfig new file +15 -0
@@ -0,0 +1,15 @@ +config CLK_MESON_GX + bool "Enable clock support for Amlogic GX" + depends on CLK && ARCH_MESON + default MESON_GX + help + Enable clock support for the Amlogic GX SoC family, such as + the S905, S905X/D and S912. + +config CLK_MESON_AXG + bool "Enable clock support for Amlogic AXG" + depends on CLK && ARCH_MESON + default MESON_AXG + help + Enable clock support for the Amlogic AXG SoC family, such as + the A113X/D
drivers/clk/meson/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Copyright (c) 2019 Baylibre, SAS +# Jerome Brunet <[email protected]> + +obj-$(CONFIG_CLK_MESON_GX) += gxbb.o +obj-$(CONFIG_CLK_MESON_AXG) += axg.o +
drivers/clk/meson/axg.c renamed from drivers/clk/clk_meson_axg.c +0 -0
drivers/clk/meson/clk_meson.h renamed from drivers/clk/clk_meson.h +0 -0
drivers/clk/meson/gxbb.c renamed from drivers/clk/clk_meson.c +0 -0
Signature · 1 line
2.21.0
PATCH v2 3/6 clk: meson: add g12a support
In reply to Neil ArmstrongFrom: Jerome Brunet <[email protected]>
Add basic support for the Amlogic G12A clock controller based on the AXG driver.
--- arch/arm/include/asm/arch-meson/clock-g12a.h | 104 ++++++ drivers/clk/meson/Kconfig | 8 + drivers/clk/meson/Makefile | 1 + drivers/clk/meson/g12a.c | 315 +++++++++++++++++++ 4 files changed, 428 insertions(+) create mode 100644 arch/arm/include/asm/arch-meson/clock-g12a.h create mode 100644 drivers/clk/meson/g12a.c
arch/arm/include/asm/arch-meson/clock-g12a.h new file +104 -0
@@ -0,0 +1,104 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright 2016 - AmLogic, Inc. +* Copyright 2018 - Beniamino Galvani <[email protected]> +* Copyright 2018 - BayLibre, SAS +* Author: Neil Armstrong <[email protected]> +*/ +#ifndef _ARCH_MESON_CLOCK_G12A_H_ +#define _ARCH_MESON_CLOCK_G12A_H_ + +/* +* Clock controller register offsets +* +* Register offsets from the data sheet are listed in comment blocks below. +* Those offsets must be multiplied by 4 before adding them to the base address +* to get the right value +*/ + +#define HHI_MIPI_CNTL0 0x000 +#define HHI_MIPI_CNTL1 0x004 +#define HHI_MIPI_CNTL2 0x008 +#define HHI_MIPI_STS 0x00C +#define HHI_GP0_PLL_CNTL0 0x040 +#define HHI_GP0_PLL_CNTL1 0x044 +#define HHI_GP0_PLL_CNTL2 0x048 +#define HHI_GP0_PLL_CNTL3 0x04C +#define HHI_GP0_PLL_CNTL4 0x050 +#define HHI_GP0_PLL_CNTL5 0x054 +#define HHI_GP0_PLL_CNTL6 0x058 +#define HHI_GP0_PLL_STS 0x05C +#define HHI_PCIE_PLL_CNTL0 0x098 +#define HHI_PCIE_PLL_CNTL1 0x09C +#define HHI_PCIE_PLL_CNTL2 0x0A0 +#define HHI_PCIE_PLL_CNTL3 0x0A4 +#define HHI_PCIE_PLL_CNTL4 0x0A8 +#define HHI_PCIE_PLL_CNTL5 0x0AC +#define HHI_PCIE_PLL_STS 0x0B8 +#define HHI_HIFI_PLL_CNTL0 0x0D8 +#define HHI_HIFI_PLL_CNTL1 0x0DC +#define HHI_HIFI_PLL_CNTL2 0x0E0 +#define HHI_HIFI_PLL_CNTL3 0x0E4 +#define HHI_HIFI_PLL_CNTL4 0x0E8 +#define HHI_HIFI_PLL_CNTL5 0x0EC +#define HHI_HIFI_PLL_CNTL6 0x0F0 +#define HHI_VIID_CLK_DIV 0x128 +#define HHI_VIID_CLK_CNTL 0x12C +#define HHI_GCLK_MPEG0 0x140 +#define HHI_GCLK_MPEG1 0x144 +#define HHI_GCLK_MPEG2 0x148 +#define HHI_GCLK_OTHER 0x150 +#define HHI_GCLK_OTHER2 0x154 +#define HHI_VID_CLK_DIV 0x164 +#define HHI_MPEG_CLK_CNTL 0x174 +#define HHI_AUD_CLK_CNTL 0x178 +#define HHI_VID_CLK_CNTL 0x17c +#define HHI_TS_CLK_CNTL 0x190 +#define HHI_VID_CLK_CNTL2 0x194 +#define HHI_SYS_CPU_CLK_CNTL0 0x19c +#define HHI_VID_PLL_CLK_DIV 0x1A0 +#define HHI_MALI_CLK_CNTL 0x1b0 +#define HHI_VPU_CLKC_CNTL 0x1b4 +#define HHI_VPU_CLK_CNTL 0x1bC +#define HHI_HDMI_CLK_CNTL 0x1CC +#define HHI_VDEC_CLK_CNTL 0x1E0 +#define HHI_VDEC2_CLK_CNTL 0x1E4 +#define HHI_VDEC3_CLK_CNTL 0x1E8 +#define HHI_VDEC4_CLK_CNTL 0x1EC +#define HHI_HDCP22_CLK_CNTL 0x1F0 +#define HHI_VAPBCLK_CNTL 0x1F4 +#define HHI_VPU_CLKB_CNTL 0x20C +#define HHI_GEN_CLK_CNTL 0x228 +#define HHI_VDIN_MEAS_CLK_CNTL 0x250 +#define HHI_MIPIDSI_PHY_CLK_CNTL 0x254 +#define HHI_NAND_CLK_CNTL 0x25C +#define HHI_SD_EMMC_CLK_CNTL 0x264 +#define HHI_MPLL_CNTL0 0x278 +#define HHI_MPLL_CNTL1 0x27C +#define HHI_MPLL_CNTL2 0x280 +#define HHI_MPLL_CNTL3 0x284 +#define HHI_MPLL_CNTL4 0x288 +#define HHI_MPLL_CNTL5 0x28c +#define HHI_MPLL_CNTL6 0x290 +#define HHI_MPLL_CNTL7 0x294 +#define HHI_MPLL_CNTL8 0x298 +#define HHI_FIX_PLL_CNTL0 0x2A0 +#define HHI_FIX_PLL_CNTL1 0x2A4 +#define HHI_FIX_PLL_CNTL3 0x2AC +#define HHI_SYS_PLL_CNTL0 0x2f4 +#define HHI_SYS_PLL_CNTL1 0x2f8 +#define HHI_SYS_PLL_CNTL2 0x2fc +#define HHI_SYS_PLL_CNTL3 0x300 +#define HHI_SYS_PLL_CNTL4 0x304 +#define HHI_SYS_PLL_CNTL5 0x308 +#define HHI_SYS_PLL_CNTL6 0x30c +#define HHI_HDMI_PLL_CNTL0 0x320 +#define HHI_HDMI_PLL_CNTL1 0x324 +#define HHI_HDMI_PLL_CNTL2 0x328 +#define HHI_HDMI_PLL_CNTL3 0x32c +#define HHI_HDMI_PLL_CNTL4 0x330 +#define HHI_HDMI_PLL_CNTL5 0x334 +#define HHI_HDMI_PLL_CNTL6 0x338 +#define HHI_SPICC_CLK_CNTL 0x3dc + +#endif
drivers/clk/meson/Kconfig +8 -0
@@ -13,3 +13,11 @@ config CLK_MESON_AXG help Enable clock support for the Amlogic AXG SoC family, such as the A113X/D + +config CLK_MESON_G12A + bool "Enable clock support for Amlogic G12A" + depends on CLK && ARCH_MESON + default MESON_G12A + help + Enable clock support for the Amlogic G12A SoC family, such as + the S905X/D2
drivers/clk/meson/Makefile +1 -0
@@ -5,4 +5,5 @@ obj-$(CONFIG_CLK_MESON_GX) += gxbb.o obj-$(CONFIG_CLK_MESON_AXG) += axg.o +obj-$(CONFIG_CLK_MESON_G12A) += g12a.o
drivers/clk/meson/g12a.c new file +315 -0
315 lines not on this page · raw message
Signature · 1 line
2.21.0
PATCH v2 4/6 ARM: meson: add G12a support
In reply to Neil ArmstrongFrom: Jerome Brunet <[email protected]>
Add support for the Amlogic G12A SoC, which is a mix between the new physical memory mapping of AXG and the functionnalities of the previous Amlogic GXL/GXM SoCs.
To handle the internal ethernet PHY, the Amlogic G12A SoCs now embeds a dedicated PLL to feed the internal PHY.
--- arch/arm/include/asm/arch-meson/g12a.h | 66 +++++++++++ arch/arm/mach-meson/Kconfig | 9 +- arch/arm/mach-meson/Makefile | 1 + arch/arm/mach-meson/board-g12a.c | 150 +++++++++++++++++++++++++ 4 files changed, 225 insertions(+), 1 deletion(-) create mode 100644 arch/arm/include/asm/arch-meson/g12a.h create mode 100644 arch/arm/mach-meson/board-g12a.c
arch/arm/include/asm/arch-meson/g12a.h new file +66 -0
@@ -0,0 +1,66 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (C) 2018 BayLibre, SAS +* Author: Neil Armstrong <[email protected]> +*/ + +#ifndef __G12A_H__ +#define __G12A_H__ + +#define G12A_AOBUS_BASE 0xff800000 +#define G12A_PERIPHS_BASE 0xff634400 +#define G12A_HIU_BASE 0xff63c000 +#define G12A_ETH_PHY_BASE 0xff64c000 +#define G12A_ETH_BASE 0xff3f0000 + +/* Always-On Peripherals registers */ +#define G12A_AO_ADDR (off) (G12A_AOBUS_BASE + ((off) << 2)) + +#define G12A_AO_SEC_GP_CFG0 G12A_AO_ADDR(0x90) +#define G12A_AO_SEC_GP_CFG3 G12A_AO_ADDR(0x93) +#define G12A_AO_SEC_GP_CFG4 G12A_AO_ADDR(0x94) +#define G12A_AO_SEC_GP_CFG5 G12A_AO_ADDR(0x95) + +#define G12A_AO_BOOT_DEVICE 0xF +#define G12A_AO_MEM_SIZE_MASK 0xFFFF0000 +#define G12A_AO_MEM_SIZE_SHIFT 16 +#define G12A_AO_BL31_RSVMEM_SIZE_MASK 0xFFFF0000 +#define G12A_AO_BL31_RSVMEM_SIZE_SHIFT 16 +#define G12A_AO_BL32_RSVMEM_SIZE_MASK 0xFFFF + +/* Peripherals registers */ +#define G12A_PERIPHS_ADDR (off) (G12A_PERIPHS_BASE + ((off) << 2)) + +#define G12A_ETH_REG_0 G12A_PERIPHS_ADDR(0x50) +#define G12A_ETH_REG_1 G12A_PERIPHS_ADDR(0x51) + +#define G12A_ETH_REG_0_PHY_INTF_RGMII BIT(0) +#define G12A_ETH_REG_0_PHY_INTF_RMII BIT(2) +#define G12A_ETH_REG_0_TX_PHASE (x) (((x) & 3) << 5) +#define G12A_ETH_REG_0_TX_RATIO (x) (((x) & 7) << 7) +#define G12A_ETH_REG_0_PHY_CLK_EN BIT(10) +#define G12A_ETH_REG_0_INVERT_RMII_CLK BIT(11) +#define G12A_ETH_REG_0_CLK_EN BIT(12) + +#define G12A_ETH_PHY_ADDR (off) (G12A_ETH_PHY_BASE + ((off) << 2)) +#define ETH_PLL_CNTL0 G12A_ETH_PHY_ADDR(0x11) +#define ETH_PLL_CNTL1 G12A_ETH_PHY_ADDR(0x12) +#define ETH_PLL_CNTL2 G12A_ETH_PHY_ADDR(0x13) +#define ETH_PLL_CNTL3 G12A_ETH_PHY_ADDR(0x14) +#define ETH_PLL_CNTL4 G12A_ETH_PHY_ADDR(0x15) +#define ETH_PLL_CNTL5 G12A_ETH_PHY_ADDR(0x16) +#define ETH_PLL_CNTL6 G12A_ETH_PHY_ADDR(0x17) +#define ETH_PLL_CNTL7 G12A_ETH_PHY_ADDR(0x18) +#define ETH_PHY_CNTL0 G12A_ETH_PHY_ADDR(0x20) +#define ETH_PHY_CNTL1 G12A_ETH_PHY_ADDR(0x21) +#define ETH_PHY_CNTL2 G12A_ETH_PHY_ADDR(0x22) + +/* HIU registers */ +#define G12A_HIU_ADDR (off) (G12A_HIU_BASE + ((off) << 2)) + +#define G12A_MEM_PD_REG_0 G12A_HIU_ADDR(0x40) + +/* Ethernet memory power domain */ +#define G12A_MEM_PD_REG_0_ETH_MASK (BIT(2) | BIT(3)) + +#endif /* __G12A_H__ */
arch/arm/mach-meson/Kconfig +8 -1
@@ -41,7 +41,13 @@ config MESON_AXG bool "AXG" select MESON64_COMMON help - Select this if your SoC is an A113X/D + Select this if your SoC is an A113X/D + +config MESON_G12A + bool "G12A" + select MESON64_COMMON + help + Select this if your SoC is an S905X/D2 endchoice
@@ -65,6 +71,7 @@ config SYS_BOARD default "p212" if MESON_GXL default "q200" if MESON_GXM default "s400" if MESON_AXG + default "u200" if MESON_G12A default "" help This option contains information about board name.
arch/arm/mach-meson/Makefile +1 -0
@@ -5,3 +5,4 @@ obj-y += board-common.o sm.o board-info.o obj-$(CONFIG_MESON_GX) += board-gx.o obj-$(CONFIG_MESON_AXG) += board-axg.o +obj-$(CONFIG_MESON_G12A) += board-g12a.o
arch/arm/mach-meson/board-g12a.c new file +150 -0
150 lines not on this page · raw message
Signature · 1 line
2.21.0
PATCH v2 5/6 ARM: dts: Import Amlogic G12A u200 DT from Linux 5.1-rc1
In reply to Neil ArmstrongImport Linux 5.1-rc1 DT from 9e98c678c2d6 ("Linux 5.1-rc1") for the meson-g12a-u200 board, the meson-g12a.dtsi and the corresponding bindings.
--- arch/arm/dts/Makefile | 3 +- arch/arm/dts/meson-g12a-u200.dts | 29 +++ arch/arm/dts/meson-g12a.dtsi | 192 ++++++++++++++++++ include/dt-bindings/clock/g12a-aoclkc.h | 34 ++++ include/dt-bindings/clock/g12a-clkc.h | 135 ++++++++++++ include/dt-bindings/gpio/meson-g12a-gpio.h | 114 +++++++++++ .../reset/amlogic,meson-g12a-reset.h | 134 ++++++++++++ include/dt-bindings/reset/g12a-aoclkc.h | 18 ++ 8 files changed, 658 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/meson-g12a-u200.dts create mode 100644 arch/arm/dts/meson-g12a.dtsi create mode 100644 include/dt-bindings/clock/g12a-aoclkc.h create mode 100644 include/dt-bindings/clock/g12a-clkc.h create mode 100644 include/dt-bindings/gpio/meson-g12a-gpio.h create mode 100644 include/dt-bindings/reset/amlogic,meson-g12a-reset.h create mode 100644 include/dt-bindings/reset/g12a-aoclkc.h
arch/arm/dts/Makefile +2 -1
@@ -104,7 +104,8 @@ dtb-$(CONFIG_ARCH_MESON) += \ meson-gxl-s905x-libretech-cc.dtb \ meson-gxl-s905x-khadas-vim.dtb \ meson-gxm-khadas-vim2.dtb \ - meson-axg-s400.dtb + meson-axg-s400.dtb \ + meson-g12a-u200.dtb dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \ tegra20-medcom-wide.dtb \ tegra20-paz00.dtb \
arch/arm/dts/meson-g12a-u200.dts new file +29 -0
@@ -0,0 +1,29 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2018 Amlogic, Inc. All rights reserved. + */ + +/dts-v1/; + +#include "meson-g12a.dtsi" + +/ { + compatible = "amlogic,u200", "amlogic,g12a"; + model = "Amlogic Meson G12A U200 Development Board"; + + aliases { + serial0 = &uart_AO; + }; + chosen { + stdout-path = "serial0:115200n8"; + }; + memory at 0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x40000000>; + }; +}; + +&uart_AO { + status = "okay"; +}; +
arch/arm/dts/meson-g12a.dtsi new file +192 -0
192 lines not on this page · raw message
include/dt-bindings/clock/g12a-aoclkc.h new file +34 -0
@@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ +/* +* Copyright (c) 2016 BayLibre, SAS +* Author: Neil Armstrong <[email protected]> +* +* Copyright (c) 2018 Amlogic, inc. +* Author: Qiufang Dai <[email protected]> +*/ + +#ifndef DT_BINDINGS_CLOCK_AMLOGIC_MESON_G12A_AOCLK +#define DT_BINDINGS_CLOCK_AMLOGIC_MESON_G12A_AOCLK + +#define CLKID_AO_AHB 0 +#define CLKID_AO_IR_IN 1 +#define CLKID_AO_I2C_M0 2 +#define CLKID_AO_I2C_S0 3 +#define CLKID_AO_UART 4 +#define CLKID_AO_PROD_I2C 5 +#define CLKID_AO_UART2 6 +#define CLKID_AO_IR_OUT 7 +#define CLKID_AO_SAR_ADC 8 +#define CLKID_AO_MAILBOX 9 +#define CLKID_AO_M3 10 +#define CLKID_AO_AHB_SRAM 11 +#define CLKID_AO_RTI 12 +#define CLKID_AO_M4_FCLK 13 +#define CLKID_AO_M4_HCLK 14 +#define CLKID_AO_CLK81 15 +#define CLKID_AO_SAR_ADC_CLK 18 +#define CLKID_AO_32K 23 +#define CLKID_AO_CEC 27 +#define CLKID_AO_CTS_RTC_OSCIN 28 + +#endif
include/dt-bindings/clock/g12a-clkc.h new file +135 -0
135 lines not on this page · raw message
include/dt-bindings/gpio/meson-g12a-gpio.h new file +114 -0
114 lines not on this page · raw message
include/dt-bindings/reset/amlogic,meson-g12a-reset.h new file +134 -0
134 lines not on this page · raw message
include/dt-bindings/reset/g12a-aoclkc.h new file +18 -0
@@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ +/* +* Copyright (c) 2016 BayLibre, SAS +* Author: Neil Armstrong <[email protected]> +*/ + +#ifndef DT_BINDINGS_RESET_AMLOGIC_MESON_G12A_AOCLK +#define DT_BINDINGS_RESET_AMLOGIC_MESON_G12A_AOCLK + +#define RESET_AO_IR_IN 0 +#define RESET_AO_UART 1 +#define RESET_AO_I2C_M 2 +#define RESET_AO_I2C_S 3 +#define RESET_AO_SAR_ADC 4 +#define RESET_AO_UART2 5 +#define RESET_AO_IR_OUT 6 + +#endif
Signature · 1 line
2.21.0
PATCH v2 6/6 boards: meson: add g12a u200
In reply to Neil ArmstrongFrom: Jerome Brunet <[email protected]>
The Amlogic U200 board is based on the Amlogic S905D2 SoC from the Amlogic G12A SoC family.
The board has the following specifications :
- Amlogic S905D2 ARM Cortex-A53 quad-core SoC
- XGB DDR4 SDRAM
- 10/100 Ethernet (Internal PHY)
- 1 x USB 3.0 Host
- eMMC
- SDcard
- Infrared receiver
- SDIO WiFi Module
- MIPI DSI Connector
- Audio HAT Connector
- PCI-E M.2 Connector
--- board/amlogic/u200/MAINTAINERS | 5 ++ board/amlogic/u200/Makefile | 6 ++ board/amlogic/u200/README | 128 +++++++++++++++++++++++++++++++++ board/amlogic/u200/u200.c | 22 ++++++ configs/u200_defconfig | 40 +++++++++++ 5 files changed, 201 insertions(+) create mode 100644 board/amlogic/u200/MAINTAINERS create mode 100644 board/amlogic/u200/Makefile create mode 100644 board/amlogic/u200/README create mode 100644 board/amlogic/u200/u200.c create mode 100644 configs/u200_defconfig
board/amlogic/u200/MAINTAINERS new file +5 -0
@@ -0,0 +1,5 @@ +U200 +M: Neil Armstrong <[email protected]> +S: Maintained +F: board/amlogic/u200/ +F: configs/u200_defconfig
board/amlogic/u200/Makefile new file +6 -0
@@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2016 BayLibre, SAS +# Author: Neil Armstrong <[email protected]> + +obj-y := u200.o
board/amlogic/u200/README new file +128 -0
128 lines not on this page · raw message
board/amlogic/u200/u200.c new file +22 -0
@@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright (C) 2016 BayLibre, SAS +* Author: Neil Armstrong <[email protected]> +*/ + +#include <common.h> +#include <dm.h> +#include <environment.h> +#include <asm/io.h> +#include <asm/arch/axg.h> +#include <asm/arch/sm.h> +#include <asm/arch/eth.h> +#include <asm/arch/mem.h> + +int misc_init_r (void ) +{ +meson_eth_init (PHY_INTERFACE_MODE_RMII , +MESON_USE_INTERNAL_RMII_PHY ); + +return 0 ; +}
configs/u200_defconfig new file +40 -0
@@ -0,0 +1,40 @@ +CONFIG_ARM=y +CONFIG_ARCH_MESON=y +CONFIG_SYS_TEXT_BASE=0x01000000 +CONFIG_MESON_G12A=y +CONFIG_DEBUG_UART_BASE=0xff803000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_IDENT_STRING=" u200" +CONFIG_DEBUG_UART=y +CONFIG_NR_DRAM_BANKS=1 +CONFIG_OF_BOARD_SETUP=y +CONFIG_MISC_INIT_R=y +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_DISPLAY_BOARDINFO=y +# CONFIG_CMD_BDI is not set +# CONFIG_CMD_IMI is not set +CONFIG_CMD_GPIO=y +# CONFIG_CMD_LOADS is not set +CONFIG_CMD_MMC=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_REGULATOR=y +CONFIG_OF_CONTROL=y +CONFIG_DEFAULT_DEVICE_TREE="meson-g12a-u200" +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_DM_GPIO=y +CONFIG_DM_MMC=y +CONFIG_MMC_MESON_GX=y +CONFIG_PHY_ADDR_ENABLE=y +CONFIG_PHY_ADDR=8 +CONFIG_DM_ETH=y +CONFIG_ETH_DESIGNWARE=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_MESON_G12A=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_DM_RESET=y +CONFIG_DEBUG_UART_MESON=y +CONFIG_DEBUG_UART_ANNOUNCE=y +CONFIG_DEBUG_UART_SKIP_INIT=y +CONFIG_MESON_SERIAL=y +CONFIG_OF_LIBFDT_OVERLAY=y
Signature · 1 line
2.21.0
v2 cover ARM: meson: Add support for G12A based U200 board
In reply to Neil ArmstrongQuoted 71 lines · Neil Armstrong
This patchset adds basic support for the recent Amlogic G12A SoC family.
This SoC family embeds 4xCortex A53 CPUs, and is very similar to the AXG SoC Family with the multimedia features of previous families.
This patchset adds :
- pinctrl support
- clk driver atfer a rework of the drivers files
- import Linux 5.1-rc1 G12A & U200 DT files
- add board/amlogic/u200 to support the U200 reference designChanges since v1:
- add fixup for pinctrl like for AXGJerome Brunet (5):
pinctrl: meson: add g12a support
clk: create meson directory and move related drivers
clk: meson: add g12a support
ARM: meson: add G12a support
boards: meson: add g12a u200Neil Armstrong (1):
ARM: dts: Import Amlogic G12A u200 DT from Linux 5.1-rc1MAINTAINERS | 2 +- arch/arm/dts/Makefile | 3 +- arch/arm/dts/meson-g12a-u200.dts | 29 + arch/arm/dts/meson-g12a.dtsi | 192 +++ arch/arm/include/asm/arch-meson/clock-g12a.h | 104 ++ arch/arm/include/asm/arch-meson/g12a.h | 66 + arch/arm/mach-meson/Kconfig | 9 +- arch/arm/mach-meson/Makefile | 1 + arch/arm/mach-meson/board-g12a.c | 150 ++ board/amlogic/u200/MAINTAINERS | 5 + board/amlogic/u200/Makefile | 6 + board/amlogic/u200/README | 128 ++ board/amlogic/u200/u200.c | 22 + configs/u200_defconfig | 40 + drivers/clk/Kconfig | 1 + drivers/clk/Makefile | 2 +- drivers/clk/meson/Kconfig | 23 + drivers/clk/meson/Makefile | 9 + drivers/clk/{clk_meson_axg.c => meson/axg.c} | 0 drivers/clk/{ => meson}/clk_meson.h | 0 drivers/clk/meson/g12a.c | 315 ++++ drivers/clk/{clk_meson.c => meson/gxbb.c} | 0 drivers/pinctrl/meson/Kconfig | 4 + drivers/pinctrl/meson/Makefile | 1 + drivers/pinctrl/meson/pinctrl-meson-g12a.c | 1294 +++++++++++++++++ drivers/pinctrl/meson/pinctrl-meson.c | 17 +- drivers/pinctrl/meson/pinctrl-meson.h | 1 + include/dt-bindings/clock/g12a-aoclkc.h | 34 + include/dt-bindings/clock/g12a-clkc.h | 135 ++ include/dt-bindings/gpio/meson-g12a-gpio.h | 114 ++ .../reset/amlogic,meson-g12a-reset.h | 134 ++ include/dt-bindings/reset/g12a-aoclkc.h | 18 + 32 files changed, 2850 insertions(+), 9 deletions(-) create mode 100644 arch/arm/dts/meson-g12a-u200.dts create mode 100644 arch/arm/dts/meson-g12a.dtsi create mode 100644 arch/arm/include/asm/arch-meson/clock-g12a.h create mode 100644 arch/arm/include/asm/arch-meson/g12a.h create mode 100644 arch/arm/mach-meson/board-g12a.c create mode 100644 board/amlogic/u200/MAINTAINERS create mode 100644 board/amlogic/u200/Makefile create mode 100644 board/amlogic/u200/README create mode 100644 board/amlogic/u200/u200.c create mode 100644 configs/u200_defconfig create mode 100644 drivers/clk/meson/Kconfig create mode 100644 drivers/clk/meson/Makefile rename drivers/clk/{clk_meson_axg.c => meson/axg.c} (100%) rename drivers/clk/{ => meson}/clk_meson.h (100%)
Quoted 9 lines
create mode 100644 drivers/clk/meson/g12a.c
rename drivers/clk/{clk_meson.c => meson/gxbb.c} (100%)
create mode 100644 drivers/pinctrl/meson/pinctrl-meson-g12a.c
create mode 100644 include/dt-bindings/clock/g12a-aoclkc.h
create mode 100644 include/dt-bindings/clock/g12a-clkc.h
create mode 100644 include/dt-bindings/gpio/meson-g12a-gpio.h
create mode 100644 include/dt-bindings/reset/amlogic,meson-g12a-reset.h
create mode 100644 include/dt-bindings/reset/g12a-aoclkc.hApplied to u-boot-amlogic