am335x, guardian: update guardian board
Subsystems (3)
PATCH 1/2 am335x, guardian: update guardian board
From: Moses Christopher <[email protected]>
- add BOARD_LATE_INIT function calls in board.c
- add swi_status detection in board.c
- mux: add guardian interfaces to single pinmux structure
- am33xx, kconfig: add BOARD_LATE_INIT for GUARDIAN board
--- arch/arm/mach-omap2/am33xx/Kconfig | 1 + board/bosch/guardian/board.c | 53 ++++++++++++++++++++++++++++++++++++++ board/bosch/guardian/mux.c | 32 ++++++++--------------- 3 files changed, 65 insertions(+), 21 deletions(-)
arch/arm/mach-omap2/am33xx/Kconfig +1 -0
@@ -89,6 +89,7 @@ config TARGET_AM335X_SHC config TARGET_AM335X_GUARDIAN bool "Support am335x based guardian board from bosch" + select BOARD_LATE_INIT select DM select DM_SERIAL select DM_GPIO
board/bosch/guardian/board.c +53 -0
62 lines not on this page · raw message
board/bosch/guardian/mux.c +11 -21
@@ -26,24 +26,16 @@ static struct module_pin_mux i2c0_pin_mux[] = { {-1}, }; -static struct module_pin_mux adc_voltages_en[] = { - {OFFSET (mcasp0_ahclkx), (MODE (7 ) |PULLUP_EN )}, - {-1 }, -}; - -static struct module_pin_mux asp_power_en[] = { - {OFFSET (mcasp0_aclkx), (MODE (7 ) |PULLUP_EN )}, - {-1 }, -}; - -static struct module_pin_mux switch_off_3v6_pin_mux[] = { - {OFFSET (mii1_txd0), (MODE (7 ) |PULLUP_EN )}, -/* -* The uart1 lines are made floating inputs, based on the Guardian -* A2 Sample Power Supply Schematics -*/ - {OFFSET (uart1_rxd), (MODE (7 ) |PULLUDDIS )}, - {OFFSET (uart1_txd), (MODE (7 ) |PULLUDDIS )}, +static struct module_pin_mux guardian_interfaces_pin_mux[] = { + {OFFSET (mcasp0_ahclkx), (MODE (7 ) |PULLDOWN_EN )}, + {OFFSET (mcasp0_aclkx), (MODE (7 ) |PULLUP_EN )}, + {OFFSET (mii1_txd0), (MODE (7 ) |PULLUP_EN )}, + {OFFSET (uart1_rxd), (MODE (7 ) |RXACTIVE |PULLUDDIS )}, + {OFFSET (uart1_txd), (MODE (7 ) |PULLUDDIS )}, + {OFFSET (mii1_crs), (MODE (7 ) |PULLDOWN_EN )}, + {OFFSET (rmii1_refclk), (MODE (7 ) |PULLDOWN_EN )}, + {OFFSET (mii1_txd3), (MODE (7 ) |PULLUDDIS )}, + {OFFSET (mii1_rxdv), (MODE (7 ) |PULLDOWN_EN )}, {-1 }, };
@@ -93,7 +85,5 @@ void enable_board_pin_mux(void)#ifdef CONFIG_NAND configure_module_pin_mux (nand_pin_mux);#endif -configure_module_pin_mux (adc_voltages_en); -configure_module_pin_mux (asp_power_en); -configure_module_pin_mux (switch_off_3v6_pin_mux); +configure_module_pin_mux (guardian_interfaces_pin_mux); }
Signature · 1 line
2.8.1
PATCH 2/2 am335x, guardian: adapt guardian board to DM
From: Moses Christopher <[email protected]>
- update partition table - remove env partitions
- dts: add new interfaces (uart2, extra gpio-key) remove unneeded entries
update nand timings for performance improvement
- defconfig: adapt configurations to suit DM remove unneeded configs
- am335x_guardian.h: remove mmc boot
--- arch/arm/dts/am335x-guardian.dts | 102 ++++++++++++++++++++++---------------- configs/am335x_guardian_defconfig | 25 ++++++---- include/configs/am335x_guardian.h | 11 ++-- 3 files changed, 80 insertions(+), 58 deletions(-)
arch/arm/dts/am335x-guardian.dts +58 -44
@@ -32,12 +32,19 @@ gpio_keys { compatible = "gpio-keys"; pinctrl-names = "default"; - pinctrl-0 = <&gpio_keys_pins>; + pinctrl-0 = <&guardian_button_pins>; - button21 { + select-button { + label = "guardian-select-button"; + linux,code = <KEY_5>; + gpios = <&gpio1 31 GPIO_ACTIVE_LOW>; + wakeup-source; + }; + + power-button { label = "guardian-power-button"; linux,code = <KEY_POWER>; - gpios = <&gpio2 21 0>; + gpios = <&gpio2 21 GPIO_ACTIVE_LOW>; wakeup-source; }; };
@@ -45,19 +52,12 @@ leds { compatible = "gpio-leds"; pinctrl-names = "default"; - pinctrl-0 = <&leds_pins>; - - led1 { - label = "green:heartbeat"; - gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "heartbeat"; - default-state = "off"; - }; + pinctrl-0 = <&guardian_led_pins>; - led2 { - label = "green:mmc0"; + life-led { + label = "guardian:life-led"; gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "mmc0"; + linux,default-trigger = "heartbeat"; default-state = "off"; }; };
@@ -140,22 +140,25 @@ gpmc,device-width = <1>; gpmc,sync-clk-ps = <0>; gpmc,cs-on-ns = <0>; - gpmc,cs-rd-off-ns = <44>; - gpmc,cs-wr-off-ns = <44>; - gpmc,adv-on-ns = <6>; - gpmc,adv-rd-off-ns = <34>; - gpmc,adv-wr-off-ns = <44>; + gpmc,cs-rd-off-ns = <30>; + gpmc,cs-wr-off-ns = <30>; + gpmc,adv-on-ns = <0>; + gpmc,adv-rd-off-ns = <30>; + gpmc,adv-wr-off-ns = <30>; gpmc,we-on-ns = <0>; - gpmc,we-off-ns = <40>; - gpmc,oe-on-ns = <0>; - gpmc,oe-off-ns = <54>; - gpmc,access-ns = <64>; - gpmc,rd-cycle-ns = <82>; - gpmc,wr-cycle-ns = <82>; + gpmc,we-off-ns = <15>; + gpmc,oe-on-ns = <1>; + gpmc,oe-off-ns = <15>; + gpmc,access-ns = <30>; + gpmc,rd-cycle-ns = <30>; + gpmc,wr-cycle-ns = <30>; + gpmc,wait-on-read = "true"; + gpmc,wait-on-write = "true"; gpmc,bus-turnaround-ns = <0>; gpmc,cycle2cycle-delay-ns = <0>; gpmc,clk-activation-ns = <0>; - gpmc,wr-access-ns = <40>; + gpmc,wait-monitoring-ns = <0>; + gpmc,wr-access-ns = <0>; gpmc,wr-data-mux-bus-ns = <0>; /*
@@ -199,18 +202,8 @@ }; partition at 6 { - label = "u-boot-env"; - reg = <0x300000 0x40000>; - }; - - partition at 7 { - label = "u-boot-env.backup1"; - reg = <0x340000 0x40000>; - }; - - partition at 8 { label = "UBI"; - reg = <0x380000 0x1fc80000>; + reg = <0x300000 0x1fd00000>; }; }; };
@@ -326,6 +319,12 @@ status = "okay"; }; +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins>; + status = "okay"; +}; + &usb { status = "okay"; };
@@ -354,7 +353,7 @@ &am33xx_pinmux { pinctrl-names = "default"; - pinctrl-0 = <&clkout2_pin &gpio_pins>; + pinctrl-0 = <&clkout2_pin &guardian_interface_pins>; clkout2_pin: pinmux_clkout2_pin { pinctrl-single,pins = <
@@ -368,16 +367,25 @@ >; }; - gpio_keys_pins: pinmux_gpio_keys_pins { + guardian_button_pins: pinmux_gpio_keys_pins { pinctrl-single,pins = < AM33XX_IOPAD(0x940, PIN_INPUT | MUX_MODE7) + AM33XX_IOPAD(0x884, PIN_INPUT | MUX_MODE7) >; }; - gpio_pins: pinmux_gpio_pins { + guardian_interface_pins: pinmux_guardian_interface_pins { pinctrl-single,pins = < - AM33XX_IOPAD(0x928, PIN_OUTPUT | MUX_MODE7) - AM33XX_IOPAD(0x990, PIN_OUTPUT | MUX_MODE7) + AM33XX_IOPAD(0x928, PIN_OUTPUT | MUX_MODE7) + AM33XX_IOPAD(0x990, PIN_OUTPUT | MUX_MODE7) + AM33XX_IOPAD(0x9ac, PIN_OUTPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x980, PIN_INPUT | MUX_MODE7) + AM33XX_IOPAD(0x984, PIN_INPUT | MUX_MODE7) + AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLUP | MUX_MODE7) + AM33XX_IOPAD(0x90c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x944, PIN_OUTPUT_PULLDOWN | MUX_MODE7) + AM33XX_IOPAD(0x91c, PIN_INPUT | MUX_MODE7) + AM33XX_IOPAD(0x918, PIN_OUTPUT_PULLDOWN | MUX_MODE7) >; };
@@ -452,10 +460,9 @@ >; }; - leds_pins: pinmux_leds_pins { + guardian_led_pins: pinmux_leds_pins { pinctrl-single,pins = < AM33XX_IOPAD(0x868, PIN_OUTPUT | MUX_MODE7) - AM33XX_IOPAD(0x86c, PIN_OUTPUT | MUX_MODE7) >; };
@@ -487,6 +494,13 @@ >; }; + uart2_pins: pinmux_uart2_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x92c, PIN_INPUT_PULLUP | MUX_MODE1) + AM33XX_IOPAD(0x930, PIN_OUTPUT_PULLDOWN | MUX_MODE1) + >; + }; + nandflash_pins: pinmux_nandflash_pins { pinctrl-single,pins = < AM33XX_IOPAD(0x800, PIN_INPUT | MUX_MODE0)
configs/am335x_guardian_defconfig +16 -9
@@ -6,11 +6,10 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_AM33XX=y CONFIG_TARGET_AM335X_GUARDIAN=y -CONFIG_SPL_MMC_SUPPORT=y +# CONFIG_SPL_MMC_SUPPORT is not set CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_DRIVERS_MISC_SUPPORT=y CONFIG_ENV_SIZE=0x040000 -CONFIG_ENV_OFFSET=0x300000 CONFIG_SPL=y CONFIG_BOOTSTAGE_STASH_ADDR=0x0 CONFIG_SPL_LIBDISK_SUPPORT=y
@@ -21,6 +20,7 @@ CONFIG_VERSION_VARIABLE=y CONFIG_ARCH_MISC_INIT=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_SEPARATE_BSS=y +# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_ETH_SUPPORT=y CONFIG_SPL_I2C_SUPPORT=y
@@ -30,8 +30,8 @@ CONFIG_SPL_NET_VCI_STRING="Guardian U-Boot SPL" CONFIG_SPL_POWER_SUPPORT=y CONFIG_SPL_USB_GADGET=y CONFIG_SPL_USB_ETHER=y -CONFIG_SPL_WATCHDOG_SUPPORT=y -CONFIG_SPL_YMODEM_SUPPORT=y +# CONFIG_SPL_WATCHDOG_SUPPORT is not set +# CONFIG_SPL_YMODEM_SUPPORT is not set CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n" CONFIG_AUTOBOOT_DELAY_STR="d"
@@ -43,14 +43,14 @@ CONFIG_CMD_ASKENV=y CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y -CONFIG_CMD_MMC=y +# CONFIG_CMD_MMC is not set CONFIG_CMD_MTD=y CONFIG_CMD_NAND=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_MTDPARTS=y -CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:256k(SPL),256k(SPL.backup1),256k(SPL.backup2),256k(SPL.backup3),1m(u-boot),1m(u-boot.backup1),256k(u-boot-env),256k(u-boot-env.backup1),-(UBI)" +CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:256k(SPL),256k(SPL.backup1),256k(SPL.backup2),256k(SPL.backup3),1m(u-boot),1m(u-boot.backup1),-(UBI)" CONFIG_CMD_UBI=y # CONFIG_SPL_DOS_PARTITION is not set # CONFIG_ISO_PARTITION is not set
@@ -58,14 +58,17 @@ CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y CONFIG_DEFAULT_DEVICE_TREE="am335x-guardian" -CONFIG_ENV_IS_IN_NAND=y +CONFIG_OF_SEPARATE=y +CONFIG_ENV_IS_NOWHERE=y CONFIG_SPL_ENV_IS_NOWHERE=y CONFIG_SPL_DM=y +CONFIG_SPL_DM_USB=y CONFIG_BOOTCOUNT_LIMIT=y CONFIG_BOOTCOUNT_ENV=y CONFIG_MISC=y -CONFIG_DM_MMC=y -CONFIG_MMC_OMAP_HS=y +# CONFIG_DM_MMC is not set +# CONFIG_MMC is not set +# CONFIG_MMC_OMAP_HS is not set CONFIG_MTD=y CONFIG_NAND=y CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
@@ -78,15 +81,19 @@ CONFIG_PHY=y CONFIG_NOP_PHY=y CONFIG_PINCTRL=y CONFIG_PINCTRL_SINGLE=y +# CONFIG_WATCHDOG is not set +CONFIG_SPL_WDT=y CONFIG_USB=y CONFIG_DM_USB_GADGET=y CONFIG_SPL_DM_USB_GADGET=y CONFIG_USB_MUSB_HOST=y CONFIG_USB_MUSB_GADGET=y CONFIG_USB_MUSB_TI=y +CONFIG_USB_MUSB_DSPS=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 CONFIG_USB_ETHER=y +# CONFIG_USB_STORAGE is not set CONFIG_FAT_WRITE=y
include/configs/am335x_guardian.h +6 -5
@@ -16,10 +16,14 @@#define CONFIG_TIMESTAMP #endif +#define CONFIG_SYS_BOOTM_LEN (16 << 20) +/* Clock Defines */ #define V_OSCK 24000000/* Clock output from T2 */ #define V_SCLK (V_OSCK) +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +#ifndef CONFIG_SPL_BUILD #define MEM_LAYOUT_ENV_SETTINGS \
@@ -30,7 +34,6 @@ "ramdisk_addr_r=0x88080000\0" \#define BOOT_TARGET_DEVICES (func) \ - func(MMC, mmc, 0) \ func(UBIFS, ubifs, 0) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na)
@@ -44,11 +47,12 @@MEM_LAYOUT_ENV_SETTINGS \ BOOTENV \"bootlimit=3\0" \ +"bootubivol=rootfs\0" \"altbootcmd=" \"setenv boot_config \"extlinux-rollback.conf\"; " \ "run distro_bootcmd\0" -#endif /* CONFIG_SPL_BUILD */ +#endif /* ! CONFIG_SPL_BUILD */ /* NS16550 Configuration */ #define CONFIG_SYS_NS16550_COM1 0x44e09000/* UART0 */
@@ -65,9 +69,6 @@#define CONFIG_SYS_BOOTCOUNT_LE #ifdef CONFIG_NAND -#define CONFIG_ENV_OFFSET 0x300000 -#define CONFIG_ENV_OFFSET_REDUND 0x340000 -#define CONFIG_ENV_SIZE 0x040000#define CONFIG_SYS_NAND_5_ADDR_CYCLE #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \
Signature · 1 line
2.8.1
PATCH 2/2 am335x, guardian: adapt guardian board to DM
Quoted 11 lines · BollavarapuMoses.Christopher at in.bosch.com
From: Moses Christopher <[email protected]>
- update partition table - remove env partitions
- dts: add new interfaces (uart2, extra gpio-key) remove unneeded entries
update nand timings for performance improvement
- defconfig: adapt configurations to suit DM remove unneeded configs
-am335x_guardian.h: remove mmc bootSigned-off-by Moses Christopher <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190917/155e61a7/attachment.sig>
PATCH 2/2 am335x, guardian: adapt guardian board to DM
In reply to BollavarapuMoses.Christopher at in.bosch.comQuoted 10 lines · BollavarapuMoses.Christopher at in.bosch.com
From: Moses Christopher <[email protected]>
- update partition table - remove env partitions
- dts: add new interfaces (uart2, extra gpio-key) remove unneeded entries
update nand timings for performance improvement
- defconfig: adapt configurations to suit DM remove unneeded configs
-am335x_guardian.h: remove mmc boot
Quoted 2 lines
Signed-off-by Moses Christopher <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191012/3a25349a/attachment.sig>
PATCH 1/2 am335x, guardian: update guardian board
In reply to BollavarapuMoses.Christopher at in.bosch.comQuoted 8 lines · BollavarapuMoses.Christopher at in.bosch.com
From: Moses Christopher <[email protected]>
- add
BOARD_LATE_INITfunction calls inboard.c
- addswi_statusdetection inboard.c
- mux: add guardian interfaces to single pinmux structure
- am33xx, kconfig: addBOARD_LATE_INITfor GUARDIAN boardSigned-off-by Moses Christopher <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190917/e37588a8/attachment.sig>
PATCH 1/2 am335x, guardian: update guardian board
In reply to BollavarapuMoses.Christopher at in.bosch.comQuoted 9 lines · BollavarapuMoses.Christopher at in.bosch.com
From: Moses Christopher <[email protected]>
- add
BOARD_LATE_INITfunction calls inboard.c
- addswi_statusdetection inboard.c
- mux: add guardian interfaces to single pinmux structure
- am33xx, kconfig: addBOARD_LATE_INITfor GUARDIAN boardSigned-off-by Moses Christopher <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191012/125707c8/attachment.sig>