phy: marvell: move IDs to own header
Subsystems (6)
PATCH v2 1/2 phy: marvell: move IDs to own header
So they can be used in board files to register
fixups.
Signed-off-by Lucas Stach <[email protected]>
--- drivers/net/phy/marvell.c | 17 +---------------- include/linux/marvell_phy.h | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 16 deletions(-) create mode 100644 include/linux/marvell_phy.h
drivers/net/phy/marvell.c +1 -16
@@ -10,22 +10,7 @@#include <linux/ethtool.h> #include <linux/phy.h> #include <linux/smscphy.h> - -/* Known PHY IDs */ -#define MARVELL_PHY_ID_88E1101 0x01410c60 -#define MARVELL_PHY_ID_88E1112 0x01410c90 -#define MARVELL_PHY_ID_88E1111 0x01410cc0 -#define MARVELL_PHY_ID_88E1118 0x01410e10 -#define MARVELL_PHY_ID_88E1121R 0x01410cb0 -#define MARVELL_PHY_ID_88E1145 0x01410cd0 -#define MARVELL_PHY_ID_88E1149R 0x01410e50 -#define MARVELL_PHY_ID_88E1240 0x01410e30 -#define MARVELL_PHY_ID_88E1318S 0x01410e90 -#define MARVELL_PHY_ID_88E1116R 0x01410e40 -#define MARVELL_PHY_ID_88E1510 0x01410dd0 - -/* Mask used for ID comparisons */ -#define MARVELL_PHY_ID_MASK 0xfffffff0 +#include <linux/marvell_phy.h> /* Marvell Register Page register */ #define MII_MARVELL_PHY_PAGE 22
include/linux/marvell_phy.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* Marvell PHY IDs +* +* 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. +*/ + +#ifndef _MARVELL_PHY_H +#define _MARVELL_PHY_H + +/* Known PHY IDs */ +#define MARVELL_PHY_ID_88E1101 0x01410c60 +#define MARVELL_PHY_ID_88E1112 0x01410c90 +#define MARVELL_PHY_ID_88E1111 0x01410cc0 +#define MARVELL_PHY_ID_88E1118 0x01410e10 +#define MARVELL_PHY_ID_88E1121R 0x01410cb0 +#define MARVELL_PHY_ID_88E1145 0x01410cd0 +#define MARVELL_PHY_ID_88E1149R 0x01410e50 +#define MARVELL_PHY_ID_88E1240 0x01410e30 +#define MARVELL_PHY_ID_88E1318S 0x01410e90 +#define MARVELL_PHY_ID_88E1116R 0x01410e40 +#define MARVELL_PHY_ID_88E1510 0x01410dd0 + +/* Mask used for ID comparisons */ +#define MARVELL_PHY_ID_MASK 0xfffffff0 + +#endif /* _MARVELL_PHY_H */
Signature · 7 lines
1.9.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v2 2/2 arm: imx6: add Gateworks Ventana board
For now only the Quad 1GB variant is supported.
Tested:
- starting barebox over USB
- writing barebox to NAND with barebox_update
- starting Linux kernel over TFTP
Signed-off-by Lucas Stach <[email protected]>
---
v2:
- fix whitespace errors
- check return value from i2c_get_adapter()
- add delay after writing to GSC
--- arch/arm/boards/Makefile | 1 + arch/arm/boards/gateworks-ventana/Makefile | 2 + arch/arm/boards/gateworks-ventana/board.c | 96 ++++++++++++++++++++++ arch/arm/boards/gateworks-ventana/clocks.imxcfg | 8 ++ .../flash-header-ventana-quad-1gx64.imxcfg | 11 +++ arch/arm/boards/gateworks-ventana/gsc.c | 67 +++++++++++++++ arch/arm/boards/gateworks-ventana/gsc.h | 58 +++++++++++++ arch/arm/boards/gateworks-ventana/lowlevel.c | 18 ++++ .../boards/gateworks-ventana/quad_128x64.imxcfg | 41 +++++++++ arch/arm/boards/gateworks-ventana/ram-base.imxcfg | 56 +++++++++++++ arch/arm/configs/imx_v7_defconfig | 3 +- arch/arm/dts/Makefile | 1 + arch/arm/dts/imx6q-gw54xx.dts | 23 ++++++ arch/arm/dts/imx6qdl-gw54xx.dtsi | 38 +++++++++ arch/arm/mach-imx/Kconfig | 3 + images/Makefile.imx | 5 ++ 16 files changed, 430 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boards/gateworks-ventana/Makefile create mode 100644 arch/arm/boards/gateworks-ventana/board.c create mode 100644 arch/arm/boards/gateworks-ventana/clocks.imxcfg create mode 100644 arch/arm/boards/gateworks-ventana/flash-header-ventana-quad-1gx64.imxcfg create mode 100644 arch/arm/boards/gateworks-ventana/gsc.c create mode 100644 arch/arm/boards/gateworks-ventana/gsc.h create mode 100644 arch/arm/boards/gateworks-ventana/lowlevel.c create mode 100644 arch/arm/boards/gateworks-ventana/quad_128x64.imxcfg create mode 100644 arch/arm/boards/gateworks-ventana/ram-base.imxcfg create mode 100644 arch/arm/dts/imx6q-gw54xx.dts create mode 100644 arch/arm/dts/imx6qdl-gw54xx.dtsi
arch/arm/boards/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += globalscale-mirabox/ obj-$(CONFIG_MACH_GUF_CUPID) += guf-cupid/ obj-$(CONFIG_MACH_GUF_SANTARO) += guf-santaro/ obj-$(CONFIG_MACH_GUF_VINCELL) += guf-vincell/ +obj-$(CONFIG_MACH_GW_VENTANA) += gateworks-ventana/ obj-$(CONFIG_MACH_HIGHBANK) += highbank/ obj-$(CONFIG_MACH_IMX21ADS) += freescale-mx21-ads/ obj-$(CONFIG_MACH_IMX233_OLINUXINO) += imx233-olinuxino/
arch/arm/boards/gateworks-ventana/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +obj-y += board.o gsc.o +lwl-y += lowlevel.o
arch/arm/boards/gateworks-ventana/board.c new file +96 -0
96 lines not on this page · raw message
arch/arm/boards/gateworks-ventana/clocks.imxcfg new file +8 -0
@@ -0,0 +1,8 @@ +wm 32 MX6_CCM_CCGR0 0x00C03F3F +wm 32 MX6_CCM_CCGR1 0x0030FC03 +wm 32 MX6_CCM_CCGR2 0x0FFFC000 +wm 32 MX6_CCM_CCGR3 0x3FF00000 +wm 32 MX6_CCM_CCGR4 0xFFFFF300 +wm 32 MX6_CCM_CCGR5 0x0F0000C3 +wm 32 MX6_CCM_CCGR6 0x000003FF +wm 32 MX6_CCM_CCOSR 0x000000FB
arch/arm/boards/gateworks-ventana/flash-header-ventana-quad-1gx64.imxcfg new file +11 -0
@@ -0,0 +1,11 @@ +soc imx6 +loadaddr 0x20000000 +dcdofs 0x400 + +#include <mach/imx6-ddr-regs.h> +#include <mach/imx6q-ddr-regs.h> +#include <mach/imx6-ccm-regs.h> + +#include "ram-base.imxcfg" +#include "quad_128x64.imxcfg" +#include "clocks.imxcfg"
arch/arm/boards/gateworks-ventana/gsc.c new file +67 -0
67 lines not on this page · raw message
arch/arm/boards/gateworks-ventana/gsc.h new file +58 -0
58 lines not on this page · raw message
arch/arm/boards/gateworks-ventana/lowlevel.c new file +18 -0
@@ -0,0 +1,18 @@ +#include <common.h> +#include <sizes.h> +#include <mach/generic.h> +#include <asm/barebox-arm-head.h> +#include <asm/barebox-arm.h> + +extern char __dtb_imx6q_gw54xx_start[]; + +ENTRY_FUNCTION(start_imx6q_gw54xx_1gx64, r0, r1, r2) +{ +void *fdt; + +imx6_cpu_lowlevel_init (); + + fdt = __dtb_imx6q_gw54xx_start -get_runtime_offset (); + +barebox_arm_entry (0x10000000 ,SZ_1G , fdt); +}
arch/arm/boards/gateworks-ventana/quad_128x64.imxcfg new file +41 -0
41 lines not on this page · raw message
arch/arm/boards/gateworks-ventana/ram-base.imxcfg new file +56 -0
56 lines not on this page · raw message
arch/arm/configs/imx_v7_defconfig +2 -1
@@ -1,6 +1,7 @@ CONFIG_ARCH_IMX=y CONFIG_IMX_MULTI_BOARDS=y CONFIG_MACH_EFIKA_MX_SMARTBOOK=y +CONFIG_MACH_EMBEDSKY_E9=y CONFIG_MACH_FREESCALE_MX51_PDK=y CONFIG_MACH_FREESCALE_MX53_LOCO=y CONFIG_MACH_TQMA53=y
@@ -16,10 +17,10 @@ CONFIG_MACH_SABRELITE=y CONFIG_MACH_SABRESD=y CONFIG_MACH_NITROGEN6X=y CONFIG_MACH_SOLIDRUN_MICROSOM=y -CONFIG_MACH_EMBEDSKY_E9=y CONFIG_MACH_EMBEST_RIOTBOARD=y CONFIG_MACH_UDOO=y CONFIG_MACH_VARISCITE_MX6=y +CONFIG_MACH_GW_VENTANA=y CONFIG_IMX_IIM=y CONFIG_IMX_IIM_FUSE_BLOW=y CONFIG_IMX_OCOTP=y
arch/arm/dts/Makefile +1 -0
@@ -17,6 +17,7 @@ pbl-dtb-$(CONFIG_MACH_GK802) += imx6q-gk802.dtb.o pbl-dtb-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += kirkwood-guruplug-server-plus-bb.dtb.o pbl-dtb-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += armada-370-mirabox-bb.dtb.o pbl-dtb-$(CONFIG_MACH_GUF_SANTARO) += imx6q-guf-santaro.dtb.o +pbl-dtb-$(CONFIG_MACH_GW_VENTANA) += imx6q-gw54xx.dtb.o pbl-dtb-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += armada-xp-gp-bb.dtb.o pbl-dtb-$(CONFIG_MACH_NITROGEN6X) += imx6q-nitrogen6x.dtb.o imx6dl-nitrogen6x.dtb.o pbl-dtb-$(CONFIG_MACH_NVIDIA_BEAVER) += tegra30-beaver.dtb.o
arch/arm/dts/imx6q-gw54xx.dts new file +23 -0
@@ -0,0 +1,23 @@ +/* + * Copyright 2013 Gateworks Corporation + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +/dts-v1/; +#include "imx6q.dtsi" +#include "imx6qdl-gw54xx.dtsi" + +/ { + model = "Gateworks Ventana i.MX6 Quad GW54XX"; + compatible = "gw,imx6q-gw54xx", "gw,ventana", "fsl,imx6q"; +}; + +&sata { + status = "okay"; +};
arch/arm/dts/imx6qdl-gw54xx.dtsi new file +38 -0
@@ -0,0 +1,38 @@ +/* + * Copyright 2013 Gateworks Corporation + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + + #include <arm/imx6qdl-gw54xx.dtsi> + + / { + chosen { + linux,stdout-path = &uart2; + + environment@0 { + compatible = "barebox,environment"; + device-path = &gpmi, "partname:barebox-environment"; + }; + }; +}; + +&gpmi { + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "barebox"; + reg = <0x0 0x400000>; + }; + + partition@1 { + label = "barebox-environment"; + reg = <0x400000 0x20000>; + }; +};
arch/arm/mach-imx/Kconfig +3 -0
@@ -291,6 +291,9 @@ config MACH_VARISCITE_MX6 bool "Variscite i.MX6 Quad SOM" select ARCH_IMX6 +config MACH_GW_VENTANA + bool "Gateworks Ventana SBC" + select ARCH_IMX6 endif
images/Makefile.imx +5 -0
@@ -194,3 +194,8 @@ pblx-$(CONFIG_MACH_PCAAXL3) += start_phytec_pbaa03_2gib CFG_start_phytec_pbaa03_2gib.pblx.imximg = $(board)/phytec-phycard-imx6/flash-header-phytec-pcaaxl3-2gib.imxcfg FILE_barebox-phytec-pbaa03-2gib.img = start_phytec_pbaa03_2gib.pblx.imximg image-$(CONFIG_MACH_PCAAXL3) += barebox-phytec-pbaa03-2gib.img + +pblx-$(CONFIG_MACH_GW_VENTANA) += start_imx6q_gw54xx_1gx64 +CFG_start_imx6q_gw54xx_1gx64.pblx.imximg = $(board)/gateworks-ventana/flash-header-ventana-quad-1gx64.imxcfg +FILE_barebox-gateworks-imx6q-ventana-1gx64.img = start_imx6q_gw54xx_1gx64.pblx.imximg +image-$(CONFIG_MACH_GW_VENTANA) += barebox-gateworks-imx6q-ventana-1gx64.img
Signature · 7 lines
1.9.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 4 lines · Lucas Stach
So they can be used in board files to register
fixups.Signed-off-by Lucas Stach <[email protected]>
Applied both, thanks
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox