All of lore.kernel.org
 help / color / mirror / Atom feed
* [cip-dev] [PATCH 4.4.y-cip 0/3] ARM: dts: am335x: Replace numeric pinmux address with macro defines
@ 2020-06-08 10:33 johnsonch.chen@moxa.com
  2020-06-08 10:51 ` johnsonch.chen@moxa.com
  0 siblings, 1 reply; 5+ messages in thread
From: johnsonch.chen@moxa.com @ 2020-06-08 10:33 UTC (permalink / raw)
  To: nobuhiro1.iwamatsu, Pavel Machek, cip-dev

[-- Attachment #1: Type: text/plain, Size: 1139 bytes --]

Hello all,

This patchset replaces the register offsets for am335x with macro defines.
The values are extraced from the "AM335x SitaraTM Processors Technical
Reference Manual".

Use AM33XX_PADCONF to take three instead of two parameters for AM33XX_IOPAD, to make
future changes to #pinctrl-cells easier, and adjust pin direction and mux mode intuitively.

For now, only the am335x-moxa-uc-8100-me-t.dts changes are attached.

1. Add macros for numeric pinmux addresses. 
2. Add AM33XX_PADCONF macro.
3. Replace register offsets with define for moxa-uc8100-me-t.

It's tested with a Moxa UC-8100-ME-T platform.

Thanks!
Johnson

Christina Quast (2):
  ARM: dts: am33xx: Added macros for numeric pinmux addresses
  ARM: dts: am335x: moxa-uc-8100-me-t: Replaced register offsets with
    defines

Tony Lindgren (1):
  ARM: dts: am33xx: Added AM33XX_PADCONF macro

 arch/arm/boot/dts/am335x-moxa-uc-8100-me-t.dts | 116 +++++++++++-----------
 include/dt-bindings/pinctrl/am33xx.h           | 130 ++++++++++++++++++++++++-
 include/dt-bindings/pinctrl/omap.h             |   1 +
 3 files changed, 188 insertions(+), 59 deletions(-)

-- 
2.11.0

[-- Attachment #2: Type: text/plain, Size: 419 bytes --]

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#4749): https://lists.cip-project.org/g/cip-dev/message/4749
Mute This Topic: https://lists.cip-project.org/mt/74749053/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy  [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [cip-dev] [PATCH 4.4.y-cip 0/3] ARM: dts: am335x: Replace numeric pinmux address with macro defines
  2020-06-08 10:33 [cip-dev] [PATCH 4.4.y-cip 0/3] ARM: dts: am335x: Replace numeric pinmux address with macro defines johnsonch.chen@moxa.com
@ 2020-06-08 10:51 ` johnsonch.chen@moxa.com
  2020-06-08 21:30   ` Pavel Machek
  0 siblings, 1 reply; 5+ messages in thread
From: johnsonch.chen@moxa.com @ 2020-06-08 10:51 UTC (permalink / raw)
  To: cip-dev, nobuhiro1.iwamatsu, Pavel Machek

[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]

Hi all,

> Christina Quast (2):
>   ARM: dts: am33xx: Added macros for numeric pinmux addresses
>   ARM: dts: am335x: moxa-uc-8100-me-t: Replaced register offsets with
>     defines
>
> Tony Lindgren (1):
>   ARM: dts: am33xx: Added AM33XX_PADCONF macro
>
>  arch/arm/boot/dts/am335x-moxa-uc-8100-me-t.dts | 116 +++++++++++-----------
>  include/dt-bindings/pinctrl/am33xx.h           | 130 ++++++++++++++++++++++++-
>  include/dt-bindings/pinctrl/omap.h             |   1 +
>  3 files changed, 188 insertions(+), 59 deletions(-)
>
These should be the following:

Christina Quast (3):
  ARM: dts: am33xx: Added macros for numeric pinmux addresses
  ARM: dts: am33xx: Added AM33XX_PADCONF macro
  ARM: dts: am335x: moxa-uc-8100-me-t: Replaced register offsets with
    defines

 .../arm/boot/dts/am335x-moxa-uc-8100-me-t.dts | 116 ++++++++--------
 include/dt-bindings/pinctrl/am33xx.h          | 131 +++++++++++++++++-
 include/dt-bindings/pinctrl/omap.h            |   2 +
 3 files changed, 190 insertions(+), 59 deletions(-)


Best regards,
Johnson

> --
> 2.11.0

[-- Attachment #2: Type: text/plain, Size: 419 bytes --]

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#4753): https://lists.cip-project.org/g/cip-dev/message/4753
Mute This Topic: https://lists.cip-project.org/mt/74749053/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy  [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [cip-dev] [PATCH 4.4.y-cip 0/3] ARM: dts: am335x: Replace numeric pinmux address with macro defines
  2020-06-08 10:51 ` johnsonch.chen@moxa.com
@ 2020-06-08 21:30   ` Pavel Machek
  2020-06-09  3:54     ` johnsonch.chen@moxa.com
  0 siblings, 1 reply; 5+ messages in thread
From: Pavel Machek @ 2020-06-08 21:30 UTC (permalink / raw)
  To: Johnson CH Chen (陳昭勳)
  Cc: cip-dev, nobuhiro1.iwamatsu, Pavel Machek


[-- Attachment #1.1: Type: text/plain, Size: 1309 bytes --]

Hi!

> > Tony Lindgren (1):
> >   ARM: dts: am33xx: Added AM33XX_PADCONF macro
> >
> >  arch/arm/boot/dts/am335x-moxa-uc-8100-me-t.dts | 116 +++++++++++-----------
> >  include/dt-bindings/pinctrl/am33xx.h           | 130 ++++++++++++++++++++++++-
> >  include/dt-bindings/pinctrl/omap.h             |   1 +
> >  3 files changed, 188 insertions(+), 59 deletions(-)
> >
> These should be the following:
> 
> Christina Quast (3):
>   ARM: dts: am33xx: Added macros for numeric pinmux addresses
>   ARM: dts: am33xx: Added AM33XX_PADCONF macro
>   ARM: dts: am335x: moxa-uc-8100-me-t: Replaced register offsets with
>     defines

There's nothing obviously wrong with the patches (and they won't break
anything but am335x-moxa platform, so they are low risk).

On the other hand, I don't see any obvious benefit. Whether we use hex
constants or symbolic constants affects readability, but has no effect
on functionality.

Do you have any patches on top of these that rely on symbolic
constants in the dts? Are there any changes in the generated .dtb?
What is the benefit of this series (besides cleanup)?

Best regards,
								Pavel
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 419 bytes --]

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#4770): https://lists.cip-project.org/g/cip-dev/message/4770
Mute This Topic: https://lists.cip-project.org/mt/74749053/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy  [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [cip-dev] [PATCH 4.4.y-cip 0/3] ARM: dts: am335x: Replace numeric pinmux address with macro defines
  2020-06-08 21:30   ` Pavel Machek
@ 2020-06-09  3:54     ` johnsonch.chen@moxa.com
  2020-06-09 10:45       ` Pavel Machek
  0 siblings, 1 reply; 5+ messages in thread
From: johnsonch.chen@moxa.com @ 2020-06-09  3:54 UTC (permalink / raw)
  To: Pavel Machek; +Cc: cip-dev, nobuhiro1.iwamatsu

[-- Attachment #1: Type: text/plain, Size: 2231 bytes --]

Hi,
> 
> Hi!
> 
> > > Tony Lindgren (1):
> > >   ARM: dts: am33xx: Added AM33XX_PADCONF macro
> > >
> > >  arch/arm/boot/dts/am335x-moxa-uc-8100-me-t.dts | 116
> +++++++++++-----------
> > >  include/dt-bindings/pinctrl/am33xx.h           | 130
> ++++++++++++++++++++++++-
> > >  include/dt-bindings/pinctrl/omap.h             |   1 +
> > >  3 files changed, 188 insertions(+), 59 deletions(-)
> > >
> > These should be the following:
> >
> > Christina Quast (3):
> >   ARM: dts: am33xx: Added macros for numeric pinmux addresses
> >   ARM: dts: am33xx: Added AM33XX_PADCONF macro
> >   ARM: dts: am335x: moxa-uc-8100-me-t: Replaced register offsets with
> >     defines
> 
> There's nothing obviously wrong with the patches (and they won't break
> anything but am335x-moxa platform, so they are low risk).
> 
> On the other hand, I don't see any obvious benefit. Whether we use hex
> constants or symbolic constants affects readability, but has no effect on
> functionality.
> 
> Do you have any patches on top of these that rely on symbolic constants in the
> dts? Are there any changes in the generated .dtb?
> What is the benefit of this series (besides cleanup)?

Thanks for your response!

If macros of numeric pinmux addresses is used, we don't need to see AM335X's Technical Reference Manual again and again to find out the meaning of each pinmux address, just check "am33xx.h". Besides, it helps us to configure module pin's for different device trees easily. For example of mii, If we want to configure module of mii pin, we check module in "am33xx.h" can pick register names we want to modify. It's hard to remember pin address number for the specific module to us.

If AM33XX_PADCONF is taken, we can make sure both of pin's direction and mux mode are actually set, and it helps us to debug.

We have many boards based on AM335x SoC. Some dts rely on symbolic constants and some dts are not. I think this patch series can let us develop boards with AM335x SoC easiler.

> Best regards,
> 
> Pavel
> --
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Best regards,
Johnson

[-- Attachment #2: Type: text/plain, Size: 419 bytes --]

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#4772): https://lists.cip-project.org/g/cip-dev/message/4772
Mute This Topic: https://lists.cip-project.org/mt/74749053/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy  [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [cip-dev] [PATCH 4.4.y-cip 0/3] ARM: dts: am335x: Replace numeric pinmux address with macro defines
  2020-06-09  3:54     ` johnsonch.chen@moxa.com
@ 2020-06-09 10:45       ` Pavel Machek
  0 siblings, 0 replies; 5+ messages in thread
From: Pavel Machek @ 2020-06-09 10:45 UTC (permalink / raw)
  To: Johnson CH Chen (陳昭勳)
  Cc: Pavel Machek, cip-dev, nobuhiro1.iwamatsu


[-- Attachment #1.1: Type: text/plain, Size: 1583 bytes --]

Hi!

> > On the other hand, I don't see any obvious benefit. Whether we use hex
> > constants or symbolic constants affects readability, but has no effect on
> > functionality.
> > 
> > Do you have any patches on top of these that rely on symbolic constants in the
> > dts? Are there any changes in the generated .dtb?
> > What is the benefit of this series (besides cleanup)?
> 
> Thanks for your response!
> 
> If macros of numeric pinmux addresses is used, we don't need to see AM335X's Technical Reference Manual again and again to find out the meaning of each pinmux address, just check "am33xx.h". Besides, it helps us to configure module pin's for different device trees easily. For example of mii, If we want to configure module of mii pin, we check module in "am33xx.h" can pick register names we want to modify. It's hard to remember pin address number for the specific module to us.
> 
> If AM33XX_PADCONF is taken, we can make sure both of pin's direction and mux mode are actually set, and it helps us to debug.
> 
> We have many boards based on AM335x SoC. Some dts rely on symbolic constants and some dts are not. I think this patch series can let us develop boards with AM335x SoC easiler.
>

Aha, ok, having more boards like this certainly explains the
benefits. Thanks for an explanation.

I have applied patches, I'll run some basic tests and push the
results.

Best regards,
								Pavel
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 419 bytes --]

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#4789): https://lists.cip-project.org/g/cip-dev/message/4789
Mute This Topic: https://lists.cip-project.org/mt/74749053/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy  [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-09 10:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-08 10:33 [cip-dev] [PATCH 4.4.y-cip 0/3] ARM: dts: am335x: Replace numeric pinmux address with macro defines johnsonch.chen@moxa.com
2020-06-08 10:51 ` johnsonch.chen@moxa.com
2020-06-08 21:30   ` Pavel Machek
2020-06-09  3:54     ` johnsonch.chen@moxa.com
2020-06-09 10:45       ` Pavel Machek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.