From c5ea362a67b24e38b3c852a42f1784707b3a9cf1 Mon Sep 17 00:00:00 2001 From: Dimitar Gamishev Date: Fri, 25 Jan 2019 10:38:09 +0200 Subject: [PATCH] All patches according to Teres-I dts merged in one Enabled analog codec Fixed wrong pinmux --- ...-ANX6345-bridge-on-TERES-I.patch.disabled} | 0 ...eres-add-battery-hdmi-bits.patch.disabled} | 0 patch/kernel/sunxi-dev/xxx-teres-fixed.patch | 237 ++++++++++++++++++ 3 files changed, 237 insertions(+) rename patch/kernel/sunxi-dev/{0133-arm64-allwinner-a64-enable-ANX6345-bridge-on-TERES-I.patch => 0133-arm64-allwinner-a64-enable-ANX6345-bridge-on-TERES-I.patch.disabled} (100%) rename patch/kernel/sunxi-dev/{xxx-teres-add-battery-hdmi-bits.patch => xxx-teres-add-battery-hdmi-bits.patch.disabled} (100%) create mode 100644 patch/kernel/sunxi-dev/xxx-teres-fixed.patch diff --git a/patch/kernel/sunxi-dev/0133-arm64-allwinner-a64-enable-ANX6345-bridge-on-TERES-I.patch b/patch/kernel/sunxi-dev/0133-arm64-allwinner-a64-enable-ANX6345-bridge-on-TERES-I.patch.disabled similarity index 100% rename from patch/kernel/sunxi-dev/0133-arm64-allwinner-a64-enable-ANX6345-bridge-on-TERES-I.patch rename to patch/kernel/sunxi-dev/0133-arm64-allwinner-a64-enable-ANX6345-bridge-on-TERES-I.patch.disabled diff --git a/patch/kernel/sunxi-dev/xxx-teres-add-battery-hdmi-bits.patch b/patch/kernel/sunxi-dev/xxx-teres-add-battery-hdmi-bits.patch.disabled similarity index 100% rename from patch/kernel/sunxi-dev/xxx-teres-add-battery-hdmi-bits.patch rename to patch/kernel/sunxi-dev/xxx-teres-add-battery-hdmi-bits.patch.disabled diff --git a/patch/kernel/sunxi-dev/xxx-teres-fixed.patch b/patch/kernel/sunxi-dev/xxx-teres-fixed.patch new file mode 100644 index 000000000..4ea5209d4 --- /dev/null +++ b/patch/kernel/sunxi-dev/xxx-teres-fixed.patch @@ -0,0 +1,237 @@ +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts +index c455b24dd..9f018de23 100644 +--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts ++++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts +@@ -19,6 +19,15 @@ + + aliases { + serial0 = &uart0; ++ ethernet0 = &rtl8723bs; ++ }; ++ ++ backlight: backlight { ++ compatible = "pwm-backlight"; ++ pwms = <&pwm 0 50000 0>; ++ brightness-levels = <0 5 10 15 20 30 40 55 70 85 100>; ++ default-brightness-level = <2>; ++ enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */ + }; + + chosen { +@@ -42,6 +51,17 @@ + }; + }; + ++ hdmi-connector { ++ compatible = "hdmi-connector"; ++ type = "a"; ++ ++ port { ++ hdmi_con_in: endpoint { ++ remote-endpoint = <&hdmi_out_con>; ++ }; ++ }; ++ }; ++ + leds { + compatible = "gpio-leds"; + +@@ -66,26 +86,83 @@ + status = "okay"; + }; + ++ speaker_amp: speaker_amp { ++ compatible = "simple-audio-amplifier"; ++ VCC-supply = <®_aldo2>; ++ enable-gpios = <&r_pio 0 12 GPIO_ACTIVE_HIGH>; /*PL12*/ ++ }; ++ + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ + }; + }; + ++&codec { ++ status = "okay"; ++}; ++ ++&codec_analog { ++ status = "okay"; ++}; ++ ++&dai { ++ status = "okay"; ++}; ++ ++&de { ++ status = "okay"; ++}; ++ ++&ehci0 { ++ phys = <&usbphy 0>; ++ phy-names = "usb"; ++ status = "okay"; ++}; ++ + &ehci1 { + status = "okay"; + }; + + +-/* The ANX6345 eDP-bridge is on i2c0. There is no linux (mainline) +- * driver for this chip at the moment, the bootloader initializes it. +- * However it can be accessed with the i2c-dev driver from user space. +- */ + &i2c0 { + clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + status = "okay"; ++ ++ anx6345: anx6345@38 { ++ compatible = "analogix,anx6345"; ++ reg = <0x38>; ++ reset-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */ ++ dvdd25-supply = <®_dldo2>; ++ dvdd12-supply = <®_dldo3>; ++ ++ port { ++ anx6345_in: endpoint { ++ remote-endpoint = <&tcon0_out_anx6345>; ++ }; ++ }; ++ }; ++}; ++ ++&hdmi { ++ hvcc-supply = <®_dldo1>; ++ status = "okay"; ++}; ++ ++&hdmi_out { ++ hdmi_out_con: endpoint { ++ remote-endpoint = <&hdmi_con_in>; ++ }; ++}; ++ ++&i2s2 { ++ status = "okay"; ++}; ++ ++&mixer0 { ++ status = "okay"; + }; + + &mmc0 { +@@ -127,10 +204,20 @@ + status = "okay"; + }; + ++&ohci0 { ++ phys = <&usbphy 0>; ++ phy-names = "usb"; ++ status = "okay"; ++}; ++ + &ohci1 { + status = "okay"; + }; + ++&pwm { ++ status = "okay"; ++}; ++ + &r_rsb { + status = "okay"; + +@@ -143,8 +230,40 @@ + }; + }; + ++&sound { ++ status = "okay"; ++ simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>; ++ simple-audio-card,widgets = "Microphone", "Internal Microphone Left", ++ "Microphone", "Internal Microphone Right", ++ "Headphone", "Headphone Jack", ++ "Speaker", "Internal Speaker"; ++ simple-audio-card,routing = ++ "Left DAC", "AIF1 Slot 0 Left", ++ "Right DAC", "AIF1 Slot 0 Right", ++ "Speaker Amp INL", "LINEOUT", ++ "Speaker Amp INR", "LINEOUT", ++ "Internal Speaker", "Speaker Amp OUTL", ++ "Internal Speaker", "Speaker Amp OUTR", ++ "Headphone Jack", "HP", ++ "AIF1 Slot 0 Left ADC", "Left ADC", ++ "AIF1 Slot 0 Right ADC", "Right ADC", ++ "Internal Microphone Left", "MBIAS", ++ "MIC1", "Internal Microphone Left", ++ "Internal Microphone Right", "HBIAS", ++ "MIC2", "Internal Microphone Right"; ++}; ++ ++ + #include "axp803.dtsi" + ++&ac_power_supply { ++ status = "okay"; ++}; ++ ++&battery_power_supply { ++ status = "okay"; ++}; ++ + ®_aldo1 { + regulator-always-on; + regulator-min-microvolt = <2800000>; +@@ -258,12 +377,48 @@ + vcc-hdmi-supply = <®_dldo1>; + }; + ++&sound_hdmi { ++ status = "okay"; ++}; ++ ++&tcon0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&lcd_rgb666_pins>; ++ ++ status = "okay"; ++}; ++ ++&tcon0_out { ++ tcon0_out_anx6345: endpoint@0 { ++ reg = <0>; ++ remote-endpoint = <&anx6345_in>; ++ }; ++}; ++ + &uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pb_pins>; + status = "okay"; + }; + ++&uart1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; ++ status = "okay"; ++ ++ bluetooth { ++ compatible = "realtek,rtl8723bs-bt"; ++ reset-gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>; /* PL4 */ ++ device-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */ ++ host-wake-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ ++ firmware-postfix = "teres"; ++ }; ++}; ++ ++&usb_otg { ++ dr_mode = "host"; ++}; ++ + &usbphy { + usb1_vbus-supply = <®_usb1_vbus>; + status = "okay";