arm: dts: Add am335x-boneblack-pps.dts
PATCH 1/1 arm: dts: Add am335x-boneblack-pps.dts
From: Lokesh Vutla <[email protected]>
Add a new am335x-boneblack-pps.dts that can be used to configure TIMER7 in PWM mode. This PWM signal can be used as a PPS signal when synchronized to PTP clock. Typically this synchronization is done by a userspace program. This PPS signal can be observed on pin P8.8.
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/am335x-boneblack-pps.dts | 25 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 arch/arm/boot/dts/am335x-boneblack-pps.dts
arch/arm/boot/dts/Makefile +1 -0
@@ -939,6 +939,7 @@ dtb-$(CONFIG_SOC_AM33XX) += \ am335x-base0033.dtb \ am335x-bone.dtb \ am335x-boneblack.dtb \ + am335x-boneblack-pps.dtb \ am335x-boneblack-wireless.dtb \ am335x-boneblue.dtb \ am335x-bonegreen.dtb \
arch/arm/boot/dts/am335x-boneblack-pps.dts new file +25 -0
@@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/ + */ + +#include "am335x-boneblack.dts" + +&am33xx_pinmux { + pwm7_pins: pinmux_pwm7_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_GPMC_OEN_REN, PIN_OUTPUT_PULLDOWN, MUX_MODE2) + >; + }; +}; + +/{ + pwm7: dmtimer-pwm7 { + compatible = "ti,omap-dmtimer-pwm"; + pinctrl-names = "default"; + pinctrl-0 = <&pwm7_pins>; + #pwm-cells = <3>; + ti,timers = <&timer7>; + ti,clock-source = <0x00>; /* timer_sys_ck */ + }; +};
base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
Signature · 1 line
2.37.3
Quoted 11 lines · Julien Panis
From: Lokesh Vutla <[email protected]>
Add a new
am335x-boneblack-pps.dtsthat can be used to configure TIMER7 in PWM mode. This PWM signal can be used as a PPS signal when synchronized to PTP clock. Typically this synchronization is done by a userspace program. This PPS signal can be observed on pin P8.8.Signed-off-by Lokesh Vutla <[email protected]>Signed-off-by Vignesh Raghavendra <[email protected]>Signed-off-by Adrien Ricciardi <[email protected]>Signed-off-by Julien Panis <[email protected]>
Use subject prefixes matching the subsystem (which you can get for example with git log --oneline -- DIRECTORY_OR_FILE on the directory your patch is touching). Missing soemthing identifying sub-arch.
Quoted 24 lines
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/am335x-boneblack-pps.dts | 25 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 arch/arm/boot/dts/am335x-boneblack-pps.dtsarch/arm/boot/dts/Makefile +1
-0@@ -939,6 +939,7 @@ dtb-$(CONFIG_SOC_AM33XX) += \ am335x-base0033.dtb \ am335x-bone.dtb \ am335x-boneblack.dtb \ + am335x-boneblack-pps.dtb \ am335x-boneblack-wireless.dtb \ am335x-boneblue.dtb \ am335x-bonegreen.dtb \arch/arm/boot/dts/am335x-boneblack-pps.dts new file +0
-0
arch/arm/boot/dts/am335x-boneblack-pps.dts line 6
Quoted 6 lines
arch/arm/boot/dts/am335x-boneblack-pps.dts new file +6
-0@@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/ + */ + +#include "am335x-boneblack.dts"
Probably you need here compatible (and binding as separate patch).
arch/arm/boot/dts/am335x-boneblack-pps.dts line 9
Quoted 3 lines
arch/arm/boot/dts/am335x-boneblack-pps.dts new file +3
-0+ +&am33xx_pinmux { + pwm7_pins: pinmux_pwm7_pins {
No underscores in node names.
arch/arm/boot/dts/am335x-boneblack-pps.dts line 17
Quoted 8 lines
arch/arm/boot/dts/am335x-boneblack-pps.dts new file +8
-0+ pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_GPMC_OEN_REN, PIN_OUTPUT_PULLDOWN, MUX_MODE2) + >; + }; +}; + +/{ + pwm7: dmtimer-pwm7 {
Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
arch/arm/boot/dts/am335x-boneblack-pps.dts line 23
Quoted 6 lines
arch/arm/boot/dts/am335x-boneblack-pps.dts new file +6
-0+ compatible = "ti,omap-dmtimer-pwm"; + pinctrl-names = "default"; + pinctrl-0 = <&pwm7_pins>; + #pwm-cells = <3>; + ti,timers = <&timer7>; + ti,clock-source = <0x00>; /* timer_sys_ck */
Why this is hex? Should be just 0/1/2?
Quoted 4 lines
arch/arm/boot/dts/am335x-boneblack-pps.dts new file +2
-0+ }; +};base-commit:
fe15c26ee26efa11741a7b632e9f23b01aca4cc6
Best regards,
Krzysztof
Hi,
Quoted 10 lines · Krzysztof Kozlowski
arch/arm/boot/dts/am335x-boneblack-pps.dts line 23
Quoted 7 lines · Julien Panis
From: Lokesh Vutla <[email protected]>
arch/arm/boot/dts/am335x-boneblack-pps.dts new file +6
-0+ compatible = "ti,omap-dmtimer-pwm"; + pinctrl-names = "default"; + pinctrl-0 = <&pwm7_pins>; + #pwm-cells = <3>; + ti,timers = <&timer7>; + ti,clock-source = <0x00>; /* timer_sys_ck */Why this is hex? Should be just 0/1/2?
I think the ti,clock-source can be left out now, this can be done with assigned-clocks and parents instead. Please grep for some examples in the current mainline kernel dts files.
Regards,
Tony
Quoted 51 lines · Julien Panis
From: Lokesh Vutla <[email protected]>
Add a new
am335x-boneblack-pps.dtsthat can be used to configure TIMER7 in PWM mode. This PWM signal can be used as a PPS signal when synchronized to PTP clock. Typically this synchronization is done by a userspace program. This PPS signal can be observed on pin P8.8.Signed-off-by Lokesh Vutla <[email protected]>Signed-off-by Vignesh Raghavendra <[email protected]>Signed-off-by Adrien Ricciardi <[email protected]>Signed-off-by Julien Panis <[email protected]>--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/am335x-boneblack-pps.dts | 25 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 arch/arm/boot/dts/am335x-boneblack-pps.dtsarch/arm/boot/dts/Makefile +1
-0@@ -939,6 +939,7 @@ dtb-$(CONFIG_SOC_AM33XX) += \ am335x-base0033.dtb \ am335x-bone.dtb \ am335x-boneblack.dtb \ + am335x-boneblack-pps.dtb \ am335x-boneblack-wireless.dtb \ am335x-boneblue.dtb \ am335x-bonegreen.dtb \arch/arm/boot/dts/am335x-boneblack-pps.dts new file +15
-0@@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/ + */ + +#include "am335x-boneblack.dts" + +&am33xx_pinmux { + pwm7_pins: pinmux_pwm7_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_GPMC_OEN_REN, PIN_OUTPUT_PULLDOWN, MUX_MODE2) + >; + }; +}; +
arch/arm/boot/dts/am335x-boneblack-pps.dts line 25
Quoted 10 lines
arch/arm/boot/dts/am335x-boneblack-pps.dts new file +10
-0+/{ + pwm7: dmtimer-pwm7 { + compatible = "ti,omap-dmtimer-pwm"; + pinctrl-names = "default"; + pinctrl-0 = <&pwm7_pins>; + #pwm-cells = <3>; + ti,timers = <&timer7>; + ti,clock-source = <0x00>; /* timer_sys_ck */ + }; +};
I know this commit is pretty small, but mainline now has overlay support:
At what point do we finally merge in the many dozen *BeagleBone* overlays, or do we still wait for :
https://lore.kernel.org/lkml/[email protected]/
Regards,
Signature · 2 lines
Robert Nelson https://rcn-ee.com/
Quoted 66 lines · Robert Nelson
Quoted 51 lines · Julien Panis
From: Lokesh Vutla <[email protected]>
Add a new
am335x-boneblack-pps.dtsthat can be used to configure TIMER7 in PWM mode. This PWM signal can be used as a PPS signal when synchronized to PTP clock. Typically this synchronization is done by a userspace program. This PPS signal can be observed on pin P8.8.Signed-off-by Lokesh Vutla <[email protected]>Signed-off-by Vignesh Raghavendra <[email protected]>Signed-off-by Adrien Ricciardi <[email protected]>Signed-off-by Julien Panis <[email protected]>--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/am335x-boneblack-pps.dts | 25 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 arch/arm/boot/dts/am335x-boneblack-pps.dtsarch/arm/boot/dts/Makefile +1
-0@@ -939,6 +939,7 @@ dtb-$(CONFIG_SOC_AM33XX) += \ am335x-base0033.dtb \ am335x-bone.dtb \ am335x-boneblack.dtb \ + am335x-boneblack-pps.dtb \ am335x-boneblack-wireless.dtb \ am335x-boneblue.dtb \ am335x-bonegreen.dtb \arch/arm/boot/dts/am335x-boneblack-pps.dts new file +15
-0@@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/ + */ + +#include "am335x-boneblack.dts" + +&am33xx_pinmux { + pwm7_pins: pinmux_pwm7_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_GPMC_OEN_REN, PIN_OUTPUT_PULLDOWN, MUX_MODE2) + >; + }; +}; +arch/arm/boot/dts/am335x-boneblack-pps.dts line 25
Quoted 10 lines
arch/arm/boot/dts/am335x-boneblack-pps.dts new file +10
-0+/{ + pwm7: dmtimer-pwm7 { + compatible = "ti,omap-dmtimer-pwm"; + pinctrl-names = "default"; + pinctrl-0 = <&pwm7_pins>; + #pwm-cells = <3>; + ti,timers = <&timer7>; + ti,clock-source = <0x00>; /* timer_sys_ck */ + }; +};I know this commit is pretty small, but mainline now has overlay support:
Quoted 5 lines
At what point do we finally merge in the many dozen *BeagleBone* overlays, or do we still wait for :
https://lore.kernel.org/lkml/[email protected]/
OH SIde note, #2... thanks @Nishanth Menon !
We do have this example:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8e01fb15b8157a825d309ea2598b494dd81a7b42
So instead of am335x-boneblack-pps.dtb it could be: .... am335x-bone-dmtimer-pwm7.dtbo or even am335x-dmtimer-pwm7.dtbo ?
Thoughts?
Signature · 2 lines
Robert Nelson https://rcn-ee.com/