Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sunxi 6.12: Switch to v6.12.13, Add HDMI support #7752

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/sources/families/include/sunxi64_common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ case $BRANCH in

edge)
declare -g KERNEL_MAJOR_MINOR="6.12" # Major and minor versions of this kernel.
declare -g KERNELBRANCH="tag:v6.12.9"
declare -g KERNELBRANCH="tag:v6.12.13"
;;
esac

Expand Down
2 changes: 1 addition & 1 deletion config/sources/families/include/sunxi_common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ case $BRANCH in

edge)
declare -g KERNEL_MAJOR_MINOR="6.12" # Major and minor versions of this kernel.
declare -g KERNELBRANCH="tag:v6.12.9"
declare -g KERNELBRANCH="tag:v6.12.13"
;;
esac

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ index 24383cb63770..16c739b56350 100644
+ sun50i-h616-bananapi-m4-spi1-cs0-cs1-spidev.dtbo \
+ sun50i-h616-bananapi-m4-spi1-cs0-spidev.dtbo \
+ sun50i-h616-bananapi-m4-spi1-cs1-spidev.dtbo \
sun50i-h616-i2c2-ph.dtbo \
sun50i-h616-i2c3-ph.dtbo \
sun50i-h616-i2c4-ph.dtbo \
sun50i-h616-gpu.dtbo \
sun50i-h616-i2c0-pi.dtbo \
sun50i-h616-i2c1-pi.dtbo \
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-pg-15-16-i2c4.dtso b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-bananapi-m4-pg-15-16-i2c4.dtso
new file mode 100644
index 000000000000..4e78aa8f1f27
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Signed-off-by: Patrick Yavitz <[email protected]>
1 file changed, 54 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
index 111111111111..222222222222 100644
index 94be1b00d80a..e3659fb52dea 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
@@ -363,6 +363,30 @@ i2c0_pins: i2c0-pins {
@@ -370,6 +370,12 @@ i2c0_pins: i2c0-pins {
function = "i2c0";
};

Expand All @@ -22,29 +22,11 @@ index 111111111111..222222222222 100644
+ function = "i2c1";
+ };
+
+ /omit-if-no-ref/
+ i2c2_pi_pins: i2c2-pi-pins {
+ pins = "PI9", "PI10";
+ function = "i2c2";
+ };
+
+ /omit-if-no-ref/
+ i2c3_pg_pins: i2c3-pg-pins {
+ pins = "PG17", "PG18";
+ function = "i2c3";
+ };
+
+ /omit-if-no-ref/
+ i2c4_pg_pins: i2c4-pg-pins {
+ pins = "PG15", "PG16";
+ function = "i2c4";
+ };
+
/omit-if-no-ref/
i2c2_ph_pins: i2c2-ph-pins {
pins = "PH2", "PH3";
function = "i2c2";
@@ -444,6 +468,36 @@ spdif_tx_pin: spdif-tx-pin {
function = "spdif";
@@ -461,6 +467,12 @@ spi1_cs0_pin: spi1-cs0-pin {
function = "spi1";
};

+ /omit-if-no-ref/
Expand All @@ -53,12 +35,26 @@ index 111111111111..222222222222 100644
+ function = "spi1";
+ };
+
spdif_tx_pin: spdif-tx-pin {
pins = "PH4";
function = "spdif";
@@ -483,6 +495,12 @@ uart1_rts_cts_pins: uart1-rts-cts-pins {
function = "uart1";
};

+ /omit-if-no-ref/
+ uart2_pi_pins: uart2-pi-pins {
+ pins = "PI5", "PI6";
+ function = "uart2";
+ };
+
/omit-if-no-ref/
uart2_pg_pins: uart2-pg-pins {
pins = "PG15", "PG16";
@@ -507,6 +525,24 @@ uart2_ph_rts_cts_pins: uart2-ph-rts-cts-pins {
function = "uart2";
};

+ /omit-if-no-ref/
+ uart3_pi_pins: uart3-pi-pins {
+ pins = "PI9", "PI10";
Expand All @@ -77,9 +73,9 @@ index 111111111111..222222222222 100644
+ function = "uart4";
+ };
+
uart0_ph_pins: uart0-ph-pins {
pins = "PH0", "PH1";
function = "uart0";
/omit-if-no-ref/
uart5_pins: uart5-pins {
pins = "PH2", "PH3";
--
Armbian

Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From 20dc0b0f3da7895d50f2824b4608c5e44729f892 Mon Sep 17 00:00:00 2001
From: JohnTheCoolingFan <[email protected]>
Date: Sat, 25 Jan 2025 11:30:04 +0000
Subject: BigTreeTech CB1: dts: i2c gpio mode adjustment and ws2812 rgb_value

Signed-off-by: JohnTheCoolingFan <[email protected]>
---
arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-emmc.dts | 4 ++--
arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-sd.dts | 4 ++--
arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi | 2 +-
.../boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-emmc.dts | 4 ++--
.../boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-sd.dts | 4 ++--
.../arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-emmc.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-emmc.dts
index f878c23f1..b059ea08f 100644
index f878c23f1d90..b059ea08fec0 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-emmc.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-emmc.dts
@@ -19,12 +19,12 @@ &mmc2 {
&ws2812 {
gpios = <&pio 8 15 GPIO_ACTIVE_LOW>; /* PI15 */
@@ -21,8 +21,8 @@ &ws2812 {
};

&i2c_gpio {
Expand All @@ -27,15 +25,11 @@ index f878c23f1..b059ea08f 100644
};

&can0_pin_irq {
pins = "PI3";
};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-sd.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-sd.dts
index e18dd854d..cc10be714 100644
index e18dd854d74b..cc10be714676 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-sd.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1-sd.dts
@@ -10,12 +10,12 @@
&ws2812 {
gpios = <&pio 2 14 GPIO_ACTIVE_LOW>; /* PC14 */
@@ -12,8 +12,8 @@ &ws2812 {
};

&i2c_gpio {
Expand All @@ -46,15 +40,11 @@ index e18dd854d..cc10be714 100644
};

&can0_pin_irq {
pins = "PC9";
};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
index 3b3a196ea..d18695148 100644
index 3b3a196eaa93..d18695148ef5 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
@@ -106,11 +106,11 @@ wifi_pwrseq: wifi-pwrseq {

ws2812: ws2812 {
@@ -108,7 +108,7 @@ ws2812: ws2812 {
compatible = "rgb-ws2812";
pinctrl-names = "default";
rgb_cnt = <2>;
Expand All @@ -63,8 +53,6 @@ index 3b3a196ea..d18695148 100644
status = "disabled";
};

i2c_gpio: i2c-gpio {
#address-cells = <1>;
--
Created with Armbian build tools https://github.com/armbian/build
2.35.3

Original file line number Diff line number Diff line change
@@ -1,55 +1,45 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From 5607ccab3192a2cc9d70c6072f83d9b9060295c8 Mon Sep 17 00:00:00 2001
From: JohnTheCoolingFan <[email protected]>
Date: Sat, 25 Jan 2025 12:54:16 +0000
Subject: Fix ghost touches on tsc2007 tft screen

Signed-off-by: JohnTheCoolingFan <[email protected]>
---
arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi | 1 +
drivers/input/touchscreen/tsc2007.h | 1 +
drivers/input/touchscreen/tsc2007_core.c | 96 +++++-----
include/linux/platform_data/tsc2007.h | 1 +
.../sun50i-h616-bigtreetech-cb1.dtsi | 1 +
drivers/input/touchscreen/tsc2007.h | 1 +
drivers/input/touchscreen/tsc2007_core.c | 96 +++++++++----------
include/linux/platform_data/tsc2007.h | 1 +
4 files changed, 49 insertions(+), 50 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
index 2022990e4..3b3a196ea 100644
index 2022990e4bc0..3b3a196eaa93 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
@@ -123,10 +123,11 @@ i2c_gpio: i2c-gpio {
tft_tp: ns2009@48 {
compatible = "ti,tsc2007";
@@ -125,6 +125,7 @@ tft_tp: ns2009@48 {
reg = <0x48>;
status = "disabled";
ti,x-plate-ohms = <660>;
+ ti,y-plate-ohms = <660>;
ti,rt-thr = <3000>;
ti,fuzzx = <32>;
ti,fuzzy = <16>;
i2c,ignore-nak = <1>;
};
diff --git a/drivers/input/touchscreen/tsc2007.h b/drivers/input/touchscreen/tsc2007.h
index 5252b6c6d..7411b8bce 100644
index 5252b6c6daeb..7411b8bce99c 100644
--- a/drivers/input/touchscreen/tsc2007.h
+++ b/drivers/input/touchscreen/tsc2007.h
@@ -63,10 +63,11 @@ struct tsc2007 {

struct i2c_client *client;
@@ -65,6 +65,7 @@ struct tsc2007 {

u16 model;
u16 x_plate_ohms;
+ u16 y_plate_ohms;
u16 max_rt;
u16 rt_thr;
u8 touched;
unsigned long poll_period; /* in jiffies */
int fuzzx;
diff --git a/drivers/input/touchscreen/tsc2007_core.c b/drivers/input/touchscreen/tsc2007_core.c
index 08bbbafbb..1ae1b1a3e 100644
index 08bbbafbbae1..1ae1b1a3e367 100644
--- a/drivers/input/touchscreen/tsc2007_core.c
+++ b/drivers/input/touchscreen/tsc2007_core.c
@@ -68,26 +68,24 @@ static void tsc2007_read_values(struct tsc2007 *tsc, struct ts_event *tc)
tsc2007_xfer(tsc, PWRDOWN);
}
@@ -70,22 +70,20 @@ static void tsc2007_read_values(struct tsc2007 *tsc, struct ts_event *tc)

u32 tsc2007_calculate_resistance(struct tsc2007 *tsc, struct ts_event *tc)
{
Expand Down Expand Up @@ -82,21 +72,15 @@ index 08bbbafbb..1ae1b1a3e 100644
}

bool tsc2007_is_pen_down(struct tsc2007 *ts)
{
/*
@@ -178,58 +176,45 @@ static irqreturn_t tsc2007_soft_poll(int irq, void *handle)
{
struct tsc2007 *ts = handle;
@@ -180,6 +178,7 @@ static irqreturn_t tsc2007_soft_poll(int irq, void *handle)
struct input_dev *input = ts->input;
struct ts_event tc;
u32 rt;
+ bool skipSync = false;

if(!ts->stopped) {

mutex_lock(&ts->mlock);
tsc2007_read_values(ts, &tc);
mutex_unlock(&ts->mlock);
@@ -189,45 +188,31 @@ static irqreturn_t tsc2007_soft_poll(int irq, void *handle)

rt = tsc2007_calculate_resistance(ts, &tc);

Expand Down Expand Up @@ -162,11 +146,7 @@ index 08bbbafbb..1ae1b1a3e 100644
}

return IRQ_HANDLED;
}

@@ -327,10 +312,17 @@ static int tsc2007_probe_properties(struct device *dev, struct tsc2007 *ts)
} else {
dev_err(dev, "Missing ti,x-plate-ohms device property\n");
@@ -329,6 +314,13 @@ static int tsc2007_probe_properties(struct device *dev, struct tsc2007 *ts)
return -EINVAL;
}

Expand All @@ -180,23 +160,15 @@ index 08bbbafbb..1ae1b1a3e 100644
ts->gpiod = devm_gpiod_get_optional(dev, NULL, GPIOD_IN);
if (IS_ERR(ts->gpiod))
return PTR_ERR(ts->gpiod);

if (ts->gpiod)
@@ -345,10 +337,11 @@ static int tsc2007_probe_pdev(struct device *dev, struct tsc2007 *ts,
const struct tsc2007_platform_data *pdata,
const struct i2c_device_id *id)
@@ -347,6 +339,7 @@ static int tsc2007_probe_pdev(struct device *dev, struct tsc2007 *ts,
{
ts->model = pdata->model;
ts->x_plate_ohms = pdata->x_plate_ohms;
+ ts->y_plate_ohms = pdata->y_plate_ohms;
ts->max_rt = pdata->max_rt ? : MAX_12BIT;
ts->poll_period = msecs_to_jiffies(pdata->poll_period ? : 1);
ts->get_pendown_state = pdata->get_pendown_state;
ts->clear_penirq = pdata->clear_penirq;
ts->fuzzx = pdata->fuzzx;
@@ -358,10 +351,15 @@ static int tsc2007_probe_pdev(struct device *dev, struct tsc2007 *ts,
if (pdata->x_plate_ohms == 0) {
dev_err(dev, "x_plate_ohms is not set up in platform data\n");
@@ -360,6 +353,11 @@ static int tsc2007_probe_pdev(struct device *dev, struct tsc2007 *ts,
return -EINVAL;
}

Expand All @@ -208,11 +180,7 @@ index 08bbbafbb..1ae1b1a3e 100644
return 0;
}

static void tsc2007_call_exit_platform_hw(void *data)
{
@@ -456,15 +454,13 @@ static int tsc2007_probe(struct i2c_client *client)
dev_err(&client->dev, "Failed to request irq %d: %d\n",
ts->irq, err);
@@ -458,11 +456,9 @@ static int tsc2007_probe(struct i2c_client *client)
return err;
}
} else {
Expand All @@ -226,24 +194,18 @@ index 08bbbafbb..1ae1b1a3e 100644
add_timer(&ts->timer);
}

tsc2007_stop(ts);

diff --git a/include/linux/platform_data/tsc2007.h b/include/linux/platform_data/tsc2007.h
index a0ca52c41..f88e58032 100644
index a0ca52c41ccb..f88e580322f0 100644
--- a/include/linux/platform_data/tsc2007.h
+++ b/include/linux/platform_data/tsc2007.h
@@ -5,10 +5,11 @@
/* linux/platform_data/tsc2007.h */

@@ -7,6 +7,7 @@
struct tsc2007_platform_data {
u16 model; /* 2007. */
u16 x_plate_ohms; /* must be non-zero value */
+ u16 y_plate_ohms; /* must be non-zero value */
u16 max_rt; /* max. resistance above which samples are ignored */
unsigned long poll_period; /* time (in ms) between samples */
int fuzzx; /* fuzz factor for X, Y and pressure axes */
int fuzzy;
int fuzzz;
--
Created with Armbian build tools https://github.com/armbian/build
2.35.3

Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,18 @@ diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dt
index ed68a644148e..5c0b573b622e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
@@ -495,7 +495,8 @@ gic: interrupt-controller@3021000 {
@@ -532,7 +532,8 @@ gic: interrupt-controller@3021000 {
};

iommu: iommu@30f0000 {
- compatible = "allwinner,sun50i-h616-iommu";
+ compatible = "allwinner,sun50i-h616-iommu",
+ "allwinner,sun50i-h6-iommu";
+ "allwinner,sun50i-h6-iommu";
reg = <0x030f0000 0x10000>;
interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&ccu CLK_BUS_IOMMU>;
@@ -852,6 +853,78 @@ mdio1: mdio {
};
@@ -885,6 +886,78 @@ lradc: lradc@5070800 {
status = "disabled";
};

+ codec: codec@05096000 {
Expand Down
Loading
Loading