diff --git a/patch/kernel/archive/meson64-7.0/board-radxa-zero2-dts-amlogic-describe-the-FUSB302-on-Radxa-Zero-2.patch b/patch/kernel/archive/meson64-7.0/board-radxa-zero2-dts-amlogic-describe-the-FUSB302-on-Radxa-Zero-2.patch deleted file mode 100644 index 8cf4cc7143..0000000000 --- a/patch/kernel/archive/meson64-7.0/board-radxa-zero2-dts-amlogic-describe-the-FUSB302-on-Radxa-Zero-2.patch +++ /dev/null @@ -1,516 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ricardo Pardini -Date: Wed, 14 Jan 2026 02:49:48 +0100 -Subject: arm64: dts: amlogic: add the type-c controller on Radxa Zero 2 - -The Radxa Zero2 has an FUSB302 controller on i2c3 at address 0x22 and -INT# wired to GPIOA-13; include a minimal connector. - -Signed-off-by: Ricardo Pardini ---- - arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts | 34 ++++++++++ - 1 file changed, 34 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts -index 111111111111..222222222222 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts -@@ -364,12 +364,46 @@ hdmi_tx_tmds_out: endpoint { - }; - }; - -+/* Also exposed on the 40-pin header: SDA pin 3, SCL pin 5 */ -+&i2c3 { -+ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; -+ pinctrl-names = "default"; -+ status = "okay"; -+ -+ fusb0: typec-portc@22 { -+ compatible = "fcs,fusb302"; -+ reg = <0x22>; -+ -+ pinctrl-0 = <&fusb302_irq_pins>; -+ pinctrl-names = "default"; -+ interrupt-parent = <&gpio_intc>; -+ interrupts = <74 IRQ_TYPE_LEVEL_LOW>; -+ -+ vbus-supply = <&ao_5v>; -+ -+ connector { -+ compatible = "usb-c-connector"; -+ }; -+ }; -+}; -+ - &ir { - status = "disabled"; - pinctrl-0 = <&remote_input_ao_pins>; - pinctrl-names = "default"; - }; - -+&periphs_pinctrl { -+ fusb302_irq_pins: fusb302-irq { -+ mux { -+ groups = "GPIOA_13"; -+ function = "gpio_periphs"; -+ bias-pull-up; -+ output-disable; -+ }; -+ }; -+}; -+ - &pwm_ab { - pinctrl-0 = <&pwm_a_e_pins>; - pinctrl-names = "default"; --- -Armbian - -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Tue, 31 Jan 2023 04:02:59 +0000 -Subject: dt-bindings: add wch vendor prefix - -Add vendor prefix for Nanjing Qinheng Microelectronics Co., Ltd -operating as WinChipHead (wch). - -Signed-off-by: Christian Hewitt ---- - Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml -index 111111111111..222222222222 100644 ---- a/Documentation/devicetree/bindings/vendor-prefixes.yaml -+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml -@@ -1789,6 +1789,8 @@ patternProperties: - description: Wandbord (Technexion) - "^waveshare,.*": - description: Waveshare Electronics -+ "^wch,.*": -+ description: Nanjing Qinheng Microelectronics Co., Ltd (WinChipHead) - "^wd,.*": - description: Western Digital Corp. - "^we,.*": --- -Armbian - -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Mon, 30 Jan 2023 15:50:30 +0000 -Subject: dt-bindings: usb: add USB superspeed GPIO based switch - -Introduce a binding for the CH482D GPIO-based switch hardware used for -switching USB SuperSpeed lanes from the USB Type-C plug orientation -signal provided by the Type-C Port Manager. - -Signed-off-by: Christian Hewitt -Signed-off-by: Neil Armstrong ---- - Documentation/devicetree/bindings/usb/gpio-superspeed-switch.yaml | 120 ++++++++++ - 1 file changed, 120 insertions(+) - -diff --git a/Documentation/devicetree/bindings/usb/gpio-superspeed-switch.yaml b/Documentation/devicetree/bindings/usb/gpio-superspeed-switch.yaml -new file mode 100644 -index 000000000000..111111111111 ---- /dev/null -+++ b/Documentation/devicetree/bindings/usb/gpio-superspeed-switch.yaml -@@ -0,0 +1,120 @@ -+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause -+%YAML 1.2 -+--- -+$id: "http://devicetree.org/schemas/usb/gpio-superspeed-switch.yaml#" -+$schema: "http://devicetree.org/meta-schemas/core.yaml#" -+ -+title: GPIO-based SuperSpeed switch -+ -+maintainers: -+ - Neil Armstrong -+ -+description: -+ In USB Type-C applications the USB SuperSpeed lanes must be switched depending -+ on the orientation of the Type-C plug. This binding describes a family of -+ hardware solutions which analog switches pairs of differential high-speed -+ lanes using a GPIO signal. -+ -+properties: -+ compatible: -+ items: -+ - enum: -+ - wcn,ch482d -+ - const: gpio-superspeed-switch -+ -+ enable-gpios: -+ description: Switch enable GPIO -+ -+ select-gpios: -+ description: Orientation select -+ -+ vcc-supply: -+ description: power supply -+ -+ orientation-switch: -+ description: Flag the port as possible handler of orientation switching -+ type: boolean -+ -+ ports: -+ $ref: /schemas/graph.yaml#/properties/ports -+ -+ properties: -+ port@0: -+ $ref: /schemas/graph.yaml#/properties/port -+ description: Super Speed output lanes -+ -+ port@1: -+ $ref: /schemas/graph.yaml#/properties/port -+ description: Super Speed input lanes -+ -+required: -+ - compatible -+ - select-gpios -+ - orientation-switch -+ - ports -+ -+additionalProperties: false -+ -+examples: -+ - | -+ #include -+ -+ tcpm { -+ connector { -+ compatible = "usb-c-connector"; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ tcpm_hs_out: endpoint { -+ remote-endpoint = <&usb_hs_phy_in>; -+ }; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ tcpm_ss_out: endpoint { -+ remote-endpoint = <&usb_ss_switch_in>; -+ }; -+ }; -+ -+ port@2 { -+ reg = <2>; -+ tcpm_sbu_out: endpoint { -+ remote-endpoint = <&sbu_mux_in>; -+ }; -+ }; -+ }; -+ }; -+ }; -+ -+ superspeed-mux { -+ compatible = "wcn,ch482d", "gpio-superspeed-switch"; -+ -+ select-gpios = <&gpio 7 GPIO_ACTIVE_LOW>; -+ -+ orientation-switch; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ usb_ss_switch_out: endpoint { -+ remote-endpoint = <&tcpm_ss_out>; -+ }; -+ }; -+ -+ port@1 { -+ reg = <1>; -+ usb_ss_switch_in: endpoint { -+ remote-endpoint = <&usb_ss_phy_in>; -+ }; -+ }; -+ }; -+ }; -+... --- -Armbian - -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Mon, 30 Jan 2023 15:37:29 +0000 -Subject: usb: typec: mux: Add generic GPIO based SuperSpeed switch driver - -Add a simple driver to register a GPIO Based SuperSpeed lanes -switch device used to flip the lanes depending on the Type-C -plug orientation. - -Signed-off-by: Christian Hewitt -Signed-off-by: Neil Armstrong ---- - drivers/usb/typec/mux/Kconfig | 6 + - drivers/usb/typec/mux/Makefile | 1 + - drivers/usb/typec/mux/gpio-superspeed-switch.c | 119 ++++++++++ - 3 files changed, 126 insertions(+) - -diff --git a/drivers/usb/typec/mux/Kconfig b/drivers/usb/typec/mux/Kconfig -index 111111111111..222222222222 100644 ---- a/drivers/usb/typec/mux/Kconfig -+++ b/drivers/usb/typec/mux/Kconfig -@@ -95,4 +95,10 @@ config TYPEC_MUX_WCD939X_USBSS - common USB Type-C connector. - If compiled as a module, the module will be named wcd939x-usbss. - -+config TYPEC_MUX_GPIO_SWITCH -+ tristate "GPIO based USB Type-C SuperSpeed switch" -+ help -+ Say Y or M if your system uses a GPIO based analog switch mux for -+ flipping the SuperSpeed lanes connected to a Type-C port. -+ - endmenu -diff --git a/drivers/usb/typec/mux/Makefile b/drivers/usb/typec/mux/Makefile -index 111111111111..222222222222 100644 ---- a/drivers/usb/typec/mux/Makefile -+++ b/drivers/usb/typec/mux/Makefile -@@ -10,3 +10,4 @@ obj-$(CONFIG_TYPEC_MUX_PS883X) += ps883x.o - obj-$(CONFIG_TYPEC_MUX_PTN36502) += ptn36502.o - obj-$(CONFIG_TYPEC_MUX_TUSB1046) += tusb1046.o - obj-$(CONFIG_TYPEC_MUX_WCD939X_USBSS) += wcd939x-usbss.o -+obj-$(CONFIG_TYPEC_MUX_GPIO_SWITCH) += gpio-superspeed-switch.o -diff --git a/drivers/usb/typec/mux/gpio-superspeed-switch.c b/drivers/usb/typec/mux/gpio-superspeed-switch.c -new file mode 100644 -index 000000000000..111111111111 ---- /dev/null -+++ b/drivers/usb/typec/mux/gpio-superspeed-switch.c -@@ -0,0 +1,119 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Copyright (C) 2024 Linaro Ltd. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+struct gpio_ss_switch { -+ struct gpio_desc *enable_gpio; -+ struct gpio_desc *select_gpio; -+ -+ struct typec_switch_dev *sw; -+ -+ bool enabled; -+ bool swapped; -+}; -+ -+static int gpio_ss_switch_set(struct typec_switch_dev *sw, -+ enum typec_orientation orientation) -+{ -+ struct gpio_ss_switch *gpio_ss_switch = typec_switch_get_drvdata(sw); -+ bool enabled; -+ bool swapped; -+ -+ enabled = gpio_ss_switch->enabled; -+ swapped = gpio_ss_switch->swapped; -+ -+ switch (orientation) { -+ case TYPEC_ORIENTATION_NONE: -+ enabled = false; -+ break; -+ case TYPEC_ORIENTATION_NORMAL: -+ swapped = false; -+ break; -+ case TYPEC_ORIENTATION_REVERSE: -+ swapped = true; -+ break; -+ } -+ -+ if (enabled != gpio_ss_switch->enabled) -+ gpiod_set_value_cansleep(gpio_ss_switch->enable_gpio, enabled); -+ -+ if (swapped != gpio_ss_switch->swapped) -+ gpiod_set_value_cansleep(gpio_ss_switch->select_gpio, swapped); -+ -+ gpio_ss_switch->enabled = enabled; -+ gpio_ss_switch->swapped = swapped; -+ -+ return 0; -+} -+ -+static int gpio_ss_switch_probe(struct platform_device *pdev) -+{ -+ struct typec_switch_desc sw_desc = { }; -+ struct device *dev = &pdev->dev; -+ struct gpio_ss_switch *gpio_ss_switch; -+ -+ gpio_ss_switch = devm_kzalloc(dev, sizeof(*gpio_ss_switch), GFP_KERNEL); -+ if (!gpio_ss_switch) -+ return -ENOMEM; -+ -+ gpio_ss_switch->enable_gpio = devm_gpiod_get_optional(dev, "enable", -+ GPIOD_OUT_LOW); -+ if (IS_ERR(gpio_ss_switch->enable_gpio)) -+ return dev_err_probe(dev, PTR_ERR(gpio_ss_switch->enable_gpio), -+ "unable to acquire enable gpio\n"); -+ -+ gpio_ss_switch->select_gpio = devm_gpiod_get(dev, "select", GPIOD_OUT_LOW); -+ if (IS_ERR(gpio_ss_switch->select_gpio)) -+ return dev_err_probe(dev, PTR_ERR(gpio_ss_switch->select_gpio), -+ "unable to acquire select gpio\n"); -+ -+ sw_desc.drvdata = gpio_ss_switch; -+ sw_desc.fwnode = dev_fwnode(dev); -+ sw_desc.set = gpio_ss_switch_set; -+ -+ gpio_ss_switch->sw = typec_switch_register(dev, &sw_desc); -+ if (IS_ERR(gpio_ss_switch->sw)) -+ return dev_err_probe(dev, PTR_ERR(gpio_ss_switch->sw), -+ "failed to register gpio_ss_switch switch\n"); -+ -+ platform_set_drvdata(pdev, gpio_ss_switch); -+ -+ return 0; -+} -+ -+static void gpio_ss_switch_remove(struct platform_device *pdev) -+{ -+ struct gpio_ss_switch *gpio_ss_switch = platform_get_drvdata(pdev); -+ -+ gpiod_set_value_cansleep(gpio_ss_switch->enable_gpio, 0); -+ -+ typec_switch_unregister(gpio_ss_switch->sw); -+} -+ -+static const struct of_device_id gpio_ss_switch_match[] = { -+ { .compatible = "gpio-superspeed-switch" }, -+ { /* sentinel */ } -+}; -+MODULE_DEVICE_TABLE(of, gpio_ss_switch_match); -+ -+static struct platform_driver gpio_ss_switch_driver = { -+ .probe = gpio_ss_switch_probe, -+ .remove = gpio_ss_switch_remove, -+ .driver = { -+ .name = "gpio_ss_switch", -+ .of_match_table = gpio_ss_switch_match, -+ }, -+}; -+module_platform_driver(gpio_ss_switch_driver); -+ -+MODULE_DESCRIPTION("GPIO based USB TYPE-C SuperSpeed switch driver"); -+MODULE_LICENSE("GPL"); --- -Armbian - -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Christian Hewitt -Date: Mon, 30 Jan 2023 06:21:27 +0100 -Subject: arm64: dts: meson: radxa-zero2: add FUSB302 support - -Add support for the FUSB302 TYPE-C connector -- rpardini: reworked on top of minimal submission to ML - -Signed-off-by: Christian Hewitt -Signed-off-by: Neil Armstrong -Signed-off-by: Ricardo Pardini ---- - arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts | 51 ++++++++++ - 1 file changed, 51 insertions(+) - -diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts -index 111111111111..222222222222 100644 ---- a/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts -+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-radxa-zero2.dts -@@ -12,8 +12,10 @@ - #include "meson-g12b-a311d.dtsi" - #include - #include -+#include - #include - #include -+#include - - / { - compatible = "radxa,zero2", "amlogic,a311d", "amlogic,g12b"; -@@ -84,6 +86,26 @@ sdio_pwrseq: sdio-pwrseq { - clock-names = "ext_clock"; - }; - -+ superspeed-switch { -+ compatible = "wcn,ch482d", "gpio-superspeed-switch"; -+ -+ select-gpios = <&gpio GPIOC_7 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; -+ -+ orientation-switch; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ usb_ss_switch_out: endpoint { -+ remote-endpoint = <&usb_con_ss>; -+ }; -+ }; -+ }; -+ }; -+ - ao_5v: regulator-ao-5v { - compatible = "regulator-fixed"; - regulator-name = "AO_5V"; -@@ -92,6 +114,14 @@ ao_5v: regulator-ao-5v { - regulator-always-on; - }; - -+ typec2_vbus: regulator-typec2-vbus { -+ compatible = "regulator-fixed"; -+ regulator-name = "TYPEC2_VBUS"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ vin-supply = <&ao_5v>; -+ }; -+ - vcc_1v8: regulator-vcc-1v8 { - compatible = "regulator-fixed"; - regulator-name = "VCC_1V8"; -@@ -383,6 +413,22 @@ fusb0: typec-portc@22 { - - connector { - compatible = "usb-c-connector"; -+ label = "USB-C"; -+ data-role = "host"; -+ power-role = "source"; -+ source-pdos = ; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ port@0 { -+ reg = <0>; -+ usb_con_ss: endpoint { -+ remote-endpoint = <&usb_ss_switch_out>; -+ }; -+ }; -+ }; - }; - }; - }; -@@ -539,3 +585,8 @@ &uart_AO { - &usb { - status = "okay"; - }; -+ -+&usb3_pcie_phy { -+ status = "okay"; -+ phy-supply = <&typec2_vbus>; -+}; --- -Armbian - diff --git a/patch/kernel/archive/meson64-7.0/general-gpu-drm-add-new-display-resolution-2560x1440.patch b/patch/kernel/archive/meson64-7.0/general-gpu-drm-add-new-display-resolution-2560x1440.patch deleted file mode 100644 index f949ac6740..0000000000 --- a/patch/kernel/archive/meson64-7.0/general-gpu-drm-add-new-display-resolution-2560x1440.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Dongjin Kim -Date: Thu, 10 Sep 2020 11:01:33 +0900 -Subject: ODROID-COMMON: gpu/drm: add new display resolution 2560x1440 - -Signed-off-by: Joy Cho -Signed-off-by: Dongjin Kim -- rpardini: hammer for 6.4-rc5 ---- - drivers/gpu/drm/meson/meson_vclk.c | 18 ++++++++++ - drivers/gpu/drm/meson/meson_venc.c | 2 +- - 2 files changed, 19 insertions(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/meson/meson_vclk.c b/drivers/gpu/drm/meson/meson_vclk.c -index 111111111111..222222222222 100644 ---- a/drivers/gpu/drm/meson/meson_vclk.c -+++ b/drivers/gpu/drm/meson/meson_vclk.c -@@ -357,6 +357,8 @@ enum { - MESON_VCLK_HDMI_594000, - /* 2970 /1 /1 /1 /5 /1 => /1 /2 */ - MESON_VCLK_HDMI_594000_YUV420, -+/* 4830 /2 /1 /2 /5 /1 => /1 /1 */ -+ MESON_VCLK_HDMI_241500, - }; - - struct meson_vclk_params { -@@ -467,6 +469,18 @@ struct meson_vclk_params { - .vid_pll_div = VID_PLL_DIV_5, - .vclk_div = 1, - }, -+ [MESON_VCLK_HDMI_241500] = { -+ .pll_freq = 4830000, -+ .phy_freq = 2415000, -+ .venc_freq = 241500, -+ .vclk_freq = 241500, -+ .pixel_freq = 241500, -+ .pll_od1 = 2, -+ .pll_od2 = 1, -+ .pll_od3 = 2, -+ .vid_pll_div = VID_PLL_DIV_5, -+ .vclk_div = 1, -+ }, - { /* sentinel */ }, - }; - -@@ -894,6 +908,10 @@ static void meson_vclk_set(struct meson_drm *priv, - m = 0xf7; - frac = vic_alternate_clock ? 0x8148 : 0x10000; - break; -+ case 4830000: -+ m = 0xc9; -+ frac = 0xd560; -+ break; - } - - meson_hdmi_pll_set_params(priv, m, frac, od1, od2, od3); -diff --git a/drivers/gpu/drm/meson/meson_venc.c b/drivers/gpu/drm/meson/meson_venc.c -index 111111111111..222222222222 100644 ---- a/drivers/gpu/drm/meson/meson_venc.c -+++ b/drivers/gpu/drm/meson/meson_venc.c -@@ -868,7 +868,7 @@ meson_venc_hdmi_supported_mode(const struct drm_display_mode *mode) - DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_NVSYNC)) - return MODE_BAD; - -- if (mode->hdisplay < 400 || mode->hdisplay > 1920) -+ if (mode->hdisplay < 400 || mode->hdisplay > 2560) - return MODE_BAD_HVALUE; - - if (mode->vdisplay < 480 || mode->vdisplay > 1920) --- -Armbian -