adding the kmod-i2c-designware-platform by user suggestion
Co-authored-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20893
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Drop support for kernel 6.6 as now kernel 6.12 is set as default kernel
version.
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20893
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
switch the kernel to 6.12 by default
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20893
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Devices package:
Add missing USB3 driver
Device tree:
Fix model name and pwm usage
Add missing supply for I2C and USB
Update network port names based on the shell image [1]
[1] https://docs.banana-pi.org/bpi-r4_lite/banana_pi_bpi-r4_lite_case_1.png
Fixes: 8b6c6978 ("mediatek: add support for BananaPi BPi-R4 Lite")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
There is no reason to limit USB to 2.0 mode by default. This
limitation should be done when both gmac2 and USB are enabled.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Remove I2C, PCIe, PWM, UART and USB from the MT7987A SoC dtsi.
These should not be enabled by default, but rather enabled based
on the device.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Drop support for kernel 6.6 as now kernel 6.12 is set as default kernel
version.
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20892
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
switch the kernel to 6.12 by default
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20892
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Drop support for kernel 6.6 as now kernel 6.12 is set as default kernel
version.
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20871
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
switch the kernel to 6.12 by default
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20871
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Drop support for kernel 6.6 as now kernel 6.12 is set as default kernel
version.
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20874
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
switch the kernel to 6.12 by default
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20874
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Drop support for kernel 6.6 as now kernel 6.12 is set as default kernel
version.
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20887
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
switch the kernel to 6.12 by default
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20887
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Drop support for kernel 6.6 as now kernel 6.12 is set as default kernel
version.
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20888
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
switch the kernel to 6.12 by default
Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20888
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
- Added fan0 alias
- Implemented LED aliases and thermal zones
- Restructured partitions: u-boot, u-boot-env, ubi
Signed-off-by: Konstantin Meshkov <skyline@mail.ru>
[ improve commit title ]
Link: https://github.com/openwrt/openwrt/pull/17924
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
The D-Link DNS-325 A1 is NAS with 2x HDD (3.5 inch) bays, 1x 10/100/1000Base-T port and 1x USB 2.0 port
Device specification:
SoC: Marvell 88F6281-A1 1.2 GHz
RAM: 256 MB (2xSEC K4T1G084QF-HCF7:128Mx8 @400 CL6)
Flash: 128 MB (SAMSUNG 946 K9F1G08U0B PCB0)
SATA: 2x internal SATA II drives
Ethernet: 1x Gigabit (Marvell 88E1116R-NNC1)
LED: 7x (white: Power, white/red: Right SATA Activity, USB Activity, Left SATA Activity)
Key: 3x (Power, Reset, USB Copy/Unmount)
Serial: 5 pin header (RXD,GAP,3.3V,GND,TXD), (115200,8,N,1), 3.3V TTL
USB ports: 1x USB 2.0
Flash instruction:
NOTE: this process uses a serial connection. It will upgrade the bootloader and reset the bootloader environment variables
USB flash stick setup
Format to FAT32 without mbr
Copy these files to USB flash stick: dlink_dns-325-a1-initramfs-uImage dlink_dns-325-a1-squashfs-factory.bin dlink_dns-325-a1-squashfs-sysupgrade.bin u-boot.kwb (from u-boot-dns325 directory)
NAS setup
Connect LAN cable between router and NAS device
Connetc USB flash stick to NAS device
Connect serial to NAS device
Boot from new u-boot and install it
$ kwboot -p -b u-boot.kwb -B115200 -t /dev/ttyUSB0
Power on NAS
After download copleted and booted NAS device with new u-boot stop in bootloader by pressing any key
=> usb start
=> fatload usb 0 0x1000000 /u-boot.kwb
=> nand erase.part u-boot
=> nand write 0x1000000 u-boot ${filesize}
=> reset
Update MAC address in u-boot env
Stop in bootloader by pressing any key
Get your MAC address from label on chassis
=> setenv ethaddr XX:XX:XX:XX:XX:XX
=> saveenv
Install OpenWrt by flashing factory image from u-boot
=> usb start
=> fatload usb 0 0x1000000 /dlink_dns-325-a1-squashfs-factory.bin
=> nand erase.part ubi
=> nand write 0x1000000 ubi ${filesize}
=> reset
Based-on: #9296
Signed-off-by: Konstantin Meshkov <skyline@mail.ru>
[ refresh uboot patches ]
Link: https://github.com/openwrt/openwrt/pull/17924
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
These patches fix the remaining issues with BCM5325 switches and allow
dropping the default VLAN on Huawei HG556a.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This device has one USB2.0 port, plus ethernet, 2x wifi, ethernet, xPON
and VoIP.
Installation instructions: (Assuming root shell via SSH or serial)
1. Place OpenWrt TRX file on a USB stick formatted VFAT
2. Plug in the stick to the modem
3. Type: mtd write -f -e tclinux /mnt/usb2_sda1/<name of file>.trx tclinux
At this point, both OpenWrt and the vendor OS will be installed
because the device has space for two operating systems. Switch the OS
to boot to OpenWrt:
1. mtd readflash tmpdata 999999999 0 reservearea
2. echo -n '0' | dd of=./tmpdata bs=1 count=1 seek=397311 conv=notrunc
3. mtd write -f -e reservearea ./tmpdata reservearea
4. reboot
WARNING: While you can install with SSH alone, you need serial to use
OpenWrt on EcoNet devices because the Ethernet driver has not yet been
developed.
Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
Link: https://github.com/openwrt/openwrt/pull/20580
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The parameters must be aligned based on the last opened parenthesis
(+1). If this not a multiple of the tab size (8) then the rest
alignment must be done using spaces.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
It is written "multi" and not "mutli"
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
It is written "initialization" and not "intialization"
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The Linux kernel coding style recommends not to add a space after
casts.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
It is recommended in the Linux kernel coding style not to add multiple
newlines after another.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Instead of manually writing shift operations, it is preferred to
use BIT(b) or GENMASK(e, s).
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
uint(8|16|32|64)_t and int(8|16|32|64)_t types should not be used in
kernel code. The shorter s(8|16|32|64) and u(8|16|32|64) or the
endianness specific versions (le*, be*) must be used instead.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Static variables (and global variables) are initialized to 0 by
default. It is not needed and discouraged to reinitialize them
to 0.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
It is preferred in the Linux kernel to use the short type name
"unsigned long" instead of "unsigned long int". The same is true
for short and the signed version of the types.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
It is not allowed in the Linux kernel to have the condition and
the actual statement(s) on the same line. This is required to
make it easier to identify the body of an if/do/while/for/..
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The repeated words don't make any sense in these comments/sentences and can
just be dropped.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
In contrast to array initializations, function scopes must start
on a newline and not at the a line which defines the function
parameters.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Global array initialization must have the open brace on the first
line and the next lines must be intended by one level. The closing
brace must be one a separate line.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The Linux coding style requires to have a newline between the vaariables
definition block and the beginning of a scope and the code.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
In the Linux kernel, it is preferred not to use compiler specific
attributes but instead utilize the kernel specific helpers.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
It can happen that the calculation `start + (HZ / 1000) * timeout`
overflows `unsigned long`. This must be handled correctly to avoid too long
waits. Luckily, the `time_before()` helper already does this.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
It is preferred in the kernel to have less nesting of scopes. More common
is to perform pre-condition checks (like error handlers) and then react to
them.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
strcpy doesn't check the length of the destination buffer. And strlcpy
would not make sure to null-terminate the destination buffer.
Even when it is clear that this string will fit in the currrent buffer, it
is just best practice to avoid strcpy.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The case statements should be at the same indentation level as the switch.
Having different levels makes it harder to spot where the next case starts.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
In the Linux kernel, it is preferred not to use compiler specific
attributes but instead utilize the kernel specific helpers.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
There is nothing to return from a void function. And it doesn't change the
execution flow. The return at the end of a void function is therefore just
a NOP.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The white space is not visibible when it is printed. It might have been
added by accident to the format string.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
It is preferred to have the whole quoted string on a single line to make it
easier to find these lines in the source code (while grep'ing). And since
these quotes are inside a string, they will also add unwanted whitespaces.
At the same time, add the missing newine at the end of the `pr_debug`
lines.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
There is no external component using these functions and these functions
are local to the current translation unit. These functions can therefore be
declared static.
The currently unused *_field functions were kept because they might be used
in the future.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The common declarations should not be spread around in different source
files but kept inside the header files. This is unfortunately currently not
the best place to store them because soc_info is actually from non-DSA
code. But it is at least better than having them in diffent source files.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
In net code, it is preferred to have block comments which
* either are one line: `/* ... */`
* multiple lines with:
- starting with the first comment line directly: `/* ...`
- each line is intended with the first asterisk: ` * ...`
- the last line is just the end of the comment: ` */`
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The Linux kernel coding style prefers not to use braces around blocks which
are only one statement long.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>