mbox series

[v4,0/9] TI-Nspire cleanups

Message ID 20221101215804.16262-1-afd@ti.com
Headers show
Series TI-Nspire cleanups | expand

Message

Andrew Davis Nov. 1, 2022, 9:57 p.m. UTC
Hello all,

This series is an extended version of the series started here[0]
and here[1].

We break out what was the first patch into one for DTS change and
one for code changes as suggested by Krzysztof. Those are now patches
2 and 8 of this series (I kept the ACKs, hope that is okay).

As also pointed out by Krzysztof syscon nodes need a specific
compatible, add that as patch 1.

While I was adding that, I noticed some other dtbs_check issues,
so while here fixed some of those up too (patches 3-6).

Thanks,
Andrew

[0] https://lore.kernel.org/lkml/20221026161302.5319-1-afd@ti.com/
[1] https://lore.kernel.org/linux-arm-kernel/20221027181337.8651-1-afd@ti.com/

Changes from v3:
 - Add Reviewed-by
 - Make new binding for patch #1

Changes from v2:
 - See cover letter message

Changes from v1:
 - Add ACKs
 - Rebase on latest

Andrew Davis (9):
  dt-bindings: mfd: Add TI-Nspire misc registers
  ARM: dts: nspire: Use syscon-reboot to handle restart
  ARM: dts: nspire: Fix cpu node to conform with DT binding
  ARM: dts: nspire: Fix sram node to conform with DT binding
  ARM: dts: nspire: Fix vbus_reg node to conform with DT binding
  ARM: dts: nspire: Fix uart node to conform with DT binding
  ARM: dts: nspire: Use MATRIX_KEY macro for linux,keymap
  ARM: nspire: Use syscon-reboot to handle restart
  ARM: nspire: Remove unused header file mmio.h

 .../bindings/mfd/ti,nspire-misc.yaml          | 55 +++++++++++
 arch/arm/boot/dts/nspire-clp.dts              | 90 +++++++++++++-----
 arch/arm/boot/dts/nspire-cx.dts               | 92 ++++++++++++++-----
 arch/arm/boot/dts/nspire-tp.dts               | 90 +++++++++++++-----
 arch/arm/boot/dts/nspire.dtsi                 | 24 ++++-
 arch/arm/mach-nspire/Kconfig                  |  2 +
 arch/arm/mach-nspire/mmio.h                   | 16 ----
 arch/arm/mach-nspire/nspire.c                 | 24 -----
 8 files changed, 283 insertions(+), 110 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/ti,nspire-misc.yaml
 delete mode 100644 arch/arm/mach-nspire/mmio.h

Comments

Arnd Bergmann Nov. 2, 2022, 12:42 p.m. UTC | #1
On Tue, Nov 1, 2022, at 22:57, Andrew Davis wrote:
> Hello all,
>
> This series is an extended version of the series started here[0]
> and here[1].
>
> We break out what was the first patch into one for DTS change and
> one for code changes as suggested by Krzysztof. Those are now patches
> 2 and 8 of this series (I kept the ACKs, hope that is okay).
>
> As also pointed out by Krzysztof syscon nodes need a specific
> compatible, add that as patch 1.
>
> While I was adding that, I noticed some other dtbs_check issues,
> so while here fixed some of those up too (patches 3-6).

Hi Andrew,

Thanks for the cleanup series. All of this looks reasonable to
me, but we need to decide how to merge it upstream. I can
pick up the patches directly into the soc tree once everybody
is happy with the latest version, though usually I prefer
to take the patches or pull requests from the person listed
in the MAINTAINERS file.I'm happy to

It looks like there has never been a maintainer listed for
nspire, so it would be good to fix that. Between yourself,
Daniel and Fabian, can you find one or more people that
are willing to be listed as either reviewer or maintainer
for future patches, and decide what status you want the
platform to be listed at ("Maintained" or "Odd Fixes" I
assume)?

       Arnd
Dmitry Torokhov Nov. 3, 2022, 4:07 a.m. UTC | #2
Hi Andrew,

On Tue, Nov 1, 2022 at 2:59 PM Andrew Davis <afd@ti.com> wrote:
>
> This looks better and allows us to see the row and column numbers
> more easily. Switch to this macro here.
>
> Signed-off-by: Andrew Davis <afd@ti.com>
> ---
>  arch/arm/boot/dts/nspire-clp.dts | 90 ++++++++++++++++++++++++--------
>  arch/arm/boot/dts/nspire-cx.dts  | 90 ++++++++++++++++++++++++--------
>  arch/arm/boot/dts/nspire-tp.dts  | 90 ++++++++++++++++++++++++--------
>  3 files changed, 204 insertions(+), 66 deletions(-)
>
> diff --git a/arch/arm/boot/dts/nspire-clp.dts b/arch/arm/boot/dts/nspire-clp.dts
> index f52f38c615886..916ede0c2499c 100644
> --- a/arch/arm/boot/dts/nspire-clp.dts
> +++ b/arch/arm/boot/dts/nspire-clp.dts
> @@ -6,32 +6,78 @@
>   */
>  /dts-v1/;
>
> +#include <dt-bindings/input/input.h>
> +
>  /include/ "nspire-classic.dtsi"
>
>  &keypad {
>         linux,keymap = <
> -       0x0000001c      0x0001001c      0x00020039
> -       0x0004002c      0x00050034      0x00060015
> -       0x0007000b      0x0008002d      0x01000033
> -       0x0101004e      0x01020011      0x01030004
> -       0x0104002f      0x01050003      0x01060016
> -       0x01070002      0x01080014      0x02000062
> -       0x0201000c      0x0202001f      0x02030007
> -       0x02040013      0x02050006      0x02060010
> -       0x02070005      0x02080019      0x03000027
> -       0x03010037      0x03020018      0x0303000a
> -       0x03040031      0x03050009      0x03060032
> -       0x03070008      0x03080026      0x04000028
> -       0x04010035      0x04020025      0x04040024
> -       0x04060017      0x04080023      0x05000028
> -       0x05020022      0x0503001b      0x05040021
> -       0x0505001a      0x05060012      0x0507006f
> -       0x05080020      0x0509002a      0x0601001c
> -       0x0602002e      0x06030068      0x06040030
> -       0x0605006d      0x0606001e      0x06070001
> -       0x0608002b      0x0609000f      0x07000067
> -       0x0702006a      0x0704006c      0x07060069
> -       0x0707000e      0x0708001d      0x070a000d
> +               MATRIX_KEY(0,  0, 0x1c)
> +               MATRIX_KEY(0,  1, 0x1c)
> +               MATRIX_KEY(0,  2, 0x39)

Can this also be switched over to using KEY_* macros to describe the
keycodes emitted?

Thanks.
Andrew Davis Nov. 3, 2022, 4:29 p.m. UTC | #3
On 11/2/22 11:07 PM, Dmitry Torokhov wrote:
> Hi Andrew,
> 
> On Tue, Nov 1, 2022 at 2:59 PM Andrew Davis <afd@ti.com> wrote:
>>
>> This looks better and allows us to see the row and column numbers
>> more easily. Switch to this macro here.
>>
>> Signed-off-by: Andrew Davis <afd@ti.com>
>> ---
>>   arch/arm/boot/dts/nspire-clp.dts | 90 ++++++++++++++++++++++++--------
>>   arch/arm/boot/dts/nspire-cx.dts  | 90 ++++++++++++++++++++++++--------
>>   arch/arm/boot/dts/nspire-tp.dts  | 90 ++++++++++++++++++++++++--------
>>   3 files changed, 204 insertions(+), 66 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/nspire-clp.dts b/arch/arm/boot/dts/nspire-clp.dts
>> index f52f38c615886..916ede0c2499c 100644
>> --- a/arch/arm/boot/dts/nspire-clp.dts
>> +++ b/arch/arm/boot/dts/nspire-clp.dts
>> @@ -6,32 +6,78 @@
>>    */
>>   /dts-v1/;
>>
>> +#include <dt-bindings/input/input.h>
>> +
>>   /include/ "nspire-classic.dtsi"
>>
>>   &keypad {
>>          linux,keymap = <
>> -       0x0000001c      0x0001001c      0x00020039
>> -       0x0004002c      0x00050034      0x00060015
>> -       0x0007000b      0x0008002d      0x01000033
>> -       0x0101004e      0x01020011      0x01030004
>> -       0x0104002f      0x01050003      0x01060016
>> -       0x01070002      0x01080014      0x02000062
>> -       0x0201000c      0x0202001f      0x02030007
>> -       0x02040013      0x02050006      0x02060010
>> -       0x02070005      0x02080019      0x03000027
>> -       0x03010037      0x03020018      0x0303000a
>> -       0x03040031      0x03050009      0x03060032
>> -       0x03070008      0x03080026      0x04000028
>> -       0x04010035      0x04020025      0x04040024
>> -       0x04060017      0x04080023      0x05000028
>> -       0x05020022      0x0503001b      0x05040021
>> -       0x0505001a      0x05060012      0x0507006f
>> -       0x05080020      0x0509002a      0x0601001c
>> -       0x0602002e      0x06030068      0x06040030
>> -       0x0605006d      0x0606001e      0x06070001
>> -       0x0608002b      0x0609000f      0x07000067
>> -       0x0702006a      0x0704006c      0x07060069
>> -       0x0707000e      0x0708001d      0x070a000d
>> +               MATRIX_KEY(0,  0, 0x1c)
>> +               MATRIX_KEY(0,  1, 0x1c)
>> +               MATRIX_KEY(0,  2, 0x39)
> 
> Can this also be switched over to using KEY_* macros to describe the
> keycodes emitted?
> 

That's going to be done in a follow up patch. This change here was
done mechanically, but moving to KEY_* might need to be double
checked by hand since some of these do not seem to map how one
would expect to the function on the keypad.

Thanks,
Andrew