Skip to contentSkip to conversation

amlogic: Add Khadas VIM3 support

PATCH New Andreas Färber 2 participants 6 messages Sep 2, 2019 – Oct 1, 2019

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

v2 cover amlogic: Add Khadas VIM3 support

Hi Neil,

This mini-series adds initial support for Amlogic A311D based Khadas VIM3.

v2 fixes an oversight and adds some cleanups.

Regards,
Andreas

v1 -> v2:
* Fixed branch name in README
* Mention linux-next tag for DT/header import (Neil)
* Avoid "Unknown" SoC output for A311D, fixing a typo while at it

Cc Neil Armstrong <[email protected]>

Andreas Färber (4):
arm: dts: Import and update DT for Khadas VIM3
configs: Add Khadas VIM3 defconfig
arm: meson: Tidy SoC information output
arm: meson: Recognize A311D SoC

 arch/arm/dts/Makefile                              |    3 +-
 arch/arm/dts/meson-g12-common.dtsi                 | 2435 ++++++++++++++++++++
 arch/arm/dts/meson-g12b-a311d-khadas-vim3.dts      |   15 +
 arch/arm/dts/meson-g12b-a311d.dtsi                 |  149 ++
 arch/arm/dts/meson-g12b-khadas-vim3.dtsi           |  544 +++++
 arch/arm/dts/meson-g12b.dtsi                       |   39 +-
 arch/arm/mach-meson/board-info.c                   |    3 +-
 board/amlogic/w400/MAINTAINERS                     |    1 +
 board/amlogic/w400/README.khadas-vim3              |  132 ++
 configs/khadas-vim3_defconfig                      |   54 +
 include/dt-bindings/clock/g12a-clkc.h              |    6 +
 include/dt-bindings/power/meson-g12a-power.h       |   13 +
 .../reset/amlogic,meson-g12a-audio-reset.h         |   38 +
 13 files changed, 3427 insertions(+), 5 deletions(-)
 create mode 100644 arch/arm/dts/meson-g12-common.dtsi
 create mode 100644 arch/arm/dts/meson-g12b-a311d-khadas-vim3.dts
 create mode 100644 arch/arm/dts/meson-g12b-a311d.dtsi
 create mode 100644 arch/arm/dts/meson-g12b-khadas-vim3.dtsi
 create mode 100644 board/amlogic/w400/README.khadas-vim3
 create mode 100644 configs/khadas-vim3_defconfig
 create mode 100644 include/dt-bindings/power/meson-g12a-power.h
 create mode 100644 include/dt-bindings/reset/amlogic,meson-g12a-audio-reset.h
Signature · 1 line
2.16.4
#1 lore raw

PATCH v2 1/4 arm: dts: Import and update DT for Khadas VIM3

In Linux meson-g12-common.dtsi was introduced as well as new g12b nodes and headers, as dependencies of new meson-g12b-a311d-khadas-vim3.dts.

Copied from next-20190830.

---
v1 -> v2:
* Mention linux-next tag for DT/header import (Neil)

 arch/arm/dts/Makefile                              |    3 +-
 arch/arm/dts/meson-g12-common.dtsi                 | 2435 ++++++++++++++++++++
 arch/arm/dts/meson-g12b-a311d-khadas-vim3.dts      |   15 +
 arch/arm/dts/meson-g12b-a311d.dtsi                 |  149 ++
 arch/arm/dts/meson-g12b-khadas-vim3.dtsi           |  544 +++++
 arch/arm/dts/meson-g12b.dtsi                       |   39 +-
 include/dt-bindings/clock/g12a-clkc.h              |    6 +
 include/dt-bindings/power/meson-g12a-power.h       |   13 +
 .../reset/amlogic,meson-g12a-audio-reset.h         |   38 +
 9 files changed, 3238 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm/dts/meson-g12-common.dtsi
 create mode 100644 arch/arm/dts/meson-g12b-a311d-khadas-vim3.dts
 create mode 100644 arch/arm/dts/meson-g12b-a311d.dtsi
 create mode 100644 arch/arm/dts/meson-g12b-khadas-vim3.dtsi
 create mode 100644 include/dt-bindings/power/meson-g12a-power.h
 create mode 100644 include/dt-bindings/reset/amlogic,meson-g12a-audio-reset.h
arch/arm/dts/Makefile +2 -1
index aac1b83d49..6de5e4c62a 100644
@@ -141,7 +141,8 @@ dtb-$(CONFIG_ARCH_MESON) += \
 	meson-axg-s400.dtb \
 	meson-g12a-u200.dtb \
 	meson-g12a-sei510.dtb \
-	meson-g12b-odroid-n2.dtb
+	meson-g12b-odroid-n2.dtb \
+	meson-g12b-a311d-khadas-vim3.dtb
 dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
 	tegra20-medcom-wide.dtb \
 	tegra20-paz00.dtb \
arch/arm/dts/meson-g12-common.dtsi new file +2435 -0

2,435 lines not on this page · raw message

arch/arm/dts/meson-g12b-a311d-khadas-vim3.dts new file +15 -0
new file mode 100644
index 0000000000..73128ed243
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 BayLibre, SAS
+ * Author: Neil Armstrong <[email protected]>
+ * Copyright (c) 2019 Christian Hewitt <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "meson-g12b-a311d.dtsi"
+#include "meson-g12b-khadas-vim3.dtsi"
+
+/ {
+	compatible = "khadas,vim3", "amlogic,a311d", "amlogic,g12b";
+};
arch/arm/dts/meson-g12b-a311d.dtsi new file +149 -0

149 lines not on this page · raw message

arch/arm/dts/meson-g12b-khadas-vim3.dtsi new file +544 -0

392 lines not on this page · raw message

arch/arm/dts/meson-g12b.dtsi +36 -3
index 9e88e513b2..5628ccd545 100644

Lines of this file are not shown. View the raw message.

include/dt-bindings/clock/g12a-clkc.h +6 -0
index b6b127e456..0837c1a7ae 100644

Lines of this file are not shown. View the raw message.

include/dt-bindings/power/meson-g12a-power.h new file +13 -0
new file mode 100644
index 0000000000..bb5e67a842

Lines of this file are not shown. View the raw message.

include/dt-bindings/reset/amlogic,meson-g12a-audio-reset.h new file +38 -0
new file mode 100644
index 0000000000..14b78dabed

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.16.4

Part of the diff is not shown here. View the raw message.

#2 lore raw

PATCH v2 2/4 configs: Add Khadas VIM3 defconfig

In reply to Andreas Färber

Derived from odroid-n2_defconfig and README.odroid-n2.

---
v1 -> v2:
* Fixed branch name in README

 board/amlogic/w400/MAINTAINERS        |   1 +
 board/amlogic/w400/README.khadas-vim3 | 132 ++++++++++++++++++++++++++++++++++
 configs/khadas-vim3_defconfig         |  54 ++++++++++++++
 3 files changed, 187 insertions(+)
 create mode 100644 board/amlogic/w400/README.khadas-vim3
 create mode 100644 configs/khadas-vim3_defconfig
board/amlogic/w400/MAINTAINERS +1 -0
index 6e68fa73f7..3b21f50367 100644
@@ -3,4 +3,5 @@ M:	Neil Armstrong <[email protected]>
 S:	Maintained
 L:	u-boot-amlogic at groups.io
 F:	board/amlogic/w400/
+F:	configs/khadas-vim3_defconfig
 F:	configs/odroid-n2_defconfig
board/amlogic/w400/README.khadas-vim3 new file +132 -0

132 lines not on this page · raw message

configs/khadas-vim3_defconfig new file +54 -0

54 lines not on this page · raw message

Signature · 1 line
2.16.4
#3 lore raw

PATCH v2 3/4 arm: meson: Tidy SoC information output

In reply to Andreas Färber

Write SoC instead of Soc. The Linux driver is not affected.

Fixes f41d723b9f ("ARM: meson: display Amlogic SoC Information")

---
v2: New

 arch/arm/mach-meson/board-info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-meson/board-info.c +1 -1
index ba248e8ff6..ea32c01d11 100644
@@ -154,7 +154,7 @@ int show_board_info(void)
 
 	/* print board information */
 	print_board_model();
-	printf("Soc:   Amlogic Meson %s (%s) Revision %x:%x (%x:%x)\n",
+	printf("SoC:   Amlogic Meson %s (%s) Revision %x:%x (%x:%x)\n",
 	       socinfo_to_soc_id(socinfo),
 	       socinfo_to_package_id(socinfo),
 	       socinfo_to_major(socinfo),
Signature · 1 line
2.16.4
#4 lore raw

PATCH v2 4/4 arm: meson: Recognize A311D SoC

In reply to Andreas Färber

Values imported from Linux driver, but in correct numeric order.

Khadas VIM3 prints: Amlogic Meson G12B (A311D) Revision 29:b (10:2)

---
v2: New

 arch/arm/mach-meson/board-info.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-meson/board-info.c +1 -0
index ea32c01d11..9571b5a189 100644
@@ -59,6 +59,7 @@ static const struct meson_gx_package_id {
 	{ "A113D",  0x25, 0x22, 0xff },
 	{ "S905D2", 0x28, 0x10, 0xf0 },
 	{ "S905X2", 0x28, 0x40, 0xf0 },
+	{ "A311D",  0x29, 0x10, 0xf0 },
 	{ "S922X",  0x29, 0x40, 0xf0 },
 };
 
Signature · 1 line
2.16.4
#5 lore raw

v2 cover amlogic: Add Khadas VIM3 support

In reply to Andreas Färber

Hi Andreas,

Quoted 6 lines · Andreas Färber

Hi Neil,

This mini-series adds initial support for Amlogic A311D based Khadas VIM3.

v2 fixes an oversight and adds some cleanups.

Quoted 7 lines

Regards,
Andreas

v1 -> v2:
* Fixed branch name in README
* Mention linux-next tag for DT/header import (Neil)
* Avoid "Unknown" SoC output for A311D, fixing a typo while at it

Do you have time to rebase patch 1 on Linux v5.3-rc1 ? Or do you allow me to rebase it myself ?

Neil

Quoted 32 lines
Cc Neil Armstrong <[email protected]>

Andreas Färber (4):
arm: dts: Import and update DT for Khadas VIM3
configs: Add Khadas VIM3 defconfig
arm: meson: Tidy SoC information output
arm: meson: Recognize A311D SoC

 arch/arm/dts/Makefile                              |    3 +-
 arch/arm/dts/meson-g12-common.dtsi                 | 2435 ++++++++++++++++++++
 arch/arm/dts/meson-g12b-a311d-khadas-vim3.dts      |   15 +
 arch/arm/dts/meson-g12b-a311d.dtsi                 |  149 ++
 arch/arm/dts/meson-g12b-khadas-vim3.dtsi           |  544 +++++
 arch/arm/dts/meson-g12b.dtsi                       |   39 +-
 arch/arm/mach-meson/board-info.c                   |    3 +-
 board/amlogic/w400/MAINTAINERS                     |    1 +
 board/amlogic/w400/README.khadas-vim3              |  132 ++
 configs/khadas-vim3_defconfig                      |   54 +
 include/dt-bindings/clock/g12a-clkc.h              |    6 +
 include/dt-bindings/power/meson-g12a-power.h       |   13 +
 .../reset/amlogic,meson-g12a-audio-reset.h         |   38 +
 13 files changed, 3427 insertions(+), 5 deletions(-)
 create mode 100644 arch/arm/dts/meson-g12-common.dtsi
 create mode 100644 arch/arm/dts/meson-g12b-a311d-khadas-vim3.dts
 create mode 100644 arch/arm/dts/meson-g12b-a311d.dtsi
 create mode 100644 arch/arm/dts/meson-g12b-khadas-vim3.dtsi
 create mode 100644 board/amlogic/w400/README.khadas-vim3
 create mode 100644 configs/khadas-vim3_defconfig
 create mode 100644 include/dt-bindings/power/meson-g12a-power.h
 create mode 100644 include/dt-bindings/reset/amlogic,meson-g12a-audio-reset.h