summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MAINTAINERS11
-rw-r--r--board/raspberrypi/rpi/rpi.c99
-rw-r--r--boot/image-fit.c4
-rw-r--r--drivers/pinctrl/broadcom/pinctrl-bcm283x.c16
-rw-r--r--tools/Makefile2
5 files changed, 82 insertions, 50 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index d2040fee252..d4b527560aa 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1295,12 +1295,6 @@ F: doc/README.kwbimage
F: doc/kwboot.1
F: tools/kwb*
-LED
-M: Ivan Vozvakhov <[email protected]>
-S: Supported
-F: doc/device-tree-bindings/leds/leds-pwm.txt
-F: drivers/led/led_pwm.c
-
LOGGING
M: Simon Glass <[email protected]>
S: Maintained
@@ -1599,6 +1593,11 @@ S: Maintained
T: git https://source.denx.de/u-boot/custodians/u-boot-mpc85xx.git
F: arch/powerpc/cpu/mpc85xx/
+PWM LED
+S: Orphan
+F: doc/device-tree-bindings/leds/leds-pwm.txt
+F: drivers/led/led_pwm.c
+
QEMU VIRTUAL SYSTEM CONTROLLER
M: Kuan-Wei Chiu <[email protected]>
S: Maintained
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index f9b643555dd..7f69e5b6163 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -94,120 +94,128 @@ struct efi_capsule_update_info update_info = {
*/
struct rpi_model {
const char *name;
- const char *fdtfile;
+ const char * const *fdtfiles;
+ size_t fdtcount;
bool has_onboard_eth;
};
+#define FDTFILES(...) \
+ (const char *[]){ __VA_ARGS__ }, \
+ sizeof((const char *[]){ __VA_ARGS__ }) / sizeof(const char *)
+
static const struct rpi_model rpi_model_unknown = {
"Unknown model",
- DTB_DIR "bcm283x-rpi-other.dtb",
+ FDTFILES(DTB_DIR "bcm283x-rpi-other.dtb"),
false,
};
static const struct rpi_model rpi_models_new_scheme[] = {
[0x0] = {
"Model A",
- DTB_DIR "bcm2835-rpi-a.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-a.dtb"),
false,
},
[0x1] = {
"Model B",
- DTB_DIR "bcm2835-rpi-b.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-b.dtb"),
true,
},
[0x2] = {
"Model A+",
- DTB_DIR "bcm2835-rpi-a-plus.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-a-plus.dtb"),
false,
},
[0x3] = {
"Model B+",
- DTB_DIR "bcm2835-rpi-b-plus.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-b-plus.dtb"),
true,
},
[0x4] = {
"2 Model B",
- DTB_DIR "bcm2836-rpi-2-b.dtb",
+ FDTFILES(DTB_DIR "bcm2836-rpi-2-b.dtb"),
true,
},
[0x6] = {
"Compute Module",
- DTB_DIR "bcm2835-rpi-cm.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-cm.dtb"),
false,
},
[0x8] = {
"3 Model B",
- DTB_DIR "bcm2837-rpi-3-b.dtb",
+ FDTFILES(DTB_DIR "bcm2837-rpi-3-b.dtb"),
true,
},
[0x9] = {
"Zero",
- DTB_DIR "bcm2835-rpi-zero.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-zero.dtb"),
false,
},
[0xA] = {
"Compute Module 3",
- DTB_DIR "bcm2837-rpi-cm3.dtb",
+ FDTFILES(DTB_DIR "bcm2837-rpi-cm3.dtb"),
false,
},
[0xC] = {
"Zero W",
- DTB_DIR "bcm2835-rpi-zero-w.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-zero-w.dtb"),
false,
},
[0xD] = {
"3 Model B+",
- DTB_DIR "bcm2837-rpi-3-b-plus.dtb",
+ FDTFILES(DTB_DIR "bcm2837-rpi-3-b-plus.dtb"),
true,
},
[0xE] = {
"3 Model A+",
- DTB_DIR "bcm2837-rpi-3-a-plus.dtb",
+ FDTFILES(DTB_DIR "bcm2837-rpi-3-a-plus.dtb"),
false,
},
[0x10] = {
"Compute Module 3+",
- DTB_DIR "bcm2837-rpi-cm3.dtb",
+ FDTFILES(DTB_DIR "bcm2837-rpi-cm3.dtb"),
false,
},
[0x11] = {
"4 Model B",
- DTB_DIR "bcm2711-rpi-4-b.dtb",
+ FDTFILES(DTB_DIR "bcm2711-rpi-4-b.dtb"),
true,
},
[0x12] = {
"Zero 2 W",
- DTB_DIR "bcm2837-rpi-zero-2-w.dtb",
+ FDTFILES(DTB_DIR "bcm2837-rpi-zero-2-w.dtb"),
false,
},
[0x13] = {
"400",
- DTB_DIR "bcm2711-rpi-400.dtb",
+ FDTFILES(DTB_DIR "bcm2711-rpi-400.dtb"),
true,
},
[0x14] = {
"Compute Module 4",
- DTB_DIR "bcm2711-rpi-cm4.dtb",
+ FDTFILES(DTB_DIR "bcm2711-rpi-cm4.dtb"),
true,
},
[0x17] = {
"5 Model B",
- DTB_DIR "bcm2712-rpi-5-b.dtb",
+ FDTFILES(
+ [0] = DTB_DIR "bcm2712-rpi-5-b.dtb",
+ [1] = DTB_DIR "bcm2712d0-rpi-5-b.dtb"
+ ),
true,
},
[0x18] = {
"Compute Module 5",
- DTB_DIR "bcm2712-rpi-cm5-cm5io.dtb",
+ FDTFILES(DTB_DIR "bcm2712-rpi-cm5-cm5io.dtb"),
true,
},
[0x19] = {
"500",
- DTB_DIR "bcm2712-rpi-500.dtb",
+ FDTFILES(DTB_DIR "bcm2712-rpi-500.dtb"),
true,
},
[0x1A] = {
"Compute Module 5 Lite",
- DTB_DIR "bcm2712-rpi-cm5l-cm5io.dtb",
+ FDTFILES(DTB_DIR "bcm2712-rpi-cm5l-cm5io.dtb"),
true,
},
};
@@ -215,87 +223,87 @@ static const struct rpi_model rpi_models_new_scheme[] = {
static const struct rpi_model rpi_models_old_scheme[] = {
[0x2] = {
"Model B",
- DTB_DIR "bcm2835-rpi-b.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-b.dtb"),
true,
},
[0x3] = {
"Model B",
- DTB_DIR "bcm2835-rpi-b.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-b.dtb"),
true,
},
[0x4] = {
"Model B rev2",
- DTB_DIR "bcm2835-rpi-b-rev2.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-b-rev2.dtb"),
true,
},
[0x5] = {
"Model B rev2",
- DTB_DIR "bcm2835-rpi-b-rev2.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-b-rev2.dtb"),
true,
},
[0x6] = {
"Model B rev2",
- DTB_DIR "bcm2835-rpi-b-rev2.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-b-rev2.dtb"),
true,
},
[0x7] = {
"Model A",
- DTB_DIR "bcm2835-rpi-a.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-a.dtb"),
false,
},
[0x8] = {
"Model A",
- DTB_DIR "bcm2835-rpi-a.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-a.dtb"),
false,
},
[0x9] = {
"Model A",
- DTB_DIR "bcm2835-rpi-a.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-a.dtb"),
false,
},
[0xd] = {
"Model B rev2",
- DTB_DIR "bcm2835-rpi-b-rev2.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-b-rev2.dtb"),
true,
},
[0xe] = {
"Model B rev2",
- DTB_DIR "bcm2835-rpi-b-rev2.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-b-rev2.dtb"),
true,
},
[0xf] = {
"Model B rev2",
- DTB_DIR "bcm2835-rpi-b-rev2.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-b-rev2.dtb"),
true,
},
[0x10] = {
"Model B+",
- DTB_DIR "bcm2835-rpi-b-plus.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-b-plus.dtb"),
true,
},
[0x11] = {
"Compute Module",
- DTB_DIR "bcm2835-rpi-cm.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-cm.dtb"),
false,
},
[0x12] = {
"Model A+",
- DTB_DIR "bcm2835-rpi-a-plus.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-a-plus.dtb"),
false,
},
[0x13] = {
"Model B+",
- DTB_DIR "bcm2835-rpi-b-plus.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-b-plus.dtb"),
true,
},
[0x14] = {
"Compute Module",
- DTB_DIR "bcm2835-rpi-cm.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-cm.dtb"),
false,
},
[0x15] = {
"Model A+",
- DTB_DIR "bcm2835-rpi-a-plus.dtb",
+ FDTFILES(DTB_DIR "bcm2835-rpi-a-plus.dtb"),
false,
},
};
@@ -361,11 +369,17 @@ int dram_init_banksize(void)
static void set_fdtfile(void)
{
const char *fdtfile;
+ int rev = revision & 0x0f;
if (env_get("fdtfile"))
return;
- fdtfile = model->fdtfile;
+ /* set the first entry as default */
+ fdtfile = model->fdtfiles[0];
+
+ if (rev < model->fdtcount)
+ fdtfile = model->fdtfiles[rev];
+
env_set("fdtfile", fdtfile);
}
@@ -608,6 +622,9 @@ void update_fdt_from_fw(void *fdt, void *fw_fdt)
/* warnings from the firmware (if any) */
copy_property(fdt, fw_fdt, "/chosen", "user-warnings");
+ /* firmware logs - used by the vclog utility */
+ copy_property(fdt, fw_fdt, "/chosen", "log");
+
/* address of the PHY device as provided by the firmware */
copy_property(fdt, fw_fdt, "ethernet0/mdio@e14/ethernet-phy@1", "reg");
diff --git a/boot/image-fit.c b/boot/image-fit.c
index e7c7212195f..067ad236081 100644
--- a/boot/image-fit.c
+++ b/boot/image-fit.c
@@ -881,7 +881,7 @@ static int fit_image_get_address(const void *fit, int noffset, char *name,
* fit_image_get_load() - get load addr property for given component image node
* @fit: pointer to the FIT format image header
* @noffset: component image node offset
- * @load: pointer to the uint32_t, will hold load address
+ * @load: pointer to the ulong, will hold load address
*
* fit_image_get_load() finds load address property in a given component
* image node. If the property is found, its value is returned to the caller.
@@ -899,7 +899,7 @@ int fit_image_get_load(const void *fit, int noffset, ulong *load)
* fit_image_get_entry() - get entry point address property
* @fit: pointer to the FIT format image header
* @noffset: component image node offset
- * @entry: pointer to the uint32_t, will hold entry point address
+ * @entry: pointer to the ulong, will hold entry point address
*
* This gets the entry point address property for a given component image
* node.
diff --git a/drivers/pinctrl/broadcom/pinctrl-bcm283x.c b/drivers/pinctrl/broadcom/pinctrl-bcm283x.c
index 4ecc8bac645..90eee88eb13 100644
--- a/drivers/pinctrl/broadcom/pinctrl-bcm283x.c
+++ b/drivers/pinctrl/broadcom/pinctrl-bcm283x.c
@@ -30,6 +30,11 @@ struct bcm283x_pinctrl_priv {
#define MAX_PINS_PER_BANK 16
+/* pull states for BCM2711 */
+#define BCM2711_PULL_NONE 0
+#define BCM2711_PULL_UP 1
+#define BCM2711_PULL_DOWN 2
+
static void bcm2835_gpio_set_func_id(struct udevice *dev, unsigned int gpio,
int func)
{
@@ -93,6 +98,17 @@ static void bcm2711_gpio_set_pull(struct udevice *dev, unsigned int gpio, int pu
u32 bit_shift;
u32 pull_bits;
+ if (!device_is_compatible(dev, "brcm,bcm2711-gpio"))
+ return;
+
+ /* BCM2711's pull values differ from BCM2835 */
+ if (pull == BCM2835_PUD_UP)
+ pull = BCM2711_PULL_UP;
+ else if (pull == BCM2835_PUD_DOWN)
+ pull = BCM2711_PULL_DOWN;
+ else
+ pull = BCM2711_PULL_NONE;
+
/* Findout which GPIO_PUP_PDN_CNTRL register to use */
reg_offset = BCM2711_GPPUD_CNTRL_REG0 + BCM2711_PUD_REG_OFFSET(gpio);
diff --git a/tools/Makefile b/tools/Makefile
index 0ac683ac3ec..5d8e8f349e1 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -356,7 +356,7 @@ override HOSTCFLAGS = $(CFLAGS)
quiet_cmd_crosstools_strip = STRIP $^
cmd_crosstools_strip = $(STRIP) $^; touch $@
-$(obj)/.strip: $(call objectify,$(filter $(hostprogs-always-y)))
+$(obj)/.strip: $(call objectify,$(hostprogs-always-y))
$(call cmd,crosstools_strip)
always-y += .strip