Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1311161 > unrolled thread

[PATCH 0/5] Nokia N950 modem support

Started bySebastian Reichel <sre@kernel.org>
First post2016-01-17 17:00 +0100
Last post2016-01-17 17:00 +0100
Articles 8 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/5] Nokia N950 modem support Sebastian Reichel <sre@kernel.org> - 2016-01-17 17:00 +0100
    [PATCH 1/5] ARM: OMAP2+: hwmod data: Add SSI data for omap36xx Sebastian Reichel <sre@kernel.org> - 2016-01-17 17:00 +0100
      Re: [PATCH 1/5] ARM: OMAP2+: hwmod data: Add SSI data for omap36xx Aaro Koskinen <aaro.koskinen@iki.fi> - 2016-01-26 23:10 +0100
        Re: [PATCH 1/5] ARM: OMAP2+: hwmod data: Add SSI data for omap36xx Aaro Koskinen <aaro.koskinen@iki.fi> - 2016-01-26 23:20 +0100
    [PATCH 3/5] HSI: nokia-modem: add n950 and n9 support Sebastian Reichel <sre@kernel.org> - 2016-01-17 17:00 +0100
      Re: [PATCH 3/5] HSI: nokia-modem: add n950 and n9 support Rob Herring <robh@kernel.org> - 2016-01-20 17:50 +0100
        Re: [PATCH 3/5] HSI: nokia-modem: add n950 and n9 support Sebastian Reichel <sre@kernel.org> - 2016-01-21 13:40 +0100
    [PATCH 5/5] ARM: dts: OMAP3-N950-N9: Enable modem Sebastian Reichel <sre@kernel.org> - 2016-01-17 17:00 +0100

#1311161 — [PATCH 0/5] Nokia N950 modem support

FromSebastian Reichel <sre@kernel.org>
Date2016-01-17 17:00 +0100
Subject[PATCH 0/5] Nokia N950 modem support
Message-ID<qRXUd-4n2-5@gated-at.bofh.it>
Hi,

This patchset adds support for the N950 modem. Afterwards it can be
used with ofono in the same way, that the N900's modem can be used [0].

In addition to the kernel patchset, ofono must be modified slightly, though.
The cbs interface from the N950 modem seems to be broken resulting in modem
reset. The below ofono patch is enough to get it running for the N950.

[0] https://lkml.org/lkml/2014/5/10/167

-- Sebastian

diff --git a/plugins/n900.c b/plugins/n900.c
index 44e2e75df3d9..1454d010cb2c 100644
--- a/plugins/n900.c
+++ b/plugins/n900.c
@@ -507,7 +507,7 @@ static void n900_post_online(struct ofono_modem *modem)
 
 	ofono_netreg_create(modem, 0, "isimodem", isi->modem);
 	ofono_sms_create(modem, 0, "isimodem", isi->modem);
-	ofono_cbs_create(modem, 0, "isimodem", isi->modem);
+	//ofono_cbs_create(modem, 0, "isimodem", isi->modem);
 	ofono_ussd_create(modem, 0, "isimodem", isi->modem);
 	ofono_call_settings_create(modem, 0, "isimodem", isi->modem);
 	ofono_call_barring_create(modem, 0, "isimodem", isi->modem);
---

Sebastian Reichel (5):
  ARM: OMAP2+: hwmod data: Add SSI data for omap36xx
  ARM: dts: OMAP3-N950-N9: Enable SSI module
  HSI: nokia-modem: add n950 and n9 support
  HSI: ssi-protocol: Use handshake logic from n950
  ARM: dts: OMAP3-N950-N9: Enable modem

 .../devicetree/bindings/hsi/nokia-modem.txt        | 12 ++--
 arch/arm/boot/dts/omap3-n9.dts                     |  4 ++
 arch/arm/boot/dts/omap3-n950-n9.dtsi               | 64 ++++++++++++++++++++++
 arch/arm/boot/dts/omap3-n950.dts                   |  4 ++
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c         | 13 +++--
 drivers/hsi/clients/nokia-modem.c                  |  2 +
 drivers/hsi/clients/ssi_protocol.c                 | 16 ++----
 7 files changed, 93 insertions(+), 22 deletions(-)

-- 
2.7.0.rc3

[toc] | [next] | [standalone]


#1311162 — [PATCH 1/5] ARM: OMAP2+: hwmod data: Add SSI data for omap36xx

FromSebastian Reichel <sre@kernel.org>
Date2016-01-17 17:00 +0100
Subject[PATCH 1/5] ARM: OMAP2+: hwmod data: Add SSI data for omap36xx
Message-ID<qRXUd-4n2-11@gated-at.bofh.it>
In reply to#1311161
This patch enables Synchronous Serial Interface (SSI)
hwmod support for OMAP36xx SoCs (used by Nokia N950/N9).

Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index aff78d5198d2..ed972029dce1 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -3625,14 +3625,14 @@ static struct omap_hwmod_class_sysconfig omap34xx_ssi_sysc = {
 	.sysc_fields	= &omap_hwmod_sysc_type1,
 };
 
-static struct omap_hwmod_class omap34xx_ssi_hwmod_class = {
+static struct omap_hwmod_class omap3xxx_ssi_hwmod_class = {
 	.name	= "ssi",
 	.sysc	= &omap34xx_ssi_sysc,
 };
 
-static struct omap_hwmod omap34xx_ssi_hwmod = {
+static struct omap_hwmod omap3xxx_ssi_hwmod = {
 	.name		= "ssi",
-	.class		= &omap34xx_ssi_hwmod_class,
+	.class		= &omap3xxx_ssi_hwmod_class,
 	.clkdm_name	= "core_l4_clkdm",
 	.main_clk	= "ssi_ssr_fck",
 	.prcm		= {
@@ -3647,9 +3647,9 @@ static struct omap_hwmod omap34xx_ssi_hwmod = {
 };
 
 /* L4 CORE -> SSI */
-static struct omap_hwmod_ocp_if omap34xx_l4_core__ssi = {
+static struct omap_hwmod_ocp_if omap3xxx_l4_core__ssi = {
 	.master		= &omap3xxx_l4_core_hwmod,
-	.slave		= &omap34xx_ssi_hwmod,
+	.slave		= &omap3xxx_ssi_hwmod,
 	.clk		= "ssi_ick",
 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
 };
@@ -3802,7 +3802,7 @@ static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
 	&omap3xxx_sad2d__l3,
 	&omap3xxx_l4_core__mmu_isp,
 	&omap3xxx_l3_main__mmu_iva,
-	&omap34xx_l4_core__ssi,
+	&omap3xxx_l4_core__ssi,
 	NULL
 };
 
@@ -3826,6 +3826,7 @@ static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
 	&omap3xxx_sad2d__l3,
 	&omap3xxx_l4_core__mmu_isp,
 	&omap3xxx_l3_main__mmu_iva,
+	&omap3xxx_l4_core__ssi,
 	NULL
 };
 
-- 
2.7.0.rc3

[toc] | [prev] | [next] | [standalone]


#1318431 — Re: [PATCH 1/5] ARM: OMAP2+: hwmod data: Add SSI data for omap36xx

FromAaro Koskinen <aaro.koskinen@iki.fi>
Date2016-01-26 23:10 +0100
SubjectRe: [PATCH 1/5] ARM: OMAP2+: hwmod data: Add SSI data for omap36xx
Message-ID<qVjYe-2hg-7@gated-at.bofh.it>
In reply to#1311162
On Sun, Jan 17, 2016 at 04:49:05PM +0100, Sebastian Reichel wrote:
> This patch enables Synchronous Serial Interface (SSI)
> hwmod support for OMAP36xx SoCs (used by Nokia N950/N9).
> 
> Signed-off-by: Sebastian Reichel <sre@kernel.org>

Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>

> ---
>  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> index aff78d5198d2..ed972029dce1 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> @@ -3625,14 +3625,14 @@ static struct omap_hwmod_class_sysconfig omap34xx_ssi_sysc = {
>  	.sysc_fields	= &omap_hwmod_sysc_type1,
>  };
>  
> -static struct omap_hwmod_class omap34xx_ssi_hwmod_class = {
> +static struct omap_hwmod_class omap3xxx_ssi_hwmod_class = {
>  	.name	= "ssi",
>  	.sysc	= &omap34xx_ssi_sysc,
>  };
>  
> -static struct omap_hwmod omap34xx_ssi_hwmod = {
> +static struct omap_hwmod omap3xxx_ssi_hwmod = {
>  	.name		= "ssi",
> -	.class		= &omap34xx_ssi_hwmod_class,
> +	.class		= &omap3xxx_ssi_hwmod_class,
>  	.clkdm_name	= "core_l4_clkdm",
>  	.main_clk	= "ssi_ssr_fck",
>  	.prcm		= {
> @@ -3647,9 +3647,9 @@ static struct omap_hwmod omap34xx_ssi_hwmod = {
>  };
>  
>  /* L4 CORE -> SSI */
> -static struct omap_hwmod_ocp_if omap34xx_l4_core__ssi = {
> +static struct omap_hwmod_ocp_if omap3xxx_l4_core__ssi = {
>  	.master		= &omap3xxx_l4_core_hwmod,
> -	.slave		= &omap34xx_ssi_hwmod,
> +	.slave		= &omap3xxx_ssi_hwmod,
>  	.clk		= "ssi_ick",
>  	.user		= OCP_USER_MPU | OCP_USER_SDMA,
>  };
> @@ -3802,7 +3802,7 @@ static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
>  	&omap3xxx_sad2d__l3,
>  	&omap3xxx_l4_core__mmu_isp,
>  	&omap3xxx_l3_main__mmu_iva,
> -	&omap34xx_l4_core__ssi,
> +	&omap3xxx_l4_core__ssi,
>  	NULL
>  };
>  
> @@ -3826,6 +3826,7 @@ static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
>  	&omap3xxx_sad2d__l3,
>  	&omap3xxx_l4_core__mmu_isp,
>  	&omap3xxx_l3_main__mmu_iva,
> +	&omap3xxx_l4_core__ssi,
>  	NULL
>  };
>  
> -- 
> 2.7.0.rc3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [next] | [standalone]


#1318441 — Re: [PATCH 1/5] ARM: OMAP2+: hwmod data: Add SSI data for omap36xx

FromAaro Koskinen <aaro.koskinen@iki.fi>
Date2016-01-26 23:20 +0100
SubjectRe: [PATCH 1/5] ARM: OMAP2+: hwmod data: Add SSI data for omap36xx
Message-ID<qVk7U-2la-5@gated-at.bofh.it>
In reply to#1318431
Hi,

On Wed, Jan 27, 2016 at 12:07:38AM +0200, Aaro Koskinen wrote:
> On Sun, Jan 17, 2016 at 04:49:05PM +0100, Sebastian Reichel wrote:
> > This patch enables Synchronous Serial Interface (SSI)
> > hwmod support for OMAP36xx SoCs (used by Nokia N950/N9).
> > 
> > Signed-off-by: Sebastian Reichel <sre@kernel.org>
> 
> Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>

This applies to whole series (1/5). I was able to use gprs data connection
to connect to internet with N950 + v4.5-rc1 + these patches.

Thanks,

A.

[toc] | [prev] | [next] | [standalone]


#1311163 — [PATCH 3/5] HSI: nokia-modem: add n950 and n9 support

FromSebastian Reichel <sre@kernel.org>
Date2016-01-17 17:00 +0100
Subject[PATCH 3/5] HSI: nokia-modem: add n950 and n9 support
Message-ID<qRXUe-4n2-17@gated-at.bofh.it>
In reply to#1311161
The Nokia N950 and Nokia N9 also have a SSI connected
modem, which use the same protocols as the Nokia N900,
but with slightly other GPIO setup and increased link
speed (96000 kbps instead of 55000 kbps).

Since it's unclear, if the N950 and the N9 use exactly
the same modem, each of them gets their own compatible
string.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
 Documentation/devicetree/bindings/hsi/nokia-modem.txt | 12 +++++++-----
 drivers/hsi/clients/nokia-modem.c                     |  2 ++
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/hsi/nokia-modem.txt b/Documentation/devicetree/bindings/hsi/nokia-modem.txt
index 8a979780452b..53de1d9d0b95 100644
--- a/Documentation/devicetree/bindings/hsi/nokia-modem.txt
+++ b/Documentation/devicetree/bindings/hsi/nokia-modem.txt
@@ -7,6 +7,8 @@ properties are needed by the Nokia modem HSI client:
 Required properties:
 - compatible:		Should be one of
       "nokia,n900-modem"
+      "nokia,n950-modem"
+      "nokia,n9-modem"
 - hsi-channel-names:	Should contain the following strings
       "mcsaab-control"
       "speech-control"
@@ -15,11 +17,11 @@ Required properties:
 - gpios:		Should provide a GPIO handler for each GPIO listed in
                         gpio-names
 - gpio-names:		Should contain the following strings
-      "cmt_apeslpx"
-      "cmt_rst_rq"
-      "cmt_en"
-      "cmt_rst"
-      "cmt_bsi"
+      "cmt_apeslpx" (for n900, n950, n9)
+      "cmt_rst_rq"  (for n900, n950, n9)
+      "cmt_en"      (for n900, n950, n9)
+      "cmt_rst"     (for n900)
+      "cmt_bsi"     (for n900)
 - interrupts:		Should be IRQ handle for modem's reset indication
 
 Example:
diff --git a/drivers/hsi/clients/nokia-modem.c b/drivers/hsi/clients/nokia-modem.c
index 7f82c911ad74..c000780d931f 100644
--- a/drivers/hsi/clients/nokia-modem.c
+++ b/drivers/hsi/clients/nokia-modem.c
@@ -281,6 +281,8 @@ static int nokia_modem_remove(struct device *dev)
 #ifdef CONFIG_OF
 static const struct of_device_id nokia_modem_of_match[] = {
 	{ .compatible = "nokia,n900-modem", },
+	{ .compatible = "nokia,n950-modem", },
+	{ .compatible = "nokia,n9-modem", },
 	{},
 };
 MODULE_DEVICE_TABLE(of, nokia_modem_of_match);
-- 
2.7.0.rc3

[toc] | [prev] | [next] | [standalone]


#1313356 — Re: [PATCH 3/5] HSI: nokia-modem: add n950 and n9 support

FromRob Herring <robh@kernel.org>
Date2016-01-20 17:50 +0100
SubjectRe: [PATCH 3/5] HSI: nokia-modem: add n950 and n9 support
Message-ID<qT47h-Ma-21@gated-at.bofh.it>
In reply to#1311163
On Sun, Jan 17, 2016 at 04:49:07PM +0100, Sebastian Reichel wrote:
> The Nokia N950 and Nokia N9 also have a SSI connected
> modem, which use the same protocols as the Nokia N900,
> but with slightly other GPIO setup and increased link

"slightly other" does not make sense.

> speed (96000 kbps instead of 55000 kbps).
> 
> Since it's unclear, if the N950 and the N9 use exactly
> the same modem, each of them gets their own compatible
> string.
> 
> Signed-off-by: Sebastian Reichel <sre@kernel.org>
> ---
>  Documentation/devicetree/bindings/hsi/nokia-modem.txt | 12 +++++++-----
>  drivers/hsi/clients/nokia-modem.c                     |  2 ++
>  2 files changed, 9 insertions(+), 5 deletions(-)

Otherwise,

Acked-by: Rob Herring <robh@kernel.org>

[toc] | [prev] | [next] | [standalone]


#1314164 — Re: [PATCH 3/5] HSI: nokia-modem: add n950 and n9 support

FromSebastian Reichel <sre@kernel.org>
Date2016-01-21 13:40 +0100
SubjectRe: [PATCH 3/5] HSI: nokia-modem: add n950 and n9 support
Message-ID<qTmGT-5g3-27@gated-at.bofh.it>
In reply to#1313356

[Multipart message — attachments visible in raw view] — view raw

Hi Rob,

On Wed, Jan 20, 2016 at 10:49:19AM -0600, Rob Herring wrote:
> On Sun, Jan 17, 2016 at 04:49:07PM +0100, Sebastian Reichel wrote:
> > The Nokia N950 and Nokia N9 also have a SSI connected
> > modem, which use the same protocols as the Nokia N900,
> > but with slightly other GPIO setup and increased link
> > speed (96000 kbps instead of 55000 kbps).
> 
> "slightly other" does not make sense.

I meant to write "slightly different", but how about:

The Nokia N950 and Nokia N9 also have a SSI connected
modem, which use the same protocols as the Nokia N900,
but with increased link speed (96000 kbps instead of
55000 kbps) and with less GPIOs.

> > Since it's unclear, if the N950 and the N9 use exactly
> > the same modem, each of them gets their own compatible
> > string.
> > 
> > Signed-off-by: Sebastian Reichel <sre@kernel.org>
> > ---
> >  Documentation/devicetree/bindings/hsi/nokia-modem.txt | 12 +++++++-----
> >  drivers/hsi/clients/nokia-modem.c                     |  2 ++
> >  2 files changed, 9 insertions(+), 5 deletions(-)
> 
> Otherwise,
> 
> Acked-by: Rob Herring <robh@kernel.org>

Thanks for the review.

-- Sebastian

[toc] | [prev] | [next] | [standalone]


#1311164 — [PATCH 5/5] ARM: dts: OMAP3-N950-N9: Enable modem

FromSebastian Reichel <sre@kernel.org>
Date2016-01-17 17:00 +0100
Subject[PATCH 5/5] ARM: dts: OMAP3-N950-N9: Enable modem
Message-ID<qRXUe-4n2-21@gated-at.bofh.it>
In reply to#1311161
The Nokia N950 and Nokia N9 have a modem attached to their
first ssi port. This change adds the modem to the SSI port.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
 arch/arm/boot/dts/omap3-n9.dts       |  4 ++++
 arch/arm/boot/dts/omap3-n950-n9.dtsi | 40 ++++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/omap3-n950.dts     |  4 ++++
 3 files changed, 48 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-n9.dts b/arch/arm/boot/dts/omap3-n9.dts
index f2e213931e09..5c67429a4da7 100644
--- a/arch/arm/boot/dts/omap3-n9.dts
+++ b/arch/arm/boot/dts/omap3-n9.dts
@@ -53,3 +53,7 @@
 		};
 	};
 };
+
+&modem {
+	compatible = "nokia,n9-modem";
+};
diff --git a/arch/arm/boot/dts/omap3-n950-n9.dtsi b/arch/arm/boot/dts/omap3-n950-n9.dtsi
index 95893003c67d..a1930e511f71 100644
--- a/arch/arm/boot/dts/omap3-n950-n9.dtsi
+++ b/arch/arm/boot/dts/omap3-n950-n9.dtsi
@@ -57,6 +57,22 @@
 			OMAP3_CORE1_IOPAD(0x218a, PIN_OUTPUT | MUX_MODE1)            /* ssi1_wake */
 		>;
 	};
+
+	modem_pins1: pinmux_modem_core1_pins {
+		pinctrl-single,pins = <
+			OMAP3_CORE1_IOPAD(0x207a, PIN_INPUT | WAKEUP_EN | MUX_MODE4) /* gpio_34 (ape_rst_rq) */
+			OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT | MUX_MODE4)            /* gpio_88 (cmt_rst_rq) */
+			OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE4)            /* gpio_93 (cmt_apeslpx) */
+		>;
+	};
+};
+
+&omap3_pmx_core2 {
+	modem_pins2: pinmux_modem_core2_pins {
+		pinctrl-single,pins = <
+			OMAP3630_CORE2_IOPAD(0x25ec, PIN_OUTPUT | MUX_MODE4)         /* gpio_23 (cmt_en) */
+		>;
+	};
 };
 
 &i2c1 {
@@ -210,6 +226,30 @@
 	pinctrl-0 = <&ssi_pins>;
 
 	ti,ssi-cawake-gpio = <&gpio5 23 GPIO_ACTIVE_HIGH>; /* 151 */
+
+	modem: hsi-client {
+		pinctrl-names = "default";
+		pinctrl-0 = <&modem_pins1 &modem_pins2>;
+
+		hsi-channel-ids = <0>, <1>, <2>, <3>;
+		hsi-channel-names = "mcsaab-control",
+				    "speech-control",
+				    "speech-data",
+				    "mcsaab-data";
+		hsi-speed-kbps = <96000>;
+		hsi-mode = "frame";
+		hsi-flow = "synchronized";
+		hsi-arb-mode = "round-robin";
+
+		interrupts-extended = <&gpio2 2 IRQ_TYPE_EDGE_RISING>; /* gpio 34 */
+
+		gpios = <&gpio3 29 GPIO_ACTIVE_HIGH>, /* gpio 93 */
+			<&gpio3 24 GPIO_ACTIVE_HIGH>, /* gpio 88 */
+			<&gpio1 23 GPIO_ACTIVE_HIGH>; /* gpio 23 */
+		gpio-names = "cmt_apeslpx",
+			     "cmt_rst_rq",
+			     "cmt_en";
+	};
 };
 
 &ssi_port2 {
diff --git a/arch/arm/boot/dts/omap3-n950.dts b/arch/arm/boot/dts/omap3-n950.dts
index 0885b34d5d7d..21060d96c67d 100644
--- a/arch/arm/boot/dts/omap3-n950.dts
+++ b/arch/arm/boot/dts/omap3-n950.dts
@@ -53,3 +53,7 @@
 		};
 	};
 };
+
+&modem {
+	compatible = "nokia,n950-modem";
+};
-- 
2.7.0.rc3

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web