From 3b12fecebd094f6998fe745c41e4e34588f9752b Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Fri, 30 Aug 2019 14:09:28 +0200 Subject: configs: sei510: enable Video Display support Add the necessary config options to support BMP display over HDMI, and add a preboot command to load the BMP file from a predefined eMMC partition. Signed-off-by: Neil Armstrong Reviewed-by: Anatolij Gustschin --- include/configs/sei510.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/configs/sei510.h b/include/configs/sei510.h index 99579022504..5bf982cada8 100644 --- a/include/configs/sei510.h +++ b/include/configs/sei510.h @@ -14,6 +14,7 @@ #define CONFIG_ENV_SIZE 0x10000 #define CONFIG_ENV_OFFSET (-0x10000) +#define LOGO_UUID "43a3305d-150f-4cc9-bd3b-38fca8693846;" #define CACHE_UUID "99207ae6-5207-11e9-999e-6f77a3612069;" #define SYSTEM_UUID "99f9b7ac-5207-11e9-8507-c3c037e393f3;" #define VENDOR_UUID "9d082802-5207-11e9-954c-cbbce08ba108;" @@ -23,6 +24,7 @@ #define PARTS_DEFAULT \ "uuid_disk=${uuid_gpt_disk};" \ "name=boot,size=64M,bootable,uuid=${uuid_gpt_boot};" \ + "name=logo,size=2M,uuid=" LOGO_UUID \ "name=cache,size=256M,uuid=" CACHE_UUID \ "name=system,size=1536M,uuid=" SYSTEM_UUID \ "name=vendor,size=256M,uuid=" VENDOR_UUID \ @@ -113,12 +115,22 @@ func(RECOVERY, recovery, na) \ func(SYSTEM, system, na) \ +#define PREBOOT_LOAD_LOGO \ + "mmc dev ${mmcdev};" \ + "part start mmc ${mmcdev} ${logopart} boot_start;" \ + "part size mmc ${mmcdev} ${logopart} boot_size;" \ + "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ + "bmp display ${loadaddr} m m;" \ + "fi;" + #define CONFIG_EXTRA_ENV_SETTINGS \ "partitions=" PARTS_DEFAULT "\0" \ "mmcdev=2\0" \ "bootpart=1\0" \ + "logopart=2\0" \ "gpio_recovery=88\0" \ "check_button=gpio input ${gpio_recovery};test $? -eq 0;\0" \ + "load_logo=" PREBOOT_LOAD_LOGO "\0" \ "console=/dev/ttyAML0\0" \ "bootargs=no_console_suspend\0" \ "stdin=" STDIN_CFG "\0" \ -- cgit v1.2.3 From 1a87cc7891c6e9686ed9b4c02683838295f408c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 9 Oct 2019 16:03:54 +0200 Subject: arm: dts: Import and update DT for Khadas VIM3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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") Signed-off-by: Andreas Färber Signed-off-by: Neil Armstrong --- 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 ++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 include/dt-bindings/power/meson-g12a-power.h create mode 100644 include/dt-bindings/reset/amlogic,meson-g12a-audio-reset.h (limited to 'include') diff --git a/include/dt-bindings/clock/g12a-clkc.h b/include/dt-bindings/clock/g12a-clkc.h index b6b127e4563..0837c1a7ae4 100644 --- a/include/dt-bindings/clock/g12a-clkc.h +++ b/include/dt-bindings/clock/g12a-clkc.h @@ -137,5 +137,11 @@ #define CLKID_VDEC_HEVC 207 #define CLKID_VDEC_HEVCF 210 #define CLKID_TS 212 +#define CLKID_CPUB_CLK 224 +#define CLKID_GP1_PLL 243 +#define CLKID_DSU_CLK 252 +#define CLKID_CPU1_CLK 253 +#define CLKID_CPU2_CLK 254 +#define CLKID_CPU3_CLK 255 #endif /* __G12A_CLKC_H */ diff --git a/include/dt-bindings/power/meson-g12a-power.h b/include/dt-bindings/power/meson-g12a-power.h new file mode 100644 index 00000000000..bb5e67a842d --- /dev/null +++ b/include/dt-bindings/power/meson-g12a-power.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */ +/* + * Copyright (c) 2019 BayLibre, SAS + * Author: Neil Armstrong + */ + +#ifndef _DT_BINDINGS_MESON_G12A_POWER_H +#define _DT_BINDINGS_MESON_G12A_POWER_H + +#define PWRC_G12A_VPU_ID 0 +#define PWRC_G12A_ETH_ID 1 + +#endif diff --git a/include/dt-bindings/reset/amlogic,meson-g12a-audio-reset.h b/include/dt-bindings/reset/amlogic,meson-g12a-audio-reset.h new file mode 100644 index 00000000000..14b78dabed0 --- /dev/null +++ b/include/dt-bindings/reset/amlogic,meson-g12a-audio-reset.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2019 BayLibre, SAS. + * Author: Jerome Brunet + * + */ + +#ifndef _DT_BINDINGS_AMLOGIC_MESON_G12A_AUDIO_RESET_H +#define _DT_BINDINGS_AMLOGIC_MESON_G12A_AUDIO_RESET_H + +#define AUD_RESET_PDM 0 +#define AUD_RESET_TDMIN_A 1 +#define AUD_RESET_TDMIN_B 2 +#define AUD_RESET_TDMIN_C 3 +#define AUD_RESET_TDMIN_LB 4 +#define AUD_RESET_LOOPBACK 5 +#define AUD_RESET_TODDR_A 6 +#define AUD_RESET_TODDR_B 7 +#define AUD_RESET_TODDR_C 8 +#define AUD_RESET_FRDDR_A 9 +#define AUD_RESET_FRDDR_B 10 +#define AUD_RESET_FRDDR_C 11 +#define AUD_RESET_TDMOUT_A 12 +#define AUD_RESET_TDMOUT_B 13 +#define AUD_RESET_TDMOUT_C 14 +#define AUD_RESET_SPDIFOUT 15 +#define AUD_RESET_SPDIFOUT_B 16 +#define AUD_RESET_SPDIFIN 17 +#define AUD_RESET_EQDRC 18 +#define AUD_RESET_RESAMPLE 19 +#define AUD_RESET_DDRARB 20 +#define AUD_RESET_POWDET 21 +#define AUD_RESET_TORAM 22 +#define AUD_RESET_TOACODEC 23 +#define AUD_RESET_TOHDMITX 24 +#define AUD_RESET_CLKTREE 25 + +#endif -- cgit v1.2.3 From 5be4afe15f42bcb1f82369c46d1bd41d3b5308e7 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Fri, 11 Oct 2019 17:33:54 +0200 Subject: ARM: dts: Import SEI610 DT from Linux 5.4-rc2 Import the Amlogic SM1 DT and the SEI610 board DT from [1] [1] da0c9ea146cb ("Linux 5.4-rc2") Signed-off-by: Neil Armstrong --- include/dt-bindings/power/meson-sm1-power.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 include/dt-bindings/power/meson-sm1-power.h (limited to 'include') diff --git a/include/dt-bindings/power/meson-sm1-power.h b/include/dt-bindings/power/meson-sm1-power.h new file mode 100644 index 00000000000..a020ab00c13 --- /dev/null +++ b/include/dt-bindings/power/meson-sm1-power.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: (GPL-2.0+ or MIT) */ +/* + * Copyright (c) 2019 BayLibre, SAS + * Author: Neil Armstrong + */ + +#ifndef _DT_BINDINGS_MESON_SM1_POWER_H +#define _DT_BINDINGS_MESON_SM1_POWER_H + +#define PWRC_SM1_VPU_ID 0 +#define PWRC_SM1_NNA_ID 1 +#define PWRC_SM1_USB_ID 2 +#define PWRC_SM1_PCIE_ID 3 +#define PWRC_SM1_GE2D_ID 4 +#define PWRC_SM1_AUDIO_ID 5 +#define PWRC_SM1_ETH_ID 6 + +#endif -- cgit v1.2.3 From 880c0aa91d9569d466f575f24b3ee03eb607a350 Mon Sep 17 00:00:00 2001 From: Guillaume La Roque Date: Fri, 11 Oct 2019 17:33:57 +0200 Subject: configs: sei510: rework header and fix userdata size Move android generic config and boot sequence in meson64_android header and fix size of userdata to use all eMMC on SEI510. Signed-off-by: Guillaume La Roque Signed-off-by: Neil Armstrong --- include/configs/meson64_android.h | 136 ++++++++++++++++++++++++++++++++++++++ include/configs/sei510.h | 121 +-------------------------------- 2 files changed, 138 insertions(+), 119 deletions(-) create mode 100644 include/configs/meson64_android.h (limited to 'include') diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h new file mode 100644 index 00000000000..055fb44e936 --- /dev/null +++ b/include/configs/meson64_android.h @@ -0,0 +1,136 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Configuration for Android Amlogic Meson 64bits SoCs + * + * Copyright (C) 2019 Baylibre, SAS + * Author: Jerome Brunet + */ + +#ifndef __MESON64_ANDROID_CONFIG_H +#define __MESON64_ANDROID_CONFIG_H + +#define CONFIG_SYS_MMC_ENV_DEV 2 +#define CONFIG_SYS_MMC_ENV_PART 1 +#define CONFIG_ENV_SIZE 0x10000 +#define CONFIG_ENV_OFFSET (-0x10000) + + +#define BOOTENV_DEV_FASTBOOT(devtypeu, devtypel, instance) \ + "bootcmd_fastboot=" \ + "sm reboot_reason reason;" \ + "setenv run_fastboot 0;" \ + "if test \"${boot_source}\" = \"usb\"; then " \ + "echo Fastboot forced by usb rom boot;" \ + "setenv run_fastboot 1;" \ + "fi;" \ + "if gpt verify mmc ${mmcdev} ${partitions}; then; " \ + "else " \ + "echo Broken MMC partition scheme;" \ + "setenv run_fastboot 1;" \ + "fi;" \ + "if test \"${reason}\" = \"bootloader\" -o " \ + "\"${reason}\" = \"fastboot\"; then " \ + "echo Fastboot asked by reboot reason;" \ + "setenv run_fastboot 1;" \ + "fi;" \ + "if test \"${skip_fastboot}\" -eq 1; then " \ + "echo Fastboot skipped by environment;" \ + "setenv run_fastboot 0;" \ + "fi;" \ + "if test \"${force_fastboot}\" -eq 1; then " \ + "echo Fastboot forced by environment;" \ + "setenv run_fastboot 1;" \ + "fi;" \ + "if test \"${run_fastboot}\" -eq 1; then " \ + "echo Running Fastboot...;" \ + "fastboot 0;" \ + "fi\0" + +#define BOOTENV_DEV_NAME_FASTBOOT(devtypeu, devtypel, instance) \ + "fastboot " + +/* TOFIX: Run actual recovery instead of fastboot */ +#define BOOTENV_DEV_RECOVERY(devtypeu, devtypel, instance) \ + "bootcmd_recovery=" \ + "pinmux dev pinctrl@14;" \ + "pinmux dev pinctrl@40;" \ + "sm reboot_reason reason;" \ + "setenv run_recovery 0;" \ + "if run check_button; then " \ + "echo Recovery button is pressed;" \ + "setenv run_recovery 1;" \ + "elif test \"${reason}\" = \"recovery\" -o " \ + "\"${reason}\" = \"update\"; then " \ + "echo Recovery asked by reboot reason;" \ + "setenv run_recovery 1;" \ + "fi;" \ + "if test \"${skip_recovery}\" -eq 1; then " \ + "echo Recovery skipped by environment;" \ + "setenv run_recovery 0;" \ + "fi;" \ + "if test \"${force_recovery}\" -eq 1; then " \ + "echo Recovery forced by environment;" \ + "setenv run_recovery 1;" \ + "fi;" \ + "if test \"${run_recovery}\" -eq 1; then " \ + "echo Running Recovery...;" \ + "fastboot 0;" \ + "fi\0" + +#define BOOTENV_DEV_NAME_RECOVERY(devtypeu, devtypel, instance) \ + "recovery " + +#define BOOTENV_DEV_SYSTEM(devtypeu, devtypel, instance) \ + "bootcmd_system=" \ + "echo Loading Android boot partition...;" \ + "mmc dev ${mmcdev};" \ + "setenv bootargs ${bootargs} console=${console} androidboot.serialno=${serial#};" \ + "part start mmc ${mmcdev} ${bootpart} boot_start;" \ + "part size mmc ${mmcdev} ${bootpart} boot_size;" \ + "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ + "echo Running Android...;" \ + "bootm ${loadaddr};" \ + "fi;" \ + "echo Failed to boot Android...;" \ + "reset\0" + +#define BOOTENV_DEV_NAME_SYSTEM(devtypeu, devtypel, instance) \ + "system " + +#define BOOT_TARGET_DEVICES(func) \ + func(FASTBOOT, fastboot, na) \ + func(RECOVERY, recovery, na) \ + func(SYSTEM, system, na) \ + +#define PREBOOT_LOAD_LOGO \ + "mmc dev ${mmcdev};" \ + "part start mmc ${mmcdev} ${logopart} boot_start;" \ + "part size mmc ${mmcdev} ${logopart} boot_size;" \ + "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ + "bmp display ${loadaddr} m m;" \ + "fi;" + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "partitions=" PARTS_DEFAULT "\0" \ + "mmcdev=2\0" \ + "bootpart=1\0" \ + "logopart=2\0" \ + "gpio_recovery=88\0" \ + "check_button=gpio input ${gpio_recovery};test $? -eq 0;\0" \ + "load_logo=" PREBOOT_LOAD_LOGO "\0" \ + "console=/dev/ttyAML0\0" \ + "bootargs=no_console_suspend\0" \ + "stdin=" STDIN_CFG "\0" \ + "stdout=" STDOUT_CFG "\0" \ + "stderr=" STDOUT_CFG "\0" \ + "loadaddr=0x01000000\0" \ + "fdt_addr_r=0x01000000\0" \ + "scriptaddr=0x08000000\0" \ + "kernel_addr_r=0x01080000\0" \ + "pxefile_addr_r=0x01080000\0" \ + "ramdisk_addr_r=0x13000000\0" \ + "fdtfile=amlogic/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" BOOTENV + +#include + +#endif /* __MESON64_ANDROID_CONFIG_H */ diff --git a/include/configs/sei510.h b/include/configs/sei510.h index 5bf982cada8..d37b4c64053 100644 --- a/include/configs/sei510.h +++ b/include/configs/sei510.h @@ -9,11 +9,6 @@ #ifndef __CONFIG_H #define __CONFIG_H -#define CONFIG_SYS_MMC_ENV_DEV 2 -#define CONFIG_SYS_MMC_ENV_PART 1 -#define CONFIG_ENV_SIZE 0x10000 -#define CONFIG_ENV_OFFSET (-0x10000) - #define LOGO_UUID "43a3305d-150f-4cc9-bd3b-38fca8693846;" #define CACHE_UUID "99207ae6-5207-11e9-999e-6f77a3612069;" #define SYSTEM_UUID "99f9b7ac-5207-11e9-8507-c3c037e393f3;" @@ -28,122 +23,10 @@ "name=cache,size=256M,uuid=" CACHE_UUID \ "name=system,size=1536M,uuid=" SYSTEM_UUID \ "name=vendor,size=256M,uuid=" VENDOR_UUID \ - "name=userdata,size=4746M,uuid=" USERDATA_UUID \ + "name=userdata,size=5341M,uuid=" USERDATA_UUID \ "name=rootfs,size=-,uuid=" ROOT_UUID -#define BOOTENV_DEV_FASTBOOT(devtypeu, devtypel, instance) \ - "bootcmd_fastboot=" \ - "sm reboot_reason reason;" \ - "setenv run_fastboot 0;" \ - "if gpt verify mmc ${mmcdev} ${partitions}; then; " \ - "else " \ - "echo Broken MMC partition scheme;" \ - "setenv run_fastboot 1;" \ - "fi;" \ - "if test \"${reason}\" = \"bootloader\" -o " \ - "\"${reason}\" = \"fastboot\"; then " \ - "echo Fastboot asked by reboot reason;" \ - "setenv run_fastboot 1;" \ - "fi;" \ - "if test \"${skip_fastboot}\" -eq 1; then " \ - "echo Fastboot skipped by environment;" \ - "setenv run_fastboot 0;" \ - "fi;" \ - "if test \"${force_fastboot}\" -eq 1; then " \ - "echo Fastboot forced by environment;" \ - "setenv run_fastboot 1;" \ - "fi;" \ - "if test \"${run_fastboot}\" -eq 1; then " \ - "echo Running Fastboot...;" \ - "fastboot 0;" \ - "fi\0" - -#define BOOTENV_DEV_NAME_FASTBOOT(devtypeu, devtypel, instance) \ - "fastboot " - -/* TOFIX: Run actual recovery instead of fastboot */ -#define BOOTENV_DEV_RECOVERY(devtypeu, devtypel, instance) \ - "bootcmd_recovery=" \ - "pinmux dev pinctrl@14;" \ - "pinmux dev pinctrl@40;" \ - "sm reboot_reason reason;" \ - "setenv run_recovery 0;" \ - "if run check_button; then " \ - "echo Recovery button is pressed;" \ - "setenv run_recovery 1;" \ - "elif test \"${reason}\" = \"recovery\" -o " \ - "\"${reason}\" = \"update\"; then " \ - "echo Recovery asked by reboot reason;" \ - "setenv run_recovery 1;" \ - "fi;" \ - "if test \"${skip_recovery}\" -eq 1; then " \ - "echo Recovery skipped by environment;" \ - "setenv run_recovery 0;" \ - "fi;" \ - "if test \"${force_recovery}\" -eq 1; then " \ - "echo Recovery forced by environment;" \ - "setenv run_recovery 1;" \ - "fi;" \ - "if test \"${run_recovery}\" -eq 1; then " \ - "echo Running Recovery...;" \ - "fastboot 0;" \ - "fi\0" - -#define BOOTENV_DEV_NAME_RECOVERY(devtypeu, devtypel, instance) \ - "recovery " - -#define BOOTENV_DEV_SYSTEM(devtypeu, devtypel, instance) \ - "bootcmd_system=" \ - "echo Loading Android boot partition...;" \ - "mmc dev ${mmcdev};" \ - "setenv bootargs ${bootargs} console=${console} androidboot.serialno=${serial#};" \ - "part start mmc ${mmcdev} ${bootpart} boot_start;" \ - "part size mmc ${mmcdev} ${bootpart} boot_size;" \ - "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ - "echo Running Android...;" \ - "bootm ${loadaddr};" \ - "fi;" \ - "echo Failed to boot Android...;" \ - "reset\0" - -#define BOOTENV_DEV_NAME_SYSTEM(devtypeu, devtypel, instance) \ - "system " - -#define BOOT_TARGET_DEVICES(func) \ - func(ROMUSB, romusb, na) \ - func(FASTBOOT, fastboot, na) \ - func(RECOVERY, recovery, na) \ - func(SYSTEM, system, na) \ - -#define PREBOOT_LOAD_LOGO \ - "mmc dev ${mmcdev};" \ - "part start mmc ${mmcdev} ${logopart} boot_start;" \ - "part size mmc ${mmcdev} ${logopart} boot_size;" \ - "if mmc read ${loadaddr} ${boot_start} ${boot_size}; then " \ - "bmp display ${loadaddr} m m;" \ - "fi;" - -#define CONFIG_EXTRA_ENV_SETTINGS \ - "partitions=" PARTS_DEFAULT "\0" \ - "mmcdev=2\0" \ - "bootpart=1\0" \ - "logopart=2\0" \ - "gpio_recovery=88\0" \ - "check_button=gpio input ${gpio_recovery};test $? -eq 0;\0" \ - "load_logo=" PREBOOT_LOAD_LOGO "\0" \ - "console=/dev/ttyAML0\0" \ - "bootargs=no_console_suspend\0" \ - "stdin=" STDIN_CFG "\0" \ - "stdout=" STDOUT_CFG "\0" \ - "stderr=" STDOUT_CFG "\0" \ - "loadaddr=0x01000000\0" \ - "fdt_addr_r=0x01000000\0" \ - "scriptaddr=0x08000000\0" \ - "kernel_addr_r=0x01080000\0" \ - "pxefile_addr_r=0x01080000\0" \ - "ramdisk_addr_r=0x13000000\0" \ - "fdtfile=amlogic/" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" BOOTENV -#include +#include #endif /* __CONFIG_H */ -- cgit v1.2.3 From be2ffa1656509cc974910224a87443868d7037d9 Mon Sep 17 00:00:00 2001 From: Guillaume La Roque Date: Fri, 11 Oct 2019 17:33:58 +0200 Subject: configs: sei610: Add config file to fix userdata size Add separate config file to handle the different eMMC size on the sei610 board. Signed-off-by: Guillaume La Roque Signed-off-by: Neil Armstrong --- include/configs/sei610.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 include/configs/sei610.h (limited to 'include') diff --git a/include/configs/sei610.h b/include/configs/sei610.h new file mode 100644 index 00000000000..6d093161c94 --- /dev/null +++ b/include/configs/sei610.h @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Configuration for the SEI510 + * + * Copyright (C) 2019 Baylibre, SAS + * Author: Jerome Brunet + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#define LOGO_UUID "43a3305d-150f-4cc9-bd3b-38fca8693846;" +#define CACHE_UUID "99207ae6-5207-11e9-999e-6f77a3612069;" +#define SYSTEM_UUID "99f9b7ac-5207-11e9-8507-c3c037e393f3;" +#define VENDOR_UUID "9d082802-5207-11e9-954c-cbbce08ba108;" +#define USERDATA_UUID "9b976e42-5207-11e9-8f16-ff47ac594b22;" +#define ROOT_UUID "ddb8c3f6-d94d-4394-b633-3134139cc2e0;" + +#define PARTS_DEFAULT \ + "uuid_disk=${uuid_gpt_disk};" \ + "name=boot,size=64M,bootable,uuid=${uuid_gpt_boot};" \ + "name=logo,size=2M,uuid=" LOGO_UUID \ + "name=cache,size=256M,uuid=" CACHE_UUID \ + "name=system,size=1536M,uuid=" SYSTEM_UUID \ + "name=vendor,size=256M,uuid=" VENDOR_UUID \ + "name=userdata,size=12795M,uuid=" USERDATA_UUID \ + "name=rootfs,size=-,uuid=" ROOT_UUID + +#include + +#endif /* __CONFIG_H */ -- cgit v1.2.3