summaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3-adas/recipes-bsp
diff options
context:
space:
mode:
Diffstat (limited to 'meta-rcar-gen3-adas/recipes-bsp')
-rw-r--r--meta-rcar-gen3-adas/recipes-bsp/linux-firmware/linux-firmware_git.bbappend15
-rw-r--r--meta-rcar-gen3-adas/recipes-bsp/si-tools/files/si-tools-fm-improvements.patch184
-rw-r--r--meta-rcar-gen3-adas/recipes-bsp/si-tools/si-tools.bb3
-rw-r--r--meta-rcar-gen3-adas/recipes-bsp/ti-bt-firmware/ti-bt-firmware_git.bb25
-rw-r--r--meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0016-tools-fix-build-fail.patch29
-rw-r--r--meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot_2015.04.bbappend4
-rw-r--r--meta-rcar-gen3-adas/recipes-bsp/utest-apps/files/0001-utest-utest-common.c-Check-return-value-of-write.patch44
-rw-r--r--meta-rcar-gen3-adas/recipes-bsp/utest-apps/utest-cam-imr-drm.bb1
8 files changed, 235 insertions, 70 deletions
diff --git a/meta-rcar-gen3-adas/recipes-bsp/linux-firmware/linux-firmware_git.bbappend b/meta-rcar-gen3-adas/recipes-bsp/linux-firmware/linux-firmware_git.bbappend
deleted file mode 100644
index fdee4b0..0000000
--- a/meta-rcar-gen3-adas/recipes-bsp/linux-firmware/linux-firmware_git.bbappend
+++ /dev/null
@@ -1,15 +0,0 @@
-LICENSE_${PN}-rtl8188eu = "Firmware-rtlwifi_firmware"
-
-FILES_${PN}-rtl8188eu = " \
- /lib/firmware/rtlwifi/rtl8188eufw*.bin \
-"
-
-RDEPENDS_${PN}-rtl8188eu += "${PN}-rtl-license"
-
-PACKAGES =+ " ${PN}-rtl8188eu"
-
-FILES_${PN}-ath9k += " \
- /lib/firmware/ath9k_htc/htc*.fw \
-"
-
-
diff --git a/meta-rcar-gen3-adas/recipes-bsp/si-tools/files/si-tools-fm-improvements.patch b/meta-rcar-gen3-adas/recipes-bsp/si-tools/files/si-tools-fm-improvements.patch
new file mode 100644
index 0000000..9bbccad
--- /dev/null
+++ b/meta-rcar-gen3-adas/recipes-bsp/si-tools/files/si-tools-fm-improvements.patch
@@ -0,0 +1,184 @@
+FM configuration improvements
+
+Changes include:
+- Add command-line option for selecting FM band plan. The default
+ band plan is US / Canada.
+- Add command-line options for setting FM scanning valid SNR and RSSI
+ thresholds to allow tweaking sensitivity in poor radio environments.
+- Increased seeking scan timeout to 3 seconds, which seems to improve
+ behavior in poor radio environments where powerful stations may be
+ far apart.
+- Removed explicit setting of FM_SOFTMUTE_SNR_LIMITS, as it seemed
+ like it might be resulting in odd muting behavior when scanning.
+- Changed initial FM frequency if not specified to the minimum of the
+ band plan.
+
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+
+diff --git a/si46xx.h b/si46xx.h
+index 172ea8b..c32fca4 100644
+--- a/si46xx.h
++++ b/si46xx.h
+@@ -83,6 +83,7 @@
+ #define SI46XX_PIN_CONFIG_ENABLE 0x0800
+ #define SI46XX_FM_SEEK_BAND_BOTTOM 0x3100
+ #define SI46XX_FM_SEEK_BAND_TOP 0x3101
++#define SI46XX_FM_SEEK_FREQUENCY_SPACING 0x3102
+ #define SI46XX_FM_VALID_MAX_TUNE_ERROR 0x3200
+ #define SI46XX_FM_VALID_RSSI_TIME 0x3201
+ #define SI46XX_FM_VALID_RSSI_THRESHOLD 0x3202
+@@ -150,7 +151,7 @@
+ #define MAX_SERVICES 32
+ #define MAX_COMPONENTS 15
+
+-#define TIMEOUT_SEEK 2000 /* mS = 2S */
++#define TIMEOUT_SEEK 3000 /* mS = 3S */
+ #define TIMEOUT_TUNE 500 /* mS = .5S */
+
+ struct dab_service_t{
+diff --git a/si_ctl.c b/si_ctl.c
+index 59dfaf2..f168218 100644
+--- a/si_ctl.c
++++ b/si_ctl.c
+@@ -101,6 +101,26 @@ uint32_t frequency_list_ch[] = { CHAN_12A,
+ CHAN_9D,
+ CHAN_8B};
+
++// Structure to describe FM band plans, all values in Hz.
++typedef struct {
++ char *name;
++ uint32_t min;
++ uint32_t max;
++ uint32_t step;
++} fm_band_plan_t;
++
++static fm_band_plan_t known_fm_band_plans[5] = {
++ { .name = "US", .min = 87900000, .max = 107900000, .step = 200000 },
++ { .name = "JP", .min = 76000000, .max = 95000000, .step = 100000 },
++ { .name = "EU", .min = 87500000, .max = 108000000, .step = 50000 },
++ { .name = "ITU-1", .min = 87500000, .max = 108000000, .step = 50000 },
++ { .name = "ITU-2", .min = 87900000, .max = 107900000, .step = 50000 }
++};
++
++static unsigned int fm_band_plan;
++static int fm_snr_threshold = 128;
++static int fm_rssi_threshold = 128;
++
+ int init_am(int offset)
+ {
+ int ret;
+@@ -160,12 +180,32 @@ int init_fm(int offset)
+ * enable I2S output
+ */
+ si46xx_set_property(SI46XX_PIN_CONFIG_ENABLE, 0x0003);
+- //si46xx_set_property(SI46XX_FM_VALID_RSSI_THRESHOLD,0x0000);
+- //si46xx_set_property(SI46XX_FM_VALID_SNR_THRESHOLD,0x0000);
+- si46xx_set_property(SI46XX_FM_SOFTMUTE_SNR_LIMITS, 0x0000); // set the SNR limits for soft mute attenuation
++ //si46xx_set_property(SI46XX_FM_SOFTMUTE_SNR_LIMITS, 0x0000); // set the SNR limits for soft mute attenuation
+ si46xx_set_property(SI46XX_FM_TUNE_FE_CFG, 0x0000); // front end switch open
+- si46xx_set_property(SI46XX_FM_SEEK_BAND_BOTTOM, 88000 / 10);
+- si46xx_set_property(SI46XX_FM_SEEK_BAND_TOP, 108000 / 10);
++
++ //si46xx_set_property(SI46XX_FM_SEEK_BAND_BOTTOM, 88000 / 10);
++ //si46xx_set_property(SI46XX_FM_SEEK_BAND_TOP, 108000 / 10);
++ if (verbose)
++ fprintf(stderr, "Using FM Bandplan: %s\n", known_fm_band_plans[fm_band_plan].name);
++ si46xx_set_property(SI46XX_FM_SEEK_BAND_BOTTOM, known_fm_band_plans[fm_band_plan].min / 10000);
++ si46xx_set_property(SI46XX_FM_SEEK_BAND_TOP, known_fm_band_plans[fm_band_plan].max / 10000);
++ if (verbose)
++ fprintf(stderr, "Using FM band: %d - %d, %d spacing\n",
++ known_fm_band_plans[fm_band_plan].min / 10000,
++ known_fm_band_plans[fm_band_plan].max / 10000,
++ known_fm_band_plans[fm_band_plan].step / 10000);
++ si46xx_set_property(SI46XX_FM_SEEK_FREQUENCY_SPACING, known_fm_band_plans[fm_band_plan].step / 10000);
++ if (fm_snr_threshold != 128) {
++ if (verbose)
++ fprintf(stderr, "Setting FM valid SNR threshold to %d dB\n", fm_snr_threshold);
++ si46xx_set_property(SI46XX_FM_VALID_SNR_THRESHOLD, fm_snr_threshold);
++ }
++ if (fm_rssi_threshold != 128) {
++ if (verbose)
++ fprintf(stderr, "Setting FM valid RSSI threshold to %d dB\n", fm_rssi_threshold);
++ si46xx_set_property(SI46XX_FM_VALID_RSSI_THRESHOLD, fm_rssi_threshold);
++ }
++
+ /*
+ * rate
+ */
+@@ -190,6 +230,7 @@ int init_fm(int offset)
+
+ return 0;
+ }
++
+ int init_dab(int offset)
+ {
+ int ret;
+@@ -245,6 +286,10 @@ int output_help(char *prog_name)
+ printf(" -l up|down FM/AM seek next station\n");
+ printf(" -d FM/AM RSQ status\n");
+ printf(" -m FM rds status\n");
++ printf("Common FM:\n");
++ printf(" -p bandplan FM bandplan (us, jp, eu, itu-1, itu-2\n");
++ printf(" -t SNR FM scan valid SNR threshold (-127 to 127 dB)\n");
++ printf(" -u RSSI FM scan valid RSSI threshold (-127 to 127 dBuV)\n");
+ printf("DAB only:\n");
+ printf(" -e dab status\n");
+ printf(" -f service start service of dab service list\n");
+@@ -354,6 +399,7 @@ int main(int argc, char **argv)
+ int offset = - 1;
+ int mode;
+ int tmp;
++ unsigned int i;
+ struct dab_digrad_status_t dab_digrad_status;
+ bool init = false;
+ bool seek_up = false;
+@@ -374,7 +420,7 @@ int main(int argc, char **argv)
+
+ optind = 0;
+ while (optind < argc) {
+- if ((c = getopt(argc, argv, "a:b:c:def:ghi:j:k:l:mnosv")) != -1) {
++ if ((c = getopt(argc, argv, "a:b:c:def:ghi:j:k:l:mnop:st:u:v")) != -1) {
+ switch(c){
+ /* init */
+ case 'a':
+@@ -422,6 +468,31 @@ int main(int argc, char **argv)
+ case 'c':
+ frequency = atoi(optarg);
+ break;
++ /* FM */
++ case 'p':
++ for(i = 0;
++ i < sizeof(known_fm_band_plans) / sizeof(fm_band_plan_t);
++ i++) {
++ if(!strcasecmp(optarg, known_fm_band_plans[i].name)) {
++ fm_band_plan = i;
++ break;
++ }
++ }
++ if(i >= (sizeof(known_fm_band_plans) / sizeof(fm_band_plan_t))) {
++ printf("Invalid mode: %s\n", optarg);
++ return -EINVAL;
++ }
++ break;
++ case 't':
++ fm_snr_threshold = atoi(optarg);
++ if(fm_snr_threshold < -128 || fm_snr_threshold > 127)
++ fm_snr_threshold = 128; // use firmware default
++ break;
++ case 'u':
++ fm_rssi_threshold = atoi(optarg);
++ if(fm_rssi_threshold < -128 || fm_rssi_threshold > 127)
++ fm_rssi_threshold = 128; // use firmware default
++ break;
+ /* DAB stuff. TODO: rework */
+ case 'e':
+ si46xx_dab_digrad_status(&dab_digrad_status);
+@@ -473,7 +544,7 @@ int main(int argc, char **argv)
+ case SI46XX_MODE_FM:
+ ret = init_fm(offset);
+ if (frequency < 0)
+- frequency = 105500;
++ frequency = known_fm_band_plans[fm_band_plan].min / 1000;
+ break;
+ case SI46XX_MODE_AM:
+ ret = init_am(offset);
diff --git a/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-tools.bb b/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-tools.bb
index 5db9408..634000a 100644
--- a/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-tools.bb
+++ b/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-tools.bb
@@ -8,10 +8,13 @@ PV = "0.2"
SRC_URI = " \
file://si-tools.tar.gz \
+ file://si-tools-fm-improvements.patch \
"
S = "${WORKDIR}/si-tools"
+EXTRA_OEMAKE_append = " 'LDFLAGS=${LDFLAGS}'"
+
do_install() {
install -d ${D}${bindir}
install -d ${D}/lib/firmware/radio/
diff --git a/meta-rcar-gen3-adas/recipes-bsp/ti-bt-firmware/ti-bt-firmware_git.bb b/meta-rcar-gen3-adas/recipes-bsp/ti-bt-firmware/ti-bt-firmware_git.bb
deleted file mode 100644
index 3251662..0000000
--- a/meta-rcar-gen3-adas/recipes-bsp/ti-bt-firmware/ti-bt-firmware_git.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Bluetooth firmare files for WL18xx combo modules"
-SECTION = "misc"
-
-LICENSE = "CLOSED"
-
-PE = "1"
-PV = "0.0"
-
-SRC_URI = "git://github.com/TI-ECS/bt-firmware.git;protocol=git "
-SRCREV = "169b2df5b968f0ede32ea9044859942fc220c435"
-
-S = "${WORKDIR}/git"
-
-CLEANBROKEN = "1"
-
-do_populate_lic[noexec] = "1"
-do_compile[noexec] = "1"
-do_configure[noexec] = "1"
-
-do_install() {
- install -d ${D}/lib/firmware/ti-connectivity/
- cp *.bts ${D}/lib/firmware/ti-connectivity/
-}
-
-FILES_${PN} = "/lib/firmware/ti-connectivity/*" \ No newline at end of file
diff --git a/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0016-tools-fix-build-fail.patch b/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0016-tools-fix-build-fail.patch
deleted file mode 100644
index ab66851..0000000
--- a/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot/0016-tools-fix-build-fail.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 34b8d92c5139b37322548cc41c5c3a788c51d3ad Mon Sep 17 00:00:00 2001
-From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
-Date: Tue, 2 May 2017 12:55:23 +0300
-Subject: [PATCH] tools: fix build fail
-
-Build fail fix for CONFIG_ENV_IS_IN_SPI_FLASH
-
-Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
----
- tools/Makefile | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tools/Makefile b/tools/Makefile
-index 4bbb153..12719ac 100644
---- a/tools/Makefile
-+++ b/tools/Makefile
-@@ -211,7 +211,8 @@ HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \
- -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \
- -DUSE_HOSTCC \
- -D__KERNEL_STRICT_NAMES \
-- -D_GNU_SOURCE
-+ -D_GNU_SOURCE \
-+ -include $(srctree)/include/generated/autoconf.h
-
- __build: $(LOGO-y)
-
---
-1.9.1
-
diff --git a/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot_2015.04.bbappend b/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot_2015.04.bbappend
index 8171d10..044c598 100644
--- a/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot_2015.04.bbappend
+++ b/meta-rcar-gen3-adas/recipes-bsp/u-boot/u-boot_2015.04.bbappend
@@ -1,5 +1,8 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+BRANCH = "v2015.04/rcar-3.5.9"
+SRCREV = "24add58d915191d901915a6a8cc44faa748fcaa2"
+
SRC_URI_append = " \
file://0001-net-phy-support-fixed-PHY.patch \
${@bb.utils.contains('MACHINE_FEATURES', 'h3ulcb-had', ' file://0002-net-ravb-remove-APSR-quirk.patch', '', d)} \
@@ -15,7 +18,6 @@ SRC_URI_append = " \
file://0013-mtd-spi-QSPI-flash-support.patch \
file://0014-arm-renesas-Add-Renesas-R8A7797-SoC-support.patch \
file://0015-board-renesas-Add-V3M-Eagle-board.patch \
- file://0016-tools-fix-build-fail.patch \
file://0017-board-renesas-Add-V3MSK-board.patch \
file://0021-ARM-rcar_gen3-Add-RPC-flash-definitions.patch \
file://0022-mtd-Add-RPC-HyperFlash-support.patch \
diff --git a/meta-rcar-gen3-adas/recipes-bsp/utest-apps/files/0001-utest-utest-common.c-Check-return-value-of-write.patch b/meta-rcar-gen3-adas/recipes-bsp/utest-apps/files/0001-utest-utest-common.c-Check-return-value-of-write.patch
new file mode 100644
index 0000000..80cf032
--- /dev/null
+++ b/meta-rcar-gen3-adas/recipes-bsp/utest-apps/files/0001-utest-utest-common.c-Check-return-value-of-write.patch
@@ -0,0 +1,44 @@
+From 1fd2e6ce6a443d20e6a103261860816fa5600591 Mon Sep 17 00:00:00 2001
+From: Tom Rini <trini@konsulko.com>
+Date: Wed, 20 Dec 2017 09:58:47 -0500
+Subject: [PATCH 1/1] utest/utest-common.c: Check return value of write()
+
+Signed-off-by: Tom Rini <trini@konsulko.com>
+---
+ utest/utest-common.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/utest/utest-common.c b/utest/utest-common.c
+index 38bd4714bccc..922b4bdc40a9 100644
+--- a/utest/utest-common.c
++++ b/utest/utest-common.c
+@@ -66,7 +66,7 @@ int intern_trace(const char *format, ...)
+ struct timespec ts;
+ static char buffer[4096];
+ char *p = buffer;
+- int n = sizeof(buffer), k;
++ int n = sizeof(buffer), k, ret;
+
+ /* ...retrieve value of monotonic clock */
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+@@ -88,12 +88,15 @@ int intern_trace(const char *format, ...)
+ /* ...output string terminator */
+ (n > 0 ? *p++ = '\n' : 0);
+
+- write(intern_trace_fd, buffer, p - buffer);
++ ret = write(intern_trace_fd, buffer, p - buffer);
+
+ /* ...release tracing lock */
+ pthread_mutex_unlock(&intern_trace_mutex);
+
+- return 0;
++ if (ret != -1)
++ return 0;
++ else
++ return -1;
+ }
+
+ /* ...tracing facility initialization */
+--
+2.7.4
+
diff --git a/meta-rcar-gen3-adas/recipes-bsp/utest-apps/utest-cam-imr-drm.bb b/meta-rcar-gen3-adas/recipes-bsp/utest-apps/utest-cam-imr-drm.bb
index 48747ea..4c6be5b 100644
--- a/meta-rcar-gen3-adas/recipes-bsp/utest-apps/utest-cam-imr-drm.bb
+++ b/meta-rcar-gen3-adas/recipes-bsp/utest-apps/utest-cam-imr-drm.bb
@@ -7,6 +7,7 @@ S = "${WORKDIR}/utest-cam-imr-drm"
SRC_URI = " \
file://utest-cam-imr-drm.tar.gz \
+ file://0001-utest-utest-common.c-Check-return-value-of-write.patch \
"
DEPENDS = " \