[PATCH 8/8] arm: dts: mediatek: add PCIe node for MT7981

2025-01-27 Thread Christian Marangi
Add PCIe node for MT7981 with all the required properties to make PCIe work. Signed-off-by: Christian Marangi --- arch/arm/dts/mt7981.dtsi | 35 +++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/dts/mt7981.dtsi b/arch/arm/dts/mt7981.dtsi index

[PATCH 7/8] arm: dts: mediatek: add USB nodes for MT7981

2025-01-27 Thread Christian Marangi
From: John Crispin Add USB PHY nodes for MT7981. These are needed for USB support and also for PCIe support as the u3 PHY can also be used for PHY. Signed-off-by: John Crispin Signed-off-by: Christian Marangi --- arch/arm/dts/mt7981.dtsi | 48 1 file

[PATCH 6/8] mediatek: mt7981: move gpio-controller up and rename pinctrl to pio

2025-01-27 Thread Christian Marangi
Move gpio-controller up to pinctrl node and rename label to "pio" to match the label used in upstream kernel linux. Update any DTS that reference the pinctrl to follow the new naming and structure. Signed-off-by: Christian Marangi --- arch/arm/dts/mt7981-emmc-rfb.dts | 4 ++-- ar

[PATCH 5/8] mediatek: mt7988: move gpio-controller up and rename pinctrl to pio

2025-01-27 Thread Christian Marangi
Move gpio-controller up to pinctrl node and rename label to "pio" to match the label used in upstream kernel linux. Update any DTS that reference the pinctrl to follow the new naming and structure. Signed-off-by: Christian Marangi --- arch/arm/dts/mt7988-rfb.dts| 2 +- arch/arm/

[PATCH 4/8] pinctrl: mediatek: mt7988: rename reg-names to upstream linux format

2025-01-27 Thread Christian Marangi
Rename reg-names to upstream linux format. Upstream linux drop the "_base". To make use of upstream DTSI, align to the upstream naming. Signed-off-by: Christian Marangi --- arch/arm/dts/mt7988.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/m

[PATCH 3/8] mediatek: mt7986: move gpio-controller up and rename pinctrl to pio

2025-01-27 Thread Christian Marangi
Move gpio-controller up to pinctrl node and rename label to "pio" to match the label used in upstream kernel linux. Update any DTS that reference the pinctrl to follow the new naming and structure. Signed-off-by: Christian Marangi --- arch/arm/dts/mt7986.dtsi | 8 +++-

[PATCH 2/8] pinctrl: mediatek: mt7986: rename reg-names to upstream linux format

2025-01-27 Thread Christian Marangi
Rename reg-names to upstream linux format. Upstream linux drop the "_base". To make use of upstream DTSI, align to the upstream naming. Signed-off-by: Christian Marangi --- arch/arm/dts/mt7986.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/

[PATCH 1/8] pinctrl: mediatek: mt7981: rename reg-names to upstream linux format

2025-01-27 Thread Christian Marangi
Rename reg-names to upstream linux format. Upstream linux drop the "_base". To make use of upstream DTSI, align to the upstream naming. Signed-off-by: Christian Marangi --- arch/arm/dts/mt7981.dtsi | 6 +++--- drivers/pinctrl/mediatek/pinctrl-mt7981.c | 5 +++-- 2 fil

[PATCH 0/8] mediatek: final preparation for OF_UPSTREAM support

2025-01-27 Thread Christian Marangi
same node downstream and upstream. Mediatek is working hard upstream to also push all the remaining nodes. All patch are the final changes after the pinctrl patch merged previously. All patch pass CI tests tested in this PR [0] [0] https://github.com/u-boot/u-boot/pull/731 Christian Maran

Re: [PATCH v2 0/8] led: update LED boot/activity to new property implementation

2024-12-06 Thread Christian Marangi
On Fri, Nov 22, 2024 at 08:41:13PM -0600, Tom Rini wrote: > On Wed, Nov 13, 2024 at 09:24:59PM +0100, Christian Marangi wrote: > > On Wed, Nov 13, 2024 at 12:00:59PM -0600, Tom Rini wrote: > > > On Sun, Nov 10, 2024 at 12:50:19PM +0100, Christian Marangi wrote: > > > &

Re: [PATCH v2 0/8] led: update LED boot/activity to new property implementation

2024-11-13 Thread Christian Marangi
On Wed, Nov 13, 2024 at 12:00:59PM -0600, Tom Rini wrote: > On Sun, Nov 10, 2024 at 12:50:19PM +0100, Christian Marangi wrote: > > > This series is split in 2 part. > > > > While adapting the LED boot and activity code to the new property > > accepted by Rob in d

[PATCH v2 8/8] test: dm: Update test for LED activity and boot

2024-11-10 Thread Christian Marangi
Update test for LED activity and boot to follow new implementation with property set to the LED node phandle. Also update a copy-paste error in the function name for the activity tests and actually enable the test with the DM_TEST macro. Signed-off-by: Christian Marangi --- arch/sandbox/dts

[PATCH v2 7/8] led: update LED boot/activity to new property implementation

2024-11-10 Thread Christian Marangi
to have a suffix. While at it generalize the LED node label parsing since the logic is common for generic LED bind and LED activity/boot. Signed-off-by: Christian Marangi --- drivers/led/led-uclass.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git

[PATCH v2 6/8] test: dm: Add test for ofnode options phandle helper

2024-11-10 Thread Christian Marangi
Add test for ofnode options phandle helper and add new property in the sandbox test dts. Signed-off-by: Christian Marangi --- arch/sandbox/dts/test.dts | 1 + test/dm/ofnode.c | 11 +++ 2 files changed, 12 insertions(+) diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox

[PATCH v2 5/8] dm: core: implement phandle ofnode_options helper

2024-11-10 Thread Christian Marangi
Implement ofnode_options phandle helper to get an ofnode from a phandle option in /options/u-boot. This helper can be useful since new DT yaml usually require to link a phandle of a node instead of referencing it by name or other indirect way. Signed-off-by: Christian Marangi --- drivers/core

[PATCH v2 4/8] test: dm: Expand dm_test_ofnode_phandle(_ot) with new ofnode/tree_parse_phandle

2024-11-10 Thread Christian Marangi
Expand dm_test_ofnode_phandle(_ot) with new ofnode/tree_parse_phandle() op. Signed-off-by: Christian Marangi --- arch/sandbox/dts/other.dts | 7 ++ arch/sandbox/dts/test.dts | 7 ++ test/dm/ofnode.c | 44 ++ 3 files changed, 54 insertions

[PATCH v2 3/8] dm: core: implement ofnode/tree_parse_phandle() helper

2024-11-10 Thread Christian Marangi
Implement ofnode/tree_parse_phandle() helper as an equivalent of of_parse_phandle to handle simple single value phandle. Signed-off-by: Christian Marangi --- drivers/core/ofnode.c | 58 +++ include/dm/ofnode.h | 26 +++ 2 files changed

[PATCH v2 2/8] test: dm: fix broken dm_test_ofnode_phandle_ot and get_by_phandle_ot

2024-11-10 Thread Christian Marangi
phandle property to other-phandle. Signed-off-by: Christian Marangi --- arch/sandbox/dts/other.dts | 24 ++- test/dm/ofnode.c | 83 +++--- 2 files changed, 91 insertions(+), 16 deletions(-) diff --git a/arch/sandbox/dts/other.dts b/arch/sandbox/dts

[PATCH v2 1/8] dm: core: implement oftree variant of parse_phandle OPs

2024-11-10 Thread Christian Marangi
to_ofnode. This is required to support multiple FDB blob to calculate the correct of_offset of the ofnode. Signed-off-by: Christian Marangi --- drivers/core/of_access.c | 61 drivers/core/ofnode.c| 51 ++--

[PATCH v2 0/8] led: update LED boot/activity to new property implementation

2024-11-10 Thread Christian Marangi
ds on the first) All CI tested with azure pipeline. Changes v2: - Fix handling of flat tree for phandle - Fix test and other.dts changes Christian Marangi (8): dm: core: implement oftree variant of parse_phandle OPs test: dm: fix broken dm_test_ofnode_phandle_ot and get_by_phandle_ot dm:

Re: [PATCH 0/8] led: update LED boot/activity to new property implementation

2024-11-09 Thread Christian Marangi
On Sat, Nov 09, 2024 at 07:00:25PM +0100, Christian Marangi wrote: > This series is split in 2 part. > > While adapting the LED boot and activity code to the new property > accepted by Rob in dt-schema repository, a big BUG was discovered. > > The reason wasn't clear at

[PATCH 8/8] test: dm: Update test for LED activity and boot

2024-11-09 Thread Christian Marangi
Update test for LED activity and boot to follow new implementation with property set to the LED node phandle. Also update a copy-paste error in the function name for the activity tests and actually enable the test with the DM_TEST macro. Signed-off-by: Christian Marangi --- arch/sandbox/dts

[PATCH 7/8] led: update LED boot/activity to new property implementation

2024-11-09 Thread Christian Marangi
to have a suffix. While at it generalize the LED node label parsing since the logic is common for generic LED bind and LED activity/boot. Signed-off-by: Christian Marangi --- drivers/led/led-uclass.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git

[PATCH 6/8] test: dm: Add test for ofnode options phandle helper

2024-11-09 Thread Christian Marangi
Add test for ofnode options phandle helper and add new property in the sandbox test dts. Signed-off-by: Christian Marangi --- arch/sandbox/dts/test.dts | 1 + test/dm/ofnode.c | 11 +++ 2 files changed, 12 insertions(+) diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox

[PATCH 5/8] dm: core: implement phandle ofnode_options helper

2024-11-09 Thread Christian Marangi
Implement ofnode_options phandle helper to get an ofnode from a phandle option in /options/u-boot. This helper can be useful since new DT yaml usually require to link a phandle of a node instead of referencing it by name or other indirect way. Signed-off-by: Christian Marangi --- drivers/core

[PATCH 4/8] test: dm: Expand dm_test_ofnode_phandle(_ot) with new ofnode/tree_parse_phandle

2024-11-09 Thread Christian Marangi
Expand dm_test_ofnode_phandle(_ot) with new ofnode/tree_parse_phandle() op. Signed-off-by: Christian Marangi --- arch/sandbox/dts/other.dts | 7 ++ arch/sandbox/dts/test.dts | 7 ++ test/dm/ofnode.c | 44 ++ 3 files changed, 54 insertions

[PATCH 1/8] dm: core: implement oftree variant of parse_phandle OPs

2024-11-09 Thread Christian Marangi
r of_find_node_by_phandle. Introduce all the variant OPs for this and in ofnode, the oftree OPs following how it's done for other OPs with similar task. Signed-off-by: Christian Marangi --- drivers/core/of_access.c | 61 drivers/core/ofnode.c| 45 +++

[PATCH 3/8] dm: core: implement ofnode/tree_parse_phandle() helper

2024-11-09 Thread Christian Marangi
Implement ofnode/tree_parse_phandle() helper as an equivalent of of_parse_phandle to handle simple single value phandle. Signed-off-by: Christian Marangi --- drivers/core/ofnode.c | 58 +++ include/dm/ofnode.h | 26 +++ 2 files changed

[PATCH 2/8] test: dm: fix broken dm_test_ofnode_phandle_ot

2024-11-09 Thread Christian Marangi
test these feature, make use oif the new OPs oftree to parse phandle. For consistency with the dm_test_ofnode_phandle, rework the test and other.dts to use the same property with the other- prefix to every node. Signed-off-by: Christian Marangi --- arch/sandbox/dts/other.dts | 26

[PATCH 0/8] led: update LED boot/activity to new property implementation

2024-11-09 Thread Christian Marangi
ds on the first) Christian Marangi (8): dm: core: implement oftree variant of parse_phandle OPs test: dm: fix broken dm_test_ofnode_phandle_ot dm: core: implement ofnode/tree_parse_phandle() helper test: dm: Expand dm_test_ofnode_phandle(_ot) with new ofnode/tree_parse_phandle dm:

[PATCH] .gitignore: add test overlay .S and u_boot_logo files

2024-11-09 Thread Christian Marangi
Add test overlay .S and u_boot_logo file to gitignore as these files are generated and should not be committed but ignored. Signed-off-by: Christian Marangi --- .gitignore | 5 + 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 502a7e6ec70..e93c33da1bd 100644

Re: [PATCH v5 03/11] led: implement LED boot API

2024-11-05 Thread Christian Marangi
On Tue, Nov 05, 2024 at 08:12:47AM -0700, Simon Glass wrote: > Hi Christian, > > On Mon, 4 Nov 2024 at 16:13, Christian Marangi wrote: > > > > On Sun, Nov 03, 2024 at 07:46:19AM -0700, Simon Glass wrote: > > > Hi Christian, > > > > > > On Sat, 2 No

Re: [PATCH v5 03/11] led: implement LED boot API

2024-11-04 Thread Christian Marangi
On Sun, Nov 03, 2024 at 07:46:19AM -0700, Simon Glass wrote: > Hi Christian, > > On Sat, 2 Nov 2024 at 13:52, Christian Marangi wrote: > > > > On Sat, Nov 02, 2024 at 01:50:13PM -0600, Simon Glass wrote: > > > Hi Christian, > > > > > > On Sat, 2 No

Re: [PATCH v5 03/11] led: implement LED boot API

2024-11-02 Thread Christian Marangi
On Sat, Nov 02, 2024 at 01:50:13PM -0600, Simon Glass wrote: > Hi Christian, > > On Sat, 2 Nov 2024 at 13:36, Christian Marangi wrote: > > > > On Sat, Nov 02, 2024 at 01:33:10PM -0600, Simon Glass wrote: > > > Hi Christian, > > > > > >

Re: [PATCH v5 03/11] led: implement LED boot API

2024-11-02 Thread Christian Marangi
On Sat, Nov 02, 2024 at 01:33:10PM -0600, Simon Glass wrote: > Hi Christian, > > On Wed, 2 Oct 2024 at 16:55, Simon Glass wrote: > > > > On Tue, 1 Oct 2024 at 06:25, Christian Marangi wrote: > > > > > > Implement LED boot API to signal correct boot of

Re: [PATCH v5 01/11] led: toggle LED on initial SW blink

2024-10-03 Thread Christian Marangi
On Thu, Oct 03, 2024 at 08:22:21AM +0200, Michael Nazzareno Trimarchi wrote: > Hi > > On Tue, Oct 1, 2024 at 2:25 PM Christian Marangi wrote: > > > > We currently init the LED OFF when SW blink is triggered when > > on_state_change() is called. This can be problemati

Re: [PATCH v5 03/11] led: implement LED boot API

2024-10-02 Thread Christian Marangi
On Wed, Oct 02, 2024 at 04:55:42PM -0600, Simon Glass wrote: > On Tue, 1 Oct 2024 at 06:25, Christian Marangi wrote: > > > > Implement LED boot API to signal correct boot of the system. > > > > led_boot_on/off/blink() are introduced to turn ON, OFF and BLINK

Re: [PATCH v5 01/11] led: toggle LED on initial SW blink

2024-10-02 Thread Christian Marangi
On Wed, Oct 02, 2024 at 04:55:41PM -0600, Simon Glass wrote: > On Tue, 1 Oct 2024 at 06:25, Christian Marangi wrote: > > > > We currently init the LED OFF when SW blink is triggered when > > on_state_change() is called. This can be problematic for very short > > perio

[PATCH v5 00/11] led: introduce LED boot and activity function

2024-10-01 Thread Christian Marangi
Changes v3: - Switch to /config property Changes v2: - Drop GPIO SW implementation - Add fix for new LED SW BLINK Christian Marangi (11): led: toggle LED on initial SW blink dm: core: implement ofnode_options helpers led: implement LED boot API common: board_r: rework BOOT LED handling

[PATCH v5 06/11] tftp: implement support for LED activity

2024-10-01 Thread Christian Marangi
Implement support for LED activity. If the feature is enabled, make the defined ACTIVITY LED to signal traffic. Also turn the ACTIVITY LED OFF if a CTRL-C is detected in the main net loop function. Signed-off-by: Christian Marangi Reviewed-by: Simon Glass --- net/net.c | 4 net/tftp.c

[PATCH v5 01/11] led: toggle LED on initial SW blink

2024-10-01 Thread Christian Marangi
from the user. Signed-off-by: Christian Marangi --- drivers/led/led_sw_blink.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/led/led_sw_blink.c b/drivers/led/led_sw_blink.c index 9e36edbee47..06a43db340c 100644 --- a/drivers/led/led_sw_blink.c +++ b

[PATCH v5 08/11] ubi: implement support for LED activity

2024-10-01 Thread Christian Marangi
Implement support for LED activity. If the feature is enabled, make the defined ACTIVITY LED to signal ubi write operation. Signed-off-by: Christian Marangi Reviewed-by: Simon Glass --- cmd/ubi.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cmd/ubi.c b/cmd

[PATCH v5 10/11] test: dm: Add tests for LED boot and activity

2024-10-01 Thread Christian Marangi
Add tests for LED boot and activity feature and add required property in sandbox test DTS. Signed-off-by: Christian Marangi Reviewed-by: Simon Glass --- arch/sandbox/dts/test.dts | 2 ++ test/dm/led.c | 72 +++ 2 files changed, 74 insertions

[PATCH v5 07/11] mtd: implement support for LED activity

2024-10-01 Thread Christian Marangi
: Christian Marangi --- cmd/mtd.c | 9 + 1 file changed, 9 insertions(+) diff --git a/cmd/mtd.c b/cmd/mtd.c index 795aaa2b37d..f178d7bea61 100644 --- a/cmd/mtd.c +++ b/cmd/mtd.c @@ -10,6 +10,7 @@ #include #include +#include #if CONFIG_IS_ENABLED(CMD_MTD_OTP) #include #endif

[PATCH v5 02/11] dm: core: implement ofnode_options helpers

2024-10-01 Thread Christian Marangi
Implement ofnode_options helpers to read options in /options/u-boot to adapt to the new way to declare options as described in [1]. [1] dtschema/schemas/options/u-boot.yaml Signed-off-by: Christian Marangi Reviewed-by: Simon Glass --- drivers/core/ofnode.c | 33

[PATCH v5 04/11] common: board_r: rework BOOT LED handling

2024-10-01 Thread Christian Marangi
implementation have support for LED boot, rework this by also set the new BOOT LED to blink and also set it to ON before entering main loop to confirm successful boot. Signed-off-by: Christian Marangi Reviewed-by: Simon Glass --- common/board_r.c | 28 include/status_led.h

[PATCH v5 11/11] test: dm: Expand ofnode options test with new helper

2024-10-01 Thread Christian Marangi
Expand ofnode options test with new generic helper for bool, int and string. Signed-off-by: Christian Marangi Reviewed-by: Simon Glass --- arch/sandbox/dts/test.dts | 3 +++ test/dm/ofnode.c | 9 + 2 files changed, 12 insertions(+) diff --git a/arch/sandbox/dts/test.dts b

[PATCH v5 09/11] doc: introduce led.rst documentation

2024-10-01 Thread Christian Marangi
Introduce simple led.rst documentation to document all the additional Kconfig and the current limitation of LED_BLINK and GPIO software blink. Also add missing definition for sw_blink in led_uc_plat struct. Signed-off-by: Christian Marangi Reviewed-by: Simon Glass --- doc/api/index.rst | 1

[PATCH v5 03/11] led: implement LED boot API

2024-10-01 Thread Christian Marangi
is not enabled, led_boot_blink call will fallback to simple LED ON. To cache the data we repurpose the now unused led_uc_priv for storage of global LED uclass info. Signed-off-by: Christian Marangi --- drivers/led/Kconfig | 11 ++ drivers/led/led-uclass.c | 85

[PATCH v5 05/11] led: implement LED activity API

2024-10-01 Thread Christian Marangi
by default. If CONFIG_LED_BLINK or CONFIG_LED_SW_BLINK is not enabled, led_boot_blink call will fallback to simple LED ON. Signed-off-by: Christian Marangi --- drivers/led/Kconfig | 13 +++ drivers/led/led-uclass.c | 81 +++- include/led.h

Re: [PATCH v4 03/11] led: implement LED boot API

2024-09-29 Thread Christian Marangi
On Thu, Sep 26, 2024 at 11:33:18PM +0200, Simon Glass wrote: > Hi Christian, > > On Sat, 21 Sept 2024 at 00:51, Christian Marangi wrote: > > > > Implement LED boot API to signal correct boot of the system. > > > > led_boot_on/off/blink() are introdu

Re: [PATCH v4 01/11] led: toggle LED on initial SW blink

2024-09-22 Thread Christian Marangi
On Sat, Sep 21, 2024 at 01:14:36PM +0200, Michael Nazzareno Trimarchi wrote: > Hi > > On Sat, Sep 21, 2024 at 12:51 AM Christian Marangi > wrote: > > > > We currently init the LED OFF when SW blink is triggered when > > on_state_change() is called. This can

Re: [PATCH v4 07/11] mtd: implement support for LED activity

2024-09-21 Thread Christian Marangi
d something is happening. But yes yours is not a bad idea, I don't think it would make a recovery procedure confusing, lets see if others agree on that ok? > > > > Signed-off-by: Christian Marangi > > --- > > cmd/mtd.c | 11 +++ > > 1 file changed,

[PATCH v4 11/11] test: dm: Expand ofnode options test with new helper

2024-09-20 Thread Christian Marangi
Expand ofnode options test with new generic helper for bool, int and string. Signed-off-by: Christian Marangi --- arch/sandbox/dts/test.dts | 3 +++ test/dm/ofnode.c | 9 + 2 files changed, 12 insertions(+) diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts

[PATCH v4 10/11] test: dm: Add tests for LED boot and activity

2024-09-20 Thread Christian Marangi
Add tests for LED boot and activity feature and add required property in sandbox test DTS. Signed-off-by: Christian Marangi --- arch/sandbox/dts/test.dts | 2 ++ test/dm/led.c | 72 +++ 2 files changed, 74 insertions(+) diff --git a/arch/sandbox

[PATCH v4 09/11] doc: introduce led.rst documentation

2024-09-20 Thread Christian Marangi
Introduce simple led.rst documentation to document all the additional Kconfig and the current limitation of LED_BLINK and GPIO software blink. Also add missing definition for sw_blink in led_uc_plat struct. Signed-off-by: Christian Marangi --- doc/api/index.rst | 1 + doc/api/led.rst | 10

[PATCH v4 08/11] ubi: implement support for LED activity

2024-09-20 Thread Christian Marangi
Implement support for LED activity. If the feature is enabled, make the defined ACTIVITY LED to signal ubi write operation. Signed-off-by: Christian Marangi --- cmd/ubi.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cmd/ubi.c b/cmd/ubi.c index 0e62e449327

[PATCH v4 07/11] mtd: implement support for LED activity

2024-09-20 Thread Christian Marangi
Implement support for LED activity. If the feature is enabled, make the defined ACTIVITY LED to signal mtd write or erase operations. Signed-off-by: Christian Marangi --- cmd/mtd.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/cmd/mtd.c b/cmd/mtd.c index 795aaa2b37d

[PATCH v4 06/11] tftp: implement support for LED activity

2024-09-20 Thread Christian Marangi
Implement support for LED activity. If the feature is enabled, make the defined ACTIVITY LED to signal traffic. Also turn the ACTIVITY LED OFF if a CTRL-C is detected in the main net loop function. Signed-off-by: Christian Marangi --- net/net.c | 4 net/tftp.c | 5 + 2 files changed

[PATCH v4 05/11] led: implement LED activity API

2024-09-20 Thread Christian Marangi
by default. If CONFIG_LED_BLINK or CONFIG_LED_SW_BLINK is not enabled, led_boot_blink call will fallback to simple LED ON. Signed-off-by: Christian Marangi --- drivers/led/Kconfig | 8 drivers/led/led-uclass.c | 94 ++-- include/led.h|

[PATCH v4 04/11] common: board_r: rework BOOT LED handling

2024-09-20 Thread Christian Marangi
implementation have support for LED boot, rework this by also set the new BOOT LED to blink and also set it to ON before entering main loop to confirm successful boot. Signed-off-by: Christian Marangi --- common/board_r.c | 28 include/status_led.h | 13 + 2 files

[PATCH v4 03/11] led: implement LED boot API

2024-09-20 Thread Christian Marangi
is not enabled, led_boot_blink call will fallback to simple LED ON. To cache the data we repurpose the now unused led_uc_priv for storage of global LED uclass info. Signed-off-by: Christian Marangi --- drivers/led/Kconfig | 7 +++ drivers/led/led-uclass.c | 100 +++

[PATCH v4 02/11] dm: core: implement ofnode_options helpers

2024-09-20 Thread Christian Marangi
Implement ofnode_options helpers to read options in /options/u-boot to adapt to the new way to declare options as described in [0]. [0] dtschema/schemas/options/u-boot.yaml Signed-off-by: Christian Marangi --- drivers/core/ofnode.c | 33 + include/dm/ofnode.h

[PATCH v4 01/11] led: toggle LED on initial SW blink

2024-09-20 Thread Christian Marangi
from the user. Signed-off-by: Christian Marangi Reviewed-by: Simon Glass --- drivers/led/led_sw_blink.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/led/led_sw_blink.c b/drivers/led/led_sw_blink.c index 9e36edbee47..9d9820720c6 100644 --- a/drivers/led

[PATCH v4 00/11] led: introduce LED boot and activity function

2024-09-20 Thread Christian Marangi
tiple patch for additional helper - Rework patches to limit ifdef in some place Changes v3: - Switch to /config property Changes v2: - Drop GPIO SW implementation - Add fix for new LED SW BLINK Christian Marangi (11): led: toggle LED on initial SW blink dm: core: implement ofnode_options helpers

Re: [PATCH v3 1/9] led: turn LED ON on initial SW blink

2024-09-19 Thread Christian Marangi
On Thu, Sep 19, 2024 at 04:13:44PM +0200, Simon Glass wrote: > Hi Christian, > > On Mon, 12 Aug 2024 at 12:33, Christian Marangi wrote: > > > > We currently init the LED OFF when SW blink is triggered when > > on_state_change() is called. This can be problematic for v

Re: [PATCH v3 1/9] led: turn LED ON on initial SW blink

2024-08-22 Thread Christian Marangi
On Tue, Aug 13, 2024 at 12:00:59AM +0200, Heinrich Schuchardt wrote: > > > Am 12. August 2024 12:32:43 MESZ schrieb Christian Marangi > : > >We currently init the LED OFF when SW blink is triggered when > >on_state_change() is called. This can be problematic for very s

Re: [PATCH v3 8/9] ubi: implement support for LED activity

2024-08-22 Thread Christian Marangi
On Sun, Aug 18, 2024 at 09:32:32PM +0200, Michael Nazzareno Trimarchi wrote: > Hi > > On Sun, Aug 18, 2024 at 6:24 PM Christian Marangi > wrote: > > > > On Wed, Aug 14, 2024 at 10:17:18AM +0200, Michael Nazzareno Trimarchi wrote: > > > Hi all > > > &

Re: [PATCH v3 8/9] ubi: implement support for LED activity

2024-08-18 Thread Christian Marangi
On Wed, Aug 14, 2024 at 10:17:18AM +0200, Michael Nazzareno Trimarchi wrote: > Hi all > > On Wed, Aug 14, 2024 at 6:34 AM Heiko Schocher wrote: > > > > Hello Christian, > > > > On 12.08.24 12:32, Christian Marangi wrote: > > > Implement support f

Re: [PATCH v3 8/9] ubi: implement support for LED activity

2024-08-18 Thread Christian Marangi
On Wed, Aug 14, 2024 at 06:33:12AM +0200, Heiko Schocher wrote: > Hello Christian, > > On 12.08.24 12:32, Christian Marangi wrote: > > Implement support for LED activity. If the feature is enabled, > > make the defined ACTIVITY LED to signal ubi write operation. > > &

[PATCH] pci: mediatek: add support for upstream split PCIe node

2024-08-12 Thread Christian Marangi
rence the common address for all the PCIe lines. Signed-off-by: Christian Marangi --- drivers/pci/pcie_mediatek.c | 127 1 file changed, 100 insertions(+), 27 deletions(-) diff --git a/drivers/pci/pcie_mediatek.c b/drivers/pci/pcie_mediatek.c index 04d8cc

[PATCH v3 9/9] doc: introduce led.rst documentation

2024-08-12 Thread Christian Marangi
Introduce simple led.rst documentation to document all the additional Kconfig and the current limitation of LED_BLINK and GPIO software blink. Signed-off-by: Christian Marangi --- doc/api/index.rst | 1 + doc/api/led.rst | 10 ++ include/led.h | 39

[PATCH v3 8/9] ubi: implement support for LED activity

2024-08-12 Thread Christian Marangi
Implement support for LED activity. If the feature is enabled, make the defined ACTIVITY LED to signal ubi write operation. Signed-off-by: Christian Marangi --- cmd/ubi.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/cmd/ubi.c b/cmd/ubi.c index

[PATCH v3 7/9] mtd: implement support for LED activity

2024-08-12 Thread Christian Marangi
Implement support for LED activity. If the feature is enabled, make the defined ACTIVITY LED to signal mtd write or erase operations. Signed-off-by: Christian Marangi --- cmd/mtd.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/cmd/mtd.c b/cmd/mtd.c index 795aaa2b37d

[PATCH v3 6/9] tftp: implement support for LED activity

2024-08-12 Thread Christian Marangi
Implement support for LED activity. If the feature is enabled, make the defined ACTIVITY LED to signal traffic. Signed-off-by: Christian Marangi --- net/tftp.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/net/tftp.c b/net/tftp.c index 2e073183d5a..45c2455336a 100644 --- a/net

[PATCH v3 5/9] led: implement LED activity API

2024-08-12 Thread Christian Marangi
of 250 (ms) is used by default. If CONFIG_LED_BLINK or CONFIG_LED_SW_BLINK is not enabled, led_boot_blink call will fallback to simple LED ON. Signed-off-by: Christian Marangi --- doc/device-tree-bindings/config.txt | 4 ++ drivers/led/Kconfig | 21 ++ inclu

[PATCH v3 4/9] common: board_r: rework BOOT LED handling

2024-08-12 Thread Christian Marangi
implementation have support for LED boot, rework this by also set the new BOOT LED to blink and also set it to ON before entering main loop to confirm successful boot. Signed-off-by: Christian Marangi --- common/board_r.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff

[PATCH v3 3/9] led: implement LED boot API

2024-08-12 Thread Christian Marangi
CONFIG_LED_SW_BLINK is not enabled, led_boot_blink call will fallback to simple LED ON. Signed-off-by: Christian Marangi --- doc/device-tree-bindings/config.txt | 3 ++ drivers/led/Kconfig | 20 + include/led.h | 64 + 3 files ch

[PATCH v3 2/9] led: implement led_set_state/period_by_label

2024-08-12 Thread Christian Marangi
Introduce new API led_set_state/period_by label as a shorthand to set LED state and LED blink period by referencing them by label. This is needed for the upcoming additional API that will declare LED in .confg and reference them by their LED label name. Signed-off-by: Christian Marangi

[PATCH v3 1/9] led: turn LED ON on initial SW blink

2024-08-12 Thread Christian Marangi
: Christian Marangi --- drivers/led/led_sw_blink.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/led/led_sw_blink.c b/drivers/led/led_sw_blink.c index 9e36edbee47..853278670b9 100644 --- a/drivers/led/led_sw_blink.c +++ b/drivers/led/led_sw_blink.c @@ -103,8

[PATCH v3 0/9] led: introduce LED boot and activity function

2024-08-12 Thread Christian Marangi
to set the LED boot and activity. Those are referenced by label. A documentation for old and these new LED API is created. (world tested with the azure pipeline) Changes v3: - Switch to /config property Changes v2: - Drop GPIO SW implementation - Add fix for new LED SW BLINK Christian Marangi (

Re: [PATCH v2 9/9] doc: introduce led.rst documentation

2024-08-09 Thread Christian Marangi
On Thu, Aug 08, 2024 at 08:34:32AM +0200, Alexander Dahl wrote: > Hello Christian, > > Am Wed, Aug 07, 2024 at 09:54:12PM +0200 schrieb Christian Marangi: > > Introduce simple led.rst documentation to document all the additional > > Kconfig and the current limitation

[PATCH v2 9/9] doc: introduce led.rst documentation

2024-08-07 Thread Christian Marangi
Introduce simple led.rst documentation to document all the additional Kconfig and the current limitation of LED_BLINK and GPIO software blink. Signed-off-by: Christian Marangi --- doc/api/index.rst | 1 + doc/api/led.rst | 10 ++ include/led.h | 38

[PATCH v2 8/9] ubi: implement support for LED activity

2024-08-07 Thread Christian Marangi
Implement support for LED activity. If the feature is enabled, make the defined ACTIVITY LED to signal ubi write operation. Signed-off-by: Christian Marangi --- cmd/ubi.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/cmd/ubi.c b/cmd/ubi.c index 92998af2b02

[PATCH v2 7/9] mtd: implement support for LED activity

2024-08-07 Thread Christian Marangi
Implement support for LED activity. If the feature is enabled, make the defined ACTIVITY LED to signal mtd write or erase operations. Signed-off-by: Christian Marangi --- cmd/mtd.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/cmd/mtd.c b/cmd/mtd.c index 795aaa2b37d

[PATCH v2 6/9] tftp: implement support for LED activity

2024-08-07 Thread Christian Marangi
Implement support for LED activity. If the feature is enabled, make the defined ACTIVITY LED to signal traffic. Signed-off-by: Christian Marangi --- net/tftp.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/net/tftp.c b/net/tftp.c index 2e073183d5a..45c2455336a 100644 --- a/net

[PATCH v2 5/9] led: implement LED activity API

2024-08-07 Thread Christian Marangi
for it, LED_ACTIVITY_LABEL to assign the LED in DT for activity usage and LED_ACTIVITY_PERIOD to set the blinking period. Signed-off-by: Christian Marangi --- drivers/led/Kconfig | 21 + include/led.h | 44 2 files changed

[PATCH v2 4/9] common: board_r: rework BOOT LED handling

2024-08-07 Thread Christian Marangi
implementation have support for LED boot, rework this by also set the new BOOT LED to blink and also set it to ON before entering main loop to confirm successful boot. Signed-off-by: Christian Marangi --- common/board_r.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff

[PATCH v2 3/9] led: implement LED boot API

2024-08-07 Thread Christian Marangi
LED for BOOT usage and CONFIG_LED_BOOT_PERIOD to declare the blinking period. If CONFIG_LED_BLINK or CONFIG_LED_SW_BLINK is not enabled, led_boot_blink call will fallback to simple LED ON. Signed-off-by: Christian Marangi --- drivers/led/Kconfig | 20 include/led.h | 44

[PATCH v2 2/9] led: implement led_set_state/period_by_label

2024-08-07 Thread Christian Marangi
Introduce new API led_set_state/period_by label as a shorthand to set LED state and LED blink period by referencing them by label. This is needed for the upcoming additional API that will declare LED in .confg and reference them by their LED label name. Signed-off-by: Christian Marangi

[PATCH v2 1/9] led: turn LED ON on initial SW blink

2024-08-07 Thread Christian Marangi
: Christian Marangi --- drivers/led/led_sw_blink.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/led/led_sw_blink.c b/drivers/led/led_sw_blink.c index 9e36edbee47..853278670b9 100644 --- a/drivers/led/led_sw_blink.c +++ b/drivers/led/led_sw_blink.c @@ -103,8

[PATCH v2 0/9] led: introduce LED boot and activity function

2024-08-07 Thread Christian Marangi
to set the LED boot and activity. Those are referenced by label. A documentation for old and these new LED API is created. (world tested with the azure pipeline) Changes v2: - Drop GPIO SW implementation - Add fix for new LED SW BLINK Christian Marangi (9): led: turn LED ON on initial

[PATCH v2 8/8] clk: mediatek: mt7622: add missing A1/2SYS clock ID

2024-08-03 Thread Christian Marangi
Add missing A1/2SYS clock ID just as a reference for OF_UPSTREAM support. These clocks are not defined and are not usable as current clock topckgen OPs doesn't support gates. These special node won't ever be used by uboot hence just add them for reference. Signed-off-by: Christi

[PATCH v2 7/8] clk: mediatek: mt7622: add missing clock PERIBUS_SEL clock

2024-08-03 Thread Christian Marangi
Add missing PERIBUS_SEL clock to match upstream linux clk ID order. Also convert pericfg to mux + gate implementation as now we have also mux on top of gates. Signed-off-by: Christian Marangi --- drivers/clk/mediatek/clk-mt7622.c | 22 +- include/dt-bindings/clock/mt7622-clk.h | 59

[PATCH v2 6/8] clk: mediatek: mt7622: add missing clock PERI_UART4_PD

2024-08-03 Thread Christian Marangi
Add missing clock PERI_UART4_PD for peri clock gates. This is needed to match upstream linux clk ID in preparation for OF_UPSTREAM. Also convert infracfg to mux + gate implementation as now we have mux on top of gates. Signed-off-by: Christian Marangi --- drivers/clk/mediatek/clk-mt7622.c

[PATCH v2 5/8] clk: mediatek: mt7622: add missing clock MUX1_SEL

2024-08-03 Thread Christian Marangi
Add missing infra clock MUX1_SEL needed for CPU clock. This is needed to match the upstream clk ID order in preparation for OF_UPSTREAM. Signed-off-by: Christian Marangi --- drivers/clk/mediatek/clk-mt7622.c | 24 +++- include/dt-bindings/clock/mt7622-clk.h | 13

[PATCH v2 4/8] clk: mediatek: mt7622: add missing clock define for MAIN_CORE_EN

2024-08-03 Thread Christian Marangi
Add missing clock for MAIN_CORE_EN. This is a special clock as it's a gate for the APMIXED clocks required as a parent for CPU clocks. Signed-off-by: Christian Marangi --- drivers/clk/mediatek/clk-mt7622.c | 29 +++--- include/dt-bindings/clock/mt7622-clk.h | 1

[PATCH v2 3/8] clk: mediatek: mt7622: move INFRA_TRNG to the bottom

2024-08-03 Thread Christian Marangi
Move INFRA_TRNG clock to the bottom of the clk ID to match upstream linux order. This is in preparation of OF_UPSTREAM. Signed-off-by: Christian Marangi --- drivers/clk/mediatek/clk-mt7622.c | 2 +- include/dt-bindings/clock/mt7622-clk.h | 10 +- 2 files changed, 6 insertions

[PATCH v2 2/8] clk: mediatek: mt7622: rename AUDIO_AWB3 to AUDIO_AWB2

2024-08-03 Thread Christian Marangi
Rename AUDIO_AWB3 to AUDIO_AWB2 to match upstream linux naming in preparation for OF_UPSTREAM support. Signed-off-by: Christian Marangi --- include/dt-bindings/clock/mt7622-clk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/dt-bindings/clock/mt7622-clk.h b

[PATCH v2 1/8] clk: mediatek: mt7622: fix broken peri_cgs clk with XTAL parents

2024-08-03 Thread Christian Marangi
Fix broken peri_cgs clock with XTAL parents as they have wrong definition of the parent type. Correctly fix them and use CLK_PARENT_XTAL for them. Signed-off-by: Christian Marangi --- drivers/clk/mediatek/clk-mt7622.c | 26 +++--- 1 file changed, 15 insertions(+), 11

  1   2   3   >