[U-Boot] [RFC 2/2] sandbox: Update dts files
Tom Rini
trini at konsulko.com
Wed Jun 26 21:33:25 UTC 2019
With a more modern dtc we now get lots of warnings about problems with
the sandbox dts files and then in turn the DM tests. Start addressing
these warnings by using, or not using in some cases, addresses on nodes
and update tests to match.
Cc: Simon Glass <sjg at chromium.org>
Signed-off-by: Tom Rini <trini at konsulko.com>
---
Please note that this is not enough. A few tests are still failing for
the main test.dtb run and I don't see the obvious correction. I also
largely left sandbox64 untouched but it too needs changes.
---
arch/sandbox/dts/sandbox.dts | 22 ++++++++++----------
arch/sandbox/dts/sandbox64.dts | 2 +-
arch/sandbox/dts/test.dts | 46 +++++++++++++++++++++---------------------
include/sandbox-adc.h | 2 +-
test/dm/pmic.c | 2 +-
test/dm/spmi.c | 2 +-
6 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts
index a41b5f052d7b..1f65deec4507 100644
--- a/arch/sandbox/dts/sandbox.dts
+++ b/arch/sandbox/dts/sandbox.dts
@@ -65,7 +65,7 @@
fake-host-hwaddr = [00 00 66 44 22 00];
};
- gpio_a: gpios at 0 {
+ gpio_a: base-gpios {
u-boot,dm-pre-reloc;
gpio-controller;
compatible = "sandbox,gpio";
@@ -74,7 +74,7 @@
sandbox,gpio-count = <20>;
};
- gpio_b: gpios at 1 {
+ gpio_b: extra-gpios {
u-boot,dm-pre-reloc;
gpio-controller;
compatible = "sandbox,gpio";
@@ -89,7 +89,7 @@
sides = <6>;
};
- i2c_0: i2c at 0 {
+ i2c_0: i2c at 10001000 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0 0>;
@@ -108,7 +108,7 @@
compatible = "sandbox-rtc";
sandbox,emul = <&emul0>;
};
- sandbox_pmic: sandbox_pmic {
+ sandbox_pmic: sandbox_pmic at 40 {
reg = <0x40>;
};
@@ -116,7 +116,7 @@
reg = <0x41>;
};
- i2c_emul: emul {
+ i2c_emul: emul at ff {
reg = <0xff>;
compatible = "sandbox,i2c-emul-parent";
emul_eeprom: emul-eeprom {
@@ -194,7 +194,7 @@
};
};
- reset at 1 {
+ reset at 10004000 {
compatible = "sandbox,reset";
};
@@ -209,7 +209,7 @@
};
};
- spi at 0 {
+ spi {
u-boot,dm-pre-reloc;
#address-cells = <1>;
#size-cells = <0>;
@@ -298,7 +298,7 @@
pinctrl-0 = <&pinctrl_serial0>;
};
- usb at 0 {
+ usb0 {
compatible = "sandbox,usb";
status = "disabled";
hub {
@@ -312,7 +312,7 @@
};
};
- usb at 1 {
+ usb1 {
compatible = "sandbox,usb";
hub {
compatible = "usb-hub";
@@ -330,12 +330,12 @@
};
};
- usb at 2 {
+ usb2 {
compatible = "sandbox,usb";
status = "disabled";
};
- spmi: spmi at 0 {
+ spmi: spmi at 1000E000 {
compatible = "sandbox,spmi";
#address-cells = <0x1>;
#size-cells = <0x1>;
diff --git a/arch/sandbox/dts/sandbox64.dts b/arch/sandbox/dts/sandbox64.dts
index a3c95f2cdb21..02f0fc59a88c 100644
--- a/arch/sandbox/dts/sandbox64.dts
+++ b/arch/sandbox/dts/sandbox64.dts
@@ -298,7 +298,7 @@
status = "disabled";
};
- spmi: spmi at 0 {
+ spmi: spmi at 1000E000 {
compatible = "sandbox,spmi";
#address-cells = <0x1>;
#size-cells = <0x1>;
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index 8b2d6451c643..8bcccae16199 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -13,7 +13,7 @@
eth5 = ð_5;
gpio1 = &gpio_a;
gpio2 = &gpio_b;
- i2c0 = "/i2c at 0";
+ i2c0 = "/i2c at 10000000";
mmc0 = "/mmc0";
mmc1 = "/mmc1";
pci0 = &pci0;
@@ -23,7 +23,7 @@
remoteproc2 = &rproc_2;
rtc0 = &rtc_0;
rtc1 = &rtc_1;
- spi0 = "/spi at 0";
+ spi0 = "/spi at 10001000";
testfdt6 = "/e-test";
testbus3 = "/some-bus";
testfdt0 = "/some-bus/c-test at 0";
@@ -127,12 +127,12 @@
ping-add = <3>;
};
- phy_provider0: gen_phy at 0 {
+ phy_provider0: gen_phy at 10009000 {
compatible = "sandbox,phy";
#phy-cells = <1>;
};
- phy_provider1: gen_phy at 1 {
+ phy_provider1: gen_phy at 1000A000 {
compatible = "sandbox,phy";
#phy-cells = <0>;
broken;
@@ -272,7 +272,7 @@
sandbox,gpio-count = <10>;
};
- i2c at 0 {
+ i2c at 10000000 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0 1>;
@@ -296,7 +296,7 @@
sandbox,emul = <&emul1>;
};
- i2c_emul: emul {
+ i2c_emul: emul at ff {
reg = <0xff>;
compatible = "sandbox,i2c-emul-parent";
emul_eeprom: emul-eeprom {
@@ -312,7 +312,7 @@
};
};
- sandbox_pmic: sandbox_pmic {
+ sandbox_pmic: sandbox_pmic at 40 {
reg = <0x40>;
sandbox,emul = <&emul_pmic0>;
};
@@ -323,13 +323,13 @@
};
};
- bootcount at 0 {
+ bootcount at 1000C000 {
compatible = "u-boot,bootcount-rtc";
rtc = <&rtc_1>;
offset = <0x13>;
};
- adc at 0 {
+ adc at 1000B000 {
compatible = "sandbox,adc";
vdd-supply = <&buck2>;
vss-microvolts = <0>;
@@ -521,11 +521,11 @@
compatible = "sandbox,ram";
};
- reset at 0 {
+ reset at 10008000 {
compatible = "sandbox,warm-reset";
};
- reset at 1 {
+ reset at 1000F000 {
compatible = "sandbox,reset";
};
@@ -556,7 +556,7 @@
backlight = <&backlight 0 100>;
};
- smem at 0 {
+ smem at 1000D000 {
compatible = "sandbox,smem";
};
@@ -571,7 +571,7 @@
};
};
- spi at 0 {
+ spi at 10001000 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0 1>;
@@ -585,12 +585,12 @@
};
};
- syscon0: syscon at 0 {
+ syscon0: syscon at 20002000 {
compatible = "sandbox,syscon0";
reg = <0x10 16>;
};
- another_system_controller: syscon at 1 {
+ another_system_controller: syscon at 20003000 {
compatible = "sandbox,syscon1";
reg = <0x20 5
0x28 6
@@ -598,7 +598,7 @@
0x38 8>;
};
- syscon2: syscon at 2 {
+ syscon2: syscon at 20004000 {
compatible = "simple-mfd", "syscon";
reg = <0x40 5
0x48 6
@@ -620,7 +620,7 @@
u-boot,dm-pre-reloc;
};
- usb_0: usb at 0 {
+ usb_0: usb at 10005000 {
compatible = "sandbox,usb";
status = "disabled";
hub {
@@ -634,7 +634,7 @@
};
};
- usb_1: usb at 1 {
+ usb_1: usb at 10006000 {
compatible = "sandbox,usb";
hub {
compatible = "usb-hub";
@@ -670,12 +670,12 @@
};
};
- usb_2: usb at 2 {
+ usb_2: usb at 10007000 {
compatible = "sandbox,usb";
status = "disabled";
};
- spmi: spmi at 0 {
+ spmi: spmi at 1000E000 {
compatible = "sandbox,spmi";
#address-cells = <0x1>;
#size-cells = <0x1>;
@@ -696,11 +696,11 @@
};
};
- wdt0: wdt at 0 {
+ wdt0: wdt at 20005000 {
compatible = "sandbox,wdt";
};
- axi: axi at 0 {
+ axi: axi at 20006000 {
compatible = "sandbox,axi";
#address-cells = <0x1>;
#size-cells = <0x1>;
@@ -788,7 +788,7 @@
compatible = "sandbox,pinctrl";
};
- hwspinlock at 0 {
+ hwspinlock at 20007000 {
compatible = "sandbox,hwspinlock";
};
diff --git a/include/sandbox-adc.h b/include/sandbox-adc.h
index 2017b9cfc2a9..01be5c23f4d4 100644
--- a/include/sandbox-adc.h
+++ b/include/sandbox-adc.h
@@ -7,7 +7,7 @@
#ifndef _SANDBOX_ADC_H_
#define _SANDBOX_ADC_H_
-#define SANDBOX_ADC_DEVNAME "adc at 0"
+#define SANDBOX_ADC_DEVNAME "adc at 1000B000"
#define SANDBOX_ADC_DATA_MASK 0xffff /* 16-bits resolution */
#define SANDBOX_ADC_CHANNELS 4
#define SANDBOX_ADC_CHANNEL0_DATA 0x0
diff --git a/test/dm/pmic.c b/test/dm/pmic.c
index b582329a9c59..8f886568b592 100644
--- a/test/dm/pmic.c
+++ b/test/dm/pmic.c
@@ -39,7 +39,7 @@ static inline int power_pmic_get(struct unit_test_state *uts, char *name)
/* Test PMIC get method */
static int dm_test_power_pmic_get(struct unit_test_state *uts)
{
- power_pmic_get(uts, "sandbox_pmic");
+ power_pmic_get(uts, "sandbox_pmic at 40");
return 0;
}
diff --git a/test/dm/spmi.c b/test/dm/spmi.c
index e6a910859e3a..4790e987def4 100644
--- a/test/dm/spmi.c
+++ b/test/dm/spmi.c
@@ -18,7 +18,7 @@
/* Test if bus childs got probed propperly*/
static int dm_test_spmi_probe(struct unit_test_state *uts)
{
- const char *name = "spmi at 0";
+ const char *name = "spmi at 1000E000";
struct udevice *bus, *dev;
ut_assertok(uclass_get_device(UCLASS_SPMI, 0, &bus));
--
2.7.4
More information about the U-Boot
mailing list