linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings
@ 2019-07-26  5:39 Andrew Jeffery
  2019-07-26  5:39 ` [PATCH 01/17] ARM: dts: aspeed-g5: Move EDAC node to APB Andrew Jeffery
                   ` (18 more replies)
  0 siblings, 19 replies; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel, anoo, a.filippov, arnd,
	yang.brianc.w, minyard, gregkh, haiyue.wang, wangzqbj,
	chen.kenyy, linus.walleij, linux-gpio, openipmi-developer,
	venture, sschaeck, taoren, xow, yao.yuan

Hello,

The aim of this series is to minimise/eliminate all the warnings from the
ASPEED devicetrees. It mostly achieves its goal, as outlined below.

Using `aspeed_g5_defconfig` we started with the follow warning count:

    $ make dtbs 2>&1 >/dev/null | wc -l
    218

and after the full series is applied we have:

    $ make dtbs 2>&1 >/dev/null | wc -l
    2

for a 100x reduction.

Getting there though isn't without some potential controversy, which I've saved
for the last half of the series. The following patches I think are in pretty
good shape:

  ARM: dts: aspeed-g5: Move EDAC node to APB
  ARM: dts: aspeed-g5: Use recommended generic node name for SDMC
  ARM: dts: aspeed-g5: Fix aspeed,external-nodes description
  ARM: dts: vesnin: Add unit address for memory node
  ARM: dts: fp5280g2: Cleanup gpio-keys-polled properties
  ARM: dts: swift: Cleanup gpio-keys-polled properties
  ARM: dts: witherspoon: Cleanup gpio-keys-polled properties
  ARM: dts: aspeed: Cleanup lpc-ctrl and snoop regs
  ARM: dts: ibm-power9-dual: Add a unit address for OCC nodes

With these patches applied we get to:

    $ make dtbs 2>&1 >/dev/null | wc -l
    144

So they make a dent, but fail to clean up the bulk of the issues. From here
I've mixed in some binding and driver changes with subsequent updates to the
devicetrees:

  dt-bindings: pinctrl: aspeed: Add reg property as a hint
  dt-bindings: misc: Document reg for aspeed,p2a-ctrl nodes
  ARM: dts: aspeed: Add reg hints to syscon children
  dt-bindings: ipmi: aspeed: Introduce a v2 binding for KCS
  ipmi: kcs: Finish configuring ASPEED KCS device before enable
  ipmi: kcs: aspeed: Implement v2 bindings
  ARM: dts: aspeed-g5: Change KCS nodes to v2 binding
  ARM: dts: aspeed-g5: Sort LPC child nodes by unit address

By `dt-bindings: ipmi: aspeed: Introduce a v2 binding for KCS` the warnings are
reduced to:

    $ make dtbs 2>&1 >/dev/null | wc -l
    125

The bang-for-buck is in fixing up the KCS bindings which removes all-but-two of
the remaining warnings (which we can't feasibly remove), but doing so forces
code changes (which I'd avoided up until this point).

Reflecting broadly on the fixes, I think I've made a mistake way back by using
syscon/simple-mfds to expose the innards of the SCU and LPC controllers in the
devicetree. This series cleans up what's currently there, but I have half a
mind to rev the SCU and LPC bindings to not use simple-mfd and instead have a
driver implementation that uses `platform_device_register_full()` or similar to
deal with the mess.

Rob - I'm looking for your thoughts here and on the series, I've never felt
entirely comfortable with what I cooked up. Your advice would be appreciated.

Anyway, everyone, please let me know your thoughts on the bits relevant to you.
If we can agree on a way forward I'll split up the series for subsequent
submissions so it isn't such a spam-fest.

Cheers,

Andrew

Andrew Jeffery (17):
  ARM: dts: aspeed-g5: Move EDAC node to APB
  ARM: dts: aspeed-g5: Use recommended generic node name for SDMC
  ARM: dts: aspeed-g5: Fix aspeed,external-nodes description
  ARM: dts: vesnin: Add unit address for memory node
  ARM: dts: fp5280g2: Cleanup gpio-keys-polled properties
  ARM: dts: swift: Cleanup gpio-keys-polled properties
  ARM: dts: witherspoon: Cleanup gpio-keys-polled properties
  ARM: dts: aspeed: Cleanup lpc-ctrl and snoop regs
  ARM: dts: ibm-power9-dual: Add a unit address for OCC nodes
  dt-bindings: pinctrl: aspeed: Add reg property as a hint
  dt-bindings: misc: Document reg for aspeed,p2a-ctrl nodes
  ARM: dts: aspeed: Add reg hints to syscon children
  dt-bindings: ipmi: aspeed: Introduce a v2 binding for KCS
  ipmi: kcs: Finish configuring ASPEED KCS device before enable
  ipmi: kcs: aspeed: Implement v2 bindings
  ARM: dts: aspeed-g5: Change KCS nodes to v2 binding
  ARM: dts: aspeed-g5: Sort LPC child nodes by unit address

 .../bindings/ipmi/aspeed-kcs-bmc.txt          |  20 ++-
 .../bindings/misc/aspeed-p2a-ctrl.txt         |   1 +
 .../pinctrl/aspeed,ast2400-pinctrl.yaml       |   3 +
 .../pinctrl/aspeed,ast2500-pinctrl.yaml       |   3 +
 .../dts/aspeed-bmc-arm-centriq2400-rep.dts    |   4 -
 .../aspeed-bmc-arm-stardragon4800-rep2.dts    |   4 -
 arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts |   4 -
 .../arm/boot/dts/aspeed-bmc-facebook-yamp.dts |   4 -
 .../boot/dts/aspeed-bmc-inspur-fp5280g2.dts   |   6 -
 .../arm/boot/dts/aspeed-bmc-intel-s2600wf.dts |   4 -
 arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts  |   4 -
 arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts  |   4 -
 arch/arm/boot/dts/aspeed-bmc-opp-swift.dts    |   6 -
 arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts   |   2 +-
 .../boot/dts/aspeed-bmc-opp-witherspoon.dts   |   6 -
 arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts    |   2 -
 arch/arm/boot/dts/aspeed-g4.dtsi              |  21 ++-
 arch/arm/boot/dts/aspeed-g5.dtsi              |  73 ++++----
 arch/arm/boot/dts/ibm-power9-dual.dtsi        |   4 +-
 drivers/char/ipmi/kcs_bmc_aspeed.c            | 163 ++++++++++++++----
 20 files changed, 205 insertions(+), 133 deletions(-)

-- 
2.20.1


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

* [PATCH 01/17] ARM: dts: aspeed-g5: Move EDAC node to APB
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
@ 2019-07-26  5:39 ` Andrew Jeffery
  2019-07-29 17:26   ` Stefan Schaeckeler (sschaeck)
  2019-07-26  5:39 ` [PATCH 02/17] ARM: dts: aspeed-g5: Use recommended generic node name for SDMC Andrew Jeffery
                   ` (17 subsequent siblings)
  18 siblings, 1 reply; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel, Stefan M Schaeckeler

Previously the register interface was not attached to any internal bus,
which is not correct - it lives on the APB.

Cc: Stefan M Schaeckeler <sschaeck@cisco.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 arch/arm/boot/dts/aspeed-g5.dtsi | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
index 5b1ca265c2ce..7723afc7c249 100644
--- a/arch/arm/boot/dts/aspeed-g5.dtsi
+++ b/arch/arm/boot/dts/aspeed-g5.dtsi
@@ -47,13 +47,6 @@
 		reg = <0x80000000 0>;
 	};
 
-	edac: sdram@1e6e0000 {
-		compatible = "aspeed,ast2500-sdram-edac";
-		reg = <0x1e6e0000 0x174>;
-		interrupts = <0>;
-		status = "disabled";
-	};
-
 	ahb {
 		compatible = "simple-bus";
 		#address-cells = <1>;
@@ -206,6 +199,13 @@
 			#size-cells = <1>;
 			ranges;
 
+			edac: sdram@1e6e0000 {
+				compatible = "aspeed,ast2500-sdram-edac";
+				reg = <0x1e6e0000 0x174>;
+				interrupts = <0>;
+				status = "disabled";
+			};
+
 			syscon: syscon@1e6e2000 {
 				compatible = "aspeed,ast2500-scu", "syscon", "simple-mfd";
 				reg = <0x1e6e2000 0x1a8>;
-- 
2.20.1


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

* [PATCH 02/17] ARM: dts: aspeed-g5: Use recommended generic node name for SDMC
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
  2019-07-26  5:39 ` [PATCH 01/17] ARM: dts: aspeed-g5: Move EDAC node to APB Andrew Jeffery
@ 2019-07-26  5:39 ` Andrew Jeffery
  2019-07-29 17:29   ` Stefan Schaeckeler (sschaeck)
  2019-07-26  5:39 ` [PATCH 03/17] ARM: dts: aspeed-g5: Fix aspeed,external-nodes description Andrew Jeffery
                   ` (16 subsequent siblings)
  18 siblings, 1 reply; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel, Stefan M Schaeckeler

The EDAC is a sub-function of the SDRAM Memory Controller. Rename the
node to the appropriate generic node name.

Cc: Stefan M Schaeckeler <sschaeck@cisco.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 arch/arm/boot/dts/aspeed-g5.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
index 7723afc7c249..6e5b0c493f16 100644
--- a/arch/arm/boot/dts/aspeed-g5.dtsi
+++ b/arch/arm/boot/dts/aspeed-g5.dtsi
@@ -199,7 +199,7 @@
 			#size-cells = <1>;
 			ranges;
 
-			edac: sdram@1e6e0000 {
+			edac: memory-controller@1e6e0000 {
 				compatible = "aspeed,ast2500-sdram-edac";
 				reg = <0x1e6e0000 0x174>;
 				interrupts = <0>;
-- 
2.20.1


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

* [PATCH 03/17] ARM: dts: aspeed-g5: Fix aspeed,external-nodes description
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
  2019-07-26  5:39 ` [PATCH 01/17] ARM: dts: aspeed-g5: Move EDAC node to APB Andrew Jeffery
  2019-07-26  5:39 ` [PATCH 02/17] ARM: dts: aspeed-g5: Use recommended generic node name for SDMC Andrew Jeffery
@ 2019-07-26  5:39 ` Andrew Jeffery
  2019-07-26  5:39 ` [PATCH 04/17] ARM: dts: vesnin: Add unit address for memory node Andrew Jeffery
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel, Adriana Kobylak, Brian Yang,
	John Wang, Ken Chen, Tao Ren, Xo Wang, Yuan Yao

The existing approach lead to an error from the dtbs_check:

    pinctrl: aspeed,external-nodes: [[8, 9]] is too short

Cc: Adriana Kobylak <anoo@us.ibm.com>
Cc: Brian Yang <yang.brianc.w@inventec.com>
Cc: Joel Stanley <joel@jms.id.au>
Cc: John Wang <wangzqbj@inspur.com>
Cc: Ken Chen <chen.kenyy@inventec.com>
Cc: Tao Ren <taoren@fb.com>
Cc: Xo Wang <xow@google.com>
Cc: Yuan Yao <yao.yuan@linaro.org>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts     | 4 ----
 arch/arm/boot/dts/aspeed-bmc-arm-stardragon4800-rep2.dts | 4 ----
 arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts            | 4 ----
 arch/arm/boot/dts/aspeed-bmc-facebook-yamp.dts           | 4 ----
 arch/arm/boot/dts/aspeed-bmc-inspur-fp5280g2.dts         | 4 ----
 arch/arm/boot/dts/aspeed-bmc-intel-s2600wf.dts           | 4 ----
 arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts             | 4 ----
 arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts             | 4 ----
 arch/arm/boot/dts/aspeed-bmc-opp-swift.dts               | 4 ----
 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts         | 4 ----
 arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts               | 2 --
 arch/arm/boot/dts/aspeed-g5.dtsi                         | 3 +--
 12 files changed, 1 insertion(+), 44 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts b/arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts
index c2ece0b91885..de9612e49c69 100644
--- a/arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts
@@ -211,10 +211,6 @@
 	status = "okay";
 };
 
-&pinctrl {
-	aspeed,external-nodes = <&gfx &lhc>;
-};
-
 &gpio {
 	pin_gpio_c7 {
 		gpio-hog;
diff --git a/arch/arm/boot/dts/aspeed-bmc-arm-stardragon4800-rep2.dts b/arch/arm/boot/dts/aspeed-bmc-arm-stardragon4800-rep2.dts
index 521afbea2c5b..d122a8efcc66 100644
--- a/arch/arm/boot/dts/aspeed-bmc-arm-stardragon4800-rep2.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-arm-stardragon4800-rep2.dts
@@ -197,10 +197,6 @@
 	status = "okay";
 };
 
-&pinctrl {
-	aspeed,external-nodes = <&gfx &lhc>;
-};
-
 &gpio {
 	pin_gpio_c7 {
 		gpio-hog;
diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts
index d519d307aa2a..dd2be50112a4 100644
--- a/arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts
@@ -64,10 +64,6 @@
 	};
 };
 
-&pinctrl {
-	aspeed,external-nodes = <&gfx &lhc>;
-};
-
 /*
  * Update reset type to "system" (full chip) to fix warm reboot hang issue
  * when reset type is set to default ("soc", gated by reset mask registers).
diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-yamp.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-yamp.dts
index 4e09a9cf32b7..d4d2d0b48f83 100644
--- a/arch/arm/boot/dts/aspeed-bmc-facebook-yamp.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-facebook-yamp.dts
@@ -29,10 +29,6 @@
 	};
 };
 
-&pinctrl {
-	aspeed,external-nodes = <&gfx &lhc>;
-};
-
 /*
  * Update reset type to "system" (full chip) to fix warm reboot hang issue
  * when reset type is set to default ("soc", gated by reset mask registers).
diff --git a/arch/arm/boot/dts/aspeed-bmc-inspur-fp5280g2.dts b/arch/arm/boot/dts/aspeed-bmc-inspur-fp5280g2.dts
index 628195b66d46..2dd664bff928 100644
--- a/arch/arm/boot/dts/aspeed-bmc-inspur-fp5280g2.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-inspur-fp5280g2.dts
@@ -745,10 +745,6 @@
 	memory-region = <&gfx_memory>;
 };
 
-&pinctrl {
-	aspeed,external-nodes = <&gfx &lhc>;
-};
-
 &gpio {
 	pin_gpio_b7 {
 		gpio-hog;
diff --git a/arch/arm/boot/dts/aspeed-bmc-intel-s2600wf.dts b/arch/arm/boot/dts/aspeed-bmc-intel-s2600wf.dts
index 22dade6393d0..4e9c03d5e5a3 100644
--- a/arch/arm/boot/dts/aspeed-bmc-intel-s2600wf.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-intel-s2600wf.dts
@@ -115,10 +115,6 @@
 	status = "okay";
 };
 
-&pinctrl {
-	aspeed,external-nodes = <&gfx &lhc>;
-};
-
 &pwm_tacho {
 	status = "okay";
 	pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts b/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts
index de95112e2a04..fe7965366f4a 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts
@@ -260,10 +260,6 @@
 	status = "okay";
 };
 
-&pinctrl {
-	aspeed,external-nodes = <&gfx &lhc>;
-};
-
 &gpio {
 	pin_gpio_b0 {
 		gpio-hog;
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
index 9628ecb879cf..2fa4f361ac6a 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
@@ -255,10 +255,6 @@
 	memory-region = <&gfx_memory>;
 };
 
-&pinctrl {
-	aspeed,external-nodes = <&gfx &lhc>;
-};
-
 &pwm_tacho {
 	status = "okay";
 	pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-swift.dts b/arch/arm/boot/dts/aspeed-bmc-opp-swift.dts
index caac895c60b4..2077e8d0e096 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-swift.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-swift.dts
@@ -937,10 +937,6 @@
 	memory-region = <&gfx_memory>;
 };
 
-&pinctrl {
-	aspeed,external-nodes = <&gfx &lhc>;
-};
-
 &wdt1 {
 	aspeed,reset-type = "none";
 	aspeed,external-signal;
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
index 31ea34e14c79..08facb2120b2 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
@@ -618,10 +618,6 @@
 	memory-region = <&gfx_memory>;
 };
 
-&pinctrl {
-	aspeed,external-nodes = <&gfx &lhc>;
-};
-
 &wdt1 {
 	aspeed,reset-type = "none";
 	aspeed,external-signal;
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
index 30624378316d..c99113e69e43 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
@@ -461,8 +461,6 @@
 };
 
 &pinctrl {
-	aspeed,external-nodes = <&gfx &lhc>;
-
 	pinctrl_gpioh_unbiased: gpioi_unbiased {
 		pins = "A8", "C7", "B7", "A7", "D7", "B6", "A6", "E7";
 		bias-disable;
diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
index 6e5b0c493f16..3b4af88f9b80 100644
--- a/arch/arm/boot/dts/aspeed-g5.dtsi
+++ b/arch/arm/boot/dts/aspeed-g5.dtsi
@@ -216,8 +216,7 @@
 
 				pinctrl: pinctrl {
 					compatible = "aspeed,g5-pinctrl";
-					aspeed,external-nodes = <&gfx &lhc>;
-
+					aspeed,external-nodes = <&gfx>, <&lhc>;
 				};
 
 				p2a: p2a-control {
-- 
2.20.1


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

* [PATCH 04/17] ARM: dts: vesnin: Add unit address for memory node
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
                   ` (2 preceding siblings ...)
  2019-07-26  5:39 ` [PATCH 03/17] ARM: dts: aspeed-g5: Fix aspeed,external-nodes description Andrew Jeffery
@ 2019-07-26  5:39 ` Andrew Jeffery
  2019-07-26  7:56   ` Alexander A. Filippov
  2019-07-26  5:39 ` [PATCH 05/17] ARM: dts: fp5280g2: Cleanup gpio-keys-polled properties Andrew Jeffery
                   ` (14 subsequent siblings)
  18 siblings, 1 reply; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel, Alexander Filippov

Fixes the following warnings:

    arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dt.yaml: /: memory: False schema does not allow {'reg': [[1073741824, 536870912]]}
    arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dt.yaml: memory: 'device_type' is a required property

Cc: Alexander Filippov <a.filippov@yadro.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts b/arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts
index 0b9e29c3212e..81d9dcb752a0 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts
@@ -14,7 +14,7 @@
 		bootargs = "console=ttyS4,115200 earlyprintk";
 	};
 
-	memory {
+	memory@40000000 {
 		reg = <0x40000000 0x20000000>;
 	};
 
-- 
2.20.1


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

* [PATCH 05/17] ARM: dts: fp5280g2: Cleanup gpio-keys-polled properties
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
                   ` (3 preceding siblings ...)
  2019-07-26  5:39 ` [PATCH 04/17] ARM: dts: vesnin: Add unit address for memory node Andrew Jeffery
@ 2019-07-26  5:39 ` Andrew Jeffery
  2019-07-26  5:39 ` [PATCH 06/17] ARM: dts: swift: " Andrew Jeffery
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel, John Wang

dtbs_check gave the following warning:

    Warning (avoid_unnecessary_addr_size): /gpio-keys-polled: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

Cc: John Wang <wangzqbj@inspur.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 arch/arm/boot/dts/aspeed-bmc-inspur-fp5280g2.dts | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed-bmc-inspur-fp5280g2.dts b/arch/arm/boot/dts/aspeed-bmc-inspur-fp5280g2.dts
index 2dd664bff928..aa5efd1dfa70 100644
--- a/arch/arm/boot/dts/aspeed-bmc-inspur-fp5280g2.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-inspur-fp5280g2.dts
@@ -94,8 +94,6 @@
 
 	gpio-keys-polled {
 		compatible = "gpio-keys-polled";
-		#address-cells = <1>;
-		#size-cells = <0>;
 		poll-interval = <1000>;
 
 		fan0-presence {
-- 
2.20.1


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

* [PATCH 06/17] ARM: dts: swift: Cleanup gpio-keys-polled properties
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
                   ` (4 preceding siblings ...)
  2019-07-26  5:39 ` [PATCH 05/17] ARM: dts: fp5280g2: Cleanup gpio-keys-polled properties Andrew Jeffery
@ 2019-07-26  5:39 ` Andrew Jeffery
  2019-07-26  5:39 ` [PATCH 07/17] ARM: dts: witherspoon: " Andrew Jeffery
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel, Adriana Kobylak

dtbs_check gave the following warning:

    Warning (avoid_unnecessary_addr_size): /gpio-keys-polled: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

Cc: Adriana Kobylak <anoo@us.ibm.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 arch/arm/boot/dts/aspeed-bmc-opp-swift.dts | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-swift.dts b/arch/arm/boot/dts/aspeed-bmc-opp-swift.dts
index 2077e8d0e096..9f934509ca1b 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-swift.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-swift.dts
@@ -82,8 +82,6 @@
 
 	gpio-keys-polled {
 		compatible = "gpio-keys-polled";
-		#address-cells = <1>;
-		#size-cells = <0>;
 		poll-interval = <1000>;
 
 		scm0-presence {
-- 
2.20.1


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

* [PATCH 07/17] ARM: dts: witherspoon: Cleanup gpio-keys-polled properties
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
                   ` (5 preceding siblings ...)
  2019-07-26  5:39 ` [PATCH 06/17] ARM: dts: swift: " Andrew Jeffery
@ 2019-07-26  5:39 ` Andrew Jeffery
  2019-07-26  5:39 ` [PATCH 08/17] ARM: dts: aspeed: Cleanup lpc-ctrl and snoop regs Andrew Jeffery
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel

dtbs_check gave the following warning:

    Warning (avoid_unnecessary_addr_size): /gpio-keys-polled: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

Cc: Joel Stanley <joel@jms.id.au>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
index 08facb2120b2..06319c6771ca 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
@@ -77,8 +77,6 @@
 
 	gpio-keys-polled {
 		compatible = "gpio-keys-polled";
-		#address-cells = <1>;
-		#size-cells = <0>;
 		poll-interval = <1000>;
 
 		fan0-presence {
-- 
2.20.1


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

* [PATCH 08/17] ARM: dts: aspeed: Cleanup lpc-ctrl and snoop regs
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
                   ` (6 preceding siblings ...)
  2019-07-26  5:39 ` [PATCH 07/17] ARM: dts: witherspoon: " Andrew Jeffery
@ 2019-07-26  5:39 ` Andrew Jeffery
  2019-07-26  5:39 ` [PATCH 09/17] ARM: dts: ibm-power9-dual: Add a unit address for OCC nodes Andrew Jeffery
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel

Fix the following warning:

    arch/arm/boot/dts/aspeed-g5.dtsi:409.27-414.8: Warning (unique_unit_address): /ahb/apb/lpc@1e789000/lpc-host@80/lpc-ctrl@0: duplicate unit-address (also used in node /ahb/apb/lpc@1e789000/lpc-host@80/lpc-snoop@0)

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 arch/arm/boot/dts/aspeed-g4.dtsi | 6 +++---
 arch/arm/boot/dts/aspeed-g5.dtsi | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
index dd4b0b15afcf..ed78020f6269 100644
--- a/arch/arm/boot/dts/aspeed-g4.dtsi
+++ b/arch/arm/boot/dts/aspeed-g4.dtsi
@@ -296,14 +296,14 @@
 
 					lpc_ctrl: lpc-ctrl@0 {
 						compatible = "aspeed,ast2400-lpc-ctrl";
-						reg = <0x0 0x80>;
+						reg = <0x0 0x10>;
 						clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
 						status = "disabled";
 					};
 
-					lpc_snoop: lpc-snoop@0 {
+					lpc_snoop: lpc-snoop@10 {
 						compatible = "aspeed,ast2400-lpc-snoop";
-						reg = <0x0 0x80>;
+						reg = <0x10 0x8>;
 						interrupts = <8>;
 						status = "disabled";
 					};
diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
index 3b4af88f9b80..a8a593dd2240 100644
--- a/arch/arm/boot/dts/aspeed-g5.dtsi
+++ b/arch/arm/boot/dts/aspeed-g5.dtsi
@@ -408,14 +408,14 @@
 
 					lpc_ctrl: lpc-ctrl@0 {
 						compatible = "aspeed,ast2500-lpc-ctrl";
-						reg = <0x0 0x80>;
+						reg = <0x0 0x10>;
 						clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
 						status = "disabled";
 					};
 
-					lpc_snoop: lpc-snoop@0 {
+					lpc_snoop: lpc-snoop@10 {
 						compatible = "aspeed,ast2500-lpc-snoop";
-						reg = <0x0 0x80>;
+						reg = <0x10 0x8>;
 						interrupts = <8>;
 						status = "disabled";
 					};
-- 
2.20.1


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

* [PATCH 09/17] ARM: dts: ibm-power9-dual: Add a unit address for OCC nodes
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
                   ` (7 preceding siblings ...)
  2019-07-26  5:39 ` [PATCH 08/17] ARM: dts: aspeed: Cleanup lpc-ctrl and snoop regs Andrew Jeffery
@ 2019-07-26  5:39 ` Andrew Jeffery
  2019-07-26  5:39 ` [RFC PATCH 10/17] dt-bindings: pinctrl: aspeed: Add reg property as a hint Andrew Jeffery
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel

These temporarily have a unit address until userspace is fixed up as
noted in comments elsewhere in the dtsi.

Fixes the following warning:

    arch/arm/boot/dts/ibm-power9-dual.dtsi:89.18-91.6: Warning (unit_address_vs_reg): /gpio-fsi/cfam@0,0/sbefifo@2400/occ: node has a reg or ranges property, but no unit name
    arch/arm/boot/dts/ibm-power9-dual.dtsi:190.18-192.6: Warning (unit_address_vs_reg): /gpio-fsi/cfam@0,0/hub@3400/cfam@1,0/sbefifo@2400/occ: node has a reg or ranges property, but no unit name

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 arch/arm/boot/dts/ibm-power9-dual.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/ibm-power9-dual.dtsi b/arch/arm/boot/dts/ibm-power9-dual.dtsi
index 2abc42eda7b0..a0fa65b44b0f 100644
--- a/arch/arm/boot/dts/ibm-power9-dual.dtsi
+++ b/arch/arm/boot/dts/ibm-power9-dual.dtsi
@@ -86,7 +86,7 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			fsi_occ0: occ {
+			fsi_occ0: occ@1 {
 				compatible = "ibm,p9-occ";
 			};
 		};
@@ -187,7 +187,7 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			fsi_occ1: occ {
+			fsi_occ1: occ@2 {
 				compatible = "ibm,p9-occ";
 			};
 		};
-- 
2.20.1


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

* [RFC PATCH 10/17] dt-bindings: pinctrl: aspeed: Add reg property as a hint
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
                   ` (8 preceding siblings ...)
  2019-07-26  5:39 ` [PATCH 09/17] ARM: dts: ibm-power9-dual: Add a unit address for OCC nodes Andrew Jeffery
@ 2019-07-26  5:39 ` Andrew Jeffery
  2019-07-26  5:39 ` [RFC PATCH 11/17] dt-bindings: misc: Document reg for aspeed,p2a-ctrl nodes Andrew Jeffery
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel, Linus Walleij, linux-gpio

The pinctrl node sits under a syscon device, and can assume offsets from
the base of the syscon based on the compatible. However, for devicetree
correctness allow a reg property to be specified, which an associated
driver may choose to use to discover associated resources.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 .../devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml    | 3 +++
 .../devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml    | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml
index 125599a2dc5e..629a55c167ae 100644
--- a/Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml
@@ -25,6 +25,9 @@ properties:
     enum:
       - aspeed,ast2400-pinctrl
       - aspeed,g4-pinctrl
+  reg:
+    description: |
+      A hint for the memory regions associated with the pin-controller
 
 patternProperties:
   '^.*$':
diff --git a/Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml
index 3e6d85318577..2e8971e23a02 100644
--- a/Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml
@@ -25,6 +25,9 @@ properties:
     enum:
       - aspeed,ast2500-pinctrl
       - aspeed,g5-pinctrl
+  reg:
+    description: |
+      A hint for the memory regions associated with the pin-controller
   aspeed,external-nodes:
     minItems: 2
     maxItems: 2
-- 
2.20.1


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

* [RFC PATCH 11/17] dt-bindings: misc: Document reg for aspeed,p2a-ctrl nodes
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
                   ` (9 preceding siblings ...)
  2019-07-26  5:39 ` [RFC PATCH 10/17] dt-bindings: pinctrl: aspeed: Add reg property as a hint Andrew Jeffery
@ 2019-07-26  5:39 ` Andrew Jeffery
  2019-07-26  5:39 ` [RFC PATCH 12/17] ARM: dts: aspeed: Add reg hints to syscon children Andrew Jeffery
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel, Patrick Venture,
	Greg Kroah-Hartman

The P2A controller node sits under a syscon device, and can assume
offsets from the base of the syscon based on the compatible. However,
for devicetree correctness allow a reg property to be specified, which
an associated driver may choose to use to discover associated resources.

Cc: Patrick Venture <venture@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt b/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt
index 854bd67ffec6..091d1c5ec58f 100644
--- a/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt
+++ b/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt
@@ -18,6 +18,7 @@ Required properties:
 Optional properties:
 ===================
 
+- reg: A hint for the memory regions associated with the P2A controller
 - memory-region: A phandle to a reserved_memory region to be used for the PCI
 		to AHB mapping
 
-- 
2.20.1


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

* [RFC PATCH 12/17] ARM: dts: aspeed: Add reg hints to syscon children
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
                   ` (10 preceding siblings ...)
  2019-07-26  5:39 ` [RFC PATCH 11/17] dt-bindings: misc: Document reg for aspeed,p2a-ctrl nodes Andrew Jeffery
@ 2019-07-26  5:39 ` Andrew Jeffery
  2019-07-26  5:39 ` [RFC PATCH 13/17] dt-bindings: ipmi: aspeed: Introduce a v2 binding for KCS Andrew Jeffery
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel, Patrick Venture

Fixes the following warnings:

    arch/arm/boot/dts/aspeed-g5.dtsi:209.28-226.6: Warning (avoid_unnecessary_addr_size): /ahb/apb/syscon@1e6e2000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
    arch/arm/boot/dts/aspeed-g4.dtsi:156.28-172.6: Warning (avoid_unnecessary_addr_size): /ahb/apb/syscon@1e6e2000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

Cc: Patrick Venture <venture@google.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 arch/arm/boot/dts/aspeed-g4.dtsi | 15 +++++++++------
 arch/arm/boot/dts/aspeed-g5.dtsi | 17 ++++++++++-------
 2 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
index ed78020f6269..1515b56a1487 100644
--- a/arch/arm/boot/dts/aspeed-g4.dtsi
+++ b/arch/arm/boot/dts/aspeed-g4.dtsi
@@ -157,18 +157,21 @@
 				compatible = "aspeed,ast2400-scu", "syscon", "simple-mfd";
 				reg = <0x1e6e2000 0x1a8>;
 				#address-cells = <1>;
-				#size-cells = <0>;
+				#size-cells = <1>;
+				ranges = <0 0x1e6e2000 0x1000>;
 				#clock-cells = <1>;
 				#reset-cells = <1>;
 
-				pinctrl: pinctrl {
-					compatible = "aspeed,g4-pinctrl";
-				};
-
-				p2a: p2a-control {
+				p2a: p2a-control@2c {
+					reg = <0x2c 0x4>;
 					compatible = "aspeed,ast2400-p2a-ctrl";
 					status = "disabled";
 				};
+
+				pinctrl: pinctrl@80 {
+					reg = <0x80 0x18>, <0xa0 0x10>;
+					compatible = "aspeed,g4-pinctrl";
+				};
 			};
 
 			rng: hwrng@1e6e2078 {
diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
index a8a593dd2240..92c659c50b4c 100644
--- a/arch/arm/boot/dts/aspeed-g5.dtsi
+++ b/arch/arm/boot/dts/aspeed-g5.dtsi
@@ -210,19 +210,22 @@
 				compatible = "aspeed,ast2500-scu", "syscon", "simple-mfd";
 				reg = <0x1e6e2000 0x1a8>;
 				#address-cells = <1>;
-				#size-cells = <0>;
+				#size-cells = <1>;
+				ranges = <0 0x1e6e2000 0x1000>;
 				#clock-cells = <1>;
 				#reset-cells = <1>;
 
-				pinctrl: pinctrl {
-					compatible = "aspeed,g5-pinctrl";
-					aspeed,external-nodes = <&gfx>, <&lhc>;
-				};
-
-				p2a: p2a-control {
+				p2a: p2a-control@2c {
 					compatible = "aspeed,ast2500-p2a-ctrl";
+					reg = <0x2c 0x4>;
 					status = "disabled";
 				};
+
+				pinctrl: pinctrl@80 {
+					compatible = "aspeed,g5-pinctrl";
+					reg = <0x80 0x18>, <0xa0 0x10>;
+					aspeed,external-nodes = <&gfx>, <&lhc>;
+				};
 			};
 
 			rng: hwrng@1e6e2078 {
-- 
2.20.1


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

* [RFC PATCH 13/17] dt-bindings: ipmi: aspeed: Introduce a v2 binding for KCS
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
                   ` (11 preceding siblings ...)
  2019-07-26  5:39 ` [RFC PATCH 12/17] ARM: dts: aspeed: Add reg hints to syscon children Andrew Jeffery
@ 2019-07-26  5:39 ` Andrew Jeffery
  2019-07-26  5:39 ` [RFC PATCH 14/17] ipmi: kcs: Finish configuring ASPEED KCS device before enable Andrew Jeffery
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel, Haiyue Wang, Corey Minyard,
	openipmi-developer

The v2 binding utilises reg and renames some of the v1 properties.

Cc: Haiyue Wang <haiyue.wang@linux.intel.com>
Cc: Corey Minyard <minyard@acm.org>
Cc: openipmi-developer@lists.sourceforge.net
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 .../bindings/ipmi/aspeed-kcs-bmc.txt          | 20 +++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/ipmi/aspeed-kcs-bmc.txt b/Documentation/devicetree/bindings/ipmi/aspeed-kcs-bmc.txt
index d98a9bf45d6c..76b180ebbde4 100644
--- a/Documentation/devicetree/bindings/ipmi/aspeed-kcs-bmc.txt
+++ b/Documentation/devicetree/bindings/ipmi/aspeed-kcs-bmc.txt
@@ -1,9 +1,10 @@
-* Aspeed KCS (Keyboard Controller Style) IPMI interface
+# Aspeed KCS (Keyboard Controller Style) IPMI interface
 
 The Aspeed SOCs (AST2400 and AST2500) are commonly used as BMCs
 (Baseboard Management Controllers) and the KCS interface can be
 used to perform in-band IPMI communication with their host.
 
+## v1
 Required properties:
 - compatible : should be one of
     "aspeed,ast2400-kcs-bmc"
@@ -12,14 +13,21 @@ Required properties:
 - kcs_chan : The LPC channel number in the controller
 - kcs_addr : The host CPU IO map address
 
+## v2
+Required properties:
+- compatible : should be one of
+    "aspeed,ast2400-kcs-bmc-v2"
+    "aspeed,ast2500-kcs-bmc-v2"
+- reg : The address and size of the IDR, ODR and STR registers
+- interrupts : interrupt generated by the controller
+- slave-reg : The host CPU IO map address
 
 Example:
 
-    kcs3: kcs3@0 {
-        compatible = "aspeed,ast2500-kcs-bmc";
-        reg = <0x0 0x80>;
+    kcs3: kcs@24 {
+        compatible = "aspeed,ast2500-kcs-bmc-v2";
+        reg = <0x24 0x1>, <0x30 0x1>, <0x3c 0x1>;
         interrupts = <8>;
-        kcs_chan = <3>;
-        kcs_addr = <0xCA2>;
+        slave-reg = <0xca2>;
         status = "okay";
     };
-- 
2.20.1


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

* [RFC PATCH 14/17] ipmi: kcs: Finish configuring ASPEED KCS device before enable
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
                   ` (12 preceding siblings ...)
  2019-07-26  5:39 ` [RFC PATCH 13/17] dt-bindings: ipmi: aspeed: Introduce a v2 binding for KCS Andrew Jeffery
@ 2019-07-26  5:39 ` Andrew Jeffery
  2019-07-26 17:04   ` Wang, Haiyue
  2019-07-26  5:39 ` [RFC PATCH 15/17] ipmi: kcs: aspeed: Implement v2 bindings Andrew Jeffery
                   ` (4 subsequent siblings)
  18 siblings, 1 reply; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel, Haiyue Wang, Corey Minyard,
	Arnd Bergmann, Greg Kroah-Hartman, openipmi-developer

The currently interrupts are configured after the channel was enabled.

Cc: Haiyue Wang <haiyue.wang@linux.intel.com>
Cc: Corey Minyard <minyard@acm.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: openipmi-developer@lists.sourceforge.net
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 drivers/char/ipmi/kcs_bmc_aspeed.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/char/ipmi/kcs_bmc_aspeed.c b/drivers/char/ipmi/kcs_bmc_aspeed.c
index 3c955946e647..e3dd09022589 100644
--- a/drivers/char/ipmi/kcs_bmc_aspeed.c
+++ b/drivers/char/ipmi/kcs_bmc_aspeed.c
@@ -268,13 +268,14 @@ static int aspeed_kcs_probe(struct platform_device *pdev)
 	kcs_bmc->io_inputb = aspeed_kcs_inb;
 	kcs_bmc->io_outputb = aspeed_kcs_outb;
 
+	rc = aspeed_kcs_config_irq(kcs_bmc, pdev);
+	if (rc)
+		return rc;
+
 	dev_set_drvdata(dev, kcs_bmc);
 
 	aspeed_kcs_set_address(kcs_bmc, addr);
 	aspeed_kcs_enable_channel(kcs_bmc, true);
-	rc = aspeed_kcs_config_irq(kcs_bmc, pdev);
-	if (rc)
-		return rc;
 
 	rc = misc_register(&kcs_bmc->miscdev);
 	if (rc) {
-- 
2.20.1


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

* [RFC PATCH 15/17] ipmi: kcs: aspeed: Implement v2 bindings
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
                   ` (13 preceding siblings ...)
  2019-07-26  5:39 ` [RFC PATCH 14/17] ipmi: kcs: Finish configuring ASPEED KCS device before enable Andrew Jeffery
@ 2019-07-26  5:39 ` Andrew Jeffery
  2019-07-26 17:30   ` Wang, Haiyue
  2019-07-26  5:39 ` [RFC PATCH 16/17] ARM: dts: aspeed-g5: Change KCS nodes to v2 binding Andrew Jeffery
                   ` (3 subsequent siblings)
  18 siblings, 1 reply; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel, Haiyue Wang, Corey Minyard,
	Arnd Bergmann, Greg Kroah-Hartman, openipmi-developer

The v2 bindings allow us to extract the resources from the devicetree.
The table in the driver is retained to derive the channel index, which
removes the need for kcs_chan property from the v1 bindings. The v2
bindings allow us to reduce the number of warnings generated by the
existing devicetree nodes.

Cc: Haiyue Wang <haiyue.wang@linux.intel.com>
Cc: Corey Minyard <minyard@acm.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: openipmi-developer@lists.sourceforge.net
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 drivers/char/ipmi/kcs_bmc_aspeed.c | 156 +++++++++++++++++++++++------
 1 file changed, 127 insertions(+), 29 deletions(-)

diff --git a/drivers/char/ipmi/kcs_bmc_aspeed.c b/drivers/char/ipmi/kcs_bmc_aspeed.c
index e3dd09022589..509e0d3c6eb1 100644
--- a/drivers/char/ipmi/kcs_bmc_aspeed.c
+++ b/drivers/char/ipmi/kcs_bmc_aspeed.c
@@ -12,6 +12,7 @@
 #include <linux/mfd/syscon.h>
 #include <linux/module.h>
 #include <linux/of.h>
+#include <linux/of_address.h>
 #include <linux/platform_device.h>
 #include <linux/poll.h>
 #include <linux/regmap.h>
@@ -233,38 +234,133 @@ static const struct kcs_ioreg ast_kcs_bmc_ioregs[KCS_CHANNEL_MAX] = {
 	{ .idr = LPC_IDR4, .odr = LPC_ODR4, .str = LPC_STR4 },
 };
 
+static struct kcs_bmc *aspeed_kcs_probe_of_v1(struct platform_device *pdev)
+{
+	struct aspeed_kcs_bmc *priv;
+	struct device_node *np;
+	struct kcs_bmc *kcs;
+	u32 channel;
+	u32 slave;
+	int rc;
+
+	np = pdev->dev.of_node;
+
+	rc = of_property_read_u32(np, "kcs_chan", &channel);
+	if ((rc != 0) || (channel == 0 || channel > KCS_CHANNEL_MAX)) {
+		dev_err(&pdev->dev, "no valid 'kcs_chan' configured\n");
+		return ERR_PTR(-EINVAL);
+	}
+
+	kcs = kcs_bmc_alloc(&pdev->dev, sizeof(struct aspeed_kcs_bmc), channel);
+	if (!kcs)
+		return ERR_PTR(-ENOMEM);
+
+	priv = kcs_bmc_priv(kcs);
+	priv->map = syscon_node_to_regmap(pdev->dev.parent->of_node);
+	if (IS_ERR(priv->map)) {
+		dev_err(&pdev->dev, "Couldn't get regmap\n");
+		return ERR_PTR(-ENODEV);
+	}
+
+	rc = of_property_read_u32(np, "kcs_addr", &slave);
+	if (rc) {
+		dev_err(&pdev->dev, "no valid 'kcs_addr' configured\n");
+		return ERR_PTR(-EINVAL);
+	}
+
+	kcs->ioreg = ast_kcs_bmc_ioregs[channel - 1];
+	aspeed_kcs_set_address(kcs, slave);
+
+	return 0;
+}
+
+static int aspeed_kcs_calculate_channel(const struct kcs_ioreg *regs)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(ast_kcs_bmc_ioregs); i++) {
+		if (!memcmp(&ast_kcs_bmc_ioregs[i], regs, sizeof(*regs)))
+			return i + 1;
+	}
+
+	return -EINVAL;
+}
+
+static struct kcs_bmc *aspeed_kcs_probe_of_v2(struct platform_device *pdev)
+{
+	struct aspeed_kcs_bmc *priv;
+	struct device_node *np;
+	struct kcs_ioreg ioreg;
+	struct kcs_bmc *kcs;
+	const __be32 *reg;
+	int channel;
+	u32 slave;
+	int rc;
+
+	np = pdev->dev.of_node;
+
+	/* Don't translate addresses, we want offsets for the regmaps */
+	reg = of_get_address(np, 0, NULL, NULL);
+	if (!reg)
+		return ERR_PTR(-EINVAL);
+	ioreg.idr = be32_to_cpup(reg);
+
+	reg = of_get_address(np, 1, NULL, NULL);
+	if (!reg)
+		return ERR_PTR(-EINVAL);
+	ioreg.odr = be32_to_cpup(reg);
+
+	reg = of_get_address(np, 2, NULL, NULL);
+	if (!reg)
+		return ERR_PTR(-EINVAL);
+	ioreg.str = be32_to_cpup(reg);
+
+	channel = aspeed_kcs_calculate_channel(&ioreg);
+	if (channel < 0)
+		return ERR_PTR(channel);
+
+	kcs = kcs_bmc_alloc(&pdev->dev, sizeof(struct aspeed_kcs_bmc), channel);
+	if (!kcs)
+		return ERR_PTR(-ENOMEM);
+
+	kcs->ioreg = ioreg;
+
+	priv = kcs_bmc_priv(kcs);
+	priv->map = syscon_node_to_regmap(pdev->dev.parent->of_node);
+	if (IS_ERR(priv->map)) {
+		dev_err(&pdev->dev, "Couldn't get regmap\n");
+		return ERR_PTR(-ENODEV);
+	}
+
+	rc = of_property_read_u32(np, "slave-reg", &slave);
+	if (rc)
+		return ERR_PTR(rc);
+
+	aspeed_kcs_set_address(kcs, slave);
+
+	return kcs;
+}
+
 static int aspeed_kcs_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct aspeed_kcs_bmc *priv;
 	struct kcs_bmc *kcs_bmc;
-	u32 chan, addr;
+	struct device_node *np;
 	int rc;
 
-	rc = of_property_read_u32(dev->of_node, "kcs_chan", &chan);
-	if ((rc != 0) || (chan == 0 || chan > KCS_CHANNEL_MAX)) {
-		dev_err(dev, "no valid 'kcs_chan' configured\n");
-		return -ENODEV;
-	}
+	np = pdev->dev.of_node;
+	if (of_device_is_compatible(np, "aspeed,ast2400-kcs-bmc") ||
+			of_device_is_compatible(np, "aspeed,ast2500-kcs-bmc"))
+		kcs_bmc = aspeed_kcs_probe_of_v1(pdev);
+	else if (of_device_is_compatible(np, "aspeed,ast2400-kcs-bmc-v2") ||
+			of_device_is_compatible(np, "aspeed,ast2500-kcs-bmc-v2"))
+		kcs_bmc = aspeed_kcs_probe_of_v2(pdev);
+	else
+		return -EINVAL;
+
+	if (IS_ERR(kcs_bmc))
+		return PTR_ERR(kcs_bmc);
 
-	rc = of_property_read_u32(dev->of_node, "kcs_addr", &addr);
-	if (rc) {
-		dev_err(dev, "no valid 'kcs_addr' configured\n");
-		return -ENODEV;
-	}
-
-	kcs_bmc = kcs_bmc_alloc(dev, sizeof(*priv), chan);
-	if (!kcs_bmc)
-		return -ENOMEM;
-
-	priv = kcs_bmc_priv(kcs_bmc);
-	priv->map = syscon_node_to_regmap(dev->parent->of_node);
-	if (IS_ERR(priv->map)) {
-		dev_err(dev, "Couldn't get regmap\n");
-		return -ENODEV;
-	}
-
-	kcs_bmc->ioreg = ast_kcs_bmc_ioregs[chan - 1];
 	kcs_bmc->io_inputb = aspeed_kcs_inb;
 	kcs_bmc->io_outputb = aspeed_kcs_outb;
 
@@ -274,7 +370,6 @@ static int aspeed_kcs_probe(struct platform_device *pdev)
 
 	dev_set_drvdata(dev, kcs_bmc);
 
-	aspeed_kcs_set_address(kcs_bmc, addr);
 	aspeed_kcs_enable_channel(kcs_bmc, true);
 
 	rc = misc_register(&kcs_bmc->miscdev);
@@ -283,9 +378,10 @@ static int aspeed_kcs_probe(struct platform_device *pdev)
 		return rc;
 	}
 
-	pr_info("channel=%u addr=0x%x idr=0x%x odr=0x%x str=0x%x\n",
-		chan, addr,
-		kcs_bmc->ioreg.idr, kcs_bmc->ioreg.odr, kcs_bmc->ioreg.str);
+	dev_dbg(&pdev->dev,
+		"Probed KCS device %d (IDR=0x%x, ODR=0x%x, STR=0x%x)\n",
+		kcs_bmc->channel, kcs_bmc->ioreg.idr, kcs_bmc->ioreg.odr,
+		kcs_bmc->ioreg.str);
 
 	return 0;
 }
@@ -302,6 +398,8 @@ static int aspeed_kcs_remove(struct platform_device *pdev)
 static const struct of_device_id ast_kcs_bmc_match[] = {
 	{ .compatible = "aspeed,ast2400-kcs-bmc" },
 	{ .compatible = "aspeed,ast2500-kcs-bmc" },
+	{ .compatible = "aspeed,ast2400-kcs-bmc-v2" },
+	{ .compatible = "aspeed,ast2500-kcs-bmc-v2" },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, ast_kcs_bmc_match);
-- 
2.20.1


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

* [RFC PATCH 16/17] ARM: dts: aspeed-g5: Change KCS nodes to v2 binding
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
                   ` (14 preceding siblings ...)
  2019-07-26  5:39 ` [RFC PATCH 15/17] ipmi: kcs: aspeed: Implement v2 bindings Andrew Jeffery
@ 2019-07-26  5:39 ` Andrew Jeffery
  2019-07-26  5:39 ` [RFC PATCH 17/17] ARM: dts: aspeed-g5: Sort LPC child nodes by unit address Andrew Jeffery
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel, Haiyue Wang

Fixes the following warnings:

    arch/arm/boot/dts/aspeed-g5.dtsi:376.19-381.8: Warning (unit_address_vs_reg): /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs1@0: node has a unit name, but no reg property
    arch/arm/boot/dts/aspeed-g5.dtsi:382.19-387.8: Warning (unit_address_vs_reg): /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs2@0: node has a unit name, but no reg property
    arch/arm/boot/dts/aspeed-g5.dtsi:388.19-393.8: Warning (unit_address_vs_reg): /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs3@0: node has a unit name, but no reg property
    arch/arm/boot/dts/aspeed-g5.dtsi:405.19-410.8: Warning (unit_address_vs_reg): /ahb/apb/lpc@1e789000/lpc-host@80/kcs4@0: node has a unit name, but no reg property
    arch/arm/boot/dts/aspeed-g5.dtsi:376.19-381.8: Warning (unique_unit_address): /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs1@0: duplicate unit-address (also used in node /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs2@0)
    arch/arm/boot/dts/aspeed-g5.dtsi:376.19-381.8: Warning (unique_unit_address): /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs1@0: duplicate unit-address (also used in node /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs3@0)
    arch/arm/boot/dts/aspeed-g5.dtsi:382.19-387.8: Warning (unique_unit_address): /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs2@0: duplicate unit-address (also used in node /ahb/apb/lpc@1e789000/lpc-bmc@0/kcs3@0)
    arch/arm/boot/dts/aspeed-g5.dtsi:405.19-410.8: Warning (unique_unit_address): /ahb/apb/lpc@1e789000/lpc-host@80/kcs4@0: duplicate unit-address (also used in node /ahb/apb/lpc@1e789000/lpc-host@80/lpc-ctrl@0)

Cc: Haiyue Wang <haiyue.wang@linux.intel.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 arch/arm/boot/dts/aspeed-g5.dtsi | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
index 92c659c50b4c..50ba58dc5093 100644
--- a/arch/arm/boot/dts/aspeed-g5.dtsi
+++ b/arch/arm/boot/dts/aspeed-g5.dtsi
@@ -373,22 +373,22 @@
 					#size-cells = <1>;
 					ranges = <0x0 0x0 0x80>;
 
-					kcs1: kcs1@0 {
-						compatible = "aspeed,ast2500-kcs-bmc";
+					kcs1: kcs@24 {
+						compatible = "aspeed,ast2500-kcs-bmc-v2";
+						reg = <0x24 0x1>, <0x30 0x1>, <0x3c 0x1>;
 						interrupts = <8>;
-						kcs_chan = <1>;
 						status = "disabled";
 					};
-					kcs2: kcs2@0 {
-						compatible = "aspeed,ast2500-kcs-bmc";
+					kcs2: kcs@28 {
+						compatible = "aspeed,ast2500-kcs-bmc-v2";
+						reg = <0x28 0x1>, <0x34 0x1>, <0x40 0x1>;
 						interrupts = <8>;
-						kcs_chan = <2>;
 						status = "disabled";
 					};
-					kcs3: kcs3@0 {
-						compatible = "aspeed,ast2500-kcs-bmc";
+					kcs3: kcs@2c {
+						compatible = "aspeed,ast2500-kcs-bmc-v2";
+						reg = <0x2c 0x1>, <0x38 0x1>, <0x44 0x1>;
 						interrupts = <8>;
-						kcs_chan = <3>;
 						status = "disabled";
 					};
 				};
@@ -402,10 +402,10 @@
 					#size-cells = <1>;
 					ranges = <0x0 0x80 0x1e0>;
 
-					kcs4: kcs4@0 {
-						compatible = "aspeed,ast2500-kcs-bmc";
+					kcs4: kcs@94 {
+						compatible = "aspeed,ast2500-kcs-bmc-v2";
+						reg = <0x94 0x1>, <0x98 0x1>, <0x9c 0x1>;
 						interrupts = <8>;
-						kcs_chan = <4>;
 						status = "disabled";
 					};
 
-- 
2.20.1


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

* [RFC PATCH 17/17] ARM: dts: aspeed-g5: Sort LPC child nodes by unit address
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
                   ` (15 preceding siblings ...)
  2019-07-26  5:39 ` [RFC PATCH 16/17] ARM: dts: aspeed-g5: Change KCS nodes to v2 binding Andrew Jeffery
@ 2019-07-26  5:39 ` Andrew Jeffery
  2019-07-29 21:55 ` [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Linus Walleij
  2019-07-30  0:53 ` Rob Herring
  18 siblings, 0 replies; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-26  5:39 UTC (permalink / raw)
  To: linux-aspeed
  Cc: Andrew Jeffery, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel

Lets try to maintain some sort of sanity.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
---
 arch/arm/boot/dts/aspeed-g5.dtsi | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
index 50ba58dc5093..99d2995a43db 100644
--- a/arch/arm/boot/dts/aspeed-g5.dtsi
+++ b/arch/arm/boot/dts/aspeed-g5.dtsi
@@ -423,17 +423,18 @@
 						status = "disabled";
 					};
 
-					lhc: lhc@20 {
-						compatible = "aspeed,ast2500-lhc";
-						reg = <0x20 0x24 0x48 0x8>;
-					};
-
 					lpc_reset: reset-controller@18 {
 						compatible = "aspeed,ast2500-lpc-reset";
 						reg = <0x18 0x4>;
 						#reset-cells = <1>;
 					};
 
+					lhc: lhc@20 {
+						compatible = "aspeed,ast2500-lhc";
+						reg = <0x20 0x24 0x48 0x8>;
+					};
+
+
 					ibt: ibt@c0 {
 						compatible = "aspeed,ast2500-ibt-bmc";
 						reg = <0xc0 0x18>;
-- 
2.20.1


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

* Re: [PATCH 04/17] ARM: dts: vesnin: Add unit address for memory node
  2019-07-26  5:39 ` [PATCH 04/17] ARM: dts: vesnin: Add unit address for memory node Andrew Jeffery
@ 2019-07-26  7:56   ` Alexander A. Filippov
  0 siblings, 0 replies; 30+ messages in thread
From: Alexander A. Filippov @ 2019-07-26  7:56 UTC (permalink / raw)
  To: Andrew Jeffery
  Cc: linux-aspeed, robh+dt, mark.rutland, joel, devicetree,
	linux-arm-kernel, linux-kernel, Alexander Filippov

On Fri, Jul 26, 2019 at 03:09:46PM +0930, Andrew Jeffery wrote:
> Fixes the following warnings:
> 
>     arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dt.yaml: /: memory: False schema does not allow {'reg': [[1073741824, 536870912]]}
>     arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dt.yaml: memory: 'device_type' is a required property
> 
> Cc: Alexander Filippov <a.filippov@yadro.com>
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> ---
>  arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts b/arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts
> index 0b9e29c3212e..81d9dcb752a0 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts
> @@ -14,7 +14,7 @@
>  		bootargs = "console=ttyS4,115200 earlyprintk";
>  	};
>  
> -	memory {
> +	memory@40000000 {
>  		reg = <0x40000000 0x20000000>;
>  	};
>  
> -- 
> 2.20.1
> 

Tested-by: Alexander Filippov <a.filippov@yadro.com>

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

* Re: [RFC PATCH 14/17] ipmi: kcs: Finish configuring ASPEED KCS device before enable
  2019-07-26  5:39 ` [RFC PATCH 14/17] ipmi: kcs: Finish configuring ASPEED KCS device before enable Andrew Jeffery
@ 2019-07-26 17:04   ` Wang, Haiyue
  2019-07-26 17:24     ` Wang, Haiyue
  0 siblings, 1 reply; 30+ messages in thread
From: Wang, Haiyue @ 2019-07-26 17:04 UTC (permalink / raw)
  To: Andrew Jeffery, linux-aspeed
  Cc: robh+dt, mark.rutland, joel, devicetree, linux-arm-kernel,
	linux-kernel, Corey Minyard, Arnd Bergmann, Greg Kroah-Hartman,
	openipmi-developer

在 2019-07-26 13:39, Andrew Jeffery 写道:
> The currently interrupts are configured after the channel was enabled.
>
> Cc: Haiyue Wang<haiyue.wang@linux.intel.com>
> Cc: Corey Minyard<minyard@acm.org>
> Cc: Arnd Bergmann<arnd@arndb.de>
> Cc: Greg Kroah-Hartman<gregkh@linuxfoundation.org>
> Cc:openipmi-developer@lists.sourceforge.net
> Signed-off-by: Andrew Jeffery<andrew@aj.id.au>
> ---
>   drivers/char/ipmi/kcs_bmc_aspeed.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/char/ipmi/kcs_bmc_aspeed.c b/drivers/char/ipmi/kcs_bmc_aspeed.c
> index 3c955946e647..e3dd09022589 100644
> --- a/drivers/char/ipmi/kcs_bmc_aspeed.c
> +++ b/drivers/char/ipmi/kcs_bmc_aspeed.c
> @@ -268,13 +268,14 @@ static int aspeed_kcs_probe(struct platform_device *pdev)
>   	kcs_bmc->io_inputb = aspeed_kcs_inb;
>   	kcs_bmc->io_outputb = aspeed_kcs_outb;
>   
> +	rc = aspeed_kcs_config_irq(kcs_bmc, pdev);
> +	if (rc)
> +		return rc;
> +
>   	dev_set_drvdata(dev, kcs_bmc);


Thanks for catching this, for not miss the data.


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

* Re: [RFC PATCH 14/17] ipmi: kcs: Finish configuring ASPEED KCS device before enable
  2019-07-26 17:04   ` Wang, Haiyue
@ 2019-07-26 17:24     ` Wang, Haiyue
  0 siblings, 0 replies; 30+ messages in thread
From: Wang, Haiyue @ 2019-07-26 17:24 UTC (permalink / raw)
  To: Andrew Jeffery, linux-aspeed
  Cc: robh+dt, mark.rutland, joel, devicetree, linux-arm-kernel,
	linux-kernel, Corey Minyard, Arnd Bergmann, Greg Kroah-Hartman,
	openipmi-developer


在 2019-07-27 01:04, Wang, Haiyue 写道:
> 在 2019-07-26 13:39, Andrew Jeffery 写道:
>> The currently interrupts are configured after the channel was enabled.
>>
>> Cc: Haiyue Wang<haiyue.wang@linux.intel.com>
>> Cc: Corey Minyard<minyard@acm.org>
>> Cc: Arnd Bergmann<arnd@arndb.de>
>> Cc: Greg Kroah-Hartman<gregkh@linuxfoundation.org>
>> Cc:openipmi-developer@lists.sourceforge.net
>> Signed-off-by: Andrew Jeffery<andrew@aj.id.au>
>> ---
>>   drivers/char/ipmi/kcs_bmc_aspeed.c | 7 ++++---
>>   1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/char/ipmi/kcs_bmc_aspeed.c 
>> b/drivers/char/ipmi/kcs_bmc_aspeed.c
>> index 3c955946e647..e3dd09022589 100644
>> --- a/drivers/char/ipmi/kcs_bmc_aspeed.c
>> +++ b/drivers/char/ipmi/kcs_bmc_aspeed.c
>> @@ -268,13 +268,14 @@ static int aspeed_kcs_probe(struct 
>> platform_device *pdev)
>>       kcs_bmc->io_inputb = aspeed_kcs_inb;
>>       kcs_bmc->io_outputb = aspeed_kcs_outb;
>>   +    rc = aspeed_kcs_config_irq(kcs_bmc, pdev);
>> +    if (rc)
>> +        return rc;
>> +
>>       dev_set_drvdata(dev, kcs_bmc);
>
>
> Thanks for catching this, for not miss the data.
>
Reviewed-by: Haiyue Wang <haiyue.wang@linux.intel.com>

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

* Re: [RFC PATCH 15/17] ipmi: kcs: aspeed: Implement v2 bindings
  2019-07-26  5:39 ` [RFC PATCH 15/17] ipmi: kcs: aspeed: Implement v2 bindings Andrew Jeffery
@ 2019-07-26 17:30   ` Wang, Haiyue
  0 siblings, 0 replies; 30+ messages in thread
From: Wang, Haiyue @ 2019-07-26 17:30 UTC (permalink / raw)
  To: Andrew Jeffery, linux-aspeed
  Cc: robh+dt, mark.rutland, joel, devicetree, linux-arm-kernel,
	linux-kernel, Corey Minyard, Arnd Bergmann, Greg Kroah-Hartman,
	openipmi-developer


在 2019-07-26 13:39, Andrew Jeffery 写道:
> The v2 bindings allow us to extract the resources from the devicetree.
> The table in the driver is retained to derive the channel index, which
> removes the need for kcs_chan property from the v1 bindings. The v2
> bindings allow us to reduce the number of warnings generated by the
> existing devicetree nodes.
>
> Cc: Haiyue Wang<haiyue.wang@linux.intel.com>
> Cc: Corey Minyard<minyard@acm.org>
> Cc: Arnd Bergmann<arnd@arndb.de>
> Cc: Greg Kroah-Hartman<gregkh@linuxfoundation.org>
> Cc:openipmi-developer@lists.sourceforge.net
> Signed-off-by: Andrew Jeffery<andrew@aj.id.au>
> ---
>   drivers/char/ipmi/kcs_bmc_aspeed.c | 156 +++++++++++++++++++++++------
>   1 file changed, 127 insertions(+), 29 deletions(-)

Looks good, thanks for the hard work, the code is more clean! :)

Reviewed-by: Haiyue Wang <haiyue.wang@linux.intel.com>


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

* Re: [PATCH 01/17] ARM: dts: aspeed-g5: Move EDAC node to APB
  2019-07-26  5:39 ` [PATCH 01/17] ARM: dts: aspeed-g5: Move EDAC node to APB Andrew Jeffery
@ 2019-07-29 17:26   ` Stefan Schaeckeler (sschaeck)
  0 siblings, 0 replies; 30+ messages in thread
From: Stefan Schaeckeler (sschaeck) @ 2019-07-29 17:26 UTC (permalink / raw)
  To: Andrew Jeffery, linux-aspeed
  Cc: robh+dt, mark.rutland, joel, devicetree, linux-arm-kernel, linux-kernel

On Thursday, July 25, 2019 at 10:40 PM, Andrew Jeffery wrote:

> Previously the register interface was not attached to any internal bus,
> which is not correct - it lives on the APB.
>
> Cc: Stefan M Schaeckeler <sschaeck@cisco.com>
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> ---
>  arch/arm/boot/dts/aspeed-g5.dtsi | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)

Reviewed-by: Stefan Schaeckeler <sschaeck@cisco.com>



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

* Re: [PATCH 02/17] ARM: dts: aspeed-g5: Use recommended generic node name for SDMC
  2019-07-26  5:39 ` [PATCH 02/17] ARM: dts: aspeed-g5: Use recommended generic node name for SDMC Andrew Jeffery
@ 2019-07-29 17:29   ` Stefan Schaeckeler (sschaeck)
  0 siblings, 0 replies; 30+ messages in thread
From: Stefan Schaeckeler (sschaeck) @ 2019-07-29 17:29 UTC (permalink / raw)
  To: Andrew Jeffery, linux-aspeed
  Cc: robh+dt, mark.rutland, joel, devicetree, linux-arm-kernel, linux-kernel

On Thursday, July 25, 2019 at 10:40 PM, Andrew Jeffery wrote:

> The EDAC is a sub-function of the SDRAM Memory Controller. Rename the
> node to the appropriate generic node name.
>
> Cc: Stefan M Schaeckeler <sschaeck@cisco.com>
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> ---
>  arch/arm/boot/dts/aspeed-g5.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
    
Reviewed-by: Stefan Schaeckeler <sschaeck@cisco.com>    


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

* Re: [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
                   ` (16 preceding siblings ...)
  2019-07-26  5:39 ` [RFC PATCH 17/17] ARM: dts: aspeed-g5: Sort LPC child nodes by unit address Andrew Jeffery
@ 2019-07-29 21:55 ` Linus Walleij
  2019-07-30  0:49   ` Andrew Jeffery
  2019-07-30  0:53 ` Rob Herring
  18 siblings, 1 reply; 30+ messages in thread
From: Linus Walleij @ 2019-07-29 21:55 UTC (permalink / raw)
  To: Andrew Jeffery
  Cc: linux-aspeed, Rob Herring, Mark Rutland, Joel Stanley,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux ARM, linux-kernel, anoo, a.filippov, Arnd Bergmann,
	yang.brianc.w, Corey Minyard, Greg KH, haiyue.wang, wangzqbj,
	chen.kenyy, open list:GPIO SUBSYSTEM, openipmi-developer,
	Patrick Venture, sschaeck, Tao Ren, xow, yao.yuan

On Fri, Jul 26, 2019 at 7:40 AM Andrew Jeffery <andrew@aj.id.au> wrote:

> The aim of this series is to minimise/eliminate all the warnings from the
> ASPEED devicetrees. It mostly achieves its goal, as outlined below.

I suppose it will all be merged in  the Aspeed tree?
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings
  2019-07-29 21:55 ` [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Linus Walleij
@ 2019-07-30  0:49   ` Andrew Jeffery
  0 siblings, 0 replies; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-30  0:49 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-aspeed, Rob Herring, Mark Rutland, Joel Stanley,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux ARM, linux-kernel, Adriana Kobylak, Alexander A. Filippov,
	Arnd Bergmann, YangBrianC.W 楊嘉偉 TAO,
	Corey Minyard, Greg Kroah-Hartman, Haiyue Wang, John Wang,
	Ken Chen, open list:GPIO SUBSYSTEM, openipmi-developer,
	Patrick Venture, Stefan M Schaeckeler, Tao Ren, Xo Wang,
	yao.yuan



On Tue, 30 Jul 2019, at 07:25, Linus Walleij wrote:
> On Fri, Jul 26, 2019 at 7:40 AM Andrew Jeffery <andrew@aj.id.au> wrote:
> 
> > The aim of this series is to minimise/eliminate all the warnings from the
> > ASPEED devicetrees. It mostly achieves its goal, as outlined below.
> 
> I suppose it will all be merged in  the Aspeed tree?
> Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yeah, if you're happy for that. Thanks.

Andrew

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

* Re: [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings
  2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
                   ` (17 preceding siblings ...)
  2019-07-29 21:55 ` [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Linus Walleij
@ 2019-07-30  0:53 ` Rob Herring
  2019-07-30  1:09   ` Andrew Jeffery
  18 siblings, 1 reply; 30+ messages in thread
From: Rob Herring @ 2019-07-30  0:53 UTC (permalink / raw)
  To: Andrew Jeffery
  Cc: linux-aspeed, Mark Rutland, Joel Stanley, devicetree,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel, anoo, a.filippov, Arnd Bergmann, yang.brianc.w,
	Corey Minyard, Greg Kroah-Hartman, Haiyue Wang, wangzqbj,
	Ken Chen, Linus Walleij, open list:GPIO SUBSYSTEM,
	openipmi-developer, Patrick Venture, Stefan M Schaeckeler,
	taoren, Xo Wang, yao.yuan

On Thu, Jul 25, 2019 at 11:40 PM Andrew Jeffery <andrew@aj.id.au> wrote:
>
> Hello,
>
> The aim of this series is to minimise/eliminate all the warnings from the
> ASPEED devicetrees. It mostly achieves its goal, as outlined below.
>
> Using `aspeed_g5_defconfig` we started with the follow warning count:
>
>     $ make dtbs 2>&1 >/dev/null | wc -l
>     218
>
> and after the full series is applied we have:
>
>     $ make dtbs 2>&1 >/dev/null | wc -l
>     2
>
> for a 100x reduction.
>
> Getting there though isn't without some potential controversy, which I've saved
> for the last half of the series. The following patches I think are in pretty
> good shape:
>
>   ARM: dts: aspeed-g5: Move EDAC node to APB
>   ARM: dts: aspeed-g5: Use recommended generic node name for SDMC
>   ARM: dts: aspeed-g5: Fix aspeed,external-nodes description
>   ARM: dts: vesnin: Add unit address for memory node
>   ARM: dts: fp5280g2: Cleanup gpio-keys-polled properties
>   ARM: dts: swift: Cleanup gpio-keys-polled properties
>   ARM: dts: witherspoon: Cleanup gpio-keys-polled properties
>   ARM: dts: aspeed: Cleanup lpc-ctrl and snoop regs
>   ARM: dts: ibm-power9-dual: Add a unit address for OCC nodes
>
> With these patches applied we get to:
>
>     $ make dtbs 2>&1 >/dev/null | wc -l
>     144
>
> So they make a dent, but fail to clean up the bulk of the issues. From here
> I've mixed in some binding and driver changes with subsequent updates to the
> devicetrees:
>
>   dt-bindings: pinctrl: aspeed: Add reg property as a hint
>   dt-bindings: misc: Document reg for aspeed,p2a-ctrl nodes
>   ARM: dts: aspeed: Add reg hints to syscon children
>   dt-bindings: ipmi: aspeed: Introduce a v2 binding for KCS
>   ipmi: kcs: Finish configuring ASPEED KCS device before enable
>   ipmi: kcs: aspeed: Implement v2 bindings
>   ARM: dts: aspeed-g5: Change KCS nodes to v2 binding
>   ARM: dts: aspeed-g5: Sort LPC child nodes by unit address
>
> By `dt-bindings: ipmi: aspeed: Introduce a v2 binding for KCS` the warnings are
> reduced to:
>
>     $ make dtbs 2>&1 >/dev/null | wc -l
>     125
>
> The bang-for-buck is in fixing up the KCS bindings which removes all-but-two of
> the remaining warnings (which we can't feasibly remove), but doing so forces
> code changes (which I'd avoided up until this point).
>
> Reflecting broadly on the fixes, I think I've made a mistake way back by using
> syscon/simple-mfds to expose the innards of the SCU and LPC controllers in the
> devicetree. This series cleans up what's currently there, but I have half a
> mind to rev the SCU and LPC bindings to not use simple-mfd and instead have a
> driver implementation that uses `platform_device_register_full()` or similar to
> deal with the mess.
>
> Rob - I'm looking for your thoughts here and on the series, I've never felt
> entirely comfortable with what I cooked up. Your advice would be appreciated.

The series generally looks fine to me from a quick scan. As far as
dropping 'simple-mfd', having less fine grained description in DT is
generally my preference. It comes down to whether what you have
defined is maintainable. As most of it is just additions, I think what
you have is fine. Maybe keep all this in mind for the next chip
depending how the SCU and LPC change.

Rob

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

* Re: [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings
  2019-07-30  0:53 ` Rob Herring
@ 2019-07-30  1:09   ` Andrew Jeffery
  2019-08-02  5:51     ` Joel Stanley
  0 siblings, 1 reply; 30+ messages in thread
From: Andrew Jeffery @ 2019-07-30  1:09 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-aspeed, Mark Rutland, Joel Stanley, devicetree,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel, Adriana Kobylak, Alexander A. Filippov,
	Arnd Bergmann, YangBrianC.W 楊嘉偉 TAO,
	Corey Minyard, Greg Kroah-Hartman, Haiyue Wang, John Wang,
	Ken Chen, Linus Walleij, open list:GPIO SUBSYSTEM,
	openipmi-developer, Patrick Venture, Stefan M Schaeckeler,
	Tao Ren, Xo Wang, yao.yuan



On Tue, 30 Jul 2019, at 10:23, Rob Herring wrote:
> On Thu, Jul 25, 2019 at 11:40 PM Andrew Jeffery <andrew@aj.id.au> wrote:
> >
> > Hello,
> >
> > The aim of this series is to minimise/eliminate all the warnings from the
> > ASPEED devicetrees. It mostly achieves its goal, as outlined below.
> >
> > Using `aspeed_g5_defconfig` we started with the follow warning count:
> >
> >     $ make dtbs 2>&1 >/dev/null | wc -l
> >     218
> >
> > and after the full series is applied we have:
> >
> >     $ make dtbs 2>&1 >/dev/null | wc -l
> >     2
> >
> > for a 100x reduction.
> >
> > Getting there though isn't without some potential controversy, which I've saved
> > for the last half of the series. The following patches I think are in pretty
> > good shape:
> >
> >   ARM: dts: aspeed-g5: Move EDAC node to APB
> >   ARM: dts: aspeed-g5: Use recommended generic node name for SDMC
> >   ARM: dts: aspeed-g5: Fix aspeed,external-nodes description
> >   ARM: dts: vesnin: Add unit address for memory node
> >   ARM: dts: fp5280g2: Cleanup gpio-keys-polled properties
> >   ARM: dts: swift: Cleanup gpio-keys-polled properties
> >   ARM: dts: witherspoon: Cleanup gpio-keys-polled properties
> >   ARM: dts: aspeed: Cleanup lpc-ctrl and snoop regs
> >   ARM: dts: ibm-power9-dual: Add a unit address for OCC nodes
> >
> > With these patches applied we get to:
> >
> >     $ make dtbs 2>&1 >/dev/null | wc -l
> >     144
> >
> > So they make a dent, but fail to clean up the bulk of the issues. From here
> > I've mixed in some binding and driver changes with subsequent updates to the
> > devicetrees:
> >
> >   dt-bindings: pinctrl: aspeed: Add reg property as a hint
> >   dt-bindings: misc: Document reg for aspeed,p2a-ctrl nodes
> >   ARM: dts: aspeed: Add reg hints to syscon children
> >   dt-bindings: ipmi: aspeed: Introduce a v2 binding for KCS
> >   ipmi: kcs: Finish configuring ASPEED KCS device before enable
> >   ipmi: kcs: aspeed: Implement v2 bindings
> >   ARM: dts: aspeed-g5: Change KCS nodes to v2 binding
> >   ARM: dts: aspeed-g5: Sort LPC child nodes by unit address
> >
> > By `dt-bindings: ipmi: aspeed: Introduce a v2 binding for KCS` the warnings are
> > reduced to:
> >
> >     $ make dtbs 2>&1 >/dev/null | wc -l
> >     125
> >
> > The bang-for-buck is in fixing up the KCS bindings which removes all-but-two of
> > the remaining warnings (which we can't feasibly remove), but doing so forces
> > code changes (which I'd avoided up until this point).
> >
> > Reflecting broadly on the fixes, I think I've made a mistake way back by using
> > syscon/simple-mfds to expose the innards of the SCU and LPC controllers in the
> > devicetree. This series cleans up what's currently there, but I have half a
> > mind to rev the SCU and LPC bindings to not use simple-mfd and instead have a
> > driver implementation that uses `platform_device_register_full()` or similar to
> > deal with the mess.
> >
> > Rob - I'm looking for your thoughts here and on the series, I've never felt
> > entirely comfortable with what I cooked up. Your advice would be appreciated.
> 
> The series generally looks fine to me from a quick scan. As far as
> dropping 'simple-mfd', having less fine grained description in DT is
> generally my preference. It comes down to whether what you have
> defined is maintainable. As most of it is just additions, I think what
> you have is fine. Maybe keep all this in mind for the next chip
> depending how the SCU and LPC change.

Okay, I think the timing of that suggestion is good given where things are with
the AST2600. I'll keep that in mind.

Consensus so far seems to be that the series is fine. I'll split it up and send out
the sub-series to the relevant lists with the acks accumulated here.

Thanks all for taking a look.

Andrew

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

* Re: [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings
  2019-07-30  1:09   ` Andrew Jeffery
@ 2019-08-02  5:51     ` Joel Stanley
  2019-08-05  0:48       ` Andrew Jeffery
  0 siblings, 1 reply; 30+ messages in thread
From: Joel Stanley @ 2019-08-02  5:51 UTC (permalink / raw)
  To: Andrew Jeffery
  Cc: Rob Herring, linux-aspeed, Mark Rutland, devicetree,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel, Adriana Kobylak, Alexander A. Filippov,
	Arnd Bergmann, YangBrianC.W 楊嘉偉 TAO,
	Corey Minyard, Greg Kroah-Hartman, Haiyue Wang, John Wang,
	Ken Chen, Linus Walleij, open list:GPIO SUBSYSTEM,
	openipmi-developer, Patrick Venture, Stefan M Schaeckeler,
	Tao Ren, Xo Wang, yao.yuan

On Tue, 30 Jul 2019 at 01:09, Andrew Jeffery <andrew@aj.id.au> wrote:

> > > The bang-for-buck is in fixing up the KCS bindings which removes all-but-two of
> > > the remaining warnings (which we can't feasibly remove), but doing so forces
> > > code changes (which I'd avoided up until this point).
> > >
> > > Reflecting broadly on the fixes, I think I've made a mistake way back by using
> > > syscon/simple-mfds to expose the innards of the SCU and LPC controllers in the
> > > devicetree. This series cleans up what's currently there, but I have half a
> > > mind to rev the SCU and LPC bindings to not use simple-mfd and instead have a
> > > driver implementation that uses `platform_device_register_full()` or similar to
> > > deal with the mess.
> > >
> > > Rob - I'm looking for your thoughts here and on the series, I've never felt
> > > entirely comfortable with what I cooked up. Your advice would be appreciated.
> >
> > The series generally looks fine to me from a quick scan. As far as
> > dropping 'simple-mfd', having less fine grained description in DT is
> > generally my preference. It comes down to whether what you have
> > defined is maintainable. As most of it is just additions, I think what
> > you have is fine. Maybe keep all this in mind for the next chip
> > depending how the SCU and LPC change.
>
> Okay, I think the timing of that suggestion is good given where things are with
> the AST2600. I'll keep that in mind.
>
> Consensus so far seems to be that the series is fine. I'll split it up and send out
> the sub-series to the relevant lists with the acks accumulated here.

The series look good. I suggest posting the KCS bindings and driver
changes as their own series to go through the IPMI tree.

Please add my tag to all the patches except the OCC one, which I need
to do some investigation in to.

Reviewed-by: Joel Stanley <joel@jms.id.au>

The others can go via the aspeed tree. Perhaps post them as their own
series too so I don't get confused and apply the wrong ones. That way
if Rob wants to send his reviewed-by he can.

Cheers,

Joel

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

* Re: [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings
  2019-08-02  5:51     ` Joel Stanley
@ 2019-08-05  0:48       ` Andrew Jeffery
  0 siblings, 0 replies; 30+ messages in thread
From: Andrew Jeffery @ 2019-08-05  0:48 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Rob Herring, linux-aspeed, Mark Rutland, devicetree,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	linux-kernel, Adriana Kobylak, Alexander A. Filippov,
	Arnd Bergmann, YangBrianC.W 楊嘉偉 TAO,
	Corey Minyard, Greg Kroah-Hartman, Haiyue Wang, John Wang,
	Ken Chen, Linus Walleij, open list:GPIO SUBSYSTEM,
	openipmi-developer, Patrick Venture, Stefan M Schaeckeler,
	Tao Ren, Xo Wang, yao.yuan



On Fri, 2 Aug 2019, at 15:21, Joel Stanley wrote:
> On Tue, 30 Jul 2019 at 01:09, Andrew Jeffery <andrew@aj.id.au> wrote:
> 
> > > > The bang-for-buck is in fixing up the KCS bindings which removes all-but-two of
> > > > the remaining warnings (which we can't feasibly remove), but doing so forces
> > > > code changes (which I'd avoided up until this point).
> > > >
> > > > Reflecting broadly on the fixes, I think I've made a mistake way back by using
> > > > syscon/simple-mfds to expose the innards of the SCU and LPC controllers in the
> > > > devicetree. This series cleans up what's currently there, but I have half a
> > > > mind to rev the SCU and LPC bindings to not use simple-mfd and instead have a
> > > > driver implementation that uses `platform_device_register_full()` or similar to
> > > > deal with the mess.
> > > >
> > > > Rob - I'm looking for your thoughts here and on the series, I've never felt
> > > > entirely comfortable with what I cooked up. Your advice would be appreciated.
> > >
> > > The series generally looks fine to me from a quick scan. As far as
> > > dropping 'simple-mfd', having less fine grained description in DT is
> > > generally my preference. It comes down to whether what you have
> > > defined is maintainable. As most of it is just additions, I think what
> > > you have is fine. Maybe keep all this in mind for the next chip
> > > depending how the SCU and LPC change.
> >
> > Okay, I think the timing of that suggestion is good given where things are with
> > the AST2600. I'll keep that in mind.
> >
> > Consensus so far seems to be that the series is fine. I'll split it up and send out
> > the sub-series to the relevant lists with the acks accumulated here.
> 
> The series look good. I suggest posting the KCS bindings and driver
> changes as their own series to go through the IPMI tree.

Yeah, that was the plan.

> 
> Please add my tag to all the patches except the OCC one, which I need
> to do some investigation in to.
> 
> Reviewed-by: Joel Stanley <joel@jms.id.au>

Thanks, will do.

> 
> The others can go via the aspeed tree. Perhaps post them as their own
> series too so I don't get confused and apply the wrong ones. That way
> if Rob wants to send his reviewed-by he can.

SGTM.

Cheers,

Andrew

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

end of thread, other threads:[~2019-08-05  0:48 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-26  5:39 [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Andrew Jeffery
2019-07-26  5:39 ` [PATCH 01/17] ARM: dts: aspeed-g5: Move EDAC node to APB Andrew Jeffery
2019-07-29 17:26   ` Stefan Schaeckeler (sschaeck)
2019-07-26  5:39 ` [PATCH 02/17] ARM: dts: aspeed-g5: Use recommended generic node name for SDMC Andrew Jeffery
2019-07-29 17:29   ` Stefan Schaeckeler (sschaeck)
2019-07-26  5:39 ` [PATCH 03/17] ARM: dts: aspeed-g5: Fix aspeed,external-nodes description Andrew Jeffery
2019-07-26  5:39 ` [PATCH 04/17] ARM: dts: vesnin: Add unit address for memory node Andrew Jeffery
2019-07-26  7:56   ` Alexander A. Filippov
2019-07-26  5:39 ` [PATCH 05/17] ARM: dts: fp5280g2: Cleanup gpio-keys-polled properties Andrew Jeffery
2019-07-26  5:39 ` [PATCH 06/17] ARM: dts: swift: " Andrew Jeffery
2019-07-26  5:39 ` [PATCH 07/17] ARM: dts: witherspoon: " Andrew Jeffery
2019-07-26  5:39 ` [PATCH 08/17] ARM: dts: aspeed: Cleanup lpc-ctrl and snoop regs Andrew Jeffery
2019-07-26  5:39 ` [PATCH 09/17] ARM: dts: ibm-power9-dual: Add a unit address for OCC nodes Andrew Jeffery
2019-07-26  5:39 ` [RFC PATCH 10/17] dt-bindings: pinctrl: aspeed: Add reg property as a hint Andrew Jeffery
2019-07-26  5:39 ` [RFC PATCH 11/17] dt-bindings: misc: Document reg for aspeed,p2a-ctrl nodes Andrew Jeffery
2019-07-26  5:39 ` [RFC PATCH 12/17] ARM: dts: aspeed: Add reg hints to syscon children Andrew Jeffery
2019-07-26  5:39 ` [RFC PATCH 13/17] dt-bindings: ipmi: aspeed: Introduce a v2 binding for KCS Andrew Jeffery
2019-07-26  5:39 ` [RFC PATCH 14/17] ipmi: kcs: Finish configuring ASPEED KCS device before enable Andrew Jeffery
2019-07-26 17:04   ` Wang, Haiyue
2019-07-26 17:24     ` Wang, Haiyue
2019-07-26  5:39 ` [RFC PATCH 15/17] ipmi: kcs: aspeed: Implement v2 bindings Andrew Jeffery
2019-07-26 17:30   ` Wang, Haiyue
2019-07-26  5:39 ` [RFC PATCH 16/17] ARM: dts: aspeed-g5: Change KCS nodes to v2 binding Andrew Jeffery
2019-07-26  5:39 ` [RFC PATCH 17/17] ARM: dts: aspeed-g5: Sort LPC child nodes by unit address Andrew Jeffery
2019-07-29 21:55 ` [RFC-ish PATCH 00/17] Clean up ASPEED devicetree warnings Linus Walleij
2019-07-30  0:49   ` Andrew Jeffery
2019-07-30  0:53 ` Rob Herring
2019-07-30  1:09   ` Andrew Jeffery
2019-08-02  5:51     ` Joel Stanley
2019-08-05  0:48       ` Andrew Jeffery

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).