From 98f879fbe2d878e77bb8350ca21607f60e992913 Mon Sep 17 00:00:00 2001 From: Ronan Le Martret Date: Tue, 13 Mar 2018 17:15:54 +0100 Subject: Add kingficher support Change-Id: I75b9ced887249380a6164296b73acaaca91e3060 Signed-off-by: Ronan Le Martret --- meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf | 67 ++++++++++++++++++++++ templates/machine/h3ulcb/50_bblayers.conf.inc | 1 + .../machine/m3ulcb-nogfx/50_bblayers.conf.inc | 1 + templates/machine/m3ulcb/50_bblayers.conf.inc | 1 + 4 files changed, 70 insertions(+) create mode 100644 meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf b/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf new file mode 100644 index 000000000..3ad30f2c1 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf @@ -0,0 +1,67 @@ +# We have a conf and classes directory, append to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have a recipes directory, add to BBFILES +BBFILES += " \ + ${LAYERDIR}/../../../meta-rcar/meta-rcar-gen3-adas/recipes-*/*/*.bb \ + ${LAYERDIR}/../../../meta-rcar/meta-rcar-gen3-adas/recipes-*/*/*.bbappend \ +" + +BBFILE_COLLECTIONS += "rcar-gen3-cogent" +BBFILE_PATTERN_rcar-gen3-cogent := "^${LAYERDIR}/../../../meta-rcar/meta-rcar-gen3-adas/" +BBFILE_PRIORITY_rcar-gen3-cogent = "7" + +# Custom packages +IMAGE_INSTALL_append_rcar-gen3 = " \ + can-utils \ + libsocketcan \ + spidev-dbg spidev-test \ + e2fsprogs \ + e2fsprogs-tune2fs \ + ethtool \ + pciutils \ + usbutils \ + mtd-utils \ + capture \ + v4l2-fw \ + iperf3 \ + bonnie++ \ + lmbench \ + eglibc-utils \ + mm-init \ + iio-utils \ + most-tools \ +" + +# Radio packages +IMAGE_INSTALL_append_rcar-gen3 += " \ + si-tools \ + linux-firmware-wl18xx \ + wireless-tools \ + ti-bt \ + ti-bt-firmware \ + bluez5 \ + bluez5-testtools \ + ofono \ + ofono-tests \ +" + +# IMP +IMAGE_INSTALL_append_r8a7797 += " \ + kernel-module-uio-imp \ + kernel-module-cmemdrv \ + udev-rules-cvlib \ +" + +IMAGE_INSTALL_append_r8a7798 += " \ + kernel-module-uio-imp \ + kernel-module-cmemdrv \ + udev-rules-cvlib \ +" + +DISTRO_FEATURES_append = " surroundview " +DISTRO_FEATURES_append = " bluetooth" + + +BBMASK += "/meta-rcar-gen3-adas/recipes-core/systemd/" + diff --git a/templates/machine/h3ulcb/50_bblayers.conf.inc b/templates/machine/h3ulcb/50_bblayers.conf.inc index b58989c6f..ad672c999 100644 --- a/templates/machine/h3ulcb/50_bblayers.conf.inc +++ b/templates/machine/h3ulcb/50_bblayers.conf.inc @@ -1,3 +1,4 @@ BBLAYERS =+ "\ ${METADIR}/meta-renesas-rcar-gen3/meta-rcar-gen3 \ + ${METADIR}/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas \ " diff --git a/templates/machine/m3ulcb-nogfx/50_bblayers.conf.inc b/templates/machine/m3ulcb-nogfx/50_bblayers.conf.inc index b58989c6f..ad672c999 100644 --- a/templates/machine/m3ulcb-nogfx/50_bblayers.conf.inc +++ b/templates/machine/m3ulcb-nogfx/50_bblayers.conf.inc @@ -1,3 +1,4 @@ BBLAYERS =+ "\ ${METADIR}/meta-renesas-rcar-gen3/meta-rcar-gen3 \ + ${METADIR}/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas \ " diff --git a/templates/machine/m3ulcb/50_bblayers.conf.inc b/templates/machine/m3ulcb/50_bblayers.conf.inc index b58989c6f..ad672c999 100644 --- a/templates/machine/m3ulcb/50_bblayers.conf.inc +++ b/templates/machine/m3ulcb/50_bblayers.conf.inc @@ -1,3 +1,4 @@ BBLAYERS =+ "\ ${METADIR}/meta-renesas-rcar-gen3/meta-rcar-gen3 \ + ${METADIR}/meta-agl/meta-agl-bsp/meta-rcar-gen3-adas \ " -- cgit 1.2.3-korg From 153d222369afe315350a33571244569f2ce4c75a Mon Sep 17 00:00:00 2001 From: Ronan Le Martret Date: Wed, 14 Mar 2018 17:11:24 +0100 Subject: Update BBMASK for ulcb board * We don't need to black list rcar BSP recipes any more. Change-Id: If7081b8cfa2ae936f6ed9f957054fd57a45cc968 Signed-off-by: Ronan Le Martret --- meta-agl-bsp/conf/include/agl_h3ulcb.inc | 4 ---- meta-agl-bsp/conf/include/agl_m3ulcb-nogfx.inc | 5 ++--- meta-agl-bsp/conf/include/agl_m3ulcb.inc | 2 -- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/meta-agl-bsp/conf/include/agl_h3ulcb.inc b/meta-agl-bsp/conf/include/agl_h3ulcb.inc index e2ebd85c6..93ef834ba 100644 --- a/meta-agl-bsp/conf/include/agl_h3ulcb.inc +++ b/meta-agl-bsp/conf/include/agl_h3ulcb.inc @@ -21,13 +21,9 @@ PREFERRED_RPROVIDER_libgbm-dev = "libgbm" PREFERRED_RPROVIDER_libomxil = "omx-user-module" -# Mask the gstreamer recipe for MMP -BBMASK = "meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" - # Add for gstreamer plugins ugly LICENSE_FLAGS_WHITELIST = "commercial" - MACHINE_FEATURES_append = " multimedia" DISTRO_FEATURES_append = " use_eva_pkg" diff --git a/meta-agl-bsp/conf/include/agl_m3ulcb-nogfx.inc b/meta-agl-bsp/conf/include/agl_m3ulcb-nogfx.inc index 726d233b6..c0ebb5f65 100644 --- a/meta-agl-bsp/conf/include/agl_m3ulcb-nogfx.inc +++ b/meta-agl-bsp/conf/include/agl_m3ulcb-nogfx.inc @@ -1,11 +1,10 @@ SOC_FAMILY = "r8a7796" # Mask graphic Pkgs -BBMASK = "gles-user-module|kernel-module-gles|wayland-kms|libgbm" +BBMASK += "gles-user-module|kernel-module-gles|wayland-kms|libgbm" # Mask MMP recipes -BBMASK .= "|kernel-module-uvcs-drv|omx-user-module" +BBMASK += "kernel-module-uvcs-drv|omx-user-module" -BBMASK .= "|meta-renesas-rcar-gen3/meta-rcar-gen3/recipes-forward-port/" DISTRO_FEATURES_append = " sota" OSTREE_KERNEL = "Image" diff --git a/meta-agl-bsp/conf/include/agl_m3ulcb.inc b/meta-agl-bsp/conf/include/agl_m3ulcb.inc index cce7dbd5e..788732495 100644 --- a/meta-agl-bsp/conf/include/agl_m3ulcb.inc +++ b/meta-agl-bsp/conf/include/agl_m3ulcb.inc @@ -21,8 +21,6 @@ PREFERRED_RPROVIDER_libgbm-dev = "libgbm" PREFERRED_RPROVIDER_libomxil = "omx-user-module" -# Mask the gstreamer recipe for MMP -BBMASK = "meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer" # Add for gstreamer plugins ugly LICENSE_FLAGS_WHITELIST = "commercial" -- cgit 1.2.3-korg From 12f88944fb6974b059e41e9a7d8078b10bfb20be Mon Sep 17 00:00:00 2001 From: Ronan Le Martret Date: Thu, 15 Mar 2018 16:09:20 +0100 Subject: Preserve HDMI naming for kingficher board Change-Id: Id1b6b88e606d0a102eefbdb9c8deae2dfe0cf73b Signed-off-by: Ronan Le Martret Signed-off-by: Harunobu Kurokawa --- meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf | 2 + ...enesas-preserve-drm-HDMI-connector-naming.patch | 84 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-renesas_%.bbappend | 5 ++ 3 files changed, 91 insertions(+) create mode 100644 meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-arm64-dts-renesas-preserve-drm-HDMI-connector-naming.patch create mode 100644 meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_%.bbappend diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf b/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf index 3ad30f2c1..1376715ea 100644 --- a/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf +++ b/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf @@ -5,6 +5,8 @@ BBPATH .= ":${LAYERDIR}" BBFILES += " \ ${LAYERDIR}/../../../meta-rcar/meta-rcar-gen3-adas/recipes-*/*/*.bb \ ${LAYERDIR}/../../../meta-rcar/meta-rcar-gen3-adas/recipes-*/*/*.bbappend \ + ${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend \ " BBFILE_COLLECTIONS += "rcar-gen3-cogent" diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-arm64-dts-renesas-preserve-drm-HDMI-connector-naming.patch b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-arm64-dts-renesas-preserve-drm-HDMI-connector-naming.patch new file mode 100644 index 000000000..64c9542a3 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-arm64-dts-renesas-preserve-drm-HDMI-connector-naming.patch @@ -0,0 +1,84 @@ +From ce9a7a41a9f65cc8cc129cdd27e155b35b26d393 Mon Sep 17 00:00:00 2001 +From: Matt Porter +Date: Wed, 13 Dec 2017 12:49:20 -0500 +Subject: [PATCH] arm64: dts: renesas: preserve drm HDMI connector naming on KF + +Kingfisher adds encoders on ports 0 and 2 of the R-Car +display unit. The bare ULCB SK has only an HDMI encoder +in use on port 1. When the system is booted with an SK +dtb, port 1's HDMI encoder is assigned as HDMI-A-1 because +it is the first (and only) encoder present. When booting +a KF dtb, port 0's HDMI encoder preceeds port1 in the dtb due +to incremental ordering of the endpoint port nodes. This causes +the KF HDMI to be assigned HDMI-A-1 and the SK HDMI to be assigned +as HDMI-A-2. In order to preserve the SK's HDMI output naming as +connector HDMI-A-1, reorder the endpoint port nodes so that port1 +is first. + +Change-Id: Ibbb1975c2383a526a54c257fb7d68d32a042d468 +Signed-off-by: Matt Porter +Signed-off-by: Ronan Le Martret +--- + arch/arm64/boot/dts/renesas/r8a7795.dtsi | 10 +++++----- + arch/arm64/boot/dts/renesas/r8a7796.dtsi | 10 +++++----- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi +index f7f947d27b0d..5bcc2391587d 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi +@@ -3054,11 +3054,6 @@ + #address-cells = <1>; + #size-cells = <0>; + +- port@0 { +- reg = <0>; +- du_out_rgb: endpoint { +- }; +- }; + port@1 { + reg = <1>; + du_out_hdmi0: endpoint { +@@ -3076,6 +3071,11 @@ + du_out_lvds0: endpoint { + }; + }; ++ port@0 { ++ reg = <0>; ++ du_out_rgb: endpoint { ++ }; ++ }; + }; + }; + +diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi +index df26656e0f19..154ac1dd91fa 100644 +--- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi +@@ -2846,11 +2846,6 @@ + #address-cells = <1>; + #size-cells = <0>; + +- port@0 { +- reg = <0>; +- du_out_rgb: endpoint { +- }; +- }; + port@1 { + reg = <1>; + du_out_hdmi0: endpoint { +@@ -2862,6 +2857,11 @@ + du_out_lvds0: endpoint { + }; + }; ++ port@0 { ++ reg = <0>; ++ du_out_rgb: endpoint { ++ }; ++ }; + }; + }; + +-- +2.11.0 + diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_%.bbappend b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_%.bbappend new file mode 100644 index 000000000..bd4132db9 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_%.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append = " \ + file://0001-arm64-dts-renesas-preserve-drm-HDMI-connector-naming.patch \ +" -- cgit 1.2.3-korg From 1920a554b718a05806485e65f7645f5711628fa3 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Wed, 13 Dec 2017 10:55:51 -0500 Subject: ti-bt: add a systemd unit and enable We need to provide a systemd unit for UIM to be started at boot. We also do not want the blacklist that Cogent has created, so delete that. Bug-AGL: SPEC-1175 Change-Id: Ia35a6007722d4e42a7a76fe9d8d26b90b073f73b Signed-off-by: Matt Porter Signed-off-by: Tom Rini Signed-off-by: Harunobu Kurokawa --- .../recipes-bsp/ti-bt/ti-bt/ti-uim.service | 10 ++++++++++ .../recipes-bsp/ti-bt/ti-bt_%.bbappend | 15 +++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt/ti-uim.service create mode 100644 meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt_%.bbappend diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt/ti-uim.service b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt/ti-uim.service new file mode 100644 index 000000000..214e60707 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt/ti-uim.service @@ -0,0 +1,10 @@ +[Unit] +Description=User Mode Init Manager for TI shared transport +Before=bluetooth.service + +[Service] +ExecStartPre=-/sbin/modprobe -q btwilink +ExecStart=/usr/bin/uim -f /sys/devices/platform/kim + +[Install] +WantedBy=multi-user.target diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt_%.bbappend b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt_%.bbappend new file mode 100644 index 000000000..45138b618 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt_%.bbappend @@ -0,0 +1,15 @@ +inherit systemd + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://ti-uim.service" + +SYSTEMD_SERVICE_${PN} = "ti-uim.service" + +do_install_append() { + # We do not want the blacklist + rm -f ${D}/${sysconfdir}/modprobe.d/ti_bt.conf + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/ti-uim.service ${D}${systemd_unitdir}/system +} -- cgit 1.2.3-korg From 0946966f6027cd3ff605fdbaf3ba7072e8e48339 Mon Sep 17 00:00:00 2001 From: Harunobu Kurokawa Date: Tue, 20 Mar 2018 14:33:31 +0900 Subject: [AGL] ulcb: Disable build-in most driver Kingfisher has MedlaLB Interface for most, kernel tree has most driver as build-in driver. So these configs is enabled. Howemver AGL use most driver in gerrit repository. So AGL should be disable it. Change-Id: Ia46500d58fc16f348a098c58f5e807cf37913e5e Signed-off-by: Harunobu Kurokawa --- .../recipes-kernel/linux/linux-renesas/disable_most.cfg | 9 +++++++++ .../recipes-kernel/linux/linux-renesas_%.bbappend | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/disable_most.cfg diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/disable_most.cfg b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/disable_most.cfg new file mode 100644 index 000000000..4179e25c2 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/disable_most.cfg @@ -0,0 +1,9 @@ +# CONFIG_STAGING is not set +# CONFIG_MOST is not set +# CONFIG_MOSTCORE is not set +# CONFIG_AIM_CDEV is not set +# CONFIG_AIM_NETWORK is not set +# CONFIG_AIM_SOUND is not set +# CONFIG_AIM_V4L2 is not set +# CONFIG_HDM_DIM2 is not set + diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_%.bbappend b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_%.bbappend index bd4132db9..cff07c18a 100644 --- a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_%.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_%.bbappend @@ -1,5 +1,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI_append = " \ +SRC_URI_append_ulcb = " \ file://0001-arm64-dts-renesas-preserve-drm-HDMI-connector-naming.patch \ + file://disable_most.cfg \ " -- cgit 1.2.3-korg From 0e0c4449c2415979b5e017250fea257b02d434bf Mon Sep 17 00:00:00 2001 From: Harunobu Kurokawa Date: Tue, 20 Mar 2018 18:43:30 +0900 Subject: si-tools: FM configuration improvements This commit is removed from meta-renesas-rcar-gen3 ==== commit a5dfadaa3931977a221e0508354e9ab97482b9ab Author: Scott Murray Date: Thu Dec 21 20:46:30 2017 -0500 ==== Some changes to allow integration with the AGL radio binding and improve FM configuration with some tweaks and additional configuration options. 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. Change-Id: I5d8c95947489b83384babb50285b76d3de45214a Signed-off-by: Scott Murray Signed-off-by: Harunobu Kurokawa --- .../si-tools/files/si-tools-fm-improvements.patch | 184 +++++++++++++++++++++ .../recipes-bsp/si-tools/si-tools.bbappend | 8 + 2 files changed, 192 insertions(+) create mode 100644 meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/files/si-tools-fm-improvements.patch create mode 100644 meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-tools.bbappend diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/files/si-tools-fm-improvements.patch b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/files/si-tools-fm-improvements.patch new file mode 100644 index 000000000..9bbccadd3 --- /dev/null +++ b/meta-agl-bsp/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 + +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-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-tools.bbappend b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-tools.bbappend new file mode 100644 index 000000000..7a4593144 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-tools.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS_append := ":${THISDIR}/files" + +SRC_URI += " \ + file://si-tools-fm-improvements.patch \ +" + +EXTRA_OEMAKE_append = " 'LDFLAGS=${LDFLAGS}'" + -- cgit 1.2.3-korg From a9e1f1a2581002c30b353105e254705a8da598bc Mon Sep 17 00:00:00 2001 From: Harunobu Kurokawa Date: Tue, 20 Mar 2018 19:14:27 +0900 Subject: remove unused opencv folder Change-Id: I115096811662403f34846f434fbc7772024c1634 Signed-off-by: Harunobu Kurokawa --- meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf b/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf index 1376715ea..1d2acf663 100644 --- a/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf +++ b/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf @@ -66,4 +66,5 @@ DISTRO_FEATURES_append = " bluetooth" BBMASK += "/meta-rcar-gen3-adas/recipes-core/systemd/" +BBMASK += "/meta-rcar-gen3-adas/recipes-graphics/opencv/" -- cgit 1.2.3-korg