riscv: allwinner: ClockworkPi and DevTerm devicetrees
Subsystems (3)
Chen-Yu Tsai
maintainercover riscv: allwinner: ClockworkPi and DevTerm devicetrees
From: Chen-Yu Tsai <[email protected]>
Hi folks,
Here are a couple patches that were originally sent by Samuel, but later dropped due to the system LDO regulator bindings not getting merged. The regulator bindings were recently resent and landed [1], so now is the time to get the rest of the stragglers in.
Patch 1 and 3 were originally part of Samuel's D1 device tree submission [2].
Patch 2 was part of the system LDO series [3].
These have been rebased onto v6.10-rc1 and have been compile tested only.
I plan to land these in the coming week for 6.11.
Regards
ChenYu
[1] https://lore.kernel.org/linux-sunxi/[email protected]/
[2] https://lore.kernel.org/linux-sunxi/[email protected]/
[3] https://lore.kernel.org/linux-sunxi/[email protected]/
Chen-Yu Tsai (1):
riscv: dts: allwinner: d1s-t113: Add system LDOs
Samuel Holland (2):
dt-bindings: sram: sunxi-sram: Add regulators child
riscv: dts: allwinner: Add ClockworkPi and DevTerm devicetrees
.../allwinner,sun4i-a10-system-control.yaml | 28 ++ arch/riscv/boot/dts/allwinner/Makefile | 2 + .../allwinner/sun20i-d1-clockworkpi-v3.14.dts | 252 ++++++++++++++++++ .../dts/allwinner/sun20i-d1-devterm-v3.14.dts | 36 +++ .../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 11 + 5 files changed, 329 insertions(+) create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1-clockworkpi-v3.14.dts create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1-devterm-v3.14.dts
Signature · 1 line
2.39.2
Chen-Yu Tsai
maintainerPATCH 1/3 dt-bindings: sram: sunxi-sram: Add regulators child
From: Samuel Holland <[email protected]>
Some sunxi SoCs have in-package regulators controlled by a register in the system control MMIO block. Allow a child node for this regulator device in addition to SRAM child nodes.
--- .../allwinner,sun4i-a10-system-control.yaml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+)
Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml +28 -0
@@ -56,6 +56,9 @@ properties: ranges: true patternProperties: + "^regulators@[0-9a-f]+$": + $ref: /schemas/regulator/allwinner,sun20i-d1-system-ldos.yaml# + "^sram@[a-f0-9]+": $ref: /schemas/sram/sram.yaml# unevaluatedProperties: false
@@ -130,3 +133,28 @@ examples: }; }; }; + + - | + syscon@3000000 { + compatible = "allwinner,sun20i-d1-system-control"; + reg = <0x3000000 0x1000>; + ranges; + #address-cells = <1>; + #size-cells = <1>; + + regulators@3000150 { + compatible = "allwinner,sun20i-d1-system-ldos"; + reg = <0x3000150 0x4>; + + reg_ldoa: ldoa { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + reg_ldob: ldob { + regulator-name = "vcc-dram"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + }; + }; + };
Signature · 1 line
2.39.2
Rob Herring (Arm)
maintainerRe: [PATCH 1/3] dt-bindings: sram: sunxi-sram: Add regulators child
Quoted 6 lines · Chen-Yu Tsai
From: Samuel Holland <[email protected]>
Some sunxi SoCs have in-package regulators controlled by a register in the system control MMIO block. Allow a child node for this regulator device in addition to SRAM child nodes.
Quoted 7 lines
Signed-off-by Samuel Holland <[email protected]>Reviewed-by Krzysztof Kozlowski <[email protected]>Signed-off-by Chen-Yu Tsai <[email protected]>--- .../allwinner,sun4i-a10-system-control.yaml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+)
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.example.dtb: syscon@3000000: regulators@3000150: False schema does not allow {'compatible': ['allwinner,sun20i-d1-system-ldos'], 'reg': [[50331984, 4]], 'ldoa': {'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]]}, 'ldob': {'regulator-name': ['vcc-dram'], 'regulator-min-microvolt': [[1500000]], 'regulator-max-microvolt': [[1500000]]}}
from schema $id: http://devicetree.org/schemas/sram/allwinner,sun4i-a10-system-control.yaml#Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.example.dtb: /example-1/syscon@3000000/regulators@3000150: failed to match any schema with compatible: ['allwinner,sun20i-d1-system-ldos']
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/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.
Chen-Yu Tsai
maintainerRe: [PATCH 1/3] dt-bindings: sram: sunxi-sram: Add regulators child
Hi,
Quoted 17 lines · Rob Herring (Arm)
Quoted 6 lines · Chen-Yu Tsai
From: Samuel Holland <[email protected]>
Some sunxi SoCs have in-package regulators controlled by a register in the system control MMIO block. Allow a child node for this regulator device in addition to SRAM child nodes.
Quoted 7 lines
Signed-off-by Samuel Holland <[email protected]>Reviewed-by Krzysztof Kozlowski <[email protected]>Signed-off-by Chen-Yu Tsai <[email protected]>--- .../allwinner,sun4i-a10-system-control.yaml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+)
Quoted 8 lines
My bot found errors running 'make
dt_binding_check' on your patch:yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.example.dtb: syscon@3000000: regulators@3000150: False schema does not allow {'compatible': ['allwinner,sun20i-d1-system-ldos'], 'reg': [[50331984, 4]], 'ldoa': {'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]]}, 'ldob': {'regulator-name': ['vcc-dram'], 'regulator-min-microvolt': [[1500000]], 'regulator-max-microvolt': [[1500000]]}}
from schema $id: http://devicetree.org/schemas/sram/allwinner,sun4i-a10-system-control.yaml#Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.example.dtb: /example-1/syscon@3000000/regulators@3000150: failed to match any schema with compatible: ['allwinner,sun20i-d1-system-ldos']
I'm not seeing this error locally. The binding in question for 'allwinner,sun20i-d1-system-ldos' was merged in v6.10-rc1 in commit 622bab188484 ("regulator: dt-bindings: Add Allwinner D1 system LDOs").
ChenYu
Quoted 17 lines
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/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_FILEScan 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 1/3] dt-bindings: sram: sunxi-sram: Add regulators child
Quoted 24 lines · Chen-Yu Tsai
Hi,
Quoted 21 lines · Rob Herring (Arm)
Quoted 6 lines · Chen-Yu Tsai
From: Samuel Holland <[email protected]>
Some sunxi SoCs have in-package regulators controlled by a register in the system control MMIO block. Allow a child node for this regulator device in addition to SRAM child nodes.
Quoted 7 lines
Signed-off-by Samuel Holland <[email protected]>Reviewed-by Krzysztof Kozlowski <[email protected]>Signed-off-by Chen-Yu Tsai <[email protected]>--- .../allwinner,sun4i-a10-system-control.yaml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+)My bot found errors running 'make
dt_binding_check' on your patch:yamllint warnings/errors:
Quoted 8 lines
Quoted 4 lines
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.example.dtb: syscon@3000000: regulators@3000150: False schema does not allow {'compatible': ['allwinner,sun20i-d1-system-ldos'], 'reg': [[50331984, 4]], 'ldoa': {'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]]}, 'ldob': {'regulator-name': ['vcc-dram'], 'regulator-min-microvolt': [[1500000]], 'regulator-max-microvolt': [[1500000]]}}
from schema $id: http://devicetree.org/schemas/sram/allwinner,sun4i-a10-system-control.yaml#Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.example.dtb: /example-1/syscon@3000000/regulators@3000150: failed to match any schema with compatible: ['allwinner,sun20i-d1-system-ldos']I'm not seeing this error locally. The binding in question for 'allwinner,sun20i-d1-system-ldos' was merged in v6.10-rc1 in commit
622bab188484("regulator: dt-bindings: Add Allwinner D1 system LDOs").
I only tried on top of linux-next from a few days ago, but it didn't reproduce for me there. I think you're okay.
Chen-Yu Tsai
maintainerPATCH 2/3 riscv: dts: allwinner: d1s-t113: Add system LDOs
In reply to Chen-Yu TsaiFrom: Chen-Yu Tsai <[email protected]>
Now that the bindings for the system LDOs have been merged, the nodes for the system LDOs can be added. These are used on the ClockworkPi.
This was originally part of Samuel's D1 device tree series [1], but was dropped in v5 as the regulator bindings weren't merged at the time.
[1] https://lore.kernel.org/linux-sunxi/[email protected]/
--- arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi +11 -0
@@ -396,6 +396,17 @@ syscon: syscon@3000000 { ranges; #address-cells = <1>; #size-cells = <1>; + + regulators@3000150 { + compatible = "allwinner,sun20i-d1-system-ldos"; + reg = <0x3000150 0x4>; + + reg_ldoa: ldoa { + }; + + reg_ldob: ldob { + }; + }; }; dma: dma-controller@3002000 {
Signature · 1 line
2.39.2
Chen-Yu Tsai
maintainerPATCH 3/3 riscv: dts: allwinner: Add ClockworkPi and DevTerm devicetrees
In reply to Chen-Yu TsaiFrom: Samuel Holland <[email protected]>
Clockwork Tech manufactures several SoMs for their RasPi CM3-compatible "ClockworkPi" mainboard. Their R-01 SoM features the Allwinner D1 SoC. The R-01 contains only the CPU, DRAM, and always-on voltage regulation; it does not merit a separate devicetree.
The ClockworkPi mainboard features analog audio, a MIPI-DSI panel, USB host and peripheral ports, an Ampak AP6256 WiFi/Bluetooth module, and an X-Powers AXP228 PMIC for managing a Li-ion battery.
The DevTerm is a complete system which extends the ClockworkPi mainboard with a MIPI-DSI panel and a pair of expansion boards. These expansion boards provide a fan, a USB keyboard, speakers, and a thermal printer.
--- arch/riscv/boot/dts/allwinner/Makefile | 2 + .../allwinner/sun20i-d1-clockworkpi-v3.14.dts | 252 ++++++++++++++++++ .../dts/allwinner/sun20i-d1-devterm-v3.14.dts | 36 +++ 3 files changed, 290 insertions(+) create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1-clockworkpi-v3.14.dts create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1-devterm-v3.14.dts
arch/riscv/boot/dts/allwinner/Makefile +2 -0
@@ -1,4 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_SUNXI) += sun20i-d1-clockworkpi-v3.14.dtb +dtb-$(CONFIG_ARCH_SUNXI) += sun20i-d1-devterm-v3.14.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun20i-d1-dongshan-nezha-stu.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun20i-d1-lichee-rv-86-panel-480p.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun20i-d1-lichee-rv-86-panel-720p.dtb
arch/riscv/boot/dts/allwinner/sun20i-d1-clockworkpi-v3.14.dts new file +252 -0
252 lines not on this page · raw message
arch/riscv/boot/dts/allwinner/sun20i-d1-devterm-v3.14.dts new file +36 -0
@@ -0,0 +1,36 @@ +// SPDX-License-Identifier: (GPL-2.0+ or MIT) +// Copyright (C) 2022 Samuel Holland <[email protected]> + +#include "sun20i-d1-clockworkpi-v3.14.dts" + +/ { + model = "Clockwork DevTerm (R-01)"; + compatible = "clockwork,r-01-devterm-v3.14", + "clockwork,r-01-clockworkpi-v3.14", + "allwinner,sun20i-d1"; + + fan { + compatible = "gpio-fan"; + gpios = <&pio 3 10 GPIO_ACTIVE_HIGH>; /* PD10/GPIO41 */ + gpio-fan,speed-map = <0 0>, + <6000 1>; + #cooling-cells = <2>; + }; + + i2c-gpio-0 { + compatible = "i2c-gpio"; + sda-gpios = <&pio 3 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; /* PD14/GPIO44 */ + scl-gpios = <&pio 3 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; /* PD15/GPIO45 */ + #address-cells = <1>; + #size-cells = <0>; + + adc@54 { + compatible = "ti,adc101c"; + reg = <0x54>; + interrupt-parent = <&pio>; + interrupts = <4 12 IRQ_TYPE_LEVEL_LOW>; /* PE12/GPIO35 */ + vref-supply = <®_dldo2>; + #io-channel-cells = <1>; + }; + }; +};
Signature · 1 line
2.39.2
Re: (subset) [PATCH 0/3] riscv: allwinner: ClockworkPi and DevTerm devicetrees
In reply to Chen-Yu TsaiFrom: Chen-Yu Tsai <[email protected]>
Quoted 10 lines · Chen-Yu Tsai
From: Chen-Yu Tsai <[email protected]>
Hi folks,
Here are a couple patches that were originally sent by Samuel, but later dropped due to the system LDO regulator bindings not getting merged. The regulator bindings were recently resent and landed [1], so now is the time to get the rest of the stragglers in.
[...]
Applied to sunxi/drivers-for-6.11 in sunxi/linux.git, thanks!
[1/3] dt-bindings: sram: sunxi-sram: Add regulators child
https://git.kernel.org/sunxi/linux/c/3a6fb9025cdf
Best regards,
Signature · 1 line
Chen-Yu Tsai <[email protected]>
Chen-Yu Tsai
AppliedRe: (subset) [PATCH 0/3] riscv: allwinner: ClockworkPi and DevTerm devicetrees
In reply to Chen-Yu TsaiQuoted 10 lines · Chen-Yu Tsai
From: Chen-Yu Tsai <[email protected]>
Hi folks,
Here are a couple patches that were originally sent by Samuel, but later dropped due to the system LDO regulator bindings not getting merged. The regulator bindings were recently resent and landed [1], so now is the time to get the rest of the stragglers in.
[...]
Applied to sunxi/dt-for-6.11 in sunxi/linux.git, thanks!
[2/3] riscv: dts: allwinner: d1s-t113: Add system LDOs
https://git.kernel.org/sunxi/linux/c/8f2cf4442b49 [3/3] riscv: dts: allwinner: Add ClockworkPi and DevTerm devicetrees https://git.kernel.org/sunxi/linux/c/0ce1d34678e5
Best regards,
Signature · 1 line
Chen-Yu Tsai <[email protected]>