Skip to content

Instantly share code, notes, and snippets.

View superna9999's full-sized avatar
🤡

Neil Armstrong superna9999

🤡
View GitHub Profile
@superna9999
superna9999 / meson_p200_adc_keys.patch
Last active January 10, 2017 14:22
p200 adc_keys patch
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index 5189eac..28c8493 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -242,6 +242,7 @@
status = "okay"; /* TODO */
interrupts = <GIC_SPI 9 IRQ_TYPE_EDGE_RISING>;
reg = <0x0 0x8680 0x0 0x30>;
+ #io-channel-cells = <1>;
};
[ 16.966220] Mali<2>:
[ 16.966229] Inserting Mali v900 device driver.
[ 16.966232] Mali<2>:
[ 16.966235] Compiled: Feb 10 2017, time: 15:52:46.
[ 16.966236] Mali<2>:
[ 16.966238] Driver revision: r6p1-01rel0-d261764
[ 16.966239] Mali<2>:
[ 16.966240] mali_module_init() registering device
[ 16.966868] Amlogic Mali glue initialized
[ 16.966874] Mali<2>:
@superna9999
superna9999 / gist:57b58b80b2519b8a0ce0b82b3c4d09f3
Created February 27, 2017 13:55
BayLibre Linux involvement for 4.10 release
Neil Armstrong (71) commits (+11794/-1759):
ARM64: dts: meson-gx: Add firmware reserved memory zones (+18/-0)
ARM64: dts: meson-gxbb-odroidc2: Disable SCPI DVFS (+5/-1)
ARM64: dts: meson-gx: Add Graphic Controller nodes (+92/-0)
ARM64: dts: meson-gxl: Add support for Nexbox A95X (+207/-0)
ARM64: dts: meson-gxm: Add support for the Nexbox A1 (+171/-0)
ARM64: dts: Add support for Meson GXM (+264/-3)
ARM64: dts: meson-gxl-s905x: Enable internal ethernet PHY (+6/-0)
ARM64: dts: meson-gxl-p23x: Enable ethernet (+35/-0)
ARM64: dts: meson-gxl: Add ethernet nodes with internal PHY (+43/-0)
@superna9999
superna9999 / gist:0ea3fedaaf30f0928225f66f8189a031
Created February 27, 2017 14:02
All contributions and involvement on Amlogic patches in Linux 4.10
Andreas Färber (1) commits (+2/-2):
ARM64: dts: amlogic: Reorder copyrights for meson-gx
Brian Kim (1) commits (+29/-0):
ARM64: dts: meson-gxbb-odroidc2: Enable USB Nodes
Carlo Caione (1) commits (+173/-0):
ARM64: dts: amlogic: Add basic support for Amlogic S905X
Hans de Goede (1) commits (+317/-0):
@superna9999
superna9999 / gist:444ffe6c96555f93b640b2a90baf7f52
Created February 27, 2017 14:03
All contributions and involvement on BayLibre only patches in Linux 4.10
Neil Armstrong (71) commits (+11794/-1759):
ARM64: dts: meson-gx: Add firmware reserved memory zones (+18/-0)
ARM64: dts: meson-gxbb-odroidc2: Disable SCPI DVFS (+5/-1)
ARM64: dts: meson-gx: Add Graphic Controller nodes (+92/-0)
ARM64: dts: meson-gxl: Add support for Nexbox A95X (+207/-0)
ARM64: dts: meson-gxm: Add support for the Nexbox A1 (+171/-0)
ARM64: dts: Add support for Meson GXM (+264/-3)
ARM64: dts: meson-gxl-s905x: Enable internal ethernet PHY (+6/-0)
ARM64: dts: meson-gxl-p23x: Enable ethernet (+35/-0)
ARM64: dts: meson-gxl: Add ethernet nodes with internal PHY (+43/-0)
@superna9999
superna9999 / i2c_lsm9ds0_test.patch
Created June 1, 2017 08:15
zephyr hacky i2c test
diff --git a/samples/drivers/i2c_lsm9ds0/src/main.c b/samples/drivers/i2c_lsm9ds0/src/main.c
index 5622e13..43a5670 100644
--- a/samples/drivers/i2c_lsm9ds0/src/main.c
+++ b/samples/drivers/i2c_lsm9ds0/src/main.c
@@ -15,60 +15,126 @@
*/
#include <zephyr.h>
+#include <device.h>
+
#!/bin/bash
# SPDX-License-Identifier: WTFPL
# Copyright © 2018 Neil "Superna" Armstrong
# This work is free. You can redistribute it and/or modify it under the
# terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar. See the COPYING file or http://www.wtfpl.net/
# for more details.
PREV="$(date +%s%N | cut -b1-13)"
TAPS="0"
#!/bin/sh
if [ "$#" -gt 0 ] ; then
if [ "$1" == "1" ] ; then
CPU="cpu0"
MSR="sys_cpu_div16"
devmem 0xFF63C15C 32 0x15002A2
elif [ "$1" == "2" ] ; then
CPU="cpu2"
MSR="sys_cpub_div16"
# table X96, type: nec
0x140 KEY_POWER
0x144 KEY_SUBTITLE # KD
0x155 KEY_PREVIOUS
0x15a KEY_PLAYPAUSE
0x152 KEY_STOP
0x154 KEY_NEXT
0x143 KEY_CONFIG
0x10f KEY_INFO # Green/APP KEY_I (toggle info)
0x110 KEY_VOLUMEDOWN
#!/bin/sh
FIPDIR=$1
mkdir fip
cp $FIPDIR/gxl/bl2.bin fip/
cp $FIPDIR/gxl/acs.bin fip/
cp $FIPDIR/gxl/bl21.bin fip/
cp $FIPDIR/gxl/bl30.bin fip/