Commit Graph

10 Commits

Author SHA1 Message Date
Felix Fietkau
5faff99c7b mediatek: filogic: fix mt7986a ethernet devicetree entries
Add all ports, rename DSA ports to start at lan1

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-09 20:43:51 +01:00
Felix Fietkau
4f1e54801e mediatek: drop the use of device tree overlays on mt7986a-rfb board
The boot loader does not support it. Instead make NAND the default image for
this board

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-09 20:43:45 +01:00
Daniel Golle
c15e7e2910
mediatek: filogic: consolidate adc '32k' clock
Add dependency to '32k' ADC clock so it is always enabled for thermal
and raw access to ADC values. This allows to remove the patch for the
ADC driver and reduce the patch adding thermal support for MT7986 to
only add the new efuse layout and temperature decoding for V3.

Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-20 20:37:50 +01:00
Daniel Golle
88eae0f036
mediatek: filogic: set correct PWM clock and clean thermal zone
* set correct clocks for PWM to work.
 * MT7986 PWM does have the 26MHz-clock-select, set that in patch
 * drop useless 'passive' trip point in thermal zone
 * extend pwm-fan to have 3 active operating points
 * set reasonable trip points in thermal zone
 * invert pwm-fan operating points and set shorter period to allow
   less noisy operation of the PWM fan of the BPi-R3.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-09 16:41:16 +01:00
Daniel Golle
5d921aa72f mediatek: filogic: add support for hw i2c, pwm and thermal
Add support for hardware I2C and PWM units found in the Filogic SoCs
as well as the CPU thermal support.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-07 16:45:10 +01:00
Daniel Golle
0419f7dead mediatek: add support t-phy settings from efuse on MT7986
Import patches from mtk-openwrt-feeds (MTK SDK) to support reading
t-phy settings affecting PCIe as well as USB2 and USB3 from efuse.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-30 13:29:58 +01:00
Daniel Golle
b18b5a7ca3 mediatek: filogic: add efuse layout to mt7986a.dtsi
efuse is used to store board-specific settings of some of the in-SoC
peripherals. Add it to device tree, so it gets probed on boot and can
be accessed by other drivers.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-30 13:29:58 +01:00
Daniel Golle
c93c5365c0
kernel: pick patches for MediaTek Ethernet from linux-next
Pick patches with several fixes and improvements, preparation for
upcoming WED (TX) [1] as well as basic XDP support [2] with MediaTek's
Filogic SoCs to the mtk_eth_soc driver.

Also pick follow-up patch fixing Ethernet on MT7621 [3].

Tested on Bananapi BPi-R3 (MT7986), Bananapi BPi-R64 (MT7622),
Bananapi BPi-R2 (MT7623), MikroTik RouterBoard M11G (MT7621).

[1]: https://patchwork.kernel.org/project/netdevbpf/list/?series=662108&state=*
[2]: https://patchwork.kernel.org/project/netdevbpf/list/?series=675368&state=*
     (the first part of the series adding wed nodes to mt7986a.dtsi was
      applied to the copy of mt7986a.dtsi in our tree)
[3]: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=5e69163d3b9931098922b3fc2f8e786af8c1f37e

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-22 23:55:02 +01:00
Daniel Golle
06c4fc6d5e kernel: enable inside secure driver for MediaTek platforms
Older MT7623 ARMv7 SoC as well as new Filogic platforms come with
inside-secure,safexcel-eip97 units. Enable them in DTS and select the
driver kernel module by default on those platforms.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-08-28 20:33:15 +01:00
Sam Shih
dabcaac443 mediatek: add mt7986 soc support to the target
It will be supported by the new filogic subtarget

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-08-28 20:33:15 +01:00