Sigmastar DT warnings fixing
v2 cover Sigmastar DT warnings fixing
v2 heads up: I didn't ignore Krzysztof's request to squash some commits, I wasn't sure what to squash and I thought since I've fixed everything now it was better to send a v2 sooner than later.
I've now fixed all of the warnings except one remaining one that seems to need a change in dt-schema itself to cleanup:
serial@221000 (ns16550a): reg-shift: 3 is not one of [0, 1, 2]
from schema $id: http://devicetree.org/schemas/reg.yaml
The way registers are connected in these chips is weird. I think they took their peripheral block from an 8051 microcontroller and jammed it onto 32bit CPUs so all of the registers have weird spacing and it really does need reg-shift == 3.
v1 blurb:
I saw a slide at LPC that had sigmastar in the "hall of shame" for DT warnings. I finally got some time to look at this so I have fixed the ones that are obvious and quick to fix.
I'll fix the rest but they might take a bit longer i.e. one of them is about the register shift for the UART registers, that'll need the binding to be updated I think?
FWIW this platform isn't dead and I have been rebasing all of the out of tree stuff that make it useful (Audio support, display, hardware video decoding etc) but its basically stuck on rewriting the clock driver so that it is mainline-able.
Some other people have taken the limited support in mainline and my out of tree stuff and made it run on old MStar MIPS machines too..
change log:
v2:
- Fix the regulator names as suggested by Krzysztof
- Adjust the opp table name
- Add a commit to fix the cpupll binding and clean up the warnings for that
- Add a commit to fix the memory node in the infinity2m dtsi to fix up the warnings about that.
- Add a commit to switch the default led trigger on breadbee from the undocumented activity to cpu to fix up the warnings for the that.
Daniel Palmer (8):
dt-bindings: clk: mstar msc313 cpupll: Correct clock-cells value
arm: dts: mstar: breadbee: Correct regulator names
arm: dts: mstar: breadbee: Correct LED names
arm: dts: mstar: breadbee: Switch from "activity" led trigger to "cpu"
arm: dts: mstar: infinity: Correct opp table name
arm: dts: mstar: infinity2m: ssd202d: Correct memory node name
arm: dts: mstar: v7: Move the reboot node
arm: dts: mstar: v7: Add sizes and ranges to sram
.../bindings/clock/mstar,msc313-cpupll.yaml | 5 ++--- .../mstar-infinity-breadbee-common.dtsi | 12 ++++++------ arch/arm/boot/dts/sigmastar/mstar-infinity.dtsi | 2 +- .../dts/sigmastar/mstar-infinity2m-ssd202d.dtsi | 2 +- arch/arm/boot/dts/sigmastar/mstar-v7.dtsi | 17 ++++++++++------- 5 files changed, 20 insertions(+), 18 deletions(-)
Signature · 1 line
2.51.0
PATCH v2 1/8 dt-bindings: clk: mstar msc313 cpupll: Correct clock-cells value
clock-cells should have been 0 and causes warnings when validating devicetrees.
Fix the value and fix the binding example.
--- .../devicetree/bindings/clock/mstar,msc313-cpupll.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/clock/mstar,msc313-cpupll.yaml +2 -3
@@ -18,7 +18,7 @@ properties: const: mstar,msc313-cpupll "#clock-cells": - const: 1 + const: 0 clocks: maxItems: 1
@@ -36,10 +36,9 @@ additionalProperties: false examples: - | - #include <dt-bindings/clock/mstar-msc313-mpll.h> cpupll: cpupll@206400 { compatible = "mstar,msc313-cpupll"; reg = <0x206400 0x200>; - #clock-cells = <1>; + #clock-cells = <0>; clocks = <&mpll MSTAR_MSC313_MPLL_DIV2>; };
Signature · 1 line
2.51.0
PATCH v2 2/8 arm: dts: mstar: breadbee: Correct regulator names
In reply to Daniel PalmerThe regulator names had a "@<n>" in them so the dt validation stuff wanted a reg property. Fix the names to match what the regulator is for and remove the "@<n>" bit.
--- .../boot/dts/sigmastar/mstar-infinity-breadbee-common.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/sigmastar/mstar-infinity-breadbee-common.dtsi +3 -3
@@ -7,7 +7,7 @@ #include <dt-bindings/gpio/gpio.h> / { - vcc_core: fixedregulator@0 { + vcc_core: regulator-core { compatible = "regulator-fixed"; regulator-name = "vcc_core"; regulator-min-microvolt = <1000000>;
@@ -15,7 +15,7 @@ vcc_core: fixedregulator@0 { regulator-boot-on; }; - vcc_dram: fixedregulator@1 { + vcc_dram: regulator-dram { compatible = "regulator-fixed"; regulator-name = "vcc_dram"; regulator-min-microvolt = <1800000>;
@@ -23,7 +23,7 @@ vcc_dram: fixedregulator@1 { regulator-boot-on; }; - vcc_io: fixedregulator@2 { + vcc_io: regulator-io { compatible = "regulator-fixed"; regulator-name = "vcc_io"; regulator-min-microvolt = <3300000>;
Signature · 1 line
2.51.0
PATCH v2 3/8 arm: dts: mstar: breadbee: Correct LED names
In reply to Daniel PalmerThe dt validation stuff whats the names of the leds to match a regexp.
Prefix the names with "led-" to make the validation happy.
--- .../boot/dts/sigmastar/mstar-infinity-breadbee-common.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/sigmastar/mstar-infinity-breadbee-common.dtsi +2 -2
@@ -33,11 +33,11 @@ vcc_io: regulator-io { leds { compatible = "gpio-leds"; - red { + led-red { gpios = <&gpio MSC313_GPIO_SR_IO16 GPIO_ACTIVE_HIGH>; linux,default-trigger = "activity"; }; - yellow { + led-yellow { gpios = <&gpio MSC313_GPIO_SR_IO17 GPIO_ACTIVE_HIGH>; linux,default-trigger = "heartbeat"; };
Signature · 1 line
2.51.0
PATCH v2 4/8 arm: dts: mstar: breadbee: Switch from "activity" led trigger to "cpu"
In reply to Daniel PalmerThe activity trigger exists but is not documented in the LED binding. A patch was sent to document it but wasn't accepted.
The intention of the LED is to show if the system is busy or not so the cpu trigger is good enough so switch to that to clean up the warning.
--- arch/arm/boot/dts/sigmastar/mstar-infinity-breadbee-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sigmastar/mstar-infinity-breadbee-common.dtsi +1 -1
@@ -35,7 +35,7 @@ leds { compatible = "gpio-leds"; led-red { gpios = <&gpio MSC313_GPIO_SR_IO16 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "activity"; + linux,default-trigger = "cpu"; }; led-yellow { gpios = <&gpio MSC313_GPIO_SR_IO17 GPIO_ACTIVE_HIGH>;
Signature · 1 line
2.51.0
PATCH v2 5/8 arm: dts: mstar: infinity: Correct opp table name
In reply to Daniel PalmerThe dt validation stuff expects the name of the opp table to match a regexp and it currently doesn't.
Update the name to match the regexp.
--- arch/arm/boot/dts/sigmastar/mstar-infinity.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sigmastar/mstar-infinity.dtsi +1 -1
@@ -9,7 +9,7 @@ #include <dt-bindings/gpio/msc313-gpio.h> / { - cpu0_opp_table: opp_table0 { + cpu0_opp_table: opp-table { compatible = "operating-points-v2"; opp-shared;
Signature · 1 line
2.51.0
PATCH v2 6/8 arm: dts: mstar: infinity2m: ssd202d: Correct memory node name
In reply to Daniel PalmerMemory node name didn't include the address which was causing validation for all of the boards using the dtsi.
--- arch/arm/boot/dts/sigmastar/mstar-infinity2m-ssd202d.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sigmastar/mstar-infinity2m-ssd202d.dtsi +1 -1
@@ -7,7 +7,7 @@ #include "mstar-infinity2m-ssd20xd.dtsi" / { - memory { + memory@20000000 { device_type = "memory"; reg = <0x20000000 0x8000000>; };
Signature · 1 line
2.51.0
PATCH v2 7/8 arm: dts: mstar: v7: Move the reboot node
In reply to Daniel PalmerThe reboot node is currently inside of soc and that makes the dt validation stuff complain that it wants some properties that don't exist for reboot which is just some glue and not a real device.
Move the node out of soc to fix the warnings.
--- arch/arm/boot/dts/sigmastar/mstar-v7.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
arch/arm/boot/dts/sigmastar/mstar-v7.dtsi +7 -7
@@ -73,6 +73,13 @@ xtal_div2: xtal_div2 { }; }; + reboot { + compatible = "syscon-reboot"; + regmap = <&pmsleep>; + offset = <0xb8>; + mask = <0x79>; + }; + soc: soc { compatible = "simple-bus"; #address-cells = <1>;
@@ -105,13 +112,6 @@ pmsleep: syscon@1c00 { reg = <0x1c00 0x100>; }; - reboot { - compatible = "syscon-reboot"; - regmap = <&pmsleep>; - offset = <0xb8>; - mask = <0x79>; - }; - rtc@2400 { compatible = "mstar,msc313-rtc"; reg = <0x2400 0x40>;
Signature · 1 line
2.51.0
PATCH v2 8/8 arm: dts: mstar: v7: Add sizes and ranges to sram
In reply to Daniel PalmerAdd some missing properties to the SRAM node to make the dt validation happy.
--- arch/arm/boot/dts/sigmastar/mstar-v7.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/boot/dts/sigmastar/mstar-v7.dtsi +3 -0
@@ -187,6 +187,9 @@ pm_uart: serial@221000 { imi: sram@a0000000 { compatible = "mmio-sram"; reg = <0xa0000000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0xa0000000 0x10000>; }; }; };
Signature · 1 line
2.51.0
Rob Herring (Arm)
maintainerRe: [PATCH v2 1/8] dt-bindings: clk: mstar msc313 cpupll: Correct clock-cells value
In reply to Daniel PalmerQuoted 10 lines · Daniel Palmer
clock-cells should have been 0 and causes warnings when validating devicetrees.
Fix the value and fix the binding example.
Signed-off-by Daniel Palmer <[email protected]>--- .../devicetree/bindings/clock/mstar,msc313-cpupll.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Lexical error: Documentation/devicetree/bindings/clock/mstar,msc313-cpupll.example.dts:22.29-51 Unexpected 'MSTAR_MSC313_MPLL_DIV2' FATAL ERROR: Syntax error parsing input tree
make[2]: *** [scripts/Makefile.dtbs:145: Documentation/devicetree/bindings/clock/mstar,msc313-cpupll.example.dtb] Error 1 make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1565: dt_binding_check] Error 2
make: *** [Makefile:248: __sub-make] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/[email protected]
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
Re: [PATCH v2 1/8] dt-bindings: clk: mstar msc313 cpupll: Correct clock-cells value
In reply to Daniel PalmerQuoted 1 line · Daniel Palmer
clock-cells should have been 0 and causes warnings when
Why it should have been 0? That's what your commit msg should explain.
Quoted 14 lines
validating devicetrees.
Fix the value and fix the binding example.
Signed-off-by Daniel Palmer <[email protected]>--- .../devicetree/bindings/clock/mstar,msc313-cpupll.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)Documentation/devicetree/bindings/clock/mstar,msc313-cpupll.yaml +0
-0
Documentation/devicetree/bindings/clock/mstar,msc313-cpupll.yaml properties: · line 21
Quoted 5 lines
Documentation/devicetree/bindings/clock/mstar,msc313-cpupll.yaml +1
-1@@ -18,7 +18,7 @@ properties: const: mstar,msc313-cpupll "#clock-cells": - const: 1 + const: 0
That's technically ABI break and your commit msg must explain also the impact of that break.
Best regards,
Krzysztof