linux: fix old Fire merges

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
main BeagleV-Fire-ubuntu-2023.09-rc5
Robert Nelson 1 year ago
parent 2372f7cbb7
commit 15fc80330b

@ -49,7 +49,7 @@ if [ -d ./linux ] ; then
fi fi
echo "git clone -b ${LINUX_BRANCH} ${LINUX_REPO} ./linux/ --depth=${GIT_DEPTH}" echo "git clone -b ${LINUX_BRANCH} ${LINUX_REPO} ./linux/ --depth=${GIT_DEPTH}"
git clone -b ${LINUX_BRANCH} ${LINUX_REPO} ./linux/ --depth=${GIT_DEPTH} git clone --reference-if-able ~/linux-src/ -b ${LINUX_BRANCH} ${LINUX_REPO} ./linux/ --depth=${GIT_DEPTH}
#BUILDROOT_BRANCH="bvf" #BUILDROOT_BRANCH="bvf"
#BUILDROOT_REPO="https://git.beagleboard.org/beaglev-fire/buildroot-external-microchip.git" #BUILDROOT_REPO="https://git.beagleboard.org/beaglev-fire/buildroot-external-microchip.git"

@ -16,19 +16,25 @@ if [ ! -f ./.patched ] ; then
git am ../patches/linux/0006-BeagleV-Fire-Add-printk-to-IM219-driver-for-board-te.patch git am ../patches/linux/0006-BeagleV-Fire-Add-printk-to-IM219-driver-for-board-te.patch
git am ../patches/linux/0007-MMC-SPI-Hack-to-support-non-DMA-capable-SPI-ctrl.patch git am ../patches/linux/0007-MMC-SPI-Hack-to-support-non-DMA-capable-SPI-ctrl.patch
git am ../patches/linux/0008-Add-wireless-regdb-regulatory-database-file.patch git am ../patches/linux/0008-Add-wireless-regdb-regulatory-database-file.patch
git am ../patches/linux/0009-Makefile-build-mpfs-beaglev-fire.dtb.patch
git am ../patches/linux/0010-mpfs-beaglev-fire-fix-eeprom-pagesize-merge.patch
git am ../patches/linux/0011-mpfs-beaglev-fire-fabric-fix-old-merge-removing-gpio.patch
git am ../patches/linux/0012-mpfs-beaglev-fire-add-uart-i2c-symlinks-fix-old-merg.patch
git am ../patches/linux/0013-mpfs-beaglev-fire-drop-user_button.patch
git am ../patches/linux/0014-mpfs-beaglev-fire-add-mmc0-aliases.patch
fi fi
touch .patched touch .patched
fi fi
if [ -f arch/riscv/configs/mpfs_defconfig ] ; then #if [ -f arch/riscv/configs/mpfs_defconfig ] ; then
cp -v ../patches/linux/Makefile arch/riscv/boot/dts/microchip/Makefile # cp -v ../patches/linux/Makefile arch/riscv/boot/dts/microchip/Makefile
cp -v ../patches/linux/dts/mpfs-beaglev-fire.dts arch/riscv/boot/dts/microchip/ # cp -v ../patches/linux/dts/mpfs-beaglev-fire.dts arch/riscv/boot/dts/microchip/
cp -v ../patches/linux/dts/mpfs-beaglev-fire-fabric.dtsi arch/riscv/boot/dts/microchip/ # cp -v ../patches/linux/dts/mpfs-beaglev-fire-fabric.dtsi arch/riscv/boot/dts/microchip/
else #else
cp -v ../patches/linux/mainline/Makefile arch/riscv/boot/dts/microchip/Makefile # cp -v ../patches/linux/mainline/Makefile arch/riscv/boot/dts/microchip/Makefile
cp -v ../patches/linux/mainline/dts/mpfs-beaglev-fire.dts arch/riscv/boot/dts/microchip/ # cp -v ../patches/linux/mainline/dts/mpfs-beaglev-fire.dts arch/riscv/boot/dts/microchip/
cp -v ../patches/linux/mainline/dts/mpfs-beaglev-fire-fabric.dtsi arch/riscv/boot/dts/microchip/ # cp -v ../patches/linux/mainline/dts/mpfs-beaglev-fire-fabric.dtsi arch/riscv/boot/dts/microchip/
fi #fi
echo "make ARCH=riscv CROSS_COMPILE=${CC} clean" echo "make ARCH=riscv CROSS_COMPILE=${CC} clean"
make ARCH=riscv CROSS_COMPILE=${CC} clean make ARCH=riscv CROSS_COMPILE=${CC} clean

@ -16,19 +16,25 @@ if [ ! -f ./.patched ] ; then
git am ../patches/linux/0006-BeagleV-Fire-Add-printk-to-IM219-driver-for-board-te.patch git am ../patches/linux/0006-BeagleV-Fire-Add-printk-to-IM219-driver-for-board-te.patch
git am ../patches/linux/0007-MMC-SPI-Hack-to-support-non-DMA-capable-SPI-ctrl.patch git am ../patches/linux/0007-MMC-SPI-Hack-to-support-non-DMA-capable-SPI-ctrl.patch
git am ../patches/linux/0008-Add-wireless-regdb-regulatory-database-file.patch git am ../patches/linux/0008-Add-wireless-regdb-regulatory-database-file.patch
git am ../patches/linux/0009-Makefile-build-mpfs-beaglev-fire.dtb.patch
git am ../patches/linux/0010-mpfs-beaglev-fire-fix-eeprom-pagesize-merge.patch
git am ../patches/linux/0011-mpfs-beaglev-fire-fabric-fix-old-merge-removing-gpio.patch
git am ../patches/linux/0012-mpfs-beaglev-fire-add-uart-i2c-symlinks-fix-old-merg.patch
git am ../patches/linux/0013-mpfs-beaglev-fire-drop-user_button.patch
git am ../patches/linux/0014-mpfs-beaglev-fire-add-mmc0-aliases.patch
fi fi
touch .patched touch .patched
fi fi
if [ -f arch/riscv/configs/mpfs_defconfig ] ; then #if [ -f arch/riscv/configs/mpfs_defconfig ] ; then
cp -v ../patches/linux/Makefile arch/riscv/boot/dts/microchip/Makefile # cp -v ../patches/linux/Makefile arch/riscv/boot/dts/microchip/Makefile
cp -v ../patches/linux/dts/mpfs-beaglev-fire.dts arch/riscv/boot/dts/microchip/ # cp -v ../patches/linux/dts/mpfs-beaglev-fire.dts arch/riscv/boot/dts/microchip/
cp -v ../patches/linux/dts/mpfs-beaglev-fire-fabric.dtsi arch/riscv/boot/dts/microchip/ # cp -v ../patches/linux/dts/mpfs-beaglev-fire-fabric.dtsi arch/riscv/boot/dts/microchip/
else #else
cp -v ../patches/linux/mainline/Makefile arch/riscv/boot/dts/microchip/Makefile # cp -v ../patches/linux/mainline/Makefile arch/riscv/boot/dts/microchip/Makefile
cp -v ../patches/linux/mainline/dts/mpfs-beaglev-fire.dts arch/riscv/boot/dts/microchip/ # cp -v ../patches/linux/mainline/dts/mpfs-beaglev-fire.dts arch/riscv/boot/dts/microchip/
cp -v ../patches/linux/mainline/dts/mpfs-beaglev-fire-fabric.dtsi arch/riscv/boot/dts/microchip/ # cp -v ../patches/linux/mainline/dts/mpfs-beaglev-fire-fabric.dtsi arch/riscv/boot/dts/microchip/
fi #fi
echo "make ARCH=riscv CROSS_COMPILE=${CC} clean" echo "make ARCH=riscv CROSS_COMPILE=${CC} clean"
make ARCH=riscv CROSS_COMPILE=${CC} clean make ARCH=riscv CROSS_COMPILE=${CC} clean

@ -0,0 +1,23 @@
From 09e2d12d8ade10bb2d8ab1d42e9a1bd8442a74c8 Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Tue, 10 Oct 2023 10:01:45 -0500
Subject: [PATCH 9/9] Makefile: build mpfs-beaglev-fire.dtb
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
arch/riscv/boot/dts/microchip/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/boot/dts/microchip/Makefile b/arch/riscv/boot/dts/microchip/Makefile
index 48c9d3d071f3..4e3529217d9a 100644
--- a/arch/riscv/boot/dts/microchip/Makefile
+++ b/arch/riscv/boot/dts/microchip/Makefile
@@ -5,4 +5,5 @@ dtb-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += mpfs-m100pfsevp.dtb
dtb-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += mpfs-polarberry.dtb
dtb-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += mpfs-video-kit.dtb
dtb-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += mpfs-tysom-m.dtb
+dtb-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += mpfs-beaglev-fire.dtb
obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
--
2.39.2

@ -0,0 +1,26 @@
From aa372dad67f6ebb5743821fb121b9534e9b36f67 Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Tue, 10 Oct 2023 10:11:54 -0500
Subject: [PATCH 10/10] mpfs-beaglev-fire: fix eeprom pagesize merge
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts b/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts
index 4e4cf9673743..b4f1090f9664 100644
--- a/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts
+++ b/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts
@@ -210,7 +210,7 @@ &i2c1 {
status = "okay";
eeprom: eeprom@50 {
compatible = "atmel,24c32";
- reg = pagesize = <32>;
+ pagesize = <32>;
reg = <0x50>;
};
--
2.39.2

@ -0,0 +1,83 @@
From fb1cbdba969522930a5320e14749333f22a5f1db Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Tue, 10 Oct 2023 10:21:14 -0500
Subject: [PATCH 11/11] mpfs-beaglev-fire-fabric: fix old merge removing
gpio/core_pwm
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
.../microchip/mpfs-beaglev-fire-fabric.dtsi | 51 -------------------
1 file changed, 51 deletions(-)
diff --git a/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire-fabric.dtsi b/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire-fabric.dtsi
index 60ba0883aeb2..9737144e441a 100644
--- a/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire-fabric.dtsi
+++ b/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire-fabric.dtsi
@@ -16,15 +16,6 @@ fabric-bus@40000000 {
<0x20 0x0 0x20 0x0 0x10 0x0>, /* FIC0,HI */
<0x30 0x0 0x30 0x0 0x10 0x0>; /* FIC1,HI */
-// core_pwm0: pwm@40000000 {
-// compatible = "microchip,corepwm-rtl-v4";
-// reg = <0x0 0x40000000 0x0 0xF0>;
-// microchip,sync-update-mask = /bits/ 32 <0>;
-// #pwm-cells = <2>;
-// clocks = <&fabric_clk3>;
-// status = "disabled";
-// };
-
fabric_clk3: fabric-clk3 {
compatible = "fixed-clock";
#clock-cells = <0>;
@@ -36,48 +27,6 @@ fabric_clk1: fabric-clk1 {
#clock-cells = <0>;
clock-frequency = <125000000>;
};
-
- cape_gpios_p8: gpio@41100000 {
- compatible = "microchip,core-gpio";
- reg = <0x0 0x41100000 0x0 0x1000>;
- clocks = <&fabric_clk3>;
- gpio-controller;
- #gpio-cells = <2>;
- ngpios=<16>;
- gpio-line-names = "P8_PIN31", "P8_PIN32", "P8_PIN33", "P8_PIN34",
- "P8_PIN35", "P8_PIN36", "P8_PIN37", "P8_PIN38",
- "P8_PIN39", "P8_PIN40", "P8_PIN41", "P8_PIN42",
- "P8_PIN43", "P8_PIN44", "P8_PIN45", "P8_PIN46";
- };
-
- cape_gpios_p9: gpio@41200000 {
- compatible = "microchip,core-gpio";
- reg = <0x0 0x41200000 0x0 0x1000>;
- clocks = <&fabric_clk3>;
- gpio-controller;
- #gpio-cells = <2>;
- ngpios=<21>;
- gpio-line-names = "P9_PIN11", "P9_PIN12", "P9_PIN13", "P9_PIN14",
- "P9_PIN15", "P9_PIN16", "P9_PIN17", "P9_PIN18",
- "P9_PIN21", "P9_PIN22", "P9_PIN23", "P9_PIN24",
- "P9_PIN25", "P9_PIN26", "P9_PIN27", "P9_PIN28",
- "P9_PIN29", "P9_PIN31", "P9_PIN41", "P9_PIN42";
- };
-
- hsi_gpios: gpio@44000000 {
- compatible = "microchip,core-gpio";
- reg = <0x0 0x44000000 0x0 0x1000>;
- clocks = <&fabric_clk3>;
- gpio-controller;
- #gpio-cells = <2>;
- ngpios=<20>;
- gpio-line-names = "B0_HSIO70N", "B0_HSIO71N", "B0_HSIO83N", "B0_HSIO73N_C2P_CLKN",
- "B0_HSIO70P", "B0_HSIO71P", "B0_HSIO83P", "B0_HSIO73N_C2P_CLKP",
- "XCVR1_RX_VALID", "XCVR1_LOCK", "XCVR1_ERROR",
- "XCVR2_RX_VALID", "XCVR2_LOCK", "XCVR2_ERROR",
- "XCVR3_RX_VALID", "XCVR3_LOCK", "XCVR3_ERROR",
- "XCVR_0B_REF_CLK_PLL_LOCK", "XCVR_0C_REF_CLK_PLL_LOCK", "B0_HSIO81N";
- };
};
ihc: mailbox {
--
2.39.2

@ -0,0 +1,31 @@
From 0b2a75cd64db0121c023de5ffa6b135b4f5a4a3e Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Tue, 10 Oct 2023 10:34:52 -0500
Subject: [PATCH 12/12] mpfs-beaglev-fire: add uart/i2c symlinks, fix old merge
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts b/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts
index b4f1090f9664..962d39a46050 100644
--- a/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts
+++ b/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts
@@ -378,3 +378,13 @@ &usb {
status = "okay";
dr_mode = "otg";
};
+
+// UARTs
+bone_uart_4: &mmuart4 {
+ symlink = "bone/uart/4";
+};
+
+// I2Cs
+bone_i2c_2: &i2c0 {
+ symlink = "bone/i2c/2";
+};
--
2.39.2

@ -0,0 +1,31 @@
From 6e60fa8df1c8c5aa5105c84b261973b815b3611c Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Tue, 10 Oct 2023 10:43:53 -0500
Subject: [PATCH 13/13] mpfs-beaglev-fire: drop user_button
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts | 7 -------
1 file changed, 7 deletions(-)
diff --git a/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts b/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts
index 962d39a46050..d954a5cc3063 100644
--- a/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts
+++ b/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts
@@ -134,13 +134,6 @@ sd_card_cs {
output_high;
line-name = "SD_CARD_CS";
};
-
- user_button {
- gpio-hog;
- gpios = <13 13>;
- input;
- line-name = "USER_BUTTON";
- };
};
&gpio1 {
--
2.39.2

@ -0,0 +1,25 @@
From ef62b6373be63fd94291d8ee0b76efe1121c12d3 Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Tue, 10 Oct 2023 10:58:39 -0500
Subject: [PATCH 14/14] mpfs-beaglev-fire: add mmc0 aliases
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts b/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts
index d954a5cc3063..ca7f789031b1 100644
--- a/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts
+++ b/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts
@@ -25,6 +25,7 @@ soc {
};
aliases {
+ mmc0 = &mmc;
ethernet0 = &mac1;
serial0 = &mmuart0;
serial1 = &mmuart1;
--
2.39.2

@ -3,9 +3,9 @@
/dts-v1/; /dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include "mpfs.dtsi" #include "mpfs.dtsi"
#include "mpfs-beaglev-fire-fabric.dtsi" #include "mpfs-beaglev-fire-fabric.dtsi"
#include <dt-bindings/gpio/gpio.h>
/* Clock frequency (in Hz) of the rtcclk */ /* Clock frequency (in Hz) of the rtcclk */
#define RTCCLK_FREQ 1000000 #define RTCCLK_FREQ 1000000
@ -114,11 +114,14 @@
regulator-max-microvolt = <1200000>; regulator-max-microvolt = <1200000>;
}; };
imx219_clk: camera-clk { imx219_clk: camera-clk {
compatible = "fixed-clock"; compatible = "fixed-clock";
#clock-cells = <0>; #clock-cells = <0>;
clock-frequency = <24000000>; clock-frequency = <24000000>;
}; };
}; };
&gpio0 { &gpio0 {
@ -132,18 +135,11 @@
output_high; output_high;
line-name = "SD_CARD_CS"; line-name = "SD_CARD_CS";
}; };
user_button {
gpio-hog;
gpios = <13 13>;
input;
line-name = "USER_BUTTON";
};
}; };
&gpio1 { &gpio1 {
ngpios=<24>; ngpios=<24>;
gpio-line-names = "", "", "", "", "", "", "", "", "", "", gpio-line-names = "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"ADC_IRQn", "", "", "USB_OCn"; "ADC_IRQn", "", "", "USB_OCn";
status = "okay"; status = "okay";
@ -207,7 +203,8 @@
&i2c1 { &i2c1 {
status = "okay"; status = "okay";
eeprom: eeprom@50 { eeprom: eeprom@50 {
compatible = "at,24c32"; compatible = "atmel,24c32";
pagesize = <32>;
reg = <0x50>; reg = <0x50>;
}; };
@ -228,14 +225,15 @@
}; };
}; };
}; };
}; };
&mac0 { &mac0 {
dma-noncoherent; dma-noncoherent;
status = "okay";
phy-mode = "sgmii"; phy-mode = "sgmii";
phy-handle = <&phy0>; phy-handle = <&phy0>;
status = "okay";
phy0: ethernet-phy@0 { phy0: ethernet-phy@0 {
reg = <0>; reg = <0>;
}; };
@ -243,10 +241,9 @@
&mac1 { &mac1 {
dma-noncoherent; dma-noncoherent;
status = "okay";
phy-mode = "sgmii"; phy-mode = "sgmii";
phy-handle = <&phy1>; phy-handle = <&phy1>;
status = "okay";
phy1: ethernet-phy@0 { phy1: ethernet-phy@0 {
reg = <0>; reg = <0>;
}; };
@ -296,6 +293,14 @@
//&mmuart3 //{ //&mmuart3 //{
// statu//s = "okay"; // statu//s = "okay";
//};// //};//
//
//&mmuart4 {
// status = "okay";
//};
//&pcie {
// status = "okay";
//};
&qspi { &qspi {
status = "okay"; status = "okay";

@ -26,7 +26,7 @@ CONFIG_THREAD_INFO_IN_TASK=y
CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_INIT_ENV_ARG_LIMIT=32
# CONFIG_COMPILE_TEST is not set # CONFIG_COMPILE_TEST is not set
# CONFIG_WERROR is not set # CONFIG_WERROR is not set
CONFIG_LOCALVERSION="-20231009" CONFIG_LOCALVERSION="-20231010"
# CONFIG_LOCALVERSION_AUTO is not set # CONFIG_LOCALVERSION_AUTO is not set
CONFIG_BUILD_SALT="" CONFIG_BUILD_SALT=""
CONFIG_DEFAULT_INIT="" CONFIG_DEFAULT_INIT=""

@ -6,6 +6,12 @@ CC=${CC:-"${wdir}/riscv-toolchain/bin/riscv64-linux-"}
cd ./linux/ cd ./linux/
#if [ -f arch/riscv/configs/mpfs_defconfig ] ; then
# cp -v ../patches/linux/Makefile arch/riscv/boot/dts/microchip/Makefile
# cp -v ../patches/linux/dts/mpfs-beaglev-fire.dts arch/riscv/boot/dts/microchip/
# cp -v ../patches/linux/dts/mpfs-beaglev-fire-fabric.dtsi arch/riscv/boot/dts/microchip/
#fi
echo "make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} Image modules dtbs" echo "make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} Image modules dtbs"
make -j${CORES} ARCH=riscv CROSS_COMPILE="ccache ${CC}" Image modules dtbs make -j${CORES} ARCH=riscv CROSS_COMPILE="ccache ${CC}" Image modules dtbs

Loading…
Cancel
Save