Clean up ASPEED devicetree warnings
Subsystems (6)
cover Clean up ASPEED devicetree warnings
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
218and after the full series is applied we have:
$ make dtbs 2>&1 >/dev/null | wc -l
2for 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
144So 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
125The 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(-)
Signature · 1 line
2.20.1
PATCH 1/17 ARM: dts: aspeed-g5: Move EDAC node to APB
Previously the register interface was not attached to any internal bus, which is not correct - it lives on the APB.
--- arch/arm/boot/dts/aspeed-g5.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
arch/arm/boot/dts/aspeed-g5.dtsi +7 -7
@@ -47,13 +47,6 @@ reg = <0x80000000 0>; }; - edac: sdram at 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 at 1e6e0000 { + compatible = "aspeed,ast2500-sdram-edac"; + reg = <0x1e6e0000 0x174>; + interrupts = <0>; + status = "disabled"; + }; + syscon: syscon at 1e6e2000 { compatible = "aspeed,ast2500-scu", "syscon", "simple-mfd"; reg = <0x1e6e2000 0x1a8>;
Signature · 1 line
2.20.1
Re: [PATCH 01/17] ARM: dts: aspeed-g5: Move EDAC node to APB
Quoted 8 lines · Andrew Jeffery
Previously the register interface was not attached to any internal bus, which is not correct - it lives on the APB.
Cc Stefan M Schaeckeler <[email protected]>Signed-off-by Andrew Jeffery <[email protected]>--- arch/arm/boot/dts/aspeed-g5.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
PATCH 2/17 ARM: dts: aspeed-g5: Use recommended generic node name for SDMC
In reply to Andrew JefferyThe EDAC is a sub-function of the SDRAM Memory Controller. Rename the node to the appropriate generic node name.
--- arch/arm/boot/dts/aspeed-g5.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/aspeed-g5.dtsi +1 -1
@@ -199,7 +199,7 @@ #size-cells = <1>; ranges; - edac: sdram at 1e6e0000 { + edac: memory-controller at 1e6e0000 { compatible = "aspeed,ast2500-sdram-edac"; reg = <0x1e6e0000 0x174>; interrupts = <0>;
Signature · 1 line
2.20.1
Re: [PATCH 02/17] ARM: dts: aspeed-g5: Use recommended generic node name for SDMC
Quoted 8 lines · Andrew Jeffery
The EDAC is a sub-function of the SDRAM Memory Controller. Rename the node to the appropriate generic node name.
Cc Stefan M Schaeckeler <[email protected]>Signed-off-by Andrew Jeffery <[email protected]>--- arch/arm/boot/dts/aspeed-g5.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
PATCH 3/17 ARM: dts: aspeed-g5: Fix aspeed,external-nodes description
In reply to Andrew JefferyThe existing approach lead to an error from the dtbs_check:
pinctrl: aspeed,external-nodes: [[8, 9]] is too short
--- 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(-)
arch/arm/boot/dts/aspeed-bmc-arm-centriq2400-rep.dts +0 -4
@@ -211,10 +211,6 @@ status = "okay"; }; -&pinctrl { - aspeed,external-nodes = <&gfx &lhc>; -}; - &gpio { pin_gpio_c7 { gpio-hog;
arch/arm/boot/dts/aspeed-bmc-arm-stardragon4800-rep2.dts +0 -4
@@ -197,10 +197,6 @@ status = "okay"; }; -&pinctrl { - aspeed,external-nodes = <&gfx &lhc>; -}; - &gpio { pin_gpio_c7 { gpio-hog;
arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts +0 -4
@@ -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).
arch/arm/boot/dts/aspeed-bmc-facebook-yamp.dts +0 -4
@@ -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).
arch/arm/boot/dts/aspeed-bmc-inspur-fp5280g2.dts +0 -4
@@ -745,10 +745,6 @@ memory-region = <&gfx_memory>; }; -&pinctrl { - aspeed,external-nodes = <&gfx &lhc>; -}; - &gpio { pin_gpio_b7 { gpio-hog;
arch/arm/boot/dts/aspeed-bmc-intel-s2600wf.dts +0 -4
@@ -115,10 +115,6 @@ status = "okay"; }; -&pinctrl { - aspeed,external-nodes = <&gfx &lhc>; -}; - &pwm_tacho { status = "okay"; pinctrl-names = "default";
arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts +0 -4
@@ -260,10 +260,6 @@ status = "okay"; }; -&pinctrl { - aspeed,external-nodes = <&gfx &lhc>; -}; - &gpio { pin_gpio_b0 { gpio-hog;
arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts +0 -4
@@ -255,10 +255,6 @@ memory-region = <&gfx_memory>; }; -&pinctrl { - aspeed,external-nodes = <&gfx &lhc>; -}; - &pwm_tacho { status = "okay"; pinctrl-names = "default";
arch/arm/boot/dts/aspeed-bmc-opp-swift.dts +0 -4
@@ -937,10 +937,6 @@ memory-region = <&gfx_memory>; }; -&pinctrl { - aspeed,external-nodes = <&gfx &lhc>; -}; - &wdt1 { aspeed,reset-type = "none"; aspeed,external-signal;
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +0 -4
@@ -618,10 +618,6 @@ memory-region = <&gfx_memory>; }; -&pinctrl { - aspeed,external-nodes = <&gfx &lhc>; -}; - &wdt1 { aspeed,reset-type = "none"; aspeed,external-signal;
arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts +0 -2
@@ -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;
arch/arm/boot/dts/aspeed-g5.dtsi +1 -2
@@ -216,8 +216,7 @@ pinctrl: pinctrl { compatible = "aspeed,g5-pinctrl"; - aspeed,external-nodes = <&gfx &lhc>; - + aspeed,external-nodes = <&gfx>, <&lhc>; }; p2a: p2a-control {
Signature · 1 line
2.20.1
PATCH 4/17 ARM: dts: vesnin: Add unit address for memory node
In reply to Andrew JefferyFixes 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
--- arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts +1 -1
@@ -14,7 +14,7 @@ bootargs = "console=ttyS4,115200 earlyprintk"; }; - memory { + memory at 40000000 { reg = <0x40000000 0x20000000>; };
Signature · 1 line
2.20.1
Re: [PATCH 04/17] ARM: dts: vesnin: Add unit address for memory node
Quoted 27 lines · Andrew Jeffery
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 propertyCc Alexander Filippov <[email protected]>Signed-off-by Andrew Jeffery <[email protected]>--- arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dts +1
-1@@ -14,7 +14,7 @@ bootargs = "console=ttyS4,115200 earlyprintk"; }; - memory { + memory at 40000000 { reg = <0x40000000 0x20000000>; };Signature · 1 line
2.20.1
PATCH 5/17 ARM: dts: fp5280g2: Cleanup gpio-keys-polled properties
In reply to Andrew Jefferydtbs_check gave the following warning:
Warning (avoid_unnecessary_addr_size): /gpio-keys-polled: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
--- arch/arm/boot/dts/aspeed-bmc-inspur-fp5280g2.dts | 2 -- 1 file changed, 2 deletions(-)
arch/arm/boot/dts/aspeed-bmc-inspur-fp5280g2.dts +0 -2
@@ -94,8 +94,6 @@ gpio-keys-polled { compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; poll-interval = <1000>; fan0-presence {
Signature · 1 line
2.20.1
PATCH 6/17 ARM: dts: swift: Cleanup gpio-keys-polled properties
In reply to Andrew Jefferydtbs_check gave the following warning:
Warning (avoid_unnecessary_addr_size): /gpio-keys-polled: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
--- arch/arm/boot/dts/aspeed-bmc-opp-swift.dts | 2 -- 1 file changed, 2 deletions(-)
arch/arm/boot/dts/aspeed-bmc-opp-swift.dts +0 -2
@@ -82,8 +82,6 @@ gpio-keys-polled { compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; poll-interval = <1000>; scm0-presence {
Signature · 1 line
2.20.1
PATCH 6/17 ARM: dts: swift: Cleanup gpio-keys-polled properties
Andrew Jeffery <[email protected]> wrote on 07/26/2019 12:39:48 AM:
Quoted 10 lines
From: Andrew Jeffery <[email protected]>
To: linux-aspeed at lists.ozlabs.org
Cc: Andrew Jeffery <[email protected]>, robh+dt at kernel.org, mark.rutland at arm.com, joel at jms.id.au, devicetree at vger.kernel.org, linux-arm-kernel at lists.infradead.org, linux-kernel at vger.kernel.org, Adriana Kobylak <[email protected]>
Date: 07/26/2019 12:40 AM
Subject: [EXTERNAL] [PATCH 06/17] ARM: dts: swift: Cleanup gpio- keys-polled properties
Quoted 8 lines
dtbs_checkgave the following warning:Warning (
avoid_unnecessary_addr_size): /gpio-keys-polled:
unnecessary #address-cells/#size-cells without "ranges" or child "reg" propertyCc Adriana Kobylak <[email protected]>Signed-off-by Andrew Jeffery <[email protected]>
Quoted 21 lines
--- arch/arm/boot/dts/aspeed-bmc-opp-swift.dts | 2 -- 1 file changed, 2 deletions(-)arch/arm/ renamed from arch/arm/boot/dts/aspeed-bmc-opp-swift.dts +0
-0
boot/dts/aspeed-bmc-opp-swift.dts
index2077e8d0e096..9f934509ca1b100644arch/arm/boot/dts/aspeed-bmc-opp-swift.dts +0
-2@@ -82,8 +82,6 @@ gpio-keys-polled { compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; poll-interval = <1000>; scm0-presence {Signature · 1 line
2.20.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linux-aspeed/attachments/20190726/a10d5722/attachment-0001.htm>
PATCH 7/17 ARM: dts: witherspoon: Cleanup gpio-keys-polled properties
In reply to Andrew Jefferydtbs_check gave the following warning:
Warning (avoid_unnecessary_addr_size): /gpio-keys-polled: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
--- arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 2 -- 1 file changed, 2 deletions(-)
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts +0 -2
@@ -77,8 +77,6 @@ gpio-keys-polled { compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; poll-interval = <1000>; fan0-presence {
Signature · 1 line
2.20.1
PATCH 8/17 ARM: dts: aspeed: Cleanup lpc-ctrl and snoop regs
In reply to Andrew JefferyFix the following warning:
arch/arm/boot/dts/aspeed-g5.dtsi:409.27-414.8: Warning (unique_unit_address): /ahb/apb/lpc at 1e789000/lpc-host at 80/lpc-ctrl at 0: duplicate unit-address (also used in node /ahb/apb/lpc at 1e789000/lpc-host at 80/lpc-snoop at 0)
--- arch/arm/boot/dts/aspeed-g4.dtsi | 6 +++--- arch/arm/boot/dts/aspeed-g5.dtsi | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/aspeed-g4.dtsi +3 -3
@@ -296,14 +296,14 @@ lpc_ctrl: lpc-ctrl at 0 { compatible = "aspeed,ast2400-lpc-ctrl"; - reg = <0x0 0x80>; + reg = <0x0 0x10>; clocks = <&syscon ASPEED_CLK_GATE_LCLK>; status = "disabled"; }; - lpc_snoop: lpc-snoop at 0 { + lpc_snoop: lpc-snoop at 10 { compatible = "aspeed,ast2400-lpc-snoop"; - reg = <0x0 0x80>; + reg = <0x10 0x8>; interrupts = <8>; status = "disabled"; };
arch/arm/boot/dts/aspeed-g5.dtsi +3 -3
@@ -408,14 +408,14 @@ lpc_ctrl: lpc-ctrl at 0 { compatible = "aspeed,ast2500-lpc-ctrl"; - reg = <0x0 0x80>; + reg = <0x0 0x10>; clocks = <&syscon ASPEED_CLK_GATE_LCLK>; status = "disabled"; }; - lpc_snoop: lpc-snoop at 0 { + lpc_snoop: lpc-snoop at 10 { compatible = "aspeed,ast2500-lpc-snoop"; - reg = <0x0 0x80>; + reg = <0x10 0x8>; interrupts = <8>; status = "disabled"; };
Signature · 1 line
2.20.1
PATCH 9/17 ARM: dts: ibm-power9-dual: Add a unit address for OCC nodes
In reply to Andrew JefferyThese 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 at 0,0/sbefifo at 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 at 0,0/hub at 3400/cfam at 1,0/sbefifo at 2400/occ: node has a reg or ranges property, but no unit name
--- arch/arm/boot/dts/ibm-power9-dual.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/ibm-power9-dual.dtsi +2 -2
@@ -86,7 +86,7 @@ #address-cells = <1>; #size-cells = <0>; - fsi_occ0: occ { + fsi_occ0: occ at 1 { compatible = "ibm,p9-occ"; }; };
@@ -187,7 +187,7 @@ #address-cells = <1>; #size-cells = <0>; - fsi_occ1: occ { + fsi_occ1: occ at 2 { compatible = "ibm,p9-occ"; }; };
Signature · 1 line
2.20.1
RFC PATCH 10/17 dt-bindings: pinctrl: aspeed: Add reg property as a hint
In reply to Andrew JefferyThe 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.
--- .../devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml | 3 +++ .../devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml | 3 +++ 2 files changed, 6 insertions(+)
Documentation/devicetree/bindings/pinctrl/aspeed,ast2400-pinctrl.yaml +3 -0
@@ -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: '^.*$':
Documentation/devicetree/bindings/pinctrl/aspeed,ast2500-pinctrl.yaml +3 -0
@@ -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
Signature · 1 line
2.20.1
RFC PATCH 11/17 dt-bindings: misc: Document reg for aspeed,p2a-ctrl nodes
In reply to Andrew JefferyThe 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.
--- Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt +1 -0
@@ -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
Signature · 1 line
2.20.1
RFC PATCH 12/17 ARM: dts: aspeed: Add reg hints to syscon children
In reply to Andrew JefferyFixes the following warnings:
arch/arm/boot/dts/aspeed-g5.dtsi:209.28-226.6: Warning (avoid_unnecessary_addr_size): /ahb/apb/syscon at 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 at 1e6e2000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
--- arch/arm/boot/dts/aspeed-g4.dtsi | 15 +++++++++------ arch/arm/boot/dts/aspeed-g5.dtsi | 17 ++++++++++------- 2 files changed, 19 insertions(+), 13 deletions(-)
arch/arm/boot/dts/aspeed-g4.dtsi +9 -6
@@ -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 at 2c { + reg = <0x2c 0x4>; compatible = "aspeed,ast2400-p2a-ctrl"; status = "disabled"; }; + + pinctrl: pinctrl at 80 { + reg = <0x80 0x18>, <0xa0 0x10>; + compatible = "aspeed,g4-pinctrl"; + }; }; rng: hwrng at 1e6e2078 {
arch/arm/boot/dts/aspeed-g5.dtsi +10 -7
@@ -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 at 2c { compatible = "aspeed,ast2500-p2a-ctrl"; + reg = <0x2c 0x4>; status = "disabled"; }; + + pinctrl: pinctrl at 80 { + compatible = "aspeed,g5-pinctrl"; + reg = <0x80 0x18>, <0xa0 0x10>; + aspeed,external-nodes = <&gfx>, <&lhc>; + }; }; rng: hwrng at 1e6e2078 {
Signature · 1 line
2.20.1
RFC PATCH 13/17 dt-bindings: ipmi: aspeed: Introduce a v2 binding for KCS
In reply to Andrew JefferyThe v2 binding utilises reg and renames some of the v1 properties.
--- .../bindings/ipmi/aspeed-kcs-bmc.txt | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/ipmi/aspeed-kcs-bmc.txt +14 -6
@@ -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 at 0 { - compatible = "aspeed,ast2500-kcs-bmc"; - reg = <0x0 0x80>; + kcs3: kcs at 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"; };
Signature · 1 line
2.20.1
RFC PATCH 14/17 ipmi: kcs: Finish configuring ASPEED KCS device before enable
In reply to Andrew JefferyThe currently interrupts are configured after the channel was enabled.
--- drivers/char/ipmi/kcs_bmc_aspeed.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/char/ipmi/kcs_bmc_aspeed.c +4 -3
@@ -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) {
Signature · 1 line
2.20.1
Re: [RFC PATCH 14/17] ipmi: kcs: Finish configuring ASPEED KCS device before enable
? 2019-07-26 13:39, Andrew Jeffery ??:
Quoted 17 lines
The currently interrupts are configured after the channel was enabled.
Cc Haiyue Wang<[email protected]>Cc Corey Minyard<[email protected]>Cc Arnd Bergmann<[email protected]>Cc Greg Kroah-Hartman<[email protected]>Cc openipmi-developer at lists.sourceforge.netSigned-off-by Andrew Jeffery<[email protected]>--- drivers/char/ipmi/kcs_bmc_aspeed.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/char/ipmi/kcs_bmc_aspeed.c +0
-0
drivers/char/ipmi/kcs_bmc_aspeed.c static int aspeed_kcs_probe(struct platform_device *pdev) · line 275
Quoted 8 lines
drivers/char/ipmi/kcs_bmc_aspeed.c +4
-0@@ -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.
Wang, Haiyue
Reviewed-byRe: [RFC PATCH 14/17] ipmi: kcs: Finish configuring ASPEED KCS device before enable
? 2019-07-27 01:04, Wang, Haiyue ??:
Quoted 22 lines
? 2019-07-26 13:39, Andrew Jeffery ??:
Quoted 21 lines
The currently interrupts are configured after the channel was enabled.
Cc Haiyue Wang<[email protected]>Cc Corey Minyard<[email protected]>Cc Arnd Bergmann<[email protected]>Cc Greg Kroah-Hartman<[email protected]>Cc openipmi-developer at lists.sourceforge.netSigned-off-by Andrew Jeffery<[email protected]>---
?drivers/char/ipmi/kcs_bmc_aspeed.c| 7 ++++---
? 1 file changed, 4 insertions(+), 3 deletions(-)drivers/char/ipmi/kcs_bmc_aspeed.c +0
-0@@ -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;
Quoted 9 lines
drivers/char/ipmi/kcs_bmc_aspeed.c static int aspeed_kcs_probe(struct · line 275
Quoted 5 lines
drivers/char/ipmi/kcs_bmc_aspeed.c +3
-0? +??? 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.
RFC PATCH 15/17 ipmi: kcs: aspeed: Implement v2 bindings
In reply to Andrew JefferyThe 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.
--- drivers/char/ipmi/kcs_bmc_aspeed.c | 156 +++++++++++++++++++++++------ 1 file changed, 127 insertions(+), 29 deletions(-)
drivers/char/ipmi/kcs_bmc_aspeed.c +127 -29
@@ -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);
Signature · 1 line
2.20.1
Re: [RFC PATCH 15/17] ipmi: kcs: aspeed: Implement v2 bindings
? 2019-07-26 13:39, Andrew Jeffery ??:
Quoted 12 lines
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_chanproperty from the v1 bindings. The v2 bindings allow us to reduce the number of warnings generated by the existing devicetree nodes.Cc Haiyue Wang<[email protected]>Cc Corey Minyard<[email protected]>Cc Arnd Bergmann<[email protected]>Cc Greg Kroah-Hartman<[email protected]>Cc openipmi-developer at lists.sourceforge.netSigned-off-by Andrew Jeffery<[email protected]>
Quoted 3 lines
--- 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! :)
RFC PATCH 16/17 ARM: dts: aspeed-g5: Change KCS nodes to v2 binding
In reply to Andrew JefferyFixes the following warnings:
arch/arm/boot/dts/aspeed-g5.dtsi:376.19-381.8: Warning (unit_address_vs_reg): /ahb/apb/lpc at 1e789000/lpc-bmc at 0/kcs1 at 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 at 1e789000/lpc-bmc at 0/kcs2 at 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 at 1e789000/lpc-bmc at 0/kcs3 at 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 at 1e789000/lpc-host at 80/kcs4 at 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 at 1e789000/lpc-bmc at 0/kcs1 at 0: duplicate unit-address (also used in node /ahb/apb/lpc at 1e789000/lpc-bmc at 0/kcs2 at 0)
arch/arm/boot/dts/aspeed-g5.dtsi:376.19-381.8: Warning (unique_unit_address): /ahb/apb/lpc at 1e789000/lpc-bmc at 0/kcs1 at 0: duplicate unit-address (also used in node /ahb/apb/lpc at 1e789000/lpc-bmc at 0/kcs3 at 0)
arch/arm/boot/dts/aspeed-g5.dtsi:382.19-387.8: Warning (unique_unit_address): /ahb/apb/lpc at 1e789000/lpc-bmc at 0/kcs2 at 0: duplicate unit-address (also used in node /ahb/apb/lpc at 1e789000/lpc-bmc at 0/kcs3 at 0)
arch/arm/boot/dts/aspeed-g5.dtsi:405.19-410.8: Warning (unique_unit_address): /ahb/apb/lpc at 1e789000/lpc-host at 80/kcs4 at 0: duplicate unit-address (also used in node /ahb/apb/lpc at 1e789000/lpc-host at 80/lpc-ctrl at 0)--- arch/arm/boot/dts/aspeed-g5.dtsi | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
arch/arm/boot/dts/aspeed-g5.dtsi +12 -12
@@ -373,22 +373,22 @@ #size-cells = <1>; ranges = <0x0 0x0 0x80>; - kcs1: kcs1 at 0 { - compatible = "aspeed,ast2500-kcs-bmc"; + kcs1: kcs at 24 { + compatible = "aspeed,ast2500-kcs-bmc-v2"; + reg = <0x24 0x1>, <0x30 0x1>, <0x3c 0x1>; interrupts = <8>; - kcs_chan = <1>; status = "disabled"; }; - kcs2: kcs2 at 0 { - compatible = "aspeed,ast2500-kcs-bmc"; + kcs2: kcs at 28 { + compatible = "aspeed,ast2500-kcs-bmc-v2"; + reg = <0x28 0x1>, <0x34 0x1>, <0x40 0x1>; interrupts = <8>; - kcs_chan = <2>; status = "disabled"; }; - kcs3: kcs3 at 0 { - compatible = "aspeed,ast2500-kcs-bmc"; + kcs3: kcs at 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 at 0 { - compatible = "aspeed,ast2500-kcs-bmc"; + kcs4: kcs at 94 { + compatible = "aspeed,ast2500-kcs-bmc-v2"; + reg = <0x94 0x1>, <0x98 0x1>, <0x9c 0x1>; interrupts = <8>; - kcs_chan = <4>; status = "disabled"; };
Signature · 1 line
2.20.1
RFC PATCH 17/17 ARM: dts: aspeed-g5: Sort LPC child nodes by unit address
In reply to Andrew JefferyLets try to maintain some sort of sanity.
--- arch/arm/boot/dts/aspeed-g5.dtsi | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
arch/arm/boot/dts/aspeed-g5.dtsi +6 -5
@@ -423,17 +423,18 @@ status = "disabled"; }; - lhc: lhc at 20 { - compatible = "aspeed,ast2500-lhc"; - reg = <0x20 0x24 0x48 0x8>; - }; - lpc_reset: reset-controller at 18 { compatible = "aspeed,ast2500-lpc-reset"; reg = <0x18 0x4>; #reset-cells = <1>; }; + lhc: lhc at 20 { + compatible = "aspeed,ast2500-lhc"; + reg = <0x20 0x24 0x48 0x8>; + }; + + ibt: ibt at c0 { compatible = "aspeed,ast2500-ibt-bmc"; reg = <0xc0 0x18>;
Signature · 1 line
2.20.1
Quoted 2 lines · Andrew Jeffery
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?
Yours,
Linus Walleij
Quoted 7 lines · Linus Walleij
Quoted 2 lines · Andrew Jeffery
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 <[email protected]>
Yeah, if you're happy for that. Thanks.
Andrew
Quoted 67 lines · Andrew Jeffery
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_defconfigwe started with the follow warning count:$ make dtbs 2>&1 >/dev/null | wc -l 218and after the full series is applied we have:
$ make dtbs 2>&1 >/dev/null | wc -l 2for 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 nodesWith these patches applied we get to:
$ make dtbs 2>&1 >/dev/null | wc -l 144So 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 addressBy
dt-bindings: ipmi: aspeed: Introduce a v2 binding for KCSthe warnings are reduced to:$ make dtbs 2>&1 >/dev/null | wc -l 125The 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.
Quoted 2 lines
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
Quoted 71 lines · Rob Herring
Quoted 67 lines · Andrew Jeffery
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_defconfigwe started with the follow warning count:$ make dtbs 2>&1 >/dev/null | wc -l 218and after the full series is applied we have:
$ make dtbs 2>&1 >/dev/null | wc -l 2for 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 nodesWith these patches applied we get to:
$ make dtbs 2>&1 >/dev/null | wc -l 144So 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 addressBy
dt-bindings: ipmi: aspeed: Introduce a v2 binding for KCSthe warnings are reduced to:$ make dtbs 2>&1 >/dev/null | wc -l 125The 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.Quoted 2 lines
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.
Quoted 6 lines
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
Quoted 21 lines · Andrew Jeffery
Quoted 14 lines
Quoted 11 lines
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.Quoted 2 lines
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.
Quoted 6 lines
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.
Quoted 5 lines
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.
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
Quoted 23 lines · Joel Stanley
Quoted 21 lines · Andrew Jeffery
Quoted 20 lines
Quoted 11 lines
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.Quoted 2 lines
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.
Quoted 8 lines
Quoted 5 lines
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.
Quoted 5 lines
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 <[email protected]>
Thanks, will do.
Quoted 4 lines
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