Skip to contentSkip to conversation

Add initial support for Amlogic P212 Reference board

PATCH New Neil Armstrong 3 participants 13 messages Oct 12, 2017 – Nov 17, 2017

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

cover Add initial support for Amlogic P212 Reference board

This patchset aimed to add minimal support for the Amlogic P212 reference board from Amlogic based on the Meson S905X SoC from the Meson GXL SoC Family.

The initial support is composed of :
- GXL pinctrl driver
- Minimal boot support with serial, MMC and SDCard
- Updated DTS from Linux 4.13.5

Commands to generate a valid binary are provided in the board README.

The following work will be pushed later on :
- Support for dynamic reading of DDR memory size from registers
- Support for the Internal Ethernet PHY is WiP
- USB DWC3 Host Support with PHY support

This patchset can boot Linux Mainline 4.14-rc4 with the Video Pipeline disables, since it currently depends on Power Domains initialization from Vendor u-boot. Dedicated reset and init code for the Video Pipeline for mainline Linux is in the work.

Neil Armstrong (3):
ARM: dts: Synchronize Amlogic from Linux Mainline 4.13.5
pinctrl: meson: Add GXL Support
arm: add initial support for Amlogic P212 based on Meson GXL family

 arch/arm/dts/Makefile                     |   3 +-
 arch/arm/dts/meson-gx.dtsi                |  13 +-
 arch/arm/dts/meson-gxbb-odroidc2.dts      | 108 ++---
 arch/arm/dts/meson-gxbb.dtsi              | 220 +++++----
 arch/arm/dts/meson-gxl-mali.dtsi          |  43 ++
 arch/arm/dts/meson-gxl-s905x-p212.dts     |  95 ++++
 arch/arm/dts/meson-gxl-s905x-p212.dtsi    | 173 +++++++
 arch/arm/dts/meson-gxl-s905x.dtsi         |  55 +++
 arch/arm/dts/meson-gxl.dtsi               | 628 +++++++++++++++++++++++++
 arch/arm/mach-meson/Kconfig               |  22 +
 board/amlogic/p212/Kconfig                |  12 +
 board/amlogic/p212/MAINTAINERS            |   6 +
 board/amlogic/p212/Makefile               |   8 +
 board/amlogic/p212/README                 |  96 ++++
 board/amlogic/p212/p212.c                 |  21 +
 configs/p212_defconfig                    |  31 ++
 drivers/pinctrl/meson/Kconfig             |   4 +
 drivers/pinctrl/meson/Makefile            |   1 +
 drivers/pinctrl/meson/pinctrl-meson-gxl.c | 736 ++++++++++++++++++++++++++++++
 include/configs/p212.h                    |  22 +
 include/dt-bindings/gpio/meson-gxl-gpio.h | 131 ++++++
 21 files changed, 2285 insertions(+), 143 deletions(-)
 create mode 100644 arch/arm/dts/meson-gxl-mali.dtsi
 create mode 100644 arch/arm/dts/meson-gxl-s905x-p212.dts
 create mode 100644 arch/arm/dts/meson-gxl-s905x-p212.dtsi
 create mode 100644 arch/arm/dts/meson-gxl-s905x.dtsi
 create mode 100644 arch/arm/dts/meson-gxl.dtsi
 create mode 100644 board/amlogic/p212/Kconfig
 create mode 100644 board/amlogic/p212/MAINTAINERS
 create mode 100644 board/amlogic/p212/Makefile
 create mode 100644 board/amlogic/p212/README
 create mode 100644 board/amlogic/p212/p212.c
 create mode 100644 configs/p212_defconfig
 create mode 100644 drivers/pinctrl/meson/pinctrl-meson-gxl.c
 create mode 100644 include/configs/p212.h
 create mode 100644 include/dt-bindings/gpio/meson-gxl-gpio.h
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/3 ARM: dts: Synchronize Amlogic from Linux Mainline 4.13.5

Synchronize the Amlogic ARM64 dts from mainline Linux 4.13.5

In the preparation of the support of the Amlogic P212 board, import the corresponding meson-gxl-s905x-p212.dts file.

---
 arch/arm/dts/Makefile                     |   3 +-
 arch/arm/dts/meson-gx.dtsi                |  13 +-
 arch/arm/dts/meson-gxbb-odroidc2.dts      | 108 ++---
 arch/arm/dts/meson-gxbb.dtsi              | 220 +++++++----
 arch/arm/dts/meson-gxl-mali.dtsi          |  43 ++
 arch/arm/dts/meson-gxl-s905x-p212.dts     |  95 +++++
 arch/arm/dts/meson-gxl-s905x-p212.dtsi    | 173 ++++++++
 arch/arm/dts/meson-gxl-s905x.dtsi         |  55 +++
 arch/arm/dts/meson-gxl.dtsi               | 628 ++++++++++++++++++++++++++++++
 include/dt-bindings/gpio/meson-gxl-gpio.h | 131 +++++++
 10 files changed, 1326 insertions(+), 143 deletions(-)
 create mode 100644 arch/arm/dts/meson-gxl-mali.dtsi
 create mode 100644 arch/arm/dts/meson-gxl-s905x-p212.dts
 create mode 100644 arch/arm/dts/meson-gxl-s905x-p212.dtsi
 create mode 100644 arch/arm/dts/meson-gxl-s905x.dtsi
 create mode 100644 arch/arm/dts/meson-gxl.dtsi
 create mode 100644 include/dt-bindings/gpio/meson-gxl-gpio.h
arch/arm/dts/Makefile +2 -1
index 5b90280..8a07f53 100644
@@ -54,7 +54,8 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
 	rk3399-puma-ddr1866.dtb \
 	rv1108-evb.dtb
 dtb-$(CONFIG_ARCH_MESON) += \
-	meson-gxbb-odroidc2.dtb
+	meson-gxbb-odroidc2.dtb \
+	meson-gxl-s905x-p212.dtb
 dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
 	tegra20-medcom-wide.dtb \
 	tegra20-paz00.dtb \
arch/arm/dts/meson-gx.dtsi +11 -2
index 436b875..738ed68 100644
@@ -200,7 +200,7 @@
 		};
 
 		scpi_sensors: sensors {
-			compatible = "arm,scpi-sensors";
+			compatible = "amlogic,meson-gxbb-scpi-sensors", "arm,scpi-sensors";
 			#thermal-sensor-cells = <1>;
 		};
 	};
@@ -304,6 +304,15 @@
 				status = "disabled";
 			};
 
+			spicc: spi at 8d80 {
+				compatible = "amlogic,meson-gx-spicc";
+				reg = <0x0 0x08d80 0x0 0x80>;
+				interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+				status = "disabled";
+			};
+
 			spifc: spi at 8c80 {
 				compatible = "amlogic,meson-gx-spifc", "amlogic,meson-gxbb-spifc";
 				reg = <0x0 0x08c80 0x0 0x80>;
@@ -391,7 +400,7 @@
 			};
 
 			pwm_AO_ab: pwm at 550 {
-				compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm";
+				compatible = "amlogic,meson-gx-ao-pwm", "amlogic,meson-gxbb-ao-pwm";
 				reg = <0x0 0x00550 0x0 0x10>;
 				#pwm-cells = <3>;
 				status = "disabled";
arch/arm/dts/meson-gxbb-odroidc2.dts +54 -54

134 lines not on this page · raw message

arch/arm/dts/meson-gxbb.dtsi +134 -86

262 lines not on this page · raw message

arch/arm/dts/meson-gxl-mali.dtsi new file +43 -0

43 lines not on this page · raw message

arch/arm/dts/meson-gxl-s905x-p212.dts new file +95 -0

95 lines not on this page · raw message

arch/arm/dts/meson-gxl-s905x-p212.dtsi new file +173 -0

173 lines not on this page · raw message

arch/arm/dts/meson-gxl-s905x.dtsi new file +55 -0

55 lines not on this page · raw message

arch/arm/dts/meson-gxl.dtsi new file +628 -0

628 lines not on this page · raw message

include/dt-bindings/gpio/meson-gxl-gpio.h new file +131 -0

131 lines not on this page · raw message

Signature · 1 line
2.7.4
#2 lore raw

PATCH 1/3 ARM: dts: Synchronize Amlogic from Linux Mainline 4.13.5

Quoted 6 lines · Neil Armstrong

Synchronize the Amlogic ARM64 dts from mainline Linux 4.13.5

In the preparation of the support of the Amlogic P212 board, import the corresponding meson-gxl-s905x-p212.dts file.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20171012/ed697a07/attachment.sig>
#4 lore raw

PATCH 1/3 ARM: dts: Synchronize Amlogic from Linux Mainline 4.13.5

In reply to Neil Armstrong
Quoted 7 lines · Neil Armstrong

Synchronize the Amlogic ARM64 dts from mainline Linux 4.13.5

In the preparation of the support of the Amlogic P212 board, import the corresponding meson-gxl-s905x-p212.dts file.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20171117/291f5686/attachment.sig>
#5 lore raw

PATCH 2/3 pinctrl: meson: Add GXL Support

In reply to Neil Armstrong

Add the Amlogic Meson GXL pinctrl support based on the GXBB driver and the synchronized DTS from Linux 4.13.5

---
 drivers/pinctrl/meson/Kconfig             |   4 +
 drivers/pinctrl/meson/Makefile            |   1 +
 drivers/pinctrl/meson/pinctrl-meson-gxl.c | 736 ++++++++++++++++++++++++++++++
 3 files changed, 741 insertions(+)
 create mode 100644 drivers/pinctrl/meson/pinctrl-meson-gxl.c
drivers/pinctrl/meson/Kconfig +4 -0
index c3e6901..27ba890 100644
@@ -8,4 +8,8 @@ config PINCTRL_MESON_GXBB
 	bool "Amlogic Meson GXBB SoC pinctrl driver"
 	select PINCTRL_MESON
 
+config PINCTRL_MESON_GXL
+	bool "Amlogic Meson GXL SoC pinctrl driver"
+	select PINCTRL_MESON
+
 endif
drivers/pinctrl/meson/Makefile +1 -0
index 6dde4bc..18921e3 100644
@@ -4,3 +4,4 @@
 
 obj-y					+= pinctrl-meson.o
 obj-$(CONFIG_PINCTRL_MESON_GXBB)	+= pinctrl-meson-gxbb.o
+obj-$(CONFIG_PINCTRL_MESON_GXL)		+= pinctrl-meson-gxl.o
drivers/pinctrl/meson/pinctrl-meson-gxl.c new file +736 -0

736 lines not on this page · raw message

Signature · 1 line
2.7.4
#6 lore raw

PATCH 2/3 pinctrl: meson: Add GXL Support

Quoted 4 lines · Neil Armstrong

Add the Amlogic Meson GXL pinctrl support based on the GXBB driver and the synchronized DTS from Linux 4.13.5

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20171012/f4c972f4/attachment.sig>
#8 lore raw

PATCH 2/3 pinctrl: meson: Add GXL Support

In reply to Neil Armstrong
Quoted 5 lines · Neil Armstrong

Add the Amlogic Meson GXL pinctrl support based on the GXBB driver and the synchronized DTS from Linux 4.13.5

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20171117/6b1e9050/attachment.sig>
#9 lore raw

PATCH 3/3 arm: add initial support for Amlogic P212 based on Meson GXL family

In reply to Neil Armstrong

This adds platform code for the Amlogic P212 reference board based on a Meson GXL (S905X) SoC with the Meson GXL configuration.

This initial submission only supports UART and MMC/SDCard, support for the internal Ethernet PHY in Work In Progress.

---
 arch/arm/mach-meson/Kconfig    | 22 ++++++++++
 board/amlogic/p212/Kconfig     | 12 ++++++
 board/amlogic/p212/MAINTAINERS |  6 +++
 board/amlogic/p212/Makefile    |  8 ++++
 board/amlogic/p212/README      | 96 ++++++++++++++++++++++++++++++++++++++++++
 board/amlogic/p212/p212.c      | 21 +++++++++
 configs/p212_defconfig         | 31 ++++++++++++++
 include/configs/p212.h         | 22 ++++++++++
 8 files changed, 218 insertions(+)
 create mode 100644 board/amlogic/p212/Kconfig
 create mode 100644 board/amlogic/p212/MAINTAINERS
 create mode 100644 board/amlogic/p212/Makefile
 create mode 100644 board/amlogic/p212/README
 create mode 100644 board/amlogic/p212/p212.c
 create mode 100644 configs/p212_defconfig
 create mode 100644 include/configs/p212.h
arch/arm/mach-meson/Kconfig +22 -0
index af3be59..d4bd230 100644
@@ -9,6 +9,15 @@ config MESON_GXBB
 	  The Amlogic Meson GXBaby (S905) is an ARM SoC with a
 	  quad-core Cortex-A53 CPU and a Mali-450 GPU.
 
+config MESON_GXL
+	bool "Support Meson GXL"
+	select ARM64
+	select DM
+	select DM_SERIAL
+	help
+	  The Amlogic Meson GXL (S905X and S905X) is an ARM SoC with a
+	  quad-core Cortex-A53 CPU and a Mali-450 GPU.
+
 if MESON_GXBB
 
 config TARGET_ODROID_C2
@@ -20,6 +29,17 @@ config TARGET_ODROID_C2
 
 endif
 
+if MESON_GXL
+
+config TARGET_P212
+	bool "P212"
+	help
+	  P212 is a reference dessign board based on Meson GXL S905X SoC
+	  with 2 GiB of RAM, Ethernet, HDMI, 2 USB, micro-SD slot,
+	  eMMC, IR receiver, CVBS+Audio jack and a SDIO WiFi module.
+
+endif
+
 config SYS_SOC
 	default "meson"
 
@@ -28,4 +48,6 @@ config SYS_MALLOC_F_LEN
 
 source "board/amlogic/odroid-c2/Kconfig"
 
+source "board/amlogic/p212/Kconfig"
+
 endif
board/amlogic/p212/Kconfig new file +12 -0
new file mode 100644
index 0000000..720c92b
@@ -0,0 +1,12 @@
+if TARGET_P212
+
+config SYS_BOARD
+	default "p212"
+
+config SYS_VENDOR
+	default "amlogic"
+
+config SYS_CONFIG_NAME
+	default "p212"
+
+endif
board/amlogic/p212/MAINTAINERS new file +6 -0
new file mode 100644
index 0000000..6575f17
@@ -0,0 +1,6 @@
+P212
+M:	Neil Armstrong <[email protected]>
+S:	Maintained
+F:	board/amlogic/p212/
+F:	include/configs/p212.h
+F:	configs/p212_defconfig
board/amlogic/p212/Makefile new file +8 -0
new file mode 100644
index 0000000..960a661
@@ -0,0 +1,8 @@
+#
+# (C) Copyright 2016 BayLibre, SAS
+# Author: Neil Armstrong <[email protected]>
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-y	:= p212.o
board/amlogic/p212/README new file +96 -0

96 lines not on this page · raw message

board/amlogic/p212/p212.c new file +21 -0
new file mode 100644
index 0000000..1eeb7f2
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2016 BayLibre, SAS
+ * Author: Neil Armstrong <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <asm/io.h>
+#include <asm/arch/gxbb.h>
+
+int board_init(void)
+{
+	return 0;
+}
+
+int misc_init_r(void)
+{
+       return 0;
+}
configs/p212_defconfig new file +31 -0
new file mode 100644
index 0000000..3c57621
@@ -0,0 +1,31 @@
+CONFIG_ARM=y
+CONFIG_ARCH_MESON=y
+CONFIG_MESON_GXL=y
+CONFIG_TARGET_P212=y
+CONFIG_IDENT_STRING=" p212"
+CONFIG_DEFAULT_DEVICE_TREE="meson-gxl-s905x-p212"
+CONFIG_DEBUG_UART=y
+CONFIG_ENV_IS_NOWHERE=y
+# CONFIG_DISPLAY_CPUINFO is not set
+# CONFIG_DISPLAY_BOARDINFO is not set
+# CONFIG_CMD_BDI is not set
+# CONFIG_CMD_IMI is not set
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_LOADS is not set
+CONFIG_CMD_MMC=y
+# CONFIG_CMD_FPGA is not set
+CONFIG_CMD_GPIO=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_MMC_MESON_GX=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_MESON_GXL=y
+CONFIG_DEBUG_UART_MESON=y
+CONFIG_DEBUG_UART_BASE=0xc81004c0
+CONFIG_DEBUG_UART_CLOCK=24000000
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_DEBUG_UART_SKIP_INIT=y
+CONFIG_MESON_SERIAL=y
+CONFIG_OF_LIBFDT_OVERLAY=y
include/configs/p212.h new file +22 -0
new file mode 100644
index 0000000..0477384
@@ -0,0 +1,22 @@
+/*
+ * Configuration for Amlogic P212
+ *
+ * Copyright (C) 2017 Baylibre, SAS
+ * Author: Neil Armstrong <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#define CONFIG_MISC_INIT_R
+
+/* Serial setup */
+#define CONFIG_CONS_INDEX		0
+
+#define MESON_FDTFILE_SETTING "fdtfile=amlogic/meson-gxl-s905x-p212.dtb\0"
+
+#include <configs/meson-gxbb-common.h>
+
+#endif /* __CONFIG_H */
Signature · 1 line
2.7.4
#10 lore raw

PATCH 3/3 arm: add initial support for Amlogic P212 based on Meson GXL family

Quoted 7 lines · Neil Armstrong

This adds platform code for the Amlogic P212 reference board based on a Meson GXL (S905X) SoC with the Meson GXL configuration.

This initial submission only supports UART and MMC/SDCard, support for the internal Ethernet PHY in Work In Progress.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20171012/a47c92ec/attachment.sig>
#11 lore raw

PATCH 3/3 arm: add initial support for Amlogic P212 based on Meson GXL family

In reply to Neil Armstrong
Quoted 7 lines · Neil Armstrong

This adds platform code for the Amlogic P212 reference board based on a Meson GXL (S905X) SoC with the Meson GXL configuration.

This initial submission only supports UART and MMC/SDCard, support for the internal Ethernet PHY in Work In Progress.

#12 lore raw

PATCH 3/3 arm: add initial support for Amlogic P212 based on Meson GXL family

In reply to Neil Armstrong
Quoted 8 lines · Neil Armstrong

This adds platform code for the Amlogic P212 reference board based on a Meson GXL (S905X) SoC with the Meson GXL configuration.

This initial submission only supports UART and MMC/SDCard, support for the internal Ethernet PHY in Work In Progress.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20171117/50dec77a/attachment.sig>