Skip to content

Instantly share code, notes, and snippets.

View notro's full-sized avatar

Noralf Trønnes notro

View GitHub Profile
@notro
notro / boot.messages.usb.snippets
Last active December 26, 2015 01:19
Tried to add USB with Device Tree. Didn't work. Memory region and IRQ is the same as with non-DT.
Boot messages using Device Tree
===============================
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Linux version 3.10.12+ (pi@raspi1) (gcc version 4.7.1 20120402 (prerelease) (crosstool-NG 1.15.2) ) #86 Sun Oct 20 14:22:03 CEST 2013
[ 0.000000] Machine: BCM2708, model: v31 Raspberry Pi Model B
U-Boot 2013.10-16185-g3285d4c (Nov 07 2013 - 18:44:35)
DRAM: 448 MiB
WARNING: Caches not enabled
MMC: bcm2835_sdhci: 0
Using default environment
In: serial
Out: lcd
@notro
notro / fbtft-bus.s
Created March 3, 2014 15:09
Result of: ARCH=arm CROSS_COMPILE=/home/pi/tools/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi- make drivers/video/fbtft/fbtft-bus.s
.arch armv6
.fpu softvfp
.eabi_attribute 20, 1 @ Tag_ABI_FP_denormal
.eabi_attribute 21, 1 @ Tag_ABI_FP_exceptions
.eabi_attribute 23, 3 @ Tag_ABI_FP_number_model
.eabi_attribute 24, 1 @ Tag_ABI_align8_needed
.eabi_attribute 25, 1 @ Tag_ABI_align8_preserved
.eabi_attribute 26, 2 @ Tag_ABI_enum_size
.eabi_attribute 30, 2 @ Tag_ABI_optimization_goals
.eabi_attribute 34, 1 @ Tag_CPU_unaligned_access
@notro
notro / gist:11066457
Created April 18, 2014 22:04
rvm install 1.9.3
$ rvm uninstall 1.9.3
$ rvm install 1.9.3
Searching for binary rubies, this might take some time.
No binary rubies available for: debian/6/x86_64/ruby-1.9.3-p545.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Installing Ruby from source to: /home/1/t/tronnes/.rvm/rubies/ruby-1.9.3-p545, this may take a while depending on your cpu(s)...
ruby-1.9.3-p545 - #downloading ruby-1.9.3-p545, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9802k 100 9802k 0 0 7332k 0 0:00:01 0:00:01 --:--:-- 14.9M
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 802720e..115cb21 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -43,6 +43,8 @@ dtb-$(CONFIG_ARCH_AT91) += sama5d35ek.dtb
dtb-$(CONFIG_ARCH_ATLAS6) += atlas6-evb.dtb
+dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b.dtb
+dtb-$(CONFIG_BCM2708_DT) += bcm2708-rpi-b-test.dtb
@notro
notro / gist:9829e3ecea3da1d91d5e
Created June 10, 2014 22:18
bootlog: Experimental Device Tree support using raspberrypi/linux and bcmrpi_defconfig
$ dmesg
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.12.21++ (pi@raspi2) (gcc version 4.7.1 20120402 (prerelease) (crosstool-NG 1.15.2) ) #1 PREEMPT Tue Jun 10 21:36:28 CEST 2014
[ 0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] Machine: BCM2708, model: Raspberry Pi Model B
[ 0.000000] cma: CMA: reserved 8 MiB at 1b000000
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
struct clk __init *bcm2708_clk_register(const char *name, unsigned long fixed_rate)
{
struct clk *clk;
clk = clk_register_fixed_rate(NULL, name, NULL, CLK_IS_ROOT,
fixed_rate);
if (IS_ERR(clk))
pr_err("%s not registered\n", name);
return clk;
config.txt:
device_tree=bcm2708-rpi-b.dtb
device_tree_address=0x100
kernel_address=0x8000
disable_commandline_tags=1
kernel=zImage
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0x0
[ 1.848466] pinctrl core: add 2 pinmux maps
[ 1.852686] pinctrl core: add 6 pinmux maps
[ 1.856956] pinctrl-bcm2708 20200000.gpio: found group selector 17 for gpio17
[ 1.864141] pinctrl-bcm2708 20200000.gpio: found group selector 18 for gpio18
[ 1.871350] pinctrl-bcm2708 20200000.gpio: found group selector 27 for gpio27
[ 1.878560] pinctrl-bcm2708 20200000.gpio: found group selector 22 for gpio22
[ 1.885732] pinctrl-bcm2708 20200000.gpio: found group selector 23 for gpio23
[ 1.892935] pinctrl-bcm2708 20200000.gpio: found group selector 24 for gpio24
[ 1.900140] pinctrl-bcm2708 20200000.gpio: found group selector 25 for gpio25
[ 1.907343] pinctrl-bcm2708 20200000.gpio: request pin 17 (gpio17) for 20200000.gpio
diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts
index e319c8e..30107fb 100644
--- a/arch/arm/boot/dts/bcm2708-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts
@@ -5,4 +5,36 @@
/ {
compatible = "brcm,bcm2708";
model = "Raspberry Pi";
+
+ aliases {