* [PATCH v1 4/9] arm64: dts: actions: do not merge disable sps node from S700
[not found] <1589472657-3930-1-git-send-email-amittomer25@gmail.com>
@ 2020-05-14 16:10 ` Amit Singh Tomar
2020-05-14 16:10 ` [PATCH v1 5/9] dt-bindings: dmaengine: convert Actions Semi Owl SoCs bindings to yaml Amit Singh Tomar
` (4 subsequent siblings)
5 siblings, 0 replies; 20+ messages in thread
From: Amit Singh Tomar @ 2020-05-14 16:10 UTC (permalink / raw)
To: andre.przywara, afaerber, manivannan.sadhasivam, robh+dt
Cc: cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
After commit 7cdf8446ed1d ("arm64: dts: actions: Add pinctrl node for
Actions Semi S700") following error has been observed while booting
Linux on Cubieboard7-lite(based on S700 SoC).
[ 0.257415] pinctrl-s700 e01b0000.pinctrl: can't request region for
resource [mem 0xe01b0000-0xe01b0fff]
[ 0.266902] pinctrl-s700: probe of e01b0000.pinctrl failed with error -16
This is due to the fact that memory range for "sps" power domain controller
clashes with pinctrl.
This commit disable "sps" to avoid this conflict and let us test DMA and MMC
related changes.
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
---
Changes since RFC:
* kept as do not merge.
---
arch/arm64/boot/dts/actions/s700.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/actions/s700.dtsi b/arch/arm64/boot/dts/actions/s700.dtsi
index 2006ad5424fa..0397c5dd3dec 100644
--- a/arch/arm64/boot/dts/actions/s700.dtsi
+++ b/arch/arm64/boot/dts/actions/s700.dtsi
@@ -220,6 +220,7 @@
compatible = "actions,s700-sps";
reg = <0x0 0xe01b0100 0x0 0x100>;
#power-domain-cells = <1>;
+ status = "disabled";
};
timer: timer@e024c000 {
--
2.7.4
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v1 5/9] dt-bindings: dmaengine: convert Actions Semi Owl SoCs bindings to yaml
[not found] <1589472657-3930-1-git-send-email-amittomer25@gmail.com>
2020-05-14 16:10 ` [PATCH v1 4/9] arm64: dts: actions: do not merge disable sps node from S700 Amit Singh Tomar
@ 2020-05-14 16:10 ` Amit Singh Tomar
2020-05-15 15:54 ` André Przywara
2020-05-14 16:10 ` [PATCH v1 6/9] arm64: dts: actions: Add DMA Controller for S700 Amit Singh Tomar
` (3 subsequent siblings)
5 siblings, 1 reply; 20+ messages in thread
From: Amit Singh Tomar @ 2020-05-14 16:10 UTC (permalink / raw)
To: andre.przywara, afaerber, manivannan.sadhasivam, robh+dt
Cc: cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
Converts the device tree bindings for the Actions Semi Owl SoCs DMA
Controller over to YAML schemas.
It also adds new compatible string "actions,s700-dma" to match
the driver.
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
---
New patch, was not there in RFC.
---
Documentation/devicetree/bindings/dma/owl-dma.txt | 47 ------------
Documentation/devicetree/bindings/dma/owl-dma.yaml | 84 ++++++++++++++++++++++
2 files changed, 84 insertions(+), 47 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/dma/owl-dma.txt
create mode 100644 Documentation/devicetree/bindings/dma/owl-dma.yaml
diff --git a/Documentation/devicetree/bindings/dma/owl-dma.txt b/Documentation/devicetree/bindings/dma/owl-dma.txt
deleted file mode 100644
index 03e9bb12b75f..000000000000
--- a/Documentation/devicetree/bindings/dma/owl-dma.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-* Actions Semi Owl SoCs DMA controller
-
-This binding follows the generic DMA bindings defined in dma.txt.
-
-Required properties:
-- compatible: Should be "actions,s900-dma".
-- reg: Should contain DMA registers location and length.
-- interrupts: Should contain 4 interrupts shared by all channel.
-- #dma-cells: Must be <1>. Used to represent the number of integer
- cells in the dmas property of client device.
-- dma-channels: Physical channels supported.
-- dma-requests: Number of DMA request signals supported by the controller.
- Refer to Documentation/devicetree/bindings/dma/dma.txt
-- clocks: Phandle and Specifier of the clock feeding the DMA controller.
-
-Example:
-
-Controller:
- dma: dma-controller@e0260000 {
- compatible = "actions,s900-dma";
- reg = <0x0 0xe0260000 0x0 0x1000>;
- interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
- #dma-cells = <1>;
- dma-channels = <12>;
- dma-requests = <46>;
- clocks = <&clock CLK_DMAC>;
- };
-
-Client:
-
-DMA clients connected to the Actions Semi Owl SoCs DMA controller must
-use the format described in the dma.txt file, using a two-cell specifier
-for each channel.
-
-The two cells in order are:
-1. A phandle pointing to the DMA controller.
-2. The channel id.
-
-uart5: serial@e012a000 {
- ...
- dma-names = "tx", "rx";
- dmas = <&dma 26>, <&dma 27>;
- ...
-};
diff --git a/Documentation/devicetree/bindings/dma/owl-dma.yaml b/Documentation/devicetree/bindings/dma/owl-dma.yaml
new file mode 100644
index 000000000000..12e68c0ece67
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/owl-dma.yaml
@@ -0,0 +1,84 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/dma/owl-dma.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Actions Semi Owl SoCs DMA controller
+
+description: |
+ The OWL DMA is a general-purpose direct memory access controller capable of
+ supporting 10 and 12 independent DMA channels for S700 and S900 SoCs
+ respectively.
+ DMA clients connected to the Actions Semi Owl SoCs DMA controller must
+ use the format described in the owl-dma.yaml file, using a two-cell specifier
+ for each channel.
+
+ The two cells in order are:
+ 1. A phandle pointing to the DMA controller.
+ 2. The channel id.
+
+ uart5: serial@e012a000 {
+ ...
+ dma-names = "tx", "rx";
+ dmas = <&dma 26>, <&dma 27>;
+ ...
+ };
+
+maintainers:
+ - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
+
+allOf:
+ - $ref: "dma-controller.yaml#"
+
+properties:
+ compatible:
+ enum:
+ - actions,s900-dma
+ - actions,s700-dma
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 4
+
+ "#dma-cells":
+ const: 1
+
+ dma-channels:
+ maxItems: 1
+
+ dma-requests:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - "#dma-cells"
+ - dma-channels
+ - dma-requests
+ - clocks
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/clock/actions,s700-cmu.h>
+ dma: dma-controller@e0260000 {
+ compatible = "actions,s900-dma";
+ reg = <0x0 0xe0260000 0x0 0x1000>;
+ interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
+ #dma-cells = <1>;
+ dma-channels = <12>;
+ dma-requests = <46>;
+ clocks = <&clock CLK_DMAC>;
+ };
+
+...
--
2.7.4
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v1 6/9] arm64: dts: actions: Add DMA Controller for S700
[not found] <1589472657-3930-1-git-send-email-amittomer25@gmail.com>
2020-05-14 16:10 ` [PATCH v1 4/9] arm64: dts: actions: do not merge disable sps node from S700 Amit Singh Tomar
2020-05-14 16:10 ` [PATCH v1 5/9] dt-bindings: dmaengine: convert Actions Semi Owl SoCs bindings to yaml Amit Singh Tomar
@ 2020-05-14 16:10 ` Amit Singh Tomar
2020-05-14 16:10 ` [PATCH v1 7/9] dt-bindings: reset: s700: Add binding constants for mmc Amit Singh Tomar
` (2 subsequent siblings)
5 siblings, 0 replies; 20+ messages in thread
From: Amit Singh Tomar @ 2020-05-14 16:10 UTC (permalink / raw)
To: andre.przywara, afaerber, manivannan.sadhasivam, robh+dt
Cc: cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
This commit adds DAM controller present on Actions S700, it differs from
S900 in terms of number of dma channels and requests.
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
---
Changes since RFC:
* No Change.
---
arch/arm64/boot/dts/actions/s700.dtsi | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm64/boot/dts/actions/s700.dtsi b/arch/arm64/boot/dts/actions/s700.dtsi
index 0397c5dd3dec..56f2f84812cb 100644
--- a/arch/arm64/boot/dts/actions/s700.dtsi
+++ b/arch/arm64/boot/dts/actions/s700.dtsi
@@ -245,5 +245,18 @@
<GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
};
+
+ dma: dma-controller@e0230000 {
+ compatible = "actions,s700-dma";
+ reg = <0x0 0xe0230000 0x0 0x1000>;
+ interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
+ #dma-cells = <1>;
+ dma-channels = <10>;
+ dma-requests = <44>;
+ clocks = <&cmu CLK_DMAC>;
+ };
};
};
--
2.7.4
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v1 7/9] dt-bindings: reset: s700: Add binding constants for mmc
[not found] <1589472657-3930-1-git-send-email-amittomer25@gmail.com>
` (2 preceding siblings ...)
2020-05-14 16:10 ` [PATCH v1 6/9] arm64: dts: actions: Add DMA Controller for S700 Amit Singh Tomar
@ 2020-05-14 16:10 ` Amit Singh Tomar
2020-05-14 16:10 ` [PATCH v1 8/9] arm64: dts: actions: Add MMC controller support for S700 Amit Singh Tomar
2020-05-14 16:10 ` [PATCH v1 9/9] arm64: dts: actions: Add uSD support for Cubieboard7 Amit Singh Tomar
5 siblings, 0 replies; 20+ messages in thread
From: Amit Singh Tomar @ 2020-05-14 16:10 UTC (permalink / raw)
To: andre.przywara, afaerber, manivannan.sadhasivam, robh+dt
Cc: cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
This commit adds device tree binding reset constants for mmc controller
present on Actions S700 Soc.
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
---
Changes since RFC:
* added Rob's acked-by tag
---
include/dt-bindings/reset/actions,s700-reset.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/dt-bindings/reset/actions,s700-reset.h b/include/dt-bindings/reset/actions,s700-reset.h
index 5e3b16b8ef53..a3118de6d7aa 100644
--- a/include/dt-bindings/reset/actions,s700-reset.h
+++ b/include/dt-bindings/reset/actions,s700-reset.h
@@ -30,5 +30,8 @@
#define RESET_UART4 20
#define RESET_UART5 21
#define RESET_UART6 22
+#define RESET_SD0 23
+#define RESET_SD1 24
+#define RESET_SD2 25
#endif /* __DT_BINDINGS_ACTIONS_S700_RESET_H */
--
2.7.4
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v1 8/9] arm64: dts: actions: Add MMC controller support for S700
[not found] <1589472657-3930-1-git-send-email-amittomer25@gmail.com>
` (3 preceding siblings ...)
2020-05-14 16:10 ` [PATCH v1 7/9] dt-bindings: reset: s700: Add binding constants for mmc Amit Singh Tomar
@ 2020-05-14 16:10 ` Amit Singh Tomar
2020-05-15 15:01 ` André Przywara
2020-05-14 16:10 ` [PATCH v1 9/9] arm64: dts: actions: Add uSD support for Cubieboard7 Amit Singh Tomar
5 siblings, 1 reply; 20+ messages in thread
From: Amit Singh Tomar @ 2020-05-14 16:10 UTC (permalink / raw)
To: andre.przywara, afaerber, manivannan.sadhasivam, robh+dt
Cc: cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
This commits adds support for MMC controllers present on Actions S700 SoC,
there are 3 MMC controllers in this SoC which can be used for accessing
SD/EMMC/SDIO cards.
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
---
Changes since RFC:
* No change.
---
arch/arm64/boot/dts/actions/s700.dtsi | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/arch/arm64/boot/dts/actions/s700.dtsi b/arch/arm64/boot/dts/actions/s700.dtsi
index 56f2f84812cb..3f1fc3e48415 100644
--- a/arch/arm64/boot/dts/actions/s700.dtsi
+++ b/arch/arm64/boot/dts/actions/s700.dtsi
@@ -258,5 +258,38 @@
dma-requests = <44>;
clocks = <&cmu CLK_DMAC>;
};
+
+ mmc0: mmc@e0210000 {
+ compatible = "actions,owl-mmc";
+ reg = <0x0 0xe0210000 0x0 0x4000>;
+ interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cmu CLK_SD0>;
+ resets = <&cmu RESET_SD0>;
+ dmas = <&dma 2>;
+ dma-names = "mmc";
+ status = "disabled";
+ };
+
+ mmc1: mmc@e0214000 {
+ compatible = "actions,owl-mmc";
+ reg = <0x0 0xe0214000 0x0 0x4000>;
+ interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cmu CLK_SD1>;
+ resets = <&cmu RESET_SD1>;
+ dmas = <&dma 3>;
+ dma-names = "mmc";
+ status = "disabled";
+ };
+
+ mmc2: mmc@e0218000 {
+ compatible = "actions,owl-mmc";
+ reg = <0x0 0xe0218000 0x0 0x4000>;
+ interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cmu CLK_SD2>;
+ resets = <&cmu RESET_SD2>;
+ dmas = <&dma 4>;
+ dma-names = "mmc";
+ status = "disabled";
+ };
};
};
--
2.7.4
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v1 9/9] arm64: dts: actions: Add uSD support for Cubieboard7
[not found] <1589472657-3930-1-git-send-email-amittomer25@gmail.com>
` (4 preceding siblings ...)
2020-05-14 16:10 ` [PATCH v1 8/9] arm64: dts: actions: Add MMC controller support for S700 Amit Singh Tomar
@ 2020-05-14 16:10 ` Amit Singh Tomar
5 siblings, 0 replies; 20+ messages in thread
From: Amit Singh Tomar @ 2020-05-14 16:10 UTC (permalink / raw)
To: andre.przywara, afaerber, manivannan.sadhasivam, robh+dt
Cc: cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
This commit adds uSD support for Cubieboard7 board based on Actions Semi
S700 SoC. SD0 is connected to uSD slot. Since there is no PMIC support
added yet, fixed regulator has been used as a regulator node.
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
---
Changes since RFC:
* No change.
---
arch/arm64/boot/dts/actions/s700-cubieboard7.dts | 41 ++++++++++++++++++++++++
arch/arm64/boot/dts/actions/s700.dtsi | 1 +
2 files changed, 42 insertions(+)
diff --git a/arch/arm64/boot/dts/actions/s700-cubieboard7.dts b/arch/arm64/boot/dts/actions/s700-cubieboard7.dts
index 63e375cd9eb4..ec117eb12f3a 100644
--- a/arch/arm64/boot/dts/actions/s700-cubieboard7.dts
+++ b/arch/arm64/boot/dts/actions/s700-cubieboard7.dts
@@ -13,6 +13,7 @@
aliases {
serial3 = &uart3;
+ mmc0 = &mmc0;
};
chosen {
@@ -28,6 +29,23 @@
device_type = "memory";
reg = <0x1 0xe0000000 0x0 0x0>;
};
+
+ /* Fixed regulator used in the absence of PMIC */
+ vcc_3v1: vcc-3v1 {
+ compatible = "regulator-fixed";
+ regulator-name = "fixed-3.1V";
+ regulator-min-microvolt = <3100000>;
+ regulator-max-microvolt = <3100000>;
+ };
+
+ /* Fixed regulator used in the absence of PMIC */
+ sd_vcc: sd-vcc {
+ compatible = "regulator-fixed";
+ regulator-name = "fixed-3.1V";
+ regulator-min-microvolt = <3100000>;
+ regulator-max-microvolt = <3100000>;
+ regulator-always-on;
+ };
};
&i2c0 {
@@ -81,6 +99,14 @@
bias-pull-up;
};
};
+
+ mmc0_default: mmc0_default {
+ pinmux {
+ groups = "sd0_d0_mfp", "sd0_d1_mfp", "sd0_d2_d3_mfp",
+ "sd0_cmd_mfp", "sd0_clk_mfp";
+ function = "sd0";
+ };
+ };
};
&timer {
@@ -90,3 +116,18 @@
&uart3 {
status = "okay";
};
+
+/* uSD */
+&mmc0 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc0_default>;
+ cd-gpios = <&pinctrl 120 GPIO_ACTIVE_LOW>;
+ no-sdio;
+ no-mmc;
+ no-1-8-v;
+ bus-width = <4>;
+ vmmc-supply = <&sd_vcc>;
+ vqmmc-supply = <&sd_vcc>;
+};
+
diff --git a/arch/arm64/boot/dts/actions/s700.dtsi b/arch/arm64/boot/dts/actions/s700.dtsi
index 3f1fc3e48415..8a541dd48f61 100644
--- a/arch/arm64/boot/dts/actions/s700.dtsi
+++ b/arch/arm64/boot/dts/actions/s700.dtsi
@@ -4,6 +4,7 @@
*/
#include <dt-bindings/clock/actions,s700-cmu.h>
+#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/reset/actions,s700-reset.h>
--
2.7.4
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v1 8/9] arm64: dts: actions: Add MMC controller support for S700
2020-05-14 16:10 ` [PATCH v1 8/9] arm64: dts: actions: Add MMC controller support for S700 Amit Singh Tomar
@ 2020-05-15 15:01 ` André Przywara
2020-05-15 18:41 ` Amit Tomer
2020-05-17 11:56 ` Amit Tomer
0 siblings, 2 replies; 20+ messages in thread
From: André Przywara @ 2020-05-15 15:01 UTC (permalink / raw)
To: Amit Singh Tomar, afaerber, manivannan.sadhasivam, robh+dt
Cc: cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
On 14/05/2020 17:10, Amit Singh Tomar wrote:
Hi,
> This commits adds support for MMC controllers present on Actions S700 SoC,
> there are 3 MMC controllers in this SoC which can be used for accessing
> SD/EMMC/SDIO cards.
>
> Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
> ---
> Changes since RFC:
> * No change.
> ---
> arch/arm64/boot/dts/actions/s700.dtsi | 33 +++++++++++++++++++++++++++++++++
> 1 file changed, 33 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/actions/s700.dtsi b/arch/arm64/boot/dts/actions/s700.dtsi
> index 56f2f84812cb..3f1fc3e48415 100644
> --- a/arch/arm64/boot/dts/actions/s700.dtsi
> +++ b/arch/arm64/boot/dts/actions/s700.dtsi
> @@ -258,5 +258,38 @@
> dma-requests = <44>;
> clocks = <&cmu CLK_DMAC>;
> };
> +
> + mmc0: mmc@e0210000 {
> + compatible = "actions,owl-mmc";
I was wondering if we should add a SoC specific compatible here, to be
on the safe side. The BSP driver seems to differentiate between S900 and
S700, although it looks like only to cover some misplaced platform setup.
But if we later find a problem, the DTs stay the same, and the driver
can easily be fixed.
So, using "actions,s700-mmc", "actions,owl-mmc" here, adding this combo
to the binding, but leaving the driver alone for now.
Cheers,
Andre
> + reg = <0x0 0xe0210000 0x0 0x4000>;
> + interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&cmu CLK_SD0>;
> + resets = <&cmu RESET_SD0>;
> + dmas = <&dma 2>;
> + dma-names = "mmc";
> + status = "disabled";
> + };
> +
> + mmc1: mmc@e0214000 {
> + compatible = "actions,owl-mmc";
> + reg = <0x0 0xe0214000 0x0 0x4000>;
> + interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&cmu CLK_SD1>;
> + resets = <&cmu RESET_SD1>;
> + dmas = <&dma 3>;
> + dma-names = "mmc";
> + status = "disabled";
> + };
> +
> + mmc2: mmc@e0218000 {
> + compatible = "actions,owl-mmc";
> + reg = <0x0 0xe0218000 0x0 0x4000>;
> + interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&cmu CLK_SD2>;
> + resets = <&cmu RESET_SD2>;
> + dmas = <&dma 4>;
> + dma-names = "mmc";
> + status = "disabled";
> + };
> };
> };
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 5/9] dt-bindings: dmaengine: convert Actions Semi Owl SoCs bindings to yaml
2020-05-14 16:10 ` [PATCH v1 5/9] dt-bindings: dmaengine: convert Actions Semi Owl SoCs bindings to yaml Amit Singh Tomar
@ 2020-05-15 15:54 ` André Przywara
2020-05-15 19:05 ` Amit Tomer
2020-05-16 18:21 ` Amit Tomer
0 siblings, 2 replies; 20+ messages in thread
From: André Przywara @ 2020-05-15 15:54 UTC (permalink / raw)
To: Amit Singh Tomar, afaerber, manivannan.sadhasivam, robh+dt
Cc: cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
On 14/05/2020 17:10, Amit Singh Tomar wrote:
Hi,
> Converts the device tree bindings for the Actions Semi Owl SoCs DMA
> Controller over to YAML schemas.
>
> It also adds new compatible string "actions,s700-dma" to match
> the driver.
>
> Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
> ---
> New patch, was not there in RFC.
> ---
> Documentation/devicetree/bindings/dma/owl-dma.txt | 47 ------------
> Documentation/devicetree/bindings/dma/owl-dma.yaml | 84 ++++++++++++++++++++++
> 2 files changed, 84 insertions(+), 47 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/dma/owl-dma.txt
> create mode 100644 Documentation/devicetree/bindings/dma/owl-dma.yaml
>
> diff --git a/Documentation/devicetree/bindings/dma/owl-dma.txt b/Documentation/devicetree/bindings/dma/owl-dma.txt
> deleted file mode 100644
> index 03e9bb12b75f..000000000000
> --- a/Documentation/devicetree/bindings/dma/owl-dma.txt
> +++ /dev/null
> @@ -1,47 +0,0 @@
> -* Actions Semi Owl SoCs DMA controller
> -
> -This binding follows the generic DMA bindings defined in dma.txt.
> -
> -Required properties:
> -- compatible: Should be "actions,s900-dma".
> -- reg: Should contain DMA registers location and length.
> -- interrupts: Should contain 4 interrupts shared by all channel.
> -- #dma-cells: Must be <1>. Used to represent the number of integer
> - cells in the dmas property of client device.
> -- dma-channels: Physical channels supported.
> -- dma-requests: Number of DMA request signals supported by the controller.
> - Refer to Documentation/devicetree/bindings/dma/dma.txt
> -- clocks: Phandle and Specifier of the clock feeding the DMA controller.
> -
> -Example:
> -
> -Controller:
> - dma: dma-controller@e0260000 {
> - compatible = "actions,s900-dma";
> - reg = <0x0 0xe0260000 0x0 0x1000>;
> - interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
> - <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
> - <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
> - <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
> - #dma-cells = <1>;
> - dma-channels = <12>;
> - dma-requests = <46>;
> - clocks = <&clock CLK_DMAC>;
> - };
> -
> -Client:
> -
> -DMA clients connected to the Actions Semi Owl SoCs DMA controller must
> -use the format described in the dma.txt file, using a two-cell specifier
> -for each channel.
> -
> -The two cells in order are:
> -1. A phandle pointing to the DMA controller.
> -2. The channel id.
> -
> -uart5: serial@e012a000 {
> - ...
> - dma-names = "tx", "rx";
> - dmas = <&dma 26>, <&dma 27>;
> - ...
> -};
> diff --git a/Documentation/devicetree/bindings/dma/owl-dma.yaml b/Documentation/devicetree/bindings/dma/owl-dma.yaml
> new file mode 100644
> index 000000000000..12e68c0ece67
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/dma/owl-dma.yaml
> @@ -0,0 +1,84 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/dma/owl-dma.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Actions Semi Owl SoCs DMA controller
> +
> +description: |
> + The OWL DMA is a general-purpose direct memory access controller capable of
> + supporting 10 and 12 independent DMA channels for S700 and S900 SoCs
> + respectively.
From here on the description is pretty much how DMA controller
references work in general, so I don't see the point of including this
in the description here.
> + DMA clients connected to the Actions Semi Owl SoCs DMA controller must
> + use the format described in the owl-dma.yaml file, using a two-cell specifier
> + for each channel.
> +
> + The two cells in order are:
> + 1. A phandle pointing to the DMA controller.
> + 2. The channel id.
> +
> + uart5: serial@e012a000 {
> + ...
> + dma-names = "tx", "rx";
> + dmas = <&dma 26>, <&dma 27>;
> + ...
> + };
> +
> +maintainers:
> + - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> +
> +allOf:
> + - $ref: "dma-controller.yaml#"
> +
> +properties:
> + compatible:
> + enum:
> + - actions,s900-dma
> + - actions,s700-dma
> +
> + reg:
> + maxItems: 1
Could you replace those "maxItems: 1" here and below with:
- description: ...., copying in the explanation from the .txt binding?
That should serve the same purpose as "maxItems: 1", but is more
descriptive.
> +
> + interrupts:
> + maxItems: 4
Please mention that the controller supports 4 interrupts, which are
freely assignable to the interrupt channels.
(The kernel chose to use only one, but that's nothing the binding is
concerned about).
> +
> + "#dma-cells":
> + const: 1
> +
> + dma-channels:
> + maxItems: 1
> +
> + dma-requests:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - "#dma-cells"
> + - dma-channels
> + - dma-requests
> + - clocks
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/clock/actions,s700-cmu.h>
I would drop this line and replace CLK_DMAC with some number below, to
keep this *example* as independent as possible.
Cheers,
Andre
> + dma: dma-controller@e0260000 {
> + compatible = "actions,s900-dma";
> + reg = <0x0 0xe0260000 0x0 0x1000>;
> + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
> + #dma-cells = <1>;
> + dma-channels = <12>;
> + dma-requests = <46>;
> + clocks = <&clock CLK_DMAC>;
> + };
> +
> +...
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 8/9] arm64: dts: actions: Add MMC controller support for S700
2020-05-15 15:01 ` André Przywara
@ 2020-05-15 18:41 ` Amit Tomer
2020-05-17 11:56 ` Amit Tomer
1 sibling, 0 replies; 20+ messages in thread
From: Amit Tomer @ 2020-05-15 18:41 UTC (permalink / raw)
To: André Przywara
Cc: Andreas Färber, Manivannan Sadhasivam, Rob Herring,
cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
Hi,
> I was wondering if we should add a SoC specific compatible here, to be
> on the safe side. The BSP driver seems to differentiate between S900 and
> S700, although it looks like only to cover some misplaced platform setup.
>
> But if we later find a problem, the DTs stay the same, and the driver
> can easily be fixed.
>
> So, using "actions,s700-mmc", "actions,owl-mmc" here, adding this combo
> to the binding, but leaving the driver alone for now.
I think, it can be a good idea to have this extra compatible string that may
be needed when MMC driver evolves to support more features which requires
data to be differentiated based on SoC.
Thanks
Amit
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 5/9] dt-bindings: dmaengine: convert Actions Semi Owl SoCs bindings to yaml
2020-05-15 15:54 ` André Przywara
@ 2020-05-15 19:05 ` Amit Tomer
2020-05-15 19:24 ` Amit Tomer
2020-05-16 18:21 ` Amit Tomer
1 sibling, 1 reply; 20+ messages in thread
From: Amit Tomer @ 2020-05-15 19:05 UTC (permalink / raw)
To: André Przywara
Cc: Andreas Färber, Manivannan Sadhasivam, Rob Herring,
cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
Hi,
> Could you replace those "maxItems: 1" here and below with:
> - description: ...., copying in the explanation from the .txt binding?
> That should serve the same purpose as "maxItems: 1", but is more
> descriptive.
But having it under reg: looks bit odd to me, no?
reg:
- description: ...
Or did you mean something else ?
Thanks
-Amit
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 5/9] dt-bindings: dmaengine: convert Actions Semi Owl SoCs bindings to yaml
2020-05-15 19:05 ` Amit Tomer
@ 2020-05-15 19:24 ` Amit Tomer
0 siblings, 0 replies; 20+ messages in thread
From: Amit Tomer @ 2020-05-15 19:24 UTC (permalink / raw)
To: André Przywara
Cc: Andreas Färber, Manivannan Sadhasivam, Rob Herring,
cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
> But having it under reg: looks bit odd to me, no?
>
> reg:
> - description: ...
>
> Or did you mean something else ?
Ah, I see you wanted to have description for individual items, for instance one
for reg, one for interrupts and clock etc..
Thanks
Amit
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 5/9] dt-bindings: dmaengine: convert Actions Semi Owl SoCs bindings to yaml
2020-05-15 15:54 ` André Przywara
2020-05-15 19:05 ` Amit Tomer
@ 2020-05-16 18:21 ` Amit Tomer
1 sibling, 0 replies; 20+ messages in thread
From: Amit Tomer @ 2020-05-16 18:21 UTC (permalink / raw)
To: André Przywara
Cc: Andreas Färber, Manivannan Sadhasivam, Rob Herring,
cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
Hi,
> (The kernel chose to use only one, but that's nothing the binding is
> concerned about).
But there are four different interrupt events corresponds to these four
interrupts.
So, if Kernel chooses to have only one interrupt , how other events
would be notified ?
Thanks
-Amit
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 8/9] arm64: dts: actions: Add MMC controller support for S700
2020-05-15 15:01 ` André Przywara
2020-05-15 18:41 ` Amit Tomer
@ 2020-05-17 11:56 ` Amit Tomer
2020-05-17 16:42 ` André Przywara
1 sibling, 1 reply; 20+ messages in thread
From: Amit Tomer @ 2020-05-17 11:56 UTC (permalink / raw)
To: André Przywara
Cc: Andreas Färber, Manivannan Sadhasivam, Rob Herring,
cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
Hi,
> So, using "actions,s700-mmc", "actions,owl-mmc" here, adding this combo
> to the binding, but leaving the driver alone for now.
But if we leave this new string from driver , there would be DT
validation issue.
Are we okay with it ?
Thanks
-Amit
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 8/9] arm64: dts: actions: Add MMC controller support for S700
2020-05-17 11:56 ` Amit Tomer
@ 2020-05-17 16:42 ` André Przywara
2020-05-17 17:12 ` Amit Tomer
0 siblings, 1 reply; 20+ messages in thread
From: André Przywara @ 2020-05-17 16:42 UTC (permalink / raw)
To: Amit Tomer
Cc: Andreas Färber, Manivannan Sadhasivam, Rob Herring,
cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
On 17/05/2020 12:56, Amit Tomer wrote:
> Hi,
>
>> So, using "actions,s700-mmc", "actions,owl-mmc" here, adding this combo
>> to the binding, but leaving the driver alone for now.
>
> But if we leave this new string from driver , there would be DT
> validation issue.
I don't understand what this has to do with the driver, but I asked
above to also change the binding, allowing this compatible string
combination.
Cheers,
Andre
> Are we okay with it ?
>
> Thanks
> -Amit
>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 8/9] arm64: dts: actions: Add MMC controller support for S700
2020-05-17 16:42 ` André Przywara
@ 2020-05-17 17:12 ` Amit Tomer
2020-05-17 21:30 ` André Przywara
0 siblings, 1 reply; 20+ messages in thread
From: Amit Tomer @ 2020-05-17 17:12 UTC (permalink / raw)
To: André Przywara
Cc: Andreas Färber, Manivannan Sadhasivam, Rob Herring,
cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
> I don't understand what this has to do with the driver, but I asked
> above to also change the binding, allowing this compatible string
> combination.
if we add these two strings "actions,s700-mmc", "actions,owl-mmc" to dts file
and leave the driver as it. Wouldn't this be mismatch(as driver only
has "actions,owl-mmc"
and DTS has two strings).
Shouldn't that be concerned about ?
Thanks
-Amit
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 8/9] arm64: dts: actions: Add MMC controller support for S700
2020-05-17 17:12 ` Amit Tomer
@ 2020-05-17 21:30 ` André Przywara
2020-05-18 3:06 ` Amit Tomer
0 siblings, 1 reply; 20+ messages in thread
From: André Przywara @ 2020-05-17 21:30 UTC (permalink / raw)
To: Amit Tomer
Cc: Andreas Färber, Manivannan Sadhasivam, Rob Herring,
cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
On 17/05/2020 18:12, Amit Tomer wrote:
>> I don't understand what this has to do with the driver, but I asked
>> above to also change the binding, allowing this compatible string
>> combination.
> if we add these two strings "actions,s700-mmc", "actions,owl-mmc" to dts file
> and leave the driver as it. Wouldn't this be mismatch(as driver only
> has "actions,owl-mmc"
> and DTS has two strings).
>
> Shouldn't that be concerned about ?
I recommend reading the DT spec, chapter 2.3.1 "compatible":
https://github.com/devicetree-org/devicetree-specification/releases/download/v0.3/devicetree-specification-v0.3.pdf
Cheers,
Andre
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 8/9] arm64: dts: actions: Add MMC controller support for S700
2020-05-17 21:30 ` André Przywara
@ 2020-05-18 3:06 ` Amit Tomer
2020-05-18 6:17 ` Manivannan Sadhasivam
0 siblings, 1 reply; 20+ messages in thread
From: Amit Tomer @ 2020-05-18 3:06 UTC (permalink / raw)
To: André Przywara
Cc: Andreas Färber, Manivannan Sadhasivam, Rob Herring,
cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
Hi,
> I recommend reading the DT spec, chapter 2.3.1 "compatible":
> https://github.com/devicetree-org/devicetree-specification/releases/download/v0.3/devicetree-specification-v0.3.pdf
My point is more about, DT validation is not happy about this situation.
For instance when I run dt-validate, do see following:
/home/amit/work/kernel_work/linux/arch/arm64/boot/dts/actions/s700-cubieboard7.dt.yaml:
mmc@e0210000: compatible: Additional items are not allowed
('actions,s700-mmc' was unexpected)
and I am not sure if this is because DT and driver has different
number of compatible strings.
Thanks
Amit
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 8/9] arm64: dts: actions: Add MMC controller support for S700
2020-05-18 3:06 ` Amit Tomer
@ 2020-05-18 6:17 ` Manivannan Sadhasivam
2020-05-18 8:29 ` André Przywara
0 siblings, 1 reply; 20+ messages in thread
From: Manivannan Sadhasivam @ 2020-05-18 6:17 UTC (permalink / raw)
To: Amit Tomer
Cc: André Przywara, Andreas Färber, Rob Herring,
cristian.ciocaltea, linux-arm-kernel, linux-actions, devicetree
On 0518, Amit Tomer wrote:
> Hi,
>
> > I recommend reading the DT spec, chapter 2.3.1 "compatible":
> > https://github.com/devicetree-org/devicetree-specification/releases/download/v0.3/devicetree-specification-v0.3.pdf
>
> My point is more about, DT validation is not happy about this situation.
> For instance when I run dt-validate, do see following:
>
> /home/amit/work/kernel_work/linux/arch/arm64/boot/dts/actions/s700-cubieboard7.dt.yaml:
> mmc@e0210000: compatible: Additional items are not allowed
> ('actions,s700-mmc' was unexpected)
>
> and I am not sure if this is because DT and driver has different
> number of compatible strings.
>
Yeah, the DT YAML validation tool doesn't allow this. And there were patches
removing the additional compatible from DTS.
I don't know if the DT fallback is discouraged or not.
Anyway, is enough investigation done to justify that we need SoC specific tweaks
in the driver? I think I did look into the downstream code for s700/s500 while
upstreaming this driver and convinced myself that the same driver could be
reused without modifications.
Thanks,
Mani
> Thanks
> Amit
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 8/9] arm64: dts: actions: Add MMC controller support for S700
2020-05-18 6:17 ` Manivannan Sadhasivam
@ 2020-05-18 8:29 ` André Przywara
2020-05-18 9:48 ` Andreas Färber
0 siblings, 1 reply; 20+ messages in thread
From: André Przywara @ 2020-05-18 8:29 UTC (permalink / raw)
To: Manivannan Sadhasivam, Amit Tomer
Cc: Andreas Färber, Rob Herring, cristian.ciocaltea,
linux-arm-kernel, linux-actions, devicetree
On 18/05/2020 07:17, Manivannan Sadhasivam wrote:
> On 0518, Amit Tomer wrote:
>> Hi,
>>
>>> I recommend reading the DT spec, chapter 2.3.1 "compatible":
>>> https://github.com/devicetree-org/devicetree-specification/releases/download/v0.3/devicetree-specification-v0.3.pdf
>>
>> My point is more about, DT validation is not happy about this situation.
>> For instance when I run dt-validate, do see following:
>>
>> /home/amit/work/kernel_work/linux/arch/arm64/boot/dts/actions/s700-cubieboard7.dt.yaml:
>> mmc@e0210000: compatible: Additional items are not allowed
>> ('actions,s700-mmc' was unexpected)
>>
>> and I am not sure if this is because DT and driver has different
>> number of compatible strings.
This has nothing to do with the driver or the actual .dts(i), that's
purely a binding issue.
> Yeah, the DT YAML validation tool doesn't allow this. And there were patches
> removing the additional compatible from DTS.
There are tons of examples of how this is done in the .yaml bindings:
properties:
compatible:
oneOf:
- const: actions,owl-mmc
- items:
- const: action,s700-mmc
- const: actions,owl-mmc
Adding more alternatives would replace the lines after items:
- enum
- action,s700-mmc
- action,s900-mmc
- const: actions,owl-mmc
> I don't know if the DT fallback is discouraged or not.
I don't know if there is an "official" statement on this, but last thing
I heard, adding SoC specific compatibles to generic fallback strings was
encouraged. Hence my proposal, to add one.
> Anyway, is enough investigation done to justify that we need SoC specific tweaks
> in the driver? I think I did look into the downstream code for s700/s500 while
> upstreaming this driver and convinced myself that the same driver could be
> reused without modifications.
It wouldn't be the first time some tiny incompatibility would be
discovered later, also there is always the chance of a hardware errata.
So better safe than sorry.
Cheers,
Andre.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v1 8/9] arm64: dts: actions: Add MMC controller support for S700
2020-05-18 8:29 ` André Przywara
@ 2020-05-18 9:48 ` Andreas Färber
0 siblings, 0 replies; 20+ messages in thread
From: Andreas Färber @ 2020-05-18 9:48 UTC (permalink / raw)
To: André Przywara, Manivannan Sadhasivam, Amit Tomer
Cc: Rob Herring, cristian.ciocaltea, linux-arm-kernel, linux-actions,
devicetree
Hi,
Am 18.05.20 um 10:29 schrieb André Przywara:
> On 18/05/2020 07:17, Manivannan Sadhasivam wrote:
>> I don't know if the DT fallback is discouraged or not.
>
> I don't know if there is an "official" statement on this, but last thing
> I heard, adding SoC specific compatibles to generic fallback strings was
> encouraged. Hence my proposal, to add one.
I believe the official guidance would be to never be too generic in the
first place. I.e., prefer s500 (oldest model tested) over generic owl.
But now that we have it, prepending a more specific one (rather than
replacing it) is the only way to go. In that case the binding needs to
be changed to allow both the old and the recommended new variant, as
André points out. Please add a comment to help bindings readers choose
which of the two to adopt then.
Amit, next time please quote errors you see right away, that could've
spared a handful of messages discussing about the driver when it was in
fact just a bindings issue (which you had been asked to fix by André).
Regards,
Andreas
--
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer
HRB 36809 (AG Nürnberg)
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2020-05-18 9:48 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1589472657-3930-1-git-send-email-amittomer25@gmail.com>
2020-05-14 16:10 ` [PATCH v1 4/9] arm64: dts: actions: do not merge disable sps node from S700 Amit Singh Tomar
2020-05-14 16:10 ` [PATCH v1 5/9] dt-bindings: dmaengine: convert Actions Semi Owl SoCs bindings to yaml Amit Singh Tomar
2020-05-15 15:54 ` André Przywara
2020-05-15 19:05 ` Amit Tomer
2020-05-15 19:24 ` Amit Tomer
2020-05-16 18:21 ` Amit Tomer
2020-05-14 16:10 ` [PATCH v1 6/9] arm64: dts: actions: Add DMA Controller for S700 Amit Singh Tomar
2020-05-14 16:10 ` [PATCH v1 7/9] dt-bindings: reset: s700: Add binding constants for mmc Amit Singh Tomar
2020-05-14 16:10 ` [PATCH v1 8/9] arm64: dts: actions: Add MMC controller support for S700 Amit Singh Tomar
2020-05-15 15:01 ` André Przywara
2020-05-15 18:41 ` Amit Tomer
2020-05-17 11:56 ` Amit Tomer
2020-05-17 16:42 ` André Przywara
2020-05-17 17:12 ` Amit Tomer
2020-05-17 21:30 ` André Przywara
2020-05-18 3:06 ` Amit Tomer
2020-05-18 6:17 ` Manivannan Sadhasivam
2020-05-18 8:29 ` André Przywara
2020-05-18 9:48 ` Andreas Färber
2020-05-14 16:10 ` [PATCH v1 9/9] arm64: dts: actions: Add uSD support for Cubieboard7 Amit Singh Tomar
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).