Skip to content

Commit

Permalink
linux-sifive: add 6.5.10
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Perrot <[email protected]>
  • Loading branch information
tprrt committed Nov 8, 2023
1 parent 1fdd257 commit 7b7454f
Show file tree
Hide file tree
Showing 8 changed files with 205 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
From d7226521a2adc29478f3262161c4d38ad68699da Mon Sep 17 00:00:00 2001
From: David Abdurachmanov <[email protected]>
Date: Wed, 17 Feb 2021 06:06:14 -0800
Subject: [PATCH 1/3] riscv: sifive: fu740: cpu{1,2,3,4} set compatible to
sifive,u74-mc

Upstream-Status: Pending
Signed-off-by: David Abdurachmanov <[email protected]>
Signed-off-by: Thomas Perrot <[email protected]>
---
arch/riscv/boot/dts/sifive/fu740-c000.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/riscv/boot/dts/sifive/fu740-c000.dtsi b/arch/riscv/boot/dts/sifive/fu740-c000.dtsi
index 5235fd1c9cb6..b1c403ac563d 100644
--- a/arch/riscv/boot/dts/sifive/fu740-c000.dtsi
+++ b/arch/riscv/boot/dts/sifive/fu740-c000.dtsi
@@ -39,7 +39,7 @@ cpu0_intc: interrupt-controller {
};
};
cpu1: cpu@1 {
- compatible = "sifive,bullet0", "riscv";
+ compatible = "sifive,u74-mc", "sifive,bullet0", "riscv";
d-cache-block-size = <64>;
d-cache-sets = <64>;
d-cache-size = <32768>;
@@ -63,7 +63,7 @@ cpu1_intc: interrupt-controller {
};
};
cpu2: cpu@2 {
- compatible = "sifive,bullet0", "riscv";
+ compatible = "sifive,u74-mc", "sifive,bullet0", "riscv";
d-cache-block-size = <64>;
d-cache-sets = <64>;
d-cache-size = <32768>;
@@ -87,7 +87,7 @@ cpu2_intc: interrupt-controller {
};
};
cpu3: cpu@3 {
- compatible = "sifive,bullet0", "riscv";
+ compatible = "sifive,u74-mc", "sifive,bullet0", "riscv";
d-cache-block-size = <64>;
d-cache-sets = <64>;
d-cache-size = <32768>;
@@ -111,7 +111,7 @@ cpu3_intc: interrupt-controller {
};
};
cpu4: cpu@4 {
- compatible = "sifive,bullet0", "riscv";
+ compatible = "sifive,u74-mc", "sifive,bullet0", "riscv";
d-cache-block-size = <64>;
d-cache-sets = <64>;
d-cache-size = <32768>;
--
2.41.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
From 0011b7a1d69cbee8c2fef142ad4d45ee12ace64b Mon Sep 17 00:00:00 2001
From: Ruinland Tsai <[email protected]>
Date: Mon, 11 Apr 2022 16:16:10 +0800
Subject: [PATCH 2/3] riscv: sifive: unmatched: define PWM LEDs

Add D2 (RGB) and D12 (green) LEDs for SiFive Unmatched board.

Upstream-Status: Pending
Signed-off-by: Ruinland Tsai <[email protected]>
Signed-off-by: Thomas Perrot <[email protected]>
---
.../boot/dts/sifive/hifive-unmatched-a00.dts | 39 +++++++++++++++++++
1 file changed, 39 insertions(+)

diff --git a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
index 07387f9c135c..e4ad9c40abd3 100644
--- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
+++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
@@ -28,6 +28,45 @@ memory@80000000 {
reg = <0x0 0x80000000 0x4 0x00000000>;
};

+ pwmleds {
+ compatible = "pwm-leds";
+ green-d12 {
+ label = "green:d12";
+ color = <LED_COLOR_ID_GREEN>;
+ pwms = <&pwm0 0 7812500 PWM_POLARITY_INVERTED>;
+ active-low = <1>;
+ max-brightness = <255>;
+ linux,default-trigger = "none";
+ };
+
+ green-d2 {
+ label = "green:d2";
+ color = <LED_COLOR_ID_GREEN>;
+ pwms = <&pwm0 1 7812500 PWM_POLARITY_INVERTED>;
+ active-low = <1>;
+ max-brightness = <255>;
+ linux,default-trigger = "none";
+ };
+
+ red-d2 {
+ label = "red:d2";
+ color = <LED_COLOR_ID_RED>;
+ pwms = <&pwm0 2 7812500 PWM_POLARITY_INVERTED>;
+ active-low = <1>;
+ max-brightness = <255>;
+ linux,default-trigger = "none";
+ };
+
+ blue-d2 {
+ label = "blue:d2";
+ color = <LED_COLOR_ID_BLUE>;
+ pwms = <&pwm0 3 7812500 PWM_POLARITY_INVERTED>;
+ active-low = <1>;
+ max-brightness = <255>;
+ linux,default-trigger = "none";
+ };
+ };
+
hfclk: hfclk {
#clock-cells = <0>;
compatible = "fixed-clock";
--
2.41.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 16045f7dd44cfae993b5cb9d10d208db8841435d Mon Sep 17 00:00:00 2001
From: Ruinland Tsai <[email protected]>
Date: Wed, 13 Apr 2022 17:47:41 +0800
Subject: [PATCH 3/3] Revert "riscv: dts: sifive unmatched: Link the tmp451
with its power supply"

This reverts commit f6f7fbb89bf8dc9132fde55cfe67483138eea880.

Upstream-Status: Pending
Signed-off-by: Thomas Perrot <[email protected]>
---
arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
index e4ad9c40abd3..eafede7e1edd 100644
--- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
+++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
@@ -141,7 +141,6 @@ &i2c0 {
temperature-sensor@4c {
compatible = "ti,tmp451";
reg = <0x4c>;
- vcc-supply = <&vdd_bpro>;
interrupt-parent = <&gpio>;
interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
};
--
2.41.0

53 changes: 53 additions & 0 deletions recipes-kernel/linux/linux-sifive_6.5.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
DESCRIPTION = "SiFive Linux Kernel"
SECTION = "kernel"
LICENSE = "GPL-2.0-only"

FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

KBRANCH ?= "linux-6.5.y"
KBRANCH:freedom-u-540 ?= "linux-6.5.y"
KBRANCH:qemuriscv64 ?= "linux-6.5.y"
KBRANCH:unmatched ?= "linux-6.5.y"

SRCREV_machine ?= "43a868577dfcd9be6930453dc5ec557ab2e9ad89"
SRCREV_machine:freedom-u-540 ?= "43a868577dfcd9be6930453dc5ec557ab2e9ad89"
SRCREV_machine:qemuriscv64 ?= "43a868577dfcd9be6930453dc5ec557ab2e9ad89"
SRCREV_machine:unmatched ?= "43a868577dfcd9be6930453dc5ec557ab2e9ad89"
SRCREV_meta ?= "9c7dcb61723601208997d38455d9e6928851e5ff"

KCONFIG_MODE = "--alldefconfig"

KBUILD_DEFCONFIG ?= ""
KBUILD_DEFCONFIG:freedom-u540 ?= "defconfig"
KBUILD_DEFCONFIG:qemuriscv64 ?= "defconfig"
KBUILD_DEFCONFIG:unmatched ?= "defconfig"

KERNEL_EXTRA_FEATURES ?= ""
KERNEL_FEATURES:append:qemuriscv64 = " cfg/virtio.scc"
KERNEL_FEATURES:remove = "cfg/fs/vfat.scc"
KERNEL_FEATURES:remove = "features/debug/printk.scc"
KERNEL_FEATURES:remove = "features/kernel-sample/kernel-sample.scc"

require recipes-kernel/linux/linux-yocto.inc

SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git;name=machine;branch=${KBRANCH} \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.5;destsuffix=${KMETA}"
SRC_URI:append:riscv64 = " \
file://0001-riscv-sifive-fu740-cpu-1-2-3-4-set-compatible-to-sif.patch \
file://0002-riscv-sifive-unmatched-define-PWM-LEDs.patch \
file://0003-Revert-riscv-dts-sifive-unmatched-Link-the-tmp451-wi.patch \
"

LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
LINUX_VERSION ?= "6.5.10"
LINUX_VERSION_EXTENSION = ""

PV = "${LINUX_VERSION}+git${SRCPV}"

KMETA = "kernel-meta"
KCONF_BSP_AUDIT_LEVEL = "2"
KCONF_AUDIT_LEVEL = "2"
KCONF_BSP_AUDIT_LEVEL:qemuriscv64 = "1"
KCONF_AUDIT_LEVEL:qemuriscv64 = "1"

COMPATIBLE_MACHINE = "(freedom-u540|qemuriscv64|unmatched)"

0 comments on commit 7b7454f

Please sign in to comment.