linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] Add CMU/RMU/DMA/MMC/I2C support for Actions Semi S500 SoCs
@ 2020-06-25 23:34 Cristian Ciocaltea
  2020-06-25 23:34 ` [PATCH 01/10] arm: dts: owl-s500: Add Clock Management Unit Cristian Ciocaltea
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Cristian Ciocaltea @ 2020-06-25 23:34 UTC (permalink / raw)
  To: Rob Herring, Andreas Färber, Manivannan Sadhasivam
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-actions

This patchset brings a series of improvements for the Actions Semi S500
SoCs family, by adding support for Clock & Reset Management Units, DMA,
MMC & I2C controllers.

Please note the patches contain only DTS changes, but most of them
depend on previous work which is currently under review:

 - Add RMU and DMAC/GPIO clock support for Actions Semi S500 SoCs
https://lore.kernel.org/lkml/cover.1592941257.git.cristian.ciocaltea@gmail.com/

 - Add Actions Semi S500 pinctrl support
https://lore.kernel.org/lkml/cover.1593112402.git.cristian.ciocaltea@gmail.com/

For the moment, I have only enabled the features tested on RoseapplePi,
the SBC for which an initial support has been already submitted via:
https://lore.kernel.org/lkml/cover.1592123160.git.cristian.ciocaltea@gmail.com/

Thanks,
Cristi

Cristian Ciocaltea (10):
  arm: dts: owl-s500: Add Clock Management Unit
  arm: dts: owl-s500: Set UART clock refs from CMU
  arm: dts: owl-s500: Add DMA controller
  arm: dts: owl-s500: Add Reset Controller support
  arm: dts: owl-s500: Add pinctrl node
  arm: dts: owl-s500: Add MMC nodes
  arm: dts: owl-s500: Add I2C nodes
  arm: dts: owl-s500-roseapplepi: Use UART clock from CMU
  arm: dts: owl-s500-roseapplepi: Add uSD support
  arm: dts: owl-s500-roseapplepi: Enable I2C0

 arch/arm/boot/dts/owl-s500-roseapplepi.dts |  96 ++++++++++++++-
 arch/arm/boot/dts/owl-s500.dtsi            | 130 +++++++++++++++++++++
 2 files changed, 221 insertions(+), 5 deletions(-)

-- 
2.27.0


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

* [PATCH 01/10] arm: dts: owl-s500: Add Clock Management Unit
  2020-06-25 23:34 [PATCH 00/10] Add CMU/RMU/DMA/MMC/I2C support for Actions Semi S500 SoCs Cristian Ciocaltea
@ 2020-06-25 23:34 ` Cristian Ciocaltea
  2020-06-25 23:34 ` [PATCH 02/10] arm: dts: owl-s500: Set UART clock refs from CMU Cristian Ciocaltea
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Cristian Ciocaltea @ 2020-06-25 23:34 UTC (permalink / raw)
  To: Rob Herring, Andreas Färber, Manivannan Sadhasivam
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-actions

Add Clock Management Unit for Actions Semi S500 SoC.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
---
 arch/arm/boot/dts/owl-s500.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/owl-s500.dtsi b/arch/arm/boot/dts/owl-s500.dtsi
index 1dbe4e8b38ac..5d5ad9db549b 100644
--- a/arch/arm/boot/dts/owl-s500.dtsi
+++ b/arch/arm/boot/dts/owl-s500.dtsi
@@ -5,6 +5,7 @@
  * Copyright (c) 2016-2017 Andreas Färber
  */
 
+#include <dt-bindings/clock/actions,s500-cmu.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/power/owl-s500-powergate.h>
 
@@ -70,6 +71,12 @@ hosc: hosc {
 		#clock-cells = <0>;
 	};
 
+	losc: losc {
+		compatible = "fixed-clock";
+		clock-frequency = <32768>;
+		#clock-cells = <0>;
+	};
+
 	soc {
 		compatible = "simple-bus";
 		#address-cells = <1>;
@@ -169,6 +176,13 @@ uart6: serial@b012c000 {
 			status = "disabled";
 		};
 
+		cmu: clock-controller@b0160000 {
+			compatible = "actions,s500-cmu";
+			reg = <0xb0160000 0x8000>;
+			clocks = <&hosc>, <&losc>;
+			#clock-cells = <1>;
+		};
+
 		timer: timer@b0168000 {
 			compatible = "actions,s500-timer";
 			reg = <0xb0168000 0x8000>;
-- 
2.27.0


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

* [PATCH 02/10] arm: dts: owl-s500: Set UART clock refs from CMU
  2020-06-25 23:34 [PATCH 00/10] Add CMU/RMU/DMA/MMC/I2C support for Actions Semi S500 SoCs Cristian Ciocaltea
  2020-06-25 23:34 ` [PATCH 01/10] arm: dts: owl-s500: Add Clock Management Unit Cristian Ciocaltea
@ 2020-06-25 23:34 ` Cristian Ciocaltea
  2020-06-25 23:34 ` [PATCH 03/10] arm: dts: owl-s500: Add DMA controller Cristian Ciocaltea
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Cristian Ciocaltea @ 2020-06-25 23:34 UTC (permalink / raw)
  To: Rob Herring, Andreas Färber, Manivannan Sadhasivam
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-actions

Enable using Clock Management Unit clocks for every UART node
of the Actions Semi S500 SoC.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
---
 arch/arm/boot/dts/owl-s500.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/owl-s500.dtsi b/arch/arm/boot/dts/owl-s500.dtsi
index 5d5ad9db549b..ac3d04c75dd5 100644
--- a/arch/arm/boot/dts/owl-s500.dtsi
+++ b/arch/arm/boot/dts/owl-s500.dtsi
@@ -131,6 +131,7 @@ uart0: serial@b0120000 {
 			compatible = "actions,s500-uart", "actions,owl-uart";
 			reg = <0xb0120000 0x2000>;
 			interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cmu CLK_UART0>;
 			status = "disabled";
 		};
 
@@ -138,6 +139,7 @@ uart1: serial@b0122000 {
 			compatible = "actions,s500-uart", "actions,owl-uart";
 			reg = <0xb0122000 0x2000>;
 			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cmu CLK_UART1>;
 			status = "disabled";
 		};
 
@@ -145,6 +147,7 @@ uart2: serial@b0124000 {
 			compatible = "actions,s500-uart", "actions,owl-uart";
 			reg = <0xb0124000 0x2000>;
 			interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cmu CLK_UART2>;
 			status = "disabled";
 		};
 
@@ -152,6 +155,7 @@ uart3: serial@b0126000 {
 			compatible = "actions,s500-uart", "actions,owl-uart";
 			reg = <0xb0126000 0x2000>;
 			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cmu CLK_UART3>;
 			status = "disabled";
 		};
 
@@ -159,6 +163,7 @@ uart4: serial@b0128000 {
 			compatible = "actions,s500-uart", "actions,owl-uart";
 			reg = <0xb0128000 0x2000>;
 			interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cmu CLK_UART4>;
 			status = "disabled";
 		};
 
@@ -166,6 +171,7 @@ uart5: serial@b012a000 {
 			compatible = "actions,s500-uart", "actions,owl-uart";
 			reg = <0xb012a000 0x2000>;
 			interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cmu CLK_UART5>;
 			status = "disabled";
 		};
 
@@ -173,6 +179,7 @@ uart6: serial@b012c000 {
 			compatible = "actions,s500-uart", "actions,owl-uart";
 			reg = <0xb012c000 0x2000>;
 			interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cmu CLK_UART6>;
 			status = "disabled";
 		};
 
-- 
2.27.0


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

* [PATCH 03/10] arm: dts: owl-s500: Add DMA controller
  2020-06-25 23:34 [PATCH 00/10] Add CMU/RMU/DMA/MMC/I2C support for Actions Semi S500 SoCs Cristian Ciocaltea
  2020-06-25 23:34 ` [PATCH 01/10] arm: dts: owl-s500: Add Clock Management Unit Cristian Ciocaltea
  2020-06-25 23:34 ` [PATCH 02/10] arm: dts: owl-s500: Set UART clock refs from CMU Cristian Ciocaltea
@ 2020-06-25 23:34 ` Cristian Ciocaltea
  2020-06-25 23:34 ` [PATCH 04/10] arm: dts: owl-s500: Add Reset Controller support Cristian Ciocaltea
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Cristian Ciocaltea @ 2020-06-25 23:34 UTC (permalink / raw)
  To: Rob Herring, Andreas Färber, Manivannan Sadhasivam
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-actions

Add DMA controller node for Actions Semi S500 SoC.

Note the Actions Semi Owl SoC's DMA driver seems to be fully compatible
with the Actions Semi S500 SoC, even though this is not explicitly
mentioned in the source code. Hence, for the moment, enable the DMA
controller node using the "actions,s900-dma" compatible string.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
---
 arch/arm/boot/dts/owl-s500.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/owl-s500.dtsi b/arch/arm/boot/dts/owl-s500.dtsi
index ac3d04c75dd5..0f4fc5487dad 100644
--- a/arch/arm/boot/dts/owl-s500.dtsi
+++ b/arch/arm/boot/dts/owl-s500.dtsi
@@ -205,5 +205,19 @@ sps: power-controller@b01b0100 {
 			reg = <0xb01b0100 0x100>;
 			#power-domain-cells = <1>;
 		};
+
+		dma: dma-controller@b0260000 {
+			compatible = "actions,s900-dma";
+			reg = <0xb0260000 0xd00>;
+			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 = <&cmu CLK_DMAC>;
+			power-domains = <&sps S500_PD_DMA>;
+		};
 	};
 };
-- 
2.27.0


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

* [PATCH 04/10] arm: dts: owl-s500: Add Reset Controller support
  2020-06-25 23:34 [PATCH 00/10] Add CMU/RMU/DMA/MMC/I2C support for Actions Semi S500 SoCs Cristian Ciocaltea
                   ` (2 preceding siblings ...)
  2020-06-25 23:34 ` [PATCH 03/10] arm: dts: owl-s500: Add DMA controller Cristian Ciocaltea
@ 2020-06-25 23:34 ` Cristian Ciocaltea
  2020-06-25 23:34 ` [PATCH 05/10] arm: dts: owl-s500: Add pinctrl node Cristian Ciocaltea
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Cristian Ciocaltea @ 2020-06-25 23:34 UTC (permalink / raw)
  To: Rob Herring, Andreas Färber, Manivannan Sadhasivam
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-actions

Add reset controller property and bindings header for the
Actions Semi S500 SoC DTS.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
---
 arch/arm/boot/dts/owl-s500.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/owl-s500.dtsi b/arch/arm/boot/dts/owl-s500.dtsi
index 0f4fc5487dad..0b7ba2926f0e 100644
--- a/arch/arm/boot/dts/owl-s500.dtsi
+++ b/arch/arm/boot/dts/owl-s500.dtsi
@@ -8,6 +8,7 @@
 #include <dt-bindings/clock/actions,s500-cmu.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/power/owl-s500-powergate.h>
+#include <dt-bindings/reset/actions,s500-reset.h>
 
 / {
 	compatible = "actions,s500";
@@ -188,6 +189,7 @@ cmu: clock-controller@b0160000 {
 			reg = <0xb0160000 0x8000>;
 			clocks = <&hosc>, <&losc>;
 			#clock-cells = <1>;
+			#reset-cells = <1>;
 		};
 
 		timer: timer@b0168000 {
-- 
2.27.0


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

* [PATCH 05/10] arm: dts: owl-s500: Add pinctrl node
  2020-06-25 23:34 [PATCH 00/10] Add CMU/RMU/DMA/MMC/I2C support for Actions Semi S500 SoCs Cristian Ciocaltea
                   ` (3 preceding siblings ...)
  2020-06-25 23:34 ` [PATCH 04/10] arm: dts: owl-s500: Add Reset Controller support Cristian Ciocaltea
@ 2020-06-25 23:34 ` Cristian Ciocaltea
  2020-06-25 23:34 ` [PATCH 06/10] arm: dts: owl-s500: Add MMC nodes Cristian Ciocaltea
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Cristian Ciocaltea @ 2020-06-25 23:34 UTC (permalink / raw)
  To: Rob Herring, Andreas Färber, Manivannan Sadhasivam
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-actions

Add pinctrl node for Actions Semi S500 SoC.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
---
 arch/arm/boot/dts/owl-s500.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/owl-s500.dtsi b/arch/arm/boot/dts/owl-s500.dtsi
index 0b7ba2926f0e..3b625358d786 100644
--- a/arch/arm/boot/dts/owl-s500.dtsi
+++ b/arch/arm/boot/dts/owl-s500.dtsi
@@ -6,6 +6,7 @@
  */
 
 #include <dt-bindings/clock/actions,s500-cmu.h>
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/power/owl-s500-powergate.h>
 #include <dt-bindings/reset/actions,s500-reset.h>
@@ -208,6 +209,25 @@ sps: power-controller@b01b0100 {
 			#power-domain-cells = <1>;
 		};
 
+		pinctrl: pinctrl@b01b0000 {
+			compatible = "actions,s500-pinctrl";
+			reg = <0xb01b0000 0x40>, /* GPIO */
+			      <0xb01b0040 0x10>,
+			      <0xb01b0060 0x18>,
+			      <0xb01b0080 0xc>;
+			clocks = <&cmu CLK_GPIO>;
+			gpio-controller;
+			gpio-ranges = <&pinctrl 0 0 132>;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			#interrupt-cells = <2>;
+			interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>, /* GPIOA */
+				     <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>, /* GPIOB */
+				     <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>, /* GPIOC */
+				     <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, /* GPIOD */
+				     <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; /* GPIOE */
+		};
+
 		dma: dma-controller@b0260000 {
 			compatible = "actions,s900-dma";
 			reg = <0xb0260000 0xd00>;
-- 
2.27.0


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

* [PATCH 06/10] arm: dts: owl-s500: Add MMC nodes
  2020-06-25 23:34 [PATCH 00/10] Add CMU/RMU/DMA/MMC/I2C support for Actions Semi S500 SoCs Cristian Ciocaltea
                   ` (4 preceding siblings ...)
  2020-06-25 23:34 ` [PATCH 05/10] arm: dts: owl-s500: Add pinctrl node Cristian Ciocaltea
@ 2020-06-25 23:34 ` Cristian Ciocaltea
  2020-06-25 23:34 ` [PATCH 07/10] arm: dts: owl-s500: Add I2C nodes Cristian Ciocaltea
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Cristian Ciocaltea @ 2020-06-25 23:34 UTC (permalink / raw)
  To: Rob Herring, Andreas Färber, Manivannan Sadhasivam
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-actions

Add MMC controller nodes for Actions Semi S500 SoC.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
---
 arch/arm/boot/dts/owl-s500.dtsi | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/arch/arm/boot/dts/owl-s500.dtsi b/arch/arm/boot/dts/owl-s500.dtsi
index 3b625358d786..778775ac42f7 100644
--- a/arch/arm/boot/dts/owl-s500.dtsi
+++ b/arch/arm/boot/dts/owl-s500.dtsi
@@ -241,5 +241,38 @@ dma: dma-controller@b0260000 {
 			clocks = <&cmu CLK_DMAC>;
 			power-domains = <&sps S500_PD_DMA>;
 		};
+
+		mmc0: mmc@b0230000 {
+			compatible = "actions,owl-mmc";
+			reg = <0xb0230000 0x38>;
+			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@b0234000 {
+			compatible = "actions,owl-mmc";
+			reg = <0xb0234000 0x38>;
+			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@b0238000 {
+			compatible = "actions,owl-mmc";
+			reg = <0xb0238000 0x38>;
+			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.27.0


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

* [PATCH 07/10] arm: dts: owl-s500: Add I2C nodes
  2020-06-25 23:34 [PATCH 00/10] Add CMU/RMU/DMA/MMC/I2C support for Actions Semi S500 SoCs Cristian Ciocaltea
                   ` (5 preceding siblings ...)
  2020-06-25 23:34 ` [PATCH 06/10] arm: dts: owl-s500: Add MMC nodes Cristian Ciocaltea
@ 2020-06-25 23:34 ` Cristian Ciocaltea
  2020-06-25 23:34 ` [PATCH 08/10] arm: dts: owl-s500-roseapplepi: Use UART clock from CMU Cristian Ciocaltea
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Cristian Ciocaltea @ 2020-06-25 23:34 UTC (permalink / raw)
  To: Rob Herring, Andreas Färber, Manivannan Sadhasivam
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-actions

Add I2C controller nodes for Actions Semi S500 SoC.

Note the Actions Semi Owl SoC's I2C driver seems to be fully compatible
with the Actions Semi S500 SoC, even though this is not explicitly
mentioned in the source code. Hence, for the moment, enable the I2C
controller node via the "actions,s900-i2c" compatible string.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
---
 arch/arm/boot/dts/owl-s500.dtsi | 40 +++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/arch/arm/boot/dts/owl-s500.dtsi b/arch/arm/boot/dts/owl-s500.dtsi
index 778775ac42f7..15c11af530ea 100644
--- a/arch/arm/boot/dts/owl-s500.dtsi
+++ b/arch/arm/boot/dts/owl-s500.dtsi
@@ -193,6 +193,46 @@ cmu: clock-controller@b0160000 {
 			#reset-cells = <1>;
 		};
 
+		i2c0: i2c@b0170000 {
+			compatible = "actions,s900-i2c";
+			reg = <0xb0170000 0x4000>;
+			clocks = <&cmu CLK_I2C0>;
+			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c1: i2c@b0174000 {
+			compatible = "actions,s900-i2c";
+			reg = <0xb0174000 0x4000>;
+			clocks = <&cmu CLK_I2C1>;
+			interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c2: i2c@b0178000 {
+			compatible = "actions,s900-i2c";
+			reg = <0xb0178000 0x4000>;
+			clocks = <&cmu CLK_I2C2>;
+			interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
+		i2c3: i2c@b017c000 {
+			compatible = "actions,s900-i2c";
+			reg = <0xb017c000 0x4000>;
+			clocks = <&cmu CLK_I2C3>;
+			interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "disabled";
+		};
+
 		timer: timer@b0168000 {
 			compatible = "actions,s500-timer";
 			reg = <0xb0168000 0x8000>;
-- 
2.27.0


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

* [PATCH 08/10] arm: dts: owl-s500-roseapplepi: Use UART clock from CMU
  2020-06-25 23:34 [PATCH 00/10] Add CMU/RMU/DMA/MMC/I2C support for Actions Semi S500 SoCs Cristian Ciocaltea
                   ` (6 preceding siblings ...)
  2020-06-25 23:34 ` [PATCH 07/10] arm: dts: owl-s500: Add I2C nodes Cristian Ciocaltea
@ 2020-06-25 23:34 ` Cristian Ciocaltea
  2020-06-25 23:34 ` [PATCH 09/10] arm: dts: owl-s500-roseapplepi: Add uSD support Cristian Ciocaltea
  2020-06-25 23:34 ` [PATCH 10/10] arm: dts: owl-s500-roseapplepi: Enable I2C0 Cristian Ciocaltea
  9 siblings, 0 replies; 11+ messages in thread
From: Cristian Ciocaltea @ 2020-06-25 23:34 UTC (permalink / raw)
  To: Rob Herring, Andreas Färber, Manivannan Sadhasivam
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-actions

Remove the UART fixed clock for RoseapplePi SBC and switch to using
the clock provided by CMU.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
---
 arch/arm/boot/dts/owl-s500-roseapplepi.dts | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/arch/arm/boot/dts/owl-s500-roseapplepi.dts b/arch/arm/boot/dts/owl-s500-roseapplepi.dts
index a2087e617cb2..800edf5d2d12 100644
--- a/arch/arm/boot/dts/owl-s500-roseapplepi.dts
+++ b/arch/arm/boot/dts/owl-s500-roseapplepi.dts
@@ -25,12 +25,6 @@ memory@0 {
 		device_type = "memory";
 		reg = <0x0 0x80000000>; /* 2GB */
 	};
-
-	uart2_clk: uart2-clk {
-		compatible = "fixed-clock";
-		clock-frequency = <921600>;
-		#clock-cells = <0>;
-	};
 };
 
 &twd_timer {
@@ -43,5 +37,4 @@ &timer {
 
 &uart2 {
 	status = "okay";
-	clocks = <&uart2_clk>;
 };
-- 
2.27.0


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

* [PATCH 09/10] arm: dts: owl-s500-roseapplepi: Add uSD support
  2020-06-25 23:34 [PATCH 00/10] Add CMU/RMU/DMA/MMC/I2C support for Actions Semi S500 SoCs Cristian Ciocaltea
                   ` (7 preceding siblings ...)
  2020-06-25 23:34 ` [PATCH 08/10] arm: dts: owl-s500-roseapplepi: Use UART clock from CMU Cristian Ciocaltea
@ 2020-06-25 23:34 ` Cristian Ciocaltea
  2020-06-25 23:34 ` [PATCH 10/10] arm: dts: owl-s500-roseapplepi: Enable I2C0 Cristian Ciocaltea
  9 siblings, 0 replies; 11+ messages in thread
From: Cristian Ciocaltea @ 2020-06-25 23:34 UTC (permalink / raw)
  To: Rob Herring, Andreas Färber, Manivannan Sadhasivam
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-actions

Add uSD support for RoseapplePi SBC using a fixed regulator as a
temporary solution until PMIC support becomes available.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
---
 arch/arm/boot/dts/owl-s500-roseapplepi.dts | 50 ++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/arch/arm/boot/dts/owl-s500-roseapplepi.dts b/arch/arm/boot/dts/owl-s500-roseapplepi.dts
index 800edf5d2d12..0a916b6c83a8 100644
--- a/arch/arm/boot/dts/owl-s500-roseapplepi.dts
+++ b/arch/arm/boot/dts/owl-s500-roseapplepi.dts
@@ -14,6 +14,7 @@ / {
 	model = "Roseapple Pi";
 
 	aliases {
+		mmc0 = &mmc0;
 		serial2 = &uart2;
 	};
 
@@ -25,6 +26,55 @@ memory@0 {
 		device_type = "memory";
 		reg = <0x0 0x80000000>; /* 2GB */
 	};
+
+	/* 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;
+	};
+};
+
+&pinctrl {
+	mmc0_default: mmc0_default {
+		pinmux {
+			groups = "sd0_d0_mfp", "sd0_d1_mfp", "sd0_d2_d3_mfp",
+				 "sd0_cmd_mfp", "sd0_clk_mfp";
+			function = "sd0";
+		};
+
+		drv_pinconf {
+			groups = "sd0_d0_d3_drv", "sd0_cmd_drv", "sd0_clk_drv";
+			drive-strength = <8>;
+		};
+
+		bias0_pinconf {
+			pins = "sd0_d0", "sd0_d1", "sd0_d2",
+			       "sd0_d3", "sd0_cmd";
+			bias-pull-up;
+		};
+
+		bias1_pinconf {
+			pins = "sd0_clk";
+			bias-pull-down;
+		};
+	};
+};
+
+/* uSD */
+&mmc0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc0_default>;
+	no-sdio;
+	no-mmc;
+	no-1-8-v;
+	cd-gpios = <&pinctrl 117 GPIO_ACTIVE_LOW>;
+	bus-width = <4>;
+	vmmc-supply = <&sd_vcc>;
+	vqmmc-supply = <&sd_vcc>;
 };
 
 &twd_timer {
-- 
2.27.0


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

* [PATCH 10/10] arm: dts: owl-s500-roseapplepi: Enable I2C0
  2020-06-25 23:34 [PATCH 00/10] Add CMU/RMU/DMA/MMC/I2C support for Actions Semi S500 SoCs Cristian Ciocaltea
                   ` (8 preceding siblings ...)
  2020-06-25 23:34 ` [PATCH 09/10] arm: dts: owl-s500-roseapplepi: Add uSD support Cristian Ciocaltea
@ 2020-06-25 23:34 ` Cristian Ciocaltea
  9 siblings, 0 replies; 11+ messages in thread
From: Cristian Ciocaltea @ 2020-06-25 23:34 UTC (permalink / raw)
  To: Rob Herring, Andreas Färber, Manivannan Sadhasivam
  Cc: devicetree, linux-arm-kernel, linux-kernel, linux-actions

Add pinctrl definitions for the I2C controllers used in RoseapplePi SBC.
For the moment enable only I2C0, which is used by PMIC.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
---
 arch/arm/boot/dts/owl-s500-roseapplepi.dts | 43 ++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/arch/arm/boot/dts/owl-s500-roseapplepi.dts b/arch/arm/boot/dts/owl-s500-roseapplepi.dts
index 0a916b6c83a8..f5d515ba9bdd 100644
--- a/arch/arm/boot/dts/owl-s500-roseapplepi.dts
+++ b/arch/arm/boot/dts/owl-s500-roseapplepi.dts
@@ -37,7 +37,50 @@ sd_vcc: sd-vcc {
 	};
 };
 
+&i2c0 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_default>;
+};
+
+&i2c1 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_default>;
+};
+
+&i2c2 {
+	status = "disabled";
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c2_default>;
+};
+
 &pinctrl {
+	i2c0_default: i2c0_default {
+		pinmux {
+			groups = "i2c0_mfp";
+			function = "i2c0";
+		};
+		pinconf {
+			pins = "i2c0_sclk", "i2c0_sdata";
+			bias-pull-up;
+		};
+	};
+
+	i2c1_default: i2c1_default {
+		pinconf {
+			pins = "i2c1_sclk", "i2c1_sdata";
+			bias-pull-up;
+		};
+	};
+
+	i2c2_default: i2c2_default {
+		pinconf {
+			pins = "i2c2_sclk", "i2c2_sdata";
+			bias-pull-up;
+		};
+	};
+
 	mmc0_default: mmc0_default {
 		pinmux {
 			groups = "sd0_d0_mfp", "sd0_d1_mfp", "sd0_d2_d3_mfp",
-- 
2.27.0


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

end of thread, other threads:[~2020-06-25 23:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-25 23:34 [PATCH 00/10] Add CMU/RMU/DMA/MMC/I2C support for Actions Semi S500 SoCs Cristian Ciocaltea
2020-06-25 23:34 ` [PATCH 01/10] arm: dts: owl-s500: Add Clock Management Unit Cristian Ciocaltea
2020-06-25 23:34 ` [PATCH 02/10] arm: dts: owl-s500: Set UART clock refs from CMU Cristian Ciocaltea
2020-06-25 23:34 ` [PATCH 03/10] arm: dts: owl-s500: Add DMA controller Cristian Ciocaltea
2020-06-25 23:34 ` [PATCH 04/10] arm: dts: owl-s500: Add Reset Controller support Cristian Ciocaltea
2020-06-25 23:34 ` [PATCH 05/10] arm: dts: owl-s500: Add pinctrl node Cristian Ciocaltea
2020-06-25 23:34 ` [PATCH 06/10] arm: dts: owl-s500: Add MMC nodes Cristian Ciocaltea
2020-06-25 23:34 ` [PATCH 07/10] arm: dts: owl-s500: Add I2C nodes Cristian Ciocaltea
2020-06-25 23:34 ` [PATCH 08/10] arm: dts: owl-s500-roseapplepi: Use UART clock from CMU Cristian Ciocaltea
2020-06-25 23:34 ` [PATCH 09/10] arm: dts: owl-s500-roseapplepi: Add uSD support Cristian Ciocaltea
2020-06-25 23:34 ` [PATCH 10/10] arm: dts: owl-s500-roseapplepi: Enable I2C0 Cristian Ciocaltea

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).