Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
e4d9899e5e
@ -1,2 +1,2 @@
|
|||||||
LINUX_VERSION-5.15 = .127
|
LINUX_VERSION-5.15 = .128
|
||||||
LINUX_KERNEL_HASH-5.15.127 = add0a575341b263a06e93599fc220a5dd34cb4ca5b9d05097a5db2a061928f26
|
LINUX_KERNEL_HASH-5.15.128 = 0f2eca845183fd76f53b0c867c97f12b9ace2d7e8ee2cdeec7eb2897651b80de
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
LINUX_VERSION-6.1 = .47
|
LINUX_VERSION-6.1 = .48
|
||||||
LINUX_KERNEL_HASH-6.1.47 = 93d58b6af007a5f44dd26831ff310707deb1ab9380c5136a534287eb3fddfcab
|
LINUX_KERNEL_HASH-6.1.48 = c606cbd0353e677df6fae73cc16ba3c9244b98372ed7771d551024016f55ac31
|
||||||
|
@ -107,16 +107,9 @@ define SetupHostCommand
|
|||||||
bin="$$$$$$$$(command -v "$$$$$$$${cmd%% *}")"; \
|
bin="$$$$$$$$(command -v "$$$$$$$${cmd%% *}")"; \
|
||||||
if [ -x "$$$$$$$$bin" ] && eval "$$$$$$$$cmd" >/dev/null 2>/dev/null; then \
|
if [ -x "$$$$$$$$bin" ] && eval "$$$$$$$$cmd" >/dev/null 2>/dev/null; then \
|
||||||
case "$$$$$$$$(ls -dl -- $(STAGING_DIR_HOST)/bin/$(strip $(1)))" in \
|
case "$$$$$$$$(ls -dl -- $(STAGING_DIR_HOST)/bin/$(strip $(1)))" in \
|
||||||
*" -> $$$$$$$$bin"*) \
|
"-"* | \
|
||||||
[ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \
|
*" -> $$$$$$$$bin"* | \
|
||||||
;; \
|
*" -> "[!/]*) \
|
||||||
"-"*) \
|
|
||||||
find "$(STAGING_DIR_HOST)/stamp" | grep $(strip $(1)) && \
|
|
||||||
[ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \
|
|
||||||
;; \
|
|
||||||
*" -> /"*) \
|
|
||||||
;; \
|
|
||||||
*" -> "*) \
|
|
||||||
[ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \
|
[ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \
|
||||||
;; \
|
;; \
|
||||||
esac; \
|
esac; \
|
||||||
|
@ -82,6 +82,13 @@ define U-Boot/rock-pi-e-rk3328
|
|||||||
radxa_rock-pi-e
|
radxa_rock-pi-e
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define U-Boot/rock64-rk3328
|
||||||
|
$(U-Boot/Default/rk3328)
|
||||||
|
NAME:=Rock64
|
||||||
|
BUILD_DEVICES:= \
|
||||||
|
pine64_rock64
|
||||||
|
endef
|
||||||
|
|
||||||
# RK3399 boards
|
# RK3399 boards
|
||||||
|
|
||||||
define U-Boot/Default/rk3399
|
define U-Boot/Default/rk3399
|
||||||
@ -274,6 +281,7 @@ UBOOT_TARGETS := \
|
|||||||
orangepi-r1-plus-lts-rk3328 \
|
orangepi-r1-plus-lts-rk3328 \
|
||||||
roc-cc-rk3328 \
|
roc-cc-rk3328 \
|
||||||
rock-pi-e-rk3328 \
|
rock-pi-e-rk3328 \
|
||||||
|
rock64-rk3328 \
|
||||||
fastrhino-r66s-rk3568 \
|
fastrhino-r66s-rk3568 \
|
||||||
fastrhino-r68s-rk3568 \
|
fastrhino-r68s-rk3568 \
|
||||||
mrkaio-m68s-rk3568 \
|
mrkaio-m68s-rk3568 \
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_VERSION:=2020.07
|
PKG_VERSION:=2023.04
|
||||||
|
|
||||||
PKG_HASH:=c1f5bf9ee6bb6e648edbf19ce2ca9452f614b08a9f886f1a566aa42e8cf05f6a
|
PKG_HASH:=e31cac91545ff41b71cec5d8c22afd695645cd6e2a442ccdacacd60534069341
|
||||||
|
|
||||||
PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
|
PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
|
||||||
|
|
||||||
@ -392,7 +392,7 @@ UBOOT_TARGETS := \
|
|||||||
UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
|
UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
|
||||||
|
|
||||||
UBOOT_MAKE_FLAGS += \
|
UBOOT_MAKE_FLAGS += \
|
||||||
BL31=$(STAGING_DIR_IMAGE)/bl31_sunxi-$(ATF).bin
|
BL31=$(STAGING_DIR_IMAGE)/bl31_sunxi-$(ATF).bin SCP=/dev/null
|
||||||
|
|
||||||
define Build/InstallDev
|
define Build/InstallDev
|
||||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||||
|
@ -1,375 +0,0 @@
|
|||||||
--- a/arch/arm/dts/Makefile
|
|
||||||
+++ b/arch/arm/dts/Makefile
|
|
||||||
@@ -475,6 +475,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
|
|
||||||
sun6i-a31-m9.dtb \
|
|
||||||
sun6i-a31-mele-a1000g-quad.dtb \
|
|
||||||
sun6i-a31-mixtile-loftq.dtb \
|
|
||||||
+ sun6i-a31-pangolin.dtb \
|
|
||||||
sun6i-a31s-colorfly-e708-q1.dtb \
|
|
||||||
sun6i-a31s-cs908.dtb \
|
|
||||||
sun6i-a31s-inet-q972.dtb \
|
|
||||||
--- a/arch/arm/dts/sun6i-a31.dtsi
|
|
||||||
+++ b/arch/arm/dts/sun6i-a31.dtsi
|
|
||||||
@@ -641,6 +641,11 @@
|
|
||||||
function = "lcd0";
|
|
||||||
};
|
|
||||||
|
|
||||||
+ i2c3_pins_a: i2c3@0 {
|
|
||||||
+ allwinner,pins = "PB5", "PB6";
|
|
||||||
+ allwinner,function = "i2c3";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
mmc0_pins_a: mmc0@0 {
|
|
||||||
pins = "PF0", "PF1", "PF2",
|
|
||||||
"PF3", "PF4", "PF5";
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/arch/arm/dts/sun6i-a31-pangolin.dts
|
|
||||||
@@ -0,0 +1,292 @@
|
|
||||||
+/*
|
|
||||||
+ * Copyright 2015, Theobroma Systems Design und Consulting GmbH
|
|
||||||
+ *
|
|
||||||
+ * This file is dual-licensed: you can use it either under the terms
|
|
||||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
|
||||||
+ * licensing only applies to this file, and not this project as a
|
|
||||||
+ * whole.
|
|
||||||
+ *
|
|
||||||
+ * a) This file is free software; you can redistribute it and/or
|
|
||||||
+ * modify it under the terms of the GNU General Public License as
|
|
||||||
+ * published by the Free Software Foundation; either version 2 of the
|
|
||||||
+ * License, or (at your option) any later version.
|
|
||||||
+ *
|
|
||||||
+ * This file is distributed in the hope that it will be useful,
|
|
||||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ * GNU General Public License for more details.
|
|
||||||
+ *
|
|
||||||
+ * Or, alternatively,
|
|
||||||
+ *
|
|
||||||
+ * b) Permission is hereby granted, free of charge, to any person
|
|
||||||
+ * obtaining a copy of this software and associated documentation
|
|
||||||
+ * files (the "Software"), to deal in the Software without
|
|
||||||
+ * restriction, including without limitation the rights to use,
|
|
||||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
|
||||||
+ * sell copies of the Software, and to permit persons to whom the
|
|
||||||
+ * Software is furnished to do so, subject to the following
|
|
||||||
+ * conditions:
|
|
||||||
+ *
|
|
||||||
+ * The above copyright notice and this permission notice shall be
|
|
||||||
+ * included in all copies or substantial portions of the Software.
|
|
||||||
+ *
|
|
||||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
||||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+/dts-v1/;
|
|
||||||
+#include "sun6i-a31.dtsi"
|
|
||||||
+#include "sunxi-common-regulators.dtsi"
|
|
||||||
+
|
|
||||||
+#include <dt-bindings/gpio/gpio.h>
|
|
||||||
+#include <dt-bindings/pinctrl/sun4i-a10.h>
|
|
||||||
+
|
|
||||||
+/ {
|
|
||||||
+ model = "Theobroma Systems A31 Pangolin";
|
|
||||||
+ compatible = "tsd,a31-pangolin", "allwinner,sun6i-a31";
|
|
||||||
+
|
|
||||||
+ aliases {
|
|
||||||
+ serial0 = &uart0;
|
|
||||||
+ serial2 = &uart2;
|
|
||||||
+ spi0 = &spi0;
|
|
||||||
+ spi1 = &spi1;
|
|
||||||
+ spi2 = &spi2;
|
|
||||||
+ spi3 = &spi3;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ chosen {
|
|
||||||
+ stdout-path = "serial2:115200n8";
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ehci0 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ohci0 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ehci1 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ohci1 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ohci2 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&gmac {
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ pinctrl-0 = <&gmac_pins_rgmii_a>;
|
|
||||||
+ phy = <&phy1>;
|
|
||||||
+ phy-mode = "rgmii";
|
|
||||||
+ snps,reset-gpio = <&pio 0 7 GPIO_ACTIVE_LOW>;
|
|
||||||
+ snps,reset-active-low;
|
|
||||||
+ snps,reset-delays-us = <0 10000 30000>;
|
|
||||||
+ status = "okay";
|
|
||||||
+
|
|
||||||
+ phy1: ethernet-phy@4 {
|
|
||||||
+ reg = <4>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&i2c0 {
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ pinctrl-0 = <&i2c0_pins_a>;
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&i2c1 {
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ pinctrl-0 = <&i2c1_pins_a>;
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&i2c2 {
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ pinctrl-0 = <&i2c2_pins_a>;
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&i2c3 {
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ pinctrl-0 = <&i2c3_pins_a>;
|
|
||||||
+ status = "okay";
|
|
||||||
+
|
|
||||||
+ rtc_twi: rtc@6f {
|
|
||||||
+ compatible = "isil,isl1208";
|
|
||||||
+ reg = <0x6f>;
|
|
||||||
+ };
|
|
||||||
+ fan: fan@18 {
|
|
||||||
+ compatible = "ti,amc6821";
|
|
||||||
+ reg = <0x18>;
|
|
||||||
+ cooling-min-state = <0>;
|
|
||||||
+ cooling-max-state = <9>;
|
|
||||||
+ #cooling-cells = <2>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&spi0 {
|
|
||||||
+ status = "okay";
|
|
||||||
+
|
|
||||||
+ flash: flash@0 {
|
|
||||||
+ compatible = "spansion,m25p40";
|
|
||||||
+ spi-max-frequency = <16000000>;
|
|
||||||
+ spi-cpol;
|
|
||||||
+ spi-cpha;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&spi1 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ir {
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ pinctrl-0 = <&ir_pins_a>;
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&mmc0 {
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_pangolin>;
|
|
||||||
+ vmmc-supply = <®_vcc3v0>;
|
|
||||||
+ bus-width = <4>;
|
|
||||||
+ cd-gpios = <&pio 2 19 GPIO_ACTIVE_LOW>; /* PC19 */
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&mmc0_pins_a {
|
|
||||||
+ /* external pull-ups missing for some pins */
|
|
||||||
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&mmc2 {
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ pinctrl-0 = <&mmc2_pins_a>;
|
|
||||||
+ vmmc-supply = <®_vcc3v0>;
|
|
||||||
+ bus-width = <8>;
|
|
||||||
+ non-removable;
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&pio {
|
|
||||||
+ mmc0_cd_pin_pangolin: mmc0_cd_pin@0 {
|
|
||||||
+ allwinner,pins = "PC19";
|
|
||||||
+ allwinner,function = "gpio_in";
|
|
||||||
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
|
||||||
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ leds_pins_pangolin: led_pins@0 {
|
|
||||||
+ allwinner,pins = "PH7", "PC16";
|
|
||||||
+ allwinner,function = "gpio_out";
|
|
||||||
+ allwinner,drive = <SUN4I_PINCTRL_20_MA>;
|
|
||||||
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ mmc2_pins_a: mmc2@0 {
|
|
||||||
+ allwinner,pins = "PC6","PC7","PC8","PC9","PC10","PC11",
|
|
||||||
+ "PC12","PC13","PC14","PC15";
|
|
||||||
+ allwinner,function = "mmc2";
|
|
||||||
+ allwinner,drive = <SUN4I_PINCTRL_30_MA>;
|
|
||||||
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&p2wi {
|
|
||||||
+ status = "okay";
|
|
||||||
+
|
|
||||||
+ axp221: pmic@68 {
|
|
||||||
+ compatible = "x-powers,axp221";
|
|
||||||
+ reg = <0x68>;
|
|
||||||
+ interrupt-parent = <&nmi_intc>;
|
|
||||||
+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
|
||||||
+ interrupt-controller;
|
|
||||||
+ #interrupt-cells = <1>;
|
|
||||||
+ dcdc1-supply = <&vcc_3v0>;
|
|
||||||
+ dcdc5-supply = <&vcc_dram>;
|
|
||||||
+
|
|
||||||
+ regulators {
|
|
||||||
+ x-powers,dcdc-freq = <3000>;
|
|
||||||
+
|
|
||||||
+ vcc_3v0: dcdc1 {
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ regulator-min-microvolt = <3000000>;
|
|
||||||
+ regulator-max-microvolt = <3000000>;
|
|
||||||
+ regulator-name = "vcc-3v0";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ vdd_cpu: dcdc2 {
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ regulator-min-microvolt = <700000>;
|
|
||||||
+ regulator-max-microvolt = <1320000>;
|
|
||||||
+ regulator-name = "vdd-cpu";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ vdd_gpu: dcdc3 {
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ regulator-min-microvolt = <700000>;
|
|
||||||
+ regulator-max-microvolt = <1320000>;
|
|
||||||
+ regulator-name = "vdd-gpu";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ vdd_sys_dll: dcdc4 {
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ regulator-min-microvolt = <1100000>;
|
|
||||||
+ regulator-max-microvolt = <1100000>;
|
|
||||||
+ regulator-name = "vdd-sys-dll";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ vcc_dram: dcdc5 {
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ regulator-min-microvolt = <1500000>;
|
|
||||||
+ regulator-max-microvolt = <1500000>;
|
|
||||||
+ regulator-name = "vcc-dram";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ vcc_wifi: aldo1 {
|
|
||||||
+ regulator-min-microvolt = <3300000>;
|
|
||||||
+ regulator-max-microvolt = <3300000>;
|
|
||||||
+ regulator-name = "vcc_wifi";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ avcc: aldo3 {
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ regulator-min-microvolt = <3000000>;
|
|
||||||
+ regulator-max-microvolt = <3000000>;
|
|
||||||
+ regulator-name = "avcc";
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&uart0 {
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ pinctrl-0 = <&uart0_pins_a>;
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&usb1_vbus_pin_a {
|
|
||||||
+ allwinner,pins = "PD23";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+®_usb1_vbus {
|
|
||||||
+ gpio = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD 23 */
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&usbphy {
|
|
||||||
+ status = "okay";
|
|
||||||
+ usb1_vbus-supply = <®_usb1_vbus>;
|
|
||||||
+};
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/configs/pangolin_defconfig
|
|
||||||
@@ -0,0 +1,36 @@
|
|
||||||
+CONFIG_SUNXI_PANGOLIN=y
|
|
||||||
+CONFIG_SPL=y
|
|
||||||
+CONFIG_SYS_EXTRA_OPTIONS="USB_EHCI,SUNXI_GMAC,RGMII"
|
|
||||||
+CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-pangolin"
|
|
||||||
+CONFIG_VIDEO_VGA_VIA_LCD=y
|
|
||||||
+CONFIG_VIDEO_VGA_EXTERNAL_DAC_EN="PH25"
|
|
||||||
+CONFIG_ARM=y
|
|
||||||
+CONFIG_ARCH_SUNXI=y
|
|
||||||
+CONFIG_MACH_SUN6I=y
|
|
||||||
+CONFIG_DRAM_CHANNELS=1
|
|
||||||
+CONFIG_DRAM_CLK=360
|
|
||||||
+CONFIG_DRAM_ZQ=70
|
|
||||||
+CONFIG_AXP_DCDC1_VOLT=3300
|
|
||||||
+CONFIG_AXP_ALDO1_VOLT=0
|
|
||||||
+CONFIG_AXP_ALDO2_VOLT=1800
|
|
||||||
+CONFIG_AXP_ALDO3_VOLT=3000
|
|
||||||
+CONFIG_AXP_DLDO4_VOLT=3300
|
|
||||||
+CONFIG_AXP_ELDO1_VOLT=1200
|
|
||||||
+CONFIG_AXP_ELDO2_VOLT=2500
|
|
||||||
+CONFIG_AXP_ELDO3_VOLT=3300
|
|
||||||
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
|
||||||
+CONFIG_CONS_INDEX=3
|
|
||||||
+# Vbus gpio for usb1
|
|
||||||
+CONFIG_USB1_VBUS_PIN=""
|
|
||||||
+# No Vbus gpio for usb2
|
|
||||||
+CONFIG_USB2_VBUS_PIN=""
|
|
||||||
+CONFIG_USB=y
|
|
||||||
+CONFIG_DM_USB=y
|
|
||||||
+CONFIG_USB_EHCI=y
|
|
||||||
+CONFIG_USB_KEYBOARD=y
|
|
||||||
+CONFIG_DM_ETH=y
|
|
||||||
+CONFIG_CMD_IMLS=n
|
|
||||||
+CONFIG_ETH_DESIGNWARE=y
|
|
||||||
+CONFIG_DM_SPI=y
|
|
||||||
+CONFIG_DM_SPI_FLASH=y
|
|
||||||
+CONFIG_SUNXI_SPI=y
|
|
||||||
--- a/arch/arm/mach-sunxi/Kconfig
|
|
||||||
+++ b/arch/arm/mach-sunxi/Kconfig
|
|
||||||
@@ -896,6 +896,14 @@ config VIDEO_LCD_PANEL_I2C_SCL
|
|
||||||
Set the SCL pin for the LCD i2c interface. This takes a string in the
|
|
||||||
format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
|
|
||||||
|
|
||||||
+choice
|
|
||||||
+ prompt "Sunxi Board Variant"
|
|
||||||
+ optional
|
|
||||||
+
|
|
||||||
+config SUNXI_PANGOLIN
|
|
||||||
+ bool "Theobroma A31 uQ7 Board"
|
|
||||||
+
|
|
||||||
+endchoice
|
|
||||||
|
|
||||||
# Note only one of these may be selected at a time! But hidden choices are
|
|
||||||
# not supported by Kconfig
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
--- a/configs/A20-OLinuXino-Lime2_defconfig
|
--- a/configs/A20-OLinuXino-Lime2_defconfig
|
||||||
+++ b/configs/A20-OLinuXino-Lime2_defconfig
|
+++ b/configs/A20-OLinuXino-Lime2_defconfig
|
||||||
@@ -23,6 +23,7 @@ CONFIG_ETH_DESIGNWARE=y
|
@@ -26,6 +26,7 @@ CONFIG_ETH_DESIGNWARE=y
|
||||||
CONFIG_RGMII=y
|
CONFIG_RGMII=y
|
||||||
CONFIG_MII=y
|
CONFIG_MII=y
|
||||||
CONFIG_SUN7I_GMAC=y
|
CONFIG_SUN7I_GMAC=y
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
--- a/configs/A20-OLinuXino-Lime2-eMMC_defconfig
|
|
||||||
+++ b/configs/A20-OLinuXino-Lime2-eMMC_defconfig
|
|
||||||
@@ -8,6 +8,8 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
|
||||||
CONFIG_USB0_VBUS_PIN="PC17"
|
|
||||||
CONFIG_USB0_VBUS_DET="PH5"
|
|
||||||
CONFIG_I2C1_ENABLE=y
|
|
||||||
+CONFIG_PHY_MICREL=y
|
|
||||||
+CONFIG_PHY_MICREL_KSZ90X1=y
|
|
||||||
CONFIG_SATAPWR="PC3"
|
|
||||||
CONFIG_SPL_SPI_SUNXI=y
|
|
||||||
CONFIG_AHCI=y
|
|
||||||
--- a/configs/A20-OLinuXino-Lime2_defconfig
|
|
||||||
+++ b/configs/A20-OLinuXino-Lime2_defconfig
|
|
||||||
@@ -7,6 +7,8 @@ CONFIG_MMC0_CD_PIN="PH1"
|
|
||||||
CONFIG_USB0_VBUS_PIN="PC17"
|
|
||||||
CONFIG_USB0_VBUS_DET="PH5"
|
|
||||||
CONFIG_I2C1_ENABLE=y
|
|
||||||
+CONFIG_PHY_MICREL=y
|
|
||||||
+CONFIG_PHY_MICREL_KSZ90X1=y
|
|
||||||
CONFIG_SATAPWR="PC3"
|
|
||||||
CONFIG_AHCI=y
|
|
||||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
|
||||||
--- a/drivers/net/phy/micrel_ksz90x1.c
|
|
||||||
+++ b/drivers/net/phy/micrel_ksz90x1.c
|
|
||||||
@@ -14,6 +14,8 @@
|
|
||||||
#include <errno.h>
|
|
||||||
#include <micrel.h>
|
|
||||||
#include <phy.h>
|
|
||||||
+#include <asm/io.h>
|
|
||||||
+#include <asm/arch/clock.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* KSZ9021 - KSZ9031 common
|
|
||||||
@@ -344,6 +346,10 @@ static int ksz9031_phy_extwrite(struct p
|
|
||||||
static int ksz9031_config(struct phy_device *phydev)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
+ struct sunxi_ccm_reg *const ccm =
|
|
||||||
+ (struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
|
|
||||||
+
|
|
||||||
+ setbits_le32(&ccm->gmac_clk_cfg, CCM_GMAC_CTRL_TX_CLK_DELAY(4));
|
|
||||||
|
|
||||||
ret = ksz9031_of_config(phydev);
|
|
||||||
if (ret)
|
|
@ -14,7 +14,7 @@ More specifically, the following settings are now used:
|
|||||||
|
|
||||||
--- a/arch/arm/mach-sunxi/clock_sun6i.c
|
--- a/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
|
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
@@ -114,11 +114,12 @@ void clock_set_pll1(unsigned int clk)
|
@@ -131,11 +131,12 @@ void clock_set_pll1(unsigned int clk)
|
||||||
struct sunxi_ccm_reg * const ccm =
|
struct sunxi_ccm_reg * const ccm =
|
||||||
(struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
|
(struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
|
||||||
const int p = 0;
|
const int p = 0;
|
||||||
|
@ -18,7 +18,7 @@ required setting for the PLL LDO is 1.37v as per the A31 manual.
|
|||||||
|
|
||||||
--- a/arch/arm/mach-sunxi/clock_sun6i.c
|
--- a/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
|
+++ b/arch/arm/mach-sunxi/clock_sun6i.c
|
||||||
@@ -27,13 +27,26 @@ void clock_init_safe(void)
|
@@ -28,13 +28,26 @@ void clock_init_safe(void)
|
||||||
struct sunxi_prcm_reg * const prcm =
|
struct sunxi_prcm_reg * const prcm =
|
||||||
(struct sunxi_prcm_reg *)SUNXI_PRCM_BASE;
|
(struct sunxi_prcm_reg *)SUNXI_PRCM_BASE;
|
||||||
|
|
||||||
@ -47,8 +47,8 @@ required setting for the PLL LDO is 1.37v as per the A31 manual.
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_MACH_SUN8I_R40) || defined(CONFIG_MACH_SUN50I)
|
#if defined(CONFIG_MACH_SUN8I_R40) || defined(CONFIG_MACH_SUN50I)
|
||||||
--- a/arch/arm/include/asm/arch-sunxi/prcm.h
|
--- a/arch/arm/include/asm/arch-sunxi/prcm_sun6i.h
|
||||||
+++ b/arch/arm/include/asm/arch-sunxi/prcm.h
|
+++ b/arch/arm/include/asm/arch-sunxi/prcm_sun6i.h
|
||||||
@@ -110,13 +110,13 @@
|
@@ -110,13 +110,13 @@
|
||||||
#define PRCM_PLL_CTRL_LDO_OUT_MASK \
|
#define PRCM_PLL_CTRL_LDO_OUT_MASK \
|
||||||
__PRCM_PLL_CTRL_LDO_OUT(0x7)
|
__PRCM_PLL_CTRL_LDO_OUT(0x7)
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
From d7311b6e7cdd1fc0e92665188e650934718cb2b1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
|
|
||||||
Date: Tue, 16 Jun 2015 10:52:01 +0200
|
|
||||||
Subject: sun6i: define alternate-function for UART2 on GPG
|
|
||||||
|
|
||||||
|
|
||||||
--- a/arch/arm/include/asm/arch-sunxi/gpio.h
|
|
||||||
+++ b/arch/arm/include/asm/arch-sunxi/gpio.h
|
|
||||||
@@ -190,6 +190,7 @@ enum sunxi_gpio_number {
|
|
||||||
#define SUN6I_GPG_SDC1 2
|
|
||||||
#define SUN8I_GPG_SDC1 2
|
|
||||||
#define SUN6I_GPG_TWI3 2
|
|
||||||
+#define SUN6I_GPG_UART2 2
|
|
||||||
#define SUN5I_GPG_UART1 4
|
|
||||||
|
|
||||||
#define SUN6I_GPH_PWM 2
|
|
@ -1,30 +0,0 @@
|
|||||||
From c058dfb69136d62f88ae8b121104bdb7ce2df03f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
|
|
||||||
Date: Tue, 16 Jun 2015 10:53:11 +0200
|
|
||||||
Subject: ARM: sun6i: Support console on UART2 (GPG6/GPG7)
|
|
||||||
|
|
||||||
|
|
||||||
--- a/arch/arm/mach-sunxi/board.c
|
|
||||||
+++ b/arch/arm/mach-sunxi/board.c
|
|
||||||
@@ -132,6 +132,10 @@ static int gpio_init(void)
|
|
||||||
sunxi_gpio_set_cfgpin(SUNXI_GPG(3), SUN5I_GPG_UART1);
|
|
||||||
sunxi_gpio_set_cfgpin(SUNXI_GPG(4), SUN5I_GPG_UART1);
|
|
||||||
sunxi_gpio_set_pull(SUNXI_GPG(4), SUNXI_GPIO_PULL_UP);
|
|
||||||
+#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN6I)
|
|
||||||
+ sunxi_gpio_set_cfgpin(SUNXI_GPG(6), SUN6I_GPG_UART2);
|
|
||||||
+ sunxi_gpio_set_cfgpin(SUNXI_GPG(7), SUN6I_GPG_UART2);
|
|
||||||
+ sunxi_gpio_set_pull(SUNXI_GPG(7), SUNXI_GPIO_PULL_UP);
|
|
||||||
#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I)
|
|
||||||
sunxi_gpio_set_cfgpin(SUNXI_GPB(0), SUN8I_GPB_UART2);
|
|
||||||
sunxi_gpio_set_cfgpin(SUNXI_GPB(1), SUN8I_GPB_UART2);
|
|
||||||
--- a/include/configs/sunxi-common.h
|
|
||||||
+++ b/include/configs/sunxi-common.h
|
|
||||||
@@ -244,6 +244,8 @@ extern int soft_i2c_gpio_scl;
|
|
||||||
#endif
|
|
||||||
#elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN5I)
|
|
||||||
#define OF_STDOUT_PATH "/soc@01c00000/serial@01c28400:115200"
|
|
||||||
+#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN6I)
|
|
||||||
+#define OF_STDOUT_PATH "/soc@01c00000/serial@01c28800:115200"
|
|
||||||
#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I)
|
|
||||||
#define OF_STDOUT_PATH "/soc@01c00000/serial@01c28800:115200"
|
|
||||||
#elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_MACH_SUN8I)
|
|
@ -1,23 +0,0 @@
|
|||||||
From 78d5fab8e345b1273ec8c22d06f1a1d27670b518 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
|
|
||||||
Date: Tue, 16 Jun 2015 10:59:38 +0200
|
|
||||||
Subject: ARM: sunxi: Make CONS_INDEX configurable
|
|
||||||
|
|
||||||
|
|
||||||
--- a/arch/arm/mach-sunxi/Kconfig
|
|
||||||
+++ b/arch/arm/mach-sunxi/Kconfig
|
|
||||||
@@ -559,6 +559,14 @@ config SYS_BOARD
|
|
||||||
config SYS_SOC
|
|
||||||
default "sunxi"
|
|
||||||
|
|
||||||
+config CONS_INDEX
|
|
||||||
+ int "UART used for console"
|
|
||||||
+ range 1 5
|
|
||||||
+ default 1
|
|
||||||
+ ---help---
|
|
||||||
+ Defines the UART port used for serial output. It starts at 1 so UART0 is 1,
|
|
||||||
+ UART1 is 2 and so on.
|
|
||||||
+
|
|
||||||
config UART0_PORT_F
|
|
||||||
bool "UART0 on MicroSD breakout board"
|
|
||||||
default n
|
|
@ -17,7 +17,7 @@ Cc: Simon Glass <sjg@chromium.org>
|
|||||||
|
|
||||||
--- a/tools/fit_image.c
|
--- a/tools/fit_image.c
|
||||||
+++ b/tools/fit_image.c
|
+++ b/tools/fit_image.c
|
||||||
@@ -751,9 +751,14 @@ static int fit_handle_file(struct image_
|
@@ -754,9 +754,14 @@ static int fit_handle_file(struct image_
|
||||||
}
|
}
|
||||||
*cmd = '\0';
|
*cmd = '\0';
|
||||||
} else if (params->datafile) {
|
} else if (params->datafile) {
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
From def280c4792262a368c8861312dc6b376181021f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
|
||||||
Date: Mon, 1 Jan 2018 23:10:56 +0100
|
|
||||||
Subject: sunxi: deactivate binman
|
|
||||||
|
|
||||||
Use the old way to generate the images instead of binman.
|
|
||||||
binman needs python with swig to avoid this host tool dependency use the
|
|
||||||
old way of generating images.
|
|
||||||
---
|
|
||||||
Makefile | 7 ++++---
|
|
||||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -1607,8 +1607,10 @@ endif
|
|
||||||
|
|
||||||
ifneq ($(CONFIG_ARCH_SUNXI),)
|
|
||||||
ifeq ($(CONFIG_ARM64),)
|
|
||||||
-u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE
|
|
||||||
- $(call if_changed,binman)
|
|
||||||
+OBJCOPYFLAGS_u-boot-sunxi-with-spl.bin = -I binary -O binary \
|
|
||||||
+ --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff
|
|
||||||
+u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img FORCE
|
|
||||||
+ $(call if_changed,pad_cat)
|
|
||||||
else
|
|
||||||
u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.itb FORCE
|
|
||||||
$(call if_changed,cat)
|
|
||||||
--- a/arch/arm/Kconfig
|
|
||||||
+++ b/arch/arm/Kconfig
|
|
||||||
@@ -995,7 +995,6 @@ config ARCH_SOCFPGA
|
|
||||||
|
|
||||||
config ARCH_SUNXI
|
|
||||||
bool "Support sunxi (Allwinner) SoCs"
|
|
||||||
- select BINMAN
|
|
||||||
select CMD_GPIO
|
|
||||||
select CMD_MMC if MMC
|
|
||||||
select CMD_USB if DISTRO_DEFAULTS
|
|
@ -1,19 +0,0 @@
|
|||||||
--- a/configs/A13-OLinuXino_defconfig
|
|
||||||
+++ b/configs/A13-OLinuXino_defconfig
|
|
||||||
@@ -7,7 +7,6 @@ CONFIG_DRAM_EMR1=0
|
|
||||||
CONFIG_MMC0_CD_PIN="PG0"
|
|
||||||
CONFIG_USB0_VBUS_DET="PG1"
|
|
||||||
CONFIG_USB1_VBUS_PIN="PG11"
|
|
||||||
-CONFIG_AXP_GPIO=y
|
|
||||||
# CONFIG_VIDEO_HDMI is not set
|
|
||||||
CONFIG_VIDEO_VGA_VIA_LCD=y
|
|
||||||
CONFIG_VIDEO_VGA_VIA_LCD_FORCE_SYNC_ACTIVE_HIGH=y
|
|
||||||
@@ -20,7 +19,7 @@ CONFIG_CMD_USB_MASS_STORAGE=y
|
|
||||||
CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-olinuxino"
|
|
||||||
CONFIG_DFU_RAM=y
|
|
||||||
CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
|
|
||||||
-CONFIG_AXP_ALDO3_VOLT=3300
|
|
||||||
+CONFIG_SUNXI_NO_PMIC=y
|
|
||||||
CONFIG_CONS_INDEX=2
|
|
||||||
CONFIG_USB_EHCI_HCD=y
|
|
||||||
CONFIG_USB_OHCI_HCD=y
|
|
@ -1,148 +0,0 @@
|
|||||||
From 2527b24f39d8f27ba2fd922ca27a1f14119cfa1b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Yu-Tung Chang <mtwget@gmail.com>
|
|
||||||
Date: Sat, 19 Jun 2021 16:16:45 +0800
|
|
||||||
Subject: [PATCH] sunxi: h3: Add initial ZeroPi support
|
|
||||||
|
|
||||||
ZeroPi is a new board of high performance with low cost
|
|
||||||
designed by FriendlyElec., using the Allwinner H3 SOC.
|
|
||||||
|
|
||||||
ZeroPi features
|
|
||||||
- Allwinner H3, Quad-core Cortex-A7@1.2GHz
|
|
||||||
- 256MB/512MB DDR3 RAM
|
|
||||||
- microsd slot
|
|
||||||
- 10/100/1000Mbps Ethernet
|
|
||||||
- Debug Serial Port
|
|
||||||
- DC 5V/2A power-supply
|
|
||||||
|
|
||||||
Signed-off-by: Yu-Tung Chang <mtwget@gmail.com>
|
|
||||||
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
|
|
||||||
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
|
|
||||||
---
|
|
||||||
--- a/arch/arm/dts/Makefile
|
|
||||||
+++ b/arch/arm/dts/Makefile
|
|
||||||
@@ -560,7 +560,8 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \
|
|
||||||
sun8i-h3-orangepi-plus.dtb \
|
|
||||||
sun8i-h3-orangepi-plus2e.dtb \
|
|
||||||
sun8i-h3-orangepi-zero-plus2.dtb \
|
|
||||||
- sun8i-h3-rervision-dvk.dtb
|
|
||||||
+ sun8i-h3-rervision-dvk.dtb \
|
|
||||||
+ sun8i-h3-zeropi.dtb
|
|
||||||
dtb-$(CONFIG_MACH_SUN8I_R40) += \
|
|
||||||
sun8i-r40-bananapi-m2-ultra.dtb \
|
|
||||||
sun8i-v40-bananapi-m2-berry.dtb
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/arch/arm/dts/sun8i-h3-zeropi.dts
|
|
||||||
@@ -0,0 +1,85 @@
|
|
||||||
+/*
|
|
||||||
+ * Copyright (C) 2020 Yu-Tung Chang <mtwget@gmail.com>
|
|
||||||
+ *
|
|
||||||
+ * This file is dual-licensed: you can use it either under the terms
|
|
||||||
+ * of the GPL or the X11 license, at your option. Note that this dual
|
|
||||||
+ * licensing only applies to this file, and not this project as a
|
|
||||||
+ * whole.
|
|
||||||
+ *
|
|
||||||
+ * a) This file is free software; you can redistribute it and/or
|
|
||||||
+ * modify it under the terms of the GNU General Public License as
|
|
||||||
+ * published by the Free Software Foundation; either version 2 of the
|
|
||||||
+ * License, or (at your option) any later version.
|
|
||||||
+ *
|
|
||||||
+ * This file is distributed in the hope that it will be useful,
|
|
||||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ * GNU General Public License for more details.
|
|
||||||
+ *
|
|
||||||
+ * Or, alternatively,
|
|
||||||
+ *
|
|
||||||
+ * b) Permission is hereby granted, free of charge, to any person
|
|
||||||
+ * obtaining a copy of this software and associated documentation
|
|
||||||
+ * files (the "Software"), to deal in the Software without
|
|
||||||
+ * restriction, including without limitation the rights to use,
|
|
||||||
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
|
||||||
+ * sell copies of the Software, and to permit persons to whom the
|
|
||||||
+ * Software is furnished to do so, subject to the following
|
|
||||||
+ * conditions:
|
|
||||||
+ *
|
|
||||||
+ * The above copyright notice and this permission notice shall be
|
|
||||||
+ * included in all copies or substantial portions of the Software.
|
|
||||||
+ *
|
|
||||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||||
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
||||||
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||||
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include "sun8i-h3-nanopi.dtsi"
|
|
||||||
+
|
|
||||||
+/ {
|
|
||||||
+ model = "FriendlyARM ZeroPi";
|
|
||||||
+ compatible = "friendlyarm,zeropi", "allwinner,sun8i-h3";
|
|
||||||
+
|
|
||||||
+ aliases {
|
|
||||||
+ ethernet0 = &emac;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ reg_gmac_3v3: gmac-3v3 {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "gmac-3v3";
|
|
||||||
+ regulator-min-microvolt = <3300000>;
|
|
||||||
+ regulator-max-microvolt = <3300000>;
|
|
||||||
+ startup-delay-us = <100000>;
|
|
||||||
+ enable-active-high;
|
|
||||||
+ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&external_mdio {
|
|
||||||
+ ext_rgmii_phy: ethernet-phy@7 {
|
|
||||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
|
||||||
+ reg = <7>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&emac {
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ pinctrl-0 = <&emac_rgmii_pins>;
|
|
||||||
+ phy-supply = <®_gmac_3v3>;
|
|
||||||
+ phy-handle = <&ext_rgmii_phy>;
|
|
||||||
+ phy-mode = "rgmii-id";
|
|
||||||
+
|
|
||||||
+ allwinner,leds-active-low;
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&usb_otg {
|
|
||||||
+ status = "okay";
|
|
||||||
+ dr_mode = "host";
|
|
||||||
+};
|
|
||||||
--- a/board/sunxi/MAINTAINERS
|
|
||||||
+++ b/board/sunxi/MAINTAINERS
|
|
||||||
@@ -508,3 +508,9 @@ YONES TOPTECH BS1078 V2 BOARD
|
|
||||||
M: Peter Korsgaard <peter@korsgaard.com>
|
|
||||||
S: Maintained
|
|
||||||
F: configs/Yones_Toptech_BS1078_V2_defconfig
|
|
||||||
+
|
|
||||||
+ZEROPI BOARD
|
|
||||||
+M: Yu-Tung Chang <mtwget@gmail.com>
|
|
||||||
+S: Maintained
|
|
||||||
+F: configs/zeropi_defconfig
|
|
||||||
+F: arch/arm/dts/sun8i-h3-zeropi.dts
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/configs/zeropi_defconfig
|
|
||||||
@@ -0,0 +1,13 @@
|
|
||||||
+CONFIG_ARM=y
|
|
||||||
+CONFIG_ARCH_SUNXI=y
|
|
||||||
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-zeropi"
|
|
||||||
+CONFIG_SPL=y
|
|
||||||
+CONFIG_MACH_SUN8I_H3=y
|
|
||||||
+CONFIG_DRAM_CLK=408
|
|
||||||
+CONFIG_MACPWR="PD6"
|
|
||||||
+# CONFIG_VIDEO_DE2 is not set
|
|
||||||
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
|
||||||
+CONFIG_CONSOLE_MUX=y
|
|
||||||
+CONFIG_SUN8I_EMAC=y
|
|
||||||
+CONFIG_USB_EHCI_HCD=y
|
|
||||||
+CONFIG_USB_OHCI_HCD=y
|
|
@ -12,165 +12,6 @@ Signed-off-by: Jayantajit Gogoi <jayanta.gogoi525@gmail.com>
|
|||||||
create mode 100644 arch/arm/dts/sun8i-h3-nanopi-r1.dts
|
create mode 100644 arch/arm/dts/sun8i-h3-nanopi-r1.dts
|
||||||
create mode 100644 configs/nanopi_r1_defconfig
|
create mode 100644 configs/nanopi_r1_defconfig
|
||||||
|
|
||||||
--- a/arch/arm/dts/Makefile
|
|
||||||
+++ b/arch/arm/dts/Makefile
|
|
||||||
@@ -551,6 +551,7 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \
|
|
||||||
sun8i-h3-nanopi-m1-plus.dtb \
|
|
||||||
sun8i-h3-nanopi-neo.dtb \
|
|
||||||
sun8i-h3-nanopi-neo-air.dtb \
|
|
||||||
+ sun8i-h3-nanopi-r1.dtb \
|
|
||||||
sun8i-h3-orangepi-2.dtb \
|
|
||||||
sun8i-h3-orangepi-lite.dtb \
|
|
||||||
sun8i-h3-orangepi-one.dtb \
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/arch/arm/dts/sun8i-h3-nanopi-r1.dts
|
|
||||||
@@ -0,0 +1,146 @@
|
|
||||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
||||||
+/*
|
|
||||||
+ * Copyright (C) 2019 Igor Pecovnik <igor@armbian.com>
|
|
||||||
+ * Copyright (C) 2020 Jayantajit Gogoi <jayanta.gogoi525@gmail.com>
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+/* NanoPi R1 is based on the NanoPi-H3 design from FriendlyARM */
|
|
||||||
+#include "sun8i-h3-nanopi.dtsi"
|
|
||||||
+
|
|
||||||
+/ {
|
|
||||||
+ model = "FriendlyARM NanoPi R1";
|
|
||||||
+ compatible = "friendlyarm,nanopi-r1", "allwinner,sun8i-h3";
|
|
||||||
+
|
|
||||||
+ reg_gmac_3v3: gmac-3v3 {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "gmac-3v3";
|
|
||||||
+ regulator-min-microvolt = <3300000>;
|
|
||||||
+ regulator-max-microvolt = <3300000>;
|
|
||||||
+ startup-delay-us = <100000>;
|
|
||||||
+ enable-active-high;
|
|
||||||
+ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ vdd_cpux: gpio-regulator {
|
|
||||||
+ compatible = "regulator-gpio";
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ regulator-name = "vdd-cpux";
|
|
||||||
+ regulator-type = "voltage";
|
|
||||||
+ regulator-boot-on;
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ regulator-min-microvolt = <1100000>;
|
|
||||||
+ regulator-max-microvolt = <1300000>;
|
|
||||||
+ regulator-ramp-delay = <50>;
|
|
||||||
+ gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ gpios-states = <0x1>;
|
|
||||||
+ states = <1100000 0x0
|
|
||||||
+ 1300000 0x1>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ wifi_pwrseq: wifi_pwrseq {
|
|
||||||
+ compatible = "mmc-pwrseq-simple";
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ leds {
|
|
||||||
+ /delete-node/ pwr;
|
|
||||||
+ status {
|
|
||||||
+ label = "nanopi:red:status";
|
|
||||||
+ gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ linux,default-trigger = "heartbeat";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ wan {
|
|
||||||
+ label = "nanopi:green:wan";
|
|
||||||
+ gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ lan {
|
|
||||||
+ label = "nanopi:green:lan";
|
|
||||||
+ gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ r_gpio_keys {
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ pinctrl-0 = <&sw_r_npi>;
|
|
||||||
+
|
|
||||||
+ /delete-node/ k1;
|
|
||||||
+ reset {
|
|
||||||
+ label = "reset";
|
|
||||||
+ linux,code = <KEY_RESTART>;
|
|
||||||
+ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&cpu0 {
|
|
||||||
+ cpu-supply = <&vdd_cpux>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ehci1 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ehci2 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&emac {
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ pinctrl-0 = <&emac_rgmii_pins>;
|
|
||||||
+ phy-supply = <®_gmac_3v3>;
|
|
||||||
+ phy-handle = <&ext_rgmii_phy>;
|
|
||||||
+ phy-mode = "rgmii";
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&external_mdio {
|
|
||||||
+ ext_rgmii_phy: ethernet-phy@1 {
|
|
||||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
|
||||||
+ reg = <7>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&mmc1 {
|
|
||||||
+ vmmc-supply = <®_vcc3v3>;
|
|
||||||
+ vqmmc-supply = <®_vcc3v3>;
|
|
||||||
+ mmc-pwrseq = <&wifi_pwrseq>;
|
|
||||||
+ bus-width = <4>;
|
|
||||||
+ non-removable;
|
|
||||||
+ status = "okay";
|
|
||||||
+
|
|
||||||
+ sdio_wifi: sdio_wifi@1 {
|
|
||||||
+ reg = <1>;
|
|
||||||
+ compatible = "brcm,bcm4329-fmac";
|
|
||||||
+ interrupt-parent = <&pio>;
|
|
||||||
+ interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>;
|
|
||||||
+ interrupt-names = "host-wake";
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&mmc2 {
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ pinctrl-0 = <&mmc2_8bit_pins>;
|
|
||||||
+ vmmc-supply = <®_vcc3v3>;
|
|
||||||
+ vqmmc-supply = <®_vcc3v3>;
|
|
||||||
+ bus-width = <8>;
|
|
||||||
+ non-removable;
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ohci1 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ohci2 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&r_pio {
|
|
||||||
+ sw_r_npi: key_pins {
|
|
||||||
+ pins = "PL3";
|
|
||||||
+ function = "gpio_in";
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/configs/nanopi_r1_defconfig
|
+++ b/configs/nanopi_r1_defconfig
|
||||||
@@ -0,0 +1,21 @@
|
@@ -0,0 +1,21 @@
|
||||||
|
@ -1,261 +0,0 @@
|
|||||||
From e7510d24cab4741f72489b9d67c2d42b18fe5374 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Chukun Pan <amadeus@jmu.edu.cn>
|
|
||||||
Date: Sun, 10 Oct 2021 21:36:57 +0800
|
|
||||||
Subject: [PATCH] sunxi: Add support for FriendlyARM NanoPi R1S H5
|
|
||||||
|
|
||||||
This adds support for the NanoPi R1S H5 board.
|
|
||||||
|
|
||||||
Allwinner H5 SoC
|
|
||||||
512MB DDR3 RAM
|
|
||||||
10/100/1000M Ethernet x 2
|
|
||||||
RTL8189ETV WiFi 802.11b/g/n
|
|
||||||
USB 2.0 host port (A)
|
|
||||||
MicroSD Slot
|
|
||||||
Reset button
|
|
||||||
Serial Debug Port
|
|
||||||
WAN - LAN - SYS LED
|
|
||||||
|
|
||||||
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
|
|
||||||
---
|
|
||||||
arch/arm/dts/Makefile | 1 +
|
|
||||||
arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts | 195 +++++++++++++++++++++++
|
|
||||||
board/sunxi/MAINTAINERS | 5 +
|
|
||||||
configs/nanopi_r1s_h5_defconfig | 14 ++
|
|
||||||
4 files changed, 215 insertions(+)
|
|
||||||
create mode 100644 arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts
|
|
||||||
create mode 100644 configs/nanopi_r1s_h5_defconfig
|
|
||||||
|
|
||||||
--- a/arch/arm/dts/Makefile
|
|
||||||
+++ b/arch/arm/dts/Makefile
|
|
||||||
@@ -575,6 +575,7 @@ dtb-$(CONFIG_MACH_SUN50I_H5) += \
|
|
||||||
sun50i-h5-libretech-all-h5-cc.dtb \
|
|
||||||
sun50i-h5-nanopi-neo2.dtb \
|
|
||||||
sun50i-h5-nanopi-neo-plus2.dtb \
|
|
||||||
+ sun50i-h5-nanopi-r1s-h5.dtb \
|
|
||||||
sun50i-h5-orangepi-zero-plus.dtb \
|
|
||||||
sun50i-h5-orangepi-pc2.dtb \
|
|
||||||
sun50i-h5-orangepi-prime.dtb \
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts
|
|
||||||
@@ -0,0 +1,190 @@
|
|
||||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
||||||
+/*
|
|
||||||
+ * Copyright (C) 2021 Chukun Pan <amadeus@jmu.edu.cn>
|
|
||||||
+ *
|
|
||||||
+ * Based on sun50i-h5-nanopi-neo-plus2.dts, which is:
|
|
||||||
+ * Copyright (C) 2017 Antony Antony <antony@phenome.org>
|
|
||||||
+ * Copyright (C) 2016 ARM Ltd.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+/dts-v1/;
|
|
||||||
+#include "sun50i-h5.dtsi"
|
|
||||||
+
|
|
||||||
+#include <dt-bindings/gpio/gpio.h>
|
|
||||||
+#include <dt-bindings/input/input.h>
|
|
||||||
+
|
|
||||||
+/ {
|
|
||||||
+ model = "FriendlyARM NanoPi R1S H5";
|
|
||||||
+ compatible = "friendlyarm,nanopi-r1s-h5", "allwinner,sun50i-h5";
|
|
||||||
+
|
|
||||||
+ aliases {
|
|
||||||
+ ethernet0 = &emac;
|
|
||||||
+ ethernet1 = &rtl8189etv;
|
|
||||||
+ serial0 = &uart0;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ chosen {
|
|
||||||
+ stdout-path = "serial0:115200n8";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ leds {
|
|
||||||
+ compatible = "gpio-leds";
|
|
||||||
+
|
|
||||||
+ sys {
|
|
||||||
+ label = "nanopi:red:sys";
|
|
||||||
+ gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ linux,default-trigger = "heartbeat";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ lan {
|
|
||||||
+ label = "nanopi:green:lan";
|
|
||||||
+ gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ wan {
|
|
||||||
+ label = "nanopi:green:wan";
|
|
||||||
+ gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ r-gpio-keys {
|
|
||||||
+ compatible = "gpio-keys";
|
|
||||||
+
|
|
||||||
+ reset {
|
|
||||||
+ label = "reset";
|
|
||||||
+ linux,code = <KEY_RESTART>;
|
|
||||||
+ gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ reg_gmac_3v3: gmac-3v3 {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "gmac-3v3";
|
|
||||||
+ regulator-min-microvolt = <3300000>;
|
|
||||||
+ regulator-max-microvolt = <3300000>;
|
|
||||||
+ startup-delay-us = <100000>;
|
|
||||||
+ enable-active-high;
|
|
||||||
+ gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ reg_vcc3v3: vcc3v3 {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "vcc3v3";
|
|
||||||
+ regulator-min-microvolt = <3300000>;
|
|
||||||
+ regulator-max-microvolt = <3300000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ reg_usb0_vbus: usb0-vbus {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "usb0-vbus";
|
|
||||||
+ regulator-min-microvolt = <5000000>;
|
|
||||||
+ regulator-max-microvolt = <5000000>;
|
|
||||||
+ enable-active-high;
|
|
||||||
+ gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
|
|
||||||
+ status = "okay";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ vdd_cpux: gpio-regulator {
|
|
||||||
+ compatible = "regulator-gpio";
|
|
||||||
+ regulator-name = "vdd-cpux";
|
|
||||||
+ regulator-type = "voltage";
|
|
||||||
+ regulator-boot-on;
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ regulator-min-microvolt = <1100000>;
|
|
||||||
+ regulator-max-microvolt = <1300000>;
|
|
||||||
+ regulator-ramp-delay = <50>; /* 4ms */
|
|
||||||
+ gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ gpios-states = <0x1>;
|
|
||||||
+ states = <1100000 0x0>, <1300000 0x1>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ wifi_pwrseq: wifi_pwrseq {
|
|
||||||
+ compatible = "mmc-pwrseq-simple";
|
|
||||||
+ reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
|
|
||||||
+ post-power-on-delay-ms = <200>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&cpu0 {
|
|
||||||
+ cpu-supply = <&vdd_cpux>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ehci1 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ehci2 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&emac {
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ pinctrl-0 = <&emac_rgmii_pins>;
|
|
||||||
+ phy-supply = <®_gmac_3v3>;
|
|
||||||
+ phy-handle = <&ext_rgmii_phy>;
|
|
||||||
+ phy-mode = "rgmii-id";
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&external_mdio {
|
|
||||||
+ ext_rgmii_phy: ethernet-phy@7 {
|
|
||||||
+ compatible = "ethernet-phy-ieee802.3-c22";
|
|
||||||
+ reg = <7>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&i2c0 {
|
|
||||||
+ status = "okay";
|
|
||||||
+
|
|
||||||
+ eeprom@51 {
|
|
||||||
+ compatible = "microchip,24c02";
|
|
||||||
+ reg = <0x51>;
|
|
||||||
+ pagesize = <16>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&mmc0 {
|
|
||||||
+ vmmc-supply = <®_vcc3v3>;
|
|
||||||
+ bus-width = <4>;
|
|
||||||
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&mmc1 {
|
|
||||||
+ vmmc-supply = <®_vcc3v3>;
|
|
||||||
+ vqmmc-supply = <®_vcc3v3>;
|
|
||||||
+ mmc-pwrseq = <&wifi_pwrseq>;
|
|
||||||
+ bus-width = <4>;
|
|
||||||
+ non-removable;
|
|
||||||
+ status = "okay";
|
|
||||||
+
|
|
||||||
+ rtl8189etv: sdio_wifi@1 {
|
|
||||||
+ reg = <1>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ohci1 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ohci2 {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&uart0 {
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ pinctrl-0 = <&uart0_pa_pins>;
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&usb_otg {
|
|
||||||
+ dr_mode = "peripheral";
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&usbphy {
|
|
||||||
+ /* USB Type-A port's VBUS is always on */
|
|
||||||
+ usb0_id_det-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
|
|
||||||
+ usb0_vbus-supply = <®_usb0_vbus>;
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
--- a/board/sunxi/MAINTAINERS
|
|
||||||
+++ b/board/sunxi/MAINTAINERS
|
|
||||||
@@ -358,6 +358,11 @@ M: Jelle van der Waa <jelle@vdwaa.nl>
|
|
||||||
S: Maintained
|
|
||||||
F: configs/nanopi_neo_air_defconfig
|
|
||||||
|
|
||||||
+NANOPI-R1S-H5 BOARD
|
|
||||||
+M: Chukun Pan <amadeus@jmu.edu.cn>
|
|
||||||
+S: Maintained
|
|
||||||
+F: configs/nanopi_r1s_h5_defconfig
|
|
||||||
+
|
|
||||||
NANOPI-A64 BOARD
|
|
||||||
M: Jagan Teki <jagan@amarulasolutions.com>
|
|
||||||
S: Maintained
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/configs/nanopi_r1s_h5_defconfig
|
|
||||||
@@ -0,0 +1,14 @@
|
|
||||||
+CONFIG_ARM=y
|
|
||||||
+CONFIG_ARCH_SUNXI=y
|
|
||||||
+CONFIG_SPL=y
|
|
||||||
+CONFIG_MACH_SUN50I_H5=y
|
|
||||||
+CONFIG_DRAM_CLK=672
|
|
||||||
+CONFIG_DRAM_ZQ=3881977
|
|
||||||
+# CONFIG_DRAM_ODT_EN is not set
|
|
||||||
+CONFIG_MACPWR="PD6"
|
|
||||||
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
|
||||||
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
|
||||||
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-nanopi-r1s-h5"
|
|
||||||
+CONFIG_SUN8I_EMAC=y
|
|
||||||
+CONFIG_USB_EHCI_HCD=y
|
|
||||||
+CONFIG_USB_OHCI_HCD=y
|
|
@ -1,29 +0,0 @@
|
|||||||
From 20abdd7feefbb4fccef5c653e045911670237e8b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Stijn Tintel <stijn@linux-ipv6.be>
|
|
||||||
Date: Thu, 22 Dec 2022 00:35:07 +0200
|
|
||||||
Subject: [PATCH] arm: sunxi: increase SYS_MALLOC_F_LEN
|
|
||||||
|
|
||||||
Version 2020.10 throws the following output after loading bl31:
|
|
||||||
alloc space exhausted
|
|
||||||
|
|
||||||
This has been fixed in v2022.07, but the change is too intrusive to
|
|
||||||
backport. Instead, just modify the default for ARCH_SUNXI for now.
|
|
||||||
|
|
||||||
See e05689242238 ("Kconfig: Change SYS_MALLOC_F_LEN default to 0x2000").
|
|
||||||
|
|
||||||
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
|
|
||||||
---
|
|
||||||
Kconfig | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
--- a/Kconfig
|
|
||||||
+++ b/Kconfig
|
|
||||||
@@ -146,7 +146,7 @@ config SYS_MALLOC_F_LEN
|
|
||||||
default 0x2000 if (ARCH_IMX8 || ARCH_IMX8M || ARCH_MX7 || \
|
|
||||||
ARCH_MX7ULP || ARCH_MX6 || ARCH_MX5 || \
|
|
||||||
ARCH_LS1012A || ARCH_LS1021A || ARCH_LS1043A || \
|
|
||||||
- ARCH_LS1046A || ARCH_QEMU)
|
|
||||||
+ ARCH_LS1046A || ARCH_QEMU || ARCH_SUNXI)
|
|
||||||
default 0x400
|
|
||||||
help
|
|
||||||
Before relocation, memory is very limited on many platforms. Still,
|
|
@ -0,0 +1,30 @@
|
|||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -2000,26 +2000,7 @@ endif
|
||||||
|
# Check dtc and pylibfdt, if DTC is provided, else build them
|
||||||
|
PHONY += scripts_dtc
|
||||||
|
scripts_dtc: scripts_basic
|
||||||
|
- $(Q)if test "$(DTC)" = "$(DTC_INTREE)"; then \
|
||||||
|
- $(MAKE) $(build)=scripts/dtc; \
|
||||||
|
- else \
|
||||||
|
- if ! $(DTC) -v >/dev/null; then \
|
||||||
|
- echo '*** Failed to check dtc version: $(DTC)'; \
|
||||||
|
- false; \
|
||||||
|
- else \
|
||||||
|
- if test "$(call dtc-version)" -lt $(DTC_MIN_VERSION); then \
|
||||||
|
- echo '*** Your dtc is too old, please upgrade to dtc $(DTC_MIN_VERSION) or newer'; \
|
||||||
|
- false; \
|
||||||
|
- else \
|
||||||
|
- if [ -n "$(CONFIG_PYLIBFDT)" ]; then \
|
||||||
|
- if ! echo "import libfdt" | $(PYTHON3) 2>/dev/null; then \
|
||||||
|
- echo '*** pylibfdt does not seem to be available with $(PYTHON3)'; \
|
||||||
|
- false; \
|
||||||
|
- fi; \
|
||||||
|
- fi; \
|
||||||
|
- fi; \
|
||||||
|
- fi; \
|
||||||
|
- fi
|
||||||
|
+ $(MAKE) $(build)=scripts/dtc
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
quiet_cmd_cpp_lds = LDS $@
|
@ -90,3 +90,17 @@
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
--- a/src/linux/ifxos_linux_thread_drv.c
|
||||||
|
+++ b/src/linux/ifxos_linux_thread_drv.c
|
||||||
|
@@ -154,7 +154,11 @@ IFXOS_STATIC int IFXOS_KernelThreadStart
|
||||||
|
retVal = pThrCntrl->pThrFct(&pThrCntrl->thrParams);
|
||||||
|
pThrCntrl->thrParams.bRunning = IFX_FALSE;
|
||||||
|
|
||||||
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0))
|
||||||
|
+ kthread_complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
|
||||||
|
+#else
|
||||||
|
complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
IFXOS_PRN_USR_DBG_NL( IFXOS, IFXOS_PRN_LEVEL_NORMAL,
|
||||||
|
("EXIT - Kernel Thread Startup <%s>" IFXOS_CRLF,
|
||||||
|
@ -8,3 +8,16 @@
|
|||||||
MODULE_LICENSE ("GPL");
|
MODULE_LICENSE ("GPL");
|
||||||
#endif /* #ifdef MODULE*/
|
#endif /* #ifdef MODULE*/
|
||||||
|
|
||||||
|
--- a/src/drv_mei_cpe_linux.h
|
||||||
|
+++ b/src/drv_mei_cpe_linux.h
|
||||||
|
@@ -110,6 +110,10 @@ typedef irqreturn_t (*usedIsrHandler_t)(
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0))
|
||||||
|
+#define PDE_DATA pde_data
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
Function typedef for the Linux request_threaded_irq()
|
||||||
|
*/
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/src/drv_mei_cpe_linux.c
|
--- a/src/drv_mei_cpe_linux.c
|
||||||
+++ b/src/drv_mei_cpe_linux.c
|
+++ b/src/drv_mei_cpe_linux.c
|
||||||
@@ -1267,7 +1267,9 @@ static long MEI_Ioctl( struct file *filp,
|
@@ -1267,7 +1267,9 @@ static long MEI_Ioctl( struct file *filp
|
||||||
MEI_IOCTL_RETURN:
|
MEI_IOCTL_RETURN:
|
||||||
|
|
||||||
local_args.drv_ioctl.retCode = ret;
|
local_args.drv_ioctl.retCode = ret;
|
||||||
|
@ -42,6 +42,25 @@
|
|||||||
dev_err(&pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"%s: Failed to enable MSI interrupts error code: %d\n",
|
"%s: Failed to enable MSI interrupts error code: %d\n",
|
||||||
__func__, err);
|
__func__, err);
|
||||||
|
@@ -589,15 +589,15 @@ static int dc_ep_probe(struct pci_dev *p
|
||||||
|
/* Target structures have a limit of 32 bit DMA pointers.
|
||||||
|
* DMA pointers can be wider than 32 bits by default on some systems.
|
||||||
|
*/
|
||||||
|
- ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
|
||||||
|
+ ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
|
||||||
|
if (ret) {
|
||||||
|
dev_err(&pdev->dev, "32-bit DMA not available: %d\n", ret);
|
||||||
|
goto err_region;
|
||||||
|
}
|
||||||
|
|
||||||
|
- ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
|
||||||
|
+ ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
|
||||||
|
if (ret) {
|
||||||
|
- dev_err(&pdev->dev, "cannot enable 32-bit consistent DMA\n");
|
||||||
|
+ dev_err(&pdev->dev, "cannot enable 32-bit coherent DMA\n");
|
||||||
|
goto err_region;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -654,7 +654,7 @@ static int dc_ep_probe(struct pci_dev *p
|
@@ -654,7 +654,7 @@ static int dc_ep_probe(struct pci_dev *p
|
||||||
goto err_iomap;
|
goto err_iomap;
|
||||||
|
|
||||||
|
@ -243,7 +243,33 @@
|
|||||||
|
|
||||||
#include "inc/tc_main.h"
|
#include "inc/tc_main.h"
|
||||||
#include "inc/reg_addr.h"
|
#include "inc/reg_addr.h"
|
||||||
@@ -182,8 +182,8 @@ static int ptm_get_qid(struct net_device
|
@@ -62,6 +62,9 @@
|
||||||
|
#include "inc/fw/vrx518_addr_def.h"
|
||||||
|
#include "inc/fw/vrx518_ppe_fw.h"
|
||||||
|
|
||||||
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0))
|
||||||
|
+#define PDE_DATA pde_data
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
static struct ptm_priv *g_ptm_priv;
|
||||||
|
static struct ptm_ep_priv g_ep_priv[BOND_MAX];
|
||||||
|
@@ -84,6 +87,7 @@ static int ptm_erb_addr_get(const unsign
|
||||||
|
unsigned int *data_addr, unsigned int *desc_addr);
|
||||||
|
|
||||||
|
|
||||||
|
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,16,0))
|
||||||
|
static inline void tc_ether_addr_copy(u8 *dst, const u8 *src)
|
||||||
|
{
|
||||||
|
#if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS)
|
||||||
|
@@ -98,6 +102,7 @@ static inline void tc_ether_addr_copy(u8
|
||||||
|
a[2] = b[2];
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
static inline int is_ptm_sl(struct ptm_ep_priv *priv)
|
||||||
|
{
|
||||||
|
@@ -182,8 +187,8 @@ static int ptm_get_qid(struct net_device
|
||||||
return qid;
|
return qid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,7 +280,7 @@
|
|||||||
{
|
{
|
||||||
struct ptm_priv *ptm_tc = netdev_priv(dev);
|
struct ptm_priv *ptm_tc = netdev_priv(dev);
|
||||||
|
|
||||||
@@ -191,8 +191,6 @@ static struct rtnl_link_stats64 *ptm_get
|
@@ -191,8 +196,6 @@ static struct rtnl_link_stats64 *ptm_get
|
||||||
memcpy(storage, &ptm_tc->stats64, sizeof(ptm_tc->stats64));
|
memcpy(storage, &ptm_tc->stats64, sizeof(ptm_tc->stats64));
|
||||||
else
|
else
|
||||||
storage->tx_errors += ptm_tc->stats64.tx_errors;
|
storage->tx_errors += ptm_tc->stats64.tx_errors;
|
||||||
@ -263,7 +289,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int ptm_set_mac_address(struct net_device *dev, void *p)
|
static int ptm_set_mac_address(struct net_device *dev, void *p)
|
||||||
@@ -209,7 +207,7 @@ static int ptm_set_mac_address(struct ne
|
@@ -204,12 +207,16 @@ static int ptm_set_mac_address(struct ne
|
||||||
|
return -EBUSY;
|
||||||
|
|
||||||
|
tc_info(ptm_tc->tc_priv, MSG_EVENT, "ptm mac address update!\n");
|
||||||
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,16,0))
|
||||||
|
+ eth_hw_addr_set(dev, addr->sa_data);
|
||||||
|
+#else
|
||||||
|
tc_ether_addr_copy(dev->dev_addr, addr->sa_data);
|
||||||
|
+#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,7 +307,7 @@
|
|||||||
{
|
{
|
||||||
struct ptm_priv *ptm_tc = netdev_priv(dev);
|
struct ptm_priv *ptm_tc = netdev_priv(dev);
|
||||||
|
|
||||||
@@ -503,7 +501,7 @@ static int ptm_xmit(struct sk_buff *skb,
|
@@ -503,7 +510,7 @@ static int ptm_xmit(struct sk_buff *skb,
|
||||||
if (!showtime_stat(ptm_tc->tc_priv))
|
if (!showtime_stat(ptm_tc->tc_priv))
|
||||||
goto PTM_XMIT_DROP;
|
goto PTM_XMIT_DROP;
|
||||||
|
|
||||||
@ -281,7 +316,7 @@
|
|||||||
goto PTM_XMIT_DROP;
|
goto PTM_XMIT_DROP;
|
||||||
|
|
||||||
dump_skb_info(ptm_tc->tc_priv, skb, (MSG_TX | MSG_TXDATA));
|
dump_skb_info(ptm_tc->tc_priv, skb, (MSG_TX | MSG_TXDATA));
|
||||||
@@ -632,11 +630,8 @@ static int ptm_dev_init(struct tc_priv *
|
@@ -632,11 +639,8 @@ static int ptm_dev_init(struct tc_priv *
|
||||||
struct ptm_priv *ptm_tc;
|
struct ptm_priv *ptm_tc;
|
||||||
const char macaddr[ETH_ALEN]
|
const char macaddr[ETH_ALEN]
|
||||||
= {0xAC, 0x9A, 0x96, 0x11, 0x22, 0x33};
|
= {0xAC, 0x9A, 0x96, 0x11, 0x22, 0x33};
|
||||||
@ -295,7 +330,19 @@
|
|||||||
if (!dev) {
|
if (!dev) {
|
||||||
tc_dbg(tc_priv, MSG_INIT, "Cannot alloc net device\n");
|
tc_dbg(tc_priv, MSG_INIT, "Cannot alloc net device\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
@@ -2103,7 +2098,6 @@ static int ptm_showtime_exit(const unsig
|
@@ -644,7 +648,11 @@ static int ptm_dev_init(struct tc_priv *
|
||||||
|
ptm_tc = netdev_priv(dev);
|
||||||
|
ptm_tc->dev = dev;
|
||||||
|
ptm_tc->tc_priv = tc_priv;
|
||||||
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,16,0))
|
||||||
|
+ eth_hw_addr_set(dev, macaddr);
|
||||||
|
+#else
|
||||||
|
tc_ether_addr_copy(dev->dev_addr, macaddr);
|
||||||
|
+#endif
|
||||||
|
spin_lock_init(&ptm_tc->ptm_lock);
|
||||||
|
memcpy(ptm_tc->outq_map, def_outq_map, sizeof(def_outq_map));
|
||||||
|
SET_NETDEV_DEV(ptm_tc->dev, tc_priv->ep_dev[id].dev);
|
||||||
|
@@ -2103,7 +2111,6 @@ static int ptm_showtime_exit(const unsig
|
||||||
struct ptm_ep_priv *priv = tc_ep_priv(idx);
|
struct ptm_ep_priv *priv = tc_ep_priv(idx);
|
||||||
u32 stop = ACA_TXIN_EN;
|
u32 stop = ACA_TXIN_EN;
|
||||||
struct dc_ep_dev *ep;
|
struct dc_ep_dev *ep;
|
||||||
@ -398,7 +445,18 @@
|
|||||||
#include <net/genetlink.h>
|
#include <net/genetlink.h>
|
||||||
#include <linux/time.h>
|
#include <linux/time.h>
|
||||||
#include "inc/tc_main.h"
|
#include "inc/tc_main.h"
|
||||||
@@ -353,7 +355,7 @@ static ssize_t mem_proc_write(struct fil
|
@@ -35,6 +37,10 @@
|
||||||
|
#include "inc/platform.h"
|
||||||
|
#include "inc/dsl_tc.h"
|
||||||
|
|
||||||
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0))
|
||||||
|
+#define PDE_DATA pde_data
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#define ATM_HEADER_SIZE (ATM_CELL_SIZE - ATM_CELL_PAYLOAD)
|
||||||
|
static char *dbg_flag_str[] = {
|
||||||
|
"rx",
|
||||||
|
@@ -353,7 +359,7 @@ static ssize_t mem_proc_write(struct fil
|
||||||
}
|
}
|
||||||
addr = set_val = repeat_cnt = 0;
|
addr = set_val = repeat_cnt = 0;
|
||||||
|
|
||||||
@ -407,7 +465,7 @@
|
|||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
len = count < sizeof(str) ? count : sizeof(str) - 1;
|
len = count < sizeof(str) ? count : sizeof(str) - 1;
|
||||||
@@ -450,13 +452,12 @@ static int proc_read_mem_seq_open(struct
|
@@ -450,13 +456,12 @@ static int proc_read_mem_seq_open(struct
|
||||||
return single_open(file, proc_read_mem, NULL);
|
return single_open(file, proc_read_mem, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -427,7 +485,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static ssize_t pp32_proc_write(struct file *file, const char __user *buf,
|
static ssize_t pp32_proc_write(struct file *file, const char __user *buf,
|
||||||
@@ -748,13 +749,12 @@ static int proc_read_pp32_seq_open(struc
|
@@ -748,13 +753,12 @@ static int proc_read_pp32_seq_open(struc
|
||||||
return single_open(file, proc_read_pp32, PDE_DATA(inode));
|
return single_open(file, proc_read_pp32, PDE_DATA(inode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -447,7 +505,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int proc_read_tc_cfg(struct seq_file *seq, void *v)
|
static int proc_read_tc_cfg(struct seq_file *seq, void *v)
|
||||||
@@ -865,13 +865,12 @@ static int proc_read_tc_cfg_seq_open(str
|
@@ -865,13 +869,12 @@ static int proc_read_tc_cfg_seq_open(str
|
||||||
return single_open(file, proc_read_tc_cfg, PDE_DATA(inode));
|
return single_open(file, proc_read_tc_cfg, PDE_DATA(inode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -467,7 +525,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static ssize_t proc_write_dbg(struct file *file, const char __user *buf,
|
static ssize_t proc_write_dbg(struct file *file, const char __user *buf,
|
||||||
@@ -951,13 +950,12 @@ static int proc_read_dbg_seq_open(struct
|
@@ -951,13 +954,12 @@ static int proc_read_dbg_seq_open(struct
|
||||||
return single_open(file, proc_read_dbg, PDE_DATA(inode));
|
return single_open(file, proc_read_dbg, PDE_DATA(inode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -487,7 +545,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static ssize_t proc_write_tc_switch(struct file *file, const char __user *buf,
|
static ssize_t proc_write_tc_switch(struct file *file, const char __user *buf,
|
||||||
@@ -1018,11 +1016,11 @@ proc_tc_switch_help:
|
@@ -1018,11 +1020,11 @@ proc_tc_switch_help:
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -503,7 +561,7 @@
|
|||||||
static ssize_t proc_write_show_time(struct file *file, const char __user *buf,
|
static ssize_t proc_write_show_time(struct file *file, const char __user *buf,
|
||||||
size_t count, loff_t *data)
|
size_t count, loff_t *data)
|
||||||
{
|
{
|
||||||
@@ -1077,10 +1075,9 @@ proc_show_time_help:
|
@@ -1077,10 +1079,9 @@ proc_show_time_help:
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -517,7 +575,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int proc_read_ver(struct seq_file *seq, void *v)
|
static int proc_read_ver(struct seq_file *seq, void *v)
|
||||||
@@ -1128,12 +1125,11 @@ static int proc_read_ver_seq_open(struct
|
@@ -1128,12 +1129,11 @@ static int proc_read_ver_seq_open(struct
|
||||||
return single_open(file, proc_read_ver, PDE_DATA(inode));
|
return single_open(file, proc_read_ver, PDE_DATA(inode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -535,7 +593,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int proc_read_soc(struct seq_file *seq, void *v)
|
static int proc_read_soc(struct seq_file *seq, void *v)
|
||||||
@@ -1142,20 +1138,18 @@ static int proc_read_soc(struct seq_file
|
@@ -1142,20 +1142,18 @@ static int proc_read_soc(struct seq_file
|
||||||
|
|
||||||
tcpriv = (struct tc_priv *)seq->private;
|
tcpriv = (struct tc_priv *)seq->private;
|
||||||
|
|
||||||
@ -564,7 +622,7 @@
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1165,15 +1159,13 @@ static int proc_read_soc_seq_open(struct
|
@@ -1165,15 +1163,13 @@ static int proc_read_soc_seq_open(struct
|
||||||
return single_open(file, proc_read_soc, PDE_DATA(inode));
|
return single_open(file, proc_read_soc, PDE_DATA(inode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -585,7 +643,7 @@
|
|||||||
static struct tc_proc_list tc_procs[] = {
|
static struct tc_proc_list tc_procs[] = {
|
||||||
{TC_PROC_DIR, 0, NULL, 1},
|
{TC_PROC_DIR, 0, NULL, 1},
|
||||||
{"cfg", 0644, &tc_cfg_proc_fops, 0},
|
{"cfg", 0644, &tc_cfg_proc_fops, 0},
|
||||||
@@ -1241,13 +1233,12 @@ static int proc_read_ptm_wanmib_seq_open
|
@@ -1241,13 +1237,12 @@ static int proc_read_ptm_wanmib_seq_open
|
||||||
return single_open(file, proc_read_ptm_wanmib, PDE_DATA(inode));
|
return single_open(file, proc_read_ptm_wanmib, PDE_DATA(inode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -605,7 +663,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int proc_ptm_read_cfg(struct seq_file *seq, void *v)
|
static int proc_ptm_read_cfg(struct seq_file *seq, void *v)
|
||||||
@@ -1300,7 +1291,7 @@ static ssize_t ptm_cfg_proc_write(struct
|
@@ -1300,7 +1295,7 @@ static ssize_t ptm_cfg_proc_write(struct
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -614,7 +672,7 @@
|
|||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
len = count < sizeof(str) ? count : sizeof(str) - 1;
|
len = count < sizeof(str) ? count : sizeof(str) - 1;
|
||||||
@@ -1343,13 +1334,12 @@ proc_ptm_cfg_help:
|
@@ -1343,13 +1338,12 @@ proc_ptm_cfg_help:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -634,7 +692,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static ssize_t proc_ptm_write_prio(struct file *file, const char __user *buf,
|
static ssize_t proc_ptm_write_prio(struct file *file, const char __user *buf,
|
||||||
@@ -1455,13 +1445,12 @@ static int proc_ptm_read_prio_seq_open(s
|
@@ -1455,13 +1449,12 @@ static int proc_ptm_read_prio_seq_open(s
|
||||||
return single_open(file, proc_ptm_read_prio, PDE_DATA(inode));
|
return single_open(file, proc_ptm_read_prio, PDE_DATA(inode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -654,7 +712,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int proc_ptm_read_bond_seq_open(struct inode *inode, struct file *file)
|
static int proc_ptm_read_bond_seq_open(struct inode *inode, struct file *file)
|
||||||
@@ -1469,12 +1458,11 @@ static int proc_ptm_read_bond_seq_open(s
|
@@ -1469,12 +1462,11 @@ static int proc_ptm_read_bond_seq_open(s
|
||||||
return single_open(file, proc_ptm_read_bond, PDE_DATA(inode));
|
return single_open(file, proc_ptm_read_bond, PDE_DATA(inode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -672,7 +730,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int proc_ptm_read_bondmib_seq_open(struct inode *inode,
|
static int proc_ptm_read_bondmib_seq_open(struct inode *inode,
|
||||||
@@ -1483,13 +1471,12 @@ static int proc_ptm_read_bondmib_seq_ope
|
@@ -1483,13 +1475,12 @@ static int proc_ptm_read_bondmib_seq_ope
|
||||||
return single_open(file, proc_ptm_read_bondmib, PDE_DATA(inode));
|
return single_open(file, proc_ptm_read_bondmib, PDE_DATA(inode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -692,7 +750,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct fwdbg_t {
|
struct fwdbg_t {
|
||||||
@@ -1910,14 +1897,14 @@ static int proc_read_fwdbg_seq_open(stru
|
@@ -1910,14 +1901,14 @@ static int proc_read_fwdbg_seq_open(stru
|
||||||
{
|
{
|
||||||
return single_open(file, proc_read_fwdbg, NULL);
|
return single_open(file, proc_read_fwdbg, NULL);
|
||||||
}
|
}
|
||||||
@ -714,7 +772,7 @@
|
|||||||
static struct tc_proc_list ptm_sl_procs[] = {
|
static struct tc_proc_list ptm_sl_procs[] = {
|
||||||
{TC_PROC_PTM_DIR, 0, NULL, 1},
|
{TC_PROC_PTM_DIR, 0, NULL, 1},
|
||||||
{"mem", 0644, &mem_proc_fops, 0},
|
{"mem", 0644, &mem_proc_fops, 0},
|
||||||
@@ -2077,7 +2064,7 @@ static ssize_t atm_cfg_proc_write(struct
|
@@ -2077,7 +2068,7 @@ static ssize_t atm_cfg_proc_write(struct
|
||||||
|
|
||||||
priv = (struct atm_priv *)PDE_DATA(file_inode(file));
|
priv = (struct atm_priv *)PDE_DATA(file_inode(file));
|
||||||
|
|
||||||
@ -723,7 +781,7 @@
|
|||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
len = count < sizeof(str) ? count : sizeof(str) - 1;
|
len = count < sizeof(str) ? count : sizeof(str) - 1;
|
||||||
@@ -2119,13 +2106,12 @@ proc_atm_cfg_help:
|
@@ -2119,13 +2110,12 @@ proc_atm_cfg_help:
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -743,7 +801,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static ssize_t proc_write_atm_wanmib(struct file *file, const char __user *buf,
|
static ssize_t proc_write_atm_wanmib(struct file *file, const char __user *buf,
|
||||||
@@ -2173,13 +2159,12 @@ static int proc_read_atm_wanmib_seq_open
|
@@ -2173,13 +2163,12 @@ static int proc_read_atm_wanmib_seq_open
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -763,7 +821,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int proc_read_htu_seq_open(struct inode *inode, struct file *file)
|
static int proc_read_htu_seq_open(struct inode *inode, struct file *file)
|
||||||
@@ -2187,12 +2172,11 @@ static int proc_read_htu_seq_open(struct
|
@@ -2187,12 +2176,11 @@ static int proc_read_htu_seq_open(struct
|
||||||
return single_open(file, proc_read_htu, PDE_DATA(inode));
|
return single_open(file, proc_read_htu, PDE_DATA(inode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -781,7 +839,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int proc_read_queue_seq_open(struct inode *inode, struct file *file)
|
static int proc_read_queue_seq_open(struct inode *inode, struct file *file)
|
||||||
@@ -2200,12 +2184,11 @@ static int proc_read_queue_seq_open(stru
|
@@ -2200,12 +2188,11 @@ static int proc_read_queue_seq_open(stru
|
||||||
return single_open(file, proc_read_queue, PDE_DATA(inode));
|
return single_open(file, proc_read_queue, PDE_DATA(inode));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -799,7 +857,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void set_q_prio(struct atm_priv *priv,
|
static void set_q_prio(struct atm_priv *priv,
|
||||||
@@ -2428,13 +2411,12 @@ static const struct seq_operations pvc_m
|
@@ -2428,13 +2415,12 @@ static const struct seq_operations pvc_m
|
||||||
.show = pvc_mib_seq_show,
|
.show = pvc_mib_seq_show,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -819,7 +877,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int proc_read_pvc_mib_seq_open(struct inode *inode, struct file *file)
|
static int proc_read_pvc_mib_seq_open(struct inode *inode, struct file *file)
|
||||||
@@ -2447,12 +2429,11 @@ static int proc_read_pvc_mib_seq_open(st
|
@@ -2447,12 +2433,11 @@ static int proc_read_pvc_mib_seq_open(st
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -837,7 +895,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
static ssize_t proc_write_cell(struct file *file,
|
static ssize_t proc_write_cell(struct file *file,
|
||||||
@@ -2592,13 +2573,12 @@ static int proc_read_cell_seq_open(struc
|
@@ -2592,13 +2577,12 @@ static int proc_read_cell_seq_open(struc
|
||||||
return single_open(file, proc_read_cell, NULL);
|
return single_open(file, proc_read_cell, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ This replaces it by a basic working implementation.
|
|||||||
tc_dbg(priv->tc_priv, MSG_TX, "ATM: TX fail\n");
|
tc_dbg(priv->tc_priv, MSG_TX, "ATM: TX fail\n");
|
||||||
--- a/dcdp/ptm_tc.c
|
--- a/dcdp/ptm_tc.c
|
||||||
+++ b/dcdp/ptm_tc.c
|
+++ b/dcdp/ptm_tc.c
|
||||||
@@ -497,6 +497,7 @@ static int ptm_xmit(struct sk_buff *skb,
|
@@ -506,6 +506,7 @@ static int ptm_xmit(struct sk_buff *skb,
|
||||||
struct ptm_priv *ptm_tc = netdev_priv(dev);
|
struct ptm_priv *ptm_tc = netdev_priv(dev);
|
||||||
int qid;
|
int qid;
|
||||||
enum tc_pkt_type type;
|
enum tc_pkt_type type;
|
||||||
@ -87,7 +87,7 @@ This replaces it by a basic working implementation.
|
|||||||
|
|
||||||
if (!showtime_stat(ptm_tc->tc_priv))
|
if (!showtime_stat(ptm_tc->tc_priv))
|
||||||
goto PTM_XMIT_DROP;
|
goto PTM_XMIT_DROP;
|
||||||
@@ -510,11 +511,13 @@ static int ptm_xmit(struct sk_buff *skb,
|
@@ -519,11 +520,13 @@ static int ptm_xmit(struct sk_buff *skb,
|
||||||
type = ptm_tc->tc_priv->tc_mode == TC_PTM_BND_MODE
|
type = ptm_tc->tc_priv->tc_mode == TC_PTM_BND_MODE
|
||||||
? PTM_BOND_PKT : PTM_SL_PKT;
|
? PTM_BOND_PKT : PTM_SL_PKT;
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ This replaces it by a basic working implementation.
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -631,7 +634,7 @@ static int ptm_dev_init(struct tc_priv *
|
@@ -640,7 +643,7 @@ static int ptm_dev_init(struct tc_priv *
|
||||||
const char macaddr[ETH_ALEN]
|
const char macaddr[ETH_ALEN]
|
||||||
= {0xAC, 0x9A, 0x96, 0x11, 0x22, 0x33};
|
= {0xAC, 0x9A, 0x96, 0x11, 0x22, 0x33};
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ This replaces it by a basic working implementation.
|
|||||||
if (!dev) {
|
if (!dev) {
|
||||||
tc_dbg(tc_priv, MSG_INIT, "Cannot alloc net device\n");
|
tc_dbg(tc_priv, MSG_INIT, "Cannot alloc net device\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
@@ -2324,7 +2327,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
@@ -2337,7 +2340,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||||
cfg = &priv->tc_priv->cfg;
|
cfg = &priv->tc_priv->cfg;
|
||||||
|
|
||||||
txin = ¶m.aca_txin;
|
txin = ¶m.aca_txin;
|
||||||
@ -123,7 +123,7 @@ This replaces it by a basic working implementation.
|
|||||||
txin->hd_size_in_dw = cfg->txin.soc_desc_dwsz;
|
txin->hd_size_in_dw = cfg->txin.soc_desc_dwsz;
|
||||||
txin->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_IN_PD_LIST_BASE);
|
txin->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_IN_PD_LIST_BASE);
|
||||||
txin->pd_desc_num = __ACA_TX_IN_PD_LIST_NUM;
|
txin->pd_desc_num = __ACA_TX_IN_PD_LIST_NUM;
|
||||||
@@ -2347,7 +2354,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
@@ -2360,7 +2367,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||||
txin->soc_cmlt_cnt_addr);
|
txin->soc_cmlt_cnt_addr);
|
||||||
|
|
||||||
txout = ¶m.aca_txout;
|
txout = ¶m.aca_txout;
|
||||||
@ -135,7 +135,7 @@ This replaces it by a basic working implementation.
|
|||||||
txout->hd_size_in_dw = cfg->txout.soc_desc_dwsz;
|
txout->hd_size_in_dw = cfg->txout.soc_desc_dwsz;
|
||||||
if (priv->tc_priv->param.cdma_desc_loc == LOC_IN_FPI)
|
if (priv->tc_priv->param.cdma_desc_loc == LOC_IN_FPI)
|
||||||
txout->pd_desc_base = sb_r32(__TX_OUT_SHADOW_PTR) - phybase;
|
txout->pd_desc_base = sb_r32(__TX_OUT_SHADOW_PTR) - phybase;
|
||||||
@@ -2373,7 +2384,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
@@ -2386,7 +2397,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||||
txout->soc_cmlt_cnt_addr);
|
txout->soc_cmlt_cnt_addr);
|
||||||
|
|
||||||
rxout = ¶m.aca_rxout;
|
rxout = ¶m.aca_rxout;
|
||||||
@ -147,7 +147,7 @@ This replaces it by a basic working implementation.
|
|||||||
rxout->hd_size_in_dw = cfg->rxout.soc_desc_dwsz;
|
rxout->hd_size_in_dw = cfg->rxout.soc_desc_dwsz;
|
||||||
if (priv->tc_priv->param.cdma_desc_loc == LOC_IN_FPI)
|
if (priv->tc_priv->param.cdma_desc_loc == LOC_IN_FPI)
|
||||||
rxout->pd_desc_base = sb_r32(__RX_OUT_SHADOW_PTR) - phybase;
|
rxout->pd_desc_base = sb_r32(__RX_OUT_SHADOW_PTR) - phybase;
|
||||||
@@ -2399,7 +2414,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
@@ -2412,7 +2427,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||||
rxout->soc_cmlt_cnt_addr);
|
rxout->soc_cmlt_cnt_addr);
|
||||||
|
|
||||||
rxin = ¶m.aca_rxin;
|
rxin = ¶m.aca_rxin;
|
||||||
|
@ -54,7 +54,7 @@ significantly lower latencies when the line is saturated.
|
|||||||
struct cdma {
|
struct cdma {
|
||||||
--- a/dcdp/ptm_tc.c
|
--- a/dcdp/ptm_tc.c
|
||||||
+++ b/dcdp/ptm_tc.c
|
+++ b/dcdp/ptm_tc.c
|
||||||
@@ -75,7 +75,11 @@ static const u32 tx_kvec[] = {
|
@@ -78,7 +78,11 @@ static const u32 tx_kvec[] = {
|
||||||
0x30B1B233, 0xB43536B7, 0xB8393ABB, 0x3CBDBE3F,
|
0x30B1B233, 0xB43536B7, 0xB8393ABB, 0x3CBDBE3F,
|
||||||
0xC04142C3, 0x44C5C647, 0x48C9CA4B, 0xCC4D4ECF
|
0xC04142C3, 0x44C5C647, 0x48C9CA4B, 0xCC4D4ECF
|
||||||
};
|
};
|
||||||
@ -66,7 +66,7 @@ significantly lower latencies when the line is saturated.
|
|||||||
static const char ptm_drv_name[] = "PTM SL";
|
static const char ptm_drv_name[] = "PTM SL";
|
||||||
static const char ptm_bond_name[][IFNAMSIZ] = {"PTM US BOND", "PTM DS BOND"};
|
static const char ptm_bond_name[][IFNAMSIZ] = {"PTM US BOND", "PTM DS BOND"};
|
||||||
|
|
||||||
@@ -1005,6 +1009,10 @@ static void us_fp_desq_cfg_ctxt_init(str
|
@@ -1018,6 +1022,10 @@ static void us_fp_desq_cfg_ctxt_init(str
|
||||||
int i;
|
int i;
|
||||||
u32 desc_addr;
|
u32 desc_addr;
|
||||||
rx_descriptor_t desc;
|
rx_descriptor_t desc;
|
||||||
@ -77,7 +77,7 @@ significantly lower latencies when the line is saturated.
|
|||||||
|
|
||||||
memset(&desq_cfg, 0, sizeof(desq_cfg));
|
memset(&desq_cfg, 0, sizeof(desq_cfg));
|
||||||
/* Initialize US Fast-Path Descriptor Queue Config/Context */
|
/* Initialize US Fast-Path Descriptor Queue Config/Context */
|
||||||
@@ -1012,7 +1020,11 @@ static void us_fp_desq_cfg_ctxt_init(str
|
@@ -1025,7 +1033,11 @@ static void us_fp_desq_cfg_ctxt_init(str
|
||||||
desq_cfg.fast_path = 1;
|
desq_cfg.fast_path = 1;
|
||||||
desq_cfg.mbox_int_en = 0;
|
desq_cfg.mbox_int_en = 0;
|
||||||
desq_cfg.des_sync_needed = 0;
|
desq_cfg.des_sync_needed = 0;
|
||||||
@ -89,7 +89,7 @@ significantly lower latencies when the line is saturated.
|
|||||||
desq_cfg.des_base_addr = __US_FAST_PATH_DES_LIST_BASE;
|
desq_cfg.des_base_addr = __US_FAST_PATH_DES_LIST_BASE;
|
||||||
|
|
||||||
tc_mem_write(priv, fpi_addr(__US_FP_INQ_DES_CFG_CTXT),
|
tc_mem_write(priv, fpi_addr(__US_FP_INQ_DES_CFG_CTXT),
|
||||||
@@ -1036,12 +1048,20 @@ static void us_qos_desq_cfg_ctxt_init(st
|
@@ -1049,12 +1061,20 @@ static void us_qos_desq_cfg_ctxt_init(st
|
||||||
int offset, i;
|
int offset, i;
|
||||||
rx_descriptor_t desc;
|
rx_descriptor_t desc;
|
||||||
u32 phy_addr;
|
u32 phy_addr;
|
||||||
@ -110,7 +110,7 @@ significantly lower latencies when the line is saturated.
|
|||||||
|
|
||||||
offset = 0;
|
offset = 0;
|
||||||
for (i = 0; i < QOSQ_NUM; i++) {
|
for (i = 0; i < QOSQ_NUM; i++) {
|
||||||
@@ -1080,6 +1100,10 @@ static void us_outq_desq_cfg_ctxt_init(s
|
@@ -1093,6 +1113,10 @@ static void us_outq_desq_cfg_ctxt_init(s
|
||||||
u32 phy_addr;
|
u32 phy_addr;
|
||||||
int i;
|
int i;
|
||||||
u32 offset;
|
u32 offset;
|
||||||
@ -121,7 +121,7 @@ significantly lower latencies when the line is saturated.
|
|||||||
|
|
||||||
/* Setup OUTQ_QoS_CFG_CTXT */
|
/* Setup OUTQ_QoS_CFG_CTXT */
|
||||||
/* NOTE: By default, Shaping & WFQ both are DISABLED!! */
|
/* NOTE: By default, Shaping & WFQ both are DISABLED!! */
|
||||||
@@ -1108,7 +1132,11 @@ static void us_outq_desq_cfg_ctxt_init(s
|
@@ -1121,7 +1145,11 @@ static void us_outq_desq_cfg_ctxt_init(s
|
||||||
desq_cfg.des_in_own_val = US_OUTQ_DES_OWN;
|
desq_cfg.des_in_own_val = US_OUTQ_DES_OWN;
|
||||||
desq_cfg.mbox_int_en = 0;
|
desq_cfg.mbox_int_en = 0;
|
||||||
desq_cfg.des_sync_needed = 0;
|
desq_cfg.des_sync_needed = 0;
|
||||||
@ -134,7 +134,7 @@ significantly lower latencies when the line is saturated.
|
|||||||
/**
|
/**
|
||||||
* Only BC0 is used in VRX518
|
* Only BC0 is used in VRX518
|
||||||
*/
|
*/
|
||||||
@@ -1174,7 +1202,11 @@ static void us_qos_cfg_init(struct ptm_e
|
@@ -1187,7 +1215,11 @@ static void us_qos_cfg_init(struct ptm_e
|
||||||
/* Set QoS NO DROP */
|
/* Set QoS NO DROP */
|
||||||
sb_w32(1, __QOSQ_NO_DROP);
|
sb_w32(1, __QOSQ_NO_DROP);
|
||||||
/* Enable Preemption function/Disable QoS by default */
|
/* Enable Preemption function/Disable QoS by default */
|
||||||
@ -146,7 +146,7 @@ significantly lower latencies when the line is saturated.
|
|||||||
/* By default, all qid mappint to non-preemption queue */
|
/* By default, all qid mappint to non-preemption queue */
|
||||||
sb_w32(0x0, _QID2PREEMP_MAP);
|
sb_w32(0x0, _QID2PREEMP_MAP);
|
||||||
|
|
||||||
@@ -1376,6 +1408,11 @@ static void ptm_local_desq_cfg_ctxt_init
|
@@ -1389,6 +1421,11 @@ static void ptm_local_desq_cfg_ctxt_init
|
||||||
u32 dcnt, addr, pdbram_base;
|
u32 dcnt, addr, pdbram_base;
|
||||||
unsigned int us_des_alloc[] = {
|
unsigned int us_des_alloc[] = {
|
||||||
__US_TC_LOCAL_Q0_DES_LIST_NUM, __US_TC_LOCAL_Q1_DES_LIST_NUM};
|
__US_TC_LOCAL_Q0_DES_LIST_NUM, __US_TC_LOCAL_Q1_DES_LIST_NUM};
|
||||||
@ -158,7 +158,7 @@ significantly lower latencies when the line is saturated.
|
|||||||
|
|
||||||
/* Setup the Local DESQ Configuration/Context for UpStream Queues */
|
/* Setup the Local DESQ Configuration/Context for UpStream Queues */
|
||||||
memset(&desq_cfg, 0, sizeof(desq_cfg));
|
memset(&desq_cfg, 0, sizeof(desq_cfg));
|
||||||
@@ -2321,6 +2358,10 @@ static void ptm_aca_init(struct ptm_ep_p
|
@@ -2334,6 +2371,10 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||||
u32 phybase = priv->ep->phy_membase;
|
u32 phybase = priv->ep->phy_membase;
|
||||||
u32 start;
|
u32 start;
|
||||||
u32 type;
|
u32 type;
|
||||||
@ -169,7 +169,7 @@ significantly lower latencies when the line is saturated.
|
|||||||
|
|
||||||
priv->tc_priv->tc_ops.soc_cfg_get(&priv->tc_priv->cfg, ptm_id(priv));
|
priv->tc_priv->tc_ops.soc_cfg_get(&priv->tc_priv->cfg, ptm_id(priv));
|
||||||
memset(¶m, 0, sizeof(param));
|
memset(¶m, 0, sizeof(param));
|
||||||
@@ -2334,7 +2375,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
@@ -2347,7 +2388,11 @@ static void ptm_aca_init(struct ptm_ep_p
|
||||||
#endif
|
#endif
|
||||||
txin->hd_size_in_dw = cfg->txin.soc_desc_dwsz;
|
txin->hd_size_in_dw = cfg->txin.soc_desc_dwsz;
|
||||||
txin->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_IN_PD_LIST_BASE);
|
txin->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_IN_PD_LIST_BASE);
|
||||||
@ -198,7 +198,7 @@ significantly lower latencies when the line is saturated.
|
|||||||
|
|
||||||
--- a/dcdp/tc_proc.c
|
--- a/dcdp/tc_proc.c
|
||||||
+++ b/dcdp/tc_proc.c
|
+++ b/dcdp/tc_proc.c
|
||||||
@@ -1114,6 +1114,9 @@ static int proc_read_ver(struct seq_file
|
@@ -1118,6 +1118,9 @@ static int proc_read_ver(struct seq_file
|
||||||
(date >> 16) & 0xff,
|
(date >> 16) & 0xff,
|
||||||
(date & 0xffff));
|
(date & 0xffff));
|
||||||
|
|
||||||
@ -208,7 +208,7 @@ significantly lower latencies when the line is saturated.
|
|||||||
#ifdef FEATURE_POWER_DOWN
|
#ifdef FEATURE_POWER_DOWN
|
||||||
seq_puts(seq, " + Support Power Down enhancement feature\n");
|
seq_puts(seq, " + Support Power Down enhancement feature\n");
|
||||||
#endif
|
#endif
|
||||||
@@ -1166,6 +1169,113 @@ static const struct proc_ops tc_soc_proc
|
@@ -1170,6 +1173,113 @@ static const struct proc_ops tc_soc_proc
|
||||||
.proc_release = single_release,
|
.proc_release = single_release,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -322,7 +322,7 @@ significantly lower latencies when the line is saturated.
|
|||||||
static struct tc_proc_list tc_procs[] = {
|
static struct tc_proc_list tc_procs[] = {
|
||||||
{TC_PROC_DIR, 0, NULL, 1},
|
{TC_PROC_DIR, 0, NULL, 1},
|
||||||
{"cfg", 0644, &tc_cfg_proc_fops, 0},
|
{"cfg", 0644, &tc_cfg_proc_fops, 0},
|
||||||
@@ -1174,6 +1284,9 @@ static struct tc_proc_list tc_procs[] =
|
@@ -1178,6 +1288,9 @@ static struct tc_proc_list tc_procs[] =
|
||||||
{"showtime", 0200, &tc_show_time_proc_fops, 0},
|
{"showtime", 0200, &tc_show_time_proc_fops, 0},
|
||||||
{"ver", 0644, &tc_ver_proc_fops, 0},
|
{"ver", 0644, &tc_ver_proc_fops, 0},
|
||||||
{"soc", 0644, &tc_soc_proc_fops, 0},
|
{"soc", 0644, &tc_soc_proc_fops, 0},
|
||||||
@ -332,7 +332,7 @@ significantly lower latencies when the line is saturated.
|
|||||||
};
|
};
|
||||||
|
|
||||||
int tc_proc_init(struct tc_priv *priv)
|
int tc_proc_init(struct tc_priv *priv)
|
||||||
@@ -1333,7 +1446,6 @@ proc_ptm_cfg_help:
|
@@ -1337,7 +1450,6 @@ proc_ptm_cfg_help:
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -334,7 +334,7 @@
|
|||||||
int (*umt_init)(u32 umt_id, u32 umt_period, u32 umt_dst);
|
int (*umt_init)(u32 umt_id, u32 umt_period, u32 umt_dst);
|
||||||
--- a/dcdp/ptm_tc.c
|
--- a/dcdp/ptm_tc.c
|
||||||
+++ b/dcdp/ptm_tc.c
|
+++ b/dcdp/ptm_tc.c
|
||||||
@@ -141,7 +141,11 @@ static int ptm_open(struct net_device *d
|
@@ -146,7 +146,11 @@ static int ptm_open(struct net_device *d
|
||||||
struct ptm_priv *ptm_tc = netdev_priv(dev);
|
struct ptm_priv *ptm_tc = netdev_priv(dev);
|
||||||
|
|
||||||
tc_info(ptm_tc->tc_priv, MSG_EVENT, "ptm open\n");
|
tc_info(ptm_tc->tc_priv, MSG_EVENT, "ptm open\n");
|
||||||
@ -346,7 +346,7 @@
|
|||||||
#ifdef CONFIG_SOC_TYPE_XWAY
|
#ifdef CONFIG_SOC_TYPE_XWAY
|
||||||
xet_phy_wan_port(7, NULL, 1, 1);
|
xet_phy_wan_port(7, NULL, 1, 1);
|
||||||
if (ppa_hook_ppa_phys_port_add_fn)
|
if (ppa_hook_ppa_phys_port_add_fn)
|
||||||
@@ -158,7 +162,11 @@ static int ptm_stop(struct net_device *d
|
@@ -163,7 +167,11 @@ static int ptm_stop(struct net_device *d
|
||||||
struct ptm_priv *ptm_tc = netdev_priv(dev);
|
struct ptm_priv *ptm_tc = netdev_priv(dev);
|
||||||
|
|
||||||
tc_info(ptm_tc->tc_priv, MSG_EVENT, "ptm stop\n");
|
tc_info(ptm_tc->tc_priv, MSG_EVENT, "ptm stop\n");
|
||||||
@ -358,7 +358,7 @@
|
|||||||
#ifdef CONFIG_SOC_TYPE_XWAY
|
#ifdef CONFIG_SOC_TYPE_XWAY
|
||||||
if (ppa_drv_datapath_mac_entry_setting)
|
if (ppa_drv_datapath_mac_entry_setting)
|
||||||
ppa_drv_datapath_mac_entry_setting(dev->dev_addr, 0, 6, 10, 1, 2);
|
ppa_drv_datapath_mac_entry_setting(dev->dev_addr, 0, 6, 10, 1, 2);
|
||||||
@@ -555,7 +563,7 @@ static void ptm_rx(struct net_device *de
|
@@ -564,7 +572,7 @@ static void ptm_rx(struct net_device *de
|
||||||
ptm_tc->stats64.rx_packets++;
|
ptm_tc->stats64.rx_packets++;
|
||||||
ptm_tc->stats64.rx_bytes += skb->len;
|
ptm_tc->stats64.rx_bytes += skb->len;
|
||||||
|
|
||||||
@ -367,17 +367,22 @@
|
|||||||
ptm_tc->stats64.rx_dropped++;
|
ptm_tc->stats64.rx_dropped++;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -651,6 +659,9 @@ static int ptm_dev_init(struct tc_priv *
|
@@ -664,6 +672,14 @@ static int ptm_dev_init(struct tc_priv *
|
||||||
memcpy(ptm_tc->outq_map, def_outq_map, sizeof(def_outq_map));
|
memcpy(ptm_tc->outq_map, def_outq_map, sizeof(def_outq_map));
|
||||||
SET_NETDEV_DEV(ptm_tc->dev, tc_priv->ep_dev[id].dev);
|
SET_NETDEV_DEV(ptm_tc->dev, tc_priv->ep_dev[id].dev);
|
||||||
|
|
||||||
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0))
|
||||||
|
+ netif_napi_add(ptm_tc->dev, &ptm_tc->napi_rx, tc_priv->tc_ops.napi_rx);
|
||||||
|
+ netif_napi_add_tx(ptm_tc->dev, &ptm_tc->napi_tx, tc_priv->tc_ops.napi_tx);
|
||||||
|
+#else
|
||||||
+ netif_napi_add(ptm_tc->dev, &ptm_tc->napi_rx, tc_priv->tc_ops.napi_rx, NAPI_POLL_WEIGHT);
|
+ netif_napi_add(ptm_tc->dev, &ptm_tc->napi_rx, tc_priv->tc_ops.napi_rx, NAPI_POLL_WEIGHT);
|
||||||
+ netif_tx_napi_add(ptm_tc->dev, &ptm_tc->napi_tx, tc_priv->tc_ops.napi_tx, NAPI_POLL_WEIGHT);
|
+ netif_tx_napi_add(ptm_tc->dev, &ptm_tc->napi_tx, tc_priv->tc_ops.napi_tx, NAPI_POLL_WEIGHT);
|
||||||
+
|
+
|
||||||
|
+#endif
|
||||||
err = register_netdev(ptm_tc->dev);
|
err = register_netdev(ptm_tc->dev);
|
||||||
if (err)
|
if (err)
|
||||||
goto err1;
|
goto err1;
|
||||||
@@ -2605,7 +2616,9 @@ static int ptm_ring_init(struct ptm_ep_p
|
@@ -2618,7 +2634,9 @@ static int ptm_ring_init(struct ptm_ep_p
|
||||||
{
|
{
|
||||||
ptm_aca_ring_config_init(priv, id, bonding);
|
ptm_aca_ring_config_init(priv, id, bonding);
|
||||||
return priv->tc_priv->tc_ops.dev_reg(priv->ptm_tc->dev,
|
return priv->tc_priv->tc_ops.dev_reg(priv->ptm_tc->dev,
|
||||||
@ -388,7 +393,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2960,7 +2973,9 @@ void ptm_tc_unload(enum dsl_tc_mode tc_m
|
@@ -2973,7 +2991,9 @@ void ptm_tc_unload(enum dsl_tc_mode tc_m
|
||||||
/* unregister device */
|
/* unregister device */
|
||||||
if (ptm_tc->tc_priv->tc_ops.dev_unreg != NULL)
|
if (ptm_tc->tc_priv->tc_ops.dev_unreg != NULL)
|
||||||
ptm_tc->tc_priv->tc_ops.dev_unreg(ptm_tc->dev,
|
ptm_tc->tc_priv->tc_ops.dev_unreg(ptm_tc->dev,
|
||||||
@ -399,7 +404,7 @@
|
|||||||
|
|
||||||
/* remove PTM callback function */
|
/* remove PTM callback function */
|
||||||
ptm_cb_setup(ptm_tc, 0);
|
ptm_cb_setup(ptm_tc, 0);
|
||||||
@@ -2978,6 +2993,10 @@ void ptm_exit(void)
|
@@ -2991,6 +3011,10 @@ void ptm_exit(void)
|
||||||
|
|
||||||
if (!priv)
|
if (!priv)
|
||||||
return;
|
return;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/dcdp/ptm_tc.c
|
--- a/dcdp/ptm_tc.c
|
||||||
+++ b/dcdp/ptm_tc.c
|
+++ b/dcdp/ptm_tc.c
|
||||||
@@ -298,15 +298,19 @@ static int ptm_tc_get_stats(struct ptm_e
|
@@ -307,15 +307,19 @@ static int ptm_tc_get_stats(struct ptm_e
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
struct rtnl_link_stats64 *stat;
|
struct rtnl_link_stats64 *stat;
|
||||||
@ -21,7 +21,7 @@
|
|||||||
if (bonding)
|
if (bonding)
|
||||||
stats->tc_info = TC_PTM_BND_MODE;
|
stats->tc_info = TC_PTM_BND_MODE;
|
||||||
else
|
else
|
||||||
@@ -340,11 +344,11 @@ static int ptm_tc_get_stats(struct ptm_e
|
@@ -349,11 +353,11 @@ static int ptm_tc_get_stats(struct ptm_e
|
||||||
? cur_cnt - last_cnt
|
? cur_cnt - last_cnt
|
||||||
: cur_cnt + ((unsigned int)(-1) - last_cnt);
|
: cur_cnt + ((unsigned int)(-1) - last_cnt);
|
||||||
|
|
||||||
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
cur_cnt = tc_r32(GIF0_RX_CRC_ERR_CNT);
|
cur_cnt = tc_r32(GIF0_RX_CRC_ERR_CNT);
|
||||||
last_cnt = priv->ptm_mib.rx_crc_err_pdu[0];
|
last_cnt = priv->ptm_mib.rx_crc_err_pdu[0];
|
||||||
@@ -358,7 +362,7 @@ static int ptm_tc_get_stats(struct ptm_e
|
@@ -367,7 +371,7 @@ static int ptm_tc_get_stats(struct ptm_e
|
||||||
? cur_cnt - last_cnt
|
? cur_cnt - last_cnt
|
||||||
: cur_cnt + ((unsigned int)(-1) - last_cnt);
|
: cur_cnt + ((unsigned int)(-1) - last_cnt);
|
||||||
|
|
||||||
@ -45,7 +45,7 @@
|
|||||||
cur_cnt = sb_r32(__US_TC_LOCAL_Q_CFG_CTXT_BASE +
|
cur_cnt = sb_r32(__US_TC_LOCAL_Q_CFG_CTXT_BASE +
|
||||||
offsetof(desq_cfg_ctxt_t, deq_pkt_cnt) / 4);
|
offsetof(desq_cfg_ctxt_t, deq_pkt_cnt) / 4);
|
||||||
last_cnt = priv->ptm_mib.tx_total_pdu[0];
|
last_cnt = priv->ptm_mib.tx_total_pdu[0];
|
||||||
@@ -376,90 +380,108 @@ static int ptm_tc_get_stats(struct ptm_e
|
@@ -385,90 +389,108 @@ static int ptm_tc_get_stats(struct ptm_e
|
||||||
/* For bonding information */
|
/* For bonding information */
|
||||||
if (bonding) {
|
if (bonding) {
|
||||||
int i;
|
int i;
|
||||||
|
@ -117,3 +117,27 @@ define KernelPackage/vfio-pci/description
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call KernelPackage,vfio-pci))
|
$(eval $(call KernelPackage,vfio-pci))
|
||||||
|
|
||||||
|
|
||||||
|
define KernelPackage/vhost
|
||||||
|
SUBMENU:=Virtualization
|
||||||
|
TITLE:=Host kernel accelerator for virtio (base)
|
||||||
|
KCONFIG:=CONFIG_VHOST
|
||||||
|
FILES:=$(LINUX_DIR)/drivers/vhost/vhost.ko \
|
||||||
|
$(LINUX_DIR)/drivers/vhost/vhost_iotlb.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,vhost vhost_iotlb)
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,vhost))
|
||||||
|
|
||||||
|
|
||||||
|
define KernelPackage/vhost-net
|
||||||
|
SUBMENU:=Virtualization
|
||||||
|
TITLE:=Host kernel accelerator for virtio-net
|
||||||
|
DEPENDS:=+kmod-tun +kmod-vhost
|
||||||
|
KCONFIG:=CONFIG_VHOST_NET
|
||||||
|
FILES:=$(LINUX_DIR)/drivers/vhost/vhost_net.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,vhost_net)
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,vhost-net))
|
||||||
|
@ -131,7 +131,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
|||||||
/**
|
/**
|
||||||
* fwnode_mdio_find_device - Given a fwnode, find the mdio_device
|
* fwnode_mdio_find_device - Given a fwnode, find the mdio_device
|
||||||
* @fwnode: pointer to the mdio_device's fwnode
|
* @fwnode: pointer to the mdio_device's fwnode
|
||||||
@@ -3118,6 +3189,11 @@ static int phy_probe(struct device *dev)
|
@@ -3120,6 +3191,11 @@ static int phy_probe(struct device *dev)
|
||||||
/* Set the state to READY by default */
|
/* Set the state to READY by default */
|
||||||
phydev->state = PHY_READY;
|
phydev->state = PHY_READY;
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
|||||||
|
|
||||||
--- a/drivers/bluetooth/btusb.c
|
--- a/drivers/bluetooth/btusb.c
|
||||||
+++ b/drivers/bluetooth/btusb.c
|
+++ b/drivers/bluetooth/btusb.c
|
||||||
@@ -2272,6 +2272,23 @@ struct btmtk_section_map {
|
@@ -2275,6 +2275,23 @@ struct btmtk_section_map {
|
||||||
};
|
};
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
|||||||
static void btusb_mtk_wmt_recv(struct urb *urb)
|
static void btusb_mtk_wmt_recv(struct urb *urb)
|
||||||
{
|
{
|
||||||
struct hci_dev *hdev = urb->context;
|
struct hci_dev *hdev = urb->context;
|
||||||
@@ -3923,6 +3940,7 @@ static int btusb_probe(struct usb_interf
|
@@ -3926,6 +3943,7 @@ static int btusb_probe(struct usb_interf
|
||||||
hdev->shutdown = btusb_mtk_shutdown;
|
hdev->shutdown = btusb_mtk_shutdown;
|
||||||
hdev->manufacturer = 70;
|
hdev->manufacturer = 70;
|
||||||
hdev->cmd_timeout = btusb_mtk_cmd_timeout;
|
hdev->cmd_timeout = btusb_mtk_cmd_timeout;
|
||||||
|
@ -18,7 +18,7 @@ Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
|||||||
|
|
||||||
--- a/drivers/bluetooth/btusb.c
|
--- a/drivers/bluetooth/btusb.c
|
||||||
+++ b/drivers/bluetooth/btusb.c
|
+++ b/drivers/bluetooth/btusb.c
|
||||||
@@ -2277,7 +2277,7 @@ static int btusb_set_bdaddr_mtk(struct h
|
@@ -2280,7 +2280,7 @@ static int btusb_set_bdaddr_mtk(struct h
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
long ret;
|
long ret;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ Subject: [PATCH] net/dsa/mv88e6xxx: disable ATU violation
|
|||||||
|
|
||||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||||
@@ -2985,6 +2985,9 @@ static int mv88e6xxx_setup_port(struct m
|
@@ -2993,6 +2993,9 @@ static int mv88e6xxx_setup_port(struct m
|
||||||
else
|
else
|
||||||
reg = 1 << port;
|
reg = 1 << port;
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
|
|||||||
|
|
||||||
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
--- a/drivers/net/dsa/mv88e6xxx/chip.c
|
||||||
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
|
||||||
@@ -6333,6 +6333,7 @@ static int mv88e6xxx_register_switch(str
|
@@ -6341,6 +6341,7 @@ static int mv88e6xxx_register_switch(str
|
||||||
ds->ops = &mv88e6xxx_switch_ops;
|
ds->ops = &mv88e6xxx_switch_ops;
|
||||||
ds->ageing_time_min = chip->info->age_time_coeff;
|
ds->ageing_time_min = chip->info->age_time_coeff;
|
||||||
ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX;
|
ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX;
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
led-failsafe = &flash;
|
led-failsafe = &flash;
|
||||||
led-running = &power;
|
led-running = &power;
|
||||||
led-upgrade = &flash;
|
led-upgrade = &flash;
|
||||||
|
label-mac-device = &gmac;
|
||||||
};
|
};
|
||||||
|
|
||||||
soc {
|
soc {
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
|
# CONFIG_ARM_QCOM_SPM_CPUIDLE is not set
|
||||||
CONFIG_BLK_DEV_SD=y
|
CONFIG_BLK_DEV_SD=y
|
||||||
CONFIG_LEDS_LP5523=y
|
CONFIG_LEDS_LP5523=y
|
||||||
CONFIG_LEDS_LP55XX_COMMON=y
|
CONFIG_LEDS_LP55XX_COMMON=y
|
||||||
CONFIG_PHY_QCOM_IPQ806X_USB=y
|
CONFIG_PHY_QCOM_IPQ806X_USB=y
|
||||||
|
# CONFIG_QCOM_SPM is not set
|
||||||
CONFIG_SCSI=y
|
CONFIG_SCSI=y
|
||||||
CONFIG_SCSI_COMMON=y
|
CONFIG_SCSI_COMMON=y
|
||||||
CONFIG_SG_POOL=y
|
CONFIG_SG_POOL=y
|
||||||
|
@ -288,6 +288,10 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&adm_dma {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&gmac0 {
|
&gmac0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phy-mode = "rgmii";
|
phy-mode = "rgmii";
|
||||||
|
@ -1,158 +1,8 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
#include "mt7621.dtsi"
|
#include "mt7621_dlink_dxx-1xx0-x1.dtsi"
|
||||||
|
|
||||||
#include <dt-bindings/gpio/gpio.h>
|
|
||||||
#include <dt-bindings/input/input.h>
|
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
compatible = "dlink,dap-1620-b1", "mediatek,mt7621-soc";
|
compatible = "dlink,dap-1620-b1", "mediatek,mt7621-soc";
|
||||||
model = "D-Link DAP-1620 B1";
|
model = "D-Link DAP-1620 B1";
|
||||||
|
|
||||||
aliases {
|
|
||||||
label-mac-device = &gmac0;
|
|
||||||
|
|
||||||
led-boot = &led_status_red;
|
|
||||||
led-failsafe = &led_status_green;
|
|
||||||
led-running = &led_status_green;
|
|
||||||
led-upgrade = &led_status_red;
|
|
||||||
};
|
|
||||||
|
|
||||||
keys {
|
|
||||||
compatible = "gpio-keys";
|
|
||||||
|
|
||||||
reset {
|
|
||||||
label = "reset";
|
|
||||||
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
|
|
||||||
linux,code = <KEY_RESTART>;
|
|
||||||
debounce-interval = <60>;
|
|
||||||
};
|
|
||||||
|
|
||||||
wps {
|
|
||||||
label = "wps";
|
|
||||||
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
|
||||||
linux,code = <KEY_WPS_BUTTON>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
leds {
|
|
||||||
compatible = "gpio-leds";
|
|
||||||
|
|
||||||
led_status_red: status_red {
|
|
||||||
label = "red:status";
|
|
||||||
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
led_status_green: status_green {
|
|
||||||
label = "green:status";
|
|
||||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
rssi_low_red {
|
|
||||||
label = "red:rssilow";
|
|
||||||
gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
rssi_low_green {
|
|
||||||
label = "green:rssilow";
|
|
||||||
gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
rssi_med_green {
|
|
||||||
label = "green:rssimed";
|
|
||||||
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
|
|
||||||
rssi_high_green {
|
|
||||||
label = "green:rssihigh";
|
|
||||||
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&spi0 {
|
|
||||||
status = "okay";
|
|
||||||
|
|
||||||
flash@0 {
|
|
||||||
compatible = "jedec,spi-nor";
|
|
||||||
reg = <0>;
|
|
||||||
spi-max-frequency = <50000000>;
|
|
||||||
|
|
||||||
partitions {
|
|
||||||
compatible = "fixed-partitions";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
|
|
||||||
partition@0 {
|
|
||||||
label = "u-boot";
|
|
||||||
reg = <0x0 0x30000>;
|
|
||||||
read-only;
|
|
||||||
};
|
|
||||||
|
|
||||||
partition@30000 {
|
|
||||||
label = "u-boot-env";
|
|
||||||
reg = <0x30000 0x10000>;
|
|
||||||
read-only;
|
|
||||||
};
|
|
||||||
|
|
||||||
factory: partition@40000 {
|
|
||||||
label = "factory";
|
|
||||||
reg = <0x40000 0x10000>;
|
|
||||||
read-only;
|
|
||||||
|
|
||||||
compatible = "nvmem-cells";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
|
|
||||||
macaddr_factory_e000: macaddr@e000 {
|
|
||||||
reg = <0xe000 0x6>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
partition@50000 {
|
|
||||||
compatible = "denx,uimage";
|
|
||||||
label = "firmware";
|
|
||||||
reg = <0x50000 0xfb0000>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&pcie {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&pcie0 {
|
|
||||||
wifi@0,0 {
|
|
||||||
compatible = "mediatek,mt76";
|
|
||||||
reg = <0x0000 0 0 0 0>;
|
|
||||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
|
||||||
/* The correct MAC addresses are set in 10_fix_wifi_mac. */
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&gmac0 {
|
|
||||||
nvmem-cells = <&macaddr_factory_e000>;
|
|
||||||
nvmem-cell-names = "mac-address";
|
|
||||||
};
|
|
||||||
|
|
||||||
&switch0 {
|
|
||||||
ports {
|
|
||||||
port@0 {
|
|
||||||
status = "okay";
|
|
||||||
label = "lan";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
ðernet {
|
|
||||||
pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&state_default {
|
|
||||||
gpio {
|
|
||||||
groups = "uart3", "jtag", "wdt";
|
|
||||||
function = "gpio";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
8
target/linux/ramips/dts/mt7621_dlink_dra-1360-a1.dts
Normal file
8
target/linux/ramips/dts/mt7621_dlink_dra-1360-a1.dts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "mt7621_dlink_dxx-1xx0-x1.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
compatible = "dlink,dra-1360-a1", "mediatek,mt7621-soc";
|
||||||
|
model = "D-Link DRA-1360 A1";
|
||||||
|
};
|
154
target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi
Normal file
154
target/linux/ramips/dts/mt7621_dlink_dxx-1xx0-x1.dtsi
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
#include "mt7621.dtsi"
|
||||||
|
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
aliases {
|
||||||
|
label-mac-device = &gmac0;
|
||||||
|
|
||||||
|
led-boot = &led_status_red;
|
||||||
|
led-failsafe = &led_status_green;
|
||||||
|
led-running = &led_status_green;
|
||||||
|
led-upgrade = &led_status_red;
|
||||||
|
};
|
||||||
|
|
||||||
|
keys {
|
||||||
|
compatible = "gpio-keys";
|
||||||
|
|
||||||
|
reset {
|
||||||
|
label = "reset";
|
||||||
|
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,code = <KEY_RESTART>;
|
||||||
|
debounce-interval = <60>;
|
||||||
|
};
|
||||||
|
|
||||||
|
wps {
|
||||||
|
label = "wps";
|
||||||
|
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
||||||
|
linux,code = <KEY_WPS_BUTTON>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
led_status_red: status_red {
|
||||||
|
label = "red:status";
|
||||||
|
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
led_status_green: status_green {
|
||||||
|
label = "green:status";
|
||||||
|
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
rssi_low_red {
|
||||||
|
label = "red:rssilow";
|
||||||
|
gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
rssi_low_green {
|
||||||
|
label = "green:rssilow";
|
||||||
|
gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
rssi_med_green {
|
||||||
|
label = "green:rssimed";
|
||||||
|
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
|
||||||
|
rssi_high_green {
|
||||||
|
label = "green:rssihigh";
|
||||||
|
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi0 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
flash@0 {
|
||||||
|
compatible = "jedec,spi-nor";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <50000000>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
compatible = "fixed-partitions";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
partition@0 {
|
||||||
|
label = "u-boot";
|
||||||
|
reg = <0x0 0x30000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@30000 {
|
||||||
|
label = "u-boot-env";
|
||||||
|
reg = <0x30000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
};
|
||||||
|
|
||||||
|
factory: partition@40000 {
|
||||||
|
label = "factory";
|
||||||
|
reg = <0x40000 0x10000>;
|
||||||
|
read-only;
|
||||||
|
|
||||||
|
compatible = "nvmem-cells";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
macaddr_factory_e000: macaddr@e000 {
|
||||||
|
reg = <0xe000 0x6>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@50000 {
|
||||||
|
compatible = "denx,uimage";
|
||||||
|
label = "firmware";
|
||||||
|
reg = <0x50000 0xfb0000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&pcie0 {
|
||||||
|
wifi@0,0 {
|
||||||
|
compatible = "mediatek,mt76";
|
||||||
|
reg = <0x0000 0 0 0 0>;
|
||||||
|
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||||
|
/* The correct MAC addresses are set in 10_fix_wifi_mac. */
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&gmac0 {
|
||||||
|
nvmem-cells = <&macaddr_factory_e000>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
};
|
||||||
|
|
||||||
|
&switch0 {
|
||||||
|
ports {
|
||||||
|
port@0 {
|
||||||
|
status = "okay";
|
||||||
|
label = "lan";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ðernet {
|
||||||
|
pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&state_default {
|
||||||
|
gpio {
|
||||||
|
groups = "uart3", "jtag", "wdt";
|
||||||
|
function = "gpio";
|
||||||
|
};
|
||||||
|
};
|
@ -615,12 +615,9 @@ define Device/cudy_x6-v2
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += cudy_x6-v2
|
TARGET_DEVICES += cudy_x6-v2
|
||||||
|
|
||||||
define Device/dlink_dap-1620-b1
|
define Device/dlink_dxx-1xx0-x1
|
||||||
DEVICE_VENDOR := D-Link
|
DEVICE_VENDOR := D-Link
|
||||||
DEVICE_MODEL := DAP-1620
|
|
||||||
DEVICE_VARIANT := B1
|
|
||||||
DEVICE_PACKAGES := kmod-mt7615-firmware rssileds
|
DEVICE_PACKAGES := kmod-mt7615-firmware rssileds
|
||||||
DLINK_HWID := MT76XMT7621-RP-PR2475-NA
|
|
||||||
IMAGE_SIZE := 16064k
|
IMAGE_SIZE := 16064k
|
||||||
IMAGES += factory.bin
|
IMAGES += factory.bin
|
||||||
IMAGE/factory.bin := $$(sysupgrade_bin) | \
|
IMAGE/factory.bin := $$(sysupgrade_bin) | \
|
||||||
@ -629,6 +626,13 @@ define Device/dlink_dap-1620-b1
|
|||||||
append-string $$(DLINK_HWID) | \
|
append-string $$(DLINK_HWID) | \
|
||||||
check-size
|
check-size
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Device/dlink_dap-1620-b1
|
||||||
|
$(Device/dlink_dxx-1xx0-x1)
|
||||||
|
DEVICE_MODEL := DAP-1620
|
||||||
|
DEVICE_VARIANT := B1
|
||||||
|
DLINK_HWID := MT76XMT7621-RP-PR2475-NA
|
||||||
|
endef
|
||||||
TARGET_DEVICES += dlink_dap-1620-b1
|
TARGET_DEVICES += dlink_dap-1620-b1
|
||||||
|
|
||||||
define Device/dlink_dap-x1860-a1
|
define Device/dlink_dap-x1860-a1
|
||||||
@ -800,6 +804,14 @@ define Device/dlink_dir-882-r1
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += dlink_dir-882-r1
|
TARGET_DEVICES += dlink_dir-882-r1
|
||||||
|
|
||||||
|
define Device/dlink_dra-1360-a1
|
||||||
|
$(Device/dlink_dxx-1xx0-x1)
|
||||||
|
DEVICE_MODEL := DRA-1360
|
||||||
|
DEVICE_VARIANT := A1
|
||||||
|
DLINK_HWID := MT76XMT7621-RP-RA1360-NA
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += dlink_dra-1360-a1
|
||||||
|
|
||||||
define Device/dual-q_h721
|
define Device/dual-q_h721
|
||||||
$(Device/dsa-migration)
|
$(Device/dsa-migration)
|
||||||
$(Device/uimage-lzma-loader)
|
$(Device/uimage-lzma-loader)
|
||||||
|
@ -69,7 +69,8 @@ jcg,y2|\
|
|||||||
xzwifi,creativebox-v1)
|
xzwifi,creativebox-v1)
|
||||||
ucidef_set_led_netdev "internet" "internet" "blue:internet" "wan"
|
ucidef_set_led_netdev "internet" "internet" "blue:internet" "wan"
|
||||||
;;
|
;;
|
||||||
dlink,dap-1620-b1)
|
dlink,dap-1620-b1|\
|
||||||
|
dlink,dra-1360-a1)
|
||||||
ucidef_set_rssimon "wlan1" "200000" "1"
|
ucidef_set_rssimon "wlan1" "200000" "1"
|
||||||
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan1" "1" "40"
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan1" "1" "40"
|
||||||
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:rssilow" "wlan1" "21" "100"
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "green:rssilow" "wlan1" "21" "100"
|
||||||
|
@ -16,6 +16,7 @@ ramips_setup_interfaces()
|
|||||||
asus,rp-ac87|\
|
asus,rp-ac87|\
|
||||||
dlink,dap-1620-b1|\
|
dlink,dap-1620-b1|\
|
||||||
dlink,dap-x1860-a1|\
|
dlink,dap-x1860-a1|\
|
||||||
|
dlink,dra-1360-a1|\
|
||||||
edimax,re23s|\
|
edimax,re23s|\
|
||||||
linksys,re7000|\
|
linksys,re7000|\
|
||||||
mikrotik,ltap-2hnd|\
|
mikrotik,ltap-2hnd|\
|
||||||
|
@ -38,7 +38,8 @@ case "$board" in
|
|||||||
macaddr_setbit_la "$(macaddr_add $hw_mac_addr 0x100000)" > /sys${DEVPATH}/macaddress
|
macaddr_setbit_la "$(macaddr_add $hw_mac_addr 0x100000)" > /sys${DEVPATH}/macaddress
|
||||||
;;
|
;;
|
||||||
dlink,dap-1620-b1|\
|
dlink,dap-1620-b1|\
|
||||||
dlink,dir-853-a1)
|
dlink,dir-853-a1|\
|
||||||
|
dlink,dra-1360-a1)
|
||||||
lan_mac_addr="$(mtd_get_mac_binary factory 0xe000)"
|
lan_mac_addr="$(mtd_get_mac_binary factory 0xe000)"
|
||||||
[ "$PHYNBR" = "0" ] && \
|
[ "$PHYNBR" = "0" ] && \
|
||||||
macaddr_add $lan_mac_addr 1 > /sys${DEVPATH}/macaddress
|
macaddr_add $lan_mac_addr 1 > /sys${DEVPATH}/macaddress
|
||||||
|
@ -212,6 +212,14 @@ define Device/lunzn_fastrhino-r68s
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += lunzn_fastrhino-r68s
|
TARGET_DEVICES += lunzn_fastrhino-r68s
|
||||||
|
|
||||||
|
define Device/pine64_rock64
|
||||||
|
DEVICE_VENDOR := Pine64
|
||||||
|
DEVICE_MODEL := Rock64
|
||||||
|
SOC := rk3328
|
||||||
|
BOOT_FLOW := pine64-bin
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += pine64_rock64
|
||||||
|
|
||||||
define Device/pine64_rockpro64
|
define Device/pine64_rockpro64
|
||||||
DEVICE_VENDOR := Pine64
|
DEVICE_VENDOR := Pine64
|
||||||
DEVICE_MODEL := RockPro64
|
DEVICE_MODEL := RockPro64
|
||||||
|
@ -399,9 +399,6 @@ CONFIG_TREE_SRCU=y
|
|||||||
CONFIG_UCS2_STRING=y
|
CONFIG_UCS2_STRING=y
|
||||||
CONFIG_USB_STORAGE=y
|
CONFIG_USB_STORAGE=y
|
||||||
CONFIG_USER_RETURN_NOTIFIER=y
|
CONFIG_USER_RETURN_NOTIFIER=y
|
||||||
CONFIG_VHOST=y
|
|
||||||
CONFIG_VHOST_IOTLB=y
|
|
||||||
CONFIG_VHOST_NET=y
|
|
||||||
CONFIG_VIRTIO=y
|
CONFIG_VIRTIO=y
|
||||||
CONFIG_VIRTIO_BALLOON=y
|
CONFIG_VIRTIO_BALLOON=y
|
||||||
CONFIG_VIRTIO_BLK=y
|
CONFIG_VIRTIO_BLK=y
|
||||||
|
Loading…
x
Reference in New Issue
Block a user