* [PATCH v2 0/4] pocketbeagle device tree updates
@ 2023-08-18 15:10 Trevor Woerner
2023-08-18 15:10 ` [PATCH v2 1/4] ARM: dts: am335x-pocketbeagle: update LED information Trevor Woerner
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Trevor Woerner @ 2023-08-18 15:10 UTC (permalink / raw)
To: drew; +Cc: linux-arm-kernel, devicetree, linux-kernel
A couple device-tree updates for pocketbeagle:
1) Update the LED information (the LED on the pocketbeagle is blue, so
correct the information). Also the "label" property is deprecated so
replace it with "color" and "function" properties.
2) Remove a dependency cycle.
3) Now that mainline supports the PRUs via remoteproc, update the pin
information to enable the PRU pins and set their mode appropriately
as per the silkscreen.
4) Add a missing mode setting for a GPIO pin.
v2:
- update the patches to remove the pinctrl-0 property early in the set
- patch 2 is new, patches 3 and 4 adjusted accordingly
Trevor Woerner (4):
ARM: dts: am335x-pocketbeagle: update LED information
ARM: dts: am335x-pocketbeagle: remove dependency cycle
ARM: dts: am335x-pocketbeagle: enable pru
ARM: dts: am335x-pocketbeagle: add missing GPIO mux
.../boot/dts/ti/omap/am335x-pocketbeagle.dts | 62 +++++++++++++++----
1 file changed, 49 insertions(+), 13 deletions(-)
--
2.41.0.327.gaa9166bcc0ba
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/4] ARM: dts: am335x-pocketbeagle: update LED information
2023-08-18 15:10 [PATCH v2 0/4] pocketbeagle device tree updates Trevor Woerner
@ 2023-08-18 15:10 ` Trevor Woerner
2023-08-21 15:36 ` Robert Nelson
2023-08-18 15:10 ` [PATCH v2 2/4] ARM: dts: am335x-pocketbeagle: remove dependency cycle Trevor Woerner
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Trevor Woerner @ 2023-08-18 15:10 UTC (permalink / raw)
To: drew, Benoît Cousson, Tony Lindgren, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-kernel, devicetree, linux-kernel, linux-omap
The "label" property is deprecated. Replace the "label" property with
"color" and "description" properties.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
index 5dfe4d4bab93..1c11245f6864 100644
--- a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
+++ b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
@@ -8,6 +8,7 @@
#include "am33xx.dtsi"
#include "am335x-osd335x-common.dtsi"
+#include <dt-bindings/leds/common.h>
/ {
model = "TI AM335x PocketBeagle";
@@ -24,28 +25,32 @@ leds {
compatible = "gpio-leds";
led-usr0 {
- label = "beaglebone:green:usr0";
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_HEARTBEAT;
gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "off";
};
led-usr1 {
- label = "beaglebone:green:usr1";
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_DISK_ACTIVITY;
gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "mmc0";
default-state = "off";
};
led-usr2 {
- label = "beaglebone:green:usr2";
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_CPU;
gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "cpu0";
default-state = "off";
};
led-usr3 {
- label = "beaglebone:green:usr3";
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_INDICATOR;
gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
--
2.41.0.327.gaa9166bcc0ba
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/4] ARM: dts: am335x-pocketbeagle: remove dependency cycle
2023-08-18 15:10 [PATCH v2 0/4] pocketbeagle device tree updates Trevor Woerner
2023-08-18 15:10 ` [PATCH v2 1/4] ARM: dts: am335x-pocketbeagle: update LED information Trevor Woerner
@ 2023-08-18 15:10 ` Trevor Woerner
2023-08-18 15:10 ` [PATCH v2 3/4] ARM: dts: am335x-pocketbeagle: enable pru Trevor Woerner
2023-08-18 15:10 ` [PATCH v2 4/4] ARM: dts: am335x-pocketbeagle: add missing GPIO mux Trevor Woerner
3 siblings, 0 replies; 7+ messages in thread
From: Trevor Woerner @ 2023-08-18 15:10 UTC (permalink / raw)
To: drew, Benoît Cousson, Tony Lindgren, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-kernel, devicetree, linux-kernel, linux-omap
Remove the self-referenceing "pinctrl-0" entry inside the pinmux clause.
This eliminates the set of boot messages (one for each referenced pin)
similar to the following:
platform 44e10800.pinmux: Fixed dependency cycle(s) with /ocp/interconnect@44c00000/segment@200000/target-module@10000/scm@0/pinmux@800/pinmux_P2_17_gpio
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts | 5 -----
1 file changed, 5 deletions(-)
diff --git a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
index 1c11245f6864..1e72b8382597 100644
--- a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
+++ b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
@@ -213,11 +213,6 @@ &am33xx_pinmux {
compatible = "pinconf-single";
pinctrl-names = "default";
- pinctrl-0 = < &P2_03_gpio &P1_34_gpio &P2_19_gpio &P2_24_gpio
- &P2_33_gpio &P2_22_gpio &P2_18_gpio &P2_10_gpio
- &P2_06_gpio &P2_04_gpio &P2_02_gpio &P2_08_gpio
- &P2_17_gpio >;
-
/* P2_03 (ZCZ ball T10) gpio0_23 0x824 PIN 9 */
P2_03_gpio: P2-03-gpio-pins {
pinctrl-single,pins = <
--
2.41.0.327.gaa9166bcc0ba
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 3/4] ARM: dts: am335x-pocketbeagle: enable pru
2023-08-18 15:10 [PATCH v2 0/4] pocketbeagle device tree updates Trevor Woerner
2023-08-18 15:10 ` [PATCH v2 1/4] ARM: dts: am335x-pocketbeagle: update LED information Trevor Woerner
2023-08-18 15:10 ` [PATCH v2 2/4] ARM: dts: am335x-pocketbeagle: remove dependency cycle Trevor Woerner
@ 2023-08-18 15:10 ` Trevor Woerner
2023-08-18 15:10 ` [PATCH v2 4/4] ARM: dts: am335x-pocketbeagle: add missing GPIO mux Trevor Woerner
3 siblings, 0 replies; 7+ messages in thread
From: Trevor Woerner @ 2023-08-18 15:10 UTC (permalink / raw)
To: drew, Benoît Cousson, Tony Lindgren, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-kernel, devicetree, linux-kernel, linux-omap
Now that the PRU code is upstream and can be loaded via remoteproc, adjust
the device tree to enable it and adjust the pin muxing so that the default
setting of the pins matches what's is given on the silkscreen and/or
pocketbeagle wiring.
Caveat: In most cases, the silkscreen will indicate, for example, "PRU0.7",
but it doesn't indicate whether that pin should be enabled for input
or output. On the PRU a different MODE is used for input versus
output. So it is unclear which mode to enable (MODE5 = output, MODE6
= input). In cases where there is a choice (PRU1.11, PRU0.7, PRU0.4,
PRU0.1, PRU1.10, PRU0.6, PRU0.3, PRU0.2, and PRU0.5) output is assumed
(MODE5).
The remaining PRU silkscreen pins do not have a choice and are set as
follows:
PRU0.16 MODE5 input
PRU0.15i MODE6 input
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
.../boot/dts/ti/omap/am335x-pocketbeagle.dts | 46 +++++++++++++++----
1 file changed, 36 insertions(+), 10 deletions(-)
diff --git a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
index 1e72b8382597..fe4a1dbd8d88 100644
--- a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
+++ b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
@@ -117,7 +117,7 @@ &gpio1 {
"P2.24",
"P2.33",
"P2.22",
- "P2.18",
+ "P2.18 [PRU0.15i]",
"NC",
"NC",
"P2.01 [PWM1A]",
@@ -267,15 +267,6 @@ AM33XX_PADCONF(AM335X_PIN_GPMC_AD14, PIN_INPUT_PULLUP, MUX_MODE7)
pinctrl-single,bias-pulldown = < 0x10 0x00 0x10 0x18>;
};
- /* P2_18 (ZCZ ball U13) gpio1_15 0x83c PIN 15 */
- P2_18_gpio: P2-18-gpio-pins {
- pinctrl-single,pins = <
- AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLUP, MUX_MODE7)
- >;
- pinctrl-single,bias-pullup = < 0x10 0x10 0x00 0x18>;
- pinctrl-single,bias-pulldown = < 0x10 0x00 0x10 0x18>;
- };
-
/* P2_10 (ZCZ ball R14) gpio1_20 0x850 PIN 20 */
P2_10_gpio: P2-10-gpio-pins {
pinctrl-single,pins = <
@@ -401,6 +392,27 @@ AM33XX_PADCONF(AM335X_PIN_GPMC_WAIT0, PIN_INPUT_PULLUP, MUX_MODE6) /* (T17) gpmc
AM33XX_PADCONF(AM335X_PIN_GPMC_WPN, PIN_OUTPUT_PULLDOWN, MUX_MODE6) /* (U17) gpmc_wpn.uart4_txd */
>;
};
+
+ pru0_pins: pinmux-pru0-pins {
+ pinctrl-single,pins = <
+ AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR1, PIN_INPUT_PULLUP, MUX_MODE5)/* (D14) xdma_event_intr1.pr1_pru0_pru_r31_16 */
+ AM33XX_PADCONF(AM335X_PIN_MCASP0_AHCLKX, PIN_OUTPUT_PULLDOWN, MUX_MODE5)/* (A14) mcasp0_ahclkx.pr1_pru0_pru_r30_7 */
+ AM33XX_PADCONF(AM335X_PIN_MCASP0_ACLKR, PIN_OUTPUT_PULLDOWN, MUX_MODE5) /* (B12) mcasp0_acklr.pr1_pru0_pru_r30_4 */
+ AM33XX_PADCONF(AM335X_PIN_MCASP0_FSX, PIN_OUTPUT_PULLDOWN, MUX_MODE5) /* (B13) mcasp0_fsx.pr1_pru0_pru_r30_1 */
+ AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLUP, MUX_MODE6) /* (U13) gpmc_ad15.pr1_pru0_pru_r31_15 */
+ AM33XX_PADCONF(AM335X_PIN_MCASP0_AXR1, PIN_OUTPUT_PULLDOWN, MUX_MODE5) /* (D13) mcasp0_axr1.pr1_pru0_pru_r30_6 */
+ AM33XX_PADCONF(AM335X_PIN_MCASP0_AHCLKR, PIN_OUTPUT_PULLDOWN, MUX_MODE5)/* (C12) mcasp0_ahclkr.pr1_pru0_pru_r30_3 */
+ AM33XX_PADCONF(AM335X_PIN_MCASP0_AXR0, PIN_OUTPUT_PULLDOWN, MUX_MODE5) /* (D12) mcasp0_axr0.pr1_pru0_pru_r30_2 */
+ AM33XX_PADCONF(AM335X_PIN_MCASP0_FSR, PIN_OUTPUT_PULLDOWN, MUX_MODE5) /* (C13) mcasp0_fsr.pr1_pru0_pru_r30_5 */
+ >;
+ };
+
+ pru1_pins: pinmux-pru1-pins {
+ pinctrl-single,pins = <
+ AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_OUTPUT_PULLDOWN, MUX_MODE5)/*(R6) lcd_ac_bias_en.pr1_pru1_pru_r30_11 */
+ AM33XX_PADCONF(AM335X_PIN_LCD_PCLK, PIN_OUTPUT_PULLDOWN, MUX_MODE5) /* (V5) lcd_pclk.pr1_pru1_pru_r30_10 */
+ >;
+ };
};
&epwmss0 {
@@ -482,3 +494,17 @@ &usb0 {
&usb1 {
dr_mode = "host";
};
+
+&pruss_tm {
+ status = "okay";
+};
+
+&pru0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pru0_pins>;
+};
+
+&pru1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pru1_pins>;
+};
--
2.41.0.327.gaa9166bcc0ba
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 4/4] ARM: dts: am335x-pocketbeagle: add missing GPIO mux
2023-08-18 15:10 [PATCH v2 0/4] pocketbeagle device tree updates Trevor Woerner
` (2 preceding siblings ...)
2023-08-18 15:10 ` [PATCH v2 3/4] ARM: dts: am335x-pocketbeagle: enable pru Trevor Woerner
@ 2023-08-18 15:10 ` Trevor Woerner
3 siblings, 0 replies; 7+ messages in thread
From: Trevor Woerner @ 2023-08-18 15:10 UTC (permalink / raw)
To: drew, Benoît Cousson, Tony Lindgren, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-kernel, devicetree, linux-kernel, linux-omap
Add the default MODE setting of a GPIO pin that was missing from the device
tree (i.e. P2.20/gpio2_00). This is to ensure the GPIO pins match the
pocketbeagle wiring expectations.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
index fe4a1dbd8d88..051c8f04be21 100644
--- a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
+++ b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
@@ -267,6 +267,16 @@ AM33XX_PADCONF(AM335X_PIN_GPMC_AD14, PIN_INPUT_PULLUP, MUX_MODE7)
pinctrl-single,bias-pulldown = < 0x10 0x00 0x10 0x18>;
};
+ /* P2_20 (ZCZ ball T13) gpio2_00 0x888 */
+ P2_20_gpio: P2-20-gpio-pins {
+ pinctrl-single,pins = <
+ AM33XX_PADCONF(AM335X_PIN_GPMC_CSN3, PIN_INPUT_PULLUP, MUX_MODE7)
+ >;
+ pinctrl-single,bias-pullup = < 0x10 0x10 0x00 0x18>;
+ pinctrl-single,bias-pulldown = < 0x10 0x00 0x10 0x18>;
+ };
+
+
/* P2_10 (ZCZ ball R14) gpio1_20 0x850 PIN 20 */
P2_10_gpio: P2-10-gpio-pins {
pinctrl-single,pins = <
--
2.41.0.327.gaa9166bcc0ba
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/4] ARM: dts: am335x-pocketbeagle: update LED information
2023-08-18 15:10 ` [PATCH v2 1/4] ARM: dts: am335x-pocketbeagle: update LED information Trevor Woerner
@ 2023-08-21 15:36 ` Robert Nelson
2023-08-22 14:37 ` Trevor Woerner
0 siblings, 1 reply; 7+ messages in thread
From: Robert Nelson @ 2023-08-21 15:36 UTC (permalink / raw)
To: Trevor Woerner
Cc: drew, Benoît Cousson, Tony Lindgren, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
linux-kernel, linux-omap
On Sun, Aug 20, 2023 at 5:24 AM Trevor Woerner <twoerner@gmail.com> wrote:
>
> The "label" property is deprecated. Replace the "label" property with
> "color" and "description" properties.
>
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> ---
> arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
> index 5dfe4d4bab93..1c11245f6864 100644
> --- a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
> +++ b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
> @@ -8,6 +8,7 @@
>
> #include "am33xx.dtsi"
> #include "am335x-osd335x-common.dtsi"
> +#include <dt-bindings/leds/common.h>
>
> / {
> model = "TI AM335x PocketBeagle";
> @@ -24,28 +25,32 @@ leds {
> compatible = "gpio-leds";
>
> led-usr0 {
> - label = "beaglebone:green:usr0";
> + color = <LED_COLOR_ID_BLUE>;
> + function = LED_FUNCTION_HEARTBEAT;
So some background, while the LED are not Green, and this is not the BeagleBone.
We used these specific labels to keep all user documents going back to
the original BeagleBone (white) (with 3.8.x kernel), the same so users
could easily blink an led from user-space even on newer boards.
So it became our un-official abi for new users for the BeagleBoard
family of devices..
It's even what we do on the BeaglePlay..
https://git.beagleboard.org/beagleboard/BeagleBoard-DeviceTrees/-/blob/v5.10.x-ti-unified/src/arm64/k3-am625-beagleplay.dts#L179-217
Regards,
--
Robert Nelson
https://rcn-ee.com/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/4] ARM: dts: am335x-pocketbeagle: update LED information
2023-08-21 15:36 ` Robert Nelson
@ 2023-08-22 14:37 ` Trevor Woerner
0 siblings, 0 replies; 7+ messages in thread
From: Trevor Woerner @ 2023-08-22 14:37 UTC (permalink / raw)
To: Robert Nelson
Cc: drew, Benoît Cousson, Tony Lindgren, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
linux-kernel, linux-omap
On Mon 2023-08-21 @ 10:36:34 AM, Robert Nelson wrote:
> On Sun, Aug 20, 2023 at 5:24 AM Trevor Woerner <twoerner@gmail.com> wrote:
> >
> > The "label" property is deprecated. Replace the "label" property with
> > "color" and "description" properties.
> >
> > Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> > ---
> > arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts | 13 +++++++++----
> > 1 file changed, 9 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
> > index 5dfe4d4bab93..1c11245f6864 100644
> > --- a/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
> > +++ b/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts
> > @@ -8,6 +8,7 @@
> >
> > #include "am33xx.dtsi"
> > #include "am335x-osd335x-common.dtsi"
> > +#include <dt-bindings/leds/common.h>
> >
> > / {
> > model = "TI AM335x PocketBeagle";
> > @@ -24,28 +25,32 @@ leds {
> > compatible = "gpio-leds";
> >
> > led-usr0 {
> > - label = "beaglebone:green:usr0";
> > + color = <LED_COLOR_ID_BLUE>;
> > + function = LED_FUNCTION_HEARTBEAT;
>
> So some background, while the LED are not Green, and this is not the BeagleBone.
>
> We used these specific labels to keep all user documents going back to
> the original BeagleBone (white) (with 3.8.x kernel), the same so users
> could easily blink an led from user-space even on newer boards.
>
> So it became our un-official abi for new users for the BeagleBoard
> family of devices..
>
> It's even what we do on the BeaglePlay..
>
> https://git.beagleboard.org/beagleboard/BeagleBoard-DeviceTrees/-/blob/v5.10.x-ti-unified/src/arm64/k3-am625-beagleplay.dts#L179-217
Thanks for the background. I've sent a v3 which simply adds the "color" and
"function" properties but leaves the "label" property intact.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-08-22 14:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-18 15:10 [PATCH v2 0/4] pocketbeagle device tree updates Trevor Woerner
2023-08-18 15:10 ` [PATCH v2 1/4] ARM: dts: am335x-pocketbeagle: update LED information Trevor Woerner
2023-08-21 15:36 ` Robert Nelson
2023-08-22 14:37 ` Trevor Woerner
2023-08-18 15:10 ` [PATCH v2 2/4] ARM: dts: am335x-pocketbeagle: remove dependency cycle Trevor Woerner
2023-08-18 15:10 ` [PATCH v2 3/4] ARM: dts: am335x-pocketbeagle: enable pru Trevor Woerner
2023-08-18 15:10 ` [PATCH v2 4/4] ARM: dts: am335x-pocketbeagle: add missing GPIO mux Trevor Woerner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).