Skip to contentSkip to conversation

spmi: msm: display the PMIC Arb version (debug)

PATCH New Jorge Ramirez-Ortiz 2 participants 6 messages Jan 10, 2018 – Jan 15, 2018 SPMI

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 spmi: msm: display the PMIC Arb version (debug)

From: Jorge Ramirez-Ortiz <[email protected]>

---
 drivers/spmi/spmi-msm.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/spmi/spmi-msm.c +13 -0
index c226913..e9bfbb0 100644
@@ -17,6 +17,11 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+
+/* PMIC Arbiter configuration registers */
+#define PMIC_ARB_VERSION		0x0000
+#define PMIC_ARB_VERSION_V2_MIN		0x20010000
+
 #define ARB_CHANNEL_OFFSET(n)		(0x4 * (n))
 #define SPMI_CH_OFFSET(chnl)		((chnl) * 0x8000)
 
@@ -148,6 +153,8 @@ static int msm_spmi_probe(struct udevice *dev)
 	struct udevice *parent = dev->parent;
 	struct msm_spmi_priv *priv = dev_get_priv(dev);
 	int node = dev_of_offset(dev);
+	u32 hw_ver;
+	bool is_v1;
 	int i;
 
 	priv->arb_chnl = devfdt_get_addr(dev);
@@ -155,6 +162,12 @@ static int msm_spmi_probe(struct udevice *dev)
 			dev_of_offset(parent), node, "reg", 1, NULL, false);
 	priv->spmi_obs = fdtdec_get_addr_size_auto_parent(gd->fdt_blob,
 			dev_of_offset(parent), node, "reg", 2, NULL, false);
+
+	hw_ver = readl(priv->arb_chnl + PMIC_ARB_VERSION - 0x800);
+	is_v1  = (hw_ver < PMIC_ARB_VERSION_V2_MIN);
+
+	dev_dbg(dev, "PMIC Arb Version-%d (0x%x)\n", (is_v1 ? 1 : 2), hw_ver);
+
 	if (priv->arb_chnl == FDT_ADDR_T_NONE ||
 	    priv->spmi_core == FDT_ADDR_T_NONE ||
 	    priv->spmi_obs == FDT_ADDR_T_NONE)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/3 poplar: configs: increase gunzip buffer size for the kernel

From: Jorge Ramirez-Ortiz <[email protected]>

---
 include/configs/poplar.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/poplar.h +1 -1
index 1c39ed1..8a12b52 100644
@@ -18,7 +18,7 @@
 #define CONFIG_NR_DRAM_BANKS			2
 
 /* SYS */
-#define CONFIG_SYS_BOOTM_LEN			0x1400000
+#define CONFIG_SYS_BOOTM_LEN			SZ_64M
 #define CONFIG_SYS_INIT_SP_ADDR			0x200000
 #define CONFIG_SYS_LOAD_ADDR			0x800000
 #define CONFIG_SYS_MALLOC_LEN			SZ_32M
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/3 poplar: configs: increase gunzip buffer size for the kernel

Quoted 3 lines · Jorge Ramirez-Ortiz

From: Jorge Ramirez-Ortiz <[email protected]>

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180115/7b4b6679/attachment.sig>
#3 lore raw

PATCH 3/3 dm: core: parse chosen node

In reply to Jorge Ramirez-Ortiz

From: Rob Clark <[email protected]>

This is the node that would contain, for example, the framebuffer setup by an earlier stage.

---
 arch/sandbox/dts/test.dts |  7 +++++++
 drivers/core/root.c       | 12 ++++++++++++
 test/dm/bus.c             |  2 +-
 test/dm/test-fdt.c        |  2 +-
 4 files changed, 21 insertions(+), 2 deletions(-)
arch/sandbox/dts/test.dts +7 -0
index e67d428..3f9e788 100644
@@ -478,6 +478,13 @@
 	wdt0: wdt at 0 {
 		compatible = "sandbox,wdt";
 	};
+
+	chosen {
+		chosen-test {
+			compatible = "denx,u-boot-fdt-test";
+			reg = <9 1>;
+		};
+	};
 };
 
 #include "sandbox_pmic.dtsi"
drivers/core/root.c +12 -0
index 976e2c4..5a1c599 100644
@@ -266,6 +266,18 @@ static int dm_scan_fdt_node(struct udevice *parent, const void *blob,
 	for (offset = fdt_first_subnode(blob, offset);
 	     offset > 0;
 	     offset = fdt_next_subnode(blob, offset)) {
+
+		/* "chosen" node isn't a device itself but may contain some: */
+		if (!strcmp(fdt_get_name(blob, offset, NULL), "chosen")) {
+			pr_debug("parsing subnodes of \"chosen\"\n");
+
+			err = dm_scan_fdt_node(parent, blob, offset,
+					       pre_reloc_only);
+			if (err && !ret)
+				ret = err;
+			continue;
+		}
+
 		if (pre_reloc_only &&
 		    !dm_fdt_pre_reloc(blob, offset))
 			continue;
test/dm/bus.c +1 -1
index 7006d41..1da398a 100644
@@ -105,7 +105,7 @@ UCLASS_DRIVER(testbus) = {
 /* Test that we can probe for children */
 static int dm_test_bus_children(struct unit_test_state *uts)
 {
-	int num_devices = 6;
+	int num_devices = 7;
 	struct udevice *bus;
 	struct uclass *uc;
 
test/dm/test-fdt.c +1 -1
index dcc2ef8..920ccbf 100644
@@ -167,7 +167,7 @@ int dm_check_devices(struct unit_test_state *uts, int num_devices)
 /* Test that FDT-based binding works correctly */
 static int dm_test_fdt(struct unit_test_state *uts)
 {
-	const int num_devices = 6;
+	const int num_devices = 7;
 	struct udevice *dev;
 	struct uclass *uc;
 	int ret;
Signature · 1 line
2.7.4
#4 lore raw

PATCH 3/3 dm: core: parse chosen node

Quoted 6 lines · Jorge Ramirez-Ortiz

From: Rob Clark <[email protected]>

This is the node that would contain, for example, the framebuffer setup by an earlier stage.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180115/aeb70dbf/attachment.sig>
#5 lore raw

PATCH 1/3 spmi: msm: display the PMIC Arb version (debug)

In reply to Jorge Ramirez-Ortiz
Quoted 3 lines · Jorge Ramirez-Ortiz

From: Jorge Ramirez-Ortiz <[email protected]>

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180115/de0681e2/attachment.sig>