linguini1 commented on code in PR #18499:
URL: https://github.com/apache/nuttx/pull/18499#discussion_r2896977351


##########
boards/arm64/bcm2711/raspberrypi-4b/src/rpi4b.h:
##########
@@ -61,4 +61,57 @@ int rpi4b_sdmmc_initialize(void);
 int bcm2711_dev_gpio_init(void);
 #endif /* defined(CONFIG_DEV_GPIO) */
 
+/* == UART == */
+
+/* UART 0: GPIO 14 (ALT0=0) and GPIO 15 (ALT0=0) */
+#if (CONFIG_RPI4B_GPIO14 == 0) && (CONFIG_RPI4B_GPIO15 == 0)
+#  define RPI4B_UART0
+#endif
+
+/* UART 1: GPIO 14 (ALT5=5) and GPIO 15 (ALT5=5) */
+#if (CONFIG_RPI4B_GPIO14 == 5) && (CONFIG_RPI4B_GPIO15 == 5)
+#  define RPI4B_UART1
+#endif
+
+/* UART 2: GPIO 0 (ALT4=4) and GPIO 1 (ALT4=4) */
+#if (CONFIG_RPI4B_GPIO0 == 4) && (CONFIG_RPI4B_GPIO1 == 4)
+#  define RPI4B_UART2
+#endif
+
+/* UART 3: GPIO 4 (ALT4=4) and GPIO 5 (ALT4=4) */
+#if (CONFIG_RPI4B_GPIO4 == 4) && (CONFIG_RPI4B_GPIO5 == 4)
+#  define RPI4B_UART3
+#endif
+
+/* UART 4: GPIO 8 (ALT4=4) and GPIO 9 (ALT4=4) */
+#if (CONFIG_RPI4B_GPIO8 == 4) && (CONFIG_RPI4B_GPIO9 == 4)
+#  define RPI4B_UART4
+#endif
+
+/* UART 5: GPIO 12 (ALT4=4) and GPIO 13 (ALT4=4) */
+#if (CONFIG_RPI4B_GPIO12 == 4) && (CONFIG_RPI4B_GPIO13 == 4)
+#  define RPI4B_UART5
+#endif
+
+/* == I2C == */
+
+/* I2C 0: GPIO 0 (ALT0=0) and GPIO 1 (ALT0=0) */
+#if (CONFIG_RPI4B_GPIO0 == 0) && (CONFIG_RPI4B_GPIO1 == 0)
+#  define RPI4B_I2C0

Review Comment:
   I think this approach should be removed, since it doesn't contribute to 
having full GPIO IN/OUT support, and the definitions conflict with how the user 
selects peripheral interfaces currently.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to