This commit is contained in:
Christian Zimmermann 2021-07-24 00:44:57 +02:00
parent 3467e9ccae
commit b36bd374da
5 changed files with 9377 additions and 1 deletions

35
build-new-kernel.sh Normal file
View file

@ -0,0 +1,35 @@
#!/bin/bash
newver=${1}
nbuild=${2}
newverx=${newver}.${nbuild}
oldver=$(grep "pkgver" kernel-pkgs/PKGBUILD | head -n1)
oldver=${oldver##*=}
sed -i "s|${oldver}|${newverx}|g;" kernel-pkgs/PKGBUILD
rm -rf kernel-pkgs/pkg
cp kernel/config-${oldver} kernel-pkgs/src/linux/.config
cd kernel-pkgs/src/linux
almake distclean
git stash
git fetch
git co v${newver}
git stash apply
git restore scripts/depmod.sh
git diff > ../../../ws/chizeta/how-to-arch-a-banana-pi-r2/kernel/patches/patch-${newverx}
git reset --hard
githash=$(git rev-parse HEAD)
almake olddefconfig
cd -
cp kernel-pkgs/src/linux/.config kernel/linux-${githash}.config
ln -s linux-${githash}.config kernel/config-${newverx}
cd kernel-pkgs
makepkg
cd -

View file

@ -6,7 +6,7 @@ pkgbase=linux-armv7
_srcname=linux
_kernelname=${pkgbase#linux}
_desc="ARMv7 banana-pi-r2"
pkgver=5.12.0
pkgver=5.13.0
pkgrel=1
#rcnver=5.8.5
#rcnrel=armv7-x11

1
kernel/config-5.13.0 Symbolic link
View file

@ -0,0 +1 @@
linux-62fb9874f5da54fdb243003b386128037319b219.config

File diff suppressed because it is too large Load diff

119
kernel/patches/patch-5.13.0 Normal file
View file

@ -0,0 +1,119 @@
diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
index 3c11f7cfcc40..c6523e00a562 100644
--- a/arch/arm/boot/dts/mt7623.dtsi
+++ b/arch/arm/boot/dts/mt7623.dtsi
@@ -1057,7 +1057,13 @@ led_pins_a: leds-alt {
pins-leds {
pinmux = <MT7623_PIN_239_EXT_SDIO0_FUNC_GPIO239>,
<MT7623_PIN_240_EXT_XCS_FUNC_GPIO240>,
- <MT7623_PIN_241_EXT_SCK_FUNC_GPIO241>;
+ <MT7623_PIN_241_EXT_SCK_FUNC_GPIO241>,
+ <MT7623_PIN_18_PCM_CLK_FUNC_GPIO18>,
+ <MT7623_PIN_19_PCM_SYNC_FUNC_GPIO19>,
+ <MT7623_PIN_21_PCM_TX_FUNC_GPIO21>,
+ <MT7623_PIN_22_EINT0_FUNC_GPIO22>,
+ <MT7623_PIN_24_EINT2_FUNC_GPIO24>,
+ <MT7623_PIN_25_EINT3_FUNC_GPIO25>;
};
};
diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
index e96aa0ed1ebd..9767c41b70fa 100644
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
@@ -126,6 +126,42 @@ red {
gpios = <&pio 239 GPIO_ACTIVE_LOW>;
default-state = "off";
};
+
+ cust-0 {
+ label = "bpi-r2:pio:cust0";
+ gpios = <&pio 18 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+
+ cust-1 {
+ label = "bpi-r2:pio:cust1";
+ gpios = <&pio 19 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+
+ cust-2 {
+ label = "bpi-r2:pio:cust2";
+ gpios = <&pio 21 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+
+ cust-3 {
+ label = "bpi-r2:pio:cust3";
+ gpios = <&pio 22 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+
+ cust-4 {
+ label = "bpi-r2:pio:cust4";
+ gpios = <&pio 24 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
+
+ cust-5 {
+ label = "bpi-r2:pio:cust5";
+ gpios = <&pio 25 GPIO_ACTIVE_HIGH>;
+ default-state = "off";
+ };
};
memory@80000000 {
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 9b90f3d3a8f5..3f42fdda373a 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1840,6 +1840,7 @@ mt7530_setup(struct dsa_switch *ds)
ds->mtu_enforcement_ingress = true;
if (priv->id == ID_MT7530) {
+ /*
regulator_set_voltage(priv->core_pwr, 1000000, 1000000);
ret = regulator_enable(priv->core_pwr);
if (ret < 0) {
@@ -1855,6 +1856,7 @@ mt7530_setup(struct dsa_switch *ds)
ret);
return ret;
}
+ */
}
/* Reset whole chip through gpio pin or memory-mapped registers for
@@ -2971,6 +2973,7 @@ mt7530_probe(struct mdio_device *mdiodev)
priv->id = priv->info->id;
+ /*
if (priv->id == ID_MT7530) {
priv->core_pwr = devm_regulator_get(&mdiodev->dev, "core");
if (IS_ERR(priv->core_pwr))
@@ -2980,6 +2983,7 @@ mt7530_probe(struct mdio_device *mdiodev)
if (IS_ERR(priv->io_pwr))
return PTR_ERR(priv->io_pwr);
}
+ */
/* Not MCM that indicates switch works as the remote standalone
* integrated circuit so the GPIO pin would be used to complete
@@ -3011,6 +3015,7 @@ mt7530_remove(struct mdio_device *mdiodev)
struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
int ret = 0;
+ /*
ret = regulator_disable(priv->core_pwr);
if (ret < 0)
dev_err(priv->dev,
@@ -3020,7 +3025,7 @@ mt7530_remove(struct mdio_device *mdiodev)
if (ret < 0)
dev_err(priv->dev, "Failed to disable io pwr: %d\n",
ret);
-
+ */
dsa_unregister_switch(priv->ds);
mutex_destroy(&priv->reg_mutex);
}