mbox series

[RFC,0/2] Add support for Motorola Droid 3 (XT862)

Message ID 20211212230459.13579-1-merlijn@wizzup.org
Headers show
Series Add support for Motorola Droid 3 (XT862) | expand

Message

Merlijn Wajer Dec. 12, 2021, 11:04 p.m. UTC
Hi,

This series adds support for the Motorola Droid 3 (XT862). It's still work in
progress and builds on the great work done to support the Motorola Droid 4 and
Motorola Bionic - comments and reviews are quite welcome.

In particular, I think the motorola-mapphone-common.dtsi could use some changes,
because:

* It is unclear if the Droid 3 has support for ramoops/pstore, so currently
  omap4-droid3-xt862.dts deletes ramoops node in motorola-mapphone-common.dtsi
* Same as above, except that the Droid 3 has less ram than the Droid Bionic and
  the Motorola Droid 4 (which are currently the only users of
  motorola-mapphone-common.dtsi)

Note that the following does not yet work and help is appreciated in making that
work:

1. Changing the display backlight (it's always on, quite bright)
2. The keyboard backlights do not work yet
3. The modem is seem on usb, but something is still misconfigured, and a
   (patched) ofono doesn't pick it up currently.
4. Reading the battery capacity properly

I hope to fix at least 1-3 before I plan to submit this for inclusion.

What works:

* Serial
* Display
* Keyboard
* Touchscreen
* gpio keys (slider, power button, volume buttons)
* Wireless
* Power/idle/sleep modes - easily lasts over a day
* Light sensor
* Accelerometer
* 3D (with out of tree SGX patches and closer userspace)

Any feedback is much appreciated!

Regards,
Merlijn

Merlijn Wajer (2):
  pmic-cpcap: add motorola,droid3 compatible
  Droid3: add initial DTS

 arch/arm/boot/dts/Makefile                    |   1 +
 .../boot/dts/motorola-mapphone-common.dtsi    |   4 +-
 arch/arm/boot/dts/omap4-droid3-xt862.dts      | 166 ++++++++++++++++++
 arch/arm/mach-omap2/pmic-cpcap.c              |   3 +-
 4 files changed, 171 insertions(+), 3 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap4-droid3-xt862.dts

Comments

Tony Lindgren Dec. 13, 2021, 5:57 a.m. UTC | #1
* Merlijn Wajer <merlijn@wizzup.org> [211212 23:00]:
> The Droid 3 and the Bionic appear to share the same hardware, so add
> the compatible for the Droid 3 as well.
> 
> Signed-off-by: Merlijn Wajer <merlijn@wizzup.org>
> ---
>  arch/arm/mach-omap2/pmic-cpcap.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-omap2/pmic-cpcap.c b/arch/arm/mach-omap2/pmic-cpcap.c
> index 668dc84fd31e..b9188dde13b9 100644
> --- a/arch/arm/mach-omap2/pmic-cpcap.c
> +++ b/arch/arm/mach-omap2/pmic-cpcap.c
> @@ -245,7 +245,8 @@ int __init omap4_cpcap_init(void)
>  	voltdm = voltdm_lookup("mpu");
>  	omap_voltage_register_pmic(voltdm, &omap443x_max8952_mpu);
>  
> -	if (of_machine_is_compatible("motorola,droid-bionic")) {
> +	if (of_machine_is_compatible("motorola,droid-bionic") ||
> +	    of_machine_is_compatible("motorola,droid3")) {
>  		voltdm = voltdm_lookup("core");
>  		omap_voltage_register_pmic(voltdm, &omap_cpcap_core);
>  

Looks OK to me, however we should also add all the mapphones to the
Documentation/devicetree/bindings/arm/omap/omap.txt so we can avoid
dtb check warnings. Care to also do a patch for that? Looks like the
others are missing too.

Regards,

Tony
Merlijn Wajer Dec. 13, 2021, 10:37 a.m. UTC | #2
Hi Tony,

On 13/12/2021 06:57, Tony Lindgren wrote:
> * Merlijn Wajer <merlijn@wizzup.org> [211212 23:00]:
>> The Droid 3 and the Bionic appear to share the same hardware, so add
>> the compatible for the Droid 3 as well.
>>
>> Signed-off-by: Merlijn Wajer <merlijn@wizzup.org>
>> ---
>>  arch/arm/mach-omap2/pmic-cpcap.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/mach-omap2/pmic-cpcap.c b/arch/arm/mach-omap2/pmic-cpcap.c
>> index 668dc84fd31e..b9188dde13b9 100644
>> --- a/arch/arm/mach-omap2/pmic-cpcap.c
>> +++ b/arch/arm/mach-omap2/pmic-cpcap.c
>> @@ -245,7 +245,8 @@ int __init omap4_cpcap_init(void)
>>  	voltdm = voltdm_lookup("mpu");
>>  	omap_voltage_register_pmic(voltdm, &omap443x_max8952_mpu);
>>  
>> -	if (of_machine_is_compatible("motorola,droid-bionic")) {
>> +	if (of_machine_is_compatible("motorola,droid-bionic") ||
>> +	    of_machine_is_compatible("motorola,droid3")) {
>>  		voltdm = voltdm_lookup("core");
>>  		omap_voltage_register_pmic(voltdm, &omap_cpcap_core);
>>  
> 
> Looks OK to me, however we should also add all the mapphones to the
> Documentation/devicetree/bindings/arm/omap/omap.txt so we can avoid
> dtb check warnings. Care to also do a patch for that? Looks like the
> others are missing too.

Sure, I'll do that and add the others too while at it. Shall I add those
to this patch, or make a separate patch?

Regards,
Merlijn
Tony Lindgren Dec. 15, 2021, 8:42 a.m. UTC | #3
* Merlijn Wajer <merlijn@wizzup.org> [211213 10:33]:
> On 13/12/2021 06:57, Tony Lindgren wrote:
> > Looks OK to me, however we should also add all the mapphones to the
> > Documentation/devicetree/bindings/arm/omap/omap.txt so we can avoid
> > dtb check warnings. Care to also do a patch for that? Looks like the
> > others are missing too.
> 
> Sure, I'll do that and add the others too while at it. Shall I add those
> to this patch, or make a separate patch?

Please add a separate binding patch and Cc the devicetree mailing list.

Thanks,

Tony