* [PATCH v2 0/2] ARM: mxs: use CHIPID register to detect SoC
@ 2012-01-06 15:39 Shawn Guo
2012-01-06 15:39 ` [PATCH v2 1/2] ARM: mxs: detect SoC by checking CHIPID register Shawn Guo
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Shawn Guo @ 2012-01-06 15:39 UTC (permalink / raw)
To: linux-arm-kernel
Changes since v1:
* Define CHIPID register offset in digctl.h
* Rename macro CHIPID to MXS_CHIPID
* Remove mach-types.h inclusion from uncompress.h
Lauri Hintsala (1):
ARM: mxs: Add initial support for Bluegiga APX4 Development Kit
Shawn Guo (1):
ARM: mxs: detect SoC by checking CHIPID register
arch/arm/mach-mxs/Kconfig | 16 ++
arch/arm/mach-mxs/Makefile | 1 +
arch/arm/mach-mxs/include/mach/digctl.h | 1 +
arch/arm/mach-mxs/include/mach/mxs.h | 29 ++--
arch/arm/mach-mxs/include/mach/uncompress.h | 13 +-
arch/arm/mach-mxs/mach-apx4devkit.c | 245 +++++++++++++++++++++++++++
6 files changed, 285 insertions(+), 20 deletions(-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/2] ARM: mxs: detect SoC by checking CHIPID register
2012-01-06 15:39 [PATCH v2 0/2] ARM: mxs: use CHIPID register to detect SoC Shawn Guo
@ 2012-01-06 15:39 ` Shawn Guo
2012-01-07 22:50 ` Wolfram Sang
2012-01-11 10:54 ` Marek Vasut
2012-01-06 15:39 ` [PATCH v2 2/2] ARM: mxs: Add initial support for Bluegiga APX4 Development Kit Shawn Guo
2012-01-09 14:54 ` [PATCH] MXS: apx4devkit: add platform data for saif Lauri Hintsala
2 siblings, 2 replies; 9+ messages in thread
From: Shawn Guo @ 2012-01-06 15:39 UTC (permalink / raw)
To: linux-arm-kernel
Both imx23 and imx28 have CHIPID register at address 0x8001c310, which
can be used to identify the SoC. This patch changes cpu_is_xxx and
__arch_decomp_setup to use this CHIPID register than machine type to
detect the chip between imx23 and imx28, so that we do not need to
change these functions whenever a new board/machine gets added.
Suggested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
arch/arm/mach-mxs/include/mach/digctl.h | 1 +
arch/arm/mach-mxs/include/mach/mxs.h | 29 ++++++++++++++------------
arch/arm/mach-mxs/include/mach/uncompress.h | 13 +++++------
3 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/arch/arm/mach-mxs/include/mach/digctl.h b/arch/arm/mach-mxs/include/mach/digctl.h
index 49a888c..1796406 100644
--- a/arch/arm/mach-mxs/include/mach/digctl.h
+++ b/arch/arm/mach-mxs/include/mach/digctl.h
@@ -18,4 +18,5 @@
#define HW_DIGCTL_CTRL 0x0
#define BP_DIGCTL_CTRL_SAIF_CLKMUX 10
#define BM_DIGCTL_CTRL_SAIF_CLKMUX (0x3 << 10)
+#define HW_DIGCTL_CHIPID 0x310
#endif
diff --git a/arch/arm/mach-mxs/include/mach/mxs.h b/arch/arm/mach-mxs/include/mach/mxs.h
index bde5f66..7d4fb6d 100644
--- a/arch/arm/mach-mxs/include/mach/mxs.h
+++ b/arch/arm/mach-mxs/include/mach/mxs.h
@@ -23,22 +23,10 @@
#include <linux/io.h>
#endif
#include <asm/mach-types.h>
+#include <mach/digctl.h>
#include <mach/hardware.h>
/*
- * MXS CPU types
- */
-#define cpu_is_mx23() ( \
- machine_is_mx23evk() || \
- machine_is_stmp378x() || \
- 0)
-#define cpu_is_mx28() ( \
- machine_is_mx28evk() || \
- machine_is_m28evk() || \
- machine_is_tx28() || \
- 0)
-
-/*
* IO addresses common to MXS-based
*/
#define MXS_IO_BASE_ADDR 0x80000000
@@ -109,6 +97,21 @@ static inline void __mxs_togl(u32 mask, void __iomem *reg)
{
__raw_writel(mask, reg + MXS_TOG_ADDR);
}
+
+/*
+ * MXS CPU types
+ */
+#define MXS_CHIPID (MXS_IO_ADDRESS(MXS_DIGCTL_BASE_ADDR) + HW_DIGCTL_CHIPID)
+
+static inline int cpu_is_mx23(void)
+{
+ return ((__raw_readl(MXS_CHIPID) >> 16) == 0x3780);
+}
+
+static inline int cpu_is_mx28(void)
+{
+ return ((__raw_readl(MXS_CHIPID) >> 16) == 0x2800);
+}
#endif
#endif /* __MACH_MXS_H__ */
diff --git a/arch/arm/mach-mxs/include/mach/uncompress.h b/arch/arm/mach-mxs/include/mach/uncompress.h
index 6777674..ef28114 100644
--- a/arch/arm/mach-mxs/include/mach/uncompress.h
+++ b/arch/arm/mach-mxs/include/mach/uncompress.h
@@ -18,8 +18,6 @@
#ifndef __MACH_MXS_UNCOMPRESS_H__
#define __MACH_MXS_UNCOMPRESS_H__
-#include <asm/mach-types.h>
-
unsigned long mxs_duart_base;
#define MXS_DUART(x) (*(volatile unsigned long *)(mxs_duart_base + (x)))
@@ -55,16 +53,17 @@ static inline void flush(void)
#define MX23_DUART_BASE_ADDR 0x80070000
#define MX28_DUART_BASE_ADDR 0x80074000
+#define MXS_DIGCTL_CHIPID 0x8001c310
static inline void __arch_decomp_setup(unsigned long arch_id)
{
- switch (arch_id) {
- case MACH_TYPE_MX23EVK:
+ u16 chipid = (*(volatile unsigned long *) MXS_DIGCTL_CHIPID) >> 16;
+
+ switch (chipid) {
+ case 0x3780:
mxs_duart_base = MX23_DUART_BASE_ADDR;
break;
- case MACH_TYPE_MX28EVK:
- case MACH_TYPE_M28EVK:
- case MACH_TYPE_TX28:
+ case 0x2800:
mxs_duart_base = MX28_DUART_BASE_ADDR;
break;
default:
--
1.7.4.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/2] ARM: mxs: Add initial support for Bluegiga APX4 Development Kit
2012-01-06 15:39 [PATCH v2 0/2] ARM: mxs: use CHIPID register to detect SoC Shawn Guo
2012-01-06 15:39 ` [PATCH v2 1/2] ARM: mxs: detect SoC by checking CHIPID register Shawn Guo
@ 2012-01-06 15:39 ` Shawn Guo
2012-01-09 14:54 ` [PATCH] MXS: apx4devkit: add platform data for saif Lauri Hintsala
2 siblings, 0 replies; 9+ messages in thread
From: Shawn Guo @ 2012-01-06 15:39 UTC (permalink / raw)
To: linux-arm-kernel
From: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Added initial support for APX4 Development Kit with RTC, LED, Ethernet,
Audio, SDIO, I2C, DUART and AUART support.
Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Signed-off-by: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
arch/arm/mach-mxs/Kconfig | 16 +++
arch/arm/mach-mxs/Makefile | 1 +
arch/arm/mach-mxs/mach-apx4devkit.c | 245 +++++++++++++++++++++++++++++++++++
3 files changed, 262 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-mxs/mach-apx4devkit.c
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
index cf00b3e..c57f996 100644
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -83,6 +83,18 @@ config MODULE_M28
select MXS_HAVE_PLATFORM_MXSFB
select MXS_OCOTP
+config MODULE_APX4
+ bool
+ select SOC_IMX28
+ select LEDS_GPIO_REGISTER
+ select MXS_HAVE_AMBA_DUART
+ select MXS_HAVE_PLATFORM_AUART
+ select MXS_HAVE_PLATFORM_FEC
+ select MXS_HAVE_PLATFORM_MXS_I2C
+ select MXS_HAVE_PLATFORM_MXS_MMC
+ select MXS_HAVE_PLATFORM_MXS_SAIF
+ select MXS_OCOTP
+
config MACH_TX28
bool "Ka-Ro TX28 module"
select MODULE_TX28
@@ -91,4 +103,8 @@ config MACH_M28EVK
bool "Support DENX M28EVK Platform"
select MODULE_M28
+config MACH_APX4DEVKIT
+ bool "Support Bluegiga APX4 Development Kit"
+ select MODULE_APX4
+
endif
diff --git a/arch/arm/mach-mxs/Makefile b/arch/arm/mach-mxs/Makefile
index 8c93b24..908bf9a 100644
--- a/arch/arm/mach-mxs/Makefile
+++ b/arch/arm/mach-mxs/Makefile
@@ -11,6 +11,7 @@ obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o
obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o
obj-$(CONFIG_MACH_MX28EVK) += mach-mx28evk.o
obj-$(CONFIG_MACH_M28EVK) += mach-m28evk.o
+obj-$(CONFIG_MACH_APX4DEVKIT) += mach-apx4devkit.o
obj-$(CONFIG_MODULE_TX28) += module-tx28.o
obj-$(CONFIG_MACH_TX28) += mach-tx28.o
diff --git a/arch/arm/mach-mxs/mach-apx4devkit.c b/arch/arm/mach-mxs/mach-apx4devkit.c
new file mode 100644
index 0000000..08693f1
--- /dev/null
+++ b/arch/arm/mach-mxs/mach-apx4devkit.c
@@ -0,0 +1,245 @@
+/*
+ * Copyright (C) 2011
+ * Lauri Hintsala, Bluegiga, <lauri.hintsala@bluegiga.com>
+ * Veli-Pekka Peltola, Bluegiga, <veli-pekka.peltola@bluegiga.com>
+ *
+ * based on: mach-mx28evk.c
+ * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/delay.h>
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+#include <linux/leds.h>
+#include <linux/clk.h>
+#include <linux/i2c.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
+#include <linux/micrel_phy.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/time.h>
+
+#include <mach/common.h>
+#include <mach/iomux-mx28.h>
+
+#include "devices-mx28.h"
+
+#define APX4DEVKIT_GPIO_USERLED MXS_GPIO_NR(3, 28)
+
+static const iomux_cfg_t apx4devkit_pads[] __initconst = {
+ /* duart */
+ MX28_PAD_PWM0__DUART_RX | MXS_PAD_CTRL,
+ MX28_PAD_PWM1__DUART_TX | MXS_PAD_CTRL,
+
+ /* auart0 */
+ MX28_PAD_AUART0_RX__AUART0_RX | MXS_PAD_CTRL,
+ MX28_PAD_AUART0_TX__AUART0_TX | MXS_PAD_CTRL,
+ MX28_PAD_AUART0_CTS__AUART0_CTS | MXS_PAD_CTRL,
+ MX28_PAD_AUART0_RTS__AUART0_RTS | MXS_PAD_CTRL,
+
+ /* auart1 */
+ MX28_PAD_AUART1_RX__AUART1_RX | MXS_PAD_CTRL,
+ MX28_PAD_AUART1_TX__AUART1_TX | MXS_PAD_CTRL,
+
+ /* auart2 */
+ MX28_PAD_SSP2_SCK__AUART2_RX | MXS_PAD_CTRL,
+ MX28_PAD_SSP2_MOSI__AUART2_TX | MXS_PAD_CTRL,
+
+ /* auart3 */
+ MX28_PAD_SSP2_MISO__AUART3_RX | MXS_PAD_CTRL,
+ MX28_PAD_SSP2_SS0__AUART3_TX | MXS_PAD_CTRL,
+
+#define MXS_PAD_FEC (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP)
+ /* fec0 */
+ MX28_PAD_ENET0_MDC__ENET0_MDC | MXS_PAD_FEC,
+ MX28_PAD_ENET0_MDIO__ENET0_MDIO | MXS_PAD_FEC,
+ MX28_PAD_ENET0_RX_EN__ENET0_RX_EN | MXS_PAD_FEC,
+ MX28_PAD_ENET0_RXD0__ENET0_RXD0 | MXS_PAD_FEC,
+ MX28_PAD_ENET0_RXD1__ENET0_RXD1 | MXS_PAD_FEC,
+ MX28_PAD_ENET0_TX_EN__ENET0_TX_EN | MXS_PAD_FEC,
+ MX28_PAD_ENET0_TXD0__ENET0_TXD0 | MXS_PAD_FEC,
+ MX28_PAD_ENET0_TXD1__ENET0_TXD1 | MXS_PAD_FEC,
+ MX28_PAD_ENET_CLK__CLKCTRL_ENET | MXS_PAD_FEC,
+
+ /* i2c */
+ MX28_PAD_I2C0_SCL__I2C0_SCL,
+ MX28_PAD_I2C0_SDA__I2C0_SDA,
+
+ /* mmc0 */
+ MX28_PAD_SSP0_DATA0__SSP0_D0 |
+ (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+ MX28_PAD_SSP0_DATA1__SSP0_D1 |
+ (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+ MX28_PAD_SSP0_DATA2__SSP0_D2 |
+ (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+ MX28_PAD_SSP0_DATA3__SSP0_D3 |
+ (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+ MX28_PAD_SSP0_DATA4__SSP0_D4 |
+ (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+ MX28_PAD_SSP0_DATA5__SSP0_D5 |
+ (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+ MX28_PAD_SSP0_DATA6__SSP0_D6 |
+ (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+ MX28_PAD_SSP0_DATA7__SSP0_D7 |
+ (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+ MX28_PAD_SSP0_CMD__SSP0_CMD |
+ (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+ MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT |
+ (MXS_PAD_8MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
+ MX28_PAD_SSP0_SCK__SSP0_SCK |
+ (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
+
+ /* led */
+ MX28_PAD_PWM3__GPIO_3_28 | MXS_PAD_CTRL,
+
+ /* saif0 & saif1 */
+ MX28_PAD_SAIF0_MCLK__SAIF0_MCLK |
+ (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+ MX28_PAD_SAIF0_LRCLK__SAIF0_LRCLK |
+ (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+ MX28_PAD_SAIF0_BITCLK__SAIF0_BITCLK |
+ (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+ MX28_PAD_SAIF0_SDATA0__SAIF0_SDATA0 |
+ (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+ MX28_PAD_SAIF1_SDATA0__SAIF1_SDATA0 |
+ (MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP),
+};
+
+/* led */
+static const struct gpio_led apx4devkit_leds[] __initconst = {
+ {
+ .name = "user-led",
+ .default_trigger = "heartbeat",
+ .gpio = APX4DEVKIT_GPIO_USERLED,
+ },
+};
+
+static const struct gpio_led_platform_data apx4devkit_led_data __initconst = {
+ .leds = apx4devkit_leds,
+ .num_leds = ARRAY_SIZE(apx4devkit_leds),
+};
+
+static const struct fec_platform_data mx28_fec_pdata __initconst = {
+ .phy = PHY_INTERFACE_MODE_RMII,
+};
+
+static const struct mxs_mmc_platform_data apx4devkit_mmc_pdata __initconst = {
+ .wp_gpio = -EINVAL,
+ .flags = SLOTF_4_BIT_CAPABLE,
+};
+
+static const struct i2c_board_info apx4devkit_i2c_boardinfo[] __initconst = {
+ { I2C_BOARD_INFO("sgtl5000", 0x0a) }, /* ASoC */
+ { I2C_BOARD_INFO("pcf8563", 0x51) }, /* RTC */
+};
+
+#if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || \
+ defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
+static struct regulator_consumer_supply apx4devkit_audio_consumer_supplies[] = {
+ REGULATOR_SUPPLY("VDDA", "0-000a"),
+ REGULATOR_SUPPLY("VDDIO", "0-000a"),
+};
+
+static struct regulator_init_data apx4devkit_vdd_reg_init_data = {
+ .constraints = {
+ .name = "3V3",
+ .always_on = 1,
+ },
+ .consumer_supplies = apx4devkit_audio_consumer_supplies,
+ .num_consumer_supplies = ARRAY_SIZE(apx4devkit_audio_consumer_supplies),
+};
+
+static struct fixed_voltage_config apx4devkit_vdd_pdata = {
+ .supply_name = "board-3V3",
+ .microvolts = 3300000,
+ .gpio = -EINVAL,
+ .enabled_at_boot = 1,
+ .init_data = &apx4devkit_vdd_reg_init_data,
+};
+
+static struct platform_device apx4devkit_voltage_regulator = {
+ .name = "reg-fixed-voltage",
+ .id = -1,
+ .num_resources = 0,
+ .dev = {
+ .platform_data = &apx4devkit_vdd_pdata,
+ },
+};
+
+static void __init apx4devkit_add_regulators(void)
+{
+ platform_device_register(&apx4devkit_voltage_regulator);
+}
+#else
+static void __init apx4devkit_add_regulators(void) {}
+#endif
+
+static int apx4devkit_phy_fixup(struct phy_device *phy)
+{
+ phy->dev_flags |= MICREL_PHY_50MHZ_CLK;
+ return 0;
+}
+
+static void __init apx4devkit_init(void)
+{
+ mxs_iomux_setup_multiple_pads(apx4devkit_pads,
+ ARRAY_SIZE(apx4devkit_pads));
+
+ mx28_add_duart();
+ mx28_add_auart0();
+ mx28_add_auart1();
+ mx28_add_auart2();
+ mx28_add_auart3();
+
+ /*
+ * Register fixup for the Micrel KS8031 PHY clock
+ * (shares same ID with KS8051)
+ */
+ phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK,
+ apx4devkit_phy_fixup);
+
+ mx28_add_fec(0, &mx28_fec_pdata);
+
+ mx28_add_mxs_mmc(0, &apx4devkit_mmc_pdata);
+
+ gpio_led_register_device(0, &apx4devkit_led_data);
+
+ mx28_add_saif(0);
+ mx28_add_saif(1);
+
+ apx4devkit_add_regulators();
+
+ mx28_add_mxs_i2c(0);
+ i2c_register_board_info(0, apx4devkit_i2c_boardinfo,
+ ARRAY_SIZE(apx4devkit_i2c_boardinfo));
+
+ mxs_add_platform_device("mxs-sgtl5000", 0, NULL, 0, NULL, 0);
+}
+
+static void __init apx4devkit_timer_init(void)
+{
+ mx28_clocks_init();
+}
+
+static struct sys_timer apx4devkit_timer = {
+ .init = apx4devkit_timer_init,
+};
+
+MACHINE_START(APX4DEVKIT, "Bluegiga APX4 Development Kit")
+ .map_io = mx28_map_io,
+ .init_irq = mx28_init_irq,
+ .timer = &apx4devkit_timer,
+ .init_machine = apx4devkit_init,
+MACHINE_END
--
1.7.4.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 1/2] ARM: mxs: detect SoC by checking CHIPID register
2012-01-06 15:39 ` [PATCH v2 1/2] ARM: mxs: detect SoC by checking CHIPID register Shawn Guo
@ 2012-01-07 22:50 ` Wolfram Sang
2012-01-11 10:54 ` Marek Vasut
1 sibling, 0 replies; 9+ messages in thread
From: Wolfram Sang @ 2012-01-07 22:50 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Jan 06, 2012 at 11:39:25PM +0800, Shawn Guo wrote:
> Both imx23 and imx28 have CHIPID register at address 0x8001c310, which
> can be used to identify the SoC. This patch changes cpu_is_xxx and
> __arch_decomp_setup to use this CHIPID register than machine type to
> detect the chip between imx23 and imx28, so that we do not need to
> change these functions whenever a new board/machine gets added.
>
> Suggested-by: Wolfram Sang <w.sang@pengutronix.de>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120107/f7b599b1/attachment-0001.sig>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] MXS: apx4devkit: add platform data for saif
2012-01-06 15:39 [PATCH v2 0/2] ARM: mxs: use CHIPID register to detect SoC Shawn Guo
2012-01-06 15:39 ` [PATCH v2 1/2] ARM: mxs: detect SoC by checking CHIPID register Shawn Guo
2012-01-06 15:39 ` [PATCH v2 2/2] ARM: mxs: Add initial support for Bluegiga APX4 Development Kit Shawn Guo
@ 2012-01-09 14:54 ` Lauri Hintsala
2012-01-10 3:40 ` Shawn Guo
2 siblings, 1 reply; 9+ messages in thread
From: Lauri Hintsala @ 2012-01-09 14:54 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
cc: shawn.guo at linaro.org
---
Hi Shawn,
My patch was based on mainline tree and saif patches broke it. This
patch fixes compiling issue which was caused by saif patches. If you
think so we can apply also this patch later when apx4devkit is pulled to
mainline (hopefully to 3.3).
Lauri
arch/arm/mach-mxs/mach-apx4devkit.c | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-mxs/mach-apx4devkit.c b/arch/arm/mach-mxs/mach-apx4devkit.c
index 08693f1..013aae5 100644
--- a/arch/arm/mach-mxs/mach-apx4devkit.c
+++ b/arch/arm/mach-mxs/mach-apx4devkit.c
@@ -33,6 +33,7 @@
#include <mach/common.h>
#include <mach/iomux-mx28.h>
+#include <mach/digctl.h>
#include "devices-mx28.h"
@@ -192,6 +193,18 @@ static int apx4devkit_phy_fixup(struct phy_device *phy)
return 0;
}
+static const struct mxs_saif_platform_data
+ apx4devkit_mxs_saif_pdata[] __initconst = {
+ /* working on EXTMSTR0 mode (saif0 master, saif1 slave) */
+ {
+ .master_mode = 1,
+ .master_id = 0,
+ }, {
+ .master_mode = 0,
+ .master_id = 0,
+ },
+};
+
static void __init apx4devkit_init(void)
{
mxs_iomux_setup_multiple_pads(apx4devkit_pads,
@@ -216,8 +229,9 @@ static void __init apx4devkit_init(void)
gpio_led_register_device(0, &apx4devkit_led_data);
- mx28_add_saif(0);
- mx28_add_saif(1);
+ mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0);
+ mx28_add_saif(0, &apx4devkit_mxs_saif_pdata[0]);
+ mx28_add_saif(1, &apx4devkit_mxs_saif_pdata[1]);
apx4devkit_add_regulators();
--
1.7.4.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] MXS: apx4devkit: add platform data for saif
2012-01-09 14:54 ` [PATCH] MXS: apx4devkit: add platform data for saif Lauri Hintsala
@ 2012-01-10 3:40 ` Shawn Guo
0 siblings, 0 replies; 9+ messages in thread
From: Shawn Guo @ 2012-01-10 3:40 UTC (permalink / raw)
To: linux-arm-kernel
Please make the patch subject like: 'ARM: mxs: apx4devkit: ...'
On Mon, Jan 09, 2012 at 04:54:06PM +0200, Lauri Hintsala wrote:
> Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
> cc: shawn.guo at linaro.org
> ---
>
> Hi Shawn,
>
> My patch was based on mainline tree and saif patches broke it. This
> patch fixes compiling issue which was caused by saif patches. If you
> think so we can apply also this patch later when apx4devkit is pulled to
> mainline (hopefully to 3.3).
I doubt that Arnd and Olof will send it for 3.3, since it's missed
arm-soc 'next' branch. But we can send this patch as a fix to arm-soc
anyway, when the board support gets pulled to arm-soc tree.
>
> Lauri
>
>
> arch/arm/mach-mxs/mach-apx4devkit.c | 18 ++++++++++++++++--
> 1 files changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-mxs/mach-apx4devkit.c b/arch/arm/mach-mxs/mach-apx4devkit.c
> index 08693f1..013aae5 100644
> --- a/arch/arm/mach-mxs/mach-apx4devkit.c
> +++ b/arch/arm/mach-mxs/mach-apx4devkit.c
> @@ -33,6 +33,7 @@
>
> #include <mach/common.h>
> #include <mach/iomux-mx28.h>
> +#include <mach/digctl.h>
Nit: I would suggest put the new line in the second row to have them
alphabetically sorted as a group of <mach/*> inclusion.
Regards,
Shawn
>
> #include "devices-mx28.h"
>
> @@ -192,6 +193,18 @@ static int apx4devkit_phy_fixup(struct phy_device *phy)
> return 0;
> }
>
> +static const struct mxs_saif_platform_data
> + apx4devkit_mxs_saif_pdata[] __initconst = {
> + /* working on EXTMSTR0 mode (saif0 master, saif1 slave) */
> + {
> + .master_mode = 1,
> + .master_id = 0,
> + }, {
> + .master_mode = 0,
> + .master_id = 0,
> + },
> +};
> +
> static void __init apx4devkit_init(void)
> {
> mxs_iomux_setup_multiple_pads(apx4devkit_pads,
> @@ -216,8 +229,9 @@ static void __init apx4devkit_init(void)
>
> gpio_led_register_device(0, &apx4devkit_led_data);
>
> - mx28_add_saif(0);
> - mx28_add_saif(1);
> + mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0);
> + mx28_add_saif(0, &apx4devkit_mxs_saif_pdata[0]);
> + mx28_add_saif(1, &apx4devkit_mxs_saif_pdata[1]);
>
> apx4devkit_add_regulators();
>
> --
> 1.7.4.1
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/2] ARM: mxs: detect SoC by checking CHIPID register
2012-01-06 15:39 ` [PATCH v2 1/2] ARM: mxs: detect SoC by checking CHIPID register Shawn Guo
2012-01-07 22:50 ` Wolfram Sang
@ 2012-01-11 10:54 ` Marek Vasut
2012-01-11 13:07 ` Shawn Guo
1 sibling, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2012-01-11 10:54 UTC (permalink / raw)
To: linux-arm-kernel
> Both imx23 and imx28 have CHIPID register at address 0x8001c310, which
> can be used to identify the SoC. This patch changes cpu_is_xxx and
> __arch_decomp_setup to use this CHIPID register than machine type to
> detect the chip between imx23 and imx28, so that we do not need to
> change these functions whenever a new board/machine gets added.
>
> Suggested-by: Wolfram Sang <w.sang@pengutronix.de>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
Looks nice, please add my:
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Also please keep me in Cc with mxs patches.
M
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/2] ARM: mxs: detect SoC by checking CHIPID register
2012-01-11 10:54 ` Marek Vasut
@ 2012-01-11 13:07 ` Shawn Guo
2012-01-11 13:08 ` Marek Vasut
0 siblings, 1 reply; 9+ messages in thread
From: Shawn Guo @ 2012-01-11 13:07 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jan 11, 2012 at 11:54:59AM +0100, Marek Vasut wrote:
> > Both imx23 and imx28 have CHIPID register at address 0x8001c310, which
> > can be used to identify the SoC. This patch changes cpu_is_xxx and
> > __arch_decomp_setup to use this CHIPID register than machine type to
> > detect the chip between imx23 and imx28, so that we do not need to
> > change these functions whenever a new board/machine gets added.
> >
> > Suggested-by: Wolfram Sang <w.sang@pengutronix.de>
> > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > ---
>
> Looks nice, please add my:
>
> Acked-by: Marek Vasut <marek.vasut@gmail.com>
>
Sorry, the patch has been sent to arm-soc.
> Also please keep me in Cc with mxs patches.
>
Ok, will do.
--
Regards,
Shawn
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/2] ARM: mxs: detect SoC by checking CHIPID register
2012-01-11 13:07 ` Shawn Guo
@ 2012-01-11 13:08 ` Marek Vasut
0 siblings, 0 replies; 9+ messages in thread
From: Marek Vasut @ 2012-01-11 13:08 UTC (permalink / raw)
To: linux-arm-kernel
> On Wed, Jan 11, 2012 at 11:54:59AM +0100, Marek Vasut wrote:
> > > Both imx23 and imx28 have CHIPID register at address 0x8001c310, which
> > > can be used to identify the SoC. This patch changes cpu_is_xxx and
> > > __arch_decomp_setup to use this CHIPID register than machine type to
> > > detect the chip between imx23 and imx28, so that we do not need to
> > > change these functions whenever a new board/machine gets added.
> > >
> > > Suggested-by: Wolfram Sang <w.sang@pengutronix.de>
> > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > > ---
> >
> > Looks nice, please add my:
> >
> > Acked-by: Marek Vasut <marek.vasut@gmail.com>
>
> Sorry, the patch has been sent to arm-soc.
No problem
>
> > Also please keep me in Cc with mxs patches.
>
> Ok, will do.
Thanks
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-01-11 13:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-06 15:39 [PATCH v2 0/2] ARM: mxs: use CHIPID register to detect SoC Shawn Guo
2012-01-06 15:39 ` [PATCH v2 1/2] ARM: mxs: detect SoC by checking CHIPID register Shawn Guo
2012-01-07 22:50 ` Wolfram Sang
2012-01-11 10:54 ` Marek Vasut
2012-01-11 13:07 ` Shawn Guo
2012-01-11 13:08 ` Marek Vasut
2012-01-06 15:39 ` [PATCH v2 2/2] ARM: mxs: Add initial support for Bluegiga APX4 Development Kit Shawn Guo
2012-01-09 14:54 ` [PATCH] MXS: apx4devkit: add platform data for saif Lauri Hintsala
2012-01-10 3:40 ` Shawn Guo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.