<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Sunny,<div><br></div><div>What issues are you seeing with the PL011 UART in Windows? Last time I checked, it worked fine, and the fact that Bluetooth works also confirms this.</div><div>It won't show up as a COM port (like mini UART does) as it's built using SerCx2.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">@@ -30,6 +30,12 @@ Device (URT0)<br>   {<br>     MEMORY32FIXED (ReadWrite, 0, BCM2836_PL011_UART_LENGTH, RMEM)<br>     Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_PL011_UART_INTERRUPT }<br>+<br>+    PinFunction (Exclusive, PullDown, BCM_ALT3, "\\_SB.GDV0.GPI0", 0, ResourceConsumer, , ) { 32, 33 }<br>+</blockquote><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">@@ -79,6 +85,11 @@ Device (URTM)<br>     // from muxing the pins away.<br><br>     // PinFunction (Exclusive, PullDown, BCM_ALT5, "\\_SB.GPI0", 0, ResourceConsumer, , ) { 14, 15 }<br>+    PinFunction (Exclusive, PullDown, BCM_ALT5, "\\_SB.GDV0.GPI0", 0, ResourceConsumer, , ) { 32, 33 }<br>+<br></blockquote><div><br></div><div>What is the reason for trying to mux both UARTs to the BT chip? If PL011 is used for Bluetooth and the mini UART driver loads <i>after</i> it, wouldn't it mux away the pins and break Bluetooth?</div><div><br></div><div><br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">În lun., 31 mai 2021 la 11:23, Sunny Wang <<a href="mailto:Sunny.Wang@arm.com">Sunny.Wang@arm.com</a>> a scris:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This change is based on edk2-platforms-raspberrypi-pl011-bth-noflow.diff<br>
in <a href="https://github.com/worproject/RPi-Bluetooth-Testing/" rel="noreferrer" target="_blank">https://github.com/worproject/RPi-Bluetooth-Testing/</a> for enabling<br>
Bluetooth and serial port (Mini UART) in Windows IOT.<br>
<br>
Note that PL011 UART still doesn't work with Windows 10 IOT with this<br>
change, but PL011 UART works fine with VMware ESXi-Arm Fling v1.3.<br>
Therefore, there should be no issue with PL011 UART related changes,<br>
and we will still need a Windows expert to take a further look in the<br>
future. Making PL011 UART work properly with Windows 10 IOT may require<br>
additional changes to Windows driver or firmware's ACPI table.<br>
<br>
Testing Done:<br>
  - Successfully booted Windows Windows 10 IOT (20279.1) on SD (made by WOR) with<br>
    the RPi-Windows-Drivers release ver 0.5 downloaded from<br>
    <a href="https://github.com/worproject/RPi-Windows-Drivers/releases" rel="noreferrer" target="_blank">https://github.com/worproject/RPi-Windows-Drivers/releases</a><br>
    and checked that both Bluetooth and serial port (Mini UART) can<br>
    work fine.<br>
  - Successfully booted VMware ESXi-Arm Fling v1.3 with only serial<br>
    console connection (PL011 UART).<br>
<br>
Cc: Samer El-Haj-Mahmoud <<a href="mailto:samer.el-haj-mahmoud@arm.com" target="_blank">samer.el-haj-mahmoud@arm.com</a>><br>
Cc: Sami Mujawar <<a href="mailto:sami.mujawar@arm.com" target="_blank">sami.mujawar@arm.com</a>><br>
Cc: Jeremy Linton <<a href="mailto:jeremy.linton@arm.com" target="_blank">jeremy.linton@arm.com</a>><br>
Cc: Pete Batard <<a href="mailto:pete@akeo.ie" target="_blank">pete@akeo.ie</a>><br>
Cc: Ard Biesheuvel <<a href="mailto:ardb%2Btianocore@kernel.org" target="_blank">ardb+tianocore@kernel.org</a>><br>
Cc: Mario Bălănică <<a href="mailto:mariobalanica02@gmail.com" target="_blank">mariobalanica02@gmail.com</a>><br>
Signed-off-by: Sunny Wang <<a href="mailto:sunny.wang@arm.com" target="_blank">sunny.wang@arm.com</a>><br>
---<br>
 Platform/RaspberryPi/AcpiTables/Uart.asl | 19 +++++++++++--------<br>
 1 file changed, 11 insertions(+), 8 deletions(-)<br>
<br>
diff --git a/Platform/RaspberryPi/AcpiTables/Uart.asl b/Platform/RaspberryPi/AcpiTables/Uart.asl<br>
index bac9d791eb..cb99086d39 100644<br>
--- a/Platform/RaspberryPi/AcpiTables/Uart.asl<br>
+++ b/Platform/RaspberryPi/AcpiTables/Uart.asl<br>
@@ -30,6 +30,12 @@ Device (URT0)<br>
   {<br>
     MEMORY32FIXED (ReadWrite, 0, BCM2836_PL011_UART_LENGTH, RMEM)<br>
     Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { BCM2836_PL011_UART_INTERRUPT }<br>
+<br>
+    PinFunction (Exclusive, PullDown, BCM_ALT3, "\\_SB.GDV0.GPI0", 0, ResourceConsumer, , ) { 32, 33 }<br>
+<br>
+    // fake the CTS signal as we don't support HW flow control yet<br>
+    // BCM_ALT2 is set as output (low) by default<br>
+    PinFunction (Exclusive, PullNone, BCM_ALT2, "\\_SB.GDV0.GPI0", 0, ResourceConsumer, , ) { 31 }<br>
   })<br>
   Method (_CRS, 0x0, Serialized)<br>
   {<br>
@@ -79,6 +85,11 @@ Device (URTM)<br>
     // from muxing the pins away.<br>
<br>
     // PinFunction (Exclusive, PullDown, BCM_ALT5, "\\_SB.GPI0", 0, ResourceConsumer, , ) { 14, 15 }<br>
+    PinFunction (Exclusive, PullDown, BCM_ALT5, "\\_SB.GDV0.GPI0", 0, ResourceConsumer, , ) { 32, 33 }<br>
+<br>
+    // fake the CTS signal as we don't support HW flow control yet<br>
+    // BCM_ALT2 is set as output (low) by default<br>
+    PinFunction (Exclusive, PullNone, BCM_ALT2, "\\_SB.GDV0.GPI0", 0, ResourceConsumer, , ) { 31 }<br>
   })<br>
   Method (_CRS, 0x0, Serialized)<br>
   {<br>
@@ -143,10 +154,6 @@ Device(BTH0)<br>
       UAR0,          // DescriptorName: creates name<br>
                     //   for offset of resource descriptor<br>
     )                // Vendor data<br>
-    //<br>
-    // RPIQ connection for BT_ON/OFF<br>
-    //<br>
-    GpioIO (Shared, PullUp, 0, 0, IoRestrictionNone, "\\_SB.GDV0.RPIQ", 0, ResourceConsumer, , ) { 128 }<br>
   })<br>
<br>
   //<br>
@@ -190,10 +197,6 @@ Device(BTH0)<br>
       UARM,          // DescriptorName: creates name<br>
                     //   for offset of resource descriptor<br>
     )                // Vendor data<br>
-    //<br>
-    // RPIQ connection for BT_ON/OFF<br>
-    //<br>
-    GpioIO (Shared, PullUp, 0, 0, IoRestrictionNone, "\\_SB.GDV0.RPIQ", 0, ResourceConsumer, , ) { 128 }<br>
   })<br>
<br>
   Method (_CRS, 0x0, Serialized)<br>
-- <br>
2.31.0.windows.1<br>
<br>
</blockquote></div>


 <div width="1" style="color:white;clear:both">_._,_._,_</div> <hr>   Groups.io Links:<p>   You receive all messages sent to this group.    <p> <a target="_blank" href="https://edk2.groups.io/g/devel/message/75869">View/Reply Online (#75869)</a> |    |  <a target="_blank" href="https://groups.io/mt/83205747/1813853">Mute This Topic</a>  | <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>    <a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> | <a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |  <a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>  [edk2-devel-archive@redhat.com]<br> <div width="1" style="color:white;clear:both">_._,_._,_</div>