ARM: kirkwood: Add support for the MPL CEC4
PATCH 1/1 ARM: kirkwood: Add support for the MPL CEC4
In reply to a message not in the archiveStefan,
Thanks for the patch! I didn't know kirkwood made it into industrial controllers. Comments below.
Quoted 8 lines · Stefan Peter
Signed-off-by Stefan Peter <[email protected]>arch/arm/boot/dts/Makefile +0
-0
arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ · line 44
Quoted 6 lines
arch/arm/boot/dts/Makefile +2
-1@@ -40,7 +40,8 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ kirkwood-lschlv2.dtb \ kirkwood-lsxhl.dtb \ kirkwood-ts219-6281.dtb \ - kirkwood-ts219-6282.dtb + kirkwood-ts219-6282.dtb \ + kirkwood-mplcec4.dtb
Please insert in alphabetical order. This reduces merge conflicts for us.
Quoted 9 lines
arch/arm/boot/dts/Makefile +0
-0dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ msm8960-cdp.dtb dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \arch/arm/boot/dts/kirkwood-mplcec4.dts new file +0
-0
arch/arm/boot/dts/kirkwood-mplcec4.dts line 7
Quoted 7 lines
arch/arm/boot/dts/kirkwood-mplcec4.dts new file +7
-0@@ -0,0 +1,119 @@ +/dts-v1/; + +/include/ "kirkwood.dtsi" + +/ { + model = "MPL CEC4"; + compatible = "mpl,mplcec4", "marvell,kirkwood-88f6281", "marvell,kirkwood";
Perhaps "mpl,cec4-10", "mpl,cec4", "marvell..." would be more appropriate here, according to the slick sheet.
Quoted 53 lines
arch/arm/boot/dts/kirkwood-mplcec4.dts new file +53
-0+ + memory { + device_type = "memory"; + reg = <0x00000000 0x20000000>; + }; + + chosen { + bootargs = "console=ttyS0,115200n8 earlyprintk"; + }; + + ocp at f1000000 { + i2c at 11000 { + status = "okay"; + + rtc at 51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; + }; + + eeprom at 57 { + compatible = "atmel,24c02"; + reg = <0x57>; + }; + + }; + + serial at 12000 { + clock-frequency = <200000000>; + status = "ok"; + }; + + nand at 3000000 { + status = "okay"; + + partition at 0 { + label = "uboot"; + reg = <0x0000000 0x100000>; + }; + + partition at 100000 { + label = "env"; + reg = <0x100000 0x80000>; + }; + + partition at 180000 { + label = "fdt"; + reg = <0x180000 0x80000>; + }; + + partition at 200000 { + label = "kernel"; + reg = <0x200000 0x400000>; + };
arch/arm/boot/dts/kirkwood-mplcec4.dts line 70
Quoted 10 lines
arch/arm/boot/dts/kirkwood-mplcec4.dts new file +10
-0+ + partition at 600000 { + label = "rootfs"; + reg = <0x600000 0x1fa00000>; + }; + }; + + rtc at 10300 { + status = "disabled"; + };
really?
Quoted 54 lines
arch/arm/boot/dts/kirkwood-mplcec4.dts new file +49
-0+ + sata at 80000 { + nr-ports = <2>; + status = "okay"; + + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + health { + label = "status:green:health"; + gpios = <&gpio0 7 1>; + }; + + user1o { + label = "user1:orange"; + gpios = <&gpio1 8 1>; + default-state = "on"; + }; + + user1g { + label = "user1:green"; + gpios = <&gpio1 9 1>; + default-state = "on"; + }; + + user0o { + label = "user0:orange"; + gpios = <&gpio1 12 1>; + default-state = "on"; + }; + + user0g { + label = "user0:green"; + gpios = <&gpio1 13 1>; + default-state = "on"; + }; + + misc { + label = "status:orange:misc"; + gpios = <&gpio1 14 1>; + default-state = "on"; + }; + + }; +}; +arch/arm/configs/kirkwood_defconfig +0
-0
arch/arm/configs/kirkwood_defconfig CONFIG_MACH_GOFLEXNET_DT=y · line 30
Quoted 4 lines
arch/arm/configs/kirkwood_defconfig +1
-0@@ -27,6 +27,7 @@ CONFIG_MACH_GOFLEXNET_DT=y CONFIG_MACH_LSXL_DT=y CONFIG_MACH_IOMEGA_IX2_200_DT=y CONFIG_MACH_KM_KIRKWOOD_DT=y +CONFIG_MACH_MPLCEC4_DT=y
Thank you. :-)
Quoted 35 lines
arch/arm/configs/kirkwood_defconfig +0
-0CONFIG_MACH_TS219=y CONFIG_MACH_TS41X=y CONFIG_MACH_DOCKSTAR=yarch/arm/mach-kirkwood/Kconfig +7
-0@@ -130,6 +130,13 @@ config MACH_KM_KIRKWOOD_DT Say 'Y' here if you want your kernel to support the Keymile Kirkwood Reference Desgin, using Flattened Device Tree. +config MACH_MPLCEC4_DT + bool "MPL CEC4 (Flattened Device Tree)" + select ARCH_KIRKWOOD_DT + help + Say 'Y' here if you want your kernel to support the + MPL CEC4 (Flattened Device Tree). + config MACH_TS219 bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" helparch/arm/mach-kirkwood/Makefile +1
-0@@ -31,3 +31,4 @@ obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o +obj-$(CONFIG_MACH_MPLCEC4_DT) += board-mplcec4.oarch/arm/mach-kirkwood/board-dt.c +0
-0
arch/arm/mach-kirkwood/board-dt.c static void __init kirkwood_dt_init(void) · line 97
Quoted 4 lines
arch/arm/mach-kirkwood/board-dt.c +1
-0@@ -94,6 +94,9 @@ static void __init kirkwood_dt_init(void)if (of_machine_is_compatible ("keymile,km_kirkwood" ))km_kirkwood_init (); +if (of_machine_is_compatible ("mpl,mplcec4" ))
With the above comment, this would be "mpl,cec4"
arch/arm/mach-kirkwood/board-dt.c static const char *kirkwood_dt_board_compat[] = { · line 116
Quoted 10 lines
arch/arm/mach-kirkwood/board-dt.c +3
-0+mplcec4_init (); +of_platform_populate (NULL , kirkwood_dt_match_table, kirkwood_auxdata_lookup,NULL ); }@@ -110,6 +113,7 @@ static const char *kirkwood_dt_board_compat[] = {"buffalo,lsxl" ,"iom,ix2-200" ,"keymile,km_kirkwood" , + "mpl,mplcec4",
Same.
Quoted 58 lines
arch/arm/mach-kirkwood/board-dt.c +0
-0NULL };arch/arm/mach-kirkwood/board-mplcec4.c new file +49
-0@@ -0,0 +1,82 @@ +/* +* Copyright (C) 2012 MPL AG, Switzerland +* Stefan Peter <[email protected]> +* +* arch/arm/mach-kirkwood/board-mplcec4.c +* +* This file is licensed under the terms of the GNU General Public +* License version 2. This program is licensed "as is" without any +* warranty of any kind, whether express or implied. +*/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/mv643xx_eth.h> +#include <linux/clk.h> +#include <linux/clk-private.h> +#include <linux/platform_data/mmc-mvsdio.h> +#include "common.h" +#include "mpp.h" + +static struct mv643xx_eth_platform_data mplcec4_ge00_data = { + .phy_addr =MV643XX_ETH_PHY_ADDR (1 ), +}; + +static struct mv643xx_eth_platform_data mplcec4_ge01_data = { + .phy_addr =MV643XX_ETH_PHY_ADDR (2 ), +}; + +static unsigned int mplcec4_mpp_config[]__initdata = { +MPP0_NF_IO2 , +MPP1_NF_IO3 , +MPP2_NF_IO4 , +MPP3_NF_IO5 , +MPP4_NF_IO6 , +MPP5_NF_IO7 , + MPP6_SYSRST_OUTn, +MPP7_GPO ,/* Status LED Green High Active */ +MPP10_UART0_TXD , +MPP11_UART0_RXD , +MPP12_SD_CLK , +MPP13_SD_CMD ,/* Alt UART1_TXD */ +MPP14_SD_D0 ,/* Alt UART1_RXD */ +MPP15_SD_D1 , +MPP16_SD_D2 , +MPP17_SD_D3 , +MPP18_NF_IO0 , +MPP19_NF_IO1 , +MPP28_GPIO ,/* Input SYS_POR_DET (active High) */ +MPP29_GPIO ,/* Input SYS_RTC_INT (active High) */
arch/arm/mach-kirkwood/board-mplcec4.c line 59
Quoted 10 lines
arch/arm/mach-kirkwood/board-mplcec4.c new file +10
-0+ MPP34_SATA1_ACTn, + MPP35_SATA0_ACTn, +MPP40_GPIO ,/* LED User1 orange */ +MPP41_GPIO ,/* LED User1 green */ +MPP44_GPIO ,/* LED User0 orange */ +MPP45_GPIO ,/* LED User0 green */ +MPP46_GPIO ,/* Status LED Yellow High Active */ +MPP47_GPIO ,/* SD_CD# (in/IRQ)*/ +0 +};
We're this to DT during this merge window, but don't worry about changing it. We'll be doing a cleanup patch to catch the new boards. If you could just keep an eye out for it and test, it would be appreciated.
This looks really good, if you can turn around a V2, I should be able to get this in for v3.8. It's getting close, though.
thx,
Jason.
Quoted 43 lines
arch/arm/mach-kirkwood/board-mplcec4.c new file +23
-0+ + +static struct mvsdio_platform_data mplcec4_mvsdio_data = { + .gpio_card_detect =47 ,/* MPP47 used as SD card detect */ +}; + + + +void __init mplcec4_init (void ) +{ +/* +* Basic setup. Needs to be called early. +*/ +kirkwood_mpp_conf (mplcec4_mpp_config); +kirkwood_ehci_init (); +kirkwood_ge00_init (&mplcec4_ge00_data); +kirkwood_ge01_init (&mplcec4_ge01_data); +kirkwood_sdio_init (&mplcec4_mvsdio_data); +kirkwood_pcie_init (KW_PCIE0 ); +} + + +arch/arm/mach-kirkwood/common.h +6
-0@@ -112,6 +112,12 @@ void km_kirkwood_init(void);static inline void km_kirkwood_init (void ) {};#endif +#ifdef CONFIG_MACH_MPLCEC4_DT +void mplcec4_init (void ); +#else +static inline void mplcec4_init (void ) {}; +#endif +/* early init functions not converted to fdt yet */ char *kirkwood_id (void );void kirkwood_l2_init (void );Signature · 1 line
1.7.9.5
PATCH 1/1 ARM: kirkwood: Add support for the MPL CEC4
Quoted 288 lines · Jason Cooper
Stefan,
Thanks for the patch! I didn't know kirkwood made it into industrial controllers. Comments below.
Quoted 8 lines · Stefan Peter
Signed-off-by Stefan Peter <[email protected]>arch/arm/boot/dts/Makefile +0
-0arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ · line 44
Quoted 6 lines
arch/arm/boot/dts/Makefile +2
-1@@ -40,7 +40,8 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ kirkwood-lschlv2.dtb \ kirkwood-lsxhl.dtb \ kirkwood-ts219-6281.dtb \ - kirkwood-ts219-6282.dtb + kirkwood-ts219-6282.dtb \ + kirkwood-mplcec4.dtbPlease insert in alphabetical order. This reduces merge conflicts for us.
Quoted 9 lines
arch/arm/boot/dts/Makefile +0
-0dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ msm8960-cdp.dtb dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \arch/arm/boot/dts/kirkwood-mplcec4.dts new file +0
-0arch/arm/boot/dts/kirkwood-mplcec4.dts line 7
Quoted 7 lines
arch/arm/boot/dts/kirkwood-mplcec4.dts new file +7
-0@@ -0,0 +1,119 @@ +/dts-v1/; + +/include/ "kirkwood.dtsi" + +/ { + model = "MPL CEC4"; + compatible = "mpl,mplcec4", "marvell,kirkwood-88f6281", "marvell,kirkwood";Perhaps "mpl,cec4-10", "mpl,cec4", "marvell..." would be more appropriate here, according to the slick sheet.
Quoted 53 lines
arch/arm/boot/dts/kirkwood-mplcec4.dts new file +53
-0+ + memory { + device_type = "memory"; + reg = <0x00000000 0x20000000>; + }; + + chosen { + bootargs = "console=ttyS0,115200n8 earlyprintk"; + }; + + ocp at f1000000 { + i2c at 11000 { + status = "okay"; + + rtc at 51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; + }; + + eeprom at 57 { + compatible = "atmel,24c02"; + reg = <0x57>; + }; + + }; + + serial at 12000 { + clock-frequency = <200000000>; + status = "ok"; + }; + + nand at 3000000 { + status = "okay"; + + partition at 0 { + label = "uboot"; + reg = <0x0000000 0x100000>; + }; + + partition at 100000 { + label = "env"; + reg = <0x100000 0x80000>; + }; + + partition at 180000 { + label = "fdt"; + reg = <0x180000 0x80000>; + }; + + partition at 200000 { + label = "kernel"; + reg = <0x200000 0x400000>; + };arch/arm/boot/dts/kirkwood-mplcec4.dts line 70
Quoted 10 lines
arch/arm/boot/dts/kirkwood-mplcec4.dts new file +10
-0+ + partition at 600000 { + label = "rootfs"; + reg = <0x600000 0x1fa00000>; + }; + }; + + rtc at 10300 { + status = "disabled"; + };really?
Quoted 54 lines
arch/arm/boot/dts/kirkwood-mplcec4.dts new file +49
-0+ + sata at 80000 { + nr-ports = <2>; + status = "okay"; + + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + health { + label = "status:green:health"; + gpios = <&gpio0 7 1>; + }; + + user1o { + label = "user1:orange"; + gpios = <&gpio1 8 1>; + default-state = "on"; + }; + + user1g { + label = "user1:green"; + gpios = <&gpio1 9 1>; + default-state = "on"; + }; + + user0o { + label = "user0:orange"; + gpios = <&gpio1 12 1>; + default-state = "on"; + }; + + user0g { + label = "user0:green"; + gpios = <&gpio1 13 1>; + default-state = "on"; + }; + + misc { + label = "status:orange:misc"; + gpios = <&gpio1 14 1>; + default-state = "on"; + }; + + }; +}; +arch/arm/configs/kirkwood_defconfig +0
-0arch/arm/configs/kirkwood_defconfig CONFIG_MACH_GOFLEXNET_DT=y · line 30
Quoted 4 lines
arch/arm/configs/kirkwood_defconfig +1
-0@@ -27,6 +27,7 @@ CONFIG_MACH_GOFLEXNET_DT=y CONFIG_MACH_LSXL_DT=y CONFIG_MACH_IOMEGA_IX2_200_DT=y CONFIG_MACH_KM_KIRKWOOD_DT=y +CONFIG_MACH_MPLCEC4_DT=yThank you. :-)
Quoted 35 lines
arch/arm/configs/kirkwood_defconfig +0
-0CONFIG_MACH_TS219=y CONFIG_MACH_TS41X=y CONFIG_MACH_DOCKSTAR=yarch/arm/mach-kirkwood/Kconfig +7
-0@@ -130,6 +130,13 @@ config MACH_KM_KIRKWOOD_DT Say 'Y' here if you want your kernel to support the Keymile Kirkwood Reference Desgin, using Flattened Device Tree. +config MACH_MPLCEC4_DT + bool "MPL CEC4 (Flattened Device Tree)" + select ARCH_KIRKWOOD_DT + help + Say 'Y' here if you want your kernel to support the + MPL CEC4 (Flattened Device Tree). + config MACH_TS219 bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" helparch/arm/mach-kirkwood/Makefile +1
-0@@ -31,3 +31,4 @@ obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o +obj-$(CONFIG_MACH_MPLCEC4_DT) += board-mplcec4.oarch/arm/mach-kirkwood/board-dt.c +0
-0arch/arm/mach-kirkwood/board-dt.c static void __init kirkwood_dt_init(void) · line 97
Quoted 4 lines
arch/arm/mach-kirkwood/board-dt.c +1
-0@@ -94,6 +94,9 @@ static void __init kirkwood_dt_init(void)if (of_machine_is_compatible ("keymile,km_kirkwood" ))km_kirkwood_init (); +if (of_machine_is_compatible ("mpl,mplcec4" ))With the above comment, this would be "mpl,cec4"
arch/arm/mach-kirkwood/board-dt.c static const char *kirkwood_dt_board_compat[] = { · line 116
Quoted 10 lines
arch/arm/mach-kirkwood/board-dt.c +3
-0+mplcec4_init (); +of_platform_populate (NULL , kirkwood_dt_match_table, kirkwood_auxdata_lookup,NULL ); }@@ -110,6 +113,7 @@ static const char *kirkwood_dt_board_compat[] = {"buffalo,lsxl" ,"iom,ix2-200" ,"keymile,km_kirkwood" , + "mpl,mplcec4",Same.
Quoted 62 lines
arch/arm/mach-kirkwood/board-dt.c +0
-0NULL };arch/arm/mach-kirkwood/board-mplcec4.c new file +53
-0@@ -0,0 +1,82 @@ +/* +* Copyright (C) 2012 MPL AG, Switzerland +* Stefan Peter <[email protected]> +* +* arch/arm/mach-kirkwood/board-mplcec4.c +* +* This file is licensed under the terms of the GNU General Public +* License version 2. This program is licensed "as is" without any +* warranty of any kind, whether express or implied. +*/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/mv643xx_eth.h> +#include <linux/clk.h> +#include <linux/clk-private.h> +#include <linux/platform_data/mmc-mvsdio.h> +#include "common.h" +#include "mpp.h" + +static struct mv643xx_eth_platform_data mplcec4_ge00_data = { + .phy_addr =MV643XX_ETH_PHY_ADDR (1 ), +}; + +static struct mv643xx_eth_platform_data mplcec4_ge01_data = { + .phy_addr =MV643XX_ETH_PHY_ADDR (2 ), +}; + +static unsigned int mplcec4_mpp_config[]__initdata = { +MPP0_NF_IO2 , +MPP1_NF_IO3 , +MPP2_NF_IO4 , +MPP3_NF_IO5 , +MPP4_NF_IO6 , +MPP5_NF_IO7 , + MPP6_SYSRST_OUTn, +MPP7_GPO ,/* Status LED Green High Active */ +MPP10_UART0_TXD , +MPP11_UART0_RXD , +MPP12_SD_CLK , +MPP13_SD_CMD ,/* Alt UART1_TXD */ +MPP14_SD_D0 ,/* Alt UART1_RXD */ +MPP15_SD_D1 , +MPP16_SD_D2 , +MPP17_SD_D3 , +MPP18_NF_IO0 , +MPP19_NF_IO1 , +MPP28_GPIO ,/* Input SYS_POR_DET (active High) */ +MPP29_GPIO ,/* Input SYS_RTC_INT (active High) */ + MPP34_SATA1_ACTn, + MPP35_SATA0_ACTn, +MPP40_GPIO ,/* LED User1 orange */ +MPP41_GPIO ,/* LED User1 green */
Quoted 8 lines
arch/arm/mach-kirkwood/board-mplcec4.c line 59
Quoted 6 lines
arch/arm/mach-kirkwood/board-mplcec4.c new file +6
-0+MPP44_GPIO ,/* LED User0 orange */ +MPP45_GPIO ,/* LED User0 green */ +MPP46_GPIO ,/* Status LED Yellow High Active */ +MPP47_GPIO ,/* SD_CD# (in/IRQ)*/ + 0 +};We're this to DT during this merge window, but don't worry about
*We're converting this (MPP)...
thx,
Jason.
Quoted 59 lines
changing it. We'll be doing a cleanup patch to catch the new boards. If you could just keep an eye out for it and test, it would be appreciated.
This looks really good, if you can turn around a V2, I should be able to get this in for v3.8. It's getting close, though.
thx,
Jason.
Quoted 43 lines
arch/arm/mach-kirkwood/board-mplcec4.c new file +23
-0+ + +static struct mvsdio_platform_data mplcec4_mvsdio_data = { + .gpio_card_detect =47 ,/* MPP47 used as SD card detect */ +}; + + + +void __init mplcec4_init (void ) +{ +/* +* Basic setup. Needs to be called early. +*/ +kirkwood_mpp_conf (mplcec4_mpp_config); +kirkwood_ehci_init (); +kirkwood_ge00_init (&mplcec4_ge00_data); +kirkwood_ge01_init (&mplcec4_ge01_data); +kirkwood_sdio_init (&mplcec4_mvsdio_data); +kirkwood_pcie_init (KW_PCIE0 ); +} + + +arch/arm/mach-kirkwood/common.h +6
-0@@ -112,6 +112,12 @@ void km_kirkwood_init(void);static inline void km_kirkwood_init (void ) {};#endif +#ifdef CONFIG_MACH_MPLCEC4_DT +void mplcec4_init (void ); +#else +static inline void mplcec4_init (void ) {}; +#endif +/* early init functions not converted to fdt yet */ char *kirkwood_id (void );void kirkwood_l2_init (void );Signature · 1 line
1.7.9.5_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/1 ARM: kirkwood: Add support for the MPL CEC4
In reply to Jason CooperQuoted 101 lines · Jason Cooper
Stefan,
Thanks for the patch! I didn't know kirkwood made it into industrial controllers. Comments below.
Quoted 8 lines · Stefan Peter
Signed-off-by Stefan Peter <[email protected]>arch/arm/boot/dts/Makefile +0
-0arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ · line 44
Quoted 6 lines
arch/arm/boot/dts/Makefile +2
-1@@ -40,7 +40,8 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ kirkwood-lschlv2.dtb \ kirkwood-lsxhl.dtb \ kirkwood-ts219-6281.dtb \ - kirkwood-ts219-6282.dtb + kirkwood-ts219-6282.dtb \ + kirkwood-mplcec4.dtbPlease insert in alphabetical order. This reduces merge conflicts for us.
Quoted 9 lines
arch/arm/boot/dts/Makefile +0
-0dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ msm8960-cdp.dtb dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \arch/arm/boot/dts/kirkwood-mplcec4.dts new file +0
-0arch/arm/boot/dts/kirkwood-mplcec4.dts line 7
Quoted 7 lines
arch/arm/boot/dts/kirkwood-mplcec4.dts new file +7
-0@@ -0,0 +1,119 @@ +/dts-v1/; + +/include/ "kirkwood.dtsi" + +/ { + model = "MPL CEC4"; + compatible = "mpl,mplcec4", "marvell,kirkwood-88f6281", "marvell,kirkwood";Perhaps "mpl,cec4-10", "mpl,cec4", "marvell..." would be more appropriate here, according to the slick sheet.
Quoted 57 lines
arch/arm/boot/dts/kirkwood-mplcec4.dts new file +57
-0+ + memory { + device_type = "memory"; + reg = <0x00000000 0x20000000>; + }; + + chosen { + bootargs = "console=ttyS0,115200n8 earlyprintk"; + }; + + ocp at f1000000 { + i2c at 11000 { + status = "okay"; + + rtc at 51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; + }; + + eeprom at 57 { + compatible = "atmel,24c02"; + reg = <0x57>; + }; + + }; + + serial at 12000 { + clock-frequency = <200000000>; + status = "ok"; + }; + + nand at 3000000 { + status = "okay"; + + partition at 0 { + label = "uboot"; + reg = <0x0000000 0x100000>; + }; + + partition at 100000 { + label = "env"; + reg = <0x100000 0x80000>; + }; + + partition at 180000 { + label = "fdt"; + reg = <0x180000 0x80000>; + }; + + partition at 200000 { + label = "kernel"; + reg = <0x200000 0x400000>; + }; + + partition at 600000 { + label = "rootfs"; + reg = <0x600000 0x1fa00000>;
Quoted 8 lines
arch/arm/boot/dts/kirkwood-mplcec4.dts line 70
Quoted 6 lines
arch/arm/boot/dts/kirkwood-mplcec4.dts new file +6
-0+ }; + }; + + rtc at 10300 { + status = "disabled"; + };really?
Hi Jason
The pcf8563 on the i2c bus is an RTC.
I don't know why, but my QNAP also has an I2C RTC and the Armada XP based OpenBlocks AX3 has one as well.
Andrew
PATCH 1/1 ARM: kirkwood: Add support for the MPL CEC4
In reply to a message not in the archiveQuoted 215 lines · Stefan Peter
Signed-off-by Stefan Peter <[email protected]>arch/arm/boot/dts/Makefile +2
-1@@ -40,7 +40,8 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ kirkwood-lschlv2.dtb \ kirkwood-lsxhl.dtb \ kirkwood-ts219-6281.dtb \ - kirkwood-ts219-6282.dtb + kirkwood-ts219-6282.dtb \ + kirkwood-mplcec4.dtb dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ msm8960-cdp.dtb dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \arch/arm/boot/dts/kirkwood-mplcec4.dts new file +119
-0@@ -0,0 +1,119 @@ +/dts-v1/; + +/include/ "kirkwood.dtsi" + +/ { + model = "MPL CEC4"; + compatible = "mpl,mplcec4", "marvell,kirkwood-88f6281", "marvell,kirkwood"; + + memory { + device_type = "memory"; + reg = <0x00000000 0x20000000>; + }; + + chosen { + bootargs = "console=ttyS0,115200n8 earlyprintk"; + }; + + ocp at f1000000 { + i2c at 11000 { + status = "okay"; + + rtc at 51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; + }; + + eeprom at 57 { + compatible = "atmel,24c02"; + reg = <0x57>; + }; + + }; + + serial at 12000 { + clock-frequency = <200000000>; + status = "ok"; + }; + + nand at 3000000 { + status = "okay"; + + partition at 0 { + label = "uboot"; + reg = <0x0000000 0x100000>; + }; + + partition at 100000 { + label = "env"; + reg = <0x100000 0x80000>; + }; + + partition at 180000 { + label = "fdt"; + reg = <0x180000 0x80000>; + }; + + partition at 200000 { + label = "kernel"; + reg = <0x200000 0x400000>; + }; + + partition at 600000 { + label = "rootfs"; + reg = <0x600000 0x1fa00000>; + }; + }; + + rtc at 10300 { + status = "disabled"; + }; + + sata at 80000 { + nr-ports = <2>; + status = "okay"; + + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + health { + label = "status:green:health"; + gpios = <&gpio0 7 1>; + }; + + user1o { + label = "user1:orange"; + gpios = <&gpio1 8 1>; + default-state = "on"; + }; + + user1g { + label = "user1:green"; + gpios = <&gpio1 9 1>; + default-state = "on"; + }; + + user0o { + label = "user0:orange"; + gpios = <&gpio1 12 1>; + default-state = "on"; + }; + + user0g { + label = "user0:green"; + gpios = <&gpio1 13 1>; + default-state = "on"; + }; + + misc { + label = "status:orange:misc"; + gpios = <&gpio1 14 1>; + default-state = "on"; + }; + + }; +}; +arch/arm/configs/kirkwood_defconfig +1
-0@@ -27,6 +27,7 @@ CONFIG_MACH_GOFLEXNET_DT=y CONFIG_MACH_LSXL_DT=y CONFIG_MACH_IOMEGA_IX2_200_DT=y CONFIG_MACH_KM_KIRKWOOD_DT=y +CONFIG_MACH_MPLCEC4_DT=y CONFIG_MACH_TS219=y CONFIG_MACH_TS41X=y CONFIG_MACH_DOCKSTAR=yarch/arm/mach-kirkwood/Kconfig +7
-0@@ -130,6 +130,13 @@ config MACH_KM_KIRKWOOD_DT Say 'Y' here if you want your kernel to support the Keymile Kirkwood Reference Desgin, using Flattened Device Tree. +config MACH_MPLCEC4_DT + bool "MPL CEC4 (Flattened Device Tree)" + select ARCH_KIRKWOOD_DT + help + Say 'Y' here if you want your kernel to support the + MPL CEC4 (Flattened Device Tree). + config MACH_TS219 bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" helparch/arm/mach-kirkwood/Makefile +1
-0@@ -31,3 +31,4 @@ obj-$(CONFIG_MACH_GOFLEXNET_DT) += board-goflexnet.o obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o +obj-$(CONFIG_MACH_MPLCEC4_DT) += board-mplcec4.oarch/arm/mach-kirkwood/board-dt.c +4
-0@@ -94,6 +94,9 @@ static void __init kirkwood_dt_init(void)if (of_machine_is_compatible ("keymile,km_kirkwood" ))km_kirkwood_init (); +if (of_machine_is_compatible ("mpl,mplcec4" )) +mplcec4_init (); +of_platform_populate (NULL , kirkwood_dt_match_table, kirkwood_auxdata_lookup,NULL ); }@@ -110,6 +113,7 @@ static const char *kirkwood_dt_board_compat[] = {"buffalo,lsxl" ,"iom,ix2-200" ,"keymile,km_kirkwood" , +"mpl,mplcec4" , NULL };arch/arm/mach-kirkwood/board-mplcec4.c new file +6
-0@@ -0,0 +1,82 @@ +/* +* Copyright (C) 2012 MPL AG, Switzerland +* Stefan Peter <[email protected]> +* +* arch/arm/mach-kirkwood/board-mplcec4.c +*
arch/arm/mach-kirkwood/board-mplcec4.c line 16
Quoted 10 lines
arch/arm/mach-kirkwood/board-mplcec4.c new file +10
-0+* This file is licensed under the terms of the GNU General Public +* License version 2. This program is licensed "as is" without any +* warranty of any kind, whether express or implied. +*/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/mv643xx_eth.h> +#include <linux/clk.h> +#include <linux/clk-private.h>
Hi Stefan
Are these two clk headers needed?
Andrew
PATCH 1/1 ARM: kirkwood: Add support for the MPL CEC4
In reply to Jason CooperHi Jason
Quoted 4 lines · Jason Cooper
Stefan,
Thanks for the patch! I didn't know kirkwood made it into industrial controllers. Comments below.
It evolved out of an industrial firewall design that unfortunately is a little bit trickier to get into mainline linux, but I will try as soon as the CEC4 is there.
Quoted 19 lines · Stefan Peter
Quoted 8 lines
Signed-off-by Stefan Peter <[email protected]>arch/arm/boot/dts/Makefile +0
-0arch/arm/boot/dts/Makefile dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ · line 44
Quoted 6 lines
arch/arm/boot/dts/Makefile +2
-1@@ -40,7 +40,8 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ kirkwood-lschlv2.dtb \ kirkwood-lsxhl.dtb \ kirkwood-ts219-6281.dtb \ - kirkwood-ts219-6282.dtb + kirkwood-ts219-6282.dtb \ + kirkwood-mplcec4.dtbPlease insert in alphabetical order. This reduces merge conflicts for us.
Will do.
Quoted 12 lines
Quoted 12 lines
arch/arm/boot/dts/Makefile +0
-0dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ msm8960-cdp.dtb dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \arch/arm/boot/dts/kirkwood-mplcec4.dts new file +2
-0@@ -0,0 +1,119 @@ +/dts-v1/; +
Quoted 9 lines
arch/arm/boot/dts/kirkwood-mplcec4.dts line 7
Quoted 5 lines
arch/arm/boot/dts/kirkwood-mplcec4.dts new file +5
-0+/include/ "kirkwood.dtsi" + +/ { + model = "MPL CEC4"; + compatible = "mpl,mplcec4", "marvell,kirkwood-88f6281", "marvell,kirkwood";Perhaps "mpl,cec4-10", "mpl,cec4", "marvell..." would be more appropriate here, according to the slick sheet.
OK, no problem.
Quoted 4 lines
Quoted 4 lines
arch/arm/boot/dts/kirkwood-mplcec4.dts new file +4
-0+ + partition at 600000 { + label = "rootfs"; + reg = <0x600000 0x1fa00000>;
Quoted 9 lines
arch/arm/boot/dts/kirkwood-mplcec4.dts line 17
Quoted 6 lines
arch/arm/boot/dts/kirkwood-mplcec4.dts new file +6
-0+ }; + }; + + rtc at 10300 { + status = "disabled"; + };really?
Really. We use the nxp,pcff856 i2c RTC because the battery holders available for the kirwood rtc are to flimsy for an industrial design.
Quoted 10 lines
arch/arm/mach-kirkwood/board-dt.c static void __init kirkwood_dt_init(void) · line 97
Quoted 8 lines
index d94872f..e2e650e 100644
arch/arm/mach-kirkwood/board-dt.c +1
-0@@ -94,6 +94,9 @@ static void __init kirkwood_dt_init(void)if (of_machine_is_compatible ("keymile,km_kirkwood" ))km_kirkwood_init (); +if (of_machine_is_compatible ("mpl,mplcec4" ))With the above comment, this would be "mpl,cec4"
Yes, I will adapt this and the following s/mplcec4/cec4/ occurrences.
Quoted 29 lines
Quoted 29 lines
arch/arm/mach-kirkwood/board-dt.c +29
-0+ +static unsigned int mplcec4_mpp_config[]__initdata = { +MPP0_NF_IO2 , +MPP1_NF_IO3 , +MPP2_NF_IO4 , +MPP3_NF_IO5 , +MPP4_NF_IO6 , +MPP5_NF_IO7 , + MPP6_SYSRST_OUTn, +MPP7_GPO ,/* Status LED Green High Active */ +MPP10_UART0_TXD , +MPP11_UART0_RXD , +MPP12_SD_CLK , +MPP13_SD_CMD ,/* Alt UART1_TXD */ +MPP14_SD_D0 ,/* Alt UART1_RXD */ +MPP15_SD_D1 , +MPP16_SD_D2 , +MPP17_SD_D3 , +MPP18_NF_IO0 , +MPP19_NF_IO1 , +MPP28_GPIO ,/* Input SYS_POR_DET (active High) */ +MPP29_GPIO ,/* Input SYS_RTC_INT (active High) */ + MPP34_SATA1_ACTn, + MPP35_SATA0_ACTn, +MPP40_GPIO ,/* LED User1 orange */ +MPP41_GPIO ,/* LED User1 green */ +MPP44_GPIO ,/* LED User0 orange */ +MPP45_GPIO ,/* LED User0 green */ +MPP46_GPIO ,/* Status LED Yellow High Active */
Quoted 8 lines
arch/arm/mach-kirkwood/board-dt.c
Quoted 3 lines
arch/arm/mach-kirkwood/board-dt.c +3
-0+MPP47_GPIO ,/* SD_CD# (in/IRQ)*/ + 0 +};We're this to DT during this merge window, but don't worry about changing it. We'll be doing a cleanup patch to catch the new boards. If you could just keep an eye out for it and test, it would be appreciated.
If you can point me to the appropriate tree, I'd like to try to do this myself. I could even rebase the CEC4 patch to this tree if you prefer.
Quoted 3 lines
This looks really good, if you can turn around a V2, I should be able to get this in for v3.8. It's getting close, though.
I will try to comply ASAP.
Thank you very much for the prompt review.
Regards
Stefan Peter
Signature · 2 lines
MPL AG, Switzerland http://www.mpl.ch Tel. +41 (0)56 483 34 34 Fax: +41(0)56 493 30 20
PATCH 1/1 ARM: kirkwood: Add support for the MPL CEC4
In reply to Andrew LunnHi Andrew
Quoted 30 lines · Andrew Lunn
Quoted 16 lines · Stefan Peter
Signed-off-by Stefan Peter <[email protected]>arch/arm/mach-kirkwood/board-mplcec4.c new file +6
-0@@ -0,0 +1,82 @@ +/* +* Copyright (C) 2012 MPL AG, Switzerland +* Stefan Peter <[email protected]> +* +* arch/arm/mach-kirkwood/board-mplcec4.c +* arch/arm/mach-kirkwood/board-mplcec4.c line 16
Quoted 10 lines
arch/arm/mach-kirkwood/board-mplcec4.c new file +10
-0+* This file is licensed under the terms of the GNU General Public +* License version 2. This program is licensed "as is" without any +* warranty of any kind, whether express or implied. +*/ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/mv643xx_eth.h> +#include <linux/clk.h> +#include <linux/clk-private.h> Hi Stefan
Quoted 4 lines
Are these two clk headers needed?
Andrew
I don't know, but i will find out and let you know in V2.
Thank you very much for the review.
Regards
Stefan Peter
Signature · 2 lines
MPL AG, Switzerland http://www.mpl.ch Tel. +41 (0)56 483 34 34 Fax: +41(0)56 493 30 20
PATCH 1/1 ARM: kirkwood: Add support for the MPL CEC4
In reply to Andrew LunnQuoted 12 lines
Quoted 11 lines
Review
Quoted 9 lines
(quoted diff) +9
-0+ partition at 600000 { + label = "rootfs"; + reg = <0x600000 0x1fa00000>; + }; + }; + + rtc at 10300 { + status = "disabled"; + };really?
Quoted 6 lines
Hi Jason
The pcf8563 on the i2c bus is an RTC.
I don't know why, but my QNAP also has an I2C RTC and the Armada XP based OpenBlocks AX3 has one as well.
I don't know why other manufacturers have done so, but we decided to not use the kirkwood rtc because the only battery holders you can get for the battery required by the kirkwood rtc are to flimsy for an industrial environment.
Regards
Stefan Peter
Signature · 2 lines
MPL AG, Switzerland http://www.mpl.ch Tel. +41 (0)56 483 34 34 Fax: +41(0)56 493 30 20
PATCH 1/1 ARM: kirkwood: Add support for the MPL CEC4
In reply to Stefan PeterQuoted 38 lines
Quoted 28 lines
Quoted 28 lines
(quoted diff) +28
-0+static unsigned int mplcec4_mpp_config[] __initdata = { + MPP0_NF_IO2, + MPP1_NF_IO3, + MPP2_NF_IO4, + MPP3_NF_IO5, + MPP4_NF_IO6, + MPP5_NF_IO7, + MPP6_SYSRST_OUTn, + MPP7_GPO, /* Status LED Green High Active */ + MPP10_UART0_TXD, + MPP11_UART0_RXD, + MPP12_SD_CLK, + MPP13_SD_CMD, /* Alt UART1_TXD */ + MPP14_SD_D0, /* Alt UART1_RXD */ + MPP15_SD_D1, + MPP16_SD_D2, + MPP17_SD_D3, + MPP18_NF_IO0, + MPP19_NF_IO1, + MPP28_GPIO, /* Input SYS_POR_DET (active High) */ + MPP29_GPIO, /* Input SYS_RTC_INT (active High) */ + MPP34_SATA1_ACTn, + MPP35_SATA0_ACTn, + MPP40_GPIO, /* LED User1 orange */ + MPP41_GPIO, /* LED User1 green */ + MPP44_GPIO, /* LED User0 orange */ + MPP45_GPIO, /* LED User0 green */ + MPP46_GPIO, /* Status LED Yellow High Active */Quoted 8 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+ MPP47_GPIO, /* SD_CD# (in/IRQ)*/ + 0 +};We're this to DT during this merge window, but don't worry about changing it. We'll be doing a cleanup patch to catch the new boards. If you could just keep an eye out for it and test, it would be appreciated.
Quoted 2 lines
If you can point me to the appropriate tree, I'd like to try to do this myself. I could even rebase the CEC4 patch to this tree if you prefer.
You can take a look at
git://github.com/lunn/linux.git v3.7-rc2-pinctrl-v2
These patches have been on the list once, maybe twice. I will be posting them again soon, maybe in a different order.
Jason also has a patch from me which converts the ehci setup to device tree. With that patch in place, you just need to drop the kirkwood_ehci_init().
Andrew