public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Heiko Schocher <hs@denx.de>
Cc: Michael Nazzareno Trimarchi <michael@amarulasolutions.com>,
	Dario Binacchi <dario.binacchi@amarulasolutions.com>,
	u-boot@lists.denx.de, Fabio Estevam <festevam@denx.de>,
	linux-amarula@amarulasolutions.com, Ye Li <ye.li@nxp.com>,
	AKASHI Takahiro <akashi.tkhro@gmail.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH 08/26] power: Add iMX8M block ctrl driver for dispmix
Date: Tue, 1 Oct 2024 10:29:08 +0200	[thread overview]
Message-ID: <20241001102908.39b2d3a6@xps-13> (raw)
In-Reply-To: <9ce14505-6c37-f2e8-4b5d-44f1a55f0393@denx.de>

Hi Heiko,


> >>> Hmm.. unfortunately ... I had applied your 2 clock patches, which
> >>> fixed a problem with enabling parent clocks ... but they broke booting
> >>> on a carrier which has fec ethernet! After "Net: " output the board hang...
> >>>
> >>> I reverted your 2 clock patches and it bootet again ... so there is
> >>> a problem ... try to get some more time to look into...
> >>>  
> >>
> >> We have a fec, but we had I think two patches more on it. I forget to
> >> answer Marek
> >> about them because I don't have my board now and because he is
> >> partially right (or maybe right).
> >> Anyway when we boot we could have and we have clocks that are enabled
> >> by bootrom or SPL that
> >> we need to declare as enable like PLL2/PLL3 those clocks are parts or
> >> could be part of reparent so,
> >> you need to have a reference counter on them that allow to not disable
> >> during the down chain disable
> >> and up chain enable. I think that what happens to your ethernet it's
> >> that you disable some clock that is
> >> critical to the board to survive. I had a patch merged by Tom that  
> > 
> > Yep, thats what I think too! If you access registers in a block for
> > which the clock is not enabled ... it just hang...
> >   
> >> prints the clock name so if you enable
> >> the debug of the clock you will find that your board stops working
> >> during one of this reparinting.  
> > 
> > I currently work on 2024.07... will rebase if 2024.10 is out...
> > 
> > Ah, you mean:
> > 
> > commit a70d991212c9684e09ed80ece69ce1ff7bfd9f08
> > Author: Michael Trimarchi <michael@amarulasolutions.com>
> > Date:   Tue Jul 9 08:28:13 2024 +0200
> > 
> >      clk: clk-uclass: Print clk name in clk_enable/clk_disable
> > 
> >      Print clk name in clk_enable and clk_disable. Make sense to know
> >      what clock get disabled/enabled before a system crash or system
> >      hang.
> > 
> >      Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> > 
> > I have the same change when I debug :-P
> > 
> > IIRC I did not see the clock names ... but I will recheck!  
> 
> I see with your patch the clock names, so fine... and see [1]
> 
> Hmm... I am on imx8mp, and I think the changes the patchset do in
> 
> "clk: imx8mn: Prevent clock critical path from disabling during reparent and set_rate"
> 
> are in clk-imx8mp already ...
> 
> Ported the patch from patchset
> 
> "[PATCH 05/26] clk: imx8mm: Mark IMX8MM_SYS_PLL2 and IMX8MM_SYS_PLL3 as enabled"
> 
> to imx8mp [2] and fec ethernet works again for me on imx8mp!
> 
> Could you add this if you post a v2 ?

TBH I don't feel like the below change is the correct one, it is too
specific. The clock core is recursive and thus should handle the
reparenting situations gracefully.

I posted a series that is targeting the LVDS output on imx8mp. You
should probably consider checking these patches as well if you work
on imx8mp as well. I also had similar breakages with Ethernet which
happened during the assigned-clocks handling. This patch, which is more
future and platform agnostic, fixed it:

https://lore.kernel.org/u-boot/20240910101344.110633-3-miquel.raynal@bootlin.com/

My series is complimentary, even though there are some overlaps that we
need to merge.

Thanks,
Miquèl

  reply	other threads:[~2024-10-01  8:29 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-13  9:55 [PATCH 00/26] Support display (and even more) on the BSH SMM S2/PRO boards Dario Binacchi
2024-09-13  9:55 ` [PATCH 01/26] clk: Propagate clk_set_rate() if CLK_SET_PARENT_RATE present for gate and mux Dario Binacchi
2024-09-13  9:55 ` [PATCH 02/26] clk: imx8mn: Prevent clock critical path from disabling during reparent and set_rate Dario Binacchi
2024-09-13  9:55 ` [PATCH 03/26] clk: imx8mm: " Dario Binacchi
2024-09-13 10:09   ` Marek Vasut
2024-09-13  9:55 ` [PATCH 04/26] clk: clk-uclass: Implement CLK_OPS_PARENT_ENABLE Dario Binacchi
2024-09-13  9:55 ` [PATCH 05/26] clk: imx8mm: Mark IMX8MM_SYS_PLL2 and IMX8MM_SYS_PLL3 as enabled Dario Binacchi
2024-09-13 10:07   ` Marek Vasut
2024-09-13  9:55 ` [PATCH 06/26] clk: imx8mn: Mark IMX8MN_SYS_PLL2 and IMX8MN_SYS_PLL3 " Dario Binacchi
2024-09-13  9:55 ` [PATCH 07/26] clk: imx8mn: add video clocks support Dario Binacchi
2024-09-13  9:55 ` [PATCH 08/26] power: Add iMX8M block ctrl driver for dispmix Dario Binacchi
2024-09-24  9:05   ` Heiko Schocher
2024-09-30 13:20     ` Dario Binacchi
2024-10-01  4:21       ` Heiko Schocher
2024-10-01  5:01         ` Michael Nazzareno Trimarchi
2024-10-01  5:14           ` Heiko Schocher
2024-10-01  5:51             ` Heiko Schocher
2024-10-01  8:29               ` Miquel Raynal [this message]
2024-10-01  8:33                 ` Michael Nazzareno Trimarchi
2024-10-01  8:50                   ` Miquel Raynal
2024-10-01  8:57                     ` Heiko Schocher
2024-10-01  9:50                       ` Michael Nazzareno Trimarchi
2024-10-01 10:01                         ` Miquel Raynal
2024-10-01 13:02                           ` Michael Nazzareno Trimarchi
2024-10-01 20:54                             ` Miquel Raynal
2024-10-01  9:55                       ` Miquel Raynal
2024-10-01  8:47                 ` Heiko Schocher
2024-10-01  8:56                   ` Miquel Raynal
2024-09-13  9:55 ` [PATCH 09/26] video: Add video link framework Dario Binacchi
2024-09-13  9:55 ` [PATCH 10/26] video: bridge: Add check_timing interface Dario Binacchi
2024-09-13  9:55 ` [PATCH 11/26] video: dsi_host: add disable host interface Dario Binacchi
2024-09-13  9:55 ` [PATCH 12/26] video: Update mxsfb video drivers for iMX8MM/iMX8MN display Dario Binacchi
2024-09-13  9:55 ` [PATCH 13/26] video: Enable DM_UC_FLAG_SEQ_ALIAS for display and bridge Dario Binacchi
2024-09-13  9:55 ` [PATCH 14/26] phy: dphy: add support to calculate the timing based on hs_clk_rate Dario Binacchi
2024-09-13  9:55 ` [PATCH 15/26] phy: dphy: Correct lpx parameter and its derivatives(ta_{get, go, sure}) Dario Binacchi
2024-09-13  9:55 ` [PATCH 16/26] phy: dphy: Correct clk_pre parameter Dario Binacchi
2024-09-13  9:55 ` [PATCH 17/26] lib: div64: sync with Linux Dario Binacchi
2024-09-13  9:56 ` [PATCH 18/26] video: bridge: Add Samsung DSIM bridge Dario Binacchi
2024-09-13  9:56 ` [PATCH 19/26] video: Add Synaptics R63353 panel driver Dario Binacchi
2024-09-13  9:56 ` [PATCH 20/26] imx8mn_bsh_smm_s2/pro: Enable display on reference design Dario Binacchi
2024-09-13  9:56 ` [PATCH 21/26] boot: fdt_simplefb: add a debug message Dario Binacchi
2024-09-13  9:56 ` [PATCH 22/26] video: mxsfb: support simple frame-buffer Dario Binacchi
2024-09-13  9:56 ` [PATCH 23/26] video: bridge: samsung: " Dario Binacchi
2024-09-13  9:56 ` [PATCH 24/26] imx8mn_bsh_smm_s2/pro: " Dario Binacchi
2024-09-13  9:56 ` [PATCH 25/26] imx8mn_bsh_smm_s2/pro: enable " Dario Binacchi
2024-09-13  9:56 ` [PATCH 26/26] imx8mn_bsh_smm_s2/pro: add splash screen with BSH logo Dario Binacchi
2024-09-30  9:43 ` [PATCH 00/26] Support display (and even more) on the BSH SMM S2/PRO boards Miquel Raynal
2024-09-30 13:07   ` Dario Binacchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241001102908.39b2d3a6@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=akashi.tkhro@gmail.com \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=festevam@denx.de \
    --cc=hs@denx.de \
    --cc=jh80.chung@samsung.com \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=michael@amarulasolutions.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=ye.li@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox