Skip to contentSkip to conversation

amlogic: Add Khadas VIM3 support

PATCH New Neil Armstrong 1 participant 5 messages Oct 9, 2019

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

v3 cover amlogic: Add Khadas VIM3 support

Hi Andreas,

This is a resend from v2 with first patch resync'ed on v5.4-rc2.

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

v2 fixes an oversight and adds some cleanups.

v2 -> v3:
* Resync patch 1 on v5.4-rc2
* Removed bad signeoff of Julien Masson in patch 3

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

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-g12a.dtsi                  | 2422 +---------------
 arch/arm/dts/meson-g12b-a311d-khadas-vim3.dts |   16 +
 arch/arm/dts/meson-g12b-a311d.dtsi            |  149 +
 arch/arm/dts/meson-g12b-khadas-vim3.dtsi      |  189 ++
 arch/arm/dts/meson-g12b-odroid-n2.dts         |  104 +-
 arch/arm/dts/meson-g12b-s922x.dtsi            |  124 +
 arch/arm/dts/meson-g12b.dtsi                  |   39 +-
 arch/arm/dts/meson-khadas-vim3.dtsi           |  360 +++
 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 +
 17 files changed, 3705 insertions(+), 2383 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 arch/arm/dts/meson-g12b-s922x.dtsi
 create mode 100644 arch/arm/dts/meson-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.22.0
#1 lore raw

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

From: Andreas Färber <[email protected]>

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 da0c9ea146cb ("Linux 5.4-rc2")

---
 arch/arm/dts/Makefile                         |    3 +-
 arch/arm/dts/meson-g12-common.dtsi            | 2435 +++++++++++++++++
 arch/arm/dts/meson-g12a.dtsi                  | 2422 +---------------
 arch/arm/dts/meson-g12b-a311d-khadas-vim3.dts |   16 +
 arch/arm/dts/meson-g12b-a311d.dtsi            |  149 +
 arch/arm/dts/meson-g12b-khadas-vim3.dtsi      |  189 ++
 arch/arm/dts/meson-g12b-odroid-n2.dts         |  104 +-
 arch/arm/dts/meson-g12b-s922x.dtsi            |  124 +
 arch/arm/dts/meson-g12b.dtsi                  |   39 +-
 arch/arm/dts/meson-khadas-vim3.dtsi           |  360 +++
 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, 3516 insertions(+), 2382 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 arch/arm/dts/meson-g12b-s922x.dtsi
 create mode 100644 arch/arm/dts/meson-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 62da168ef8..aac3d21ef8 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-g12a.dtsi +47 -2375

556 lines not on this page · raw message

arch/arm/dts/meson-g12b-a311d-khadas-vim3.dts new file +16 -0
new file mode 100644
index 0000000000..3a6a1e0c1e

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

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 +189 -0

189 lines not on this page · raw message

arch/arm/dts/meson-g12b-odroid-n2.dts +101 -3

104 lines not on this page · raw message

arch/arm/dts/meson-g12b-s922x.dtsi new file +124 -0

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

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

360 lines not on this page · 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.22.0

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

#2 lore raw

PATCH v3 2/4 configs: Add Khadas VIM3 defconfig

In reply to Neil Armstrong

From: Andreas Färber <[email protected]>

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

---
 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.22.0
#3 lore raw

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

In reply to Neil Armstrong

From: Andreas Färber <[email protected]>

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

Fixes f41d723b9f ("ARM: meson: display Amlogic SoC Information")
---
 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.22.0
#4 lore raw

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

In reply to Neil Armstrong

From: Andreas Färber <[email protected]>

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

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

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