2018-12-11 08:06:35

by Parthiban Nallathambi

[permalink] [raw]
Subject: [PATCH v3 0/4] Add Actions Semi Owl family S700 I2C support

This patch series adds support for Actions Semi Owl SoC family S700
I2C controller. S700 provides 4 I2C masters and with cubieboard7
2 (I2C0 and I2C1) are exposed.

Added pinctrl definition for I2C controllers in cubieboard7. This patch
depends on s700 pinctrl driver support (yet to be merged),
https://lkml.org/lkml/2018/11/19/514
https://lore.kernel.org/patchwork/patch/1012859/

Changelog in v3:
- re-ordering I2C and pinctrl nodes alphabetically in board DTS
- re-orderng of patch
- Typo and nitpick corrections

Changelog in v2:
- Initial version https://lore.kernel.org/patchwork/patch/1011911/ only
added the I2C nodes using s900 compatible property. Now, new s700
compatiable string is added and used for S700
- Device tree bindings added with s700 compatible string
- pinctrl definition for cubieboard7

Parthiban Nallathambi (4):
dt-bindings: i2c: Add S700 support for Actions Semi Soc's
arm64: dts: actions: s700: Add I2C controller nodes
i2c: Add Actions Semiconductor Owl family S700 I2C support
arm64: dts: actions: s700-cubieboard7: Enable I2C0 and I2C1

.../devicetree/bindings/i2c/i2c-owl.txt | 4 +-
.../boot/dts/actions/s700-cubieboard7.dts | 53 +++++++++++++++++++
arch/arm64/boot/dts/actions/s700.dtsi | 40 ++++++++++++++
drivers/i2c/busses/i2c-owl.c | 1 +
4 files changed, 97 insertions(+), 1 deletion(-)

--
2.17.2



2018-12-11 08:06:45

by Parthiban Nallathambi

[permalink] [raw]
Subject: [PATCH v3 3/4] i2c: Add Actions Semiconductor Owl family S700 I2C support

Add S700 to the list of devices supported by Owl I2C driver.

Add Actions Semiconductor Owl family S700 I2C driver.

Signed-off-by: Parthiban Nallathambi <[email protected]>
Reviewed-by: Manivannan Sadhasivam <[email protected]>
---
drivers/i2c/busses/i2c-owl.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/busses/i2c-owl.c b/drivers/i2c/busses/i2c-owl.c
index 96b4572e6d9c..b6b5a495118b 100644
--- a/drivers/i2c/busses/i2c-owl.c
+++ b/drivers/i2c/busses/i2c-owl.c
@@ -475,6 +475,7 @@ static int owl_i2c_probe(struct platform_device *pdev)
}

static const struct of_device_id owl_i2c_of_match[] = {
+ { .compatible = "actions,s700-i2c" },
{ .compatible = "actions,s900-i2c" },
{ /* sentinel */ }
};
--
2.17.2


2018-12-11 08:06:49

by Parthiban Nallathambi

[permalink] [raw]
Subject: [PATCH v3 4/4] arm64: dts: actions: s700-cubieboard7: Enable I2C0 and I2C1

Add pinctrl definitions for Actions Semiconductor S700 I2C controllers.
Pinctrl definitions are only available for I2C0, I2C1 and I2C2.
Enable I2C0 (PMIC), I2C1 (gyro, touchscreen) in cubieboard7.

Signed-off-by: Parthiban Nallathambi <[email protected]>
---
.../boot/dts/actions/s700-cubieboard7.dts | 53 +++++++++++++++++++
1 file changed, 53 insertions(+)

diff --git a/arch/arm64/boot/dts/actions/s700-cubieboard7.dts b/arch/arm64/boot/dts/actions/s700-cubieboard7.dts
index 28f3f4a0f7f0..63e375cd9eb4 100644
--- a/arch/arm64/boot/dts/actions/s700-cubieboard7.dts
+++ b/arch/arm64/boot/dts/actions/s700-cubieboard7.dts
@@ -30,6 +30,59 @@
};
};

+&i2c0 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c0_default>;
+};
+
+&i2c1 {
+ status = "okay";
+ 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 {
+ pinmux {
+ groups = "i2c1_dummy";
+ function = "i2c1";
+ };
+ pinconf {
+ pins = "i2c1_sclk", "i2c1_sdata";
+ bias-pull-up;
+ };
+ };
+
+ i2c2_default: i2c2_default {
+ pinmux {
+ groups = "i2c2_dummy";
+ function = "i2c2";
+ };
+ pinconf {
+ pins = "i2c2_sclk", "i2c2_sdata";
+ bias-pull-up;
+ };
+ };
+};
+
&timer {
clocks = <&hosc>;
};
--
2.17.2


2018-12-11 08:06:58

by Parthiban Nallathambi

[permalink] [raw]
Subject: [PATCH v3 2/4] arm64: dts: actions: s700: Add I2C controller nodes

Add I2C controller nodes for Actions Semiconductor S700 SoC.

Signed-off-by: Parthiban Nallathambi <[email protected]>
Reviewed-by: Manivannan Sadhasivam <[email protected]>
---
arch/arm64/boot/dts/actions/s700.dtsi | 40 +++++++++++++++++++++++++++
1 file changed, 40 insertions(+)

diff --git a/arch/arm64/boot/dts/actions/s700.dtsi b/arch/arm64/boot/dts/actions/s700.dtsi
index 192c7b39c8c1..35fddba2af1c 100644
--- a/arch/arm64/boot/dts/actions/s700.dtsi
+++ b/arch/arm64/boot/dts/actions/s700.dtsi
@@ -174,6 +174,46 @@
#clock-cells = <1>;
};

+ i2c0: i2c@e0170000 {
+ compatible = "actions,s700-i2c";
+ reg = <0 0xe0170000 0 0x1000>;
+ clocks = <&cmu CLK_I2C0>;
+ interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c1: i2c@e0174000 {
+ compatible = "actions,s700-i2c";
+ reg = <0 0xe0174000 0 0x1000>;
+ clocks = <&cmu CLK_I2C1>;
+ interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c2: i2c@e0178000 {
+ compatible = "actions,s700-i2c";
+ reg = <0 0xe0178000 0 0x1000>;
+ clocks = <&cmu CLK_I2C2>;
+ interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
+ i2c3: i2c@e017c000 {
+ compatible = "actions,s700-i2c";
+ reg = <0 0xe017c000 0 0x1000>;
+ clocks = <&cmu CLK_I2C3>;
+ interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
sps: power-controller@e01b0100 {
compatible = "actions,s700-sps";
reg = <0x0 0xe01b0100 0x0 0x100>;
--
2.17.2


2018-12-11 08:07:36

by Parthiban Nallathambi

[permalink] [raw]
Subject: [PATCH v3 1/4] dt-bindings: i2c: Add S700 support for Actions Semi Soc's

Add s700 compatible string to Actions Semi SoC dt-bindings.

Signed-off-by: Parthiban Nallathambi <[email protected]>
---
Documentation/devicetree/bindings/i2c/i2c-owl.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/i2c/i2c-owl.txt b/Documentation/devicetree/bindings/i2c/i2c-owl.txt
index b743fe444e9f..54c05dbdb2e4 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-owl.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-owl.txt
@@ -2,7 +2,9 @@ Actions Semiconductor Owl I2C controller

Required properties:

-- compatible : Should be "actions,s900-i2c".
+- compatible : Should be one of the following:
+ - "actions,s700-i2c" for S700 SoC
+ - "actions,s900-i2c" for S900 SoC
- reg : Offset and length of the register set for the device.
- #address-cells : Should be 1.
- #size-cells : Should be 0.
--
2.17.2


2018-12-11 20:57:23

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v3 3/4] i2c: Add Actions Semiconductor Owl family S700 I2C support

On Tue, Dec 11, 2018 at 09:04:47AM +0100, Parthiban Nallathambi wrote:
> Add S700 to the list of devices supported by Owl I2C driver.
>
> Add Actions Semiconductor Owl family S700 I2C driver.
>
> Signed-off-by: Parthiban Nallathambi <[email protected]>
> Reviewed-by: Manivannan Sadhasivam <[email protected]>

Rob, is this okay or should we drop this patch and update the DT to
contain first the s700 compatible and then s900 as fallback?

> ---
> drivers/i2c/busses/i2c-owl.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/i2c/busses/i2c-owl.c b/drivers/i2c/busses/i2c-owl.c
> index 96b4572e6d9c..b6b5a495118b 100644
> --- a/drivers/i2c/busses/i2c-owl.c
> +++ b/drivers/i2c/busses/i2c-owl.c
> @@ -475,6 +475,7 @@ static int owl_i2c_probe(struct platform_device *pdev)
> }
>
> static const struct of_device_id owl_i2c_of_match[] = {
> + { .compatible = "actions,s700-i2c" },
> { .compatible = "actions,s900-i2c" },
> { /* sentinel */ }
> };
> --
> 2.17.2
>


Attachments:
(No filename) (1.00 kB)
signature.asc (849.00 B)
Download all attachments

2018-12-13 03:49:32

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH v3 4/4] arm64: dts: actions: s700-cubieboard7: Enable I2C0 and I2C1

Hi Parthiban,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.20-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Parthiban-Nallathambi/dt-bindings-i2c-Add-S700-support-for-Actions-Semi-Soc-s/20181212-050535
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=arm64

All errors (new ones prefixed by >>):

>> Error: arch/arm64/boot/dts/actions/s700-cubieboard7.dts:51.1-9 Label or path pinctrl not found
>> FATAL ERROR: Syntax error parsing input tree

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation


Attachments:
(No filename) (1.17 kB)
.config.gz (60.36 kB)
Download all attachments

2018-12-17 23:24:21

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v3 1/4] dt-bindings: i2c: Add S700 support for Actions Semi Soc's

On Tue, 11 Dec 2018 09:04:45 +0100, Parthiban Nallathambi wrote:
> Add s700 compatible string to Actions Semi SoC dt-bindings.
>
> Signed-off-by: Parthiban Nallathambi <[email protected]>
> ---
> Documentation/devicetree/bindings/i2c/i2c-owl.txt | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>

Reviewed-by: Rob Herring <[email protected]>

2019-01-03 23:58:03

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v3 3/4] i2c: Add Actions Semiconductor Owl family S700 I2C support

On Tue, Dec 11, 2018 at 09:04:47AM +0100, Parthiban Nallathambi wrote:
> Add S700 to the list of devices supported by Owl I2C driver.
>
> Add Actions Semiconductor Owl family S700 I2C driver.
>
> Signed-off-by: Parthiban Nallathambi <[email protected]>
> Reviewed-by: Manivannan Sadhasivam <[email protected]>

Applied to for-next, thanks!


Attachments:
(No filename) (361.00 B)
signature.asc (849.00 B)
Download all attachments

2019-01-03 23:59:03

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH v3 1/4] dt-bindings: i2c: Add S700 support for Actions Semi Soc's

On Tue, Dec 11, 2018 at 09:04:45AM +0100, Parthiban Nallathambi wrote:
> Add s700 compatible string to Actions Semi SoC dt-bindings.
>
> Signed-off-by: Parthiban Nallathambi <[email protected]>

Applied to for-next, thanks!


Attachments:
(No filename) (226.00 B)
signature.asc (849.00 B)
Download all attachments

2019-01-05 18:01:43

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [PATCH v3 4/4] arm64: dts: actions: s700-cubieboard7: Enable I2C0 and I2C1

On Tue, Dec 11, 2018 at 09:04:48AM +0100, Parthiban Nallathambi wrote:
> Add pinctrl definitions for Actions Semiconductor S700 I2C controllers.
> Pinctrl definitions are only available for I2C0, I2C1 and I2C2.
> Enable I2C0 (PMIC), I2C1 (gyro, touchscreen) in cubieboard7.
>
> Signed-off-by: Parthiban Nallathambi <[email protected]>

Applied to dt-next branch where I have been collecting patches for
Andreas.

Thanks,
Mani

> ---
> .../boot/dts/actions/s700-cubieboard7.dts | 53 +++++++++++++++++++
> 1 file changed, 53 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/actions/s700-cubieboard7.dts b/arch/arm64/boot/dts/actions/s700-cubieboard7.dts
> index 28f3f4a0f7f0..63e375cd9eb4 100644
> --- a/arch/arm64/boot/dts/actions/s700-cubieboard7.dts
> +++ b/arch/arm64/boot/dts/actions/s700-cubieboard7.dts
> @@ -30,6 +30,59 @@
> };
> };
>
> +&i2c0 {
> + status = "okay";
> + pinctrl-names = "default";
> + pinctrl-0 = <&i2c0_default>;
> +};
> +
> +&i2c1 {
> + status = "okay";
> + 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 {
> + pinmux {
> + groups = "i2c1_dummy";
> + function = "i2c1";
> + };
> + pinconf {
> + pins = "i2c1_sclk", "i2c1_sdata";
> + bias-pull-up;
> + };
> + };
> +
> + i2c2_default: i2c2_default {
> + pinmux {
> + groups = "i2c2_dummy";
> + function = "i2c2";
> + };
> + pinconf {
> + pins = "i2c2_sclk", "i2c2_sdata";
> + bias-pull-up;
> + };
> + };
> +};
> +
> &timer {
> clocks = <&hosc>;
> };
> --
> 2.17.2
>

2019-01-05 18:18:29

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [PATCH v3 2/4] arm64: dts: actions: s700: Add I2C controller nodes

On Tue, Dec 11, 2018 at 09:04:46AM +0100, Parthiban Nallathambi wrote:
> Add I2C controller nodes for Actions Semiconductor S700 SoC.
>
> Signed-off-by: Parthiban Nallathambi <[email protected]>
> Reviewed-by: Manivannan Sadhasivam <[email protected]>

Applied to dt-next branch where I have been collecting patches for
Andreas.

Thanks,
Mani

> ---
> arch/arm64/boot/dts/actions/s700.dtsi | 40 +++++++++++++++++++++++++++
> 1 file changed, 40 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/actions/s700.dtsi b/arch/arm64/boot/dts/actions/s700.dtsi
> index 192c7b39c8c1..35fddba2af1c 100644
> --- a/arch/arm64/boot/dts/actions/s700.dtsi
> +++ b/arch/arm64/boot/dts/actions/s700.dtsi
> @@ -174,6 +174,46 @@
> #clock-cells = <1>;
> };
>
> + i2c0: i2c@e0170000 {
> + compatible = "actions,s700-i2c";
> + reg = <0 0xe0170000 0 0x1000>;
> + clocks = <&cmu CLK_I2C0>;
> + interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + status = "disabled";
> + };
> +
> + i2c1: i2c@e0174000 {
> + compatible = "actions,s700-i2c";
> + reg = <0 0xe0174000 0 0x1000>;
> + clocks = <&cmu CLK_I2C1>;
> + interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + status = "disabled";
> + };
> +
> + i2c2: i2c@e0178000 {
> + compatible = "actions,s700-i2c";
> + reg = <0 0xe0178000 0 0x1000>;
> + clocks = <&cmu CLK_I2C2>;
> + interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + status = "disabled";
> + };
> +
> + i2c3: i2c@e017c000 {
> + compatible = "actions,s700-i2c";
> + reg = <0 0xe017c000 0 0x1000>;
> + clocks = <&cmu CLK_I2C3>;
> + interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + status = "disabled";
> + };
> +
> sps: power-controller@e01b0100 {
> compatible = "actions,s700-sps";
> reg = <0x0 0xe01b0100 0x0 0x100>;
> --
> 2.17.2
>