]> git.sur5r.net Git - u-boot/blobdiff - board/raspberrypi/rpi/rpi.c
rpi: Remove runtime disabling support for serial
[u-boot] / board / raspberrypi / rpi / rpi.c
index 530f1496171b406875b2d31d6c08f30aeadf306b..177f4af265e510889d16f0a42c9fc6c2a446f049 100644 (file)
@@ -24,6 +24,7 @@
 #include <asm/armv8/mmu.h>
 #endif
 #include <watchdog.h>
+#include <dm/pinctrl.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -105,6 +106,11 @@ static const struct rpi_model rpi_models_new_scheme[] = {
                DTB_DIR "bcm2835-rpi-zero.dtb",
                false,
        },
+       [0xC] = {
+               "Zero W",
+               DTB_DIR "bcm2835-rpi-zero-w.dtb",
+               false,
+       },
 };
 
 static const struct rpi_model rpi_models_old_scheme[] = {
@@ -414,54 +420,11 @@ static void get_board_rev(void)
        printf("RPI %s (0x%x)\n", model->name, revision);
 }
 
-#ifndef CONFIG_PL01X_SERIAL
-static bool rpi_is_serial_active(void)
-{
-       int serial_gpio = 15;
-       struct udevice *dev;
-
-       /*
-        * The RPi3 disables the mini uart by default. The easiest way to find
-        * out whether it is available is to check if the RX pin is muxed.
-        */
-
-       if (uclass_first_device(UCLASS_GPIO, &dev) || !dev)
-               return true;
-
-       if (bcm2835_gpio_get_func_id(dev, serial_gpio) != BCM2835_GPIO_ALT5)
-               return false;
-
-       return true;
-}
-
-/* Disable mini-UART I/O if it's not pinmuxed to our pins.
- * The firmware only enables it if explicitly done in config.txt: enable_uart=1
- */
-static void rpi_disable_inactive_uart(void)
-{
-       struct udevice *dev;
-       struct bcm283x_mu_serial_platdata *plat;
-
-       if (uclass_get_device_by_driver(UCLASS_SERIAL,
-                                       DM_GET_DRIVER(serial_bcm283x_mu),
-                                       &dev) || !dev)
-               return;
-
-       if (!rpi_is_serial_active()) {
-               plat = dev_get_platdata(dev);
-               plat->disabled = true;
-       }
-}
-#endif
-
 int board_init(void)
 {
 #ifdef CONFIG_HW_WATCHDOG
        hw_watchdog_init();
 #endif
-#ifndef CONFIG_PL01X_SERIAL
-       rpi_disable_inactive_uart();
-#endif
 
        get_board_rev();