-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sunxi-6.6: pocketchip kernel patches
- Loading branch information
1 parent
84cfeae
commit b7cd711
Showing
4 changed files
with
393 additions
and
30 deletions.
There are no files selected for viewing
30 changes: 0 additions & 30 deletions
30
.../patches.armbian/arm-dts-sun5i-r8-pocketchip-disable-usb-otg-to-bypass-boot-hanging.patch
This file was deleted.
Oops, something went wrong.
359 changes: 359 additions & 0 deletions
359
patch/kernel/archive/sunxi-6.6/patches.armbian/arm-dts-sun5i-r8-pocketchip-dts.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,359 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: TheSnowfield <[email protected]> | ||
Date: Fri, 3 Jan 2025 19:14:57 +0000 | ||
Subject: arm:dts:sun5i-r8-chip pocketchip dts | ||
|
||
Signed-off-by: TheSnowfield <[email protected]> | ||
--- | ||
arch/arm/boot/dts/allwinner/sun5i-r8-chip.dts | 202 +++++++++- | ||
arch/arm/boot/dts/allwinner/sun5i-a13.dtsi | 2 +- | ||
2 file changed, 197 insertions(+), 7 deletions(-) | ||
|
||
diff --git a/arch/arm/boot/dts/allwinner/sun5i-a13.dtsi b/arch/arm/boot/dts/allwinner/sun5i-a13.dtsi | ||
index 3325ab07094a..a4843c8a6a3a 100644 | ||
--- a/arch/arm/boot/dts/allwinner/sun5i-a13.dtsi | ||
+++ b/arch/arm/boot/dts/allwinner/sun5i-a13.dtsi | ||
@@ -77,11 +77,11 @@ cpu_crit: cpu_crit { | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
- display-engine { | ||
+ de: display-engine { | ||
compatible = "allwinner,sun5i-a13-display-engine"; | ||
allwinner,pipelines = <&fe0>; | ||
}; | ||
|
||
soc { | ||
|
||
diff --git a/arch/arm/boot/dts/allwinner/sun5i-r8-chip.dts b/arch/arm/boot/dts/allwinner/sun5i-r8-chip.dts | ||
index 4192c23848c3..42640fe87564 100644 | ||
--- a/arch/arm/boot/dts/allwinner/sun5i-r8-chip.dts | ||
+++ b/arch/arm/boot/dts/allwinner/sun5i-r8-chip.dts | ||
@@ -41,15 +41,20 @@ | ||
* 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. | ||
*/ | ||
|
||
+/** | ||
+ * ref: https://gist.github.com/macromorgan/b2b241635efc6f4eb84098499bcecb31 | ||
+ */ | ||
+ | ||
/dts-v1/; | ||
#include "sun5i-r8.dtsi" | ||
#include "sunxi-common-regulators.dtsi" | ||
|
||
#include <dt-bindings/gpio/gpio.h> | ||
+#include <dt-bindings/input/input.h> | ||
#include <dt-bindings/interrupt-controller/irq.h> | ||
|
||
/ { | ||
model = "NextThing C.H.I.P."; | ||
compatible = "nextthing,chip", "allwinner,sun5i-r8", "allwinner,sun5i-a13"; | ||
@@ -61,10 +66,22 @@ aliases { | ||
serial0 = &uart1; | ||
serial1 = &uart3; | ||
spi0 = &spi2; | ||
}; | ||
|
||
+ backlight: backlight { | ||
+ compatible = "pwm-backlight"; | ||
+ pwms = <&pwm 0 8000 1>; | ||
+ power-supply = <®_vcc3v3>; | ||
+ brightness-levels = <0 1 2 4 8 12 16 24 28 32 100>; | ||
+ default-brightness-level = <8>; | ||
+ | ||
+ pinctrl-names = "default"; | ||
+ pinctrl-0 = <&chip_bl_en>; | ||
+ enable-gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>; | ||
+ }; | ||
+ | ||
chosen { | ||
stdout-path = "serial0:115200n8"; | ||
}; | ||
|
||
leds { | ||
@@ -73,10 +90,35 @@ leds { | ||
led-0 { | ||
label = "chip:white:status"; | ||
gpios = <&axp_gpio 2 GPIO_ACTIVE_HIGH>; | ||
default-state = "on"; | ||
}; | ||
+ | ||
+ led-1 { | ||
+ label = "sd:red:error"; | ||
+ gpios = <&pio 2 15 GPIO_ACTIVE_HIGH>; // PC15 | ||
+ default-state = "off"; | ||
+ }; | ||
+ | ||
+ led-2 { | ||
+ label = "sd:yellow:msg"; | ||
+ gpios = <&pio 2 14 GPIO_ACTIVE_HIGH>; // PC14 | ||
+ default-state = "off"; | ||
+ }; | ||
+ | ||
+ led-3 { | ||
+ label = "sd:green:disk"; | ||
+ gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; // PC13 | ||
+ default-state = "off"; | ||
+ }; | ||
+ | ||
+ led-4 { | ||
+ label = "sd:orange:wlan"; | ||
+ gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; // PC12 | ||
+ default-state = "off"; | ||
+ }; | ||
+ | ||
}; | ||
|
||
mmc0_pwrseq: mmc0_pwrseq { | ||
compatible = "mmc-pwrseq-simple"; | ||
reset-gpios = <&pio 2 19 GPIO_ACTIVE_LOW>; /* PC19 */ | ||
@@ -84,10 +126,28 @@ mmc0_pwrseq: mmc0_pwrseq { | ||
|
||
onewire { | ||
compatible = "w1-gpio"; | ||
gpios = <&pio 3 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PD2 */ | ||
}; | ||
+ | ||
+ panel { | ||
+ #address-cells = <1>; | ||
+ #size-cells = <0>; | ||
+ power-supply = <®_vcc3v3>; | ||
+ compatible = "olimex,lcd-olinuxino-4.3"; | ||
+ backlight = <&backlight>; | ||
+ | ||
+ port { | ||
+ panel_input: endpoint { | ||
+ remote-endpoint = <&tcon0_out_panel>; | ||
+ }; | ||
+ }; | ||
+ }; | ||
+}; | ||
+ | ||
+&de { | ||
+ status = "okay"; | ||
}; | ||
|
||
&be0 { | ||
status = "okay"; | ||
}; | ||
@@ -102,10 +162,14 @@ &cpu0 { | ||
|
||
&ehci0 { | ||
status = "okay"; | ||
}; | ||
|
||
+&fe0 { | ||
+ status = "okay"; | ||
+}; | ||
+ | ||
&i2c0 { | ||
status = "okay"; | ||
|
||
axp209: pmic@34 { | ||
reg = <0x34>; | ||
@@ -129,11 +193,89 @@ &ac_power_supply { | ||
&battery_power_supply { | ||
status = "okay"; | ||
}; | ||
|
||
&i2c1 { | ||
- status = "disabled"; | ||
+ status = "okay"; | ||
+ #address-cells = <1>; | ||
+ #size-cells = <0>; | ||
+ pinctrl-names = "default"; | ||
+ pinctrl-0 = <&i2c1_pins>; | ||
+ keyboard: keyboard@34 { | ||
+ compatible = "ti,tca8418"; | ||
+ reg = <0x34>; | ||
+ interrupt-parent = <&pio>; | ||
+ interrupts = <6 1 IRQ_TYPE_EDGE_FALLING>; | ||
+ keypad,num-rows = <6>; | ||
+ keypad,num-columns = <10>; | ||
+ keypad,autorepeat; | ||
+ linux,keymap = < | ||
+ MATRIX_KEY(0, 1, KEY_1) | ||
+ MATRIX_KEY(0, 2, KEY_2) | ||
+ MATRIX_KEY(0, 3, KEY_3) | ||
+ MATRIX_KEY(0, 4, KEY_4) | ||
+ MATRIX_KEY(0, 5, KEY_5) | ||
+ MATRIX_KEY(0, 6, KEY_6) | ||
+ MATRIX_KEY(0, 7, KEY_7) | ||
+ MATRIX_KEY(0, 8, KEY_8) | ||
+ MATRIX_KEY(0, 9, KEY_9) | ||
+ MATRIX_KEY(1, 0, KEY_Q) | ||
+ MATRIX_KEY(1, 1, KEY_W) | ||
+ MATRIX_KEY(1, 2, KEY_E) | ||
+ MATRIX_KEY(1, 3, KEY_R) | ||
+ MATRIX_KEY(1, 4, KEY_T) | ||
+ MATRIX_KEY(1, 5, KEY_Y) | ||
+ MATRIX_KEY(1, 6, KEY_U) | ||
+ MATRIX_KEY(1, 7, KEY_I) | ||
+ MATRIX_KEY(1, 8, KEY_O) | ||
+ MATRIX_KEY(1, 9, KEY_P) | ||
+ MATRIX_KEY(2, 0, KEY_A) | ||
+ MATRIX_KEY(2, 1, KEY_S) | ||
+ MATRIX_KEY(2, 2, KEY_D) | ||
+ MATRIX_KEY(2, 3, KEY_F) | ||
+ MATRIX_KEY(2, 4, KEY_G) | ||
+ MATRIX_KEY(2, 5, KEY_H) | ||
+ MATRIX_KEY(2, 6, KEY_J) | ||
+ MATRIX_KEY(2, 7, KEY_K) | ||
+ MATRIX_KEY(2, 8, KEY_L) | ||
+ MATRIX_KEY(2, 9, KEY_ENTER) | ||
+ MATRIX_KEY(3, 0, KEY_TAB) | ||
+ MATRIX_KEY(3, 1, KEY_Z) | ||
+ MATRIX_KEY(3, 2, KEY_X) | ||
+ MATRIX_KEY(3, 3, KEY_C) | ||
+ MATRIX_KEY(3, 4, KEY_V) | ||
+ MATRIX_KEY(3, 5, KEY_B) | ||
+ MATRIX_KEY(3, 6, KEY_N) | ||
+ MATRIX_KEY(3, 7, KEY_M) | ||
+ MATRIX_KEY(3, 8, KEY_UP) | ||
+ MATRIX_KEY(3, 9, KEY_DOWN) | ||
+ MATRIX_KEY(4, 0, KEY_LEFTSHIFT) | ||
+ MATRIX_KEY(4, 1, KEY_RIGHTALT) | ||
+ MATRIX_KEY(4, 2, KEY_LEFTALT) | ||
+ MATRIX_KEY(4, 3, KEY_SPACE) | ||
+ MATRIX_KEY(4, 4, KEY_RIGHTCTRL) | ||
+ MATRIX_KEY(4, 5, KEY_SLASH) | ||
+ MATRIX_KEY(4, 6, KEY_RIGHTSHIFT) | ||
+ MATRIX_KEY(4, 8, KEY_LEFT) | ||
+ MATRIX_KEY(4, 9, KEY_RIGHT) | ||
+ MATRIX_KEY(5, 0, KEY_ESC) | ||
+ MATRIX_KEY(5, 1, KEY_0) | ||
+ MATRIX_KEY(5, 2, KEY_EQUAL) | ||
+ MATRIX_KEY(5, 3, KEY_BACKSPACE) | ||
+ MATRIX_KEY(5, 4, KEY_DOT) | ||
+ >; | ||
+ }; | ||
+}; | ||
+ | ||
+&i2c1_pins { | ||
+ drive-strength = <10>; | ||
+ bias-disable; | ||
+}; | ||
+ | ||
+&lcd_rgb565_pins { | ||
+ drive-strength = <10>; | ||
+ bias-disable; | ||
}; | ||
|
||
&i2c2 { | ||
status = "okay"; | ||
|
||
@@ -161,18 +303,52 @@ &mmc0 { | ||
bus-width = <4>; | ||
non-removable; | ||
status = "okay"; | ||
}; | ||
|
||
+&mmc2 { | ||
+ pinctrl-names = "default"; | ||
+ pinctrl-0 = <&mmc2_4bit_pc_pins>; | ||
+ vmmc-supply = <®_vcc3v3>; | ||
+ bus-width = <4>; | ||
+ broken-cd; | ||
+ status = "okay"; | ||
+}; | ||
+ | ||
&ohci0 { | ||
status = "okay"; | ||
}; | ||
|
||
&otg_sram { | ||
status = "okay"; | ||
}; | ||
|
||
+&pio { | ||
+ vcc-pb-supply = <®_vcc3v3>; | ||
+ vcc-pc-supply = <®_vcc3v3>; | ||
+ vcc-pd-supply = <®_vcc3v3>; | ||
+ vcc-pf-supply = <®_vcc3v3>; | ||
+ vcc-pg-supply = <®_vcc3v3>; | ||
+ chip_bl_en: chip_backlight_enable@0 { | ||
+ pins = "PD18"; | ||
+ function = "gpio_out"; | ||
+ drive-strength = <10>; | ||
+ bias-disable; | ||
+ }; | ||
+}; | ||
+ | ||
+&pwm { | ||
+ pinctrl-names = "default"; | ||
+ pinctrl-0 = <&pwm0_pin>; | ||
+ status = "okay"; | ||
+}; | ||
+ | ||
+&pwm0_pin { | ||
+ drive-strength = <10>; | ||
+ bias-disable; | ||
+}; | ||
+ | ||
®_dcdc2 { | ||
regulator-min-microvolt = <1000000>; | ||
regulator-max-microvolt = <1400000>; | ||
regulator-name = "cpuvdd"; | ||
regulator-always-on; | ||
@@ -228,24 +404,38 @@ ®_usb0_vbus { | ||
vin-supply = <®_vcc5v0>; | ||
gpio = <&pio 1 10 GPIO_ACTIVE_HIGH>; /* PB10 */ | ||
status = "okay"; | ||
}; | ||
|
||
+&rtp { | ||
+ touchscreen-inverted-x; | ||
+ touchscreen-inverted-y; | ||
+ allwinner,ts-attached; | ||
+}; | ||
+ | ||
&spi2 { | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&spi2_pe_pins>; | ||
status = "disabled"; | ||
}; | ||
|
||
&tcon0 { | ||
+ pinctrl-names = "default"; | ||
+ pinctrl-0 = <&lcd_rgb565_pins>; | ||
status = "okay"; | ||
}; | ||
|
||
-&tve0 { | ||
- status = "okay"; | ||
+&tcon0_out { | ||
+ tcon0_out_panel: endpoint { | ||
+ remote-endpoint = <&panel_input>; | ||
+ }; | ||
}; | ||
|
||
+// &tve0 { | ||
+// status = "okay"; | ||
+// }; | ||
+ | ||
&uart1 { | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&uart1_pg_pins>; | ||
status = "okay"; | ||
}; | ||
@@ -273,10 +463,10 @@ &usb_power_supply { | ||
}; | ||
|
||
&usbphy { | ||
status = "okay"; | ||
|
||
- usb0_id_det-gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */ | ||
- usb0_vbus_power-supply = <&usb_power_supply>; | ||
- usb0_vbus-supply = <®_usb0_vbus>; | ||
+ // usb0_id_det-gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */ | ||
+ // usb0_vbus_power-supply = <&usb_power_supply>; | ||
+ // usb0_vbus-supply = <®_usb0_vbus>; | ||
usb1_vbus-supply = <®_vcc5v0>; | ||
}; | ||
-- | ||
Created with Armbian build tools https://github.com/armbian/build | ||
|
Oops, something went wrong.