summaryrefslogtreecommitdiffstats
path: root/external/meta-updater-raspberrypi/recipes-kernel
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-10-22 14:58:56 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-10-22 14:58:56 +0900
commit4204309872da5cb401cbb2729d9e2d4869a87f42 (patch)
treec7415e8600205e40ff7e91e8e5f4c411f30329f2 /external/meta-updater-raspberrypi/recipes-kernel
parent5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (diff)
Diffstat (limited to 'external/meta-updater-raspberrypi/recipes-kernel')
-rw-r--r--external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0001-Add-rpi4-uart0-dtb-overlay.patch59
-rw-r--r--external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi/audio.patch13
-rw-r--r--external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend11
3 files changed, 83 insertions, 0 deletions
diff --git a/external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0001-Add-rpi4-uart0-dtb-overlay.patch b/external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0001-Add-rpi4-uart0-dtb-overlay.patch
new file mode 100644
index 00000000..32731940
--- /dev/null
+++ b/external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0001-Add-rpi4-uart0-dtb-overlay.patch
@@ -0,0 +1,59 @@
+From cea75af3d1cc86ea8dec19cfe3c817b7c7869037 Mon Sep 17 00:00:00 2001
+From: lbonn <bonnans.l@gmail.com>
+Date: Fri, 13 Sep 2019 12:46:31 +0200
+Subject: [PATCH] Add rpi4 uart0 dtb overlay
+
+---
+ arch/arm/boot/dts/overlays/Makefile | 2 ++
+ .../boot/dts/overlays/uart0-rpi4-overlay.dts | 26 +++++++++++++++++++
+ 2 files changed, 28 insertions(+)
+ create mode 100644 arch/arm/boot/dts/overlays/uart0-rpi4-overlay.dts
+
+diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile
+index 6b4af500f51c..634a2f252b17 100644
+--- a/arch/arm/boot/dts/overlays/Makefile
++++ b/arch/arm/boot/dts/overlays/Makefile
+@@ -185,6 +185,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
+ w1-gpio-pullup.dtbo \
+ wittypi.dtbo
+
++dtbo-$(CONFIG_ARCH_BCM2835) += uart0-rpi4.dtbo
++
+ targets += dtbs dtbs_install
+ targets += $(dtbo-y)
+
+diff --git a/arch/arm/boot/dts/overlays/uart0-rpi4-overlay.dts b/arch/arm/boot/dts/overlays/uart0-rpi4-overlay.dts
+new file mode 100644
+index 000000000000..048ec5755f6a
+--- /dev/null
++++ b/arch/arm/boot/dts/overlays/uart0-rpi4-overlay.dts
+@@ -0,0 +1,26 @@
++/dts-v1/;
++/plugin/;
++
++/{
++ compatible = "brcm,bcm2835";
++
++ fragment@0 {
++ target = <&uart0>;
++ __overlay__ {
++ pinctrl-names = "default";
++ pinctrl-0 = <&uart0_pins>;
++ status = "okay";
++ };
++ };
++
++ fragment@1 {
++ target = <&gpio>;
++ __overlay__ {
++ uart0_pins: uart0_pins {
++ brcm,pins = <30 31 32 33>;
++ brcm,function = <7>;
++ brcm,pull = <2 0 0 2>;
++ };
++ };
++ };
++};
+--
+2.20.1
+
diff --git a/external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi/audio.patch b/external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi/audio.patch
new file mode 100644
index 00000000..cfa1b65a
--- /dev/null
+++ b/external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi/audio.patch
@@ -0,0 +1,13 @@
+diff --git a/arch/arm/boot/dts/bcm2708-rpi.dtsi b/arch/arm/boot/dts/bcm2708-rpi.dtsi
+index 6a82591c51d1..783b7306b861 100644
+--- a/arch/arm/boot/dts/bcm2708-rpi.dtsi
++++ b/arch/arm/boot/dts/bcm2708-rpi.dtsi
+@@ -65,7 +65,7 @@
+ audio: audio {
+ compatible = "brcm,bcm2835-audio";
+ brcm,pwm-channels = <8>;
+- status = "disabled";
++ status = "okay";
+ };
+
+ /* External sound card */
diff --git a/external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend b/external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
index e2e7e60b..1587fbe5 100644
--- a/external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
+++ b/external/meta-updater-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
@@ -1,5 +1,16 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
+# dtoverlays and dtparam definitions in rpi's config.txt are ignored when using
+# ostree integration. You will have to patch existing dts or add overlays in
+# your layer to achieve the same results.
+# As a common example, here is a patch to enable audio support.
+#
+# see README.md and https://github.com/advancedtelematic/meta-updater-raspberrypi/issues/23 for
+# more details
+SRC_URI_append = " ${@oe.utils.conditional('ENABLE_AUDIO', '1', 'file://audio.patch', '', d)}"
+
+SRC_URI_append_raspberrypi4 = " file://0001-Add-rpi4-uart0-dtb-overlay.patch"
+
do_configure_append_sota() {
# ramblk for inird
kernel_configure_variable BLK_DEV_RAM y