2022.10 RC4, rockchip PMIC revert

This commit is contained in:
Peter Robinson 2022-09-06 08:51:21 +01:00
parent d2c989dc32
commit 6134477ebc
4 changed files with 152 additions and 3 deletions

View File

@ -0,0 +1,92 @@
From 17096f20920205200b88d6d8facdbef0d3d3d3e8 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Sun, 4 Sep 2022 22:22:50 +0100
Subject: [PATCH] Revert "power: pmic: rk8xx: Support sysreset shutdown method"
This reverts commit ad607512f5757f4485968efd5bcf2c0245a8a235.
---
drivers/power/pmic/rk8xx.c | 50 +-------------------------------------
1 file changed, 1 insertion(+), 49 deletions(-)
diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c
index 25ef621f8df..8d703112c38 100644
--- a/drivers/power/pmic/rk8xx.c
+++ b/drivers/power/pmic/rk8xx.c
@@ -6,50 +6,10 @@
#include <common.h>
#include <dm.h>
-#include <dm/lists.h>
#include <errno.h>
#include <log.h>
#include <power/rk8xx_pmic.h>
#include <power/pmic.h>
-#include <sysreset.h>
-
-static int rk8xx_sysreset_request(struct udevice *dev, enum sysreset_t type)
-{
- struct rk8xx_priv *priv = dev_get_priv(dev->parent);
-
- if (type != SYSRESET_POWER_OFF)
- return -EPROTONOSUPPORT;
-
- switch (priv->variant) {
- case RK805_ID:
- case RK808_ID:
- case RK816_ID:
- case RK818_ID:
- pmic_clrsetbits(dev->parent, REG_DEVCTRL, 0, BIT(0));
- break;
- case RK809_ID:
- case RK817_ID:
- pmic_clrsetbits(dev->parent, RK817_REG_SYS_CFG3, 0,
- BIT(0));
- break;
- default:
- printf("Unknown PMIC RK%x: Cannot shutdown\n",
- priv->variant);
- return -EPROTONOSUPPORT;
- };
-
- return -EINPROGRESS;
-}
-
-static struct sysreset_ops rk8xx_sysreset_ops = {
- .request = rk8xx_sysreset_request,
-};
-
-U_BOOT_DRIVER(rk8xx_sysreset) = {
- .name = "rk8xx_sysreset",
- .id = UCLASS_SYSRESET,
- .ops = &rk8xx_sysreset_ops,
-};
/* In the event of a plug-in and the appropriate option has been
* selected, we simply shutdown instead of continue the normal boot
@@ -133,7 +93,7 @@ static int rk8xx_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
static int rk8xx_bind(struct udevice *dev)
{
ofnode regulators_node;
- int children, ret;
+ int children;
regulators_node = dev_read_subnode(dev, "regulators");
if (!ofnode_valid(regulators_node)) {
@@ -144,14 +104,6 @@ static int rk8xx_bind(struct udevice *dev)
debug("%s: '%s' - found regulators subnode\n", __func__, dev->name);
- if (CONFIG_IS_ENABLED(SYSRESET)) {
- ret = device_bind_driver_to_node(dev, "rk8xx_sysreset",
- "rk8xx_sysreset",
- dev_ofnode(dev), NULL);
- if (ret)
- return ret;
- }
-
children = pmic_bind_children(dev, regulators_node, pmic_children_info);
if (!children)
debug("%s: %s - no child found\n", __func__, dev->name);
--
2.37.3

51
smbios-test-dmi.patch Normal file
View File

@ -0,0 +1,51 @@
diff --git a/lib/smbios.c b/lib/smbios.c
index d7f4999e8b..0ceb758cb1 100644
--- a/lib/smbios.c
+++ b/lib/smbios.c
@@ -281,9 +281,13 @@ static int smbios_write_type1(ulong *current, int handle,
fill_smbios_header(t, SMBIOS_SYSTEM_INFORMATION, len, handle);
smbios_set_eos(ctx, t->eos);
t->manufacturer = smbios_add_prop(ctx, "manufacturer");
+ if (!t->manufacturer)
+ t->manufacturer = smbios_add_prop(ctx, "compatible");
if (!t->manufacturer)
t->manufacturer = smbios_add_string(ctx, "Unknown");
t->product_name = smbios_add_prop(ctx, "product");
+ if (!t->product_name)
+ t->product_name = smbios_add_prop(ctx, "model");
if (!t->product_name)
t->product_name = smbios_add_string(ctx, "Unknown Product");
t->version = smbios_add_prop_si(ctx, "version",
@@ -315,9 +319,13 @@ static int smbios_write_type2(ulong *current, int handle,
fill_smbios_header(t, SMBIOS_BOARD_INFORMATION, len, handle);
smbios_set_eos(ctx, t->eos);
t->manufacturer = smbios_add_prop(ctx, "manufacturer");
+ if (!t->manufacturer)
+ t->manufacturer = smbios_add_prop(ctx, "compatible");
if (!t->manufacturer)
t->manufacturer = smbios_add_string(ctx, "Unknown");
t->product_name = smbios_add_prop(ctx, "product");
+ if (!t->product_name)
+ t->product_name = smbios_add_prop(ctx, "model");
if (!t->product_name)
t->product_name = smbios_add_string(ctx, "Unknown Product");
t->version = smbios_add_prop_si(ctx, "version",
@@ -344,6 +352,8 @@ static int smbios_write_type3(ulong *current, int handle,
fill_smbios_header(t, SMBIOS_SYSTEM_ENCLOSURE, len, handle);
smbios_set_eos(ctx, t->eos);
t->manufacturer = smbios_add_prop(ctx, "manufacturer");
+ if (!t->manufacturer)
+ t->manufacturer = smbios_add_prop(ctx, "compatible");
if (!t->manufacturer)
t->manufacturer = smbios_add_string(ctx, "Unknown");
t->chassis_type = SMBIOS_ENCLOSURE_DESKTOP;
@@ -503,6 +513,9 @@ ulong write_smbios_table(ulong addr)
if (IS_ENABLED(CONFIG_OF_CONTROL) && method->subnode_name)
ctx.node = ofnode_find_subnode(parent_node,
method->subnode_name);
+ /* If we can't find any smbios node fallback to the entire DT */
+ if (!ofnode_valid(ctx.node))
+ ctx.node = ofnode_root();
tmp = method->write((ulong *)&addr, handle++, &ctx);
max_struct_size = max(max_struct_size, tmp);

View File

@ -1 +1 @@
SHA512 (u-boot-2022.10-rc3.tar.bz2) = 4e4c747525c22180ecf7ad18b6064def4542f08782aaadfd7f6a781a3b7fa1e9474f4d20036a9b62d8265eccc78c361c4b278699d7d81d2721d0a7d504a40d3a
SHA512 (u-boot-2022.10-rc4.tar.bz2) = 678b64480d794af987e462076575db9b3b44a458fca5e68f8f0df5701d40642c4e10e5f2d3daa50513c30d5573a57c0d1f4707178a385ca0509bc1d5412f81ea

View File

@ -1,4 +1,4 @@
%global candidate rc3
%global candidate rc4
%if !0%{?rhel}
%bcond_without toolsonly
%else
@ -7,7 +7,7 @@
Name: uboot-tools
Version: 2022.10
Release: 0.4%{?candidate:.%{candidate}}%{?dist}
Release: 0.5%{?candidate:.%{candidate}}%{?dist}
Summary: U-Boot utilities
License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+
URL: http://www.denx.de/wiki/U-Boot
@ -19,6 +19,7 @@ Source1: aarch64-boards
# Fedoraisms patches
# Needed to find DT on boot partition that's not the first partition
Patch1: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch
Patch2: smbios-test-dmi.patch
# Board fixes and enablement
# RPi - uses RPI firmware device tree for HAT support
@ -28,6 +29,7 @@ Patch5: rpi-bcm2835_sdhost-firmware-managed-clock.patch
Patch6: rpi-Copy-properties-from-firmware-DT-to-loaded-DT.patch
# Rockchips improvements
Patch7: rockchip-Add-initial-support-for-the-PinePhone-Pro.patch
Patch8: 0001-Revert-power-pmic-rk8xx-Support-sysreset-shutdown-me.patch
BuildRequires: bc
BuildRequires: bison
@ -208,6 +210,10 @@ cp -p board/sunxi/README.nand builds/docs/README.sunxi-nand
%endif
%changelog
* Tue Sep 06 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.10-0.5.rc4
- Update to 2022.10 RC4
- Fix for booting Rockchip devices from NVME
* Tue Aug 23 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2022.10-0.4.rc3
- Update to 2022.10 RC3