Skip to content

Instantly share code, notes, and snippets.

View pdp7's full-sized avatar
💭
Linux on RISC-V

Drew Fustini pdp7

💭
Linux on RISC-V
View GitHub Profile
@pdp7
pdp7 / th1520-clock-driver.patch
Created December 6, 2023 07:09
TH1520 clock driver patch
View th1520-clock-driver.patch
From f159014800b143ba3817dfde1208a301e57c5de4 Mon Sep 17 00:00:00 2001
From: Jisheng Zhang <jszhang@kernel.org>
Date: Sun, 19 Nov 2023 21:30:03 +0800
Subject: [PATCH] WIP: clk: add TH1520 support
---
drivers/clk/thead/Kconfig | 10 +
drivers/clk/thead/Makefile | 2 +
drivers/clk/thead/clk-th1520-ap.c | 1019 ++++++++++++++++++++++
include/dt-bindings/clock/th1520-clock.h | 97 ++
@pdp7
pdp7 / ti-vip.c
Created December 5, 2023 02:33
TI VIP
View ti-vip.c
// SPDX-License-Identifier: GPL-2.0
/*
* TI VIP capture driver
*
* Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
* David Griego, <dagriego@biglakesoftware.com>
* Dale Farnsworth, <dale@farnsworth.org>
* Nikhil Devshatwar, <nikhil.nd@ti.com>
* Benoit Parrot, <bparrot@ti.com>
*/
@pdp7
pdp7 / xuantie-ubuntu.diff
Created November 23, 2023 22:42
xuantie-ubuntu.diff
View xuantie-ubuntu.diff
diff --git a/02_build_opensbi.sh b/02_build_opensbi.sh
index 61896ed9a4ef..d2a5563d6f44 100755
--- a/02_build_opensbi.sh
+++ b/02_build_opensbi.sh
@@ -1,12 +1,12 @@
-#!/bin/bash
+#!/bin/bash -xe
CORES=$(getconf _NPROCESSORS_ONLN)
+CROSS="riscv64-linux-gnu-"
@pdp7
pdp7 / beaglev ahead resources.md
Created November 19, 2023 17:41
beaglev ahead resources
View beaglev ahead resources.md

I got a few questions at the Linux Plumbers Conference about various BeagleV Ahead development resources so I thought it would be good type it in a forum post:

Here is the out-of-the-box documentation: https://docs.beagleboard.org/latest/boards/beaglev/ahead/

One thing you may notice is that the board has a superspeed USB 3.0 micro B connector. We didn't do USB Type C as it would have required an additional mux chip and the project was already 1 year late. If you don't have a USB 3.0 superspeed micro B cable (like from an old USB 3.0 hard drive), then you still use a normal USB 2.0 micro B

@pdp7
pdp7 / BeagleV Ahead boot on eMMC.txt
Last active November 30, 2023 01:30
Linux 6.7-rc3 with TH1520 MMC patch series v4 boot on BeagleV Ahead
View BeagleV Ahead boot on eMMC.txt
U-Boot SPL 2020.01-ga239460ff5e5 (Jul 28 2023 - 17:39:55 -0700)
FM[1] lpddr4x singlerank freq=3733 64bit dbi_off=n sdram init
ddr initialized, jump to uboot
image has no header
U-Boot 2020.01-ga239460ff5e5 (Jul 28 2023 - 17:39:55 -0700)
CPU: rv64imafdcvsu
@pdp7
pdp7 / LicheePi 4A boot on eMMC.txt
Created November 2, 2023 02:02
Linux 6.6 with TH1520 MMC patch series v4 boot on LicheePi 4A
View LicheePi 4A boot on eMMC.txt
brom_ver 8
[APP][E] protocol_connect failed, exit.
-----------------------------------------
_____ _ _____ _____ _ __
| __ \ (_)/ ____| __ \| |/ /
| |__) | _ _ _ _| (___ | | | | ' /
| _ / | | | | | | |\___ \| | | | <
| | \ \ |_| | |_| | |____) | |__| | . \
|_| \_\__,_|\__, |_|_____/|_____/|_|\_\
@pdp7
pdp7 / boot log 6.6.0-rc6-6.6-emmc-sbi-1.0-00004-g882593f0c502-dirty.txt
Created October 26, 2023 23:24
boot log 6.6.0-rc6-6.6-emmc-sbi-1.0-00004-g882593f0c502-dirty
View boot log 6.6.0-rc6-6.6-emmc-sbi-1.0-00004-g882593f0c502-dirty.txt
# dmesg
[ 0.000000] Linux version 6.6.0-rc6-6.6-emmc-sbi-1.0-00004-g882593f0c502-dirty (dfustini@3fe284997758) (riscv64-linux-gnu-gcc (Ubuntu 1
2.3.0-1ubuntu1~23.04) 12.3.0, GNU ld (GNU Binutils for Ubuntu) 2.40) #241 SMP Thu Oct 26 20:37:24 America 2023
[ 0.000000] SBI specification v1.0 detected
[ 0.000000] SBI implementation ID=0x1 Version=0x10002
[ 0.000000] SBI TIME extension detected
[ 0.000000] SBI IPI extension detected
[ 0.000000] SBI RFENCE extension detected
[ 0.000000] efi: UEFI not found.
@pdp7
pdp7 / LicheePi 4A boot on eMMC.txt
Last active October 17, 2023 20:25
Linux 6.6-rc6 with TH1520 eMMC patch series boot on LicheePi 4A
View LicheePi 4A boot on eMMC.txt
brom_ver 8
[APP][E] protocol_connect failed, exit.
-----------------------------------------
_____ _ _____ _____ _ __
| __ \ (_)/ ____| __ \| |/ /
| |__) | _ _ _ _| (___ | | | | ' /
| _ / | | | | | | |\___ \| | | | <
| | \ \ |_| | |_| | |____) | |__| | . \
|_| \_\__,_|\__, |_|_____/|_____/|_|\_\
@pdp7
pdp7 / BeagleV Ahead boot on eMMC.txt
Last active October 17, 2023 20:26
Linux 6.6-rc6 with TH1520 eMMC patch series boot on BeagleV Ahead
View BeagleV Ahead boot on eMMC.txt
brom_ver 8
[APP][E] protocol_connect failed, exit.
U-Boot SPL 2020.01-ga239460ff5e5 (Jul 28 2023 - 17:39:55 -0700)
FM[1] lpddr4x singlerank freq=3733 64bit dbi_off=n sdram init
ddr initialized, jump to uboot
image has no header
@pdp7
pdp7 / beaglev ahead mmc adma okay with DMA_GLOBAL_POOL.txt
Created October 3, 2023 04:32
beaglev ahead mmc adma okay with DMA_GLOBAL_POOL
View beaglev ahead mmc adma okay with DMA_GLOBAL_POOL.txt
Saving Environment to MMC... Writing to MMC(0)... OK
Net: ethernet@ffe7070000 (eth0) using MAC address - 9a:ca:5a:95:8a:0b
eth0: ethernet@ffe7070000ethernet@ffe7070000:0 is connected to ethernet@ffe7070000. Reconnecting to ethernet@ffe7060000
ethernet@ffe7060000 (eth1) using MAC address - 9a:ca:5a:95:8a:0c
, eth1: ethernet@ffe7060000
Hit any key to stop autoboot: 0
50340 bytes read in 1 ms (48 MiB/s)
15748 bytes read in 1 ms (15 MiB/s)
138368 bytes read in 1 ms (132 MiB/s)
switch to partitions #0, OK