Message ID | 20190725083433.6505-1-guillaume.gardet@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [V2,1/2] arm: dts: exynos: Add GPU/Mali T604 node to exynos5250 | expand |
On Thu, 25 Jul 2019 at 10:34, Guillaume <guillaume.gardet@arm.com> wrote: > > From: Guillaume GARDET <guillaume.gardet@arm.com> > > Add nodes for GPU (Mali T604) to Exynos5250. > Tested with kmscube and glmark2-es2-drm on Chromebook snow. > Load tested on arndale board. > > Signed-off-by: Guillaume GARDET <guillaume.gardet@arm.com> > > Cc: Kukjin Kim <kgene@kernel.org> > Cc: Krzysztof Kozlowski <krzk@kernel.org> > Cc: linux-arm-kernel@lists.infradead.org > --- > V2 changes: > * move mali node as /soc sub-node > * move gpu_opp_table as mali sub-node > * minor style updates > * test on arndale board > * enable by default I was not specific enough. It can stay disabled in the DTSI because not all resources are provided. The board DTSes (all or ones which are tested) will enable it and provide missing resources - mali-supply. Just like: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f0a6208b90bdd44f48f5718c8bb0eb1e763d14c0 > * add dt bindings, in a separate patch Put the bindings before DTS change. > > arch/arm/boot/dts/exynos5250.dtsi | 47 +++++++++++++++++++++++++++++++ > 1 file changed, 47 insertions(+) > > diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi > index d5e0392b409e..f7f34d469bde 100644 > --- a/arch/arm/boot/dts/exynos5250.dtsi > +++ b/arch/arm/boot/dts/exynos5250.dtsi > @@ -328,6 +328,52 @@ > iommus = <&sysmmu_rotator>; > }; > > + mali: gpu@11800000 { > + compatible = "samsung,exynos5250-mali", "arm,mali-t604"; > + reg = <0x11800000 0x5000>; > + interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>; > + interrupt-names = "job", "mmu", "gpu"; > + clocks = <&clock CLK_G3D>; > + clock-names = "g3d"; According to bindings this is not proper clock name. I wonder why it was working... it seems the driver expects first clock to be always the core clock. Best regards, Krzysztof
> -----Original Message----- > From: Krzysztof Kozlowski <krzk@kernel.org> > Sent: 25 July 2019 13:19 > To: Guillaume Gardet <Guillaume.Gardet@arm.com> > Cc: linux-samsung-soc@vger.kernel.org; Kukjin Kim <kgene@kernel.org>; linux- > arm-kernel@lists.infradead.org > Subject: Re: [PATCH V2 1/2] arm: dts: exynos: Add GPU/Mali T604 node to > exynos5250 > > On Thu, 25 Jul 2019 at 10:34, Guillaume <guillaume.gardet@arm.com> wrote: > > > > From: Guillaume GARDET <guillaume.gardet@arm.com> > > > > Add nodes for GPU (Mali T604) to Exynos5250. > > Tested with kmscube and glmark2-es2-drm on Chromebook snow. > > Load tested on arndale board. > > > > Signed-off-by: Guillaume GARDET <guillaume.gardet@arm.com> > > > > Cc: Kukjin Kim <kgene@kernel.org> > > Cc: Krzysztof Kozlowski <krzk@kernel.org> > > Cc: linux-arm-kernel@lists.infradead.org > > --- > > V2 changes: > > * move mali node as /soc sub-node > > * move gpu_opp_table as mali sub-node > > * minor style updates > > * test on arndale board > > * enable by default > > I was not specific enough. It can stay disabled in the DTSI because not all > resources are provided. The board DTSes (all or ones which are > tested) will enable it and provide missing resources - mali-supply. I think all resources are provided, since no mali-supply property is needed here. So, I can either enable it by default for all exynos5250 platforms there, or I can enable it only for Arndale board and Chromebook snow. What do you prefer? > Just like: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f > 0a6208b90bdd44f48f5718c8bb0eb1e763d14c0 > > > * add dt bindings, in a separate patch > > Put the bindings before DTS change. Yes, makes sense. > > > > > arch/arm/boot/dts/exynos5250.dtsi | 47 > > +++++++++++++++++++++++++++++++ > > 1 file changed, 47 insertions(+) > > > > diff --git a/arch/arm/boot/dts/exynos5250.dtsi > > b/arch/arm/boot/dts/exynos5250.dtsi > > index d5e0392b409e..f7f34d469bde 100644 > > --- a/arch/arm/boot/dts/exynos5250.dtsi > > +++ b/arch/arm/boot/dts/exynos5250.dtsi > > @@ -328,6 +328,52 @@ > > iommus = <&sysmmu_rotator>; > > }; > > > > + mali: gpu@11800000 { > > + compatible = "samsung,exynos5250-mali", "arm,mali-t604"; > > + reg = <0x11800000 0x5000>; > > + interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>, > > + <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>; > > + interrupt-names = "job", "mmu", "gpu"; > > + clocks = <&clock CLK_G3D>; > > + clock-names = "g3d"; > > According to bindings this is not proper clock name. I wonder why it was > working... it seems the driver expects first clock to be always the core clock. Yes, it works, because 1st clock is assumed to be the core clock. Clock names are optional and could be omitted as in https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/rk3288.dtsi?h=v5.3-rc1#n1284 Not sure if it would be better to rename it to 'core', or just skip it? Any opinion? Thanks, Guillaume > > Best regards, > Krzysztof IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
On Thu, 25 Jul 2019 at 13:35, Guillaume Gardet <Guillaume.Gardet@arm.com> wrote: > > > > > -----Original Message----- > > From: Krzysztof Kozlowski <krzk@kernel.org> > > Sent: 25 July 2019 13:19 > > To: Guillaume Gardet <Guillaume.Gardet@arm.com> > > Cc: linux-samsung-soc@vger.kernel.org; Kukjin Kim <kgene@kernel.org>; linux- > > arm-kernel@lists.infradead.org > > Subject: Re: [PATCH V2 1/2] arm: dts: exynos: Add GPU/Mali T604 node to > > exynos5250 > > > > On Thu, 25 Jul 2019 at 10:34, Guillaume <guillaume.gardet@arm.com> wrote: > > > > > > From: Guillaume GARDET <guillaume.gardet@arm.com> > > > > > > Add nodes for GPU (Mali T604) to Exynos5250. > > > Tested with kmscube and glmark2-es2-drm on Chromebook snow. > > > Load tested on arndale board. > > > > > > Signed-off-by: Guillaume GARDET <guillaume.gardet@arm.com> > > > > > > Cc: Kukjin Kim <kgene@kernel.org> > > > Cc: Krzysztof Kozlowski <krzk@kernel.org> > > > Cc: linux-arm-kernel@lists.infradead.org > > > --- > > > V2 changes: > > > * move mali node as /soc sub-node > > > * move gpu_opp_table as mali sub-node > > > * minor style updates > > > * test on arndale board > > > * enable by default > > > > I was not specific enough. It can stay disabled in the DTSI because not all > > resources are provided. The board DTSes (all or ones which are > > tested) will enable it and provide missing resources - mali-supply. > > I think all resources are provided, since no mali-supply property is needed here. No, regulator is not provided. On all Exynos boards Mali uses its own dedicated regulator (and sometimes additional one). It worked in your case because the regulator was set as always-on but this is a workaround for lack of consumers. Once there is a consumer, the regulator should not be always-on to save the energy when not used. > So, I can either enable it by default for all exynos5250 platforms there, or I can enable it only for Arndale board and Chromebook snow. What do you prefer? Then please enable it on tested platforms. > > > Just like: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f > > 0a6208b90bdd44f48f5718c8bb0eb1e763d14c0 > > > > > * add dt bindings, in a separate patch > > > > Put the bindings before DTS change. > > Yes, makes sense. > > > > > > > > > arch/arm/boot/dts/exynos5250.dtsi | 47 > > > +++++++++++++++++++++++++++++++ > > > 1 file changed, 47 insertions(+) > > > > > > diff --git a/arch/arm/boot/dts/exynos5250.dtsi > > > b/arch/arm/boot/dts/exynos5250.dtsi > > > index d5e0392b409e..f7f34d469bde 100644 > > > --- a/arch/arm/boot/dts/exynos5250.dtsi > > > +++ b/arch/arm/boot/dts/exynos5250.dtsi > > > @@ -328,6 +328,52 @@ > > > iommus = <&sysmmu_rotator>; > > > }; > > > > > > + mali: gpu@11800000 { > > > + compatible = "samsung,exynos5250-mali", "arm,mali-t604"; > > > + reg = <0x11800000 0x5000>; > > > + interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, > > > + <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>, > > > + <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>; > > > + interrupt-names = "job", "mmu", "gpu"; > > > + clocks = <&clock CLK_G3D>; > > > + clock-names = "g3d"; > > > > According to bindings this is not proper clock name. I wonder why it was > > working... it seems the driver expects first clock to be always the core clock. > > Yes, it works, because 1st clock is assumed to be the core clock. > Clock names are optional and could be omitted as in https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/rk3288.dtsi?h=v5.3-rc1#n1284 > Not sure if it would be better to rename it to 'core', or just skip it? Any opinion? The driver can change anytime and it might look for "core" so DTS should follow the bindings. Additionally, Panfrost might behave differently than Arm driver. So "core" please. Best regards, Krzysztof
> -----Original Message----- > From: Krzysztof Kozlowski <krzk@kernel.org> > Sent: 25 July 2019 14:27 > To: Guillaume Gardet <Guillaume.Gardet@arm.com> > Cc: linux-samsung-soc@vger.kernel.org; Kukjin Kim <kgene@kernel.org>; linux- > arm-kernel@lists.infradead.org > Subject: Re: [PATCH V2 1/2] arm: dts: exynos: Add GPU/Mali T604 node to > exynos5250 > > On Thu, 25 Jul 2019 at 13:35, Guillaume Gardet <Guillaume.Gardet@arm.com> > wrote: > > > > > > > > > -----Original Message----- > > > From: Krzysztof Kozlowski <krzk@kernel.org> > > > Sent: 25 July 2019 13:19 > > > To: Guillaume Gardet <Guillaume.Gardet@arm.com> > > > Cc: linux-samsung-soc@vger.kernel.org; Kukjin Kim > > > <kgene@kernel.org>; linux- arm-kernel@lists.infradead.org > > > Subject: Re: [PATCH V2 1/2] arm: dts: exynos: Add GPU/Mali T604 node > > > to > > > exynos5250 > > > > > > On Thu, 25 Jul 2019 at 10:34, Guillaume <guillaume.gardet@arm.com> > wrote: > > > > > > > > From: Guillaume GARDET <guillaume.gardet@arm.com> > > > > > > > > Add nodes for GPU (Mali T604) to Exynos5250. > > > > Tested with kmscube and glmark2-es2-drm on Chromebook snow. > > > > Load tested on arndale board. > > > > > > > > Signed-off-by: Guillaume GARDET <guillaume.gardet@arm.com> > > > > > > > > Cc: Kukjin Kim <kgene@kernel.org> > > > > Cc: Krzysztof Kozlowski <krzk@kernel.org> > > > > Cc: linux-arm-kernel@lists.infradead.org > > > > --- > > > > V2 changes: > > > > * move mali node as /soc sub-node > > > > * move gpu_opp_table as mali sub-node > > > > * minor style updates > > > > * test on arndale board > > > > * enable by default > > > > > > I was not specific enough. It can stay disabled in the DTSI because > > > not all resources are provided. The board DTSes (all or ones which > > > are > > > tested) will enable it and provide missing resources - mali-supply. > > > > I think all resources are provided, since no mali-supply property is needed here. > > No, regulator is not provided. On all Exynos boards Mali uses its own dedicated > regulator (and sometimes additional one). It worked in your case because the > regulator was set as always-on but this is a workaround for lack of consumers. > Once there is a consumer, the regulator should not be always-on to save the > energy when not used. I do not have the required info here. Do you have it, or could I skip the mali-supply for now? > > > So, I can either enable it by default for all exynos5250 platforms there, or I can > enable it only for Arndale board and Chromebook snow. What do you prefer? > > Then please enable it on tested platforms. Ok. > > > > > > Just like: > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/c > > > ommit/?id=f > > > 0a6208b90bdd44f48f5718c8bb0eb1e763d14c0 > > > > > > > * add dt bindings, in a separate patch > > > > > > Put the bindings before DTS change. > > > > Yes, makes sense. > > > > > > > > > > > > > arch/arm/boot/dts/exynos5250.dtsi | 47 > > > > +++++++++++++++++++++++++++++++ > > > > 1 file changed, 47 insertions(+) > > > > > > > > diff --git a/arch/arm/boot/dts/exynos5250.dtsi > > > > b/arch/arm/boot/dts/exynos5250.dtsi > > > > index d5e0392b409e..f7f34d469bde 100644 > > > > --- a/arch/arm/boot/dts/exynos5250.dtsi > > > > +++ b/arch/arm/boot/dts/exynos5250.dtsi > > > > @@ -328,6 +328,52 @@ > > > > iommus = <&sysmmu_rotator>; > > > > }; > > > > > > > > + mali: gpu@11800000 { > > > > + compatible = "samsung,exynos5250-mali", "arm,mali-t604"; > > > > + reg = <0x11800000 0x5000>; > > > > + interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, > > > > + <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>, > > > > + <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>; > > > > + interrupt-names = "job", "mmu", "gpu"; > > > > + clocks = <&clock CLK_G3D>; > > > > + clock-names = "g3d"; > > > > > > According to bindings this is not proper clock name. I wonder why it > > > was working... it seems the driver expects first clock to be always the core > clock. > > > > Yes, it works, because 1st clock is assumed to be the core clock. > > Clock names are optional and could be omitted as in > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tre > > e/arch/arm/boot/dts/rk3288.dtsi?h=v5.3-rc1#n1284 > > Not sure if it would be better to rename it to 'core', or just skip it? Any opinion? > > The driver can change anytime and it might look for "core" so DTS should follow > the bindings. Additionally, Panfrost might behave differently than Arm driver. So > "core" please. Ok. Thanks, Guillaume > > Best regards, > Krzysztof IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
On Thu, 25 Jul 2019 at 14:37, Guillaume Gardet <Guillaume.Gardet@arm.com> wrote: > > No, regulator is not provided. On all Exynos boards Mali uses its own dedicated > > regulator (and sometimes additional one). It worked in your case because the > > regulator was set as always-on but this is a workaround for lack of consumers. > > Once there is a consumer, the regulator should not be always-on to save the > > energy when not used. > > I do not have the required info here. Do you have it, or could I skip the mali-supply for now? You can guess from regulator name :) For the Arndale, the schematics are saying it is buck4. Best regards, Krzysztof
> -----Original Message----- > From: Krzysztof Kozlowski <krzk@kernel.org> > Sent: 26 July 2019 12:40 > To: Guillaume Gardet <Guillaume.Gardet@arm.com> > Cc: linux-samsung-soc@vger.kernel.org; Kukjin Kim <kgene@kernel.org>; > linux-arm-kernel@lists.infradead.org > Subject: Re: [PATCH V2 1/2] arm: dts: exynos: Add GPU/Mali T604 node to > exynos5250 > > On Thu, 25 Jul 2019 at 14:37, Guillaume Gardet <Guillaume.Gardet@arm.com> > wrote: > > > No, regulator is not provided. On all Exynos boards Mali uses its > > > own dedicated regulator (and sometimes additional one). It worked in > > > your case because the regulator was set as always-on but this is a > workaround for lack of consumers. > > > Once there is a consumer, the regulator should not be always-on to > > > save the energy when not used. > > > > I do not have the required info here. Do you have it, or could I skip the > mali-supply for now? > > You can guess from regulator name :) > For the Arndale, the schematics are saying it is buck4. Thanks. This is buck4 as well for snow. On Arndale board, buck4 has a fixed voltage of 1V contrary to snow, which leads to the following error: [ 21.131930] panfrost 11800000.gpu: Cannot set voltage 925000 uV The following change fixes the previous error: - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1000000>; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1300000>; Should I remove arndale enablement for now until this is fixed separately, or could I add this fixup in this patch serie, as it is related? Regards, Guillaume > > Best regards, > Krzysztof IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Hi Guillaume, On 2019-07-31 16:37, Guillaume Gardet wrote: >> -----Original Message----- >> From: Krzysztof Kozlowski <krzk@kernel.org> >> Sent: 26 July 2019 12:40 >> To: Guillaume Gardet <Guillaume.Gardet@arm.com> >> Cc: linux-samsung-soc@vger.kernel.org; Kukjin Kim <kgene@kernel.org>; >> linux-arm-kernel@lists.infradead.org >> Subject: Re: [PATCH V2 1/2] arm: dts: exynos: Add GPU/Mali T604 node to >> exynos5250 >> >> On Thu, 25 Jul 2019 at 14:37, Guillaume Gardet <Guillaume.Gardet@arm.com> >> wrote: >>>> No, regulator is not provided. On all Exynos boards Mali uses its >>>> own dedicated regulator (and sometimes additional one). It worked in >>>> your case because the regulator was set as always-on but this is a >> workaround for lack of consumers. >>>> Once there is a consumer, the regulator should not be always-on to >>>> save the energy when not used. >>> I do not have the required info here. Do you have it, or could I skip the >> mali-supply for now? >> >> You can guess from regulator name :) >> For the Arndale, the schematics are saying it is buck4. > Thanks. This is buck4 as well for snow. > > On Arndale board, buck4 has a fixed voltage of 1V contrary to snow, which leads to the following error: > [ 21.131930] panfrost 11800000.gpu: Cannot set voltage 925000 uV > > The following change fixes the previous error: > - regulator-min-microvolt = <1000000>; > - regulator-max-microvolt = <1000000>; > + regulator-min-microvolt = <850000>; > + regulator-max-microvolt = <1300000>; > > Should I remove arndale enablement for now until this is fixed separately, or could I add this fixup in this patch serie, as it is related? It is okay to add this fixup to the patch, which sets mali regulator on arndale board. Best regards
Add nodes for GPU (Mali T604) to Exynos5250. Tested with kmscube and some glmark2* tests on Chromebook snow and arndale board. V3 changes: * change clock name from 'g3d' to 'core' * disable node by default in exynos5250.dtsi * move dt-bindings before node addition in device tree * enable node for arndale and snow, with mali-supply, separetly * add patch to fix min/max values for buck4 regulator for gpu on arndale board V2 changes: * move mali node as /soc sub-node * move gpu_opp_table as mali sub-node * minor style updates * test on arndale board * enable by default * add dt bindings, in a separate patch Cc: Kukjin Kim <kgene@kernel.org> Cc: Krzysztof Kozlowski <krzk@kernel.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: linux-arm-kernel@lists.infradead.org Guillaume Gardet (5): dt-bindings: gpu: mali-midgard: Add samsung exynos5250 compatible arm: dts: exynos: Add GPU/Mali T604 node to exynos5250 arm: dts: exynos: snow: Enable GPU/Mali T604 node arm: dts: exynos: arndale: Enable GPU/Mali T604 node arm: dts: exynos: arndale: Fix min/max for buck4 regulator for gpu .../bindings/gpu/arm,mali-midgard.txt | 1 + arch/arm/boot/dts/exynos5250-arndale.dts | 9 +++- arch/arm/boot/dts/exynos5250-snow-common.dtsi | 5 ++ arch/arm/boot/dts/exynos5250.dtsi | 47 +++++++++++++++++++ 4 files changed, 60 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index d5e0392b409e..f7f34d469bde 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -328,6 +328,52 @@ iommus = <&sysmmu_rotator>; }; + mali: gpu@11800000 { + compatible = "samsung,exynos5250-mali", "arm,mali-t604"; + reg = <0x11800000 0x5000>; + interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "job", "mmu", "gpu"; + clocks = <&clock CLK_G3D>; + clock-names = "g3d"; + operating-points-v2 = <&gpu_opp_table>; + power-domains = <&pd_g3d>; + + gpu_opp_table: gpu-opp-table { + compatible = "operating-points-v2"; + + opp-100000000 { + opp-hz = /bits/ 64 <100000000>; + opp-microvolt = <925000>; + }; + opp-160000000 { + opp-hz = /bits/ 64 <160000000>; + opp-microvolt = <925000>; + }; + opp-266000000 { + opp-hz = /bits/ 64 <266000000>; + opp-microvolt = <1025000>; + }; + opp-350000000 { + opp-hz = /bits/ 64 <350000000>; + opp-microvolt = <1075000>; + }; + opp-400000000 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <1125000>; + }; + opp-450000000 { + opp-hz = /bits/ 64 <450000000>; + opp-microvolt = <1150000>; + }; + opp-533000000 { + opp-hz = /bits/ 64 <533000000>; + opp-microvolt = <1250000>; + }; + }; + }; + tmu: tmu@10060000 { compatible = "samsung,exynos5250-tmu"; reg = <0x10060000 0x100>;