Skip to content

Instantly share code, notes, and snippets.

@tokyovigilante
tokyovigilante / gist:57ab963756a3c936d08a58186f062318
Created March 12, 2024 21:41
RTL8821 panic on power state change
[ 830.797592] ------------[ cut here ]------------
[ 830.802268] firmware failed to ack driver for entering Deep Power mode
[ 830.808931] WARNING: CPU: 1 PID: 67 at drivers/net/wireless/realtek/rtw88/ps.c:105 rtw_power_mode_change+0x130/0x180 [rtw88_core]
[ 830.820663] Modules linked in: btrfs blake2b_generic libcrc32c xor xor_neon raid6_pq zstd_compress af_alg rtw88_8821cs rtw88_8821c 6
[ 830.846661] CPU: 1 PID: 67 Comm: kworker/u16:4 Not tainted 6.8.0-rc7-next-20240308-00004-gee0f4864bb48 #8
[ 830.856231] Hardware name: Anbernic RG35XX Plus (DT)
[ 830.861198] Workqueue: phy0 rtw_watch_dog_work [rtw88_core]
[ 830.866831] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 830.873796] pc : rtw_power_mode_change+0x130/0x180 [rtw88_core]
[ 830.879763] lr : rtw_power_mode_change+0x130/0x180 [rtw88_core]
@tokyovigilante
tokyovigilante / gist:72421ccc3e46ca147fdeb76be67565b1
Created March 9, 2024 22:43
TF-A hack to disable RSB for I2C PMIC
diff --git a/plat/allwinner/sun50i_h616/sunxi_power.c b/plat/allwinner/sun50i_h616/sunxi_power.c
index dd6ebba9a..361cf07fe 100644
--- a/plat/allwinner/sun50i_h616/sunxi_power.c
+++ b/plat/allwinner/sun50i_h616/sunxi_power.c
@@ -75,7 +75,8 @@ int sunxi_pmic_setup(uint16_t socid, const void *fdt)
INFO("Could not init platform bus: %d\n", ret);
return ret;
}
-
+ INFO("PMIC: Exiting early...\n");
// change root to wherever your kernel is, and add earlycon if no serial output
// setenv bootargs earlycon console=tty0 console=ttyS0,115200 root=/dev/mmcblk0p3
setenv bootargs console=tty0 console=ttyS0,115200 root=/dev/mmcblk0p3
load mmc 0:2 $kernel_addr_r Image
booti $kernel_addr_r - $fdtcontroladdr
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 6.8.0-rc7-g2d190068f346 (ryan@crackotage) (aarch64-linux-gnu-gcc (GCC) 13.2.1 20230728 (Red Hat Cross 13.2.1-1), GNU ld version 2.40-5.fc40) #4 SMP PREEMPT Wed Mar 6 20:24:08 NZDT 2024
[ 0.000000] KASLR disabled due to lack of seed
[ 0.000000] Machine model: Anbernic RG35XX Plus
[ 0.000000] efi: UEFI not found.
[ 0.000000] OF: reserved mem: OVERLAP DETECTED!
tf-a@40000000 (0x0000000040000000--0x0000000040040000) overlaps with secmon@40000000 (0x0000000040000000--0x0000000040040000)
[ 0.000000] OF: reserved mem: 0x0000000040000000..0x000000004003ffff (256 KiB) nomap non-reusable tf-a@40000000
[ 0.000000] OF: reserved mem: 0x0000000040000000..0x000000004003ffff (256 KiB) nomap non-reusable secmon@40000000
[ 0.000000] earlycon: uart0 at MMIO32 0x0000000005000000 (options '115200n8')
@tokyovigilante
tokyovigilante / gist:9085939407019a676c360bfef6da9b98
Created March 6, 2024 04:11
RG35XX+ regulator voltage from vendor BSP
[/sys/kernel/debug]# cat /sys/kernel/debug/regulator/regulator_summary
regulator use open bypass voltage current min max
-------------------------------------------------------------------------------
regulator-dummy 0 8 0 0mV 0mA 0mV 0mV
6000000.hdmi 0mV 0mV
6000000.hdmi 0mV 0mV
5311000.ohci3-controller 0mV 0mV
5310000.ohci2-controller 0mV 0mV
5200000.ohci1-controller 0mV 0mV
5311000.ehci3-controller 0mV 0mV
@tokyovigilante
tokyovigilante / gist:cf71691a8e26b8d50cc06709591ac4cf
Created March 5, 2024 22:17
dmesg for Anbernic RG35XX+ mainline boot with partial DT
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 6.8.0-rc7-g2d190068f346 (ryan@crackotage) (aarch64-linux-gnu-gcc (GCC) 13.2.1 20230728 (Red Hat Cross 13.4
[ 0.000000] KASLR disabled due to lack of seed
[ 0.000000] Machine model: Anbernic RG35XX Plus
[ 0.000000] efi: UEFI not found.
[ 0.000000] OF: reserved mem: OVERLAP DETECTED!
tf-a@40000000 (0x0000000040000000--0x0000000040040000) overlaps with secmon@40000000 (0x0000000040000000--0x00000000400)
[ 0.000000] OF: reserved mem: 0x0000000040000000..0x000000004003ffff (256 KiB) nomap non-reusable tf-a@40000000
[ 0.000000] OF: reserved mem: 0x0000000040000000..0x000000004003ffff (256 KiB) nomap non-reusable secmon@40000000
[ 0.000000] earlycon: uart0 at MMIO32 0x0000000005000000 (options '115200n8')
[Thu 7:13pm] ryan@Firebert ~/$ sudo zdb -e -p /dev Stuff
Configuration for import:
vdev_children: 1
version: 5000
pool_guid: 4818380076522621825
name: 'Stuff'
txg: 294572
state: 1
hostid: 2590973493
@tokyovigilante
tokyovigilante / MCMessageHeader.cc
Created August 12, 2013 23:30
Preprocessed MCMessageHeader.cc
// Preprocessed output for MCMessageHeader.cc
// Generated at 11:24:17 AM on Tuesday, August 13, 2013
// Using Debug configuration, x86_64 architecture for Pods-MailCore2 target of Pods project
# 1 "/Volumes/Home/ryan/Projects/Develop/Spitfire/Pods/MailCore2/src/core/abstract/MCMessageHeader.cc"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 169 "<built-in>" 3
# 1 "<command line>" 1