Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
220a0983a5
@ -1213,6 +1213,20 @@ config KERNEL_PAGE_POOL_STATS
|
||||
bool "Page pool stats support"
|
||||
depends on KERNEL_PAGE_POOL
|
||||
|
||||
config KERNEL_MPTCP
|
||||
bool "Multi-Path TCP support"
|
||||
default y if !SMALL_FLASH
|
||||
help
|
||||
Select this option to enable support for Multi-Path TCP.
|
||||
Increases the compressed kernel size by ~214kB (as of Linux 6.6).
|
||||
|
||||
if KERNEL_IPV6
|
||||
config KERNEL_MPTCP_IPV6
|
||||
bool "IPv6 support for Multipath TCP"
|
||||
depends on KERNEL_MPTCP
|
||||
default KERNEL_MPTCP
|
||||
endif
|
||||
|
||||
#
|
||||
# NFS related symbols
|
||||
#
|
||||
|
@ -316,12 +316,12 @@ define Build/elecom-product-header
|
||||
$(eval product=$(word 1,$(1)))
|
||||
$(eval fw=$(if $(word 2,$(1)),$(word 2,$(1)),$@))
|
||||
|
||||
( \
|
||||
-( \
|
||||
echo -n -e "ELECOM\x00\x00$(product)" | dd bs=40 count=1 conv=sync; \
|
||||
echo -n "0.00" | dd bs=16 count=1 conv=sync; \
|
||||
dd if=$(fw); \
|
||||
) > $(fw).new
|
||||
mv $(fw).new $(fw)
|
||||
) > $(fw).new \
|
||||
&& mv $(fw).new $(fw) || rm -f $(fw)
|
||||
endef
|
||||
|
||||
define Build/elecom-wrc-gs-factory
|
||||
@ -351,10 +351,10 @@ define Build/elx-header
|
||||
echo -ne "$$($(MKHASH) md5 $@ | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \
|
||||
dd bs=58 count=1 conv=sync; \
|
||||
) > $(KDIR)/tmp/$(DEVICE_NAME).header
|
||||
$(call Build/xor-image,-p $(xor_pattern) -x)
|
||||
cat $(KDIR)/tmp/$(DEVICE_NAME).header $@ > $@.new
|
||||
mv $@.new $@
|
||||
rm -rf $(KDIR)/tmp/$(DEVICE_NAME).header
|
||||
-$(call Build/xor-image,-p $(xor_pattern) -x) \
|
||||
&& cat $(KDIR)/tmp/$(DEVICE_NAME).header $@ > $@.new \
|
||||
&& mv $@.new $@ \
|
||||
&& rm -rf $(KDIR)/tmp/$(DEVICE_NAME).header
|
||||
endef
|
||||
|
||||
define Build/eva-image
|
||||
@ -621,8 +621,8 @@ define Build/seama-seal
|
||||
endef
|
||||
|
||||
define Build/senao-header
|
||||
$(STAGING_DIR_HOST)/bin/mksenaofw $(1) -e $@ -o $@.new
|
||||
mv $@.new $@
|
||||
-$(STAGING_DIR_HOST)/bin/mksenaofw $(1) -e $@ -o $@.new \
|
||||
&& mv $@.new $@ || rm -f $@
|
||||
endef
|
||||
|
||||
define Build/sysupgrade-tar
|
||||
@ -673,23 +673,22 @@ define Build/tplink-v1-image
|
||||
endef
|
||||
|
||||
define Build/tplink-v2-header
|
||||
$(STAGING_DIR_HOST)/bin/mktplinkfw2 \
|
||||
-$(STAGING_DIR_HOST)/bin/mktplinkfw2 \
|
||||
-c -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -L $(KERNEL_LOADADDR) \
|
||||
-E $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
|
||||
-w $(TPLINK_HWREVADD) -F "$(TPLINK_FLASHLAYOUT)" \
|
||||
-T $(TPLINK_HVERSION) -V "ver. 2.0" \
|
||||
-k $@ -o $@.new $(1)
|
||||
@mv $@.new $@
|
||||
-k $@ -o $@.new $(1) \
|
||||
&& mv $@.new $@ || rm -f $@
|
||||
endef
|
||||
|
||||
define Build/tplink-v2-image
|
||||
$(STAGING_DIR_HOST)/bin/mktplinkfw2 \
|
||||
-$(STAGING_DIR_HOST)/bin/mktplinkfw2 \
|
||||
-H $(TPLINK_HWID) -W $(TPLINK_HWREV) \
|
||||
-w $(TPLINK_HWREVADD) -F "$(TPLINK_FLASHLAYOUT)" \
|
||||
-T $(TPLINK_HVERSION) -V "ver. 2.0" -a 0x4 -j \
|
||||
-k $(IMAGE_KERNEL) -r $(IMAGE_ROOTFS) -o $@.new $(1)
|
||||
cat $@.new >> $@
|
||||
rm -rf $@.new
|
||||
-k $(IMAGE_KERNEL) -r $(IMAGE_ROOTFS) -o $@.new $(1) \
|
||||
&& cat $@.new >> $@ && rm -rf $@.new || rm -f $@
|
||||
endef
|
||||
|
||||
define Build/uImage
|
||||
@ -726,8 +725,8 @@ define Build/multiImage
|
||||
endef
|
||||
|
||||
define Build/xor-image
|
||||
$(STAGING_DIR_HOST)/bin/xorimage -i $@ -o $@.xor $(1)
|
||||
mv $@.xor $@
|
||||
-$(STAGING_DIR_HOST)/bin/xorimage -i $@ -o $@.xor $(1) \
|
||||
&& mv $@.xor $@ || rm -f $@
|
||||
endef
|
||||
|
||||
define Build/zip
|
||||
|
@ -280,7 +280,8 @@ endef
|
||||
|
||||
define Image/Manifest
|
||||
$(if $(CONFIG_USE_APK), \
|
||||
$(call apk,$(TARGET_DIR_ORIG)) list --quiet --manifest --no-network | sort | sed 's/ / - /' > \
|
||||
$(call apk,$(TARGET_DIR_ORIG)) list --quiet --manifest --no-network \
|
||||
--repositories-file /dev/zero | sort | sed 's/ / - /' > \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest, \
|
||||
$(call opkg,$(TARGET_DIR_ORIG)) list-installed > \
|
||||
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest \
|
||||
@ -325,7 +326,7 @@ ifdef CONFIG_TARGET_ROOTFS_CPIOGZ
|
||||
endif
|
||||
|
||||
mkfs_packages = $(filter-out @%,$(PACKAGES_$(call param_get,pkg,pkg=$(target_params))))
|
||||
mkfs_packages_add = $(foreach pkg,$(filter-out -%,$(mkfs_packages)),$(pkg)$(call GetABISuffix,$(pkg)))
|
||||
mkfs_packages_add = $(foreach pkg,$(filter-out -% ~%,$(mkfs_packages)),$(pkg)$(call GetABISuffix,$(pkg)))
|
||||
mkfs_packages_remove = $(foreach pkg,$(patsubst -%,%,$(filter -%,$(mkfs_packages))),$(pkg)$(call GetABISuffix,$(pkg)))
|
||||
mkfs_cur_target_dir = $(call mkfs_target_dir,pkg=$(target_params))
|
||||
|
||||
@ -333,7 +334,9 @@ opkg_target = \
|
||||
$(call opkg,$(mkfs_cur_target_dir)) \
|
||||
-f $(mkfs_cur_target_dir).conf
|
||||
|
||||
apk_target = $(call apk,$(mkfs_cur_target_dir)) --no-scripts
|
||||
apk_target = \
|
||||
$(call apk,$(mkfs_cur_target_dir)) --no-scripts \
|
||||
--repositories-file /dev/zero --repository file://$(PACKAGE_DIR_ALL)/packages.adb
|
||||
|
||||
|
||||
target-dir-%: FORCE
|
||||
@ -539,6 +542,9 @@ define Device/Build/initramfs
|
||||
$(call Kernel/CompileImage/Initramfs,$(KDIR)/target-dir-$$(ROOTFS_ID/$(1)),.$$(ROOTFS_ID/$(1)))
|
||||
endif
|
||||
$(1)-initramfs-images: $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE))
|
||||
|
||||
.IGNORE: $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE)
|
||||
|
||||
$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE)
|
||||
cp $$^ $$@
|
||||
|
||||
|
@ -345,8 +345,17 @@ else
|
||||
--info "origin:$(SOURCE)" \
|
||||
--info "url:$(URL)" \
|
||||
--info "maintainer:$(MAINTAINER)" \
|
||||
--info "provides:$$(foreach prov,$$(filter-out $(1)$$(ABIV_$(1)),$(PROVIDES)$$(if $$(ABIV_$(1)), \
|
||||
$(1) $(foreach provide,$(PROVIDES),$(provide)$$(ABIV_$(1))))),$$(prov)=$(VERSION) )" \
|
||||
--info "provides:$$(foreach prov,\
|
||||
$$(filter-out $(1)$$(ABIV_$(1)), \
|
||||
$(PROVIDES)$$(if $$(ABIV_$(1)), \
|
||||
$(1)=$(VERSION) $(foreach provide, \
|
||||
$(PROVIDES), \
|
||||
$(provide)$$(ABIV_$(1))=$(VERSION) \
|
||||
) \
|
||||
) \
|
||||
), \
|
||||
$$(prov) )" \
|
||||
$(if $(DEFAULT_VARIANT),--info "provider-priority:100") \
|
||||
--script "post-install:$$(ADIR_$(1))/post-install" \
|
||||
--script "pre-deinstall:$$(ADIR_$(1))/pre-deinstall" \
|
||||
--info "depends:$$(foreach depends,$$(subst $$(comma),$$(space),$$(subst $$(space),,$$(subst $$(paren_right),,$$(subst $$(paren_left),,$$(Package/$(1)/DEPENDS))))),$$(depends))" \
|
||||
|
@ -47,12 +47,10 @@ apk = \
|
||||
IPKG_INSTROOT=$(1) \
|
||||
$(FAKEROOT) $(STAGING_DIR_HOST)/bin/apk \
|
||||
--root $(1) \
|
||||
--repositories-file /dev/zero \
|
||||
--keys-dir $(TOPDIR) \
|
||||
--keys-dir $(if $(APK_KEYS),$(APK_KEYS),$(TOPDIR)) \
|
||||
--no-cache \
|
||||
--no-logfile \
|
||||
--preserve-env \
|
||||
--repository file://$(PACKAGE_DIR_ALL)/packages.adb
|
||||
--preserve-env
|
||||
|
||||
TARGET_DIR_ORIG := $(TARGET_ROOTFS_DIR)/root.orig-$(BOARD)
|
||||
|
||||
|
@ -87,7 +87,7 @@ else
|
||||
endif
|
||||
else
|
||||
ifneq ($(CONFIG_USE_APK),)
|
||||
$(curdir)/compile: $(BUILD_KEY_APK_SEC) $(BUILD_KEY_APK_PUB)
|
||||
$(curdir)//compile += $(BUILD_KEY_APK_SEC) $(BUILD_KEY_APK_PUB)
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -98,7 +98,9 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(curdir)/merge-index
|
||||
ifneq ($(CONFIG_USE_APK),)
|
||||
$(file >$(TMP_DIR)/apk_install_list,\
|
||||
$(foreach pkg,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null),$(pkg)$(call GetABISuffix,$(pkg))))
|
||||
$(call apk,$(TARGET_DIR)) add --initdb --no-scripts --arch $(ARCH_PACKAGES) $$(cat $(TMP_DIR)/apk_install_list)
|
||||
$(call apk,$(TARGET_DIR)) add --initdb --no-scripts --arch $(ARCH_PACKAGES) \
|
||||
--repositories-file /dev/zero --repository file://$(PACKAGE_DIR_ALL)/packages.adb \
|
||||
$$(cat $(TMP_DIR)/apk_install_list)
|
||||
else
|
||||
$(file >$(TMP_DIR)/opkg_install_list,\
|
||||
$(call opkg_package_files,\
|
||||
@ -128,7 +130,7 @@ ifneq ($(CONFIG_USE_APK),)
|
||||
--keys-dir $(TOPDIR) \
|
||||
--sign $(BUILD_KEY_APK_SEC) \
|
||||
--output packages.adb \
|
||||
*.apk; \
|
||||
$$(ls *.apk | grep -v 'kernel\|libc'); \
|
||||
done
|
||||
else
|
||||
@for d in $(PACKAGE_SUBDIRS); do ( \
|
||||
|
@ -170,6 +170,13 @@ define U-Boot/rk3566/Default
|
||||
TPL:=$(RK3566_TPL)
|
||||
endef
|
||||
|
||||
define U-Boot/nanopi-r3s-rk3566
|
||||
$(U-Boot/rk3566/Default)
|
||||
NAME:=NanoPi R3S
|
||||
BUILD_DEVICES:= \
|
||||
friendlyarm_nanopi-r3s
|
||||
endef
|
||||
|
||||
define U-Boot/radxa-cm3-io-rk3566
|
||||
$(U-Boot/rk3566/Default)
|
||||
NAME:=CM3 IO
|
||||
@ -386,6 +393,7 @@ UBOOT_TARGETS := \
|
||||
roc-cc-rk3328 \
|
||||
rock-pi-e-rk3328 \
|
||||
rock64-rk3328 \
|
||||
nanopi-r3s-rk3566 \
|
||||
radxa-cm3-io-rk3566 \
|
||||
radxa-zero-3-rk3566 \
|
||||
rock-3c-rk3566 \
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -87,6 +87,19 @@ dtb-$(CONFIG_ROCKCHIP_RK3368) += \
|
||||
@@ -87,6 +87,22 @@ dtb-$(CONFIG_ROCKCHIP_RK3368) += \
|
||||
rk3368-geekbox.dtb \
|
||||
rk3368-px5-evb.dtb \
|
||||
|
||||
@ -8,6 +8,9 @@
|
||||
+ rk3399-guangmiao-g4c.dtb \
|
||||
+ rk3399-nanopi-r4se.dtb
|
||||
+
|
||||
+dtb-$(CONFIG_ROCKCHIP_RK3566) += \
|
||||
+ rk3566-nanopi-r3s.dtb \
|
||||
+
|
||||
+dtb-$(CONFIG_ROCKCHIP_RK3568) += \
|
||||
+ rk3568-armsom-sige3.dtb \
|
||||
+ rk3568-lyt-t68m.dtb \
|
||||
|
@ -0,0 +1,17 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "rk356x-u-boot.dtsi"
|
||||
|
||||
&sdhci {
|
||||
cap-mmc-highspeed;
|
||||
mmc-ddr-1_8v;
|
||||
mmc-hs200-1_8v;
|
||||
mmc-hs400-1_8v;
|
||||
mmc-hs400-enhanced-strobe;
|
||||
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
|
||||
};
|
||||
|
||||
&vcc5v0_usb {
|
||||
/delete-property/ regulator-always-on;
|
||||
/delete-property/ regulator-boot-on;
|
||||
};
|
@ -0,0 +1,572 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/*
|
||||
* Copyright (c) 2020 Rockchip Electronics Co., Ltd.
|
||||
*
|
||||
* Copyright (c) 2024 FriendlyElec Computer Tech. Co., Ltd.
|
||||
* (http://www.friendlyarm.com)
|
||||
*
|
||||
* Copyright (c) 2024 Tianling Shen <cnsztl@gmail.com>
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
#include "rk3566.dtsi"
|
||||
|
||||
/ {
|
||||
model = "FriendlyARM NanoPi R3S";
|
||||
compatible = "friendlyarm,nanopi-r3s", "rockchip,rk3566";
|
||||
|
||||
aliases {
|
||||
ethernet0 = &gmac1;
|
||||
mmc0 = &sdmmc0;
|
||||
mmc1 = &sdhci;
|
||||
|
||||
led-boot = &power_led;
|
||||
led-failsafe = &power_led;
|
||||
led-running = &power_led;
|
||||
led-upgrade = &power_led;
|
||||
};
|
||||
|
||||
chosen: chosen {
|
||||
stdout-path = "serial2:1500000n8";
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&reset_button_pin>;
|
||||
|
||||
button-reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <50>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&power_led_pin>, <&lan_led_pin>, <&wan_led_pin>;
|
||||
|
||||
power_led: led-0 {
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
lan_led: led-1 {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_LAN;
|
||||
gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wan_led: led-2 {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_WAN;
|
||||
gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_usbc: vdd-usbc-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vdd_usbc";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
};
|
||||
|
||||
vcc5v0_sys: vcc5v0-sys-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc5v0_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vdd_usbc>;
|
||||
};
|
||||
|
||||
vcc3v3_sys: vcc3v3-sys-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vcc3v3_sys";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
|
||||
vcc5v0_usb: vcc5v0_usb-regulator {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&vcc5v0_usb_host_en>;
|
||||
regulator-name = "vcc5v0_usb";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
};
|
||||
};
|
||||
|
||||
&combphy1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&combphy2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
cpu-supply = <&vdd_cpu>;
|
||||
};
|
||||
|
||||
&cpu1 {
|
||||
cpu-supply = <&vdd_cpu>;
|
||||
};
|
||||
|
||||
&cpu2 {
|
||||
cpu-supply = <&vdd_cpu>;
|
||||
};
|
||||
|
||||
&cpu3 {
|
||||
cpu-supply = <&vdd_cpu>;
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
|
||||
assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru CLK_MAC1_2TOP>;
|
||||
assigned-clock-rates = <0>, <125000000>;
|
||||
clock_in_out = "output";
|
||||
phy-mode = "rgmii-id";
|
||||
phy-handle = <&rgmii_phy1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac1m0_miim
|
||||
&gmac1m0_tx_bus2_level3
|
||||
&gmac1m0_rx_bus2
|
||||
&gmac1m0_rgmii_clk_level2
|
||||
&gmac1m0_rgmii_bus_level3>;
|
||||
snps,reset-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
snps,reset-active-low;
|
||||
/* Reset time is 20ms, 100ms for rtl8211f */
|
||||
snps,reset-delays-us = <0 20000 100000>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpu {
|
||||
mali-supply = <&vdd_gpu>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
|
||||
vdd_cpu: regulator@1c {
|
||||
compatible = "tcs,tcs4525";
|
||||
reg = <0x1c>;
|
||||
fcs,suspend-voltage-selector = <1>;
|
||||
regulator-name = "vdd_cpu";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <800000>;
|
||||
regulator-max-microvolt = <1150000>;
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc5v0_sys>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
rk809: pmic@20 {
|
||||
compatible = "rockchip,rk809";
|
||||
reg = <0x20>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
|
||||
#clock-cells = <1>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pmic_int>;
|
||||
system-power-controller;
|
||||
vcc1-supply = <&vcc3v3_sys>;
|
||||
vcc2-supply = <&vcc3v3_sys>;
|
||||
vcc3-supply = <&vcc3v3_sys>;
|
||||
vcc4-supply = <&vcc3v3_sys>;
|
||||
vcc5-supply = <&vcc3v3_sys>;
|
||||
vcc6-supply = <&vcc3v3_sys>;
|
||||
vcc7-supply = <&vcc3v3_sys>;
|
||||
vcc8-supply = <&vcc3v3_sys>;
|
||||
vcc9-supply = <&vcc3v3_sys>;
|
||||
wakeup-source;
|
||||
|
||||
regulators {
|
||||
vdd_logic: DCDC_REG1 {
|
||||
regulator-name = "vdd_logic";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_gpu: DCDC_REG2 {
|
||||
regulator-name = "vdd_gpu";
|
||||
regulator-always-on;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_ddr: DCDC_REG3 {
|
||||
regulator-name = "vcc_ddr";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-initial-mode = <0x2>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdd_npu: DCDC_REG4 {
|
||||
regulator-name = "vdd_npu";
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_1v8: DCDC_REG5 {
|
||||
regulator-name = "vcc_1v8";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdda0v9_image: LDO_REG1 {
|
||||
regulator-name = "vdda0v9_image";
|
||||
regulator-min-microvolt = <950000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdda_0v9: LDO_REG2 {
|
||||
regulator-name = "vdda_0v9";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vdda0v9_pmu: LDO_REG3 {
|
||||
regulator-name = "vdda0v9_pmu";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <900000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <900000>;
|
||||
};
|
||||
};
|
||||
|
||||
vccio_acodec: LDO_REG4 {
|
||||
regulator-name = "vccio_acodec";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vccio_sd: LDO_REG5 {
|
||||
regulator-name = "vccio_sd";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc3v3_pmu: LDO_REG6 {
|
||||
regulator-name = "vcc3v3_pmu";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <3300000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcca_1v8: LDO_REG7 {
|
||||
regulator-name = "vcca_1v8";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcca1v8_pmu: LDO_REG8 {
|
||||
regulator-name = "vcca1v8_pmu";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-on-in-suspend;
|
||||
regulator-suspend-microvolt = <1800000>;
|
||||
};
|
||||
};
|
||||
|
||||
vcca1v8_image: LDO_REG9 {
|
||||
regulator-name = "vcca1v8_image";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc_3v3: SWITCH_REG1 {
|
||||
regulator-name = "vcc_3v3";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
|
||||
vcc3v3_sd: SWITCH_REG2 {
|
||||
regulator-name = "vcc3v3_sd";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
status = "okay";
|
||||
|
||||
hym8563: rtc@51 {
|
||||
compatible = "haoyu,hym8563";
|
||||
reg = <0x51>;
|
||||
#clock-cells = <0>;
|
||||
clock-output-names = "hym8563";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hym8563_int>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
|
||||
wakeup-source;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio1 {
|
||||
rgmii_phy1: ethernet-phy@1 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <1>;
|
||||
interrupt-parent = <&gpio4>;
|
||||
interrupts = <RK_PC3 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <ð_phy_reset_pin>;
|
||||
realtek,led-data = <0xae00>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie2x1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pcie_reset_h>;
|
||||
reset-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
|
||||
pcie@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
|
||||
rtl8168: pcie@1,0 {
|
||||
compatible = "pci10ec,8168";
|
||||
reg = <0x000000 0 0 0 0>;
|
||||
realtek,led-data = <0x870>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
gpio-leds {
|
||||
lan_led_pin: lan-led-pin {
|
||||
rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
power_led_pin: power-led-pin {
|
||||
rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
|
||||
wan_led_pin: wan-led-pin {
|
||||
rockchip,pins = <3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
|
||||
gmac {
|
||||
eth_phy_reset_pin: eth-phy-reset-pin {
|
||||
rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
pcie {
|
||||
pcie_reset_h: pcie-reset-h {
|
||||
rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
};
|
||||
};
|
||||
|
||||
pmic {
|
||||
pmic_int: pmic-int {
|
||||
rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
rockchip-key {
|
||||
reset_button_pin: reset-button-pin {
|
||||
rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
rtc {
|
||||
hym8563_int: hym8563-int {
|
||||
rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
};
|
||||
};
|
||||
|
||||
usb {
|
||||
vcc5v0_usb_host_en: vcc5v0-usb-host-en {
|
||||
rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pmu_io_domains {
|
||||
status = "okay";
|
||||
pmuio1-supply = <&vcc3v3_pmu>;
|
||||
pmuio2-supply = <&vcc3v3_pmu>;
|
||||
vccio1-supply = <&vccio_acodec>;
|
||||
vccio2-supply = <&vcc_1v8>;
|
||||
vccio3-supply = <&vccio_sd>;
|
||||
vccio4-supply = <&vcc_3v3>;
|
||||
vccio5-supply = <&vcc_1v8>;
|
||||
vccio6-supply = <&vcc_3v3>;
|
||||
vccio7-supply = <&vcc_3v3>;
|
||||
};
|
||||
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
max-frequency = <200000000>;
|
||||
non-removable;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdmmc0 {
|
||||
bus-width = <4>;
|
||||
cap-mmc-highspeed;
|
||||
cap-sd-highspeed;
|
||||
disable-wp;
|
||||
max-frequency = <150000000>;
|
||||
no-sdio;
|
||||
no-mmc;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
|
||||
sd-uhs-sdr50;
|
||||
vmmc-supply = <&vcc3v3_sd>;
|
||||
vqmmc-supply = <&vccio_sd>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&tsadc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy0_host {
|
||||
phy-supply = <&vcc5v0_usb>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2phy0_otg {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host0_xhci {
|
||||
extcon = <&usb2phy0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_host1_xhci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vop {
|
||||
assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
|
||||
assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&vop_mmu {
|
||||
status = "okay";
|
||||
};
|
@ -0,0 +1,73 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_SKIP_LOWLEVEL_INIT=y
|
||||
CONFIG_COUNTER_FREQUENCY=24000000
|
||||
CONFIG_ARCH_ROCKCHIP=y
|
||||
CONFIG_DEFAULT_DEVICE_TREE="rk3566-nanopi-r3s"
|
||||
CONFIG_ROCKCHIP_RK3568=y
|
||||
CONFIG_SPL_SERIAL=y
|
||||
CONFIG_DEBUG_UART_BASE=0xFE660000
|
||||
CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
CONFIG_SYS_LOAD_ADDR=0xc00800
|
||||
CONFIG_PCI=y
|
||||
CONFIG_DEBUG_UART=y
|
||||
CONFIG_FIT=y
|
||||
CONFIG_FIT_VERBOSE=y
|
||||
CONFIG_SPL_FIT_SIGNATURE=y
|
||||
CONFIG_SPL_LOAD_FIT=y
|
||||
CONFIG_LEGACY_IMAGE_FORMAT=y
|
||||
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3566-nanopi-r3s.dtb"
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
CONFIG_SPL_MAX_SIZE=0x40000
|
||||
CONFIG_SPL_PAD_TO=0x7f8000
|
||||
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
CONFIG_SPL_ATF=y
|
||||
CONFIG_CMD_GPIO=y
|
||||
CONFIG_CMD_GPT=y
|
||||
CONFIG_CMD_I2C=y
|
||||
CONFIG_CMD_MMC=y
|
||||
CONFIG_CMD_PCI=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_CMD_PMIC=y
|
||||
CONFIG_CMD_REGULATOR=y
|
||||
# CONFIG_SPL_DOS_PARTITION is not set
|
||||
CONFIG_SPL_OF_CONTROL=y
|
||||
# CONFIG_OF_UPSTREAM is not set
|
||||
CONFIG_OF_LIVE=y
|
||||
CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
CONFIG_SPL_DM_SEQ_ALIAS=y
|
||||
CONFIG_SPL_REGMAP=y
|
||||
CONFIG_SPL_SYSCON=y
|
||||
CONFIG_SPL_CLK=y
|
||||
CONFIG_ROCKCHIP_GPIO=y
|
||||
CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
CONFIG_MISC=y
|
||||
CONFIG_SUPPORT_EMMC_RPMB=y
|
||||
CONFIG_MMC_DW=y
|
||||
CONFIG_MMC_DW_ROCKCHIP=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_SDMA=y
|
||||
CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
CONFIG_PHY_REALTEK=y
|
||||
CONFIG_DWC_ETH_QOS=y
|
||||
CONFIG_DWC_ETH_QOS_ROCKCHIP=y
|
||||
CONFIG_RTL8169=y
|
||||
CONFIG_NVME_PCI=y
|
||||
CONFIG_PCIE_DW_ROCKCHIP=y
|
||||
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
|
||||
CONFIG_SPL_PINCTRL=y
|
||||
CONFIG_DM_PMIC=y
|
||||
CONFIG_PMIC_RK8XX=y
|
||||
CONFIG_REGULATOR_RK8XX=y
|
||||
CONFIG_PWM_ROCKCHIP=y
|
||||
CONFIG_SPL_RAM=y
|
||||
CONFIG_BAUDRATE=1500000
|
||||
CONFIG_DEBUG_UART_SHIFT=2
|
||||
CONFIG_SYS_NS16550_MEM32=y
|
||||
CONFIG_SYSRESET=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_DWC3=y
|
||||
CONFIG_USB_DWC3_GENERIC=y
|
||||
CONFIG_ERRNO_STR=y
|
@ -3,13 +3,14 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=cypress-firmware
|
||||
PKG_VERSION:=5.10.9-2022_0909
|
||||
PKG_VERSION_REAL:=5.10.9-2022_0909
|
||||
PKG_VERSION:=$(subst _,.,$(subst -,.,$(PKG_VERSION_REAL)))
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/Infineon/ifx-linux-firmware/
|
||||
PKG_MIRROR_HASH:=3e48063f0ee621d938cbfea24f9e5632751b6eac9fe09b0d1289181eed1ee95e
|
||||
PKG_SOURCE_VERSION:=release-v$(PKG_VERSION)
|
||||
PKG_MIRROR_HASH:=cbdd862fbaad08f5905482038e8a97fafea9bab5673d65370d90ef248c4172d1
|
||||
PKG_SOURCE_VERSION:=release-v$(PKG_VERSION_REAL)
|
||||
|
||||
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
PKG_LICENSE_FILES:=LICENCE
|
||||
|
@ -7,9 +7,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dsl_vr9_firmware_xdsl
|
||||
PKG_VERSION:=05.08.01.08.01.06_05.08.00.0B.01.01_osc
|
||||
PKG_VERSION:=05.08.01.08.01.06.05.08.00.11.01.01
|
||||
PKG_SOURCE_VERSION:=05.08.01.08.01.06_05.08.00.0B.01.01_osc
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@OPENWRT
|
||||
PKG_HASH:=44cd94130571fe42dfa8f0f9d44597d104e9e77962617fe38646b7a0b4184a2b
|
||||
PKG_BUILD_DEPENDS:=bsdiff/host
|
||||
@ -18,9 +20,9 @@ PKG_FLAGS:=nonshared
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
PKG_B_NAME:=dsl_vr9_firmware_xdsl
|
||||
PKG_B_VERSION:=05.07.09.09.00.06_05.07.04.04.00.02_osc
|
||||
PKG_B_SOURCE:=$(PKG_B_NAME)-$(PKG_B_VERSION).tar.gz
|
||||
PKG_B_VERSION:=05.07.09.09.00.06.05.07.04.04.00.02
|
||||
PKG_B_SOURCE_VERSION:=05.07.09.09.00.06_05.07.04.04.00.02_osc
|
||||
PKG_B_SOURCE:=$(PKG_NAME)-$(PKG_B_SOURCE_VERSION).tar.gz
|
||||
|
||||
ANNEX_A_VER:=581816_580B11
|
||||
ANNEX_B_VER:=579906_574402
|
||||
|
@ -2,17 +2,18 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=bcm27xx-gpu-fw
|
||||
PKG_VERSION:=2024-04-24
|
||||
PKG_RELEASE:=969420b4121b522ab33c5001074cc4c2547dafaf
|
||||
PKG_RELEASE_HASH:=969420b4121b522ab33c5001074cc4c2547dafaf
|
||||
PKG_VERSION:=2024.04.24~$(PKG_RELEASE_HASH)
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE)
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE_HASH)
|
||||
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
RPI_FIRMWARE_URL:=@GITHUB/raspberrypi/firmware/$(PKG_RELEASE)/boot/
|
||||
RPI_FIRMWARE_FILE:=rpi-firmware-$(PKG_RELEASE)
|
||||
RPI_FIRMWARE_URL:=@GITHUB/raspberrypi/firmware/$(PKG_RELEASE_HASH)/boot/
|
||||
RPI_FIRMWARE_FILE:=rpi-firmware-$(PKG_RELEASE_HASH)
|
||||
|
||||
define Download/LICENCE_broadcom
|
||||
FILE:=$(RPI_FIRMWARE_FILE)-LICENCE.broadcom
|
||||
|
@ -1829,7 +1829,7 @@ $(eval $(call KernelPackage,sfp))
|
||||
define KernelPackage/pcs-xpcs
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Synopsis DesignWare PCS driver
|
||||
DEPENDS:=@(TARGET_x86_64||TARGET_armsr_armv8) +kmod-phylink
|
||||
DEPENDS:=@(TARGET_x86_64||TARGET_armsr) +kmod-phylink
|
||||
KCONFIG:=CONFIG_PCS_XPCS
|
||||
FILES:=$(LINUX_DIR)/drivers/net/pcs/pcs_xpcs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,20,pcs_xpcs)
|
||||
@ -1841,7 +1841,7 @@ $(eval $(call KernelPackage,pcs-xpcs))
|
||||
define KernelPackage/stmmac-core
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Synopsis Ethernet Controller core (NXP,STMMicro,others)
|
||||
DEPENDS:=@TARGET_x86_64||TARGET_armsr_armv8 +kmod-pcs-xpcs +kmod-ptp
|
||||
DEPENDS:=@TARGET_x86_64||TARGET_armsr +kmod-pcs-xpcs +kmod-ptp
|
||||
KCONFIG:=CONFIG_STMMAC_ETH \
|
||||
CONFIG_STMMAC_SELFTESTS=n \
|
||||
CONFIG_STMMAC_PLATFORM \
|
||||
@ -2026,7 +2026,7 @@ $(eval $(call KernelPackage,lan743x))
|
||||
define KernelPackage/amazon-ena
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Elastic Network Adapter (for Amazon AWS)
|
||||
DEPENDS:=@TARGET_x86_64||TARGET_armsr_armv8
|
||||
DEPENDS:=@TARGET_x86_64||TARGET_armsr
|
||||
KCONFIG:=CONFIG_ENA_ETHERNET
|
||||
FILES:=$(LINUX_DIR)/drivers/net/ethernet/amazon/ena/ena.ko
|
||||
AUTOLOAD:=$(call AutoLoad,12,ena)
|
||||
|
@ -1494,6 +1494,23 @@ endef
|
||||
$(eval $(call KernelPackage,inet-diag))
|
||||
|
||||
|
||||
define KernelPackage/inet-mptcp-diag
|
||||
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||
TITLE:=INET diag support for MultiPath TCP
|
||||
DEPENDS:=@KERNEL_MPTCP +kmod-inet-diag
|
||||
KCONFIG:=CONFIG_INET_MPTCP_DIAG
|
||||
FILES:=$(LINUX_DIR)/net/mptcp/mptcp_diag.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mptcp_diag)
|
||||
endef
|
||||
|
||||
define KernelPackage/inet-mptcp-diag/description
|
||||
Support for INET (MultiPath TCP) socket monitoring interface used by
|
||||
native Linux tools such as ss.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,inet-mptcp-diag))
|
||||
|
||||
|
||||
define KernelPackage/xdp-sockets-diag
|
||||
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||
TITLE:=PF_XDP sockets monitoring interface support for ss utility
|
||||
|
@ -1,6 +1,7 @@
|
||||
PKG_DRIVERS += \
|
||||
rt2x00-lib rt2x00-pci rt2x00-usb rt2x00-mmio \
|
||||
rt2800-lib rt2800-mmio rt2800-pci rt2800-soc rt2800-usb
|
||||
rt2800-lib rt2800-mmio rt2800-pci rt2800-soc rt2800-usb \
|
||||
rt61-pci rt73-usb
|
||||
|
||||
PKG_CONFIG_DEPENDS += \
|
||||
CONFIG_PACKAGE_RT2X00_LIB_DEBUGFS \
|
||||
@ -128,4 +129,18 @@ $(call KernelPackage/rt2x00/Default)
|
||||
AUTOLOAD:=$(call AutoProbe,rt2800usb)
|
||||
endef
|
||||
|
||||
define KernelPackage/rt61-pci
|
||||
$(call KernelPackage/rt2x00/Default)
|
||||
DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci +kmod-eeprom-93cx6 +kmod-lib-crc-itu-t +rt61-pci-firmware
|
||||
TITLE+= (RT2x61 PCI)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ralink/rt2x00/rt61pci.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rt61pci)
|
||||
endef
|
||||
|
||||
define KernelPackage/rt73-usb
|
||||
$(call KernelPackage/rt2x00/Default)
|
||||
DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb +kmod-lib-crc-itu-t +rt73-usb-firmware
|
||||
TITLE+= (RT73 USB)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ralink/rt2x00/rt73usb.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rt73usb)
|
||||
endef
|
||||
|
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=adb-enablemodem
|
||||
PKG_VERSION:=2017-03-05
|
||||
PKG_VERSION:=2017.03.05
|
||||
PKG_RELEASE:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
@ -87,7 +87,8 @@ CONFIGURE_VARS += \
|
||||
CLANG="$(CLANG)" \
|
||||
BPF_TARGET="$(BPF_ARCH)-linux-gnu" \
|
||||
LLC="$(LLVM_LLC)" \
|
||||
BPF_LDFLAGS="-march=$(BPF_TARGET) -mcpu=v3"
|
||||
BPF_LDFLAGS="-march=$(BPF_TARGET) -mcpu=v3" \
|
||||
BPFTOOL=""
|
||||
|
||||
ifneq ($(findstring s,$(OPENWRT_VERBOSE)),)
|
||||
MAKE_FLAGS+=V=1
|
||||
|
@ -1,31 +0,0 @@
|
||||
From bc2a11227b5bed29d33926d5ff7e707228db9e87 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Wed, 18 Jan 2023 20:07:58 +0100
|
||||
Subject: [PATCH] headers: xdp: drop vlan_hdr as already defined
|
||||
|
||||
Drop vlan_hdr as already defined by bpf headers.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
headers/xdp/parsing_helpers.h | 10 ----------
|
||||
1 file changed, 10 deletions(-)
|
||||
|
||||
--- a/headers/xdp/parsing_helpers.h
|
||||
+++ b/headers/xdp/parsing_helpers.h
|
||||
@@ -33,16 +33,6 @@ struct hdr_cursor {
|
||||
};
|
||||
|
||||
/*
|
||||
- * struct vlan_hdr - vlan header
|
||||
- * @h_vlan_TCI: priority and VLAN ID
|
||||
- * @h_vlan_encapsulated_proto: packet type ID or len
|
||||
- */
|
||||
-struct vlan_hdr {
|
||||
- __be16 h_vlan_TCI;
|
||||
- __be16 h_vlan_encapsulated_proto;
|
||||
-};
|
||||
-
|
||||
-/*
|
||||
* Struct icmphdr_common represents the common part of the icmphdr and icmp6hdr
|
||||
* structures.
|
||||
*/
|
@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL=https://gitlab.alpinelinux.org/alpine/apk-tools.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2024-08-06
|
||||
PKG_SOURCE_VERSION:=54caa31be633efc5f655700b77af290124f71689
|
||||
PKG_MIRROR_HASH:=f3be762deac4f1469a4a2839691175e78019cb44295089befafa279a3390067c
|
||||
PKG_SOURCE_DATE:=2024-10-28
|
||||
PKG_SOURCE_VERSION:=a1ad8568a1378d71c1f6354c428ebb1baa46fa05
|
||||
PKG_MIRROR_HASH:=68747e1253776dc00286c01e408f4c4e1eb61acf56009b7ecb3de4d49b34e567
|
||||
|
||||
PKG_VERSION=3.0.0_pre$(subst -,,$(PKG_SOURCE_DATE))
|
||||
|
||||
@ -54,6 +54,7 @@ MESON_VARS+=VERSION=$(PKG_VERSION)
|
||||
MESON_HOST_ARGS += \
|
||||
-Dcompressed-help=false \
|
||||
-Ddocs=disabled \
|
||||
-Durl_backend=wget \
|
||||
-Dcrypto_backend=openssl \
|
||||
-Dzstd=false
|
||||
|
||||
|
@ -10,7 +10,7 @@ Signed-off-by: Paul Spooren <mail@aparcar.org>
|
||||
|
||||
--- a/src/database.c
|
||||
+++ b/src/database.c
|
||||
@@ -1643,7 +1643,7 @@ const char *apk_db_layer_name(int layer)
|
||||
@@ -1626,7 +1626,7 @@ const char *apk_db_layer_name(int layer)
|
||||
{
|
||||
switch (layer) {
|
||||
case APK_DB_LAYER_ROOT: return "lib/apk/db";
|
||||
|
@ -0,0 +1,29 @@
|
||||
From ffcda7769279e75993110766555eea6d3c6baae7 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Fri, 25 Oct 2024 01:09:41 +0200
|
||||
Subject: [PATCH] apk_defines: add default arch for ARM Big-Endian
|
||||
|
||||
Add default arch for ARM Big-Endiang named armeb. One example of such
|
||||
target are devices based on the Intel XScale IXP4xx SoC.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
---
|
||||
src/apk_defines.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/apk_defines.h b/src/apk_defines.h
|
||||
index c92dacd..06351df 100644
|
||||
--- a/src/apk_defines.h
|
||||
+++ b/src/apk_defines.h
|
||||
@@ -126,6 +126,8 @@ static inline int IS_ERR(const void *ptr) { return (unsigned long)ptr >= (unsign
|
||||
#define APK_DEFAULT_BASE_ARCH "armhf"
|
||||
#elif defined(__arm__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
#define APK_DEFAULT_BASE_ARCH "armel"
|
||||
+#elif defined(__arm__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
+#define APK_DEFAULT_BASE_ARCH "armeb"
|
||||
#elif defined(__aarch64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
#define APK_DEFAULT_BASE_ARCH "aarch64"
|
||||
#elif defined(__s390x__)
|
||||
--
|
||||
2.45.2
|
||||
|
@ -2,16 +2,14 @@ include $(TOPDIR)/rules.mk
|
||||
#Based on adb package from AUR https://aur.archlinux.org/packages/adb/ , reused Makefile
|
||||
|
||||
PKG_NAME:=adb
|
||||
PKG_VERSION:=android.5.0.2_r1
|
||||
PKG_SOURCE_VERSION:=6fe92d1a3fb17545d82d020a3c995f32e6b71f9d
|
||||
PKG_VERSION:=5.0.2~$(call version_abbrev,$(PKG_SOURCE_VERSION))
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://android.googlesource.com/platform/system/core
|
||||
PKG_SOURCE_VERSION:=6fe92d1a3fb17545d82d020a3c995f32e6b71f9d
|
||||
PKG_MIRROR_HASH:=a9b4b86602dfc0d4fc9e1d0f78dc83e648a931fb04f5a4be9b1f0054a8cebf7e
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.xz
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
|
||||
PKG_MIRROR_HASH:=2ff96b4342cd05f475083207a4927635548c6693771c12a24cfa99f175fdb10a
|
||||
|
||||
PKG_MAINTAINER:=Henryk Heisig <hyniu@o2.pl>
|
||||
PKG_CPE_ID:=cpe:/a:google:android_debug_bridge
|
||||
|
||||
|
@ -3,13 +3,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bcm27xx-utils
|
||||
PKG_VERSION:=2024-04-24
|
||||
PKG_VERSION:=2024.10.25
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/raspberrypi/utils.git
|
||||
PKG_SOURCE_VERSION:=451b9881b72cb994c102724b5a7d9b93f97dc315
|
||||
PKG_MIRROR_HASH:=b453976171187e0ffe7cacfdcab36cec6b5d02db8b6d978cb9afbbcafcfcff9d
|
||||
PKG_SOURCE_VERSION:=6a2a6becebbc38fde34a94386457ac8210f9119b
|
||||
PKG_MIRROR_HASH:=a775c7ffb9fac2d798ec8e0a4c7707eb7133cbc9c4418a1cf9434f87c42c01bb
|
||||
|
||||
PKG_FLAGS:=nonshared
|
||||
PKG_BUILD_FLAGS:=no-lto
|
||||
@ -46,6 +46,8 @@ define Package/bcm27xx-utils/install
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/eepflash.sh $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/eepmake $(1)/usr/bin
|
||||
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kdtc $(1)/usr/bin
|
||||
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/otpset $(1)/usr/bin
|
||||
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/overlaycheck $(1)/usr/bin
|
||||
|
@ -242,6 +242,15 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
else
|
||||
echo "vcdbg not found"
|
||||
fi
|
||||
@@ -275,7 +111,7 @@ echo "dmesg log"
|
||||
echo "---------"
|
||||
echo
|
||||
|
||||
-sudo dmesg | sed -e "s/\([0-9a-fA-F]\{1,4\}:\)\{7,7\}[0-9a-fA-F]\{1,4\}/y.y.y.y.y.y.y.y/g" | sed -e "s/[0-9a-fA-F]\{1,4\}:\(:[0-9a-fA-F]\{1,4\}\)\{1,4\}/y::y.y.y.y/g" | sed -e "s/\([0-9a-fA-F]\{2,2\}\:\)\{5,5\}[0-9a-fA-F]\{2,2\}/m.m.m.m/g"
|
||||
+dmesg | sed -e "s/\([0-9a-fA-F]\{1,4\}:\)\{7,7\}[0-9a-fA-F]\{1,4\}/y.y.y.y.y.y.y.y/g" | sed -e "s/[0-9a-fA-F]\{1,4\}:\(:[0-9a-fA-F]\{1,4\}\)\{1,4\}/y::y.y.y.y/g" | sed -e "s/\([0-9a-fA-F]\{2,2\}\:\)\{5,5\}[0-9a-fA-F]\{2,2\}/m.m.m.m/g"
|
||||
|
||||
|
||||
if grep -q "^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]1[13457][0-9a-fA-F]$" /proc/cpuinfo
|
||||
@@ -284,5 +120,9 @@ echo
|
||||
echo "EEPROM"
|
||||
echo "------"
|
||||
|
@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=https://github.com/wigyori/dns320l-daemon.git
|
||||
PKG_SOURCE_DATE:=2024-05-11
|
||||
PKG_SOURCE_VERSION:=c74941880e0a8d2bc0344b3256b984397512e8c3
|
||||
PKG_MIRROR_HASH:=e0f186a0c139ccfac3d311f49e2fecdbd02fa3f9fe6ced4b1ce0baa603d49fc3
|
||||
PKG_SOURCE_DATE:=2024-10-27
|
||||
PKG_SOURCE_VERSION:=d9a2878a525f61fe9070a9f03eb67e5113a69a4f
|
||||
PKG_MIRROR_HASH:=5f769253d63f8da1cc0cefd86159bafb4e4f8a54c26a0cbf254ee4d1c53f79bf
|
||||
PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
|
||||
PKG_LICENSE:=GPL-3.0+
|
||||
|
||||
|
@ -8,12 +8,14 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=omnia-mcutool
|
||||
PKG_VERSION:=0.3-rc3
|
||||
PKG_VERSION_REAL:=0.3-rc3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/$(PKG_NAME)/-/archive/$(PKG_VERSION)/
|
||||
PKG_HASH:=80bc6a01ab86d51ebfdbddf77d74eead999a9bf7dbd08ca1fd4e8e1910eaf192
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=https://gitlab.nic.cz/turris/$(PKG_NAME)
|
||||
PKG_SOURCE_DATE:=2024-08-05
|
||||
PKG_SOURCE_VERSION:=3833ade1377076a5c8e394d7afe7679716af0107
|
||||
PKG_MIRROR_HASH:=63cfaa388cffc8a5a7d08c14d6428d1bb33ae7aebf62a1764fd57f8bc94f9144
|
||||
|
||||
PKG_MAINTAINER:=Marek Mojik <marek.mojik@nic.cz>
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
@ -41,7 +43,7 @@ define Build/Compile
|
||||
CC="$(TARGET_CC)" \
|
||||
CFLAGS="$(TARGET_CFLAGS) -Wall" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
MCUTOOL_VERSION="$(PKG_VERSION)"
|
||||
MCUTOOL_VERSION="$(PKG_VERSION_REAL)"
|
||||
endef
|
||||
|
||||
define Package/omnia-mcutool/install
|
||||
|
4
rules.mk
4
rules.mk
@ -141,8 +141,8 @@ ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_TARGET_uml)),)
|
||||
iremap = -f$(if $(CONFIG_REPRODUCIBLE_DEBUG_INFO),file,macro)-prefix-map=$(1)=$(2)
|
||||
endif
|
||||
|
||||
PACKAGE_DIR:=$(BIN_DIR)/packages
|
||||
PACKAGE_DIR_ALL:=$(TOPDIR)/staging_dir/packages/$(BOARD)
|
||||
PACKAGE_DIR?=$(BIN_DIR)/packages
|
||||
PACKAGE_DIR_ALL?=$(TOPDIR)/staging_dir/packages/$(BOARD)
|
||||
BUILD_DIR:=$(BUILD_DIR_BASE)/$(TARGET_DIR_NAME)
|
||||
STAGING_DIR:=$(TOPDIR)/staging_dir/$(TARGET_DIR_NAME)
|
||||
BUILD_DIR_TOOLCHAIN:=$(BUILD_DIR_BASE)/$(TOOLCHAIN_DIR_NAME)
|
||||
|
@ -146,7 +146,7 @@ sub merge_package_lists($$) {
|
||||
my %pkgs;
|
||||
|
||||
foreach my $pkg (@$list1, @$list2) {
|
||||
$pkgs{$pkg} = 1;
|
||||
$pkgs{$pkg =~ s/^~//r} = 1;
|
||||
}
|
||||
foreach my $pkg (keys %pkgs) {
|
||||
push @l, $pkg unless ($pkg =~ /^-/ or $pkgs{"-$pkg"});
|
||||
|
@ -48,6 +48,7 @@ ifneq ($(CONFIG_USE_APK),)
|
||||
$(call FeedSourcesAppendAPK,$(PKG_BUILD_DIR)/repositories)
|
||||
$(VERSION_SED_SCRIPT) $(PKG_BUILD_DIR)/repositories
|
||||
endif
|
||||
echo "packages/packages.adb" >> $(PKG_BUILD_DIR)/repositories
|
||||
|
||||
$(INSTALL_DATA) ./files/README.apk.md $(PKG_BUILD_DIR)/packages/README.md
|
||||
else
|
||||
@ -70,7 +71,7 @@ endif
|
||||
ifeq ($(CONFIG_BUILDBOT),)
|
||||
ifeq ($(CONFIG_IB_STANDALONE),)
|
||||
$(FIND) $(call FeedPackageDir,libc) -type f \
|
||||
\( -name 'libc_*.$(PACKAGE_SUFFIX)' -or -name 'kernel_*.$(PACKAGE_SUFFIX)' -or -name 'kmod-*.$(PACKAGE_SUFFIX)' \) \
|
||||
\( -name 'libc*.$(PACKAGE_SUFFIX)' -or -name 'kernel*.$(PACKAGE_SUFFIX)' -or -name 'kmod-*.$(PACKAGE_SUFFIX)' \) \
|
||||
-exec $(CP) -t $(PKG_BUILD_DIR)/packages {} +
|
||||
else
|
||||
$(FIND) $(wildcard $(PACKAGE_SUBDIRS)) -type f -name '*.$(PACKAGE_SUFFIX)' \
|
||||
@ -78,17 +79,20 @@ ifeq ($(CONFIG_BUILDBOT),)
|
||||
endif
|
||||
else
|
||||
$(FIND) $(call FeedPackageDir,libc) -type f \
|
||||
\( -name 'libc_*.$(PACKAGE_SUFFIX)' -or -name 'kernel_*.$(PACKAGE_SUFFIX)' \) \
|
||||
\( -name 'libc*.$(PACKAGE_SUFFIX)' -or -name 'kernel*.$(PACKAGE_SUFFIX)' \) \
|
||||
-exec $(CP) -t $(IB_LDIR)/ {} +
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_USE_APK),y)
|
||||
ifneq ($(CONFIG_SIGNATURE_CHECK),)
|
||||
ifneq ($(CONFIG_USE_APK),y)
|
||||
echo '' >> $(PKG_BUILD_DIR)/repositories.conf
|
||||
echo 'option check_signature' >> $(PKG_BUILD_DIR)/repositories.conf
|
||||
$(INSTALL_DIR) $(PKG_BUILD_DIR)/keys
|
||||
$(CP) -L $(STAGING_DIR_ROOT)/etc/opkg/keys/ $(PKG_BUILD_DIR)/
|
||||
$(CP) -L $(STAGING_DIR_ROOT)/usr/sbin/opkg-key $(PKG_BUILD_DIR)/scripts/
|
||||
else
|
||||
$(INSTALL_DIR) $(PKG_BUILD_DIR)/keys
|
||||
$(CP) -L $(STAGING_DIR_ROOT)/etc/apk/keys/ $(PKG_BUILD_DIR)/
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -83,9 +83,11 @@ help: FORCE
|
||||
|
||||
|
||||
# override variables from rules.mk
|
||||
PACKAGE_DIR:=$(TOPDIR)/packages
|
||||
BUILD_KEY_APK_SEC=$(TOPDIR)/keys/local-private-key.pem
|
||||
BUILD_KEY_APK_PUB=$(TOPDIR)/keys/local-public-key.pem
|
||||
export PACKAGE_DIR:=$(TOPDIR)/packages
|
||||
LISTS_DIR:=$(subst $(space),/,$(patsubst %,..,$(subst /,$(space),$(TARGET_DIR))))$(DL_DIR)
|
||||
PACKAGE_DIR_ALL:=$(TOPDIR)/packages
|
||||
export PACKAGE_DIR_ALL:=$(TOPDIR)/packages
|
||||
|
||||
export OPKG_KEYS:=$(TOPDIR)/keys
|
||||
OPKG:=$(call opkg,$(TARGET_DIR)) \
|
||||
@ -94,9 +96,11 @@ OPKG:=$(call opkg,$(TARGET_DIR)) \
|
||||
--cache $(DL_DIR) \
|
||||
--lists-dir $(LISTS_DIR)
|
||||
|
||||
export APK_KEYS:=$(TOPDIR)/keys
|
||||
APK:=$(call apk,$(TARGET_DIR)) \
|
||||
--cache-dir $(DL_DIR) \
|
||||
--allow-untrusted
|
||||
--repositories-file $(TOPDIR)/repositories \
|
||||
$(if $(CONFIG_SIGNATURE_CHECK),,--allow-untrusted) \
|
||||
--cache-dir $(DL_DIR)
|
||||
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
@ -177,7 +181,11 @@ ifeq ($(CONFIG_USE_APK),)
|
||||
) >/dev/null 2>/dev/null
|
||||
$(OPKG) update >&2 || true
|
||||
else
|
||||
(cd $(PACKAGE_DIR); $(APK) mkndx --output packages.adb *.apk) >&2
|
||||
$(APK) add --initdb
|
||||
(cd $(PACKAGE_DIR); $(APK) mkndx \
|
||||
$(if $(CONFIG_SIGNATURE_CHECK), --keys-dir $(APK_KEYS) --sign $(BUILD_KEY_APK_SEC)) \
|
||||
--allow-untrusted --output packages.adb *.apk) >/dev/null 2>/dev/null || true
|
||||
$(APK) update >&2 || true
|
||||
endif
|
||||
|
||||
package_reload:
|
||||
@ -220,8 +228,8 @@ ifeq ($(CONFIG_USE_APK),)
|
||||
$(OPKG) install $(firstword $(wildcard $(LINUX_DIR)/kernel_*.ipk $(PACKAGE_DIR)/kernel_*.ipk))
|
||||
$(OPKG) install $(BUILD_PACKAGES)
|
||||
else
|
||||
$(APK) add --initdb --no-scripts $(firstword $(wildcard $(LINUX_DIR)/libc-*.apk $(PACKAGE_DIR)/libc_*.apk))
|
||||
$(APK) add --no-scripts $(firstword $(wildcard $(LINUX_DIR)/kernel-*.apk $(PACKAGE_DIR)/kernel_*.apk))
|
||||
$(APK) add --no-scripts $(firstword $(wildcard $(LINUX_DIR)/libc-*.apk $(PACKAGE_DIR)/libc-*.apk))
|
||||
$(APK) add --no-scripts $(firstword $(wildcard $(LINUX_DIR)/kernel-*.apk $(PACKAGE_DIR)/kernel-*.apk))
|
||||
$(APK) add --no-scripts $(BUILD_PACKAGES)
|
||||
endif
|
||||
|
||||
@ -237,6 +245,13 @@ ifeq ($(CONFIG_USE_APK),)
|
||||
$(SCRIPT_DIR)/opkg-key add $(BUILD_KEY).pub \
|
||||
) \
|
||||
)
|
||||
else
|
||||
$(if $(CONFIG_SIGNATURE_CHECK), \
|
||||
$(if $(ADD_LOCAL_KEY), \
|
||||
mkdir -p $(TARGET_DIR)/etc/opkg/keys/; \
|
||||
cp $(BUILD_KEY_APK_PUB) $(TARGET_DIR)/etc/apk/keys/; \
|
||||
) \
|
||||
)
|
||||
endif
|
||||
$(call prepare_rootfs,$(TARGET_DIR),$(USER_FILES),$(DISABLED_SERVICES))
|
||||
|
||||
@ -284,8 +299,8 @@ ifneq ($(PROFILE),)
|
||||
endif
|
||||
|
||||
_check_keys: FORCE
|
||||
ifeq ($(CONFIG_USE_APK),)
|
||||
ifneq ($(CONFIG_SIGNATURE_CHECK),)
|
||||
ifeq ($(CONFIG_USE_APK),)
|
||||
@if [ ! -s $(BUILD_KEY) -o ! -s $(BUILD_KEY).pub ]; then \
|
||||
echo Generate local signing keys... >&2; \
|
||||
$(STAGING_DIR_HOST)/bin/usign -G \
|
||||
@ -299,9 +314,15 @@ ifneq ($(CONFIG_SIGNATURE_CHECK),)
|
||||
-p $(BUILD_KEY).pub \
|
||||
-s $(BUILD_KEY); \
|
||||
fi
|
||||
endif
|
||||
else
|
||||
# TODO
|
||||
@if [ ! -s $(BUILD_KEY_APK_SEC) -o ! -s $(BUILD_KEY_APK_PUB) ]; then \
|
||||
echo Generate local signing keys... >&2; \
|
||||
$(STAGING_DIR_HOST)/bin/openssl ecparam -name prime256v1 -genkey -noout -out $(BUILD_KEY_APK_SEC); \
|
||||
sed -i '1s/^/untrusted comment: Local build key\n/' $(BUILD_KEY_APK_SEC); \
|
||||
$(STAGING_DIR_HOST)/bin/openssl ec -in $(BUILD_KEY_APK_SEC) -pubout > $(BUILD_KEY_APK_PUB); \
|
||||
sed -i '1s/^/untrusted comment: Local build key\n/' $(BUILD_KEY_APK_PUB); \
|
||||
fi
|
||||
endif
|
||||
endif
|
||||
|
||||
image:
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 9dbd16ac89e00bd8640ecac3971b0943410b5cec Mon Sep 17 00:00:00 2001
|
||||
From 5c5db81bff81a0fcd9ad998543d4241cbfe4742f Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Sat, 6 Jul 2024 01:15:24 +0200
|
||||
Subject: [PATCH 2/2] hwrng: add support for Airoha EN7581 TRNG
|
||||
Date: Thu, 17 Oct 2024 14:44:38 +0200
|
||||
Subject: [PATCH 2/2] hwrng: airoha - add support for Airoha EN7581 TRNG
|
||||
|
||||
Add support for Airoha TRNG. The Airoha SoC provide a True RNG module
|
||||
that can output 4 bytes of raw data at times.
|
||||
@ -17,6 +17,8 @@ mutually exclusive, running as TRNG doesn't permit to also run it as
|
||||
DRBG.
|
||||
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Reviewed-by: Martin Kaiser <martin@kaiser.cx>
|
||||
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
---
|
||||
drivers/char/hw_random/Kconfig | 13 ++
|
||||
drivers/char/hw_random/Makefile | 1 +
|
||||
@ -65,13 +67,13 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/mod_devicetable.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/bitfield.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/hw_random.h>
|
||||
+#include <linux/interrupt.h>
|
||||
+#include <linux/io.h>
|
||||
+#include <linux/iopoll.h>
|
||||
+#include <linux/interrupt.h>
|
||||
+#include <linux/hw_random.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/delay.h>
|
||||
+
|
||||
+#define TRNG_IP_RDY 0x800
|
||||
+#define CNT_TRANS GENMASK(15, 8)
|
@ -110,11 +110,11 @@ define Device/generic
|
||||
DEVICE_PACKAGES += kmod-amazon-ena kmod-e1000e kmod-vmxnet3 kmod-rtc-rx8025 \
|
||||
kmod-i2c-mux-pca954x kmod-gpio-pca953x partx-utils kmod-wdt-sp805 \
|
||||
kmod-mvneta kmod-mvpp2 kmod-fsl-dpaa1-net kmod-fsl-dpaa2-net \
|
||||
kmod-fsl-enetc-net kmod-dwmac-imx kmod-fsl-fec kmod-thunderx-net \
|
||||
kmod-fsl-enetc-net kmod-dwmac-imx kmod-fsl-fec \
|
||||
kmod-dwmac-rockchip kmod-dwmac-sun8i kmod-phy-aquantia kmod-phy-broadcom \
|
||||
kmod-phy-marvell kmod-phy-marvell-10g kmod-sfp kmod-atlantic \
|
||||
kmod-bcmgenet kmod-octeontx2-net kmod-renesas-net-avb \
|
||||
kmod-phy-realtek kmod-phy-smsc
|
||||
kmod-phy-realtek kmod-phy-smsc $(if $(CONFIG_aarch64),kmod-thunderx-net)
|
||||
endef
|
||||
TARGET_DEVICES += generic
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
define KernelPackage/acpi-mdio
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=ACPI MDIO support
|
||||
DEPENDS:=@(TARGET_armsr_armv8) +kmod-libphy +kmod-mdio-devres
|
||||
DEPENDS:=@TARGET_armsr +kmod-libphy +kmod-mdio-devres
|
||||
KCONFIG:=CONFIG_ACPI_MDIO
|
||||
FILES:=$(LINUX_DIR)/drivers/net/mdio/acpi_mdio.ko
|
||||
AUTOLOAD:=$(call AutoLoad,11,acpi_mdio)
|
||||
@ -15,7 +15,7 @@ $(eval $(call KernelPackage,acpi-mdio))
|
||||
|
||||
define KernelPackage/bcmgenet
|
||||
SUBMENU=$(NETWORK_DEVICES_MENU)
|
||||
DEPENDS:=@(TARGET_armsr_armv8) +kmod-mdio-bcm-unimac
|
||||
DEPENDS:=@TARGET_armsr +kmod-mdio-bcm-unimac
|
||||
TITLE:=Broadcom GENET internal MAC (Raspberry Pi 4)
|
||||
KCONFIG:=CONFIG_BCMGENET
|
||||
FILES=$(LINUX_DIR)/drivers/net/ethernet/broadcom/genet/genet.ko
|
||||
@ -26,7 +26,7 @@ $(eval $(call KernelPackage,bcmgenet))
|
||||
|
||||
define KernelPackage/mdio-bcm-unimac
|
||||
SUBMENU=$(NETWORK_DEVICES_MENU)
|
||||
DEPENDS:=@(TARGET_armsr_armv8) +kmod-of-mdio
|
||||
DEPENDS:=@TARGET_armsr +kmod-of-mdio
|
||||
TITLE:=Broadcom UniMAC MDIO bus controller
|
||||
KCONFIG:=CONFIG_MDIO_BCM_UNIMAC
|
||||
FILES=$(LINUX_DIR)/drivers/net/mdio/mdio-bcm-unimac.ko
|
||||
@ -37,7 +37,7 @@ $(eval $(call KernelPackage,mdio-bcm-unimac))
|
||||
|
||||
define KernelPackage/fsl-pcs-lynx
|
||||
SUBMENU=$(NETWORK_DEVICES_MENU)
|
||||
DEPENDS:=@(TARGET_armsr_armv8) +kmod-libphy +kmod-of-mdio +kmod-phylink
|
||||
DEPENDS:=@TARGET_armsr +kmod-libphy +kmod-of-mdio +kmod-phylink
|
||||
TITLE:=NXP (Freescale) Lynx PCS
|
||||
HIDDEN:=1
|
||||
KCONFIG:=CONFIG_PCS_LYNX
|
||||
@ -49,7 +49,7 @@ $(eval $(call KernelPackage,fsl-pcs-lynx))
|
||||
|
||||
define KernelPackage/fsl-fec
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
DEPENDS:=@(TARGET_armsr_armv8) +kmod-libphy +kmod-of-mdio \
|
||||
DEPENDS:=@TARGET_armsr +kmod-libphy +kmod-of-mdio \
|
||||
+kmod-ptp +kmod-net-selftests
|
||||
TITLE:=NXP (Freescale) FEC Ethernet controller (i.MX)
|
||||
KCONFIG:=CONFIG_FEC
|
||||
@ -61,7 +61,7 @@ $(eval $(call KernelPackage,fsl-fec))
|
||||
|
||||
define KernelPackage/fsl-xgmac-mdio
|
||||
SUBMENU=$(NETWORK_DEVICES_MENU)
|
||||
DEPENDS:=@(TARGET_armsr_armv8) +kmod-libphy +kmod-of-mdio +kmod-acpi-mdio
|
||||
DEPENDS:=@TARGET_armsr +kmod-libphy +kmod-of-mdio +kmod-acpi-mdio
|
||||
TITLE:=NXP (Freescale) MDIO bus
|
||||
KCONFIG:=CONFIG_FSL_XGMAC_MDIO
|
||||
FILES=$(LINUX_DIR)/drivers/net/ethernet/freescale/xgmac_mdio.ko
|
||||
@ -85,7 +85,7 @@ $(eval $(call KernelPackage,fsl-mc-dpio))
|
||||
define KernelPackage/fsl-enetc-net
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=:NXP ENETC (LS1028A) Ethernet
|
||||
DEPENDS:=@(TARGET_armsr_armv8) +kmod-phylink +kmod-fsl-pcs-lynx
|
||||
DEPENDS:=@TARGET_armsr +kmod-phylink +kmod-fsl-pcs-lynx
|
||||
KCONFIG:= \
|
||||
CONFIG_FSL_ENETC \
|
||||
CONFIG_FSL_ENETC_VF \
|
||||
@ -104,7 +104,7 @@ $(eval $(call KernelPackage,fsl-enetc-net))
|
||||
define KernelPackage/fsl-dpaa1-net
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=NXP DPAA1 (LS1043/LS1046) Ethernet
|
||||
DEPENDS:=@(TARGET_armsr_armv8) +kmod-fsl-xgmac-mdio +kmod-libphy +kmod-crypto-crc32
|
||||
DEPENDS:=@TARGET_armsr +kmod-fsl-xgmac-mdio +kmod-libphy +kmod-crypto-crc32
|
||||
KCONFIG:= \
|
||||
CONFIG_FSL_DPAA=y \
|
||||
CONFIG_FSL_DPAA_ETH \
|
||||
@ -124,7 +124,7 @@ $(eval $(call KernelPackage,fsl-dpaa1-net))
|
||||
define KernelPackage/fsl-dpaa2-net
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=NXP DPAA2 Ethernet
|
||||
DEPENDS:=@(TARGET_armsr_armv8) +kmod-fsl-xgmac-mdio +kmod-phylink \
|
||||
DEPENDS:=@TARGET_armsr +kmod-fsl-xgmac-mdio +kmod-phylink \
|
||||
+kmod-fsl-pcs-lynx +kmod-fsl-mc-dpio
|
||||
KCONFIG:= \
|
||||
CONFIG_FSL_MC_UAPI_SUPPORT=y \
|
||||
@ -139,7 +139,7 @@ $(eval $(call KernelPackage,fsl-dpaa2-net))
|
||||
define KernelPackage/fsl-dpaa2-console
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=NXP DPAA2 Debug console
|
||||
DEPENDS:=@(TARGET_armsr_armv8)
|
||||
DEPENDS:=@TARGET_armsr
|
||||
KCONFIG:=CONFIG_DPAA2_CONSOLE
|
||||
FILES=$(LINUX_DIR)/drivers/soc/fsl/dpaa2-console.ko
|
||||
AUTOLOAD=$(call AutoLoad,40,dpaa2-console)
|
||||
@ -155,7 +155,7 @@ $(eval $(call KernelPackage,fsl-dpaa2-console))
|
||||
define KernelPackage/marvell-mdio
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Marvell Armada platform MDIO driver
|
||||
DEPENDS:=@(TARGET_armsr_armv8) +kmod-libphy +kmod-of-mdio +kmod-acpi-mdio
|
||||
DEPENDS:=@TARGET_armsr +kmod-libphy +kmod-of-mdio +kmod-acpi-mdio
|
||||
KCONFIG:=CONFIG_MVMDIO
|
||||
FILES=$(LINUX_DIR)/drivers/net/ethernet/marvell/mvmdio.ko
|
||||
AUTOLOAD=$(call AutoLoad,30,marvell-mdio)
|
||||
@ -166,7 +166,7 @@ $(eval $(call KernelPackage,marvell-mdio))
|
||||
define KernelPackage/mvneta
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Marvell Armada 370/38x/XP/37xx network driver
|
||||
DEPENDS:=@(TARGET_armsr_armv8) +kmod-marvell-mdio +kmod-phylink
|
||||
DEPENDS:=@TARGET_armsr +kmod-marvell-mdio +kmod-phylink
|
||||
KCONFIG:=CONFIG_MVNETA
|
||||
FILES:=$(LINUX_DIR)/drivers/net/ethernet/marvell/mvneta.ko
|
||||
AUTOLOAD=$(call AutoLoad,30,mvneta)
|
||||
@ -177,7 +177,7 @@ $(eval $(call KernelPackage,mvneta))
|
||||
define KernelPackage/mvpp2
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Marvell Armada 375/7K/8K network driver
|
||||
DEPENDS:=@(TARGET_armsr_armv8) +kmod-marvell-mdio +kmod-phylink
|
||||
DEPENDS:=@TARGET_armsr +kmod-marvell-mdio +kmod-phylink
|
||||
KCONFIG:=CONFIG_MVPP2 \
|
||||
CONFIG_MVPP2_PTP=n
|
||||
FILES=$(LINUX_DIR)/drivers/net/ethernet/marvell/mvpp2/mvpp2.ko
|
||||
@ -242,7 +242,7 @@ $(eval $(call KernelPackage,dwmac-rockchip))
|
||||
define KernelPackage/mdio-thunder
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Marvell (Cavium) Thunder MDIO controller
|
||||
DEPENDS:=@(TARGET_armsr_armv8) +kmod-of-mdio
|
||||
DEPENDS:=@TARGET_armsr +kmod-of-mdio
|
||||
KCONFIG:=CONFIG_MDIO_THUNDER
|
||||
FILES=$(LINUX_DIR)/drivers/net/mdio/mdio-cavium.ko \
|
||||
$(LINUX_DIR)/drivers/net/mdio/mdio-thunder.ko
|
||||
@ -254,7 +254,7 @@ $(eval $(call KernelPackage,mdio-thunder))
|
||||
define KernelPackage/thunderx-net
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Marvell (Cavium) Thunder network drivers
|
||||
DEPENDS:=@(TARGET_armsr_armv8) +kmod-phylink +kmod-mdio-thunder
|
||||
DEPENDS:=@TARGET_armsr_armv8 +kmod-phylink +kmod-mdio-thunder
|
||||
KCONFIG:=CONFIG_NET_VENDOR_CAVIUM \
|
||||
CONFIG_THUNDER_NIC_PF \
|
||||
CONFIG_THUNDER_NIC_VF \
|
||||
@ -272,7 +272,7 @@ $(eval $(call KernelPackage,thunderx-net))
|
||||
define KernelPackage/octeontx2-net
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Marvell (Cavium) ThunderX2 network drivers
|
||||
DEPENDS:=@(TARGET_armsr_armv8) +kmod-phylink +kmod-of-mdio +kmod-macsec \
|
||||
DEPENDS:=@TARGET_armsr +kmod-phylink +kmod-of-mdio +kmod-macsec \
|
||||
+kmod-ptp
|
||||
KCONFIG:=CONFIG_OCTEONTX2_MBOX \
|
||||
CONFIG_OCTEONTX2_AF \
|
||||
@ -291,7 +291,7 @@ $(eval $(call KernelPackage,octeontx2-net))
|
||||
define KernelPackage/renesas-net-avb
|
||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||
TITLE:=Renesas network drivers
|
||||
DEPENDS:=@(TARGET_armsr_armv8) +kmod-phylink +kmod-mii +kmod-ptp +kmod-libphy +kmod-mdio-gpio
|
||||
DEPENDS:=@TARGET_armsr +kmod-phylink +kmod-mii +kmod-ptp +kmod-libphy +kmod-mdio-gpio
|
||||
KCONFIG:=CONFIG_RAVB
|
||||
FILES=$(LINUX_DIR)/drivers/net/ethernet/renesas/ravb.ko
|
||||
AUTOLOAD:=$(call AutoProbe,ravb)
|
||||
|
@ -684,7 +684,7 @@ define Device/tplink_tl-wdr6500-v2
|
||||
SOC := qca9561
|
||||
DEVICE_MODEL := TL-WDR6500
|
||||
DEVICE_VARIANT := v2
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev \
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport \
|
||||
kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct
|
||||
IMAGE_SIZE := 8000k
|
||||
KERNEL := kernel-bin | append-dtb | lzma | uImage lzma
|
||||
|
@ -424,8 +424,7 @@ define Device/meraki_mx6x
|
||||
KERNEL_IN_UBI := 1
|
||||
KERNEL_LOADADDR := 0x60008000
|
||||
DEVICE_PACKAGES := -oseama kmod-leds-pwm kmod-usb-ehci \
|
||||
kmod-usb-ohci kmod-usb2 \
|
||||
kmod-ledtrig-default-on kmod-ledtrig-netdev
|
||||
kmod-usb-ohci kmod-usb2
|
||||
DEVICE_VENDOR := Cisco Meraki
|
||||
KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
|
||||
KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 69cb89981c7a181d857b634c0740e914d5df79ea Mon Sep 17 00:00:00 2001
|
||||
From: ChunHao Lin <hau@realtek.com>
|
||||
Date: Fri, 30 Aug 2024 10:18:10 +0800
|
||||
Subject: [PATCH 43/47] r8169: add support for RTL8126A rev.b
|
||||
Subject: [PATCH] r8169: add support for RTL8126A rev.b
|
||||
|
||||
Add support for RTL8126A rev.b. Its XID is 0x64a. It is basically
|
||||
based on the one with XID 0x649, but with different firmware file.
|
||||
|
@ -1,8 +1,7 @@
|
||||
From 3b067536daa4842adbf685accf47c899a26367d3 Mon Sep 17 00:00:00 2001
|
||||
From: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Date: Wed, 18 Sep 2024 20:45:15 +0200
|
||||
Subject: [PATCH 47/47] r8169: add missing MODULE_FIRMWARE entry for RTL8126A
|
||||
rev.b
|
||||
Subject: [PATCH] r8169: add missing MODULE_FIRMWARE entry for RTL8126A rev.b
|
||||
|
||||
Add a missing MODULE_FIRMWARE entry.
|
||||
|
@ -0,0 +1,39 @@
|
||||
From 10ce0db787004875f4dba068ea952207d1d8abeb Mon Sep 17 00:00:00 2001
|
||||
From: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Date: Fri, 18 Oct 2024 11:08:16 +0200
|
||||
Subject: [PATCH] r8169: avoid unsolicited interrupts
|
||||
|
||||
It was reported that after resume from suspend a PCI error is logged
|
||||
and connectivity is broken. Error message is:
|
||||
PCI error (cmd = 0x0407, status_errs = 0x0000)
|
||||
The message seems to be a red herring as none of the error bits is set,
|
||||
and the PCI command register value also is normal. Exception handling
|
||||
for a PCI error includes a chip reset what apparently brakes connectivity
|
||||
here. The interrupt status bit triggering the PCI error handling isn't
|
||||
actually used on PCIe chip versions, so it's not clear why this bit is
|
||||
set by the chip. Fix this by ignoring this bit on PCIe chip versions.
|
||||
|
||||
Fixes: 0e4851502f84 ("r8169: merge with version 8.001.00 of Realtek's r8168 driver")
|
||||
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219388
|
||||
Tested-by: Atlas Yu <atlas.yu@canonical.com>
|
||||
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Reviewed-by: Simon Horman <horms@kernel.org>
|
||||
Link: https://patch.msgid.link/78e2f535-438f-4212-ad94-a77637ac6c9c@gmail.com
|
||||
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
---
|
||||
drivers/net/ethernet/realtek/r8169_main.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/net/ethernet/realtek/r8169_main.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169_main.c
|
||||
@@ -4683,7 +4683,9 @@ static irqreturn_t rtl8169_interrupt(int
|
||||
if ((status & 0xffff) == 0xffff || !(status & tp->irq_mask))
|
||||
return IRQ_NONE;
|
||||
|
||||
- if (unlikely(status & SYSErr)) {
|
||||
+ /* At least RTL8168fp may unexpectedly set the SYSErr bit */
|
||||
+ if (unlikely(status & SYSErr &&
|
||||
+ tp->mac_version <= RTL_GIGA_MAC_VER_06)) {
|
||||
rtl8169_pcierr_interrupt(tp->dev);
|
||||
goto out;
|
||||
}
|
@ -1393,6 +1393,7 @@ CONFIG_DMA_DECLARE_COHERENT=y
|
||||
CONFIG_DMA_NONCOHERENT_MMAP=y
|
||||
# CONFIG_DMA_RESTRICTED_POOL is not set
|
||||
# CONFIG_DMA_SHARED_BUFFER is not set
|
||||
# CONFIG_DM_AUDIT is not set
|
||||
# CONFIG_DM_CACHE is not set
|
||||
# CONFIG_DM_CLONE is not set
|
||||
# CONFIG_DM_DEBUG is not set
|
||||
|
@ -34,7 +34,9 @@
|
||||
#define YAFFS_OBJECT_TYPE_FILE 0x1
|
||||
#define YAFFS_OBJECTID_ROOT 0x1
|
||||
#define YAFFS_SUM_UNUSED 0xFFFF
|
||||
#define YAFFS_NAME "kernel"
|
||||
#define YAFFS_MAX_NAME_LENGTH 127
|
||||
#define YAFFS_NAME_KERNEL "kernel"
|
||||
#define YAFFS_NAME_BOOTIMAGE "bootimage"
|
||||
|
||||
#define MINOR_NR_PARTS 2
|
||||
|
||||
@ -46,7 +48,7 @@ struct minor_header {
|
||||
int yaffs_type;
|
||||
int yaffs_obj_id;
|
||||
u16 yaffs_sum_unused;
|
||||
char yaffs_name[sizeof(YAFFS_NAME)];
|
||||
char yaffs_name[YAFFS_MAX_NAME_LENGTH];
|
||||
};
|
||||
|
||||
static int mtdsplit_parse_minor(struct mtd_info *master,
|
||||
@ -61,29 +63,44 @@ static int mtdsplit_parse_minor(struct mtd_info *master,
|
||||
|
||||
hdr_len = sizeof(hdr);
|
||||
err = mtd_read(master, 0, hdr_len, &retlen, (void *) &hdr);
|
||||
if (err)
|
||||
if (err) {
|
||||
pr_err("MiNOR mtd_read error: %d\n", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
if (retlen != hdr_len)
|
||||
if (retlen != hdr_len) {
|
||||
pr_err("MiNOR mtd_read too short\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
/* match header */
|
||||
if (hdr.yaffs_type != YAFFS_OBJECT_TYPE_FILE)
|
||||
return -EINVAL;
|
||||
if (hdr.yaffs_type != YAFFS_OBJECT_TYPE_FILE) {
|
||||
pr_info("MiNOR YAFFS first type not matched\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (hdr.yaffs_obj_id != YAFFS_OBJECTID_ROOT)
|
||||
return -EINVAL;
|
||||
if (hdr.yaffs_obj_id != YAFFS_OBJECTID_ROOT) {
|
||||
pr_info("MiNOR YAFFS first objectid not matched\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (hdr.yaffs_sum_unused != YAFFS_SUM_UNUSED)
|
||||
return -EINVAL;
|
||||
if (hdr.yaffs_sum_unused != YAFFS_SUM_UNUSED) {
|
||||
pr_info("MiNOR YAFFS first sum not matched\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (memcmp(hdr.yaffs_name, YAFFS_NAME, sizeof(YAFFS_NAME)))
|
||||
return -EINVAL;
|
||||
if ((memcmp(hdr.yaffs_name, YAFFS_NAME_KERNEL, sizeof(YAFFS_NAME_KERNEL))) &&
|
||||
(memcmp(hdr.yaffs_name, YAFFS_NAME_BOOTIMAGE, sizeof(YAFFS_NAME_BOOTIMAGE)))) {
|
||||
pr_info("MiNOR YAFFS first name not matched\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
err = mtd_find_rootfs_from(master, master->erasesize, master->size,
|
||||
&rootfs_offset, NULL);
|
||||
if (err)
|
||||
return err;
|
||||
if (err) {
|
||||
pr_info("MiNOR mtd_find_rootfs_from error: %d\n", err);
|
||||
return 0;
|
||||
}
|
||||
|
||||
parts = kzalloc(MINOR_NR_PARTS * sizeof(*parts), GFP_KERNEL);
|
||||
if (!parts)
|
||||
|
@ -0,0 +1,59 @@
|
||||
From patchwork Sat Oct 26 13:52:25 2024
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org>
|
||||
X-Patchwork-Id: 13852245
|
||||
X-Patchwork-Delegate: kuba@kernel.org
|
||||
Date: Sat, 26 Oct 2024 14:52:25 +0100
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
To: linux-mediatek@lists.infradead.org,
|
||||
linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org,
|
||||
netdev@vger.kernel.org, Sujuan Chen <sujuan.chen@mediatek.com>,
|
||||
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>,
|
||||
Matthias Brugger <matthias.bgg@gmail.com>,
|
||||
Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
|
||||
Eric Dumazet <edumazet@google.com>,
|
||||
"David S. Miller" <davem@davemloft.net>,
|
||||
Andrew Lunn <andrew+netdev@lunn.ch>,
|
||||
Lorenzo Bianconi <lorenzo@kernel.org>,
|
||||
Mark Lee <Mark-MC.Lee@mediatek.com>,
|
||||
Sean Wang <sean.wang@mediatek.com>, Felix Fietkau <nbd@nbd.name>,
|
||||
John Crispin <john@phrozen.org>
|
||||
Subject: [PATCH net] net: ethernet: mtk_wed: fix path of MT7988 WO firmware
|
||||
Message-ID: <Zxz0GWTR5X5LdWPe@pidgin.makrotopia.org>
|
||||
Precedence: bulk
|
||||
X-Mailing-List: netdev@vger.kernel.org
|
||||
List-Id: <netdev.vger.kernel.org>
|
||||
List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
|
||||
List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
|
||||
MIME-Version: 1.0
|
||||
Content-Disposition: inline
|
||||
X-Patchwork-Delegate: kuba@kernel.org
|
||||
|
||||
linux-firmware commit 808cba84 ("mtk_wed: add firmware for mt7988
|
||||
Wireless Ethernet Dispatcher") added mt7988_wo_{0,1}.bin in the
|
||||
'mediatek/mt7988' directory while driver current expects the files in
|
||||
the 'mediatek' directory.
|
||||
|
||||
Change path in the driver header now that the firmware has been added.
|
||||
|
||||
Fixes: e2f64db13aa1 ("net: ethernet: mtk_wed: introduce WED support for MT7988")
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
drivers/net/ethernet/mediatek/mtk_wed_wo.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_wed_wo.h
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_wed_wo.h
|
||||
@@ -91,8 +91,8 @@ enum mtk_wed_dummy_cr_idx {
|
||||
#define MT7981_FIRMWARE_WO "mediatek/mt7981_wo.bin"
|
||||
#define MT7986_FIRMWARE_WO0 "mediatek/mt7986_wo_0.bin"
|
||||
#define MT7986_FIRMWARE_WO1 "mediatek/mt7986_wo_1.bin"
|
||||
-#define MT7988_FIRMWARE_WO0 "mediatek/mt7988_wo_0.bin"
|
||||
-#define MT7988_FIRMWARE_WO1 "mediatek/mt7988_wo_1.bin"
|
||||
+#define MT7988_FIRMWARE_WO0 "mediatek/mt7988/mt7988_wo_0.bin"
|
||||
+#define MT7988_FIRMWARE_WO1 "mediatek/mt7988/mt7988_wo_1.bin"
|
||||
|
||||
#define MTK_WO_MCU_CFG_LS_BASE 0
|
||||
#define MTK_WO_MCU_CFG_LS_HW_VER_ADDR (MTK_WO_MCU_CFG_LS_BASE + 0x000)
|
@ -1146,7 +1146,7 @@ define Device/teltonika_rutx50
|
||||
PAGESIZE := 2048
|
||||
FILESYSTEMS := squashfs
|
||||
IMAGE/factory.ubi := append-ubi
|
||||
DEVICE_PACKAGES := ipq-wifi-teltonika_rutx kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
|
||||
DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
|
||||
endef
|
||||
TARGET_DEVICES += teltonika_rutx50
|
||||
|
||||
|
@ -48,12 +48,12 @@
|
||||
|
||||
lan1_green {
|
||||
label = "green:lan1";
|
||||
gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
|
||||
gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
lan2_green {
|
||||
label = "green:lan2";
|
||||
gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
|
||||
gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_active: active {
|
||||
@ -63,12 +63,12 @@
|
||||
|
||||
lan1_orange {
|
||||
label = "orange:lan1";
|
||||
gpios = <&qcom_pinmux 60 GPIO_ACTIVE_HIGH>;
|
||||
gpios = <&qcom_pinmux 62 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
lan2_orange {
|
||||
label = "orange:lan2";
|
||||
gpios = <&qcom_pinmux 62 GPIO_ACTIVE_HIGH>;
|
||||
gpios = <&qcom_pinmux 60 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -37,6 +37,17 @@
|
||||
stdout-path = &uart0;
|
||||
};
|
||||
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
#size-cells = <0>;
|
||||
|
||||
mcu_power {
|
||||
gpio-export,name = "mcu_power";
|
||||
gpio-export,input = <0>;
|
||||
gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
#address-cells = <1>;
|
||||
|
@ -24,7 +24,7 @@
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200n8 earlyprintk";
|
||||
stdout-path = &uart0;
|
||||
@@ -68,7 +75,7 @@
|
||||
@@ -79,7 +86,7 @@
|
||||
linux,default-trigger = "usbport";
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@ define Device/fsl_ls1021a-twr
|
||||
DEVICE_VENDOR := NXP
|
||||
DEVICE_MODEL := TWR-LS1021A
|
||||
DEVICE_VARIANT := Default
|
||||
DEVICE_PACKAGES += layerscape-rcw
|
||||
DEVICE_PACKAGES += ~layerscape-rcw
|
||||
IMAGE/firmware.bin := \
|
||||
ls-clean | \
|
||||
ls-append $(1)-rcw.bin | pad-to 1M | \
|
||||
|
@ -30,7 +30,7 @@ define Device/fsl_ls1012a-frdm
|
||||
DEVICE_MODEL := FRDM-LS1012A
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-ppfe \
|
||||
trusted-firmware-a-ls1012a-frdm \
|
||||
~trusted-firmware-a-ls1012a-frdm \
|
||||
kmod-ppfe
|
||||
BLOCKSIZE := 256KiB
|
||||
IMAGE/firmware.bin := \
|
||||
@ -56,7 +56,7 @@ define Device/fsl_ls1012a-rdb
|
||||
DEVICE_MODEL := LS1012A-RDB
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-ppfe \
|
||||
trusted-firmware-a-ls1012a-rdb \
|
||||
~trusted-firmware-a-ls1012a-rdb \
|
||||
kmod-hwmon-ina2xx \
|
||||
kmod-iio-fxas21002c-i2c \
|
||||
kmod-iio-fxos8700-i2c \
|
||||
@ -80,7 +80,7 @@ define Device/fsl_ls1012a-frwy-sdboot
|
||||
DEVICE_MODEL := FRWY-LS1012A
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-ppfe \
|
||||
trusted-firmware-a-ls1012a-frwy-sdboot \
|
||||
~trusted-firmware-a-ls1012a-frwy-sdboot \
|
||||
kmod-ppfe
|
||||
DEVICE_DTS := fsl-ls1012a-frwy
|
||||
IMAGES += firmware.bin
|
||||
@ -105,7 +105,7 @@ define Device/fsl_ls1028a-rdb
|
||||
DEVICE_VARIANT := Default
|
||||
KERNEL = kernel-bin | gzip | fit gzip $$(DEVICE_DTS_DIR)/$$(DEVICE_DTS).dtb
|
||||
DEVICE_PACKAGES += \
|
||||
trusted-firmware-a-ls1028a-rdb \
|
||||
~trusted-firmware-a-ls1028a-rdb \
|
||||
kmod-hwmon-ina2xx \
|
||||
kmod-hwmon-lm90 \
|
||||
kmod-rtc-pcf2127
|
||||
@ -130,7 +130,7 @@ define Device/fsl_ls1028a-rdb-sdboot
|
||||
DEVICE_VARIANT := SD Card Boot
|
||||
DEVICE_DTS := fsl-ls1028a-rdb
|
||||
DEVICE_PACKAGES += \
|
||||
trusted-firmware-a-ls1028a-rdb-sdboot \
|
||||
~trusted-firmware-a-ls1028a-rdb-sdboot \
|
||||
kmod-hwmon-ina2xx \
|
||||
kmod-hwmon-lm90 \
|
||||
kmod-rtc-pcf2127
|
||||
@ -151,9 +151,8 @@ define Device/fsl_ls1043a-rdb
|
||||
DEVICE_MODEL := LS1043A-RDB
|
||||
DEVICE_VARIANT := Default
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-fman \
|
||||
trusted-firmware-a-ls1043a-rdb \
|
||||
fmc fmc-eth-config \
|
||||
~layerscape-fman \
|
||||
~trusted-firmware-a-ls1043a-rdb \
|
||||
kmod-ahci-qoriq \
|
||||
kmod-hwmon-ina2xx \
|
||||
kmod-hwmon-lm90
|
||||
@ -176,9 +175,8 @@ define Device/fsl_ls1043a-rdb-sdboot
|
||||
DEVICE_MODEL := LS1043A-RDB
|
||||
DEVICE_VARIANT := SD Card Boot
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-fman \
|
||||
trusted-firmware-a-ls1043a-rdb-sdboot \
|
||||
fmc fmc-eth-config \
|
||||
~layerscape-fman \
|
||||
~trusted-firmware-a-ls1043a-rdb-sdboot \
|
||||
kmod-ahci-qoriq \
|
||||
kmod-hwmon-ina2xx \
|
||||
kmod-hwmon-lm90
|
||||
@ -200,8 +198,8 @@ define Device/fsl_ls1046a-frwy
|
||||
DEVICE_MODEL := FRWY-LS1046A
|
||||
DEVICE_VARIANT := Default
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-fman \
|
||||
trusted-firmware-a-ls1046a-frwy
|
||||
~layerscape-fman \
|
||||
~trusted-firmware-a-ls1046a-frwy
|
||||
IMAGE/firmware.bin := \
|
||||
ls-clean | \
|
||||
ls-append $(1)-bl2.pbl | pad-to 1M | \
|
||||
@ -220,8 +218,8 @@ define Device/fsl_ls1046a-frwy-sdboot
|
||||
DEVICE_MODEL := FRWY-LS1046A
|
||||
DEVICE_VARIANT := SD Card Boot
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-fman \
|
||||
trusted-firmware-a-ls1046a-frwy-sdboot
|
||||
~layerscape-fman \
|
||||
~trusted-firmware-a-ls1046a-frwy-sdboot
|
||||
DEVICE_DTS := fsl-ls1046a-frwy
|
||||
IMAGE/sdcard.img.gz := \
|
||||
ls-clean | \
|
||||
@ -241,9 +239,8 @@ define Device/fsl_ls1046a-rdb
|
||||
DEVICE_MODEL := LS1046A-RDB
|
||||
DEVICE_VARIANT := Default
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-fman \
|
||||
trusted-firmware-a-ls1046a-rdb \
|
||||
fmc fmc-eth-config \
|
||||
~layerscape-fman \
|
||||
~trusted-firmware-a-ls1046a-rdb \
|
||||
kmod-ahci-qoriq \
|
||||
kmod-hwmon-ina2xx \
|
||||
kmod-hwmon-lm90
|
||||
@ -266,9 +263,8 @@ define Device/fsl_ls1046a-rdb-sdboot
|
||||
DEVICE_MODEL := LS1046A-RDB
|
||||
DEVICE_VARIANT := SD Card Boot
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-fman \
|
||||
trusted-firmware-a-ls1046a-rdb-sdboot \
|
||||
fmc fmc-eth-config \
|
||||
~layerscape-fman \
|
||||
~trusted-firmware-a-ls1046a-rdb-sdboot \
|
||||
kmod-ahci-qoriq \
|
||||
kmod-hwmon-ina2xx \
|
||||
kmod-hwmon-lm90
|
||||
@ -291,9 +287,9 @@ define Device/fsl_ls1088a-rdb
|
||||
DEVICE_MODEL := LS1088A-RDB
|
||||
DEVICE_VARIANT := Default
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-mc \
|
||||
layerscape-dpl \
|
||||
trusted-firmware-a-ls1088a-rdb \
|
||||
~layerscape-mc \
|
||||
~layerscape-dpl \
|
||||
~trusted-firmware-a-ls1088a-rdb \
|
||||
restool \
|
||||
kmod-ahci-qoriq \
|
||||
kmod-hwmon-ina2xx \
|
||||
@ -319,9 +315,9 @@ define Device/fsl_ls1088a-rdb-sdboot
|
||||
DEVICE_MODEL := LS1088A-RDB
|
||||
DEVICE_VARIANT := SD Card Boot
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-mc \
|
||||
layerscape-dpl \
|
||||
trusted-firmware-a-ls1088a-rdb-sdboot \
|
||||
~layerscape-mc \
|
||||
~layerscape-dpl \
|
||||
~trusted-firmware-a-ls1088a-rdb-sdboot \
|
||||
restool \
|
||||
kmod-ahci-qoriq \
|
||||
kmod-hwmon-ina2xx \
|
||||
@ -346,9 +342,9 @@ define Device/fsl_ls2088a-rdb
|
||||
DEVICE_VENDOR := NXP
|
||||
DEVICE_MODEL := LS2088ARDB
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-mc \
|
||||
layerscape-dpl \
|
||||
trusted-firmware-a-ls2088a-rdb \
|
||||
~layerscape-mc \
|
||||
~layerscape-dpl \
|
||||
~trusted-firmware-a-ls2088a-rdb \
|
||||
restool \
|
||||
kmod-ahci-qoriq
|
||||
IMAGE/firmware.bin := \
|
||||
@ -370,10 +366,10 @@ define Device/fsl_lx2160a-rdb
|
||||
DEVICE_MODEL := LX2160A-RDB
|
||||
DEVICE_VARIANT := Rev2.0 silicon
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-mc \
|
||||
layerscape-dpl \
|
||||
layerscape-ddr-phy \
|
||||
trusted-firmware-a-lx2160a-rdb \
|
||||
~layerscape-mc \
|
||||
~layerscape-dpl \
|
||||
~layerscape-ddr-phy \
|
||||
~trusted-firmware-a-lx2160a-rdb \
|
||||
restool
|
||||
IMAGE/firmware.bin := \
|
||||
ls-clean | \
|
||||
@ -396,10 +392,10 @@ define Device/fsl_lx2160a-rdb-sdboot
|
||||
DEVICE_MODEL := LX2160A-RDB
|
||||
DEVICE_VARIANT := Rev2.0 silicon SD Card Boot
|
||||
DEVICE_PACKAGES += \
|
||||
layerscape-mc \
|
||||
layerscape-dpl \
|
||||
layerscape-ddr-phy \
|
||||
trusted-firmware-a-lx2160a-rdb-sdboot \
|
||||
~layerscape-mc \
|
||||
~layerscape-dpl \
|
||||
~layerscape-ddr-phy \
|
||||
~trusted-firmware-a-lx2160a-rdb-sdboot \
|
||||
restool
|
||||
DEVICE_DTS := fsl-lx2160a-rdb
|
||||
IMAGE/sdcard.img.gz := \
|
||||
|
@ -195,6 +195,32 @@
|
||||
reg = <0 0x43000000 0 0x50000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
wmcpu_emi: wmcpu-reserved@47cc0000 {
|
||||
reg = <0 0x47cc0000 0 0x00100000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
wo_emi0: wo-emi@4f600000 {
|
||||
reg = <0 0x4f600000 0 0x40000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
wo_emi1: wo-emi@4f640000 {
|
||||
reg = <0 0x4f640000 0 0x40000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
wo_emi2: wo-emi@4f680000 {
|
||||
reg = <0 0x4f680000 0 0x40000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
wo_data: wo-data@4f700000 {
|
||||
reg = <0 0x4f700000 0 0x800000>;
|
||||
no-map;
|
||||
shared = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
soc {
|
||||
@ -1218,6 +1244,48 @@
|
||||
#size-cells = <1>;
|
||||
};
|
||||
|
||||
wed0: wed@15010000 {
|
||||
compatible = "mediatek,mt7988-wed",
|
||||
"syscon";
|
||||
reg = <0 0x15010000 0 0x2000>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
|
||||
memory-region = <&wo_emi0>, <&wo_data>;
|
||||
memory-region-names = "wo-emi", "wo-data";
|
||||
mediatek,wo-ccif = <&wo_ccif0>;
|
||||
mediatek,wo-ilm = <&wo_ilm0>;
|
||||
mediatek,wo-dlm = <&wo_dlm0>;
|
||||
mediatek,wo-cpuboot = <&wo_cpuboot0>;
|
||||
};
|
||||
|
||||
wed1: wed@15012000 {
|
||||
compatible = "mediatek,mt7988-wed",
|
||||
"syscon";
|
||||
reg = <0 0x15012000 0 0x2000>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
|
||||
memory-region = <&wo_emi1>, <&wo_data>;
|
||||
memory-region-names = "wo-emi", "wo-data";
|
||||
mediatek,wo-ccif = <&wo_ccif1>;
|
||||
mediatek,wo-ilm = <&wo_ilm1>;
|
||||
mediatek,wo-dlm = <&wo_dlm1>;
|
||||
mediatek,wo-cpuboot = <&wo_cpuboot1>;
|
||||
};
|
||||
|
||||
wed2: wed@15014000 {
|
||||
compatible = "mediatek,mt7988-wed",
|
||||
"syscon";
|
||||
reg = <0 0x15014000 0 0x2000>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH>;
|
||||
memory-region = <&wo_emi2>, <&wo_data>;
|
||||
memory-region-names = "wo-emi", "wo-data";
|
||||
mediatek,wo-ccif = <&wo_ccif2>;
|
||||
mediatek,wo-ilm = <&wo_ilm2>;
|
||||
mediatek,wo-dlm = <&wo_dlm2>;
|
||||
mediatek,wo-cpuboot = <&wo_cpuboot2>;
|
||||
};
|
||||
|
||||
switch: switch@15020000 {
|
||||
compatible = "mediatek,mt7988-switch";
|
||||
reg = <0 0x15020000 0 0x8000>;
|
||||
@ -1449,6 +1517,7 @@
|
||||
<&apmixedsys CLK_APMIXED_SGMPLL>;
|
||||
mediatek,ethsys = <ðsys>;
|
||||
mediatek,infracfg = <&topmisc>;
|
||||
mediatek,wed = <&wed0>, <&wed1>, <&wed2>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
@ -1511,6 +1580,72 @@
|
||||
};
|
||||
};
|
||||
|
||||
wo_ccif0: syscon@151a5000 {
|
||||
compatible = "mediatek,mt7988-wo-ccif", "syscon";
|
||||
reg = <0 0x151a5000 0 0x1000>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
wo_ccif1: syscon@152a5000 {
|
||||
compatible = "mediatek,mt7988-wo-ccif", "syscon";
|
||||
reg = <0 0x152a5000 0 0x1000>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
wo_ccif2: syscon@153a5000 {
|
||||
compatible = "mediatek,mt7988-wo-ccif", "syscon";
|
||||
reg = <0 0x153a5000 0 0x1000>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
wo_ilm0: syscon@151e0000 {
|
||||
compatible = "mediatek,mt7988-wo-ilm", "syscon";
|
||||
reg = <0 0x151e0000 0 0x8000>;
|
||||
};
|
||||
|
||||
wo_ilm1: syscon@152e0000 {
|
||||
compatible = "mediatek,mt7988-wo-ilm", "syscon";
|
||||
reg = <0 0x152e0000 0 0x8000>;
|
||||
};
|
||||
|
||||
wo_ilm2: syscon@153e0000 {
|
||||
compatible = "mediatek,mt7988-wo-ilm", "syscon";
|
||||
reg = <0 0x153e0000 0 0x8000>;
|
||||
};
|
||||
|
||||
wo_dlm0: syscon@151e8000 {
|
||||
compatible = "mediatek,mt7988-wo-dlm", "syscon";
|
||||
reg = <0 0x151e8000 0 0x2000>;
|
||||
};
|
||||
|
||||
wo_dlm1: syscon@152e8000 {
|
||||
compatible = "mediatek,mt7988-wo-dlm", "syscon";
|
||||
reg = <0 0x152e8000 0 0x2000>;
|
||||
};
|
||||
|
||||
wo_dlm2: syscon@153e8000 {
|
||||
compatible = "mediatek,mt7988-wo-dlm", "syscon";
|
||||
reg = <0 0x153e8000 0 0x2000>;
|
||||
};
|
||||
|
||||
wo_cpuboot0: syscon@15194000 {
|
||||
compatible = "mediatek,mt7988-wo-cpuboot", "syscon";
|
||||
reg = <0 0x15194000 0 0x1000>;
|
||||
};
|
||||
|
||||
wo_cpuboot1: syscon@15294000 {
|
||||
compatible = "mediatek,mt7988-wo-cpuboot", "syscon";
|
||||
reg = <0 0x15294000 0 0x1000>;
|
||||
};
|
||||
|
||||
wo_cpuboot2: syscon@15394000 {
|
||||
compatible = "mediatek,mt7988-wo-cpuboot", "syscon";
|
||||
reg = <0 0x15394000 0 0x1000>;
|
||||
};
|
||||
|
||||
crypto: crypto@15600000 {
|
||||
compatible = "inside-secure,safexcel-eip197b";
|
||||
reg = <0 0x15600000 0 0x180000>;
|
||||
|
@ -444,6 +444,6 @@ define Device/synology_ds213j
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-rtc-s35390a kmod-hwmon-gpiofan kmod-hwmon-drivetemp \
|
||||
kmod-md-raid0 kmod-md-raid1 kmod-md-mod e2fsprogs mdadm \
|
||||
-ppp -kmod-nft-offload -firewall4 -dnsmasq -odhcpd-ipv6only
|
||||
-ppp -kmod-nft-offload -dnsmasq -odhcpd-ipv6only
|
||||
endef
|
||||
TARGET_DEVICES += synology_ds213j
|
||||
|
@ -46,8 +46,8 @@ endef
|
||||
define Device/i2se_duckbill
|
||||
DEVICE_VENDOR := I2SE
|
||||
DEVICE_MODEL := Duckbill
|
||||
DEVICE_PACKAGES := -dnsmasq -firewall -ppp -ip6tables -iptables -6relayd -mtd \
|
||||
uboot-envtools kmod-leds-gpio -kmod-ipt-nathelper
|
||||
DEVICE_PACKAGES := -dnsmasq -ppp -ip6tables -iptables -mtd \
|
||||
uboot-envtools kmod-leds-gpio -kmod-nf-nathelper
|
||||
SUPPORTED_DEVICES:=i2se,duckbill
|
||||
SOC:=imx28
|
||||
DEVICE_DTS:=imx28-duckbill
|
||||
|
@ -193,7 +193,7 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
&pcie1 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
@ -203,7 +203,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
&pcie2 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0 0 0 0 0>;
|
||||
|
@ -297,7 +297,7 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
&pcie1 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
@ -307,7 +307,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
&pcie2 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0 0 0 0 0>;
|
||||
|
@ -22,12 +22,6 @@
|
||||
serial0 = &uart2;
|
||||
};
|
||||
|
||||
bootstrap {
|
||||
compatible = "mediatek,linkit";
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
@ -144,6 +138,15 @@
|
||||
};
|
||||
};
|
||||
|
||||
&gpio {
|
||||
bootstrap {
|
||||
gpio-hog;
|
||||
line-name = "bootstrap";
|
||||
output-low;
|
||||
gpios = <11 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c {
|
||||
status = "okay";
|
||||
};
|
||||
|
@ -1396,7 +1396,7 @@ static int esw_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
esw->dev = &pdev->dev;
|
||||
esw->irq = irq_of_parse_and_map(np, 0);
|
||||
esw->irq = platform_get_irq(pdev, 0);
|
||||
esw->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(esw->base))
|
||||
return PTR_ERR(esw->base);
|
||||
|
@ -140,7 +140,7 @@ define Build/sign-dlink-ru
|
||||
endef
|
||||
|
||||
define Build/trx
|
||||
$(STAGING_DIR_HOST)/bin/trx $(1) \
|
||||
-$(STAGING_DIR_HOST)/bin/trx $(1) \
|
||||
-o $@ \
|
||||
-m $$(($(call exp_units,$(IMAGE_SIZE)))) \
|
||||
-f $(IMAGE_KERNEL) \
|
||||
|
@ -404,7 +404,7 @@ define Device/asus_rp-ac56
|
||||
DEVICE_MODEL := RP-AC56
|
||||
IMAGE_SIZE := 16000k
|
||||
DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 \
|
||||
kmod-i2c-ralink kmod-sound-mt7620 -uboot-envtools
|
||||
kmod-sound-mt7620 -uboot-envtools
|
||||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-kernel | append-rootfs | pad-rootfs | check-size
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \
|
||||
|
@ -41,7 +41,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
obj-$(CONFIG_PWM_MXS) += pwm-mxs.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/pwm/pwm-mediatek-ramips.c
|
||||
@@ -0,0 +1,197 @@
|
||||
@@ -0,0 +1,187 @@
|
||||
+/*
|
||||
+ * Mediatek Pulse Width Modulator driver
|
||||
+ *
|
||||
@ -178,30 +178,23 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+static int mtk_pwm_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct mtk_pwm_chip *pc;
|
||||
+ struct resource *r;
|
||||
+ int ret;
|
||||
+
|
||||
+ pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL);
|
||||
+ if (!pc)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
+ pc->mmio_base = devm_ioremap_resource(&pdev->dev, r);
|
||||
+ pc->mmio_base = devm_platform_ioremap_resource(pdev, 0);
|
||||
+ if (IS_ERR(pc->mmio_base))
|
||||
+ return PTR_ERR(pc->mmio_base);
|
||||
+
|
||||
+ platform_set_drvdata(pdev, pc);
|
||||
+
|
||||
+ pc->chip.dev = &pdev->dev;
|
||||
+ pc->chip.ops = &mtk_pwm_ops;
|
||||
+ pc->chip.base = -1;
|
||||
+ pc->chip.npwm = NUM_PWM;
|
||||
+
|
||||
+ ret = pwmchip_add(&pc->chip);
|
||||
+ if (ret < 0)
|
||||
+ dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret);
|
||||
+ platform_set_drvdata(pdev, pc);
|
||||
+
|
||||
+ return ret;
|
||||
+ return devm_pwmchip_add(&pdev->dev, &pc->chip);
|
||||
+}
|
||||
+
|
||||
+static int mtk_pwm_remove(struct platform_device *pdev)
|
||||
@ -212,8 +205,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+ for (i = 0; i < NUM_PWM; i++)
|
||||
+ pwm_disable(&pc->chip.pwms[i]);
|
||||
+
|
||||
+ pwmchip_remove(&pc->chip);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
@ -227,7 +218,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+static struct platform_driver mtk_pwm_driver = {
|
||||
+ .driver = {
|
||||
+ .name = "mtk-pwm",
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .of_match_table = mtk_pwm_of_match,
|
||||
+ },
|
||||
+ .probe = mtk_pwm_probe,
|
||||
|
@ -1,97 +0,0 @@
|
||||
--- a/drivers/misc/Makefile
|
||||
+++ b/drivers/misc/Makefile
|
||||
@@ -52,6 +52,7 @@ obj-$(CONFIG_ECHO) += echo/
|
||||
obj-$(CONFIG_CXL_BASE) += cxl/
|
||||
obj-$(CONFIG_DW_XDATA_PCIE) += dw-xdata-pcie.o
|
||||
obj-$(CONFIG_PCI_ENDPOINT_TEST) += pci_endpoint_test.o
|
||||
+obj-$(CONFIG_SOC_MT7620) += linkit.o
|
||||
obj-$(CONFIG_OCXL) += ocxl/
|
||||
obj-$(CONFIG_BCM_VK) += bcm-vk/
|
||||
obj-y += cardreader/
|
||||
--- /dev/null
|
||||
+++ b/drivers/misc/linkit.c
|
||||
@@ -0,0 +1,84 @@
|
||||
+/*
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * publishhed by the Free Software Foundation.
|
||||
+ *
|
||||
+ * Copyright (C) 2015 John Crispin <blogic@openwrt.org>
|
||||
+ */
|
||||
+
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/of.h>
|
||||
+#include <linux/mtd/mtd.h>
|
||||
+#include <linux/gpio.h>
|
||||
+
|
||||
+#define LINKIT_LATCH_GPIO 11
|
||||
+
|
||||
+struct linkit_hw_data {
|
||||
+ char board[16];
|
||||
+ char rev[16];
|
||||
+};
|
||||
+
|
||||
+static void sanify_string(char *s)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < 15; i++)
|
||||
+ if (s[i] <= 0x20)
|
||||
+ s[i] = '\0';
|
||||
+ s[15] = '\0';
|
||||
+}
|
||||
+
|
||||
+static int linkit_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct linkit_hw_data hw;
|
||||
+ struct mtd_info *mtd;
|
||||
+ size_t retlen;
|
||||
+ int ret;
|
||||
+
|
||||
+ mtd = get_mtd_device_nm("factory");
|
||||
+ if (IS_ERR(mtd))
|
||||
+ return PTR_ERR(mtd);
|
||||
+
|
||||
+ ret = mtd_read(mtd, 0x400, sizeof(hw), &retlen, (u_char *) &hw);
|
||||
+ put_mtd_device(mtd);
|
||||
+
|
||||
+ sanify_string(hw.board);
|
||||
+ sanify_string(hw.rev);
|
||||
+
|
||||
+ dev_info(&pdev->dev, "Version : %s\n", hw.board);
|
||||
+ dev_info(&pdev->dev, "Revision : %s\n", hw.rev);
|
||||
+
|
||||
+ if (!strcmp(hw.board, "LINKITS7688")) {
|
||||
+ dev_info(&pdev->dev, "setting up bootstrap latch\n");
|
||||
+
|
||||
+ if (devm_gpio_request(&pdev->dev, LINKIT_LATCH_GPIO, "bootstrap")) {
|
||||
+ dev_err(&pdev->dev, "failed to setup bootstrap gpio\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ gpio_direction_output(LINKIT_LATCH_GPIO, 0);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id linkit_match[] = {
|
||||
+ { .compatible = "mediatek,linkit" },
|
||||
+ {},
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, linkit_match);
|
||||
+
|
||||
+static struct platform_driver linkit_driver = {
|
||||
+ .probe = linkit_probe,
|
||||
+ .driver = {
|
||||
+ .name = "mtk-linkit",
|
||||
+ .owner = THIS_MODULE,
|
||||
+ .of_match_table = linkit_match,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+int __init linkit_init(void)
|
||||
+{
|
||||
+ return platform_driver_register(&linkit_driver);
|
||||
+}
|
||||
+late_initcall_sync(linkit_init);
|
@ -310,7 +310,6 @@
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
phy-is-integrated;
|
||||
reg = <27>;
|
||||
rtl9300,smi-address = <4 0>;
|
||||
sds = < 9 >;
|
||||
};
|
||||
|
||||
|
@ -684,6 +684,7 @@ static void rtl83xx_phylink_get_caps(struct dsa_switch *ds, int port,
|
||||
__set_bit(PHY_INTERFACE_MODE_QSGMII, config->supported_interfaces);
|
||||
__set_bit(PHY_INTERFACE_MODE_SGMII, config->supported_interfaces);
|
||||
__set_bit(PHY_INTERFACE_MODE_XGMII, config->supported_interfaces);
|
||||
__set_bit(PHY_INTERFACE_MODE_USXGMII, config->supported_interfaces);
|
||||
__set_bit(PHY_INTERFACE_MODE_1000BASEX, config->supported_interfaces);
|
||||
}
|
||||
|
||||
|
@ -662,7 +662,7 @@ int rtl839x_read_phy(u32 port, u32 page, u32 reg, u32 *val)
|
||||
u32 v;
|
||||
int err = 0;
|
||||
|
||||
if (port > 63 || page > 4095 || reg > 31)
|
||||
if (port > 63 || page > 8191 || reg > 31)
|
||||
return -ENOTSUPP;
|
||||
|
||||
/* Take bug on RTL839x Rev <= C into account */
|
||||
@ -698,7 +698,7 @@ int rtl839x_write_phy(u32 port, u32 page, u32 reg, u32 val)
|
||||
int err = 0;
|
||||
|
||||
val &= 0xffff;
|
||||
if (port > 63 || page > 4095 || reg > 31)
|
||||
if (port > 63 || page > 8191 || reg > 31)
|
||||
return -ENOTSUPP;
|
||||
|
||||
/* Take bug on RTL839x Rev <= C into account */
|
||||
|
@ -195,7 +195,7 @@ struct rtl838x_eth_priv {
|
||||
u32 lastEvent;
|
||||
u16 rxrings;
|
||||
u16 rxringlen;
|
||||
u8 smi_bus[MAX_PORTS];
|
||||
int smi_bus[MAX_PORTS];
|
||||
u8 smi_addr[MAX_PORTS];
|
||||
u32 sds_id[MAX_PORTS];
|
||||
bool smi_bus_isc45[MAX_SMI_BUSSES];
|
||||
@ -2008,8 +2008,9 @@ static int rtmdio_930x_reset(struct mii_bus *bus)
|
||||
for (int i = 0; i < RTL930X_CPU_PORT; i++) {
|
||||
int pos;
|
||||
|
||||
if (priv->smi_bus[i] > 3)
|
||||
if (priv->smi_bus[i] < 0)
|
||||
continue;
|
||||
|
||||
pos = (i % 6) * 5;
|
||||
sw_w32_mask(0x1f << pos, priv->smi_addr[i] << pos,
|
||||
RTL930X_SMI_PORT0_5_ADDR + (i / 6) * 4);
|
||||
@ -2114,9 +2115,12 @@ static int rtmdio_931x_reset(struct mii_bus *bus)
|
||||
mdc_on[0] = mdc_on[1] = mdc_on[2] = mdc_on[3] = false;
|
||||
/* Mapping of port to phy-addresses on an SMI bus */
|
||||
poll_sel[0] = poll_sel[1] = poll_sel[2] = poll_sel[3] = 0;
|
||||
for (int i = 0; i < 56; i++) {
|
||||
for (int i = 0; i < RTL931X_CPU_PORT; i++) {
|
||||
u32 pos;
|
||||
|
||||
if (priv->smi_bus[i] < 0)
|
||||
continue;
|
||||
|
||||
pos = (i % 6) * 5;
|
||||
sw_w32_mask(0x1f << pos, priv->smi_addr[i] << pos, RTL931X_SMI_PORT_ADDR + (i / 6) * 4);
|
||||
pos = (i * 2) % 32;
|
||||
@ -2282,30 +2286,35 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv)
|
||||
if (of_property_read_u32(dn, "reg", &pn))
|
||||
continue;
|
||||
|
||||
if (of_property_read_u32_array(dn, "rtl9300,smi-address", &smi_addr[0], 2)) {
|
||||
smi_addr[0] = 0;
|
||||
smi_addr[1] = pn;
|
||||
if (pn >= MAX_PORTS) {
|
||||
pr_err("%s: illegal port number %d\n", __func__, pn);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (of_property_read_u32(dn, "sds", &priv->sds_id[pn]))
|
||||
priv->sds_id[pn] = -1;
|
||||
else {
|
||||
else
|
||||
pr_info("set sds port %d to %d\n", pn, priv->sds_id[pn]);
|
||||
}
|
||||
|
||||
if (pn < MAX_PORTS) {
|
||||
if (of_property_read_u32_array(dn, "rtl9300,smi-address", &smi_addr[0], 2)) {
|
||||
priv->smi_bus[pn] = 0;
|
||||
priv->smi_addr[pn] = pn;
|
||||
} else {
|
||||
priv->smi_bus[pn] = smi_addr[0];
|
||||
priv->smi_addr[pn] = smi_addr[1];
|
||||
} else {
|
||||
pr_err("%s: illegal port number %d\n", __func__, pn);
|
||||
}
|
||||
|
||||
if (of_device_is_compatible(dn, "ethernet-phy-ieee802.3-c45"))
|
||||
priv->smi_bus_isc45[smi_addr[0]] = true;
|
||||
|
||||
if (of_property_read_bool(dn, "phy-is-integrated")) {
|
||||
priv->phy_is_internal[pn] = true;
|
||||
if (priv->smi_bus[pn] >= MAX_SMI_BUSSES) {
|
||||
pr_err("%s: illegal SMI bus number %d\n", __func__, priv->smi_bus[pn]);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
priv->phy_is_internal[pn] = of_property_read_bool(dn, "phy-is-integrated");
|
||||
|
||||
if (priv->phy_is_internal[pn] && priv->sds_id[pn] >= 0)
|
||||
priv->smi_bus[pn]= -1;
|
||||
else if (of_device_is_compatible(dn, "ethernet-phy-ieee802.3-c45"))
|
||||
priv->smi_bus_isc45[priv->smi_bus[pn]] = true;
|
||||
}
|
||||
|
||||
dn = of_find_compatible_node(NULL, NULL, "realtek,rtl83xx-switch");
|
||||
|
@ -45,7 +45,8 @@ extern int phy_port_read_paged(struct phy_device *phydev, int port, int page, u3
|
||||
* RealTek SoCs allows to access the PHY in RAW mode, ie. bypassing
|
||||
* the cache and paging engine of the MDIO controller.
|
||||
*/
|
||||
#define RTL83XX_PAGE_RAW 0x0fff
|
||||
#define RTL838X_PAGE_RAW 0x0fff
|
||||
#define RTL839X_PAGE_RAW 0x1fff
|
||||
|
||||
/* internal RTL821X PHY uses register 0x1d to select media page */
|
||||
#define RTL821XINT_MEDIA_PAGE_SELECT 0x1d
|
||||
@ -146,6 +147,79 @@ static int resume_polling(u64 saved_state)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rtl821x_match_phy_device(struct phy_device *phydev)
|
||||
{
|
||||
u64 poll_state;
|
||||
int rawpage, port = phydev->mdio.addr & ~3;
|
||||
int oldpage, chip_mode, chip_cfg_mode;
|
||||
|
||||
if (phydev->phy_id == PHY_ID_RTL8218B_E)
|
||||
return PHY_IS_RTL8218B_E;
|
||||
|
||||
if (phydev->phy_id != PHY_ID_RTL8214_OR_8218)
|
||||
return PHY_IS_NOT_RTL821X;
|
||||
|
||||
if (soc_info.family == RTL8380_FAMILY_ID)
|
||||
rawpage = RTL838X_PAGE_RAW;
|
||||
else if (soc_info.family == RTL8390_FAMILY_ID)
|
||||
rawpage = RTL839X_PAGE_RAW;
|
||||
else
|
||||
return PHY_IS_NOT_RTL821X;
|
||||
|
||||
poll_state = disable_polling(port);
|
||||
/*
|
||||
* At this stage the write_page()/read_page() PHY functions are not yet
|
||||
* registered and normal paged access is not possible. The following
|
||||
* detection routine works because our MDIO bus has all the Realtek
|
||||
* PHY page handling (register 31) integrated into the port functions.
|
||||
*/
|
||||
oldpage = phy_port_read_paged(phydev, port, rawpage, 31);
|
||||
phy_port_write_paged(phydev, port, rawpage, 31, 0xa42);
|
||||
phy_port_write_paged(phydev, port, rawpage, 29, 0x008);
|
||||
phy_port_write_paged(phydev, port, rawpage, 31, 0x278);
|
||||
phy_port_write_paged(phydev, port, rawpage, 18, 0x455);
|
||||
phy_port_write_paged(phydev, port, rawpage, 31, 0x260);
|
||||
chip_mode = phy_port_read_paged(phydev, port, rawpage, 18);
|
||||
phy_port_write_paged(phydev, port, rawpage, 31, 0xa42);
|
||||
phy_port_write_paged(phydev, port, rawpage, 29, 0x000);
|
||||
phy_port_write_paged(phydev, port, rawpage, 31, oldpage);
|
||||
|
||||
resume_polling(poll_state);
|
||||
|
||||
pr_debug("%s(%d): got chip mode %x\n", __func__, phydev->mdio.addr, chip_mode);
|
||||
|
||||
/* we checked the 4th port of a RTL8218B and got no config values */
|
||||
if (!chip_mode)
|
||||
return PHY_IS_RTL8218B_E;
|
||||
|
||||
chip_cfg_mode = (chip_mode >> 4) & 0xf;
|
||||
chip_mode &= 0xf;
|
||||
|
||||
if (chip_mode == 0xd || chip_mode == 0xf)
|
||||
return PHY_IS_RTL8218B_E;
|
||||
|
||||
if (chip_mode == 0x4 || chip_mode == 0x6)
|
||||
return PHY_IS_RTL8214FC;
|
||||
|
||||
if (chip_mode != 0xc && chip_mode != 0xe)
|
||||
return PHY_IS_NOT_RTL821X;
|
||||
|
||||
if (chip_cfg_mode == 0x4 || chip_cfg_mode == 0x6)
|
||||
return PHY_IS_RTL8214FC;
|
||||
|
||||
return PHY_IS_RTL8214FB;
|
||||
}
|
||||
|
||||
static int rtl8218b_ext_match_phy_device(struct phy_device *phydev)
|
||||
{
|
||||
return rtl821x_match_phy_device(phydev) == PHY_IS_RTL8218B_E;
|
||||
}
|
||||
|
||||
static int rtl8214fc_match_phy_device(struct phy_device *phydev)
|
||||
{
|
||||
return rtl821x_match_phy_device(phydev) == PHY_IS_RTL8214FC;
|
||||
}
|
||||
|
||||
static void rtl8380_int_phy_on_off(struct phy_device *phydev, bool on)
|
||||
{
|
||||
phy_modify(phydev, 0, BMCR_PDOWN, on ? 0 : BMCR_PDOWN);
|
||||
@ -154,11 +228,11 @@ static void rtl8380_int_phy_on_off(struct phy_device *phydev, bool on)
|
||||
static void rtl8380_rtl8214fc_on_off(struct phy_device *phydev, bool on)
|
||||
{
|
||||
/* fiber ports */
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, RTL821XEXT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_FIBRE);
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, RTL821XEXT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_FIBRE);
|
||||
phy_modify(phydev, 0x10, BMCR_PDOWN, on ? 0 : BMCR_PDOWN);
|
||||
|
||||
/* copper ports */
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, RTL821XEXT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_COPPER);
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, RTL821XEXT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_COPPER);
|
||||
phy_modify_paged(phydev, RTL821X_PAGE_POWER, 0x10, BMCR_PDOWN, on ? 0 : BMCR_PDOWN);
|
||||
}
|
||||
|
||||
@ -693,17 +767,17 @@ static void rtl821x_phy_setup_package_broadcast(struct phy_device *phydev, bool
|
||||
int mac = phydev->mdio.addr;
|
||||
|
||||
/* select main page 0 */
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
|
||||
/* write to 0x8 to register 0x1d on main page 0 */
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_INTERNAL);
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_INTERNAL);
|
||||
/* select page 0x266 */
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PORT);
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PORT);
|
||||
/* set phy id and target broadcast bitmap in register 0x16 on page 0x266 */
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, 0x16, (enable?0xff00:0x00) | mac);
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, 0x16, (enable?0xff00:0x00) | mac);
|
||||
/* return to main page 0 */
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
|
||||
/* write to 0x0 to register 0x1d on main page 0 */
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_AUTO);
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_AUTO);
|
||||
mdelay(1);
|
||||
}
|
||||
|
||||
@ -779,8 +853,8 @@ static int rtl8380_configure_int_rtl8218b(struct phy_device *phydev)
|
||||
|
||||
/* Ready PHY for patch */
|
||||
for (int p = 0; p < 8; p++) {
|
||||
phy_package_port_write_paged(phydev, p, RTL83XX_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PATCH);
|
||||
phy_package_port_write_paged(phydev, p, RTL83XX_PAGE_RAW, 0x10, 0x0010);
|
||||
phy_package_port_write_paged(phydev, p, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PATCH);
|
||||
phy_package_port_write_paged(phydev, p, RTL838X_PAGE_RAW, 0x10, 0x0010);
|
||||
}
|
||||
msleep(500);
|
||||
for (int p = 0; p < 8; p++) {
|
||||
@ -803,14 +877,14 @@ static int rtl8380_configure_int_rtl8218b(struct phy_device *phydev)
|
||||
|
||||
i = 0;
|
||||
while (rtl838x_6275B_intPhy_perport[i * 2]) {
|
||||
phy_package_port_write_paged(phydev, p, RTL83XX_PAGE_RAW,
|
||||
phy_package_port_write_paged(phydev, p, RTL838X_PAGE_RAW,
|
||||
rtl838x_6275B_intPhy_perport[i * 2],
|
||||
rtl838x_6275B_intPhy_perport[i * 2 + 1]);
|
||||
i++;
|
||||
}
|
||||
i = 0;
|
||||
while (rtl8218b_6276B_hwEsd_perport[i * 2]) {
|
||||
phy_package_port_write_paged(phydev, p, RTL83XX_PAGE_RAW,
|
||||
phy_package_port_write_paged(phydev, p, RTL838X_PAGE_RAW,
|
||||
rtl8218b_6276B_hwEsd_perport[i * 2],
|
||||
rtl8218b_6276B_hwEsd_perport[i * 2 + 1]);
|
||||
i++;
|
||||
@ -870,30 +944,30 @@ static int rtl8380_configure_ext_rtl8218b(struct phy_device *phydev)
|
||||
msleep(100);
|
||||
|
||||
/* Get Chip revision */
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, 0x1b, 0x4);
|
||||
val = phy_read_paged(phydev, RTL83XX_PAGE_RAW, 0x1c);
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, 0x1b, 0x4);
|
||||
val = phy_read_paged(phydev, RTL838X_PAGE_RAW, 0x1c);
|
||||
|
||||
phydev_info(phydev, "Detected chip revision %04x\n", val);
|
||||
|
||||
for (int i = 0; rtl8380_rtl8218b_perchip[i * 3] &&
|
||||
rtl8380_rtl8218b_perchip[i * 3 + 1]; i++) {
|
||||
phy_package_port_write_paged(phydev, rtl8380_rtl8218b_perchip[i * 3],
|
||||
RTL83XX_PAGE_RAW, rtl8380_rtl8218b_perchip[i * 3 + 1],
|
||||
RTL838X_PAGE_RAW, rtl8380_rtl8218b_perchip[i * 3 + 1],
|
||||
rtl8380_rtl8218b_perchip[i * 3 + 2]);
|
||||
}
|
||||
|
||||
/* Enable PHY */
|
||||
for (int i = 0; i < 8; i++) {
|
||||
phy_package_port_write_paged(phydev, i, RTL83XX_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
|
||||
phy_package_port_write_paged(phydev, i, RTL83XX_PAGE_RAW, 0x00, 0x1140);
|
||||
phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
|
||||
phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, 0x00, 0x1140);
|
||||
}
|
||||
mdelay(100);
|
||||
|
||||
/* Request patch */
|
||||
for (int i = 0; i < 8; i++) {
|
||||
phy_package_port_write_paged(phydev, i, RTL83XX_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PATCH);
|
||||
phy_package_port_write_paged(phydev, i, RTL83XX_PAGE_RAW, 0x10, 0x0010);
|
||||
phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PATCH);
|
||||
phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, 0x10, 0x0010);
|
||||
}
|
||||
|
||||
mdelay(300);
|
||||
@ -916,7 +990,7 @@ static int rtl8380_configure_ext_rtl8218b(struct phy_device *phydev)
|
||||
/* Use Broadcast ID method for patching */
|
||||
rtl821x_phy_setup_package_broadcast(phydev, true);
|
||||
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, 30, 8);
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, 30, 8);
|
||||
phy_write_paged(phydev, 0x26e, 17, 0xb);
|
||||
phy_write_paged(phydev, 0x26e, 16, 0x2);
|
||||
mdelay(1);
|
||||
@ -925,7 +999,7 @@ static int rtl8380_configure_ext_rtl8218b(struct phy_device *phydev)
|
||||
ipd = (ipd >> 4) & 0xf; /* unused ? */
|
||||
|
||||
for (int i = 0; rtl8218B_6276B_rtl8380_perport[i * 2]; i++) {
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, rtl8218B_6276B_rtl8380_perport[i * 2],
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, rtl8218B_6276B_rtl8380_perport[i * 2],
|
||||
rtl8218B_6276B_rtl8380_perport[i * 2 + 1]);
|
||||
}
|
||||
|
||||
@ -935,21 +1009,6 @@ static int rtl8380_configure_ext_rtl8218b(struct phy_device *phydev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rtl8218b_ext_match_phy_device(struct phy_device *phydev)
|
||||
{
|
||||
int addr = phydev->mdio.addr;
|
||||
|
||||
/* Both the RTL8214FC and the external RTL8218B have the same
|
||||
* PHY ID. On the RTL838x, the RTL8218B can only be attached_dev
|
||||
* at PHY IDs 0-7, while the RTL8214FC must be attached via
|
||||
* the pair of SGMII/1000Base-X with higher PHY-IDs
|
||||
*/
|
||||
if (soc_info.family == RTL8380_FAMILY_ID)
|
||||
return phydev->phy_id == PHY_ID_RTL8218B_E && addr < 8;
|
||||
else
|
||||
return phydev->phy_id == PHY_ID_RTL8218B_E;
|
||||
}
|
||||
|
||||
static bool rtl8214fc_media_is_fibre(struct phy_device *phydev)
|
||||
{
|
||||
int mac = phydev->mdio.addr;
|
||||
@ -957,9 +1016,9 @@ static bool rtl8214fc_media_is_fibre(struct phy_device *phydev)
|
||||
static int reg[] = {16, 19, 20, 21};
|
||||
u32 val;
|
||||
|
||||
phy_package_write_paged(phydev, RTL83XX_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_INTERNAL);
|
||||
phy_package_write_paged(phydev, RTL838X_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_INTERNAL);
|
||||
val = phy_package_read_paged(phydev, RTL821X_PAGE_PORT, reg[mac % 4]);
|
||||
phy_package_write_paged(phydev, RTL83XX_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_AUTO);
|
||||
phy_package_write_paged(phydev, RTL838X_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_AUTO);
|
||||
|
||||
if (val & BMCR_PDOWN)
|
||||
return false;
|
||||
@ -973,10 +1032,10 @@ static void rtl8214fc_power_set(struct phy_device *phydev, int port, bool on)
|
||||
|
||||
if (port == PORT_FIBRE) {
|
||||
pr_info("%s: Powering %s FIBRE (port %d)\n", __func__, state, phydev->mdio.addr);
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_FIBRE);
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_FIBRE);
|
||||
} else {
|
||||
pr_info("%s: Powering %s COPPER (port %d)\n", __func__, state, phydev->mdio.addr);
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_COPPER);
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_COPPER);
|
||||
}
|
||||
|
||||
if (on) {
|
||||
@ -985,7 +1044,7 @@ static void rtl8214fc_power_set(struct phy_device *phydev, int port, bool on)
|
||||
phy_modify_paged(phydev, RTL821X_PAGE_POWER, 0x10, 0, BMCR_PDOWN);
|
||||
}
|
||||
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_AUTO);
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_AUTO);
|
||||
}
|
||||
|
||||
static int rtl8214fc_suspend(struct phy_device *phydev)
|
||||
@ -1017,7 +1076,7 @@ static void rtl8214fc_media_set(struct phy_device *phydev, bool set_fibre)
|
||||
int val;
|
||||
|
||||
pr_info("%s: port %d, set_fibre: %d\n", __func__, mac, set_fibre);
|
||||
phy_package_write_paged(phydev, RTL83XX_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_INTERNAL);
|
||||
phy_package_write_paged(phydev, RTL838X_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_INTERNAL);
|
||||
val = phy_package_read_paged(phydev, RTL821X_PAGE_PORT, reg[mac % 4]);
|
||||
|
||||
val |= BIT(10);
|
||||
@ -1027,9 +1086,9 @@ static void rtl8214fc_media_set(struct phy_device *phydev, bool set_fibre)
|
||||
val |= BMCR_PDOWN;
|
||||
}
|
||||
|
||||
phy_package_write_paged(phydev, RTL83XX_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_INTERNAL);
|
||||
phy_package_write_paged(phydev, RTL838X_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_INTERNAL);
|
||||
phy_package_write_paged(phydev, RTL821X_PAGE_PORT, reg[mac % 4], val);
|
||||
phy_package_write_paged(phydev, RTL83XX_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_AUTO);
|
||||
phy_package_write_paged(phydev, RTL838X_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_AUTO);
|
||||
|
||||
if (!phydev->suspended) {
|
||||
if (set_fibre) {
|
||||
@ -1296,11 +1355,6 @@ static int rtl8218d_set_eee(struct phy_device *phydev, struct ethtool_eee *e)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rtl8214c_match_phy_device(struct phy_device *phydev)
|
||||
{
|
||||
return phydev->phy_id == PHY_ID_RTL8214C;
|
||||
}
|
||||
|
||||
static int rtl8380_configure_rtl8214c(struct phy_device *phydev)
|
||||
{
|
||||
u32 phy_id, val;
|
||||
@ -1359,8 +1413,8 @@ static int rtl8380_configure_rtl8214fc(struct phy_device *phydev)
|
||||
rtl8380_rtl8214fc_perport = (void *)h + sizeof(struct fw_header) + h->parts[1].start;
|
||||
|
||||
/* detect phy version */
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, 27, 0x0004);
|
||||
val = phy_read_paged(phydev, RTL83XX_PAGE_RAW, 28);
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, 27, 0x0004);
|
||||
val = phy_read_paged(phydev, RTL838X_PAGE_RAW, 28);
|
||||
|
||||
val = phy_read(phydev, 16);
|
||||
if (val & BMCR_PDOWN)
|
||||
@ -1380,10 +1434,10 @@ static int rtl8380_configure_rtl8214fc(struct phy_device *phydev)
|
||||
if (rtl8380_rtl8214fc_perchip[i * 3 + 1] == 0x13 && page == 0x260) {
|
||||
val = phy_read_paged(phydev, 0x260, 13);
|
||||
val = (val & 0x1f00) | (rtl8380_rtl8214fc_perchip[i * 3 + 2] & 0xe0ff);
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW,
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW,
|
||||
rtl8380_rtl8214fc_perchip[i * 3 + 1], val);
|
||||
} else {
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW,
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW,
|
||||
rtl8380_rtl8214fc_perchip[i * 3 + 1],
|
||||
rtl8380_rtl8214fc_perchip[i * 3 + 2]);
|
||||
}
|
||||
@ -1391,14 +1445,14 @@ static int rtl8380_configure_rtl8214fc(struct phy_device *phydev)
|
||||
|
||||
/* Force copper medium */
|
||||
for (int i = 0; i < 4; i++) {
|
||||
phy_package_port_write_paged(phydev, i, RTL83XX_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
|
||||
phy_package_port_write_paged(phydev, i, RTL83XX_PAGE_RAW, RTL821XEXT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_COPPER);
|
||||
phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
|
||||
phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, RTL821XEXT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_COPPER);
|
||||
}
|
||||
|
||||
/* Enable PHY */
|
||||
for (int i = 0; i < 4; i++) {
|
||||
phy_package_port_write_paged(phydev, i, RTL83XX_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
|
||||
phy_package_port_write_paged(phydev, i, RTL83XX_PAGE_RAW, 0x00, 0x1140);
|
||||
phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
|
||||
phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, 0x00, 0x1140);
|
||||
}
|
||||
mdelay(100);
|
||||
|
||||
@ -1419,8 +1473,8 @@ static int rtl8380_configure_rtl8214fc(struct phy_device *phydev)
|
||||
|
||||
/* Request patch */
|
||||
for (int i = 0; i < 4; i++) {
|
||||
phy_package_port_write_paged(phydev, i, RTL83XX_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PATCH);
|
||||
phy_package_port_write_paged(phydev, i, RTL83XX_PAGE_RAW, 0x10, 0x0010);
|
||||
phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PATCH);
|
||||
phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, 0x10, 0x0010);
|
||||
}
|
||||
mdelay(300);
|
||||
|
||||
@ -1442,7 +1496,7 @@ static int rtl8380_configure_rtl8214fc(struct phy_device *phydev)
|
||||
rtl821x_phy_setup_package_broadcast(phydev, true);
|
||||
|
||||
for (int i = 0; rtl8380_rtl8214fc_perport[i * 2]; i++) {
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, rtl8380_rtl8214fc_perport[i * 2],
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, rtl8380_rtl8214fc_perport[i * 2],
|
||||
rtl8380_rtl8214fc_perport[i * 2 + 1]);
|
||||
}
|
||||
|
||||
@ -1451,20 +1505,13 @@ static int rtl8380_configure_rtl8214fc(struct phy_device *phydev)
|
||||
|
||||
/* Auto medium selection */
|
||||
for (int i = 0; i < 4; i++) {
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
|
||||
phy_write_paged(phydev, RTL83XX_PAGE_RAW, RTL821XEXT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_AUTO);
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
|
||||
phy_write_paged(phydev, RTL838X_PAGE_RAW, RTL821XEXT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_AUTO);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rtl8214fc_match_phy_device(struct phy_device *phydev)
|
||||
{
|
||||
int addr = phydev->mdio.addr;
|
||||
|
||||
return phydev->phy_id == PHY_ID_RTL8214FC && addr >= 24;
|
||||
}
|
||||
|
||||
static int rtl8380_configure_serdes(struct phy_device *phydev)
|
||||
{
|
||||
u32 v;
|
||||
@ -3843,10 +3890,9 @@ static int rtl9300_serdes_probe(struct phy_device *phydev)
|
||||
|
||||
static struct phy_driver rtl83xx_phy_driver[] = {
|
||||
{
|
||||
PHY_ID_MATCH_MODEL(PHY_ID_RTL8214C),
|
||||
PHY_ID_MATCH_EXACT(PHY_ID_RTL8214C),
|
||||
.name = "Realtek RTL8214C",
|
||||
.features = PHY_GBIT_FEATURES,
|
||||
.match_phy_device = rtl8214c_match_phy_device,
|
||||
.probe = rtl8214c_phy_probe,
|
||||
.read_page = rtl821x_read_page,
|
||||
.write_page = rtl821x_write_page,
|
||||
@ -3855,10 +3901,9 @@ static struct phy_driver rtl83xx_phy_driver[] = {
|
||||
.set_loopback = genphy_loopback,
|
||||
},
|
||||
{
|
||||
PHY_ID_MATCH_MODEL(PHY_ID_RTL8214FC),
|
||||
.match_phy_device = rtl8214fc_match_phy_device,
|
||||
.name = "Realtek RTL8214FC",
|
||||
.features = PHY_GBIT_FIBRE_FEATURES,
|
||||
.match_phy_device = rtl8214fc_match_phy_device,
|
||||
.probe = rtl8214fc_phy_probe,
|
||||
.read_page = rtl821x_read_page,
|
||||
.write_page = rtl821x_write_page,
|
||||
@ -3871,10 +3916,9 @@ static struct phy_driver rtl83xx_phy_driver[] = {
|
||||
.get_eee = rtl8214fc_get_eee,
|
||||
},
|
||||
{
|
||||
PHY_ID_MATCH_MODEL(PHY_ID_RTL8218B_E),
|
||||
.match_phy_device = rtl8218b_ext_match_phy_device,
|
||||
.name = "Realtek RTL8218B (external)",
|
||||
.features = PHY_GBIT_FEATURES,
|
||||
.match_phy_device = rtl8218b_ext_match_phy_device,
|
||||
.probe = rtl8218b_ext_phy_probe,
|
||||
.read_page = rtl821x_read_page,
|
||||
.write_page = rtl821x_write_page,
|
||||
@ -3885,7 +3929,7 @@ static struct phy_driver rtl83xx_phy_driver[] = {
|
||||
.get_eee = rtl8218b_get_eee,
|
||||
},
|
||||
{
|
||||
PHY_ID_MATCH_MODEL(PHY_ID_RTL8218D),
|
||||
PHY_ID_MATCH_EXACT(PHY_ID_RTL8218D),
|
||||
.name = "REALTEK RTL8218D",
|
||||
.features = PHY_GBIT_FEATURES,
|
||||
.probe = rtl8218d_phy_probe,
|
||||
@ -3990,7 +4034,7 @@ static struct phy_driver rtl83xx_phy_driver[] = {
|
||||
module_phy_driver(rtl83xx_phy_driver);
|
||||
|
||||
static struct mdio_device_id __maybe_unused rtl83xx_tbl[] = {
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_RTL8214FC) },
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_RTL8214_OR_8218) },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
@ -19,21 +19,26 @@ struct __attribute__ ((__packed__)) fw_header {
|
||||
};
|
||||
|
||||
/* TODO: fixed path? */
|
||||
#define FIRMWARE_838X_8380_1 "rtl838x_phy/rtl838x_8380.fw"
|
||||
#define FIRMWARE_838X_8214FC_1 "rtl838x_phy/rtl838x_8214fc.fw"
|
||||
#define FIRMWARE_838X_8218b_1 "rtl838x_phy/rtl838x_8218b.fw"
|
||||
#define FIRMWARE_838X_8380_1 "rtl838x_phy/rtl838x_8380.fw"
|
||||
#define FIRMWARE_838X_8214FC_1 "rtl838x_phy/rtl838x_8214fc.fw"
|
||||
#define FIRMWARE_838X_8218b_1 "rtl838x_phy/rtl838x_8218b.fw"
|
||||
|
||||
/* External RTL8218B and RTL8214FC IDs are identical */
|
||||
#define PHY_ID_RTL8214C 0x001cc942
|
||||
#define PHY_ID_RTL8214FC 0x001cc981
|
||||
#define PHY_ID_RTL8218B_E 0x001cc981
|
||||
#define PHY_ID_RTL8218D 0x001cc983
|
||||
#define PHY_ID_RTL8218B_I 0x001cca40
|
||||
#define PHY_ID_RTL8221B 0x001cc849
|
||||
#define PHY_ID_RTL8226 0x001cc838
|
||||
#define PHY_ID_RTL8390_GENERIC 0x001ccab0
|
||||
#define PHY_ID_RTL8393_I 0x001c8393
|
||||
#define PHY_ID_RTL9300_I 0x70d03106
|
||||
#define PHY_ID_RTL8214C 0x001cc942
|
||||
#define PHY_ID_RTL8218B_E 0x001cc980
|
||||
#define PHY_ID_RTL8214_OR_8218 0x001cc981
|
||||
#define PHY_ID_RTL8218D 0x001cc983
|
||||
#define PHY_ID_RTL8218B_I 0x001cca40
|
||||
#define PHY_ID_RTL8221B 0x001cc849
|
||||
#define PHY_ID_RTL8226 0x001cc838
|
||||
#define PHY_ID_RTL8390_GENERIC 0x001ccab0
|
||||
#define PHY_ID_RTL8393_I 0x001c8393
|
||||
#define PHY_ID_RTL9300_I 0x70d03106
|
||||
|
||||
/* These PHYs share the same id (0x001cc981) */
|
||||
#define PHY_IS_NOT_RTL821X 0
|
||||
#define PHY_IS_RTL8214FC 1
|
||||
#define PHY_IS_RTL8214FB 2
|
||||
#define PHY_IS_RTL8218B_E 3
|
||||
|
||||
/* Registers of the internal Serdes of the 8380 */
|
||||
#define RTL838X_SDS_MODE_SEL (0x0028)
|
||||
|
@ -11,6 +11,7 @@ case $board in
|
||||
friendlyarm,nanopi-r2c|\
|
||||
friendlyarm,nanopi-r2c-plus|\
|
||||
friendlyarm,nanopi-r2s|\
|
||||
friendlyarm,nanopi-r3s|\
|
||||
friendlyarm,nanopi-r4s|\
|
||||
friendlyarm,nanopi-r4se|\
|
||||
friendlyarm,nanopi-r4s-enterprise|\
|
||||
|
@ -14,6 +14,7 @@ rockchip_setup_interfaces()
|
||||
friendlyarm,nanopi-r2c|\
|
||||
friendlyarm,nanopi-r2c-plus|\
|
||||
friendlyarm,nanopi-r2s|\
|
||||
friendlyarm,nanopi-r3s|\
|
||||
friendlyarm,nanopi-r4s|\
|
||||
friendlyarm,nanopi-r4se|\
|
||||
friendlyarm,nanopi-r4s-enterprise|\
|
||||
@ -86,6 +87,13 @@ rockchip_setup_macs()
|
||||
wan_mac=$(macaddr_generate_from_mmc_cid mmcblk1)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
;;
|
||||
friendlyarm,nanopi-r3s|\
|
||||
friendlyarm,nanopi-r5c|\
|
||||
friendlyarm,nanopi-r6c|\
|
||||
xunlong,orangepi-5-plus)
|
||||
wan_mac=$(macaddr_generate_from_mmc_cid mmcblk*)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
;;
|
||||
friendlyarm,nanopi-r4se)
|
||||
wan_mac=$(macaddr_generate_from_mmc_cid mmcblk2)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
@ -94,12 +102,6 @@ rockchip_setup_macs()
|
||||
wan_mac=$(get_mac_binary "/sys/bus/i2c/devices/2-0051/eeprom" 0xfa)
|
||||
lan_mac=$(macaddr_setbit_la "$wan_mac")
|
||||
;;
|
||||
friendlyarm,nanopi-r5c|\
|
||||
friendlyarm,nanopi-r6c|\
|
||||
xunlong,orangepi-5-plus)
|
||||
wan_mac=$(macaddr_generate_from_mmc_cid mmcblk*)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
;;
|
||||
xunlong,orangepi-r1-plus|\
|
||||
xunlong,orangepi-r1-plus-lts)
|
||||
lan_mac=$(cat /sys/class/net/eth1/address)
|
||||
|
@ -34,6 +34,7 @@ armsom,sige3|\
|
||||
armsom,sige7|\
|
||||
ezpro,mrkaio-m68s|\
|
||||
firefly,rk3568-roc-pc|\
|
||||
friendlyarm,nanopi-r3s|\
|
||||
friendlyarm,nanopi-r5c|\
|
||||
friendlyarm,nanopi-r6c|\
|
||||
lunzn,fastrhino-r66s|\
|
||||
|
@ -382,7 +382,6 @@ CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_PWM=y
|
||||
CONFIG_LEDS_SYSCON=y
|
||||
CONFIG_LEDS_TRIGGER_CPU=y
|
||||
CONFIG_LEDS_TRIGGER_DISK=y
|
||||
CONFIG_LEDS_TRIGGER_PANIC=y
|
||||
CONFIG_LIBCRC32C=y
|
||||
CONFIG_LIBFDT=y
|
||||
|
@ -134,6 +134,15 @@ define Device/friendlyarm_nanopi-r2s
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r2s
|
||||
|
||||
define Device/friendlyarm_nanopi-r3s
|
||||
DEVICE_VENDOR := FriendlyARM
|
||||
DEVICE_MODEL := NanoPi R3S
|
||||
SOC := rk3566
|
||||
BOOT_FLOW := pine64-img
|
||||
DEVICE_PACKAGES := kmod-r8168
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r3s
|
||||
|
||||
define Device/friendlyarm_nanopi-r4s
|
||||
DEVICE_VENDOR := FriendlyARM
|
||||
DEVICE_MODEL := NanoPi R4S
|
||||
|
@ -0,0 +1,596 @@
|
||||
From 50decd493c8394c52d04561fe4ede34df27a46ba Mon Sep 17 00:00:00 2001
|
||||
From: Tianling Shen <cnsztl@gmail.com>
|
||||
Date: Mon, 21 Oct 2024 01:39:46 +0800
|
||||
Subject: [PATCH] arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board
|
||||
|
||||
The NanoPi R3S(as "R3S") is an open source platform with dual-Gbps
|
||||
Ethernet ports designed and developed by FriendlyElec for IoT
|
||||
applications.
|
||||
|
||||
Specification:
|
||||
- Rockchip RK3566
|
||||
- 2GB LPDDR4X RAM
|
||||
- optional 32GB eMMC module
|
||||
- SD card slot
|
||||
- 2x 1000 Base-T
|
||||
- 3x LEDs (POWER, LAN, WAN)
|
||||
- 2x Buttons (Reset, MaskROM)
|
||||
- 1x USB 3.0 Port
|
||||
- Type-C 5V 2A Power
|
||||
|
||||
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20241020173946.225960-2-cnsztl@gmail.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/Makefile | 1 +
|
||||
.../boot/dts/rockchip/rk3566-nanopi-r3s.dts | 554 ++++++++++++++++++
|
||||
2 files changed, 555 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -89,6 +89,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-so
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-model-a.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-box-demo.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lubancat-1.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-nanopi-r3s.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r66s.dtb
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
|
||||
@@ -0,0 +1,554 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
+/*
|
||||
+ * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
|
||||
+ *
|
||||
+ * Copyright (c) 2024 FriendlyElec Computer Tech. Co., Ltd.
|
||||
+ * (http://www.friendlyarm.com)
|
||||
+ *
|
||||
+ * Copyright (c) 2024 Tianling Shen <cnsztl@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+#include <dt-bindings/leds/common.h>
|
||||
+#include <dt-bindings/pinctrl/rockchip.h>
|
||||
+#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
+#include "rk3566.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "FriendlyARM NanoPi R3S";
|
||||
+ compatible = "friendlyarm,nanopi-r3s", "rockchip,rk3566";
|
||||
+
|
||||
+ aliases {
|
||||
+ ethernet0 = &gmac1;
|
||||
+ mmc0 = &sdmmc0;
|
||||
+ mmc1 = &sdhci;
|
||||
+ };
|
||||
+
|
||||
+ chosen: chosen {
|
||||
+ stdout-path = "serial2:1500000n8";
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&reset_button_pin>;
|
||||
+
|
||||
+ button-reset {
|
||||
+ label = "reset";
|
||||
+ gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ debounce-interval = <50>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gpio-leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&power_led_pin>, <&lan_led_pin>, <&wan_led_pin>;
|
||||
+
|
||||
+ power_led: led-0 {
|
||||
+ color = <LED_COLOR_ID_RED>;
|
||||
+ function = LED_FUNCTION_POWER;
|
||||
+ gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
+ default-state = "on";
|
||||
+ };
|
||||
+
|
||||
+ lan_led: led-1 {
|
||||
+ color = <LED_COLOR_ID_GREEN>;
|
||||
+ function = LED_FUNCTION_LAN;
|
||||
+ gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ wan_led: led-2 {
|
||||
+ color = <LED_COLOR_ID_GREEN>;
|
||||
+ function = LED_FUNCTION_WAN;
|
||||
+ gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sys: regulator-vcc3v3-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_sys: regulator-vcc5v0-sys {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc5v0_sys";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vdd_usbc>;
|
||||
+ };
|
||||
+
|
||||
+ vcc5v0_usb: regulator-vcc5v0_usb {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ enable-active-high;
|
||||
+ gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&vcc5v0_usb_host_en>;
|
||||
+ regulator-name = "vcc5v0_usb";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+ };
|
||||
+
|
||||
+ vdd_usbc: regulator-vdd-usbc {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vdd_usbc";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&combphy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&combphy2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu1 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu2 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&cpu3 {
|
||||
+ cpu-supply = <&vdd_cpu>;
|
||||
+};
|
||||
+
|
||||
+&gmac1 {
|
||||
+ assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
|
||||
+ assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru CLK_MAC1_2TOP>;
|
||||
+ assigned-clock-rates = <0>, <125000000>;
|
||||
+ clock_in_out = "output";
|
||||
+ phy-mode = "rgmii-id";
|
||||
+ phy-handle = <&rgmii_phy1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&gmac1m0_miim
|
||||
+ &gmac1m0_tx_bus2_level3
|
||||
+ &gmac1m0_rx_bus2
|
||||
+ &gmac1m0_rgmii_clk_level2
|
||||
+ &gmac1m0_rgmii_bus_level3>;
|
||||
+ snps,reset-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
+ snps,reset-active-low;
|
||||
+ /* Reset time is 20ms, 100ms for rtl8211f */
|
||||
+ snps,reset-delays-us = <0 20000 100000>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&gpu {
|
||||
+ mali-supply = <&vdd_gpu>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ vdd_cpu: regulator@1c {
|
||||
+ compatible = "tcs,tcs4525";
|
||||
+ reg = <0x1c>;
|
||||
+ fcs,suspend-voltage-selector = <1>;
|
||||
+ regulator-name = "vdd_cpu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <800000>;
|
||||
+ regulator-max-microvolt = <1150000>;
|
||||
+ regulator-ramp-delay = <2300>;
|
||||
+ vin-supply = <&vcc5v0_sys>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rk809: pmic@20 {
|
||||
+ compatible = "rockchip,rk809";
|
||||
+ reg = <0x20>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ #clock-cells = <1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pmic_int>;
|
||||
+ system-power-controller;
|
||||
+ vcc1-supply = <&vcc3v3_sys>;
|
||||
+ vcc2-supply = <&vcc3v3_sys>;
|
||||
+ vcc3-supply = <&vcc3v3_sys>;
|
||||
+ vcc4-supply = <&vcc3v3_sys>;
|
||||
+ vcc5-supply = <&vcc3v3_sys>;
|
||||
+ vcc6-supply = <&vcc3v3_sys>;
|
||||
+ vcc7-supply = <&vcc3v3_sys>;
|
||||
+ vcc8-supply = <&vcc3v3_sys>;
|
||||
+ vcc9-supply = <&vcc3v3_sys>;
|
||||
+ wakeup-source;
|
||||
+
|
||||
+ regulators {
|
||||
+ vdd_logic: DCDC_REG1 {
|
||||
+ regulator-name = "vdd_logic";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_gpu: DCDC_REG2 {
|
||||
+ regulator-name = "vdd_gpu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: DCDC_REG3 {
|
||||
+ regulator-name = "vcc_ddr";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdd_npu: DCDC_REG4 {
|
||||
+ regulator-name = "vdd_npu";
|
||||
+ regulator-initial-mode = <0x2>;
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ regulator-max-microvolt = <1350000>;
|
||||
+ regulator-ramp-delay = <6001>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v8: DCDC_REG5 {
|
||||
+ regulator-name = "vcc_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda0v9_image: LDO_REG1 {
|
||||
+ regulator-name = "vdda0v9_image";
|
||||
+ regulator-min-microvolt = <950000>;
|
||||
+ regulator-max-microvolt = <950000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda_0v9: LDO_REG2 {
|
||||
+ regulator-name = "vdda_0v9";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vdda0v9_pmu: LDO_REG3 {
|
||||
+ regulator-name = "vdda0v9_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <900000>;
|
||||
+ regulator-max-microvolt = <900000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <900000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_acodec: LDO_REG4 {
|
||||
+ regulator-name = "vccio_acodec";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vccio_sd: LDO_REG5 {
|
||||
+ regulator-name = "vccio_sd";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_pmu: LDO_REG6 {
|
||||
+ regulator-name = "vcc3v3_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <3300000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca_1v8: LDO_REG7 {
|
||||
+ regulator-name = "vcca_1v8";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_pmu: LDO_REG8 {
|
||||
+ regulator-name = "vcca1v8_pmu";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-on-in-suspend;
|
||||
+ regulator-suspend-microvolt = <1800000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcca1v8_image: LDO_REG9 {
|
||||
+ regulator-name = "vcca1v8_image";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v3: SWITCH_REG1 {
|
||||
+ regulator-name = "vcc_3v3";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_sd: SWITCH_REG2 {
|
||||
+ regulator-name = "vcc3v3_sd";
|
||||
+ regulator-always-on;
|
||||
+ regulator-boot-on;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ hym8563: rtc@51 {
|
||||
+ compatible = "haoyu,hym8563";
|
||||
+ reg = <0x51>;
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-output-names = "hym8563";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hym8563_int>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ wakeup-source;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mdio1 {
|
||||
+ rgmii_phy1: ethernet-phy@1 {
|
||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||
+ reg = <1>;
|
||||
+ interrupt-parent = <&gpio4>;
|
||||
+ interrupts = <RK_PC3 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <ð_phy_reset_pin>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pcie2x1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie_reset_h>;
|
||||
+ reset-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ gpio-leds {
|
||||
+ lan_led_pin: lan-led-pin {
|
||||
+ rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ power_led_pin: power-led-pin {
|
||||
+ rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+
|
||||
+ wan_led_pin: wan-led-pin {
|
||||
+ rockchip,pins = <3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gmac {
|
||||
+ eth_phy_reset_pin: eth-phy-reset-pin {
|
||||
+ rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pcie {
|
||||
+ pcie_reset_h: pcie-reset-h {
|
||||
+ rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pmic {
|
||||
+ pmic_int: pmic-int {
|
||||
+ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rockchip-key {
|
||||
+ reset_button_pin: reset-button-pin {
|
||||
+ rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rtc {
|
||||
+ hym8563_int: hym8563-int {
|
||||
+ rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb {
|
||||
+ vcc5v0_usb_host_en: vcc5v0-usb-host-en {
|
||||
+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pmu_io_domains {
|
||||
+ status = "okay";
|
||||
+ pmuio1-supply = <&vcc3v3_pmu>;
|
||||
+ pmuio2-supply = <&vcc3v3_pmu>;
|
||||
+ vccio1-supply = <&vccio_acodec>;
|
||||
+ vccio2-supply = <&vcc_1v8>;
|
||||
+ vccio3-supply = <&vccio_sd>;
|
||||
+ vccio4-supply = <&vcc_3v3>;
|
||||
+ vccio5-supply = <&vcc_1v8>;
|
||||
+ vccio6-supply = <&vcc_3v3>;
|
||||
+ vccio7-supply = <&vcc_3v3>;
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ bus-width = <8>;
|
||||
+ max-frequency = <200000000>;
|
||||
+ non-removable;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sdmmc0 {
|
||||
+ bus-width = <4>;
|
||||
+ cap-mmc-highspeed;
|
||||
+ cap-sd-highspeed;
|
||||
+ disable-wp;
|
||||
+ no-sdio;
|
||||
+ no-mmc;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
|
||||
+ sd-uhs-sdr50;
|
||||
+ vmmc-supply = <&vcc3v3_sd>;
|
||||
+ vqmmc-supply = <&vccio_sd>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tsadc {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0_host {
|
||||
+ phy-supply = <&vcc5v0_usb>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb2phy0_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_xhci {
|
||||
+ extcon = <&usb2phy0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host1_xhci {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vop {
|
||||
+ assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
|
||||
+ assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vop_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
@ -0,0 +1,38 @@
|
||||
From b5bf84206a5c77528f9dd4cbca4e72caa063c102 Mon Sep 17 00:00:00 2001
|
||||
From: Tianling Shen <cnsztl@gmail.com>
|
||||
Date: Wed, 23 Oct 2024 03:35:26 +0800
|
||||
Subject: [PATCH] arm64: dts: rockchip: fix model name for FriendlyElec NanoPi
|
||||
R3S
|
||||
|
||||
Use the marketing name for model name, this matches the dt-binding.
|
||||
Also update the website url in copyright.
|
||||
|
||||
Fixes: 50decd493c83 ("arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board")
|
||||
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20241022193537.1117919-2-cnsztl@gmail.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (c) 2020 Rockchip Electronics Co., Ltd.
|
||||
*
|
||||
* Copyright (c) 2024 FriendlyElec Computer Tech. Co., Ltd.
|
||||
- * (http://www.friendlyarm.com)
|
||||
+ * (http://www.friendlyelec.com)
|
||||
*
|
||||
* Copyright (c) 2024 Tianling Shen <cnsztl@gmail.com>
|
||||
*/
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "rk3566.dtsi"
|
||||
|
||||
/ {
|
||||
- model = "FriendlyARM NanoPi R3S";
|
||||
+ model = "FriendlyElec NanoPi R3S";
|
||||
compatible = "friendlyarm,nanopi-r3s", "rockchip,rk3566";
|
||||
|
||||
aliases {
|
@ -0,0 +1,40 @@
|
||||
From 82b2868937883b65732da498b26366d34db61510 Mon Sep 17 00:00:00 2001
|
||||
From: Tianling Shen <cnsztl@gmail.com>
|
||||
Date: Wed, 23 Oct 2024 03:35:27 +0800
|
||||
Subject: [PATCH] arm64: dts: rockchip: replace deprecated snps,reset props for
|
||||
NanoPi R3S
|
||||
|
||||
Replace deprecated snps,reset props and move them to the PHY node.
|
||||
|
||||
Fixes: 50decd493c83 ("arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board")
|
||||
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20241022193537.1117919-3-cnsztl@gmail.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
|
||||
@@ -149,10 +149,6 @@
|
||||
&gmac1m0_rx_bus2
|
||||
&gmac1m0_rgmii_clk_level2
|
||||
&gmac1m0_rgmii_bus_level3>;
|
||||
- snps,reset-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
- snps,reset-active-low;
|
||||
- /* Reset time is 20ms, 100ms for rtl8211f */
|
||||
- snps,reset-delays-us = <0 20000 100000>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -414,6 +410,9 @@
|
||||
interrupts = <RK_PC3 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <ð_phy_reset_pin>;
|
||||
+ reset-assert-us = <20000>;
|
||||
+ reset-deassert-us = <100000>;
|
||||
+ reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
@ -0,0 +1,35 @@
|
||||
From 17e150fdd983c7e59b9240e34a166285f3c3fb39 Mon Sep 17 00:00:00 2001
|
||||
From: Tianling Shen <cnsztl@gmail.com>
|
||||
Date: Wed, 23 Oct 2024 03:35:28 +0800
|
||||
Subject: [PATCH] arm64: dts: rockchip: sort props in pmu_io_domains node for
|
||||
NanoPi R3S
|
||||
|
||||
The status prop is typically the last prop.
|
||||
|
||||
Fixes: 50decd493c83 ("arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board")
|
||||
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20241022193537.1117919-4-cnsztl@gmail.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
|
||||
@@ -476,7 +476,6 @@
|
||||
};
|
||||
|
||||
&pmu_io_domains {
|
||||
- status = "okay";
|
||||
pmuio1-supply = <&vcc3v3_pmu>;
|
||||
pmuio2-supply = <&vcc3v3_pmu>;
|
||||
vccio1-supply = <&vccio_acodec>;
|
||||
@@ -486,6 +485,7 @@
|
||||
vccio5-supply = <&vcc_1v8>;
|
||||
vccio6-supply = <&vcc_3v3>;
|
||||
vccio7-supply = <&vcc_3v3>;
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
&sdhci {
|
@ -0,0 +1,26 @@
|
||||
From 1b5365034410f1ca21adadadd492b99bdf4f2c55 Mon Sep 17 00:00:00 2001
|
||||
From: Tianling Shen <cnsztl@gmail.com>
|
||||
Date: Wed, 23 Oct 2024 03:35:29 +0800
|
||||
Subject: [PATCH] arm64: dts: rockchip: enable eMMC HS200 mode for NanoPi R3S
|
||||
|
||||
It is required to boot from eMMC without additional patch in u-boot.
|
||||
|
||||
Fixes: 50decd493c83 ("arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board")
|
||||
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20241022193537.1117919-5-cnsztl@gmail.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
|
||||
@@ -491,6 +491,7 @@
|
||||
&sdhci {
|
||||
bus-width = <8>;
|
||||
max-frequency = <200000000>;
|
||||
+ mmc-hs200-1_8v;
|
||||
non-removable;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
|
@ -0,0 +1,31 @@
|
||||
From b7cd1115456d312f8c5e60c80fdc35fd35ea6eab Mon Sep 17 00:00:00 2001
|
||||
From: Tianling Shen <cnsztl@gmail.com>
|
||||
Date: Wed, 23 Oct 2024 03:35:30 +0800
|
||||
Subject: [PATCH] arm64: dts: rockchip: reorder mmc aliases for NanoPi R3S
|
||||
|
||||
Typically any non-removable storage (emmc) is listed before removable
|
||||
storage (sd-card) options. Also U-Boot will try to override and use
|
||||
mmc0=sdhci and mmc1=sdmmc0 for all rk356x boards.
|
||||
|
||||
Fixes: 50decd493c83 ("arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board")
|
||||
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20241022193537.1117919-6-cnsztl@gmail.com
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
aliases {
|
||||
ethernet0 = &gmac1;
|
||||
- mmc0 = &sdmmc0;
|
||||
- mmc1 = &sdhci;
|
||||
+ mmc0 = &sdhci;
|
||||
+ mmc1 = &sdmmc0;
|
||||
};
|
||||
|
||||
chosen: chosen {
|
@ -21,7 +21,7 @@ Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -109,3 +109,4 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-ro
|
||||
@@ -110,3 +110,4 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-ro
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-indiedroid-nova.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-khadas-edge2.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-rock-5a.dtb
|
||||
|
@ -36,7 +36,7 @@ Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -105,6 +105,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-ed
|
||||
@@ -106,6 +106,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-ed
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-edgeble-neu6b-io.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-evb1-v10.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-nanopc-t6.dtb
|
||||
|
@ -44,7 +44,7 @@ Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
|
||||
--- a/arch/arm64/boot/dts/rockchip/Makefile
|
||||
+++ b/arch/arm64/boot/dts/rockchip/Makefile
|
||||
@@ -101,6 +101,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-ra
|
||||
@@ -102,6 +102,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-ra
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-roc-pc.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3b.dtb
|
||||
|
@ -209,6 +209,28 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
/delete-node/ display-subsystem;
|
||||
|
||||
gpio-leds {
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
|
||||
@@ -24,6 +24,11 @@
|
||||
ethernet0 = &gmac1;
|
||||
mmc0 = &sdhci;
|
||||
mmc1 = &sdmmc0;
|
||||
+
|
||||
+ led-boot = &power_led;
|
||||
+ led-failsafe = &power_led;
|
||||
+ led-running = &power_led;
|
||||
+ led-upgrade = &power_led;
|
||||
};
|
||||
|
||||
chosen: chosen {
|
||||
@@ -52,7 +57,6 @@
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||
- default-state = "on";
|
||||
};
|
||||
|
||||
lan_led: led-1 {
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
|
||||
@@ -17,7 +17,7 @@
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <linux/tcp.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
@@ -5371,6 +5372,7 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5373,6 +5374,7 @@ static int rtl_init_one(struct pci_dev *
|
||||
int jumbo_max, region, rc;
|
||||
enum mac_version chipset;
|
||||
struct net_device *dev;
|
||||
@ -16,7 +16,7 @@
|
||||
u32 txconfig;
|
||||
u16 xid;
|
||||
|
||||
@@ -5378,6 +5380,9 @@ static int rtl_init_one(struct pci_dev *
|
||||
@@ -5380,6 +5382,9 @@ static int rtl_init_one(struct pci_dev *
|
||||
if (!dev)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -101,6 +101,35 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
+ };
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3566-nanopi-r3s.dts
|
||||
@@ -414,6 +414,7 @@
|
||||
interrupts = <RK_PC3 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <ð_phy_reset_pin>;
|
||||
+ realtek,led-data = <0xae00>;
|
||||
reset-assert-us = <20000>;
|
||||
reset-deassert-us = <100000>;
|
||||
reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||
@@ -425,6 +426,18 @@
|
||||
pinctrl-0 = <&pcie_reset_h>;
|
||||
reset-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
+
|
||||
+ pcie@0,0 {
|
||||
+ reg = <0x00000000 0 0 0 0>;
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+
|
||||
+ rtl8168: pcie@1,0 {
|
||||
+ compatible = "pci10ec,8168";
|
||||
+ reg = <0x000000 0 0 0 0>;
|
||||
+ realtek,led-data = <0x870>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3568-fastrhino-r66s.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3568-fastrhino-r66s.dtsi
|
||||
|
@ -18,7 +18,7 @@ Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its
|
||||
#endif /* _IRQ_GIC_COMMON_H */
|
||||
--- a/drivers/irqchip/irq-gic-v3-its.c
|
||||
+++ b/drivers/irqchip/irq-gic-v3-its.c
|
||||
@@ -2186,6 +2186,11 @@ static struct page *its_allocate_prop_ta
|
||||
@@ -2192,6 +2192,11 @@ static struct page *its_allocate_prop_ta
|
||||
{
|
||||
struct page *prop_page;
|
||||
|
||||
@ -30,7 +30,7 @@ Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its
|
||||
prop_page = alloc_pages(gfp_flags, get_order(LPI_PROPBASE_SZ));
|
||||
if (!prop_page)
|
||||
return NULL;
|
||||
@@ -2308,6 +2313,7 @@ static int its_setup_baser(struct its_no
|
||||
@@ -2314,6 +2319,7 @@ static int its_setup_baser(struct its_no
|
||||
u64 baser_phys, tmp;
|
||||
u32 alloc_pages, psz;
|
||||
struct page *page;
|
||||
@ -38,7 +38,7 @@ Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its
|
||||
void *base;
|
||||
|
||||
psz = baser->psz;
|
||||
@@ -2320,7 +2326,10 @@ static int its_setup_baser(struct its_no
|
||||
@@ -2326,7 +2332,10 @@ static int its_setup_baser(struct its_no
|
||||
order = get_order(GITS_BASER_PAGES_MAX * psz);
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its
|
||||
if (!page)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -2960,6 +2969,10 @@ static struct page *its_allocate_pending
|
||||
@@ -2966,6 +2975,10 @@ static struct page *its_allocate_pending
|
||||
{
|
||||
struct page *pend_page;
|
||||
|
||||
@ -61,7 +61,7 @@ Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its
|
||||
pend_page = alloc_pages(gfp_flags | __GFP_ZERO,
|
||||
get_order(LPI_PENDBASE_SZ));
|
||||
if (!pend_page)
|
||||
@@ -3308,7 +3321,12 @@ static bool its_alloc_table_entry(struct
|
||||
@@ -3314,7 +3327,12 @@ static bool its_alloc_table_entry(struct
|
||||
|
||||
/* Allocate memory for 2nd level table */
|
||||
if (!table[idx]) {
|
||||
@ -75,7 +75,7 @@ Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its
|
||||
get_order(baser->psz));
|
||||
if (!page)
|
||||
return false;
|
||||
@@ -3392,6 +3410,7 @@ static struct its_device *its_create_dev
|
||||
@@ -3398,6 +3416,7 @@ static struct its_device *its_create_dev
|
||||
unsigned long *lpi_map = NULL;
|
||||
unsigned long flags;
|
||||
u16 *col_map = NULL;
|
||||
@ -83,7 +83,7 @@ Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its
|
||||
void *itt;
|
||||
int lpi_base;
|
||||
int nr_lpis;
|
||||
@@ -3404,7 +3423,11 @@ static struct its_device *its_create_dev
|
||||
@@ -3410,7 +3429,11 @@ static struct its_device *its_create_dev
|
||||
if (WARN_ON(!is_power_of_2(nvecs)))
|
||||
nvecs = roundup_pow_of_two(nvecs);
|
||||
|
||||
@ -96,7 +96,7 @@ Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its
|
||||
/*
|
||||
* Even if the device wants a single LPI, the ITT must be
|
||||
* sized as a power of two (and you need at least one bit...).
|
||||
@@ -3412,7 +3435,7 @@ static struct its_device *its_create_dev
|
||||
@@ -3418,7 +3441,7 @@ static struct its_device *its_create_dev
|
||||
nr_ites = max(2, nvecs);
|
||||
sz = nr_ites * (FIELD_GET(GITS_TYPER_ITT_ENTRY_SIZE, its->typer) + 1);
|
||||
sz = max(sz, ITS_ITT_ALIGN) + ITS_ITT_ALIGN - 1;
|
||||
@ -105,7 +105,7 @@ Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its
|
||||
if (alloc_lpis) {
|
||||
lpi_map = its_lpi_alloc(nvecs, &lpi_base, &nr_lpis);
|
||||
if (lpi_map)
|
||||
@@ -4730,6 +4753,21 @@ static bool __maybe_unused its_enable_qu
|
||||
@@ -4742,6 +4765,21 @@ static bool __maybe_unused its_enable_qu
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its
|
||||
static bool __maybe_unused its_enable_rk3588001(void *data)
|
||||
{
|
||||
struct its_node *its = data;
|
||||
@@ -4800,6 +4838,12 @@ static const struct gic_quirk its_quirks
|
||||
@@ -4812,6 +4850,12 @@ static const struct gic_quirk its_quirks
|
||||
#endif
|
||||
#ifdef CONFIG_ROCKCHIP_ERRATUM_3588001
|
||||
{
|
||||
@ -140,7 +140,7 @@ Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its
|
||||
.desc = "ITS: Rockchip erratum RK3588001",
|
||||
.iidr = 0x0201743b,
|
||||
.mask = 0xffffffff,
|
||||
@@ -5065,6 +5109,7 @@ static int __init its_probe_one(struct i
|
||||
@@ -5077,6 +5121,7 @@ static int __init its_probe_one(struct i
|
||||
{
|
||||
u64 baser, tmp;
|
||||
struct page *page;
|
||||
@ -148,7 +148,7 @@ Subject: [PATCH] irqchip: gic-v3: add hackaround for rk3568 its
|
||||
u32 ctlr;
|
||||
int err;
|
||||
|
||||
@@ -5100,7 +5145,9 @@ static int __init its_probe_one(struct i
|
||||
@@ -5112,7 +5157,9 @@ static int __init its_probe_one(struct i
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,10 +16,10 @@
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-r4s-enterprise.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-orangepi.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pinebook-pro.dtb
|
||||
@@ -89,19 +91,24 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-so
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-model-a.dtb
|
||||
@@ -90,19 +92,24 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-so
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-box-demo.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lubancat-1.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-nanopi-r3s.dtb
|
||||
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-armsom-sige3.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
|
||||
@ -41,7 +41,7 @@
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-edgeble-neu6a-io.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-edgeble-neu6b-io.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-evb1-v10.dtb
|
||||
@@ -110,5 +117,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-or
|
||||
@@ -111,5 +118,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-or
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-indiedroid-nova.dtb
|
||||
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-khadas-edge2.dtb
|
||||
|
Loading…
x
Reference in New Issue
Block a user