Article: Rendering PinePhone's Display (DE and TCON0)

2022-10-29 Thread Lee, Lup Yuen
Inside Pine64's PinePhone (Arm64) is the Allwinner A64 SoC and its A64
Display Engine that renders graphics on the LCD Display.

This article explains how we might build a NuttX Display Driver for
PinePhone's A64 Display Engine.

https://lupyuen.github.io/articles/de

Lup


Re: Bluetooth+WiFi+NuttX

2022-10-29 Thread TimH
I meant esp32 not esr32. The naming is too similar lol

> On 29 Oct 2022, at 15:51, Tim Hardisty  wrote:
> 
> Thanks Alan! SAMA5D2 has RMII so definitely a possibility. EFR32 is a much 
> better value device compared to SiLabs Bluetooth 5 module currently used, and 
> has WiFi as a bonus - so I will investigate it's IDE and see how easy it is 
> to implement a GATT-based solution, or to load HCI firmware so I can be 
> reasonably confident I'm not digging a big hole for myself if I make this 
> change.
> 
> 
> On 29/10/2022, 13:23, "Alan C. Assis"  wrote:
> 
>More info here:
> 
>
> https://e2e.ti.com/support/processors-group/processors/f/processors-forum/366759/am335x-rmii-direct-connection-between-two-devices
> 
>Same TI guy who said it was impossible latter talk internally and
>discovered that there was a customer already using it.
> 
>BTW, you will need to have RMII supported by both MCUs (yes, ESP32 has 
> RMII).
> 
>BR,
> 
>Alan
> 
>>On 10/29/22, Alan C. Assis  wrote:
>> Hi Tim,
>> 
>> I just searched if it was possible to connect two Ethernet MAC
>> directly without using PHY and it is possible, so it will not involve
>> cost for you:
>> 
>> https://stackoverflow.com/questions/39503466/can-two-ethernet-mac-chips-be-connected-directly-without-going-thru-phy
>> 
>> BR,
>> 
>> Alan
>> 
>>> On 10/29/22, Tim Hardisty  wrote:
>>> Thanks for your clarifications Alan - I have messaged Espressif (your
>>> reply
>>> ended up in SPAM otherwise I might not have needed to) so I guess I'll get
>>> a
>>> similar answer.
>>> 
>>> There is HCI (RCP) firmware for the SiLabs module so I can try that -
>>> it's
>>> the £7 per module saving of Espressif vs. SiLabs, plus getting WiFi for
>>> free
>>> that appeals. SAMA5D2 has Ethernet - unused on my board so it is not an
>>> idea
>>> that is completely out of the question:  writing USRSOCK for the
>>> Espressif
>>> module is probably beyond me at this time!
>>> 
>>> On 29/10/2022, 00:20, "Alan C. Assis"  wrote:
>>> 
>>>Hi Tim,
>>> 
>>>On 10/28/22, Tim Hardisty  wrote:
 Bit of a tangential question this, but I know there are folk on
>>> here
>>> who
 are much more conversant with the way NuttX can be used with WiFi
>>> and
 Bluetooth modules than I am.
 
>>> 
>>>I think these are important questions and other people could face
>>>similar issues in the future.
>>> 
 I may have an opportunity forced on me to have to respin my custom
>>> board
 which currently has a SiLabs Bluetooth SoC as well as the main
>>> SAMA5D2
 processor. I used that module as I already have experience of it -
>>> but
>>> that
 predates my NuttX journey.
 
 I see there are some very good value combined WiFi + Bluetooth
>>> modules
>>> now
 (Espressif for example...and I know there's a well-known proponent
>>> of
>>> those
 devices here lol) and, having seen a few other questions here, I am
>>> thinking
 that I can go the HCI route and make use of the Bluetooth Stack in
>>> NuttX:
 and add WiFi capability to my board at the same time. Winner!
 
>>> 
>>>First let me explain the differences:
>>> 
>>>Espressif modules are not used as external modules on NuttX,
>>>everything is integrated inside the chip.
>>> 
>>>During the WildernessLab's presentation on NuttX Workshop their team
>>>shown an ESP32 solution sharing WiFi as an external module.
>>>But they didn't use the default USRSOCK route, they implemented a new
>>>solution at home.
>>> 
 I'm hoping I can program up a suitable module with generic radio
 co-processor software (HCI I think, and whatever is needed for
>>> WiFi)
>>> and
 access it via UART from my main processor and have it all under the
>>> NuttX
 system in a much more easily managed manner than a separate app on
>>> the
 SiLabs SoC that just happens to communicate on some way with my
>>> main
>>> app on
 the SAMA5D2.
 
 Have I got this right? Is an Espressif module a good choice (email
>>> me
>>> direct
 if you want to !!)?
 
>>> 
>>>For Bluetooth (BLE) if there is a HCI firmware to SiLabs chip, then
>>> it
>>>could be possible to you use it, but you'll need to do some tests and
>>>debugging to get things working.
>>> 
>>>For WiFi things are more complex because you need to implement a
>>>USRSOCK yourself to the chip.
>>> 
>>>I never tested others possibilities: i.e. share Internet using SLIP
>>>between ESP32 and SAMA5D2, should be an easier route if it works, but
>>>of course you wil be limited to UART speed.
>>> 
>>>Ethernet could be a better option (since ESP32 has Ethernet
>>> hardware),
>>>but it seems like an ugly and expensive workaround.
>>> 
>>>BR,
>>> 
>>>Alan
>>> 
>>> 
>>> 
>> 
> 
> 



Re: Bluetooth+WiFi+NuttX

2022-10-29 Thread Tim Hardisty
Thanks Alan! SAMA5D2 has RMII so definitely a possibility. EFR32 is a much 
better value device compared to SiLabs Bluetooth 5 module currently used, and 
has WiFi as a bonus - so I will investigate it's IDE and see how easy it is to 
implement a GATT-based solution, or to load HCI firmware so I can be reasonably 
confident I'm not digging a big hole for myself if I make this change.


On 29/10/2022, 13:23, "Alan C. Assis"  wrote:

More info here:


https://e2e.ti.com/support/processors-group/processors/f/processors-forum/366759/am335x-rmii-direct-connection-between-two-devices

Same TI guy who said it was impossible latter talk internally and
discovered that there was a customer already using it.

BTW, you will need to have RMII supported by both MCUs (yes, ESP32 has 
RMII).

BR,

Alan

On 10/29/22, Alan C. Assis  wrote:
> Hi Tim,
>
> I just searched if it was possible to connect two Ethernet MAC
> directly without using PHY and it is possible, so it will not involve
> cost for you:
>
> 
https://stackoverflow.com/questions/39503466/can-two-ethernet-mac-chips-be-connected-directly-without-going-thru-phy
>
> BR,
>
> Alan
>
> On 10/29/22, Tim Hardisty  wrote:
>> Thanks for your clarifications Alan - I have messaged Espressif (your
>> reply
>> ended up in SPAM otherwise I might not have needed to) so I guess I'll 
get
>> a
>> similar answer.
>>
>> There is HCI (RCP) firmware for the SiLabs module so I can try that -
>> it's
>> the £7 per module saving of Espressif vs. SiLabs, plus getting WiFi for
>> free
>> that appeals. SAMA5D2 has Ethernet - unused on my board so it is not an
>> idea
>> that is completely out of the question:  writing USRSOCK for the
>> Espressif
>> module is probably beyond me at this time!
>>
>> On 29/10/2022, 00:20, "Alan C. Assis"  wrote:
>>
>> Hi Tim,
>>
>> On 10/28/22, Tim Hardisty  wrote:
>> > Bit of a tangential question this, but I know there are folk on
>> here
>> who
>> > are much more conversant with the way NuttX can be used with WiFi
>> and
>> > Bluetooth modules than I am.
>> >
>>
>> I think these are important questions and other people could face
>> similar issues in the future.
>>
>> > I may have an opportunity forced on me to have to respin my custom
>> board
>> > which currently has a SiLabs Bluetooth SoC as well as the main
>> SAMA5D2
>> > processor. I used that module as I already have experience of it -
>> but
>> that
>> > predates my NuttX journey.
>> >
>> > I see there are some very good value combined WiFi + Bluetooth
>> modules
>> now
>> > (Espressif for example...and I know there's a well-known proponent
>> of
>> those
>> > devices here lol) and, having seen a few other questions here, I am
>> thinking
>> > that I can go the HCI route and make use of the Bluetooth Stack in
>> NuttX:
>> > and add WiFi capability to my board at the same time. Winner!
>> >
>>
>> First let me explain the differences:
>>
>> Espressif modules are not used as external modules on NuttX,
>> everything is integrated inside the chip.
>>
>> During the WildernessLab's presentation on NuttX Workshop their team
>> shown an ESP32 solution sharing WiFi as an external module.
>> But they didn't use the default USRSOCK route, they implemented a new
>> solution at home.
>>
>> > I'm hoping I can program up a suitable module with generic radio
>> > co-processor software (HCI I think, and whatever is needed for
>> WiFi)
>> and
>> > access it via UART from my main processor and have it all under the
>> NuttX
>> > system in a much more easily managed manner than a separate app on
>> the
>> > SiLabs SoC that just happens to communicate on some way with my
>> main
>> app on
>> > the SAMA5D2.
>> >
>> > Have I got this right? Is an Espressif module a good choice (email
>> me
>> direct
>> > if you want to !!)?
>> >
>>
>> For Bluetooth (BLE) if there is a HCI firmware to SiLabs chip, then
>> it
>> could be possible to you use it, but you'll need to do some tests and
>> debugging to get things working.
>>
>> For WiFi things are more complex because you need to implement a
>> USRSOCK yourself to the chip.
>>
>> I never tested others possibilities: i.e. share Internet using SLIP
>> between ESP32 and SAMA5D2, should be an easier route if it works, but
>> of course you wil be limited to UART speed.
>>
>> Ethernet could be a better option (since ESP32 has Ethernet
>> 

Re: Bluetooth+WiFi+NuttX

2022-10-29 Thread Alan C. Assis
More info here:

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/366759/am335x-rmii-direct-connection-between-two-devices

Same TI guy who said it was impossible latter talk internally and
discovered that there was a customer already using it.

BTW, you will need to have RMII supported by both MCUs (yes, ESP32 has RMII).

BR,

Alan

On 10/29/22, Alan C. Assis  wrote:
> Hi Tim,
>
> I just searched if it was possible to connect two Ethernet MAC
> directly without using PHY and it is possible, so it will not involve
> cost for you:
>
> https://stackoverflow.com/questions/39503466/can-two-ethernet-mac-chips-be-connected-directly-without-going-thru-phy
>
> BR,
>
> Alan
>
> On 10/29/22, Tim Hardisty  wrote:
>> Thanks for your clarifications Alan - I have messaged Espressif (your
>> reply
>> ended up in SPAM otherwise I might not have needed to) so I guess I'll get
>> a
>> similar answer.
>>
>> There is HCI (RCP) firmware for the SiLabs module so I can try that -
>> it's
>> the £7 per module saving of Espressif vs. SiLabs, plus getting WiFi for
>> free
>> that appeals. SAMA5D2 has Ethernet - unused on my board so it is not an
>> idea
>> that is completely out of the question:  writing USRSOCK for the
>> Espressif
>> module is probably beyond me at this time!
>>
>> On 29/10/2022, 00:20, "Alan C. Assis"  wrote:
>>
>> Hi Tim,
>>
>> On 10/28/22, Tim Hardisty  wrote:
>> > Bit of a tangential question this, but I know there are folk on
>> here
>> who
>> > are much more conversant with the way NuttX can be used with WiFi
>> and
>> > Bluetooth modules than I am.
>> >
>>
>> I think these are important questions and other people could face
>> similar issues in the future.
>>
>> > I may have an opportunity forced on me to have to respin my custom
>> board
>> > which currently has a SiLabs Bluetooth SoC as well as the main
>> SAMA5D2
>> > processor. I used that module as I already have experience of it -
>> but
>> that
>> > predates my NuttX journey.
>> >
>> > I see there are some very good value combined WiFi + Bluetooth
>> modules
>> now
>> > (Espressif for example...and I know there's a well-known proponent
>> of
>> those
>> > devices here lol) and, having seen a few other questions here, I am
>> thinking
>> > that I can go the HCI route and make use of the Bluetooth Stack in
>> NuttX:
>> > and add WiFi capability to my board at the same time. Winner!
>> >
>>
>> First let me explain the differences:
>>
>> Espressif modules are not used as external modules on NuttX,
>> everything is integrated inside the chip.
>>
>> During the WildernessLab's presentation on NuttX Workshop their team
>> shown an ESP32 solution sharing WiFi as an external module.
>> But they didn't use the default USRSOCK route, they implemented a new
>> solution at home.
>>
>> > I'm hoping I can program up a suitable module with generic radio
>> > co-processor software (HCI I think, and whatever is needed for
>> WiFi)
>> and
>> > access it via UART from my main processor and have it all under the
>> NuttX
>> > system in a much more easily managed manner than a separate app on
>> the
>> > SiLabs SoC that just happens to communicate on some way with my
>> main
>> app on
>> > the SAMA5D2.
>> >
>> > Have I got this right? Is an Espressif module a good choice (email
>> me
>> direct
>> > if you want to !!)?
>> >
>>
>> For Bluetooth (BLE) if there is a HCI firmware to SiLabs chip, then
>> it
>> could be possible to you use it, but you'll need to do some tests and
>> debugging to get things working.
>>
>> For WiFi things are more complex because you need to implement a
>> USRSOCK yourself to the chip.
>>
>> I never tested others possibilities: i.e. share Internet using SLIP
>> between ESP32 and SAMA5D2, should be an easier route if it works, but
>> of course you wil be limited to UART speed.
>>
>> Ethernet could be a better option (since ESP32 has Ethernet
>> hardware),
>> but it seems like an ugly and expensive workaround.
>>
>> BR,
>>
>> Alan
>>
>>
>>
>


Re: Bluetooth+WiFi+NuttX

2022-10-29 Thread Alan C. Assis
Hi Tim,

I just searched if it was possible to connect two Ethernet MAC
directly without using PHY and it is possible, so it will not involve
cost for you:

https://stackoverflow.com/questions/39503466/can-two-ethernet-mac-chips-be-connected-directly-without-going-thru-phy

BR,

Alan

On 10/29/22, Tim Hardisty  wrote:
> Thanks for your clarifications Alan - I have messaged Espressif (your reply
> ended up in SPAM otherwise I might not have needed to) so I guess I'll get a
> similar answer.
>
> There is HCI (RCP) firmware for the SiLabs module so I can try that - it's
> the £7 per module saving of Espressif vs. SiLabs, plus getting WiFi for free
> that appeals. SAMA5D2 has Ethernet - unused on my board so it is not an idea
> that is completely out of the question:  writing USRSOCK for the Espressif
> module is probably beyond me at this time!
>
> On 29/10/2022, 00:20, "Alan C. Assis"  wrote:
>
> Hi Tim,
>
> On 10/28/22, Tim Hardisty  wrote:
> > Bit of a tangential question this, but I know there are folk on here
> who
> > are much more conversant with the way NuttX can be used with WiFi
> and
> > Bluetooth modules than I am.
> >
>
> I think these are important questions and other people could face
> similar issues in the future.
>
> > I may have an opportunity forced on me to have to respin my custom
> board
> > which currently has a SiLabs Bluetooth SoC as well as the main
> SAMA5D2
> > processor. I used that module as I already have experience of it - but
> that
> > predates my NuttX journey.
> >
> > I see there are some very good value combined WiFi + Bluetooth modules
> now
> > (Espressif for example...and I know there's a well-known proponent of
> those
> > devices here lol) and, having seen a few other questions here, I am
> thinking
> > that I can go the HCI route and make use of the Bluetooth Stack in
> NuttX:
> > and add WiFi capability to my board at the same time. Winner!
> >
>
> First let me explain the differences:
>
> Espressif modules are not used as external modules on NuttX,
> everything is integrated inside the chip.
>
> During the WildernessLab's presentation on NuttX Workshop their team
> shown an ESP32 solution sharing WiFi as an external module.
> But they didn't use the default USRSOCK route, they implemented a new
> solution at home.
>
> > I'm hoping I can program up a suitable module with generic radio
> > co-processor software (HCI I think, and whatever is needed for WiFi)
> and
> > access it via UART from my main processor and have it all under the
> NuttX
> > system in a much more easily managed manner than a separate app on
> the
> > SiLabs SoC that just happens to communicate on some way with my main
> app on
> > the SAMA5D2.
> >
> > Have I got this right? Is an Espressif module a good choice (email me
> direct
> > if you want to !!)?
> >
>
> For Bluetooth (BLE) if there is a HCI firmware to SiLabs chip, then it
> could be possible to you use it, but you'll need to do some tests and
> debugging to get things working.
>
> For WiFi things are more complex because you need to implement a
> USRSOCK yourself to the chip.
>
> I never tested others possibilities: i.e. share Internet using SLIP
> between ESP32 and SAMA5D2, should be an easier route if it works, but
> of course you wil be limited to UART speed.
>
> Ethernet could be a better option (since ESP32 has Ethernet hardware),
> but it seems like an ugly and expensive workaround.
>
> BR,
>
> Alan
>
>
>


Re: Bluetooth+WiFi+NuttX

2022-10-29 Thread Tim Hardisty
Thanks for your clarifications Alan - I have messaged Espressif (your reply 
ended up in SPAM otherwise I might not have needed to) so I guess I'll get a 
similar answer.

There is HCI (RCP) firmware for the SiLabs module so I can try that - it's the 
£7 per module saving of Espressif vs. SiLabs, plus getting WiFi for free that 
appeals. SAMA5D2 has Ethernet - unused on my board so it is not an idea that is 
completely out of the question:  writing USRSOCK for the Espressif module is 
probably beyond me at this time!

On 29/10/2022, 00:20, "Alan C. Assis"  wrote:

Hi Tim,

On 10/28/22, Tim Hardisty  wrote:
> Bit of a tangential question this, but I know there are folk on here who
> are much more conversant with the way NuttX can be used with WiFi and
> Bluetooth modules than I am.
>

I think these are important questions and other people could face
similar issues in the future.

> I may have an opportunity forced on me to have to respin my custom board
> which currently has a SiLabs Bluetooth SoC as well as the main SAMA5D2
> processor. I used that module as I already have experience of it - but 
that
> predates my NuttX journey.
>
> I see there are some very good value combined WiFi + Bluetooth modules now
> (Espressif for example...and I know there's a well-known proponent of 
those
> devices here lol) and, having seen a few other questions here, I am 
thinking
> that I can go the HCI route and make use of the Bluetooth Stack in NuttX:
> and add WiFi capability to my board at the same time. Winner!
>

First let me explain the differences:

Espressif modules are not used as external modules on NuttX,
everything is integrated inside the chip.

During the WildernessLab's presentation on NuttX Workshop their team
shown an ESP32 solution sharing WiFi as an external module.
But they didn't use the default USRSOCK route, they implemented a new
solution at home.

> I'm hoping I can program up a suitable module with generic radio
> co-processor software (HCI I think, and whatever is needed for WiFi) and
> access it via UART from my main processor and have it all under the NuttX
> system in a much more easily managed manner than a separate app on the
> SiLabs SoC that just happens to communicate on some way with my main app 
on
> the SAMA5D2.
>
> Have I got this right? Is an Espressif module a good choice (email me 
direct
> if you want to !!)?
>

For Bluetooth (BLE) if there is a HCI firmware to SiLabs chip, then it
could be possible to you use it, but you'll need to do some tests and
debugging to get things working.

For WiFi things are more complex because you need to implement a
USRSOCK yourself to the chip.

I never tested others possibilities: i.e. share Internet using SLIP
between ESP32 and SAMA5D2, should be an easier route if it works, but
of course you wil be limited to UART speed.

Ethernet could be a better option (since ESP32 has Ethernet hardware),
but it seems like an ugly and expensive workaround.

BR,

Alan




Re: Bluetooth+WiFi+NuttX

2022-10-29 Thread Tim Hardisty
Due to processor power limitations? For this application a WiFi interface would 
be rarely used apart from a means to configure the product. Bluetooth will be 
GATT based to allow monitoring of sensor data on a phone app (sometime in the 
fure, due to the Bluetooth SIG fees involved!!).

So if the WiFi performance is average it won't matter much. But of the 
Bluetooth stack in NuttX is likely a performance bottleneck I am probably 
better off sticking with plan a and offload all Bluetooth LE Gatt stuff to the 
SiLabs module and simply exchange data as required via SPI.

On 29/10/2022, 01:06, "Disruptive Solutions"  
wrote:

I tried some Wifi and Bluetooth but know that some MCUs cannot handle them
very well at the same time.

Op za 29 okt. 2022 1:20 a.m. schreef Alan C. Assis :

> Hi Tim,
>
> On 10/28/22, Tim Hardisty  wrote:
> > Bit of a tangential question this, but I know there are folk on here who
> > are much more conversant with the way NuttX can be used with WiFi and
> > Bluetooth modules than I am.
> >
>
> I think these are important questions and other people could face
> similar issues in the future.
>
> > I may have an opportunity forced on me to have to respin my custom board
> > which currently has a SiLabs Bluetooth SoC as well as the main SAMA5D2
> > processor. I used that module as I already have experience of it - but
> that
> > predates my NuttX journey.
> >
> > I see there are some very good value combined WiFi + Bluetooth modules
> now
> > (Espressif for example...and I know there's a well-known proponent of
> those
> > devices here lol) and, having seen a few other questions here, I am
> thinking
> > that I can go the HCI route and make use of the Bluetooth Stack in 
NuttX:
> > and add WiFi capability to my board at the same time. Winner!
> >
>
> First let me explain the differences:
>
> Espressif modules are not used as external modules on NuttX,
> everything is integrated inside the chip.
>
> During the WildernessLab's presentation on NuttX Workshop their team
> shown an ESP32 solution sharing WiFi as an external module.
> But they didn't use the default USRSOCK route, they implemented a new
> solution at home.
>
> > I'm hoping I can program up a suitable module with generic radio
> > co-processor software (HCI I think, and whatever is needed for WiFi) and
> > access it via UART from my main processor and have it all under the 
NuttX
> > system in a much more easily managed manner than a separate app on the
> > SiLabs SoC that just happens to communicate on some way with my main app
> on
> > the SAMA5D2.
> >
> > Have I got this right? Is an Espressif module a good choice (email me
> direct
> > if you want to !!)?
> >
>
> For Bluetooth (BLE) if there is a HCI firmware to SiLabs chip, then it
> could be possible to you use it, but you'll need to do some tests and
> debugging to get things working.
>
> For WiFi things are more complex because you need to implement a
> USRSOCK yourself to the chip.
>
> I never tested others possibilities: i.e. share Internet using SLIP
> between ESP32 and SAMA5D2, should be an easier route if it works, but
> of course you wil be limited to UART speed.
>
> Ethernet could be a better option (since ESP32 has Ethernet hardware),
> but it seems like an ugly and expensive workaround.
>
> BR,
>
> Alan
>