ARM: dts: imx51-eukrea-mbimxsd51-baseboard: Add CAN support
Fabio Estevam
reviewerPATCH v5 1/2 ARM: dts: imx51-eukrea-mbimxsd51-baseboard: Add CAN support
From: Fabio Estevam <[email protected]>
Add support for CAN based on a MCP2515 connected to ECSPI1.
---
Changes since v4:
- Fix the SPI clock to 10MHz
- Use CAN_RST as the regulator name
Changes since v3:
- Provide a fixed-clock for CAN
- Separate escpi from CAN control pin groups
- Use vdd-supply for mcp2515
- Fix typo on commit log
Changes since v2:
- None
Changes since v1:
- Use active low for spi chipselect
- Remove unused GPIOs for CAN
.../boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+)
arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts +62 -0
@@ -24,6 +24,14 @@ model = "Eukrea CPUIMX51"; compatible = "eukrea,mbimxsd51","eukrea,cpuimx51", "fsl,imx51"; + clocks { + clk24M: can_clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + }; + }; + gpio_keys { compatible = "gpio-keys"; pinctrl-names = "default";
@@ -50,6 +58,23 @@ }; }; + regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + + reg_can: regulator at 0 { + compatible = "regulator-fixed"; + reg = <0>; + regulator-name = "CAN_RST"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio4 15 GPIO_ACTIVE_HIGH>; + startup-delay-us = <20000>; + enable-active-high; + }; + }; + sound { compatible = "eukrea,asoc-tlv320"; eukrea,model = "imx51-eukrea-tlv320aic23";
@@ -86,6 +111,26 @@ status = "okay"; }; +&ecspi1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ecspi1>; + fsl,spi-num-chipselects = <1>; + cs-gpios = <&gpio4 24 GPIO_ACTIVE_LOW>; + status = "okay"; + + can0: can at 0 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_can>; + compatible = "microchip,mcp2515"; + reg = <0>; + clocks = <&clk24M>; + spi-max-frequency = <10000000>; + interrupt-parent = <&gpio1>; + interrupts = <1 IRQ_TYPE_EDGE_FALLING>; + vdd-supply = <®_can>; + }; +}; + &i2c1 { tlv320aic23: codec at 1a { compatible = "ti,tlv320aic23";
@@ -104,6 +149,23 @@ >; }; + + pinctrl_can: cangrp { + fsl,pins = < + MX51_PAD_CSI2_PIXCLK__GPIO4_15 0x80000000 /* nReset */ + MX51_PAD_GPIO1_1__GPIO1_1 0x80000000 /* IRQ */ + >; + }; + + pinctrl_ecspi1: ecspi1grp { + fsl,pins = < + MX51_PAD_CSPI1_MISO__ECSPI1_MISO 0x185 + MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI 0x185 + MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK 0x185 + MX51_PAD_CSPI1_SS0__GPIO4_24 0x80000000 /* CS0 */ + >; + }; + pinctrl_esdhc1: esdhc1grp { fsl,pins = < MX51_PAD_SD1_CMD__SD1_CMD 0x400020d5
Signature · 1 line
1.8.3.2
Fabio Estevam
reviewerPATCH v5 2/2 ARM: dts: mx51: Remove mach-cpuimx51sd board file
From: Fabio Estevam <[email protected]>
eukrea_mbimxsd51-baseboard.c and mach-cpuimx51sd.c can be replaced with their devicetree equivalents: imx51-eukrea-mbimxsd51-baseboard.dts and imx51-eukrea-cpuimx51.dtsi respectively, so remove the board files.
This allows the conversion of mx51 to a devicetree-only platform.
---
Changes since v4:
- None
Changes since v3:
- None
Changes since v2:
- Fix typo in From field
Changes since v1:
- None
arch/arm/configs/imx_v6_v7_defconfig | 1 - arch/arm/mach-imx/Kconfig | 46 +--- arch/arm/mach-imx/Makefile | 4 - arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c | 231 ---------------- arch/arm/mach-imx/mach-cpuimx51sd.c | 364 ------------------------- 5 files changed, 6 insertions(+), 640 deletions(-) delete mode 100644 arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c delete mode 100644 arch/arm/mach-imx/mach-cpuimx51sd.c
arch/arm/configs/imx_v6_v7_defconfig +0 -1
@@ -32,7 +32,6 @@ CONFIG_MACH_PCM043=y CONFIG_MACH_MX35_3DS=y CONFIG_MACH_VPR200=y CONFIG_MACH_IMX51_DT=y -CONFIG_MACH_EUKREA_CPUIMX51SD=y CONFIG_SOC_IMX50=y CONFIG_SOC_IMX53=y CONFIG_SOC_IMX6Q=y
arch/arm/mach-imx/Kconfig +6 -40
58 lines not on this page · raw message
arch/arm/mach-imx/Makefile +0 -4
@@ -108,10 +108,6 @@ obj-$(CONFIG_SOC_IMX6) += suspend-imx6.o endif obj-$(CONFIG_SOC_IMX6) += pm-imx6.o -# i.MX5 based machines -obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += mach-cpuimx51sd.o -obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd51-baseboard.o - obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o obj-$(CONFIG_SOC_IMX50) += mach-imx50.o obj-$(CONFIG_SOC_IMX53) += mach-imx53.o
arch/arm/mach-imx/eukrea_mbimxsd51-baseboard.c deleted +0 -231
231 lines not on this page · raw message
arch/arm/mach-imx/mach-cpuimx51sd.c deleted +0 -364
364 lines not on this page · raw message
Signature · 1 line
1.8.3.2
Shawn Guo
AppliedPATCH v5 2/2 ARM: dts: mx51: Remove mach-cpuimx51sd board file
Quoted 9 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
eukrea_mbimxsd51-baseboard.candmach-cpuimx51sd.ccan be replaced with their devicetree equivalents:imx51-eukrea-mbimxsd51-baseboard.dtsandimx51-eukrea-cpuimx51.dtsirespectively, so remove the board files.This allows the conversion of mx51 to a devicetree-only platform.
Signed-off-by Fabio Estevam <[email protected]>
This is not a dts patch, so I dropped 'dts' from patch prefix.
Applied both, thanks.
PATCH v5 2/2 ARM: dts: mx51: Remove mach-cpuimx51sd board file
Quoted 7 lines · Shawn Guo
Quoted 6 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
eukrea_mbimxsd51-baseboard.candmach-cpuimx51sd.ccan be replaced with their devicetree equivalents:imx51-eukrea-mbimxsd51-baseboard.dtsandimx51-eukrea-cpuimx51.dtsirespectively, so remove the board files.
Quoted 7 lines
Quoted 3 lines
This allows the conversion of mx51 to a devicetree-only platform.
Signed-off-by Fabio Estevam <[email protected]>This is not a dts patch, so I dropped 'dts' from patch prefix.
Applied both, thanks.
This patch just hit linux-next (in next-20140519) as "ARM: mx51: Remove mach-cpuimx51sd board file".
It removed the Kconfig symbol MACH_EUKREA_MBIMXSD51_BASEBOARD. But it left one reference to that symbol in sound/soc/fsl/Kconfig untouched, see:
config SND_SOC_EUKREA_TLV320
tristate "Eukrea TLV320" depends on MACH_EUKREA_MBIMX27_BASEBOARD \ || MACH_EUKREA_MBIMXSD25_BASEBOARD \ || MACH_EUKREA_MBIMXSD35_BASEBOARD \ || MACH_EUKREA_MBIMXSD51_BASEBOARD \ || (OF && ARM) depends on I2C select SND_SOC_TLV320AIC23_I2C select SND_SOC_IMX_AUDMUX select SND_SOC_IMX_SSI select SND_SOC_FSL_SSI select SND_SOC_IMX_PCM_DMA help Enable I2S based access to the TLV320AIC23B codec attached to the SSI interface
What should be done with that last reference?
Paul Bolle
Fabio Estevam
reviewerPATCH v5 2/2 ARM: dts: mx51: Remove mach-cpuimx51sd board file
Quoted 24 lines · Paul Bolle
This patch just hit linux-next (in next-20140519) as "ARM: mx51: Remove mach-cpuimx51sd board file".
It removed the
KconfigsymbolMACH_EUKREA_MBIMXSD51_BASEBOARD. But it left one reference to that symbol insound/soc/fsl/Kconfiguntouched, see:config
SND_SOC_EUKREA_TLV320tristate "Eukrea TLV320" depends on MACH_EUKREA_MBIMX27_BASEBOARD \ || MACH_EUKREA_MBIMXSD25_BASEBOARD \ || MACH_EUKREA_MBIMXSD35_BASEBOARD \ || MACH_EUKREA_MBIMXSD51_BASEBOARD \ || (OF && ARM) depends on I2C select SND_SOC_TLV320AIC23_I2C select SND_SOC_IMX_AUDMUX select SND_SOC_IMX_SSI select SND_SOC_FSL_SSI select SND_SOC_IMX_PCM_DMA help Enable I2S based access to the TLV320AIC23B codec attached to the SSI interface
Quoted 1 line
What should be done with that last reference?
Thanks for reporting.
MACH_EUKREA_MBIMXSD51_BASEBOARD should be removed from sound/soc/fsl/Kconfig.
Would you like to submit a patch?
PATCH v5 2/2 ARM: dts: mx51: Remove mach-cpuimx51sd board file
Quoted 1 line · Fabio Estevam
MACH_EUKREA_MBIMXSD51_BASEBOARDshould be removed fromsound/soc/fsl/Kconfig.
Thanks for looking into this.
Quoted 1 line
Would you like to submit a patch?
Only if all you want for a commit explanation is something like "Remove a select statement for MACH_EUKREA_MBIMXSD51_BASEBOARD. It's a NOP".
But I suppose it might be nice to add a few lines why removing config MACH_EUKREA_MBIMXSD51_BASEBOARD didn't break the code (that is enabled by setting SND_SOC_EUKREA_TLV320). And I wouldn't know how to write those lines, because I have no idea how this all fits together. So I actually prefer if someone else submitted that patch.
But I do hope you don't mind if I drop in a reminder if that patch takes too long.
Paul Bolle
Fabio Estevam
reviewerPATCH v5 2/2 ARM: dts: mx51: Remove mach-cpuimx51sd board file
Quoted 10 lines · Paul Bolle
Quoted 1 line · Fabio Estevam
MACH_EUKREA_MBIMXSD51_BASEBOARDshould be removed fromsound/soc/fsl/Kconfig.Thanks for looking into this.
Quoted 1 line
Would you like to submit a patch?
Only if all you want for a commit explanation is something like "Remove a select statement for
MACH_EUKREA_MBIMXSD51_BASEBOARD. It's a NOP".
Quoted 8 lines
But I suppose it might be nice to add a few lines why removing config
MACH_EUKREA_MBIMXSD51_BASEBOARDdidn't break the code (that is enabled by settingSND_SOC_EUKREA_TLV320). And I wouldn't know how to write those lines, because I have no idea how this all fits together. So I actually prefer if someone else submitted that patch.But I do hope you don't mind if I drop in a reminder if that patch takes too long.
No problem. I can send a patch for this when 3.16-rc1 is out.
PATCH v5 2/2 ARM: dts: mx51: Remove mach-cpuimx51sd board file
Quoted 17 lines · Fabio Estevam
Quoted 16 lines · Paul Bolle
Quoted 1 line · Fabio Estevam
MACH_EUKREA_MBIMXSD51_BASEBOARDshould be removed fromsound/soc/fsl/Kconfig.Thanks for looking into this.
Quoted 1 line
Would you like to submit a patch?
Only if all you want for a commit explanation is something like "Remove a select statement for
MACH_EUKREA_MBIMXSD51_BASEBOARD. It's a NOP".But I suppose it might be nice to add a few lines why removing config
MACH_EUKREA_MBIMXSD51_BASEBOARDdidn't break the code (that is enabled by settingSND_SOC_EUKREA_TLV320). And I wouldn't know how to write those lines, because I have no idea how this all fits together. So I actually prefer if someone else submitted that patch.
Quoted 4 lines
Quoted 2 lines
But I do hope you don't mind if I drop in a reminder if that patch takes too long.
No problem. I can send a patch for this when 3.16-rc1 is out.
That's not needed anymore. Commit 7b8751abdd34 ("ASoC: fsl: Remove dependencies of boards for SND_SOC_EUKREA_TLV320") landed in linux-next about ten days ago and already removed this reference.
Paul Bolle
PATCH v5 1/2 ARM: dts: imx51-eukrea-mbimxsd51-baseboard: Add CAN support
In reply to Fabio EstevamQuoted 5 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Add support for CAN based on a MCP2515 connected to ECSPI1.
Signed-off-by Fabio Estevam <[email protected]>
Eric,
Are you okay with these two patches?
Shawn
PATCH v5 1/2 ARM: dts: imx51-eukrea-mbimxsd51-baseboard: Add CAN support
Le Mon, 12 May 2014 21:57:51 +0800,
Shawn Guo <[email protected]> a ?crit :
Quoted 12 lines · Fabio Estevam
Quoted 5 lines
From: Fabio Estevam <[email protected]>
Add support for CAN based on a MCP2515 connected to ECSPI1.
Signed-off-by Fabio Estevam <[email protected]>Eric,
Are you okay with these two patches?