Skip to content

Instantly share code, notes, and snippets.

@pelwell
pelwell / 0001-bcm43xx-Add-bcm43xx-3wire-variant.patch
Last active February 26, 2020 16:34
BlueZ patches for bcm43430 on RPi
From b4f2b77472aeb967d3a7595e8a965785c7a37c87 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 16 Feb 2016 16:40:46 +0000
Subject: [PATCH 1/4] bcm43xx: Add bcm43xx-3wire variant
---
tools/hciattach.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/hciattach.c b/tools/hciattach.c
#!/usr/bin/env python
# -*- coding: utf8 -*-
# MFRC522_test.py - Copyright 2017-2019, Phil Elwell, Raspberry Pi (Trading) Ltd.
import RPi.GPIO as GPIO
import spi
import signal
import time
@pelwell
pelwell / dmesg_4.19.1-v8+.txt
Created November 12, 2018 14:18
3B+ bootlog on 4.19.1-v8+
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 4.19.1-v8+ (phil@buildbot) (gcc version 5.2.1 20151005 (crosstool-NG crosstool-ng-1.22.0-115-g785dbce - aarch64-linux-gnueabi)) #884 SMP PREEMPT Mon Nov 12 13:57:17 GMT 2018
[ 0.000000] Machine model: Raspberry Pi 3 Model B Plus Rev 1.3
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 8 MiB at 0x000000003ac00000
[ 0.000000] On node 0 totalpages: 242688
[ 0.000000] DMA32 zone: 3792 pages used for memmap
[ 0.000000] DMA32 zone: 0 pages reserved
[ 0.000000] DMA32 zone: 242688 pages, LIFO batch:63
@pelwell
pelwell / 0001-gpio-poweroff-Allow-it-to-work-on-Raspberry-Pi.patch
Created June 25, 2015 11:23
Patch to support gpio-poweroff on the Pi
From ac6797373064264c76d839bfe8e9a3c68f828998 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Thu, 25 Jun 2015 12:16:11 +0100
Subject: [PATCH] gpio-poweroff: Allow it to work on Raspberry Pi
The Raspberry Pi firmware manages the power-down and reboot
process. To do this it installs a pm_power_off handler, causing
the gpio-poweroff module to abort the probe function.
This patch introduces a "force" DT property that overrides that
@pelwell
pelwell / ovmerge
Last active February 22, 2018 17:46
ovmerge utility
# ovmerge has been moved to a new repo - https://github.com/raspberrypi/utils
@pelwell
pelwell / 0001-bcm2835-sdhost-Reset-controller-DMA-on-timeout.patch
Created February 22, 2018 17:42
Potential patch to work around occasional SDHOST timeouts
From 84b0474a86349d36a943db70acdde4729f66478e Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Thu, 22 Feb 2018 17:18:32 +0000
Subject: [PATCH] bcm2835-sdhost: Reset controller & DMA on timeout
Under some circumstances the SDHOST controller has been observed to
lock up, leading to a timeout. When this happens, give the system a
chance of recovering by resetting the controller and terminating any
DMA transfer.
@pelwell
pelwell / 0001-bcm2710-Refactor-bcm2710.dtsi-using-bcm2837.dtsi.patch
Created October 20, 2017 21:08
[PATCH] bcm2710: Refactor bcm2710.dtsi using bcm2837.dtsi
From 51404dbec0204dffa1c22fbb3e17d10bd2510902 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Fri, 20 Oct 2017 21:53:45 +0100
Subject: [PATCH] bcm2710: Refactor bcm2710.dtsi using bcm2837.dtsi
The 4.14 tree includes bcm2837.dtsi - use it as a basis for
the downstream bcm2710.dtsi, which only contains a few tweaks.
See: https://github.com/raspberrypi/linux/issues/2235
From e954ab5ec7c507e8665764fd5ceb6699bc6f62e6 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Mon, 22 May 2017 13:56:41 +0100
Subject: [PATCH] clk: bcm2835: Minimise clock jitter for PCM clock
Fractional clock dividers generate accurate average frequencies but
with jitter, particularly when the integer divisor is small.
Introduce a new metric of clock accuracy to penalise clocks with a good
average but worse jitter compared to clocks with an average which is no
@pelwell
pelwell / 1. before.txt
Last active May 17, 2017 05:09
kernel log output extracted from @Noltari's kernel before and after removing device_tree_address=0x100
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.1.21-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #872 SMP Wed Apr 6 17:34:14 BST 2016
[ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: Raspberry Pi 3 Model B Rev 1.2
[ 0.000000] cma: Reserved 8 MiB at 0x3a800000
[ 0.000000] Memory policy: Data cache writealloc
From 4706ede91d7a57afd7b0be3bfbc40194e74f79e4 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Sat, 25 Feb 2017 12:41:10 +0000
Subject: [PATCH] SQUASH: Finish off the LOCO-V2 support
---
arch/arm/boot/dts/overlays/Makefile | 1 +
arch/arm/boot/dts/overlays/README | 19 +++++++++++++++++++
arch/arm/configs/bcm2709_defconfig | 1 +
arch/arm/configs/bcmrpi_defconfig | 1 +