Commit Graph

56 Commits

Author SHA1 Message Date
Rene Straub 69e9c386dd hw21/26: power up extension module early
The extension module is connected to the system I2C bus. Before the
module is powered, it can pull the lines low, preventing I2C access to
the board descriptor.

- enable extension module power already in SPL

id: 417848
2023-10-25 21:41:40 +02:00
Rene Straub 4e67fc3997 hw21/26: adapt power sequencing for NEO-M9
NEO-M9 modems sometimes boot into Safe Boot mode because of the 3.3 V
power sequencing defined by the PMIC.

Change SPL/U-Boot to
- insert LDO feeding GNSS modem in automatic power sequencing
- reset GNSS module at power on reset.

id:420663
2023-08-23 13:55:31 +02:00
Rene Straub 4bbdb87d6b hw21/26: set user serial port to RS485 by default
RS485 keeps the port passive, so that no other devices are disturbed.
2023-03-06 14:52:58 +01:00
Rene Straub e1069f6d23 hw21/26: support backward compatible DT 2022-11-11 18:52:59 +01:00
Rene Straub a9e615e7ae hw21/26: add support for hw v3.2
Support uart4 for added RS232/485 interface
Move led0.green to new pin
2022-11-11 15:44:42 +01:00
Alexandre Bard 7b4add1789 nm-boards: Replace all devicetree paths with aliases
This is easier to maintain and should be compatible with any kernel
version as long as the devicetree aliases are maintained.

BugzID: 77112
2022-01-12 13:01:47 +01:00
Alexandre Bard 4832ca022a netmodule boards: Adapt devicetree path to match kernel 5.10
With kernel upgrade to 5.10 the paths of all nodees have changed because
of the way the ti drivers are handled.

These paths must therefore be adaped in u-boot in order to stay
compatible.

This means that u-boot versions before this commit are not 100%
compatible with kernel 5.10, but they should usually be able to boot.

Also after this change, older kernel will not work 100% but should still
boot.

BugzID: 77112
2022-01-11 13:48:54 +01:00
Marc Mattmueller 2fa18965e6 board/nmhw21: keep coding style and replaced magic numbers
BugzID: 75833
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-12-01 11:03:45 +01:00
Lucien Mueller a6b26419bc hw21: introduce cpu watchdog reset reason.
BugzID: 74817

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-09-16 10:57:47 +02:00
Marc Mattmueller 6cc285809d hw21: clear register completely instead of masking watchdog timeout
With the introduction of the SSF watchdog feature a get and then a
set of the PMIC's CONTROL_D register leads to an activation of the
watchdog and causes a watchdog reset at the time the kernel is
being decompressed.
Currently we disable the watchdog from the bootloader and activate
it only in user space.

BugzID: 74659
Signed-off-by: Marc Mattmueller <marc.mattmueller@netmodule.com>
2021-09-08 09:32:32 +02:00
Rene Straub 3a9ef955c2 hw21/26: mask unwanted wakeup event by default
If events are not masked they lead to an immeditate
restart of the PMIC from powerdown().
2021-03-19 17:32:19 +01:00
Rene Straub 2997b916c1 hw21/26: add reset/start reason detection (#67)
Co-authored-by: Rene Straub <straub@see5.ch>
Reviewed-on: https://git.netmodule.intranet/nmrouter/u-boot/pulls/67
Co-Authored-By: Rene Straub <rene.straub@netmodule.com>
Co-Committed-By: Rene Straub <rene.straub@netmodule.com>
2021-03-03 15:02:13 +01:00
Rene Straub 088d4c7ddf hw21/26: remove trailing whitespaces 2020-12-10 15:02:37 +01:00
Rene Straub f5b16d4cf7 hw21, 26: suppress power on with ignition off
power down system in SPL when ignition is not active on a
power-on start.
2020-11-18 16:49:50 +01:00
René Straub f82ac7239a hw21,26: add start/wakeup reason detection logic (#58)
Move detection logic before PMIC rails init

Add detection logic in hw21/26

Detect start events from pmic

Co-authored-by: Rene Straub <rene.straub@netmodule.com>
Reviewed-on: https://git.netmodule.intranet/nmrouter/u-boot/pulls/58
2020-11-09 10:13:45 +01:00
Rene Straub f89b5527b7 hw21,26: set hw type in device-tree
- hardware type is stored as string under
  /proc/device-tree/nm,carrierboard,type
2020-08-17 16:57:42 +02:00
Rene Straub 08e8a21515 hw21: fix RTC trimming
- commit 7336361d5c broke PMIC RTC trim for hw21
- fixed hw type detection in init_bd_spl()
2020-08-17 11:24:56 +02:00
Rene Straub 9b04a8130e hw26: add factory reset function
- check rs232 for break condition duration to invoke
  factory reset or recovery boot. same logic as reset button.
- check rs232 break condition followed by command
  - 'f': factory reset
  - 'r': recovery boot
2020-08-13 13:53:38 +02:00
Lucien Mueller 93a35c7311 nmhw21: deactivate rs232 reset.
This makes it possible to boot normaly with disconnected uart line.
Previously the system booted into recovery in that case.

BugzID: 65200

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2020-08-07 10:30:55 +02:00
Rene Straub e2bf817634 nmhw21,26: fix incorrect indentation 2020-06-15 16:00:47 +02:00
Rene Straub e0f24ed684 nmhw21,26: change sim_sel to timepulse
gpio2_16 is re-defined as timepulse input on hw26.
On hw21 it was the non-working SIM_SEL_N.
Mux config changed, keeping pin input.
2020-06-15 15:08:56 +02:00
Rene Straub 7336361d5c nmhw21,26: init pmic based on hw type 2020-06-15 14:18:32 +02:00
Rene Straub a02c9b9da3 nmhw21,26: getting hardware type from BD
this is the precursor to make the bootloader hw26 aware.
2020-06-15 13:45:51 +02:00
René Straub 7b1000b59d nmhw21: board: add user reset option via rs232
allow invoking factory reset and recovery boot via:
- uart break, followed by command ('r', 'f')
- using uart rxd as reset line

Co-authored-by: Rene Straub <rene.straub@netmodule.com>
Reviewed-by: Patrick Zysset <patrick.zysset@netmodule.com>
2020-06-08 16:15:27 +02:00
Rene Straub ce70a04c33 nrhw: sync with NRSW, dualcan-passive shield fixes
BugzId: 61778
2020-02-27 14:10:43 +01:00
Lucien Mueller a93f6f3874 nmhw21: sync ui leds with onboard leds.
BugzID: 59055

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2019-11-29 16:02:02 +01:00
Rene Straub e940bb1802 am335x: add NRSW support for nmhw[20,21,24]
- NRSW board features
- memory layout update
- boot configuration update
- general cleanup

BugzID: 60384

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2019-11-29 14:08:31 +01:00
Rene Straub 64a2a57636 nmhw21: general cleanup of board files 2019-10-30 19:41:53 +01:00
Rene Straub a8cc1f2d85 da9063: move driver to common netmodule codebase
- change nmhw21, nrhw24 makefiles/include
- change nrhw20 to use improved da9063 code (bus claim/release)
2019-09-26 18:38:57 +02:00
Ramon Moesching cd9281a619 nmhw21 board.c: turn off indicator led in board_init()
BugzID: 59055

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-09-20 11:43:00 +02:00
Rene Straub 88426e4041 nmhw21 - change PMIC config to synchronous mode
in rare cases the default automatic mode switching can disable a power
rail. To prevent this all used buck regulators are configured to
synchronous mode.
2019-09-07 11:05:09 +02:00
Rene Straub 5488c0795d nmhw21: cleanup
- fix formatting
- remove unused variable
2019-09-07 10:20:30 +02:00
Lucien Mueller 8ec934e776 Give UM more time to boot.
Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2019-08-26 13:02:10 +02:00
Rene Straub 5c5c0b98fe nmhw21: don't power up GSM modem at startup
BugzID: 57459
2019-06-12 12:59:11 +02:00
Rene Straub ccb5de587f nmhw21: provide bootloader version in device tree 2019-06-04 08:00:02 +02:00
Rene Straub 87657dd68f nmhw21: fix wrong hw version of user module
- hw version of UM was set to version of base board
2019-04-01 15:06:35 +02:00
Rene Straub 29d7a20fdb nmhw21: support for user module device tree node
- fill out /user_module node with:
  - status: okay/disabled
  - model: UM type
  - hw version/revision
  - network configuration
- show product variant in boot log
- set product variant in device tree /model
2019-03-30 14:14:46 +01:00
Rene Straub d10a7daaaf nmhw21: fix broadr PHY addresses for HW v1.0
- set PHY Id 6 for broadr0 on v1.0
- set PHY Id 7 for broadr1 on v1.0

BugzId: 55529
2019-02-05 09:13:13 +01:00
Rene Straub d53bbfbc77 nmhw21: improve support for tja1102 dual phy
- install filter driver for mdio read funtion
- remove ghost phy at address 0
- report phy type also for 2nd port

BugzId: 55131
2019-01-11 12:12:48 +01:00
Rene Straub f3d2175a53 nmhw21: add user module detection
- create new 'um' module to handle user module detection
- in nmhw21 board file
  - try to read presence register and check for magic ID
  - if found, determine type and hw version
  - display information at startup

BugzID: 53758
2019-01-05 14:59:39 +01:00
Rene Straub d6cecc7f62 nmhw21: add configuration option for Ethernet link timeout
- env variable linktimeout defines timeout in milliseconds
- valid range is 1000 to 10000 ms
- default timeout is 5 seconds

BugzID: 55019
2019-01-05 12:25:51 +01:00
Rene Straub 84189ee455 nmhw21: add factory reset/recovery boot
- check reset button at startup
- short press (2s) invokes factory reset.
   - adds factory-reset to bootline
- long press (12s) invokes recovery boot in the following order:
   1. pxe boot
   2. tftp recovery boot

BugzID: 55039
2019-01-04 18:23:07 +01:00
Rene Straub 80417a713a nmhw21: apply PMIC sequencer fixes to v1.2 configuration
- apply sequencer fixes up to and including v1.2 config
- note: v1.3 config is incorrectly stored as v1.2 and will thus
 also be "fixed", although this is not required.

BugzID: 53234
2019-01-04 14:29:02 +01:00
Rene Straub 255163782d nmhw21: trim RTC for better accuracy
- trim RTC by -18ppm (average deviation of prototype build 2)

BugzID: 55020
2019-01-04 13:46:26 +01:00
Rene Straub bf667f5171 nmhw21: fixup code for hw_rev 1.0 broadr phy addr
phy addresses have been changed from rev 1.0 (6+7) to rev 2.0 and later
(2+3). the function ft_eth() overwrites these addresses in fdt_path just
for rev 1.0 boards.

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2018-12-16 16:28:32 +01:00
Rene Straub 2ddfb8e382 nmhw21: define LED state during boot
- Set LED colors in SPL start, bootloader start and end
- Minor cleanup (documentation, dead code)

BugzID: 54745
2018-12-16 15:59:55 +01:00
Rene Straub 5d4e667c1c nmhw21: add support for hw v2.0
- enable kl15 ignition gating control
- support BroadR PHY addresses 2,3 on hw v2.0
- add DTB fixup for UI leds
- remove code to read partition table descriptor
- remove unused variables
- update da9063 driver
  - add new register definitions
  - fix bug with nullpointer check in da9063_set_reg()
- fix led 0 pins (red/green swapped)

BugzID: 54785

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2018-12-11 21:26:21 +01:00
Lucien Mueller be3dbc4966 nmhw21: Removed hw-revision form env.
BugzID: 54508

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2018-12-05 09:40:40 +01:00
Rene Straub cf3a77fa95 nmhw21: enable factory test station detection
Check whether an I2C device (EEPROM) is present at address 0xA2/0x51 as
part of the factory test sequence.

BugzID: 54436

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2018-11-23 19:26:33 +01:00
Patrick Zysset c67fb07a2a nmhw21: fix several cppcheck warnings
BugzID: 54211

Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2018-11-23 01:16:37 +01:00