Commit Graph

66 Commits

Author SHA1 Message Date
Hannes Schmelzer
0938cff737 board/BuR/brppt1: add makerule for generating production files
Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
2018-07-19 17:03:35 -04:00
Hannes Schmelzer
fbc7c7decf board/BuR/brppt1: convert brppt1 boards to driver model
- add a devicetree for each variant (mmc, spi, nand)
- drop unneeded code from board and bur/common
- drop unneeded stuff from config header files
- minor adaptions to be compliant with driver model (requesting gpio,..)
- harmonize the commandset over all brppt1 targets

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
2018-07-19 17:03:35 -04:00
Hannes Schmelzer
73e9db22ab board/BuR/brppt1: implement more flexible boot process
With this commit we do:

- set the bootdelay in all brppt1 defconfigs to 0, this makes
development easier, since we can break into serial console.

- move CONFIG_BOOTCOMMAND from header file to defconfig

- introduce b_mode variable for selecting the final boot-target.
This b_mode represents the boot-switch, which can found on most b&r
targets. On the brppt1 this boot-switch is derived from some gpio and
the bootcounter within the RTC block, making it so possible to force
a boot-target (as example for repair-case).

- refactor the environment for booting new flexible way
primary we want to get some bootscr.img within the mass-storage,
this script then loads everything needed for the boot.
For legacy reason we implement the t30lgcy#x boot targets, booting the
already delivered linux-images.

- make space for the cfgscr within mtdparts on brppt1_nand

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
2018-07-19 17:03:35 -04:00
Hannes Schmelzer
d63f7130ce board/BuR/common: refactor ft_board_setup(...)
On other OS, not one provided by B&R, it is not guaranteed that there
are factory-settings within a devicetree. So we must not treat the
absence of them as error.
Further we've the fact that on different version of the device-tree
files there are different namings of the factory-settings, we consider
this with searching for an alternative name.

changing things as following:

- don't treat as error if the bootloader version cannot written into
devicetree.

- since the naming of the factory-settings are different in different
versions of the provided device-tree we search for the alternate name
"/fset"

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
2018-07-19 17:03:34 -04:00
Hannes Schmelzer
1d46986601 board/BuR/brppt1: drop dead code (CONFIG_SPL_OS_BOOT)
The falcon mode was never used on this board, there is also no plan to
use it. So drop this dead code.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
2018-07-19 17:03:34 -04:00
Hannes Schmelzer
96cf89f86b board/BuR/common: fix PMIC mpu-pll setup
If a board-code calls the  pmicsetup(u32 mpupll) with a mpupll value
!= 0 it wants to force some frequency with the value provided by mpupll.
Setting up 1 GHz is wrong here.

Nobody did take notice about that yet, since every board calls this
function with zero.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
2018-07-19 17:03:34 -04:00
Hannes Schmelzer
2930941aee board/BuR/common: remove interface Label from summary screen
This interface names may vary over different products, to consider this
fact we replace the interface label "IF1" and "IF2" on the summary
screen with some more generic wording "MAC1" and "MAC2".

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
2018-07-19 17:03:34 -04:00
Hannes Schmelzer
9596367970 board/BuR/brppt1: drop LCD-support
On this linux target long time ago the OS is using DRM driver for
handling video output, the pre initialization of u-boot and the display
summary screen is obsolete. With this patch we drop the LCD-support from
thisd board.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
2018-07-19 17:03:33 -04:00
Hannes Schmelzer
e22597048a board/BuR/common: make CONFIG_LCD optional
Since we're going to drop LCD-support on brppt1 boards, we have to make
this stuff here optional and remove the #error path.

We also move out the ft_board_setup(...) from this #ifdef because
there's no relationship with the LCD-code and on the other hand this is
still needed in future even with LCD-support off.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
2018-07-19 17:03:33 -04:00
Hannes Schmelzer
dc36b65795 board/BuR/common: drop simple-framebuffer setup
The linux systems running on the brppt1 targets are using modern DRM
drivers since long time ago. Further we are going to drop the LCD
support completely on this board, so the simple-framebuffer setup
becomes obsolete.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
2018-07-19 17:03:33 -04:00
Hannes Schmelzer
e31fb4db36 board/BuR: drop devicetree loading and lcd setup for linux-targets
This patch  drops the lcd-screen setup, the summary screen and getting
mac-addresses based on a previous loaded device-tree for linux targets.
Selecting those linux target is simple, since we have only the brppt1.

In detail we do:
- drop the common lcd-setup code which relys on a fdt_blob
- drop the common dtb loading mechanism
- drop the now obsolete CONFIG_USE_FDT from board header and whitelist.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
2018-07-19 17:03:33 -04:00
Tom Rini
83d290c56f SPDX: Convert all of our single license tags to Linux Kernel style
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents.  There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>
2018-05-07 09:34:12 -04:00
Alex Kiernan
9925f1dbc3 net: Move enetaddr env access code to env config instead of net config
In order that we can use eth_env_* even when CONFIG_NET isn't set, move
these functions to environment code from net code.

This fixes failures such as:

  board/ti/am335x/built-in.o: In function `board_late_init':
  board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr'
  u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr'

which caters for use cases such as:

commit f411b5cca4 ("board: am335x: Always set eth/eth1addr environment
variable")

when Ethernet is required in Linux, but not U-Boot.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
2018-04-08 23:00:58 -04:00
Hannes Schmelzer
193f6fb9e8 board/BuR: drop LCDC clock manipulation from board code
The clock selection is done now from the am335x-fb code, so there is no
more need doing this in the board code.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
2018-01-11 15:20:30 +01:00
Hannes Schmelzer
0fcec57752 board/BuR: provide real clock-frequency instead a divider
Actual am335x-fb implementation takes now a real clock frequency instead
a divider. So this component doesn't need to know anymore some base
frequency of the LCDC, we simply provide the pixel-clock frequency.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
2018-01-11 15:19:51 +01:00
Simon Glass
bfebc8c965 env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()
We are now using an env_ prefix for environment functions. Rename these
for consistency. Also add function comments in common.h.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:30:32 -04:00
Simon Glass
00caae6d47 env: Rename getenv/_f() to env_get()
We are now using an env_ prefix for environment functions. Rename these
two functions for consistency. Also add function comments in common.h.

Quite a few places use getenv() in a condition context, provoking a
warning from checkpatch. These are fixed up in this patch also.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:30:24 -04:00
Simon Glass
fd1e959e91 env: Rename eth_setenv_enetaddr() to eth_env_set_enetaddr()
Rename this function for consistency with env_set().

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:23:56 -04:00
Simon Glass
382bee57f1 env: Rename setenv() to env_set()
We are now using an env_ prefix for environment functions. Rename setenv()
for consistency. Also add function comments in common.h.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:22:18 -04:00
Grygorii Strashko
573cc46c65 board: BuR: use get_nand_dev_by_index()
As part of preparation for nand DM conversion the new API has been
introduced to remove direct access to nand_info array. So, use it here
instead of accessing to nand_info array directly.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by:  Hannes Schmelzer <hannes.schmelzer@br-automation.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-11 22:41:52 -04:00
Hannes Schmelzer
f68773728f board/BuR/brxre1: fix MMC boot
since commit

'd5abcf94c7123167725fc22ace342f0d455093c1' -
ti: boot: Register the MMC controllers in SPL in the same way as in u-boot

MMC boot on brxre1 board is broken, with this commit we make our board
working again.

Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2017-06-16 10:11:38 -04:00
Masahiro Yamada
4aa2ba3a34 mmc: replace CONFIG_GENERIC_MMC with CONFIG_MMC
Now CONFIG_GENERIC_MMC and CONFIG_MMC match for all defconfig.
We do not need two options for the same feature.  Deprecate the
former.

This commit was generated with the sed script 's/GENERIC_MMC/MMC/'
and manual fixup of drivers/mmc/Kconfig.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-05-15 18:28:23 +09:00
xypron.glpk@gmx.de
169b50efe2 board/BuR/common: incorrect check of dtb
The logical expression to check the dtb is incorrect in
load_devicetree.

The problem was indicated by cppcheck.

The inconsistent variable name dtppart is changed to dtbpart.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Acked-by: Hannes Schmelzer <oe5hpm@oevsv.at>
2017-05-05 16:46:51 -04:00
Jean-Jacques Hiblot
d5abcf94c7 ti: boot: Register the MMC controllers in SPL in the same way as in u-boot
To keep a consistent MMC device mapping in SPL and in u-boot, let's
register the MMC controllers the same way in u-boot and in the SPL.
In terms of boot time, it doesn't hurt to register more controllers than
needed because the MMC device is initialized only prior being accessed for
the first time.
Having the same device mapping in SPL and u-boot allows us to use the
environment in SPL whatever the MMC boot device.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2017-03-19 22:17:14 -04:00
Hannes Schmelzer
a4d799939f board/BuR: rename kwb board to brxre1
Rename B&R kwb board to brxre1

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-06-24 17:24:40 -04:00
Hannes Schmelzer
2290fe0642 board/BuR: rename tseries board to brppt1
Rename B&R tseries board to brppt1

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-06-24 17:24:39 -04:00
Scott Wood
b616d9b0a7 nand: Embed mtd_info in struct nand_chip
nand_info[] is now an array of pointers, with the actual mtd_info
instance embedded in struct nand_chip.

This is in preparation for syncing the NAND code with Linux 4.6,
which makes the same change to struct nand_chip.  It's in a separate
commit due to the large amount of changes required to accommodate the
change to nand_info[].

Signed-off-by: Scott Wood <oss@buserror.net>
2016-06-03 20:27:48 -05:00
Hannes Schmelzer
568cfb4d7b board/BuR: drop ETH-support in SPL-Stage
During very early prototype-phase we did boot the AM335x boards
initially from CPSW-EMAC.

Now we don't need this feature anymore.

So we drop it to save MLO-space and having therefore a more quickly
boot.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-02-24 18:44:01 -05:00
Hannes Petermaier
91931f7ed3 board/BuR/kwb: use bootvx(...) (with bootline feature) instead go(...)
Since we don't have for sure a valid IP-setup during
board_late_init(...) because it maybe allready stored in environment or
not, we cannot form a proper vxWorks bootline at this place.

So we move to the way, forming the bootline just before
executing/launching vxWorks. To do this we use the bootvx command
instead go.

We only have to form the "othbootargs" environment variable, the rest is
done pretty good by the "bootvx" commannd.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-12 13:17:27 -05:00
Hannes Petermaier
6312e9aab8 board/BuR: simplify default IP-setup on B&R boards.
To simplify and having a common default IP-setup on all B&R boards we
introduce an environment variable "brdefaultip" which does following.

Test if ${ipaddr} is empty, if yes it set's up some defaults:
- ipaddr   : 192.168.60.1
- netmask  : 255.255.255.0
- gatewayip: 192.168.60.254
- serverip : 192.168.60.254

This environment is ran from CONFIG_PREBOOT.

All other "tricks" are dropped.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-09-11 14:05:34 -04:00
Hannes Petermaier
9b63ba3727 board/BuR/common: support timer5 for pwm-backlight
in future we support yet another b&r am335x based board, where Timer 5 is
wired to backlight-driver.

So we introduce a new driver-type '2' to setup timer5 instead timer6.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-06-18 16:11:40 -04:00
Hannes Schmelzer
4c302b9a65 cosmetic: change Author/MAINTAINER Name from Petermaier to Schmelzer
Since i've been married, i also have a new surname.
Mr. Petermaier moved to Mr. Schmelzer.

In this patch i update all files in which my (old) name is present.

Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
2015-05-28 11:17:48 -04:00
Hannes Petermaier
5094befd84 board/BuR/common: rename "usbupdate" environment to "usbscript"
usbupdate in real does allways load some script from usb-storage and execute
it, on all B&R targets.

So we do following 2 things:
- rename it to what it really does
- move it from boards to common environment

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-05-08 17:24:17 -04:00
Hannes Petermaier
99f7247211 board/BuR/tseries: Add simplefb support
Since the used AM3352 SoC doesn't have GPU it isn't allways necessary to build
in complete drm-stuff into linux kernel. In very small applications only we use
the simple-framebuffer.

So we have 2 use-cases:
- device operating on drm-driver (let simplefb node disabled)
- device operating on simplefb-driver (activate simplefb node and reserve mem)

The decision is made by means of "simplefb" environment variable.

simplefb = 0
we don't enable the (maybe) existing simplefb node and all the rest around
display is up to the linux-kernel. We just disable the backlight, beceause we
do not want see the flicker during take over of drm-driver.

simplefb = 1
we enable the (maybe) existing simplefb node and reserve framebuffers size
in memory.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-05-08 17:24:17 -04:00
Hannes Petermaier
d804452bf4 board/BuR/tseries: take usage of CONFIG_LCD_ROTATION
We take use of the new LCD_ROTATION feature.
The information about how the display is rotated is taken from B&R specific
(/factory-settings/rotation) information in the devicetree.

The information there is stored as string (cw, ud, ccw, none) since starting
support of this devices and cannot be changed, so we have to convert it into

none = 0
cw   = 1
ud   = 2
ccw  = 3

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-05-08 17:24:17 -04:00
Hannes Petermaier
e0e3aa50b5 board/BuR/tseries: change pinmux
some pins on the board have been rerouted to other peripherals, so we
change the pinmux to apply with hardware-design.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-04-23 08:52:26 -04:00
Hannes Petermaier
d79c138c75 board/BuR/tseries: reactivate NAND-board
The NAND-version has been become a bit orphan.
Now we need to reactivate it, so bring necessary things:

- loading devicetree
- switch control signal to correct pins
- setup pinmux
- default-environment

up to date.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-04-23 08:52:26 -04:00
Hannes Petermaier
47c14227b8 board/BuR/common: simplify access to devicetree
instead of polling everytime the environment, we take usage of the global
gd->fdt_blob variable and check it only against NULL.

Variable "dtbaddr" from environment is needed only one time on loading the
devicetree within "load_devicetree()"

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-04-23 08:52:22 -04:00
Joe Hershberger
0adb5b761f net: cosmetic: Name ethaddr variables consistently
Use "_ethaddr" at the end of variables and drop CamelCase.
Make constant values actually 'const'.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:32 -06:00
Hannes Petermaier
750461887e board/BuR/common: remove unused function 'blink'
since we have possibility to write out on lcd whats going on, we don't need
the gpio blink functionality anymore.

Signed-off-by: Hannes Petermaier <hannes.petermaier@br-automation.com>

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-03-28 12:07:44 -04:00
Hannes Petermaier
2b5b2be5e9 board/BuR/common: move I2C initialization from common part to board-specific
At this time I2C and responsible pin-mux is setup during PMIC initialziation
within common.c, this is possible because today PMIC is always connected on
I2C0.

In Future this will be changed, PMIC isn't anymore connected to bus0 in call
cases.

So we do following:
- rename enable_i2c_pin_mux0 to enable_i2c_pin_mux to be generic for enabling
  pin-mux on different or more busses.
- move the call to i2c_pin_mux and i2c_init from common.c to the specific
  board.c

Signed-off-by: Hannes Petermaier <hannes.petermaier@br-automation.com>
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-03-28 12:07:44 -04:00
Hannes Petermaier
e52e9cc77f board/BuR/common: use SYS_CONSOLE_OVERWRITE
We don't want that CONSOLE is redirected to LCD upon init, we rather prefer
that console is still on the serial line.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-03-17 10:55:07 -04:00
Hannes Petermaier
8db622cdd4 board/BuR/kwb: Support modify bootcmd through reset-controller
For some cases it is necessary to modify temporaly the bootcommand.
This can be done by writing into the Scratchregister a specific value:

* 0xCC - modify bootcmd "run netboot"
* 0xCD - modify bootcmd "run netscript"
* 0xCE - modify bootcmd "run mmcboot"

the environment in flash is NOT overwritten.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-03-05 20:13:20 -05:00
Hannes Petermaier
a9642925a1 board/BuR/kwb: Form a bootline for vxWorks
vxWorks needs several parameters which are set by the bootloader und his
environment. So we form a vxWorks bootline and pass the result to vxWorks on
a predefined address.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-03-05 20:13:20 -05:00
Hannes Petermaier
cf630f289f board/BuR/kwb: switch to board HW-Rev3
The board has been redesigned, therefore we need from now other I/O Pins to
mux and handle.

Older boards aren't supported from now anymore.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-03-05 20:13:19 -05:00
Hannes Petermaier
2a292a8df4 board/BuR/tseries: cosmetic changes
remove unnary '#define	ETHLED_ORANGE	(96+16)	/* GPIO3_16 */'

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-03-05 20:13:19 -05:00
Hannes Petermaier
a6ec579f7d board/BuR/tseries: Chg Pinmux - enable UART1 pins
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-03-05 20:13:18 -05:00
Hannes Petermaier
71d75d16ef board/BuR/tseries: Chg pinmux - use free NAND Pins in non NAND-config as GPIO
On boards were we have no NAND-flash soldered, we want to use those free pins
as regular gpio.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-03-05 20:13:18 -05:00
Hannes Petermaier
2f32ea70c4 board/BuR/tseries: Change pinmux for GPIO2_28 from GPIO to PWM-Timeroutput
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-03-05 20:13:18 -05:00
Hannes Petermaier
cf1331f853 board/BuR/tseries: Enable HW-Watchdog
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2015-03-05 20:13:17 -05:00