sys-kernel/decade-sources: add 5.14 patches
This commit is contained in:
parent
0a3cd249be
commit
a3e51e0aaf
7 changed files with 191 additions and 109 deletions
|
@ -22,6 +22,7 @@ DECADE_PATCHES=(
|
|||
"${FILESDIR}/board-nanopi-m4v2-dts-add-sound-card.patch"
|
||||
"${FILESDIR}/board-nanopi-m4v2-dts-ethernet-tweak.patch"
|
||||
"${FILESDIR}/board-nanopi-m4v2-dts-fix-stability-issues.patch"
|
||||
"${FILESDIR}/board-nanopi-r2s-r8152-mac-from-dt.patch"
|
||||
"${FILESDIR}/board-roc-rk3399-pc-fix-fusb302-compatible.patch"
|
||||
"${FILESDIR}/board-rockpis-0004-ethernet-stmmac-dwmac-rk-Add-MAC-driver-support-for-.patch"
|
||||
"${FILESDIR}/board-rockpis-0008-thermal-rockchip-add-tsadc-support-for-rk3308.patch"
|
||||
|
@ -32,7 +33,9 @@ DECADE_PATCHES=(
|
|||
"${FILESDIR}/board-rockpis-0022-ASoC-rk3308_codec-replace-codec-to-component.patch"
|
||||
"${FILESDIR}/general-emmc-hs400es-init-tweak.patch"
|
||||
"${FILESDIR}/general-fix-es8316-kernel-panic.patch"
|
||||
"${FILESDIR}/general-fix-mmc-signal-voltage-before-reboot.patch"
|
||||
"${FILESDIR}/general-increasing_DMA_block_memory_allocation_to_2048.patch"
|
||||
"${FILESDIR}/general-rk808-configurable-switch-voltage-steps.patch"
|
||||
"${FILESDIR}/general-rt5651-add-mclk.patch"
|
||||
"${FILESDIR}/rk3399-add-sclk-i2sout-src-clock.patch"
|
||||
"${FILESDIR}/rk3399-enable-dwc3-xhci-usb-trb-quirk.patch"
|
|
@ -1,15 +1,3 @@
|
|||
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
index c3e00c0e2db7..c41203318e3a 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -34,6 +34,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-kobol-helios64.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-leez-p710.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopc-t4.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-m4.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-m4v2.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-m4b.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-neo4.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-r4s.dtb
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4v2.dts b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4v2.dts
|
||||
new file mode 100644
|
||||
index 000000000..60358ab8c
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
From 27dfe6f4347e883fd618d5a37500c7f6d3652fb9 Mon Sep 17 00:00:00 2001
|
||||
From: hmz007 <hmz007@gmail.com>
|
||||
Date: Fri, 22 Nov 2019 19:03:00 +0800
|
||||
Subject: [PATCH] r8152: support to get MAC address from device tree
|
||||
|
||||
Signed-off-by: hmz007 <hmz007@gmail.com>
|
||||
---
|
||||
drivers/net/usb/r8152.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
|
||||
index b2507c59ba8b..eb78f6d9390c 100644
|
||||
--- a/drivers/net/usb/r8152.c
|
||||
+++ b/drivers/net/usb/r8152.c
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <linux/signal.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/module.h>
|
||||
+#include <linux/of_net.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/mii.h>
|
||||
@@ -1298,6 +1299,17 @@ static int determine_ethernet_addr(struct r8152 *tp, struct sockaddr *sa)
|
||||
if (ret < 0) {
|
||||
netif_err(tp, probe, dev, "Get ether addr fail\n");
|
||||
} else if (!is_valid_ether_addr(sa->sa_data)) {
|
||||
+ /* try to get MAC address from DT */
|
||||
+ if (tp->udev->dev.of_node) {
|
||||
+ const u8 *mac = of_get_mac_address(tp->udev->dev.of_node);
|
||||
+ if (!IS_ERR(mac) && is_valid_ether_addr(mac)) {
|
||||
+ ether_addr_copy(sa->sa_data, mac);
|
||||
+ netif_info(tp, probe, dev, "DT mac addr %pM\n",
|
||||
+ sa->sa_data);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
netif_err(tp, probe, dev, "Invalid ether addr %pM\n",
|
||||
sa->sa_data);
|
||||
eth_hw_addr_random(dev);
|
|
@ -11,22 +11,22 @@ Subject: [PATCH] thermal: rockchip: add tsadc support for rk3308
|
|||
Change-Id: Ibf1782ca471c8ad4b14d6fd64eeb123181903adc
|
||||
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
|
||||
---
|
||||
.../bindings/thermal/rockchip-thermal.txt | 1 +
|
||||
.../bindings/thermal/rockchip-thermal.yaml | 1 +
|
||||
drivers/thermal/rockchip_thermal.c | 28 +++++++++++++++++++
|
||||
2 files changed, 29 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
|
||||
diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml b/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml
|
||||
index c6aac9bcacf1..3a0a9556680e 100644
|
||||
--- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
|
||||
+++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
|
||||
@@ -6,6 +6,7 @@ Required properties:
|
||||
"rockchip,rv1108-tsadc": found on RV1108 SoCs
|
||||
"rockchip,rk3228-tsadc": found on RK3228 SoCs
|
||||
"rockchip,rk3288-tsadc": found on RK3288 SoCs
|
||||
+ "rockchip,rk3308-tsadc": found on RK3308 SoCs
|
||||
"rockchip,rk3328-tsadc": found on RK3328 SoCs
|
||||
"rockchip,rk3368-tsadc": found on RK3368 SoCs
|
||||
"rockchip,rk3399-tsadc": found on RK3399 SoCs
|
||||
--- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml
|
||||
+++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml
|
||||
@@ -16,6 +16,7 @@
|
||||
- rockchip,rv1108-tsadc # RV1108 SoCs
|
||||
- rockchip,rk3228-tsadc # RK3228 SoCs
|
||||
- rockchip,rk3288-tsadc # RK3288 SoCs
|
||||
+ - rockchip,rk3308-tsadc # RK3308 SoCs
|
||||
- rockchip,rk3328-tsadc # RK3328 SoCs
|
||||
- rockchip,rk3368-tsadc # RK3368 SoCs
|
||||
- rockchip,rk3399-tsadc # RK3399 SoCs
|
||||
diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
|
||||
index 343c2f5c5a25..d4d66724535a 100644
|
||||
--- a/drivers/thermal/rockchip_thermal.c
|
||||
|
@ -75,4 +75,3 @@ index 343c2f5c5a25..d4d66724535a 100644
|
|||
.data = (void *)&rk3328_tsadc_data,
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
|
|
@ -199,87 +199,6 @@ index 61c984f10d8e..e6125ebfe5a9 100644
|
|||
}
|
||||
|
||||
static int rockchip_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
|
||||
@@ -186,7 +214,9 @@ static int rockchip_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
|
||||
{
|
||||
struct rk_i2s_dev *i2s = to_info(cpu_dai);
|
||||
unsigned int mask = 0, val = 0;
|
||||
+ int ret = 0;
|
||||
|
||||
+ pm_runtime_get_sync(cpu_dai->dev);
|
||||
mask = I2S_CKR_MSS_MASK;
|
||||
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
|
||||
case SND_SOC_DAIFMT_CBS_CFS:
|
||||
@@ -199,7 +229,8 @@ static int rockchip_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
|
||||
i2s->is_master_mode = false;
|
||||
break;
|
||||
default:
|
||||
- return -EINVAL;
|
||||
+ ret = -EINVAL;
|
||||
+ goto err_pm_put;
|
||||
}
|
||||
|
||||
regmap_update_bits(i2s->regmap, I2S_CKR, mask, val);
|
||||
@@ -213,7 +244,8 @@ static int rockchip_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
|
||||
val = I2S_CKR_CKP_POS;
|
||||
break;
|
||||
default:
|
||||
- return -EINVAL;
|
||||
+ ret = -EINVAL;
|
||||
+ goto err_pm_put;
|
||||
}
|
||||
|
||||
regmap_update_bits(i2s->regmap, I2S_CKR, mask, val);
|
||||
@@ -229,14 +261,15 @@ static int rockchip_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
|
||||
case SND_SOC_DAIFMT_I2S:
|
||||
val = I2S_TXCR_IBM_NORMAL;
|
||||
break;
|
||||
- case SND_SOC_DAIFMT_DSP_A: /* PCM no delay mode */
|
||||
- val = I2S_TXCR_TFS_PCM;
|
||||
- break;
|
||||
- case SND_SOC_DAIFMT_DSP_B: /* PCM delay 1 mode */
|
||||
+ case SND_SOC_DAIFMT_DSP_A: /* PCM delay 1 bit mode */
|
||||
val = I2S_TXCR_TFS_PCM | I2S_TXCR_PBM_MODE(1);
|
||||
break;
|
||||
+ case SND_SOC_DAIFMT_DSP_B: /* PCM no delay mode */
|
||||
+ val = I2S_TXCR_TFS_PCM;
|
||||
+ break;
|
||||
default:
|
||||
- return -EINVAL;
|
||||
+ ret = -EINVAL;
|
||||
+ goto err_pm_put;
|
||||
}
|
||||
|
||||
regmap_update_bits(i2s->regmap, I2S_TXCR, mask, val);
|
||||
@@ -252,19 +285,23 @@ static int rockchip_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
|
||||
case SND_SOC_DAIFMT_I2S:
|
||||
val = I2S_RXCR_IBM_NORMAL;
|
||||
break;
|
||||
- case SND_SOC_DAIFMT_DSP_A: /* PCM no delay mode */
|
||||
- val = I2S_RXCR_TFS_PCM;
|
||||
- break;
|
||||
- case SND_SOC_DAIFMT_DSP_B: /* PCM delay 1 mode */
|
||||
+ case SND_SOC_DAIFMT_DSP_A: /* PCM delay 1 bit mode */
|
||||
val = I2S_RXCR_TFS_PCM | I2S_RXCR_PBM_MODE(1);
|
||||
break;
|
||||
+ case SND_SOC_DAIFMT_DSP_B: /* PCM no delay mode */
|
||||
+ val = I2S_RXCR_TFS_PCM;
|
||||
+ break;
|
||||
default:
|
||||
- return -EINVAL;
|
||||
+ ret = -EINVAL;
|
||||
+ goto err_pm_put;
|
||||
}
|
||||
|
||||
regmap_update_bits(i2s->regmap, I2S_RXCR, mask, val);
|
||||
|
||||
- return 0;
|
||||
+err_pm_put:
|
||||
+ pm_runtime_put(cpu_dai->dev);
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream,
|
||||
@@ -272,17 +309,16 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
|
@ -301,7 +220,7 @@ index 61c984f10d8e..e6125ebfe5a9 100644
|
|||
div_lrck = bclk_rate / params_rate(params);
|
||||
regmap_update_bits(i2s->regmap, I2S_CKR,
|
||||
I2S_CKR_MDIV_MASK,
|
||||
@@ -372,13 +408,6 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream,
|
||||
@@ -408,13 +408,6 @@
|
||||
regmap_update_bits(i2s->regmap, I2S_DMACR, I2S_DMACR_RDL_MASK,
|
||||
I2S_DMACR_RDL(16));
|
||||
|
||||
|
@ -325,7 +244,7 @@ index 61c984f10d8e..e6125ebfe5a9 100644
|
|||
ret = clk_set_rate(i2s->mclk, freq);
|
||||
if (ret)
|
||||
dev_err(i2s->dev, "Fail to set mclk %d\n", ret);
|
||||
@@ -471,7 +497,6 @@ static struct snd_soc_dai_driver rockchip_i2s_dai = {
|
||||
@@ -504,7 +497,6 @@
|
||||
SNDRV_PCM_FMTBIT_S32_LE),
|
||||
},
|
||||
.ops = &rockchip_i2s_dai_ops,
|
||||
|
@ -2060,4 +1979,3 @@ index 1a28523cfd82..3a69fa276f8f 100644
|
|||
#endif /* _ROCKCHIP_I2S_TDM_H */
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
From ae85f92289509b44f291d2a95b858a36f7444aaa Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sun, 17 Feb 2019 22:14:38 +0000
|
||||
Subject: [PATCH] mmc: core: set initial signal voltage on power off
|
||||
|
||||
Some boards have SD card connectors where the power rail cannot be switched
|
||||
off by the driver. If the card has not been power cycled, it may still be
|
||||
using 1.8V signaling after a warm re-boot. Bootroms expecting 3.3V signaling
|
||||
will fail to boot from a UHS card that continue to use 1.8V signaling.
|
||||
|
||||
Set initial signal voltage in mmc_power_off() to allow re-boot to function.
|
||||
|
||||
This fixes re-boot with UHS cards on Asus Tinker Board (Rockchip RK3288),
|
||||
same issue have been seen on some Rockchip RK3399 boards.
|
||||
|
||||
I am sending this as a RFC because I have no insights into SD/MMC subsystem,
|
||||
this change fix a re-boot issue on my boards and does not break emmc/sdio.
|
||||
Is this an acceptable workaround? Any advice is appreciated.
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/mmc/core/core.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
|
||||
index d42037f0f..019dc3555 100644
|
||||
--- a/drivers/mmc/core/core.c
|
||||
+++ b/drivers/mmc/core/core.c
|
||||
@@ -1349,6 +1349,14 @@ void mmc_power_off(struct mmc_host *host)
|
||||
if (host->ios.power_mode == MMC_POWER_OFF)
|
||||
return;
|
||||
|
||||
+ mmc_set_initial_signal_voltage(host);
|
||||
+
|
||||
+ /*
|
||||
+ * This delay should be sufficient to allow the power supply
|
||||
+ * to reach the minimum voltage.
|
||||
+ */
|
||||
+ mmc_delay(host->ios.power_delay_ms);
|
||||
+
|
||||
mmc_pwrseq_power_off(host);
|
||||
|
||||
host->ios.clock = 0;
|
|
@ -0,0 +1,91 @@
|
|||
This patch allows to change the way that BUCK1 and BUCK2 of rk808 PMIC set voltage.
|
||||
|
||||
It allows to change the hardcoded max. 100mV per one change
|
||||
to any multiple of 12.5mV while keeping the 100mV default.
|
||||
|
||||
It was observed that making the steps smaller (eg. 50mV = 4 * 12.5mV)
|
||||
makes the NanoPi M4V2 running stable.
|
||||
|
||||
One can configure the max number of steps per single change using
|
||||
the "max-buck-steps-per-change" property of rk808 node in device tree.
|
||||
|
||||
Below example ensures that voltage is not changed in jumps larger than 50mV:
|
||||
|
||||
&rk808 {
|
||||
max-buck-steps-per-change = <4>;
|
||||
}
|
||||
|
||||
Be aware that changing this parameter affects the time taken to switch between
|
||||
OPPs of LiTTLE cores of rk3399.
|
||||
|
||||
For overclocked LiTTLE cores with base 408MHz @ 0.825V
|
||||
and max. 1.5GHz @ 1.2V it will take 7 steps of 50mV (at least 65uS each - caused by i2c),
|
||||
the final 25mV step and 1uS to settle: 7 x 65uS + 1uS = 456uS.
|
||||
|
||||
With default setting it would be 3 steps of 100mV (at least 65uS each - caused by i2c),
|
||||
the final 75mV step and 1uS to settle: 3 x 65uS + 1uS = 196uS.
|
||||
|
||||
Signed-off-by: Piotr Szczepanik <piter75@gmail.com>
|
||||
|
||||
diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c
|
||||
index e926c1a85..cc3ec4803 100644
|
||||
--- a/drivers/regulator/rk808-regulator.c
|
||||
+++ b/drivers/regulator/rk808-regulator.c
|
||||
@@ -156,6 +156,7 @@
|
||||
|
||||
struct rk808_regulator_data {
|
||||
struct gpio_desc *dvs_gpio[2];
|
||||
+ unsigned max_buck_steps_per_change;
|
||||
};
|
||||
|
||||
static const int rk808_buck_config_regs[] = {
|
||||
@@ -239,7 +240,8 @@ static int rk808_buck1_2_get_voltage_sel_regmap(struct regulator_dev *rdev)
|
||||
}
|
||||
|
||||
static int rk808_buck1_2_i2c_set_voltage_sel(struct regulator_dev *rdev,
|
||||
- unsigned sel)
|
||||
+ unsigned sel,
|
||||
+ int max_steps)
|
||||
{
|
||||
int ret, delta_sel;
|
||||
unsigned int old_sel, tmp, val, mask = rdev->desc->vsel_mask;
|
||||
@@ -258,8 +260,8 @@ static int rk808_buck1_2_i2c_set_voltage_sel(struct regulator_dev *rdev,
|
||||
* the risk of overshoot. Put it into a multi-step, can effectively
|
||||
* avoid this problem, a step is 100mv here.
|
||||
*/
|
||||
- while (delta_sel > MAX_STEPS_ONE_TIME) {
|
||||
- old_sel += MAX_STEPS_ONE_TIME;
|
||||
+ while (delta_sel > max_steps) {
|
||||
+ old_sel += max_steps;
|
||||
val = old_sel << (ffs(mask) - 1);
|
||||
val |= tmp;
|
||||
|
||||
@@ -293,12 +295,13 @@ static int rk808_buck1_2_set_voltage_sel(struct regulator_dev *rdev,
|
||||
struct rk808_regulator_data *pdata = rdev_get_drvdata(rdev);
|
||||
int id = rdev_get_id(rdev);
|
||||
struct gpio_desc *gpio = pdata->dvs_gpio[id];
|
||||
+ int max_steps = pdata->max_buck_steps_per_change;
|
||||
unsigned int reg = rdev->desc->vsel_reg;
|
||||
unsigned old_sel;
|
||||
int ret, gpio_level;
|
||||
|
||||
if (!gpio)
|
||||
- return rk808_buck1_2_i2c_set_voltage_sel(rdev, sel);
|
||||
+ return rk808_buck1_2_i2c_set_voltage_sel(rdev, sel, max_steps);
|
||||
|
||||
gpio_level = gpiod_get_value(gpio);
|
||||
if (gpio_level == 0) {
|
||||
@@ -1292,6 +1295,12 @@ static int rk808_regulator_dt_parse_pdata(struct device *dev,
|
||||
0 : tmp);
|
||||
}
|
||||
|
||||
+ tmp = of_property_read_u32(client_dev->of_node, "max-buck-steps-per-change", &pdata->max_buck_steps_per_change);
|
||||
+ if (tmp) {
|
||||
+ pdata->max_buck_steps_per_change = MAX_STEPS_ONE_TIME;
|
||||
+ }
|
||||
+ dev_info(dev, "max buck steps per change: %d\n", pdata->max_buck_steps_per_change);
|
||||
+
|
||||
dt_parse_end:
|
||||
of_node_put(np);
|
||||
return ret;
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue