meson8b: Support HDMI (#3794)
* meson8b: Support HDMI * meson8b: drm: Forcefully enable XRGB format * Bump kernel version * Upgrade configs * Swap current and edge
This commit is contained in:
parent
84d1e1772f
commit
c4b62f848f
@ -3,6 +3,5 @@ BOARD_NAME="Odroid C1"
|
||||
BOARDFAMILY="meson8b"
|
||||
BOOTCONFIG="odroidc_config"
|
||||
KERNEL_TARGET="legacy,current,edge"
|
||||
BUILD_DESKTOP=no
|
||||
BOOTSIZE="200"
|
||||
BOOTFS_TYPE="fat"
|
||||
|
||||
@ -7,5 +7,3 @@ BOOTCONFIG="odroidc_config"
|
||||
|
||||
BOOTSIZE="200"
|
||||
BOOTFS_TYPE="fat"
|
||||
|
||||
BUILD_DESKTOP=no
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -17,20 +17,26 @@ GOVERNOR=ondemand
|
||||
case $BRANCH in
|
||||
legacy)
|
||||
|
||||
KERNELBRANCH="branch:linux-5.4.y"
|
||||
KERNELBRANCH="branch:linux-5.11.y"
|
||||
KERNELPATCHDIR='meson-'$BRANCH
|
||||
|
||||
BUILD_DESKTOP=no
|
||||
|
||||
;;
|
||||
current)
|
||||
|
||||
KERNELBRANCH="branch:linux-5.10.y"
|
||||
KERNELPATCHDIR='meson-current'
|
||||
KERNELBRANCH="branch:linux-5.14.y"
|
||||
KERNELPATCHDIR='meson-'$BRANCH
|
||||
|
||||
BUILD_DESKTOP=no
|
||||
|
||||
;;
|
||||
edge)
|
||||
|
||||
KERNELBRANCH="branch:linux-5.11.y"
|
||||
KERNELPATCHDIR='meson-current'
|
||||
KERNELDIR='linux-meson'
|
||||
KERNELSOURCE='https://github.com/xdarklight/linux'
|
||||
KERNELBRANCH="branch:meson-mx-integration-5.18-20220417"
|
||||
KERNELPATCHDIR='meson-'$BRANCH
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
|
||||
index 3b80bd3f6..79bb8de6d 100755
|
||||
--- a/scripts/package/builddeb
|
||||
+++ b/scripts/package/builddeb
|
||||
@@ -285,6 +285,12 @@ if [ "$ARCH" != "um" ]; then
|
||||
create_package "$dtb_packagename" "$dtb_dir"
|
||||
fi
|
||||
|
||||
+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/postinst
|
||||
+cat >> $tmpdir/DEBIAN/postinst <<EOT
|
||||
+mkimage -A arm -O linux -T kernel -C none -a 0x2080000 -e 0x2080000 -n "Linux" -d /boot/zImage /boot/uImage > /dev/null 2>&1
|
||||
+rm -f /boot/zImage
|
||||
+exit 0
|
||||
+EOT
|
||||
create_package "$packagename" "$tmpdir"
|
||||
|
||||
if [ -n "$BUILD_DEBUG" ] ; then
|
||||
@ -0,0 +1,22 @@
|
||||
meson8/meson8b/meson8m2: drm: Forcefully enable XRGB format
|
||||
|
||||
---
|
||||
drivers/gpu/drm/meson/meson_plane.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/meson/meson_plane.c b/drivers/gpu/drm/meson/meson_plane.c
|
||||
index 6c820230f47..16a2c18e717 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_plane.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_plane.c
|
||||
@@ -482,6 +482,8 @@ static const struct drm_plane_funcs meson_plane_funcs = {
|
||||
static const uint32_t supported_drm_formats_m8[] = {
|
||||
DRM_FORMAT_ARGB8888,
|
||||
DRM_FORMAT_ABGR8888,
|
||||
+ DRM_FORMAT_XRGB8888,
|
||||
+ DRM_FORMAT_XBGR8888,
|
||||
DRM_FORMAT_RGB888,
|
||||
DRM_FORMAT_RGB565,
|
||||
};
|
||||
--
|
||||
2.25.1
|
||||
|
||||
453
patch/kernel/archive/meson-5.18/support-xunlei-onecloud.patch
Normal file
453
patch/kernel/archive/meson-5.18/support-xunlei-onecloud.patch
Normal file
@ -0,0 +1,453 @@
|
||||
Support Xunlei OneCloud
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/meson8b-onecloud.dts | 424 +++++++++++++++++++++++++
|
||||
2 files changed, 425 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/meson8b-onecloud.dts
|
||||
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index e802f817e3a..51206ea5d3e 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -386,6 +386,7 @@ dtb-$(CONFIG_MACH_MESON8) += \
|
||||
meson8b-ec100.dtb \
|
||||
meson8b-mxq.dtb \
|
||||
meson8b-odroidc1.dtb \
|
||||
+ meson8b-onecloud.dtb \
|
||||
meson8m2-mxiii.dtb \
|
||||
meson8m2-mxiii-plus.dtb \
|
||||
meson8m2-m8s.dtb \
|
||||
diff --git a/arch/arm/boot/dts/meson8b-onecloud.dts b/arch/arm/boot/dts/meson8b-onecloud.dts
|
||||
new file mode 100644
|
||||
index 00000000000..69fff33c496
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/meson8b-onecloud.dts
|
||||
@@ -0,0 +1,424 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-only
|
||||
+/*
|
||||
+ * Author: hzyitc
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+#include "meson8b.dtsi"
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+
|
||||
+/ {
|
||||
+ model = "Xunlei OneCloud";
|
||||
+ compatible = "xunlei,onecloud", "amlogic,meson8b";
|
||||
+
|
||||
+ aliases {
|
||||
+ serial0 = &uart_AO;
|
||||
+ mmc0 = &sd_card_slot;
|
||||
+ mmc1 = &sdhc;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x40000000 0x40000000>;
|
||||
+ };
|
||||
+
|
||||
+ emmc_pwrseq: emmc-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-emmc";
|
||||
+ reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ hdmi-connector {
|
||||
+ compatible = "hdmi-connector";
|
||||
+ type = "a";
|
||||
+
|
||||
+ port {
|
||||
+ hdmi_connector_in: endpoint {
|
||||
+ remote-endpoint = <&hdmi_tx_tmds_out>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sound {
|
||||
+ compatible = "amlogic,gx-sound-card";
|
||||
+
|
||||
+ assigned-clocks = <&clkc CLKID_MPLL0>,
|
||||
+ <&clkc CLKID_MPLL1>;
|
||||
+ assigned-clock-rates = <294912000>,
|
||||
+ <270950400>;
|
||||
+
|
||||
+ dai-link-0 {
|
||||
+ sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
|
||||
+ };
|
||||
+
|
||||
+ dai-link-1 {
|
||||
+ sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
|
||||
+ dai-format = "i2s";
|
||||
+ mclk-fs = <256>;
|
||||
+
|
||||
+ codec-0 {
|
||||
+ sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ dai-link-2 {
|
||||
+ sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
|
||||
+
|
||||
+ codec-0 {
|
||||
+ sound-dai = <&hdmi_tx 0>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ button {
|
||||
+ // compatible = "gpio-keys-polled";
|
||||
+ // poll-interval = <100>;
|
||||
+
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ autorepeat;
|
||||
+
|
||||
+ reset-button {
|
||||
+ label = "reset";
|
||||
+ linux,code = <BTN_0>;
|
||||
+
|
||||
+ // gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_LOW>;
|
||||
+
|
||||
+ interrupt-parent = <&gpio_intc>;
|
||||
+ interrupts = <5 IRQ_TYPE_LEVEL_LOW>; // GPIOAO 5
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ red {
|
||||
+ label = "onecloud:red:alive";
|
||||
+ gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ default-state = "on";
|
||||
+ linux,default-trigger = "default-on";
|
||||
+ };
|
||||
+
|
||||
+ green {
|
||||
+ label = "onecloud:green:alive";
|
||||
+ gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ default-state = "off";
|
||||
+ linux,default-trigger = "mmc1";
|
||||
+ };
|
||||
+
|
||||
+ blue {
|
||||
+ label = "onecloud:blue:alive";
|
||||
+ gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ default-state = "off";
|
||||
+ linux,default-trigger = "usb-host";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ p12v: regulator-p12v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+
|
||||
+ regulator-name = "P12V";
|
||||
+ regulator-min-microvolt = <12000000>;
|
||||
+ regulator-max-microvolt = <12000000>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_5v: regulator-vcc-5v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+
|
||||
+ regulator-name = "VCC5V";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+
|
||||
+ vin-supply = <&p12v>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_3v3: regulator-vcc-3v3 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+
|
||||
+ regulator-name = "VCC3V3";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ vin-supply = <&p12v>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_1v8: regulator-vcc-1v8 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+
|
||||
+ regulator-name = "VCC1V8";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+
|
||||
+ vin-supply = <&p12v>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_ddr: regulator-vcc-ddr {
|
||||
+ compatible = "regulator-fixed";
|
||||
+
|
||||
+ regulator-name = "VCC_DDR";
|
||||
+ regulator-min-microvolt = <1500000>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+
|
||||
+ vin-supply = <&vcc_3v3>;
|
||||
+ };
|
||||
+
|
||||
+ vcc_core: regulator-vcc-core {
|
||||
+ // compatible = "regulator-fixed";
|
||||
+
|
||||
+ regulator-name = "VCC_CORE";
|
||||
+ // In fact, it's 1.0V.
|
||||
+ // But the kernel tries to tweak it and has lots of warning.
|
||||
+ // regulator-min-microvolt = <1000000>;
|
||||
+ // regulator-max-microvolt = <1000000>;
|
||||
+ regulator-min-microvolt = <860000>;
|
||||
+ regulator-max-microvolt = <1140000>;
|
||||
+
|
||||
+ vin-supply = <&p12v>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&aiu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&cpu0 {
|
||||
+ cpu-supply = <&vcc_core>;
|
||||
+};
|
||||
+
|
||||
+&mali {
|
||||
+ mali-supply = <&vcc_core>;
|
||||
+};
|
||||
+
|
||||
+&hdmi_tx {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
+&hdmi_tx_tmds_port {
|
||||
+ hdmi_tx_tmds_out: endpoint {
|
||||
+ remote-endpoint = <&hdmi_connector_in>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&gpio {
|
||||
+ gpio-line-names =
|
||||
+ // 0-3 Bank GPIOX 0-3
|
||||
+ "7U1_PIN_18", "7U1_PIN_19",
|
||||
+ "7U1_PIN_14", "7U1_PIN_15",
|
||||
+ // 4-7 Bank GPIOX 4-7
|
||||
+ "7U1_PIN_27", "7U1_PIN_25",
|
||||
+ "7U1_PIN_28", "7U1_PIN_26",
|
||||
+ // 8 Bank GPIOX 8
|
||||
+ "R_RightOf_LED",
|
||||
+ // 9 Bank GPIOX 9
|
||||
+ "7U1_PIN_16",
|
||||
+ // 10 Bank GPIOX 10
|
||||
+ "",
|
||||
+ // 11 Bank GPIOX 11
|
||||
+ "7U1_PIN_12",
|
||||
+ // 12-16 Bank GPIOX 16-20
|
||||
+ "7U1_PIN_43", "7U1_PIN_42",
|
||||
+ "7U1_PIN_41(Resistor)", "7U1_PIN_44",
|
||||
+ "7U1_PIN_34",
|
||||
+ // 17 Bank GPIOX 21
|
||||
+ "7U1_PIN_13",
|
||||
+
|
||||
+ // 18 Bank GPIOY 0
|
||||
+ "Resistor_TopOf_LED",
|
||||
+ // 19-20 Bank GPIOY 1-3
|
||||
+ "", "",
|
||||
+ // 21-26 Bank GPIOY 6-11
|
||||
+ "", "",
|
||||
+ "", "",
|
||||
+ "", "",
|
||||
+ // 27 Bank GPIOY 12
|
||||
+ "",
|
||||
+ // 28-29 Bank GPIOY 13-14
|
||||
+ "Left_BottomOf_CPU", "Right_BottomOf_CPU",
|
||||
+
|
||||
+ // 30 Bank GPIODV 9
|
||||
+ "VCCK_PWM (PWM_C)",
|
||||
+ // 31-35 Bank GPIODV 24-28
|
||||
+ "I2CA_SDA", "I2CA_SCL",
|
||||
+ "I2CB_SDA", "I2CB_SCL",
|
||||
+ "VDDEE_PWM (PWM_D)",
|
||||
+ // 36 Bank GPIODV 29
|
||||
+ "",
|
||||
+
|
||||
+ // 37-39 Bank GPIOH 0-2
|
||||
+ "HDMI_HPD", "HDMI_I2C_SDA", "HDMI_I2C_SCL",
|
||||
+ // 40-46 Bank GPIOH 3-9
|
||||
+ "ETH_PHY_INTR", "ETH_PHY_NRST",
|
||||
+ "ETH_TXD1", "ETH_TXD0",
|
||||
+ "ETH_TXD3", "ETH_TXD2",
|
||||
+ "ETH_RGMII_TX_CLK",
|
||||
+
|
||||
+ // 47-53 Bank CARD 0-6
|
||||
+ "SD_D1", "SD_D0",
|
||||
+ "SD_CLK", "SD_CMD",
|
||||
+ "SD_D3", "SD_D2",
|
||||
+ "SD_CD",
|
||||
+
|
||||
+ // 54-65 Bank BOOT 0-11
|
||||
+ "EMMC_D0", "EMMC_D1",
|
||||
+ "EMMC_D2", "EMMC_D3",
|
||||
+ "EMMC_D4", "EMMC_D5",
|
||||
+ "EMMC_D6", "EMMC_D7",
|
||||
+ "EMMC_CLK", "EMMC_RSTn",
|
||||
+ "EMMC_CMD", "BOOT_SEL",
|
||||
+ // 66-72 Bank BOOT 12-18
|
||||
+ "", "",
|
||||
+ "", "",
|
||||
+ "", "",
|
||||
+ "",
|
||||
+
|
||||
+ // 73-74 Bank DIF 0P 0N
|
||||
+ "ETH_RXD1", "ETH_RXD0",
|
||||
+ // 75-76 Bank DIF 1P 1N
|
||||
+ "ETH_RX_DV", "RGMII_RX_CLK",
|
||||
+ // 77-78 Bank DIF 2P 2N
|
||||
+ "ETH_RXD3", "ETH_RXD2",
|
||||
+ // 79-80 Bank DIF 3P 3N
|
||||
+ "ETH_TXEN", "ETH_PHY_REF_CLK_25MOUT",
|
||||
+ // 81-82 Bank DIF 4P 4N
|
||||
+ "ETH_MDC", "ETH_MDIO";
|
||||
+};
|
||||
+
|
||||
+&gpio_ao {
|
||||
+ gpio-line-names =
|
||||
+ // 0-1 Band GPIOAO 0-1
|
||||
+ "UART TX", "UART RX",
|
||||
+ // 2-4 Band GPIOAO 2-4
|
||||
+ "RED_LED", "GREEN_LED", "BLUE_LED",
|
||||
+ // 5 Band GPIOAO 5
|
||||
+ "BUTTON",
|
||||
+ // 6 Band GPIOAO 6
|
||||
+ "",
|
||||
+ // 7 Band GPIOAO 7
|
||||
+ "IR_IN",
|
||||
+ // 8 Band GPIOAO 8-13
|
||||
+ "", "",
|
||||
+ "", "",
|
||||
+ "", "",
|
||||
+
|
||||
+ // 14 Band GPIO_BSD_EN
|
||||
+ "",
|
||||
+ // 15 GPIO_TEST_N
|
||||
+ "";
|
||||
+};
|
||||
+
|
||||
+ðmac {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ pinctrl-0 = <ð_rgmii_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ phy-handle = <ð_phy>;
|
||||
+ phy-mode = "rgmii-id";
|
||||
+
|
||||
+ mdio {
|
||||
+ compatible = "snps,dwmac-mdio";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ // Realtek RTL8211F (0x001cc916)
|
||||
+ eth_phy: ethernet-phy@0 {
|
||||
+ reg = <0>;
|
||||
+
|
||||
+ reset-assert-us = <10000>;
|
||||
+ reset-deassert-us = <80000>;
|
||||
+ reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
|
||||
+
|
||||
+ interrupt-parent = <&gpio_intc>;
|
||||
+ interrupts = <17 IRQ_TYPE_LEVEL_LOW>; // GPIOH 3
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ status = "okay";
|
||||
+ vref-supply = <&vcc_1v8>;
|
||||
+};
|
||||
+
|
||||
+// eMMC
|
||||
+&sdhc {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ pinctrl-0 = <&sdxc_c_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ bus-width = <8>;
|
||||
+ max-frequency = <100000000>;
|
||||
+
|
||||
+ disable-wp;
|
||||
+ cap-mmc-highspeed;
|
||||
+ mmc-hs200-1_8v;
|
||||
+ no-sdio;
|
||||
+
|
||||
+ mmc-pwrseq = <&emmc_pwrseq>;
|
||||
+
|
||||
+ vmmc-supply = <&vcc_3v3>;
|
||||
+ // vqmmc-supply = <&vcc_3v3>;
|
||||
+};
|
||||
+
|
||||
+&sdio {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ pinctrl-0 = <&sd_b_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ // SD card
|
||||
+ sd_card_slot: slot@1 {
|
||||
+ compatible = "mmc-slot";
|
||||
+ reg = <1>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ bus-width = <4>;
|
||||
+ no-sdio;
|
||||
+ cap-mmc-highspeed;
|
||||
+ cap-sd-highspeed;
|
||||
+ disable-wp;
|
||||
+
|
||||
+ cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
+
|
||||
+ vmmc-supply = <&vcc_3v3>;
|
||||
+ // vqmmc-supply = <&vcc_3v3>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart_AO {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&uart_ao_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
+&usb0_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb0 {
|
||||
+ dr_mode = "otg";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb1_phy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&ir_receiver {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&ir_recv_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1 +1 @@
|
||||
archive/meson-5.10
|
||||
archive/meson-5.18
|
||||
Loading…
Reference in New Issue
Block a user