All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Moon <linux.amoon@gmail.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: devicetree <devicetree@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-amlogic@lists.infradead.org,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Rob Herring <robh+dt@kernel.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>
Subject: Re: [PATCHv1 3/9] soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson g12a SoCs
Date: Tue, 4 May 2021 13:49:09 +0530	[thread overview]
Message-ID: <CANAwSgTTvPRJW8G1g4gzaSvud2YVf_bPP3QZdYMtL-CuSvosAA@mail.gmail.com> (raw)
In-Reply-To: <CAFBinCDMTmZ5ifii8rW=6qSdNngx3Gz1tZPd7aubDkmqNYD_og@mail.gmail.com>

Hi Martin

On Mon, 3 May 2021 at 23:22, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
>
> Hi Anand,
>
> On Mon, May 3, 2021 at 6:37 PM Anand Moon <linux.amoon@gmail.com> wrote:
> [...]
> > > > whenever I try something new it fails. Please ignore this series.
> > > if the VPU and HDMI power domains were separate (from hardware
> > > perspective, not from driver perspective) then your change is a good
> > > step forward.
> > > in that case VPU_HHI_MEMPD would need to be removed from wherever it's
> > > currently used -> that means we need to also decide if we want to
> > > break compatibility with older (before this series) .dtbs
> > >
> > >
> >
> > As per the datasheet S922X Datasheet, HDMI and VPU are different
> > reg controller and they are independent of each other.
> [...]
> > Note: HDMI and AUDIO and Ethernet are also independent of each other.
> let me say it this way: I've seen cases where the information from the
> datasheet is not correct
>
> Also to me it doesn't explicitly state that the bits are independent
> of each other (at the same time it also doesn't state that they belong
> together).
>
> In the same datasheet you also find the HHI_HDMI_PLL_CNTL0 register
> hdmi_dpll_M, hdmi_dpll_N and hdmi_dpll_od are listed in there.
> The PLL output depends on hdmi_dpll_M and hdmi_dpll_N while
> hdmi_dpll_od is taking the output of the two and dividing it.
> This relation is nowhere described in the datasheet either so you
> "just have to know it".
>
> Unfortunately I don't know of any good way to check the relationship
> of the power domain registers other than someone from Amlogic
> explaining to us how it works internally.
>

I should have sought more details on this feature before posting something.
Thanks for the detailed explanation of this feature,

So in order for this feature to work the final state should be *active*
for each power domain.

> [...]
> > Below is the output on Odroid N2.
> >
> > [alarm@archl-on2 ~]$ sudo cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
> > domain                          status          children
> >             performance
> >     /device                                             runtime status
> > ----------------------------------------------------------------------------------------------
> > HDMI                            on
> >             0
> >     /devices/platform/soc/ff600000.bus/ff600000.hdmi-tx  unsupported
> >              0
> > AUDIO                           on
> >             0
> >     /devices/platform/sound                             unsupported
> >             0
> > ETH                             on
> >             0
> >     /devices/platform/soc/ff3f0000.ethernet             active
> >             0
> > VPU                             on
> >             0
> >     /devices/platform/soc/ff900000.vpu                  unsupported
> >             0
> This describes what Linux sees (based on how you configured the device-tree).
> The output confirms what you are expecting to see (I think), but based
> on that we can't tell what's right or wrong in terms of the actual
> hardware.
>
> To make another example: I could edit meson-g12b-odroid-n2.dtsi and
> change the vin-supply of "VDDAO_3V3" to &usb_pwr_en
> Then /sys/kernel/debug/regulator/regulator_summary would show that
> VDDAO_3V3 is taking the voltage from USB_PWR_EN as input.
> But from a hardware (schematics) perspective this is not correct.
> Since the schematics describe the relation (input, output) between the
> regulators we know how they are connected to each other.
> If this relation was not described in the schematics then we'd be in
> the same situation as with the power do
>

On Amlogic SBC, I think VDDAO_3V3 and VDDIO_AO1V8 share the power with
SD card and USB.
so can we add these as optional regulators to enable/disable within
the usb driver if needed?

I am facing some issues to fix the power on Odroid C1+ and C2 board as well.

> Best regards,
> Martin

Thanks
-Anand

WARNING: multiple messages have this Message-ID (diff)
From: Anand Moon <linux.amoon@gmail.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: devicetree <devicetree@vger.kernel.org>,
	 linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-amlogic@lists.infradead.org,
	 Linux Kernel <linux-kernel@vger.kernel.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	 Rob Herring <robh+dt@kernel.org>,
	Kevin Hilman <khilman@baylibre.com>,
	 Jerome Brunet <jbrunet@baylibre.com>
Subject: Re: [PATCHv1 3/9] soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson g12a SoCs
Date: Tue, 4 May 2021 13:49:09 +0530	[thread overview]
Message-ID: <CANAwSgTTvPRJW8G1g4gzaSvud2YVf_bPP3QZdYMtL-CuSvosAA@mail.gmail.com> (raw)
In-Reply-To: <CAFBinCDMTmZ5ifii8rW=6qSdNngx3Gz1tZPd7aubDkmqNYD_og@mail.gmail.com>

Hi Martin

On Mon, 3 May 2021 at 23:22, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
>
> Hi Anand,
>
> On Mon, May 3, 2021 at 6:37 PM Anand Moon <linux.amoon@gmail.com> wrote:
> [...]
> > > > whenever I try something new it fails. Please ignore this series.
> > > if the VPU and HDMI power domains were separate (from hardware
> > > perspective, not from driver perspective) then your change is a good
> > > step forward.
> > > in that case VPU_HHI_MEMPD would need to be removed from wherever it's
> > > currently used -> that means we need to also decide if we want to
> > > break compatibility with older (before this series) .dtbs
> > >
> > >
> >
> > As per the datasheet S922X Datasheet, HDMI and VPU are different
> > reg controller and they are independent of each other.
> [...]
> > Note: HDMI and AUDIO and Ethernet are also independent of each other.
> let me say it this way: I've seen cases where the information from the
> datasheet is not correct
>
> Also to me it doesn't explicitly state that the bits are independent
> of each other (at the same time it also doesn't state that they belong
> together).
>
> In the same datasheet you also find the HHI_HDMI_PLL_CNTL0 register
> hdmi_dpll_M, hdmi_dpll_N and hdmi_dpll_od are listed in there.
> The PLL output depends on hdmi_dpll_M and hdmi_dpll_N while
> hdmi_dpll_od is taking the output of the two and dividing it.
> This relation is nowhere described in the datasheet either so you
> "just have to know it".
>
> Unfortunately I don't know of any good way to check the relationship
> of the power domain registers other than someone from Amlogic
> explaining to us how it works internally.
>

I should have sought more details on this feature before posting something.
Thanks for the detailed explanation of this feature,

So in order for this feature to work the final state should be *active*
for each power domain.

> [...]
> > Below is the output on Odroid N2.
> >
> > [alarm@archl-on2 ~]$ sudo cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
> > domain                          status          children
> >             performance
> >     /device                                             runtime status
> > ----------------------------------------------------------------------------------------------
> > HDMI                            on
> >             0
> >     /devices/platform/soc/ff600000.bus/ff600000.hdmi-tx  unsupported
> >              0
> > AUDIO                           on
> >             0
> >     /devices/platform/sound                             unsupported
> >             0
> > ETH                             on
> >             0
> >     /devices/platform/soc/ff3f0000.ethernet             active
> >             0
> > VPU                             on
> >             0
> >     /devices/platform/soc/ff900000.vpu                  unsupported
> >             0
> This describes what Linux sees (based on how you configured the device-tree).
> The output confirms what you are expecting to see (I think), but based
> on that we can't tell what's right or wrong in terms of the actual
> hardware.
>
> To make another example: I could edit meson-g12b-odroid-n2.dtsi and
> change the vin-supply of "VDDAO_3V3" to &usb_pwr_en
> Then /sys/kernel/debug/regulator/regulator_summary would show that
> VDDAO_3V3 is taking the voltage from USB_PWR_EN as input.
> But from a hardware (schematics) perspective this is not correct.
> Since the schematics describe the relation (input, output) between the
> regulators we know how they are connected to each other.
> If this relation was not described in the schematics then we'd be in
> the same situation as with the power do
>

On Amlogic SBC, I think VDDAO_3V3 and VDDIO_AO1V8 share the power with
SD card and USB.
so can we add these as optional regulators to enable/disable within
the usb driver if needed?

I am facing some issues to fix the power on Odroid C1+ and C2 board as well.

> Best regards,
> Martin

Thanks
-Anand

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Anand Moon <linux.amoon@gmail.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: devicetree <devicetree@vger.kernel.org>,
	 linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-amlogic@lists.infradead.org,
	 Linux Kernel <linux-kernel@vger.kernel.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	 Rob Herring <robh+dt@kernel.org>,
	Kevin Hilman <khilman@baylibre.com>,
	 Jerome Brunet <jbrunet@baylibre.com>
Subject: Re: [PATCHv1 3/9] soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson g12a SoCs
Date: Tue, 4 May 2021 13:49:09 +0530	[thread overview]
Message-ID: <CANAwSgTTvPRJW8G1g4gzaSvud2YVf_bPP3QZdYMtL-CuSvosAA@mail.gmail.com> (raw)
In-Reply-To: <CAFBinCDMTmZ5ifii8rW=6qSdNngx3Gz1tZPd7aubDkmqNYD_og@mail.gmail.com>

Hi Martin

On Mon, 3 May 2021 at 23:22, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
>
> Hi Anand,
>
> On Mon, May 3, 2021 at 6:37 PM Anand Moon <linux.amoon@gmail.com> wrote:
> [...]
> > > > whenever I try something new it fails. Please ignore this series.
> > > if the VPU and HDMI power domains were separate (from hardware
> > > perspective, not from driver perspective) then your change is a good
> > > step forward.
> > > in that case VPU_HHI_MEMPD would need to be removed from wherever it's
> > > currently used -> that means we need to also decide if we want to
> > > break compatibility with older (before this series) .dtbs
> > >
> > >
> >
> > As per the datasheet S922X Datasheet, HDMI and VPU are different
> > reg controller and they are independent of each other.
> [...]
> > Note: HDMI and AUDIO and Ethernet are also independent of each other.
> let me say it this way: I've seen cases where the information from the
> datasheet is not correct
>
> Also to me it doesn't explicitly state that the bits are independent
> of each other (at the same time it also doesn't state that they belong
> together).
>
> In the same datasheet you also find the HHI_HDMI_PLL_CNTL0 register
> hdmi_dpll_M, hdmi_dpll_N and hdmi_dpll_od are listed in there.
> The PLL output depends on hdmi_dpll_M and hdmi_dpll_N while
> hdmi_dpll_od is taking the output of the two and dividing it.
> This relation is nowhere described in the datasheet either so you
> "just have to know it".
>
> Unfortunately I don't know of any good way to check the relationship
> of the power domain registers other than someone from Amlogic
> explaining to us how it works internally.
>

I should have sought more details on this feature before posting something.
Thanks for the detailed explanation of this feature,

So in order for this feature to work the final state should be *active*
for each power domain.

> [...]
> > Below is the output on Odroid N2.
> >
> > [alarm@archl-on2 ~]$ sudo cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
> > domain                          status          children
> >             performance
> >     /device                                             runtime status
> > ----------------------------------------------------------------------------------------------
> > HDMI                            on
> >             0
> >     /devices/platform/soc/ff600000.bus/ff600000.hdmi-tx  unsupported
> >              0
> > AUDIO                           on
> >             0
> >     /devices/platform/sound                             unsupported
> >             0
> > ETH                             on
> >             0
> >     /devices/platform/soc/ff3f0000.ethernet             active
> >             0
> > VPU                             on
> >             0
> >     /devices/platform/soc/ff900000.vpu                  unsupported
> >             0
> This describes what Linux sees (based on how you configured the device-tree).
> The output confirms what you are expecting to see (I think), but based
> on that we can't tell what's right or wrong in terms of the actual
> hardware.
>
> To make another example: I could edit meson-g12b-odroid-n2.dtsi and
> change the vin-supply of "VDDAO_3V3" to &usb_pwr_en
> Then /sys/kernel/debug/regulator/regulator_summary would show that
> VDDAO_3V3 is taking the voltage from USB_PWR_EN as input.
> But from a hardware (schematics) perspective this is not correct.
> Since the schematics describe the relation (input, output) between the
> regulators we know how they are connected to each other.
> If this relation was not described in the schematics then we'd be in
> the same situation as with the power do
>

On Amlogic SBC, I think VDDAO_3V3 and VDDIO_AO1V8 share the power with
SD card and USB.
so can we add these as optional regulators to enable/disable within
the usb driver if needed?

I am facing some issues to fix the power on Odroid C1+ and C2 board as well.

> Best regards,
> Martin

Thanks
-Anand

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2021-05-04  8:19 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-03 14:54 [PATCHv1 0/9] Added Audio and HDMI power domain for Amlogic SoC Anand Moon
2021-05-03 14:54 ` Anand Moon
2021-05-03 14:54 ` Anand Moon
2021-05-03 14:54 ` [PATCHv1 1/9] soc: amlogic: meson-ee-pwrc: Add audio power domain Meson g12a and g12b SoCs Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 14:54 ` [PATCHv1 2/9] arm64: dts: amlogic: Add audio power domain for g12a and g12b Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 14:54 ` [PATCHv1 3/9] soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson g12a SoCs Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 15:07   ` Martin Blumenstingl
2021-05-03 15:07     ` Martin Blumenstingl
2021-05-03 15:07     ` Martin Blumenstingl
2021-05-03 15:29     ` Anand Moon
2021-05-03 15:29       ` Anand Moon
2021-05-03 15:29       ` Anand Moon
2021-05-03 15:35       ` Martin Blumenstingl
2021-05-03 15:35         ` Martin Blumenstingl
2021-05-03 15:35         ` Martin Blumenstingl
2021-05-03 16:37         ` Anand Moon
2021-05-03 16:37           ` Anand Moon
2021-05-03 16:37           ` Anand Moon
2021-05-03 17:52           ` Martin Blumenstingl
2021-05-03 17:52             ` Martin Blumenstingl
2021-05-03 17:52             ` Martin Blumenstingl
2021-05-04  8:19             ` Anand Moon [this message]
2021-05-04  8:19               ` Anand Moon
2021-05-04  8:19               ` Anand Moon
2021-05-03 14:54 ` [PATCHv1 4/9] arm64: dts: amlogic: Add hdmi power domain for g12a and g12b Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 14:54 ` [PATCHv1 5/9] soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson sm1 SoCs Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 14:54 ` [PATCHv1 6/9] arm64: dts: amlogic: Add audio power domain for sm1 SoC Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 14:54 ` [PATCHv1 7/9] arm64: dts: amlogic: Add hdmi power domain for sm1 sbc Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 14:54 ` [PATCHv1 8/9] soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson gxbb and gxl SoCs Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 14:54 ` [PATCHv1 9/9] arm64: dts: amlogic: Add hdmi power domain for gxbb and gxl Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 14:54   ` Anand Moon
2021-05-03 15:05 ` [PATCHv1 0/9] Added Audio and HDMI power domain for Amlogic SoC Jerome Brunet
2021-05-03 15:05   ` Jerome Brunet
2021-05-03 15:05   ` Jerome Brunet
2021-05-03 15:20   ` Anand Moon
2021-05-03 15:20     ` Anand Moon
2021-05-03 15:20     ` Anand Moon

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=CANAwSgTTvPRJW8G1g4gzaSvud2YVf_bPP3QZdYMtL-CuSvosAA@mail.gmail.com \
    --to=linux.amoon@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=narmstrong@baylibre.com \
    --cc=robh+dt@kernel.org \
    /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 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.