Linux-Samsung-soc Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2] ARM: dts: exynos: Fix missing empty reg/ranges property regulators on Trats
@ 2020-06-29 20:59 ` Krzysztof Kozlowski
  2020-06-30  6:27   ` Marek Szyprowski
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2020-06-29 20:59 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: Rob Herring, Kukjin Kim, Marek Szyprowski, Alim Akhtar,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	Bartlomiej Zolnierkiewicz, Chanwoo Choi, Pankaj Dubey,
	Krzysztof Kozlowski

Remove the regulators node entirely because its children do not have any
unit addresses.  This fixes DTC warning:

    Warning (simple_bus_reg): /regulators/regulator-0: missing or empty reg/ranges property

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Changes since v1:
1. Remove the node, not only compatible, as pointed out by Sylwester.
---
 arch/arm/boot/dts/exynos4210-trats.dts | 98 ++++++++++++--------------
 1 file changed, 47 insertions(+), 51 deletions(-)

diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts
index 3d791db6095c..5cc96f04a4fa 100644
--- a/arch/arm/boot/dts/exynos4210-trats.dts
+++ b/arch/arm/boot/dts/exynos4210-trats.dts
@@ -30,62 +30,58 @@
 		stdout-path = "serial2:115200n8";
 	};
 
-	regulators {
-		compatible = "simple-bus";
-
-		vemmc_reg: regulator-0 {
-			compatible = "regulator-fixed";
-			regulator-name = "VMEM_VDD_2.8V";
-			regulator-min-microvolt = <2800000>;
-			regulator-max-microvolt = <2800000>;
-			gpio = <&gpk0 2 GPIO_ACTIVE_HIGH>;
-			enable-active-high;
-		};
+	vemmc_reg: regulator-0 {
+		compatible = "regulator-fixed";
+		regulator-name = "VMEM_VDD_2.8V";
+		regulator-min-microvolt = <2800000>;
+		regulator-max-microvolt = <2800000>;
+		gpio = <&gpk0 2 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
 
-		tsp_reg: regulator-1 {
-			compatible = "regulator-fixed";
-			regulator-name = "TSP_FIXED_VOLTAGES";
-			regulator-min-microvolt = <2800000>;
-			regulator-max-microvolt = <2800000>;
-			gpio = <&gpl0 3 GPIO_ACTIVE_HIGH>;
-			enable-active-high;
-		};
+	tsp_reg: regulator-1 {
+		compatible = "regulator-fixed";
+		regulator-name = "TSP_FIXED_VOLTAGES";
+		regulator-min-microvolt = <2800000>;
+		regulator-max-microvolt = <2800000>;
+		gpio = <&gpl0 3 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
 
-		cam_af_28v_reg: regulator-2 {
-			compatible = "regulator-fixed";
-			regulator-name = "8M_AF_2.8V_EN";
-			regulator-min-microvolt = <2800000>;
-			regulator-max-microvolt = <2800000>;
-			gpio = <&gpk1 1 GPIO_ACTIVE_HIGH>;
-			enable-active-high;
-		};
+	cam_af_28v_reg: regulator-2 {
+		compatible = "regulator-fixed";
+		regulator-name = "8M_AF_2.8V_EN";
+		regulator-min-microvolt = <2800000>;
+		regulator-max-microvolt = <2800000>;
+		gpio = <&gpk1 1 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
 
-		cam_io_en_reg: regulator-3 {
-			compatible = "regulator-fixed";
-			regulator-name = "CAM_IO_EN";
-			regulator-min-microvolt = <2800000>;
-			regulator-max-microvolt = <2800000>;
-			gpio = <&gpe2 1 GPIO_ACTIVE_HIGH>;
-			enable-active-high;
-		};
+	cam_io_en_reg: regulator-3 {
+		compatible = "regulator-fixed";
+		regulator-name = "CAM_IO_EN";
+		regulator-min-microvolt = <2800000>;
+		regulator-max-microvolt = <2800000>;
+		gpio = <&gpe2 1 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
 
-		cam_io_12v_reg: regulator-4 {
-			compatible = "regulator-fixed";
-			regulator-name = "8M_1.2V_EN";
-			regulator-min-microvolt = <1200000>;
-			regulator-max-microvolt = <1200000>;
-			gpio = <&gpe2 5 GPIO_ACTIVE_HIGH>;
-			enable-active-high;
-		};
+	cam_io_12v_reg: regulator-4 {
+		compatible = "regulator-fixed";
+		regulator-name = "8M_1.2V_EN";
+		regulator-min-microvolt = <1200000>;
+		regulator-max-microvolt = <1200000>;
+		gpio = <&gpe2 5 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
 
-		vt_core_15v_reg: regulator-5 {
-			compatible = "regulator-fixed";
-			regulator-name = "VT_CORE_1.5V";
-			regulator-min-microvolt = <1500000>;
-			regulator-max-microvolt = <1500000>;
-			gpio = <&gpe2 2 GPIO_ACTIVE_HIGH>;
-			enable-active-high;
-		};
+	vt_core_15v_reg: regulator-5 {
+		compatible = "regulator-fixed";
+		regulator-name = "VT_CORE_1.5V";
+		regulator-min-microvolt = <1500000>;
+		regulator-max-microvolt = <1500000>;
+		gpio = <&gpe2 2 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
 	};
 
 	gpio-keys {
-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] ARM: dts: exynos: Fix missing empty reg/ranges property regulators on Trats
  2020-06-29 20:59 ` [PATCH v2] ARM: dts: exynos: Fix missing empty reg/ranges property regulators on Trats Krzysztof Kozlowski
@ 2020-06-30  6:27   ` Marek Szyprowski
  2020-07-02  6:16     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Marek Szyprowski @ 2020-06-30  6:27 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Sylwester Nawrocki
  Cc: Rob Herring, Kukjin Kim, Alim Akhtar, devicetree,
	linux-arm-kernel, linux-samsung-soc, linux-kernel,
	Bartlomiej Zolnierkiewicz, Chanwoo Choi, Pankaj Dubey

Hi Krzysztof,

On 29.06.2020 22:59, Krzysztof Kozlowski wrote:
> Remove the regulators node entirely because its children do not have any
> unit addresses.  This fixes DTC warning:
>
>      Warning (simple_bus_reg): /regulators/regulator-0: missing or empty reg/ranges property
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>

What about removing the regulators node from other boards: 
exynos4412-origen.dts, exynos5420-smdk5420.dts and exynos5250-arndale.dts?

On the other hand, maybe it would be really easier to add missing 
address/size-cells properties to exynos4210-trats.dts/regulators node?

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] ARM: dts: exynos: Fix missing empty reg/ranges property regulators on Trats
  2020-06-30  6:27   ` Marek Szyprowski
@ 2020-07-02  6:16     ` Krzysztof Kozlowski
  2020-07-02  7:39       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-02  6:16 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: Sylwester Nawrocki, Rob Herring, Kukjin Kim, Alim Akhtar,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	Bartlomiej Zolnierkiewicz, Chanwoo Choi, Pankaj Dubey

On Tue, Jun 30, 2020 at 08:27:01AM +0200, Marek Szyprowski wrote:
> Hi Krzysztof,
> 
> On 29.06.2020 22:59, Krzysztof Kozlowski wrote:
> > Remove the regulators node entirely because its children do not have any
> > unit addresses.  This fixes DTC warning:
> >
> >      Warning (simple_bus_reg): /regulators/regulator-0: missing or empty reg/ranges property
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
> 
> What about removing the regulators node from other boards: 
> exynos4412-origen.dts, exynos5420-smdk5420.dts and exynos5250-arndale.dts?
> 
> On the other hand, maybe it would be really easier to add missing 
> address/size-cells properties to exynos4210-trats.dts/regulators node?

Indeed let's keep it consistent so in such case better to add here
proper address/size-cells.

Thanks for feedback!

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] ARM: dts: exynos: Fix missing empty reg/ranges property regulators on Trats
  2020-07-02  6:16     ` Krzysztof Kozlowski
@ 2020-07-02  7:39       ` Krzysztof Kozlowski
  2020-07-02  7:48         ` Marek Szyprowski
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-02  7:39 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: Sylwester Nawrocki, Rob Herring, Kukjin Kim, Alim Akhtar,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	Bartlomiej Zolnierkiewicz, Chanwoo Choi, Pankaj Dubey

On Thu, Jul 02, 2020 at 08:16:11AM +0200, Krzysztof Kozlowski wrote:
> On Tue, Jun 30, 2020 at 08:27:01AM +0200, Marek Szyprowski wrote:
> > Hi Krzysztof,
> > 
> > On 29.06.2020 22:59, Krzysztof Kozlowski wrote:
> > > Remove the regulators node entirely because its children do not have any
> > > unit addresses.  This fixes DTC warning:
> > >
> > >      Warning (simple_bus_reg): /regulators/regulator-0: missing or empty reg/ranges property
> > >
> > > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > 
> > Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
> > 
> > What about removing the regulators node from other boards: 
> > exynos4412-origen.dts, exynos5420-smdk5420.dts and exynos5250-arndale.dts?
> > 
> > On the other hand, maybe it would be really easier to add missing 
> > address/size-cells properties to exynos4210-trats.dts/regulators node?
> 
> Indeed let's keep it consistent so in such case better to add here
> proper address/size-cells.

Actually more of DTSes put fixed regulators directly in root node, not
under "regulators" node:
exynos3250-monk.dts
exynos4210-i9100.dts
exynos4210-origen.dts
exynos4210-universal_c210.dts
exynos4412-galaxy-s3.dtsi
exynos4412-midas.dtsi
exynos4412-n710x.dts
exynos4412-odroidx.dts
exynos5250-smdk5250.dts
exynos5250-snow-common.dtsi
exynos5420-peach-pit.dts
exynos5800-peach-pi.dts

If we want it to be consistent, it's easier to remove the regulator
nodes from exynos4412-origen.dts, exynos5420-smdk5420.dts and
exynos5250-arndale.dts.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] ARM: dts: exynos: Fix missing empty reg/ranges property regulators on Trats
  2020-07-02  7:39       ` Krzysztof Kozlowski
@ 2020-07-02  7:48         ` Marek Szyprowski
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Szyprowski @ 2020-07-02  7:48 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Sylwester Nawrocki, Rob Herring, Kukjin Kim, Alim Akhtar,
	devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
	Bartlomiej Zolnierkiewicz, Chanwoo Choi, Pankaj Dubey

On 02.07.2020 09:39, Krzysztof Kozlowski wrote:
> On Thu, Jul 02, 2020 at 08:16:11AM +0200, Krzysztof Kozlowski wrote:
>> On Tue, Jun 30, 2020 at 08:27:01AM +0200, Marek Szyprowski wrote:
>>> On 29.06.2020 22:59, Krzysztof Kozlowski wrote:
>>>> Remove the regulators node entirely because its children do not have any
>>>> unit addresses.  This fixes DTC warning:
>>>>
>>>>       Warning (simple_bus_reg): /regulators/regulator-0: missing or empty reg/ranges property
>>>>
>>>> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>>> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
>>>
>>> What about removing the regulators node from other boards:
>>> exynos4412-origen.dts, exynos5420-smdk5420.dts and exynos5250-arndale.dts?
>>>
>>> On the other hand, maybe it would be really easier to add missing
>>> address/size-cells properties to exynos4210-trats.dts/regulators node?
>> Indeed let's keep it consistent so in such case better to add here
>> proper address/size-cells.
> Actually more of DTSes put fixed regulators directly in root node, not
> under "regulators" node:
> exynos3250-monk.dts
> exynos4210-i9100.dts
> exynos4210-origen.dts
> exynos4210-universal_c210.dts
> exynos4412-galaxy-s3.dtsi
> exynos4412-midas.dtsi
> exynos4412-n710x.dts
> exynos4412-odroidx.dts
> exynos5250-smdk5250.dts
> exynos5250-snow-common.dtsi
> exynos5420-peach-pit.dts
> exynos5800-peach-pi.dts
>
> If we want it to be consistent, it's easier to remove the regulator
> nodes from exynos4412-origen.dts, exynos5420-smdk5420.dts and
> exynos5250-arndale.dts.

Feel free, I'm fine with both approaches.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200629210025eucas1p219a52e75ecce9e813aa80f0126780189@eucas1p2.samsung.com>
2020-06-29 20:59 ` [PATCH v2] ARM: dts: exynos: Fix missing empty reg/ranges property regulators on Trats Krzysztof Kozlowski
2020-06-30  6:27   ` Marek Szyprowski
2020-07-02  6:16     ` Krzysztof Kozlowski
2020-07-02  7:39       ` Krzysztof Kozlowski
2020-07-02  7:48         ` Marek Szyprowski

Linux-Samsung-soc Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-samsung-soc/0 linux-samsung-soc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-samsung-soc linux-samsung-soc/ https://lore.kernel.org/linux-samsung-soc \
		linux-samsung-soc@vger.kernel.org
	public-inbox-index linux-samsung-soc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-samsung-soc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git