linux-samsung-espresso3g: remove (MR 3563)

[ci:skip-build]: ollie verified it builds locally
This commit is contained in:
Mithil Bavishi 2022-10-21 20:49:57 +05:30 committed by Oliver Smith
parent 784919ce5e
commit fb9bc89df8
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
6 changed files with 0 additions and 8789 deletions

View file

@ -1,744 +0,0 @@
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 7e0934180..cdf76c6cd 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -880,6 +880,7 @@ dtb-$(CONFIG_ARCH_OMAP4) += \
omap4-panda.dtb \
omap4-panda-a4.dtb \
omap4-panda-es.dtb \
+ omap4-samsung-espresso3g.dtb \
omap4-sdp.dtb \
omap4-sdp-es23plus.dtb \
omap4-var-dvk-om44.dtb \
diff --git a/arch/arm/boot/dts/omap4-samsung-espresso3g.dts b/arch/arm/boot/dts/omap4-samsung-espresso3g.dts
new file mode 100644
index 000000000..4dbc096ee
--- /dev/null
+++ b/arch/arm/boot/dts/omap4-samsung-espresso3g.dts
@@ -0,0 +1,632 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/dts-v1/;
+#include "dt-bindings/gpio/gpio.h"
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/input/input.h>
+#include "omap443x.dtsi"
+
+/ {
+ model = "Samsung Galaxy Tab 2 3g 7-inch";
+ compatible = "samsung,espresso3g", "ti,omap4430", "ti,omap4";
+
+ memory@80000000 {
+ device_type = "memory";
+ reg = <0x80000000 0x40000000>; /* 1 GB */
+ };
+
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ ramoops_region@A0000000 {
+ no-map;
+
+ reg = <0xA0000000 0x200000>;
+
+ };
+
+ continuous_splash: framebuffer@bef00000{
+ //The framebuffer address is specific to your device
+ reg = <0xbef00000 (1024 * 600 * 4)>;
+ no-map;
+ };
+ };
+
+ chosen {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+ };
+
+ i2c-gpio-5 {
+ compatible = "i2c-gpio";
+ sda-gpios = <&gpio4 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&gpio4 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ i2c-gpio,delay-us = <10>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
+ i2c-gpio-7 {
+ compatible = "i2c-gpio";
+ sda-gpios = <&gpio2 30 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ scl-gpios = <&gpio2 29 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ i2c-gpio,delay-us = <3>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ fuel-gauge@36 {
+ compatible = "maxim,max17042";
+ reg = <0x36>;
+ pinctrl-0 = <&fuel_alert_irq>;
+ pinctrl-names = "default";
+ interrupt-parent = <&gpio2>;
+ interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
+ maxim,rsns-microohm = <10000>;
+ maxim,over-heat-temp = <500>;
+ maxim,dead-volt = <2500>;
+ maxim,over-volt = <4300>;
+ };
+ };
+
+ reg_espresso_vwlan: regulator-espresso-vwlan {
+ pinctrl-names = "default";
+ pinctrl-0 = <&wlanen_gpio>;
+ compatible = "regulator-fixed";
+ regulator-name = "vwl1271";
+ regulator-max-microvolt = <2000000>;
+ regulator-min-microvolt = <2000000>;
+ gpio = <&gpio4 8 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <70000>;
+ regulator-always-on;
+ enable-active-high;
+ };
+
+ reg_espresso_internal: regulator-espresso-internal {
+ compatible = "regulator-fixed";
+ regulator-name = "eMMC_LDO";
+ regulator-max-microvolt = <1800000>;
+ regulator-min-microvolt = <1800000>;
+ gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <100000>;
+ regulator-boot-on;
+ regulator-always-on;
+ enable-active-high;
+ };
+
+ reg_espresso_external: regulator-espresso-external {
+ compatible = "regulator-fixed";
+ regulator-name = "vmmc2";
+ regulator-max-microvolt = <2800000>;
+ regulator-min-microvolt = <2800000>;
+ gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
+ regulator-always-on;
+ enable-active-high;
+ };
+
+ reg_touch_ldo_en: regulator-touch-ldo-en {
+ compatible = "regulator-fixed";
+ regulator-name = "touch_ldo_en";
+ regulator-max-microvolt = <2800000>;
+ regulator-min-microvolt = <2800000>;
+ gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>;
+ regulator-always-on;
+ enable-active-high;
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ //pinctrl-names = "default";
+ //pinctrl-0 = <&gpio_keys>;
+
+ power {
+ label = "power";
+ gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+ linux,code = <KEY_POWER>;
+ wakeup-source;
+ };
+
+ button-volup {
+ linux,code = <KEY_VOLUMEUP>;
+ label = "volume_up"; /* GPIO30 */
+ gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
+ };
+
+ button-voldown {
+ linux,code = <KEY_VOLUMEDOWN>;
+ label = "volume_down"; /* GPIO8 */
+ gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ reg_lcd: regulator-lcd {
+ compatible = "regulator-fixed";
+ regulator-name = "lcd_en";
+ gpios = <&gpio5 7 GPIO_ACTIVE_HIGH>;
+ regulator-max-microvolt = <3300000>;
+ regulator-min-microvolt = <3300000>;
+ enable-active-high;
+ //regulator-always-on;
+ regulator-boot-on;
+ };
+
+ pwm10: dmtimer-pwm@10 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm10_default>;
+
+ compatible = "ti,omap-dmtimer-pwm";
+ #pwm-cells = <3>;
+ ti,timers = <&timer10>;
+ ti,clock-source = <0x00>;
+ };
+
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ pinctrl-names = "default";
+ pinctrl-0 = <&backlight_pins>;
+ pwms = <&pwm10 0 1200 0>;
+ power-supply = <&reg_lcd>;
+ enable-gpios = <&gpio3 31 GPIO_ACTIVE_HIGH>;
+ brightness-levels = <0 4 8 16 32 64 128 255>;
+ default-brightness-level = <7>;
+ };
+
+ lvds-encoder {
+ compatible = "lvds-encoder", "doestek,dtc34lm85am";
+ powerdown-gpios = <&gpio5 8 GPIO_ACTIVE_LOW>;
+ power-supply = <&reg_lcd>;
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ bridge_in: endpoint {
+ remote-endpoint = <&dpi_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ bridge_out: endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+ };
+
+ panel {
+ compatible ="samsung,ltn070nl01", "panel-lvds";
+ power-supply = <&reg_lcd>;
+ width-mm = <154>;
+ height-mm = <90>;
+ data-mapping = "vesa-24";
+ backlight = <&backlight>;
+
+ panel-timing {
+ clock-frequency = <42666667>;
+
+ hback-porch = <210>;
+ hactive = <1024>;
+ hfront-porch = <186>;
+ hsync-len = <50>;
+
+ vback-porch = <11>;
+ vactive = <600>;
+ vfront-porch = <24>;
+ vsync-len = <10>;
+
+ hsync-active = <0>;
+ vsync-active = <0>;
+ de-active = <1>;
+ pixelclk-active = <0>;
+ };
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&bridge_out>;
+ };
+ };
+ };
+
+ vibrator {
+ compatible = "gpio-vibrator";
+ enable-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&vibrator_default>;
+ };
+
+ gp2a_shunt: current-sense-shunt {
+ compatible = "current-sense-shunt";
+ io-channels = <&gpadc 4>;
+ shunt-resistor-micro-ohms = <47000000>; /* 47 ohms */
+ #io-channel-cells = <0>;
+ io-channel-ranges;
+ };
+};
+
+&omap4_pmx_wkup {
+ twl6030_wkup_pins: pinmux_twl6030_wkup_pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x56, PIN_OUTPUT_PULLUP | MUX_MODE2) /* fref_clk3_req.sys_drm_msecure */
+ >;
+ };
+
+ prox_irq: pinmux_prox_irq {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x042, WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE3)
+ >;
+ };
+};
+
+&omap4_pmx_core {
+ pwm10_default: pinmux_pwm10_default {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0X0D6, PIN_OUTPUT | PIN_OFF_OUTPUT_LOW | MUX_MODE1)
+ >;
+ };
+
+ backlight_pins: pinmux_backlight_pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0X0D8, PIN_OUTPUT | PIN_OFF_OUTPUT_LOW | MUX_MODE3)
+ >;
+ };
+
+ i2c1_pins: pinmux_i2c1_pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x122, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_scl */
+ OMAP4_IOPAD(0x124, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_sda */
+ >;
+ };
+
+ i2c2_pins: pinmux_i2c2_pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x126, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_scl */
+ OMAP4_IOPAD(0x128, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c2_sda */
+ >;
+ };
+
+ i2c3_pins: pinmux_i2c3_pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x12a, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_scl */
+ OMAP4_IOPAD(0x12c, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c3_sda */
+ >;
+ };
+
+ i2c4_pins: pinmux_i2c4_pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x12e, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_scl */
+ OMAP4_IOPAD(0x130, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c4_sda */
+ >;
+ };
+
+ mmc2_pins: pinmux_mmc2_pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x040, PIN_INPUT_PULLUP | MUX_MODE1) /* sdmmc2_dat0 */
+ OMAP4_IOPAD(0x042, PIN_INPUT_PULLUP | MUX_MODE1) /* sdmmc2_dat1 */
+ OMAP4_IOPAD(0x044, PIN_INPUT_PULLUP | MUX_MODE1) /* sdmmc2_dat2 */
+ OMAP4_IOPAD(0x046, PIN_INPUT_PULLUP | MUX_MODE1) /* sdmmc2_dat3 */
+ OMAP4_IOPAD(0x048, PIN_INPUT_PULLUP | MUX_MODE1) /* sdmmc2_dat4 */
+ OMAP4_IOPAD(0x04a, PIN_INPUT_PULLUP | MUX_MODE1) /* sdmmc2_dat5 */
+ OMAP4_IOPAD(0x04c, PIN_INPUT_PULLUP | MUX_MODE1) /* sdmmc2_dat6 */
+ OMAP4_IOPAD(0x04e, PIN_INPUT_PULLUP | MUX_MODE1) /* sdmmc2_dat7 */
+ OMAP4_IOPAD(0x082, PIN_INPUT_PULLUP | MUX_MODE1) /* sdmmc2_clk */
+ OMAP4_IOPAD(0x084, PIN_INPUT_PULLUP | MUX_MODE1) /* sdmmc2_cmd */
+ >;
+ };
+
+ mmc1_pins: pinmux_mmc1_pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x0e2, PIN_INPUT_PULLDOWN | MUX_MODE0) /* sdmmc1_clk */
+ OMAP4_IOPAD(0x0e4, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmcc1_cmd */
+ OMAP4_IOPAD(0x0e6, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmcc1_dat0 */
+ OMAP4_IOPAD(0x0e8, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat1 */
+ OMAP4_IOPAD(0x0ea, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat2 */
+ OMAP4_IOPAD(0x0ec, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat3 */
+ >;
+ };
+
+ mmc5_pins: pinmux_mmc5_pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x148, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_clk.sdmmc5_clk */
+ OMAP4_IOPAD(0x14a, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_cmd.sdmmc5_cmd */
+ OMAP4_IOPAD(0x14c, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat0.sdmmc5_dat0 */
+ OMAP4_IOPAD(0x14e, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat1.sdmmc5_dat1 */
+ OMAP4_IOPAD(0x150, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat2.sdmmc5_dat2 */
+ OMAP4_IOPAD(0x152, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc5_dat3.sdmmc5_dat3 */
+ >;
+ };
+
+ dss_dpi_pins: pinmux_dss_dpi_pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x162, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data23 */
+ OMAP4_IOPAD(0x164, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data22 */
+ OMAP4_IOPAD(0x166, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data21 */
+ OMAP4_IOPAD(0x168, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data20 */
+ OMAP4_IOPAD(0x16a, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data19 */
+ OMAP4_IOPAD(0x16c, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data18 */
+ OMAP4_IOPAD(0x16e, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data15 */
+ OMAP4_IOPAD(0x170, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data14 */
+ OMAP4_IOPAD(0x172, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data13 */
+ OMAP4_IOPAD(0x174, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data12 */
+ OMAP4_IOPAD(0x176, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data11 */
+
+ OMAP4_IOPAD(0x1b4, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data10 */
+ OMAP4_IOPAD(0x1b6, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data9 */
+ OMAP4_IOPAD(0x1b8, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data16 */
+ OMAP4_IOPAD(0x1ba, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data17 */
+ OMAP4_IOPAD(0x1bc, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_hsync */
+ OMAP4_IOPAD(0x1be, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_pclk */
+ OMAP4_IOPAD(0x1c0, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_vsync */
+ OMAP4_IOPAD(0x1c2, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_de */
+ OMAP4_IOPAD(0x1c4, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data8 */
+ OMAP4_IOPAD(0x1c6, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data7 */
+ OMAP4_IOPAD(0x1c8, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data6 */
+ OMAP4_IOPAD(0x1ca, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data5 */
+ OMAP4_IOPAD(0x1cc, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data4 */
+ OMAP4_IOPAD(0x1ce, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data3 */
+
+ OMAP4_IOPAD(0x1d0, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data2 */
+ OMAP4_IOPAD(0x1d2, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data1 */
+ OMAP4_IOPAD(0x1d4, PIN_OFF_OUTPUT_LOW | MUX_MODE5) /* dispc2_data0 */
+ >;
+ };
+
+ wlanen_gpio: pinmux_wlanen_gpio {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x096, PIN_OUTPUT | MUX_MODE3) /* gpmc_ncs7.gpio_104 */
+ >;
+ };
+
+ twl6030_pins: pinmux_twl6030_pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x19e, WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE0) /* sys_nirq1.sys_nirq1 */
+ >;
+ };
+
+ fuel_alert_irq: fuel-alert-irq {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x068, WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_a20.gpio_44 */
+ >;
+ };
+
+ /*gpio_keys: pinmux_gpio_keys {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x046, WAKEUP_EN | PIN_INPUT | MUX_MODE3)
+ OMAP4_IOPAD(0x056, WAKEUP_EN | PIN_INPUT | MUX_MODE3)
+ OMAP4_IOPAD(0x05C, WAKEUP_EN | PIN_INPUT | MUX_MODE3)
+ >;
+ };*/
+
+ uart2_pins: pinmux_uart2_pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x118, PIN_INPUT_PULLUP | MUX_MODE0) /* uart2_cts.uart2_cts */
+ OMAP4_IOPAD(0x11a, PIN_INPUT_PULLUP | MUX_MODE0) /* uart2_rts.uart2_rts */
+ OMAP4_IOPAD(0x11c, PIN_INPUT_PULLUP | MUX_MODE0) /* uart2_rx.uart2_rx */
+ OMAP4_IOPAD(0x11e, PIN_INPUT_PULLUP | MUX_MODE0) /* uart2_tx.uart2_tx */
+ >;
+ };
+
+ bluetooth_pins: pinmux_bluetooth_pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x094, PIN_OUTPUT | MUX_MODE3)
+ OMAP4_IOPAD(0x0be, PIN_OUTPUT | MUX_MODE3)
+ OMAP4_IOPAD(0x0c0, WAKEUP_EN | PIN_INPUT | MUX_MODE3)
+ OMAP4_IOPAD(0x0d4, PIN_OUTPUT | MUX_MODE3)
+ >;
+ };
+
+ wlan_host_wake: pinmux_wlan_host_wake {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x0bc, WAKEUP_EN | PIN_INPUT | MUX_MODE3)
+ >;
+ };
+
+ touch_pins: pinmux_touch_pins {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x06c, PIN_INPUT | MUX_MODE3)
+ >;
+ };
+
+ vibrator_default: pinmux_vibrator_default {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x05c, PIN_INPUT_PULLDOWN | MUX_MODE3)
+ >;
+ };
+
+ gp2a_irq: pinmux_gp2a_irq {
+ pinctrl-single,pins = <
+ OMAP4_IOPAD(0x052, WAKEUP_EN | PIN_INPUT | MUX_MODE3)
+ >;
+ };
+};
+
+&i2c1 {
+ // We need i2c1 muxed early on the boot process for pmic
+ // bootloader already done it for us
+ // pinctrl-names = "default";
+ // pinctrl-0 = <&i2c1_pins>;
+
+ clock-frequency = <400000>;
+
+ twl: twl@48 {
+ reg = <0x48>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <
+ &twl6030_pins
+ &twl6030_wkup_pins
+ >;
+
+ /* SPI = 0, IRQ# = 7, 4 = active high level-sensitive */
+ interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; /* IRQ_SYS_1N cascaded to gic */
+ interrupt-parent = <&gic>;
+
+ twl_power: power {
+ compatible = "ti,twl6030-power";
+ ti,system-power-controller;
+ };
+ };
+};
+
+#include "twl6032.dtsi"
+
+&i2c2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c2_pins>;
+};
+
+&i2c3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c3_pins>;
+
+ touchscreen@48 {
+ compatible = "melfas,mms136";
+ reg = <0x48>;
+ interrupt-parent = <&gpio2>;
+ interrupts = <14 IRQ_TYPE_EDGE_FALLING>;
+ touchscreen-size-x = <1023>;
+ touchscreen-size-y = <599>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&touch_pins>;
+ avdd-supply = <&reg_touch_ldo_en>;
+ vdd-supply = <&vcxio>;
+ };
+};
+
+&i2c4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c4_pins>;
+
+ accelerometer@18 {
+ compatible = "bosch,bma254";
+ reg = <0x18>;
+ vdd-supply = <&vaux2>;
+ vddio-supply = <&ldo5>;
+ interrupt-parent = <&gpio4>;
+ interrupts = <25 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)> , <26 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>;
+ mount-matrix = "-1", "0", "0",
+ "0", "1", "0",
+ "0", "0", "1";
+ };
+
+ magnetometer@2e {
+ compatible = "yamaha,yas530";
+ reg = <0x2e>;
+ vdd-supply = <&vaux2>;
+ iovdd-supply = <&ldo5>;
+ reset-gpios = <&gpio5 29 GPIO_ACTIVE_LOW>;
+ interrupts = <&gpio6 10 IRQ_TYPE_EDGE_RISING>;
+ };
+
+ light-sensor@44 {
+ compatible = "sharp,gp2ap002a00f";
+ reg = <0x44>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
+ vdd-supply = <&vaux2>;
+ vio-supply = <&vaux2>;
+ io-channels = <&gp2a_shunt>;
+ io-channel-names = "alsout";
+ sharp,proximity-far-hysteresis = /bits/ 8 <0x40>;
+ sharp,proximity-close-hysteresis = /bits/ 8 <0x20>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&gp2a_irq &prox_irq>;
+ };
+};
+
+&dss {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&dss_dpi_pins>;
+
+ port {
+ dpi_out: endpoint {
+ remote-endpoint = <&bridge_in>;
+ data-lines = <24>;
+ };
+ };
+};
+
+#include "twl6030.dtsi"
+
+&twl_usb_comparator {
+ usb-supply = <&vusb>;
+};
+
+&usb_otg_hs {
+ interface-type = <1>;
+ mode = <3>;
+ power = <50>;
+};
+
+&mmc1 {
+ status = "ok";
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc1_pins>;
+
+ vmmc-supply = <&reg_espresso_external>;
+ bus-width = <4>;
+};
+
+
+&mmc2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc2_pins>;
+
+ vmmc-supply = <&reg_espresso_internal>;
+ ti,non-removable;
+ bus-width = <8>;
+};
+
+&mmc3 {
+ status = "disabled";
+};
+
+&mmc4 {
+ status = "disabled";
+};
+
+&mmc5 {
+ status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ non-removable;
+ bus-width = <4>;
+ vmmc-supply = <&reg_espresso_vwlan>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc5_pins>;
+
+ brcmf: wifi@1 {
+ compatible = "brcm,bcm4330-fmac";
+ reg = <1>;
+
+ interrupt-parent = <&gpio3>;
+ interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "host-wake";
+ pinctrl-names = "default";
+ pinctrl-0 = <&wlan_host_wake>;
+ };
+};
+
+&uart2 {
+ interrupts-extended = <&wakeupgen GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH
+ &omap4_pmx_core OMAP4_UART2_RX>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2_pins>;
+ bluetooth {
+ compatible = "brcm,bcm4330-bt";
+ pinctrl-names = "default";
+ pinctrl-0 = <&bluetooth_pins>;
+ shutdown-gpios = <&gpio4 7 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio3 18 GPIO_ACTIVE_LOW>;
+ device-wakeup-gpios = <&gpio3 29 GPIO_ACTIVE_HIGH>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <19 IRQ_TYPE_EDGE_FALLING>;
+ };
+};
diff --git a/arch/arm/boot/dts/twl6032.dtsi b/arch/arm/boot/dts/twl6032.dtsi
new file mode 100644
index 000000000..f7b371179
--- /dev/null
+++ b/arch/arm/boot/dts/twl6032.dtsi
@@ -0,0 +1,88 @@
+/*
+ * Integrated Power Management Chip
+ * http://www.ti.com/lit/ds/symlink/twl6032.pdf
+ */
+&twl {
+ compatible = "ti,twl6032";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ rtc {
+ compatible = "ti,twl4030-rtc";
+ interrupts = <11>;
+ };
+
+ vana: regulator-vana {
+ compatible = "ti,twl6030-vana";
+ regulator-min-microvolt = <2100000>;
+ regulator-max-microvolt = <2100000>;
+ regulator-always-on;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vaux1: regulator-vaux1 {
+ compatible = "ti,twl6032-ldo1";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-always-on;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vusim: regulator-vusim {
+ compatible = "ti,twl6032-ldo3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vaux2: regulator-vaux2 {
+ compatible = "ti,twl6032-ldo4";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-always-on;
+ };
+
+ ldo5: regulator-ldo5 {
+ compatible = "ti,twl6032-ldo5";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+
+ vcxio: regulator-vcxio {
+ compatible = "ti,twl6032-ldo6";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ smps4: regulator-smps4 {
+ compatible = "ti,twl6032-smps4";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+
+ vusb: regulator-vusb {
+ compatible = "ti,twl6032-ldousb";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+
+ gpadc: gpadc {
+ compatible = "ti,twl6032-gpadc";
+ interrupts = <3>;
+ #io-channel-cells = <1>;
+ };
+};

View file

@ -1,213 +0,0 @@
diff --git a/Documentation/devicetree/bindings/mfd/twl6030-power.txt b/Documentation/devicetree/bindings/mfd/twl6030-power.txt
new file mode 100644
index 000000000..a78f0f842
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/twl6030-power.txt
@@ -0,0 +1,32 @@
+
+Texas Instruments TWL family (twl6030) reset and power management module
+
+For now, the binding only supports the complete shutdown of the system after
+poweroff.
+
+Required properties:
+- compatible : must be
+ "ti,twl6030-power"
+
+Optional properties:
+
+- ti,system-power-controller: This indicates that TWL6030 is the
+ power supply master of the system. With this flag, the chip will
+ initiate an ACTIVE-to-OFF or SLEEP-to-OFF transition when the
+ system poweroffs.
+
+Example:
+&i2c1 {
+ clock-frequency = <2600000>;
+
+ twl: twl@48 {
+ reg = <0x48>;
+ interrupts = <7>; /* SYS_NIRQ cascaded to intc */
+ interrupt-parent = <&intc>;
+
+ twl_power: power {
+ compatible = "ti,twl6030-power";
+ ti,system-power-controller;
+ };
+ };
+};
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 02c253de9..b27ae703f 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -140,7 +140,8 @@ config ARCH_OMAP2PLUS_TYPICAL
select REGULATOR
select REGULATOR_FIXED_VOLTAGE
select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4
- select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4
+ select TWL4030_POWER if ARCH_OMAP3
+ select TWL6030_POWER if ARCH_OMAP4
select VFP
help
Compile a kernel suitable for booting most boards
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index ca0edab91..525fdf347 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -1671,6 +1671,16 @@ config MFD_TWL4030_AUDIO
select MFD_CORE
default n
+config TWL6030_POWER
+ bool "TI TWL6030 power resources"
+ depends on TWL4030_CORE && ARM
+ help
+ Say yes here if you want to use the power resources on the
+ TWL6030 family chips.
+
+ When used as system power controller, this driver allows turning off
+ the main power supply.
+
config TWL6040_CORE
bool "TI TWL6040 audio codec"
depends on I2C=y
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index 2ba6646e8..ccdd8efa3 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -111,6 +111,7 @@ obj-$(CONFIG_MENELAUS) += menelaus.o
obj-$(CONFIG_TWL4030_CORE) += twl-core.o twl4030-irq.o twl6030-irq.o
obj-$(CONFIG_TWL4030_POWER) += twl4030-power.o
obj-$(CONFIG_MFD_TWL4030_AUDIO) += twl4030-audio.o
+obj-$(CONFIG_TWL6030_POWER) += twl6030-power.o
obj-$(CONFIG_TWL6040_CORE) += twl6040.o
obj-$(CONFIG_MFD_MX25_TSADC) += fsl-imx25-tsadc.o
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 289b556de..880ea446c 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -956,6 +956,14 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
return PTR_ERR(child);
}
+ if (IS_ENABLED(CONFIG_TWL6030_POWER) && pdata->power) {
+ child = add_child(TWL_MODULE_PM_MASTER, "twl6030_power",
+ pdata->power, sizeof(*pdata->power), false,
+ 0, 0);
+ if (IS_ERR(child))
+ return PTR_ERR(child);
+ }
+
return 0;
}
diff --git a/drivers/mfd/twl6030-power.c b/drivers/mfd/twl6030-power.c
new file mode 100644
index 000000000..f6bacdfc3
--- /dev/null
+++ b/drivers/mfd/twl6030-power.c
@@ -0,0 +1,103 @@
+
+/*
+ * TWL6030 power
+ *
+ * Copyright (C) 2016 Paul Kocialkowski <contact@paulk.fr>
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License. See the file "COPYING" in the main directory of this
+ * archive for more details.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <linux/module.h>
+#include <linux/pm.h>
+#include <linux/mfd/twl.h>
+#include <linux/platform_device.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+
+#define TWL6030_PHOENIX_DEV_ON 0x25
+
+#define TWL6030_PHOENIX_APP_DEVOFF (1 << 0)
+#define TWL6030_PHOENIX_CON_DEVOFF (1 << 1)
+#define TWL6030_PHOENIX_MOD_DEVOFF (1 << 2)
+
+void twl6030_power_off(void)
+{
+ int err;
+
+ err = twl_i2c_write_u8(TWL6030_MODULE_ID0, TWL6030_PHOENIX_APP_DEVOFF |
+ TWL6030_PHOENIX_CON_DEVOFF | TWL6030_PHOENIX_MOD_DEVOFF,
+ TWL6030_PHOENIX_DEV_ON);
+ if (err)
+ pr_err("TWL6030 Unable to power off\n");
+}
+
+static bool twl6030_power_use_poweroff(const struct twl4030_power_data *pdata,
+ struct device_node *node)
+{
+ if (pdata && pdata->use_poweroff)
+ return true;
+
+ if (of_property_read_bool(node, "ti,system-power-controller"))
+ return true;
+
+ return false;
+}
+
+#ifdef CONFIG_OF
+static const struct of_device_id twl6030_power_of_match[] = {
+ {
+ .compatible = "ti,twl6030-power",
+ },
+ { },
+};
+
+MODULE_DEVICE_TABLE(of, twl6030_power_of_match);
+#endif /* CONFIG_OF */
+
+static int twl6030_power_probe(struct platform_device *pdev)
+{
+ const struct twl4030_power_data *pdata = dev_get_platdata(&pdev->dev);
+ struct device_node *node = pdev->dev.of_node;
+
+ if (!pdata && !node) {
+ dev_err(&pdev->dev, "Platform data is missing\n");
+ return -EINVAL;
+ }
+
+ /* Board has to be wired properly to use this feature */
+ if (twl6030_power_use_poweroff(pdata, node) && !pm_power_off)
+ pm_power_off = twl6030_power_off;
+
+ return 0;
+}
+
+static int twl6030_power_remove(struct platform_device *pdev)
+{
+ return 0;
+}
+
+static struct platform_driver twl6030_power_driver = {
+ .driver = {
+ .name = "twl6030_power",
+ .of_match_table = of_match_ptr(twl6030_power_of_match),
+ },
+ .probe = twl6030_power_probe,
+ .remove = twl6030_power_remove,
+};
+
+module_platform_driver(twl6030_power_driver);
+
+MODULE_AUTHOR("Paul Kocialkowski <contact@paulk.fr>");
+MODULE_DESCRIPTION("Power management for TWL6030");
+MODULE_LICENSE("GPL");

View file

@ -1,244 +0,0 @@
diff --git a/Documentation/devicetree/bindings/input/twl4030-pwrbutton.txt b/Documentation/devicetree/bindings/input/twl-pwrbutton.txt
similarity index 64%
rename from Documentation/devicetree/bindings/input/twl4030-pwrbutton.txt
rename to Documentation/devicetree/bindings/input/twl-pwrbutton.txt
index f5021214e..b49e2608f 100644
--- a/Documentation/devicetree/bindings/input/twl4030-pwrbutton.txt
+++ b/Documentation/devicetree/bindings/input/twl-pwrbutton.txt
@@ -1,6 +1,6 @@
-Texas Instruments TWL family (twl4030) pwrbutton module
+Texas Instruments TWL family pwrbutton module
-This module is part of the TWL4030. For more details about the whole
+This module is part of a TWL chip. For more details about the whole
chip see Documentation/devicetree/bindings/mfd/twl-family.txt.
This module provides a simple power button event via an Interrupt.
@@ -8,8 +8,9 @@ This module provides a simple power button event via an Interrupt.
Required properties:
- compatible: should be one of the following
- "ti,twl4030-pwrbutton": For controllers compatible with twl4030
+ - "ti,twl6030-pwrbutton": For controllers compatible with twl6030
- interrupts: should be one of the following
- - <8>: For controllers compatible with twl4030
+ - <8>: For controllers compatible with the twl
Example:
diff --git a/arch/arm/boot/dts/twl6030.dtsi b/arch/arm/boot/dts/twl6030.dtsi
index 9d588cfaa..ac033debf 100644
--- a/arch/arm/boot/dts/twl6030.dtsi
+++ b/arch/arm/boot/dts/twl6030.dtsi
@@ -102,4 +102,9 @@ gpadc {
interrupts = <3>;
#io-channel-cells = <1>;
};
+
+ twl_pwrbutton: pwrbutton {
+ compatible = "ti,twl6030-pwrbutton";
+ interrupts = <0>;
+ };
};
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index dd5227cf8..61e1075bd 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -479,15 +479,15 @@ config INPUT_AXP20X_PEK
be called axp20x-pek.
-config INPUT_TWL4030_PWRBUTTON
- tristate "TWL4030 Power button Driver"
+config INPUT_TWL_PWRBUTTON
+ tristate "TWL Power button Driver"
depends on TWL4030_CORE
help
Say Y here if you want to enable power key reporting via the
- TWL4030 family of chips.
+ TWL family of chips.
To compile this driver as a module, choose M here. The module will
- be called twl4030_pwrbutton.
+ be called twl_pwrbutton
config INPUT_TWL4030_VIBRA
tristate "Support for TWL4030 Vibrator"
diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile
index b92c53a6b..03531e525 100644
--- a/drivers/input/misc/Makefile
+++ b/drivers/input/misc/Makefile
@@ -77,7 +77,7 @@ obj-$(CONFIG_INPUT_SOC_BUTTON_ARRAY) += soc_button_array.o
obj-$(CONFIG_INPUT_SPARCSPKR) += sparcspkr.o
obj-$(CONFIG_INPUT_STPMIC1_ONKEY) += stpmic1_onkey.o
obj-$(CONFIG_INPUT_TPS65218_PWRBUTTON) += tps65218-pwrbutton.o
-obj-$(CONFIG_INPUT_TWL4030_PWRBUTTON) += twl4030-pwrbutton.o
+obj-$(CONFIG_INPUT_TWL_PWRBUTTON) += twl-pwrbutton.o
obj-$(CONFIG_INPUT_TWL4030_VIBRA) += twl4030-vibra.o
obj-$(CONFIG_INPUT_TWL6040_VIBRA) += twl6040-vibra.o
obj-$(CONFIG_INPUT_UINPUT) += uinput.o
diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl-pwrbutton.c
similarity index 58%
rename from drivers/input/misc/twl4030-pwrbutton.c
rename to drivers/input/misc/twl-pwrbutton.c
index b307cca17..9f6081474 100644
--- a/drivers/input/misc/twl4030-pwrbutton.c
+++ b/drivers/input/misc/twl-pwrbutton.c
@@ -31,15 +31,22 @@
#define PWR_PWRON_IRQ (1 << 0)
-#define STS_HW_CONDITIONS 0xf
+#define TWL4030_STS_HW_CONDITIONS 0x0f
+#define TWL6030_STS_HW_CONDITIONS 0x21
-static irqreturn_t powerbutton_irq(int irq, void *_pwr)
+static irqreturn_t twl_pwrbutton_irq(int irq, void *_pwr)
{
struct input_dev *pwr = _pwr;
int err;
u8 value;
- err = twl_i2c_read_u8(TWL_MODULE_PM_MASTER, &value, STS_HW_CONDITIONS);
+ if (twl_class_is_4030())
+ err = twl_i2c_read_u8(TWL_MODULE_PM_MASTER, &value,
+ TWL4030_STS_HW_CONDITIONS);
+ else
+ err = twl_i2c_read_u8(TWL6030_MODULE_ID0, &value,
+ TWL6030_STS_HW_CONDITIONS);
+
if (!err) {
pm_wakeup_event(pwr->dev.parent, 0);
input_report_key(pwr, KEY_POWER, value & PWR_PWRON_IRQ);
@@ -52,7 +59,7 @@ static irqreturn_t powerbutton_irq(int irq, void *_pwr)
return IRQ_HANDLED;
}
-static int twl4030_pwrbutton_probe(struct platform_device *pdev)
+static int twl_pwrbutton_probe(struct platform_device *pdev)
{
struct input_dev *pwr;
int irq = platform_get_irq(pdev, 0);
@@ -64,15 +71,23 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev)
return -ENOMEM;
}
- input_set_capability(pwr, EV_KEY, KEY_POWER);
- pwr->name = "twl4030_pwrbutton";
- pwr->phys = "twl4030_pwrbutton/input0";
+ pwr->evbit[0] = BIT_MASK(EV_KEY);
+ pwr->keybit[BIT_WORD(KEY_POWER)] = BIT_MASK(KEY_POWER);
+ pwr->name = "twl_pwrbutton";
+ pwr->phys = "twl_pwrbutton/input0";
pwr->dev.parent = &pdev->dev;
- err = devm_request_threaded_irq(&pdev->dev, irq, NULL, powerbutton_irq,
+ if (twl_class_is_6030()) {
+ twl6030_interrupt_unmask(TWL6030_PWRON_INT_MASK,
+ REG_INT_MSK_LINE_A);
+ twl6030_interrupt_unmask(TWL6030_PWRON_INT_MASK,
+ REG_INT_MSK_STS_A);
+ }
+
+ err = devm_request_threaded_irq(&pwr->dev, irq, NULL, twl_pwrbutton_irq,
IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING |
IRQF_ONESHOT,
- "twl4030_pwrbutton", pwr);
+ "twl_pwrbutton", pwr);
if (err < 0) {
dev_err(&pdev->dev, "Can't get IRQ for pwrbutton: %d\n", err);
return err;
@@ -84,31 +99,45 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev)
return err;
}
+ platform_set_drvdata(pdev, pwr);
device_init_wakeup(&pdev->dev, true);
return 0;
}
+static int twl_pwrbutton_remove(struct platform_device *pdev)
+{
+ if (twl_class_is_6030()) {
+ twl6030_interrupt_mask(TWL6030_PWRON_INT_MASK,
+ REG_INT_MSK_LINE_A);
+ twl6030_interrupt_mask(TWL6030_PWRON_INT_MASK,
+ REG_INT_MSK_STS_A);
+ }
+
+ return 0;
+}
+
#ifdef CONFIG_OF
-static const struct of_device_id twl4030_pwrbutton_dt_match_table[] = {
+static const struct of_device_id twl_pwrbutton_dt_match_table[] = {
{ .compatible = "ti,twl4030-pwrbutton" },
+ { .compatible = "ti,twl6030-pwrbutton" },
{},
};
-MODULE_DEVICE_TABLE(of, twl4030_pwrbutton_dt_match_table);
+MODULE_DEVICE_TABLE(of, twl_pwrbutton_dt_match_table);
#endif
-static struct platform_driver twl4030_pwrbutton_driver = {
- .probe = twl4030_pwrbutton_probe,
+static struct platform_driver twl_pwrbutton_driver = {
+ .probe = twl_pwrbutton_probe,
+ .remove = twl_pwrbutton_remove,
.driver = {
- .name = "twl4030_pwrbutton",
- .of_match_table = of_match_ptr(twl4030_pwrbutton_dt_match_table),
+ .name = "twl_pwrbutton",
+ .of_match_table = of_match_ptr(twl_pwrbutton_dt_match_table),
},
};
-module_platform_driver(twl4030_pwrbutton_driver);
+module_platform_driver(twl_pwrbutton_driver);
-MODULE_ALIAS("platform:twl4030_pwrbutton");
-MODULE_DESCRIPTION("Triton2 Power Button");
+MODULE_ALIAS("platform:twl_pwrbutton");
+MODULE_DESCRIPTION("TWL Power Button");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Peter De Schrijver <peter.de-schrijver@nokia.com>");
MODULE_AUTHOR("Felipe Balbi <felipe.balbi@nokia.com>");
-
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 289b556de..04c0b036e 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -832,13 +832,20 @@ add_children(struct twl4030_platform_data *pdata, unsigned irq_base,
return PTR_ERR(child);
}
- if (IS_ENABLED(CONFIG_INPUT_TWL4030_PWRBUTTON) && twl_class_is_4030()) {
- child = add_child(TWL_MODULE_PM_MASTER, "twl4030_pwrbutton",
+ if (IS_ENABLED(CONFIG_INPUT_TWL_PWRBUTTON) && twl_class_is_4030()) {
+ child = add_child(TWL_MODULE_PM_MASTER, "twl_pwrbutton",
NULL, 0, true, irq_base + 8 + 0, 0);
if (IS_ERR(child))
return PTR_ERR(child);
}
+ if (IS_ENABLED(CONFIG_INPUT_TWL_PWRBUTTON) && twl_class_is_6030()) {
+ child = add_child(TWL_MODULE_PM_MASTER, "twl_pwrbutton",
+ NULL, 0, true, irq_base + 0, 0);
+ if (IS_ERR(child))
+ return PTR_ERR(child);
+ }
+
if (IS_ENABLED(CONFIG_MFD_TWL4030_AUDIO) && pdata->audio &&
twl_class_is_4030()) {
child = add_child(TWL4030_MODULE_AUDIO_VOICE, "twl4030-audio",
diff --git a/include/linux/mfd/twl.h b/include/linux/mfd/twl.h
index 8871cc518..108138c99 100644
--- a/include/linux/mfd/twl.h
+++ b/include/linux/mfd/twl.h
@@ -113,6 +113,7 @@ enum twl6030_module_ids {
#define REG_INT_MSK_STS_C 0x08
/* MASK INT REG GROUP A */
+#define TWL6030_PWRON_INT_MASK 0x01
#define TWL6030_PWR_INT_MASK 0x07
#define TWL6030_RTC_INT_MASK 0x18
#define TWL6030_HOTDIE_INT_MASK 0x20

View file

@ -1,104 +0,0 @@
Patch picked from https://raw.githubusercontent.com/hansemro/kc1-linux/v5.16.x/patches/0006-Add-clk32kg-to-twl6030.patch
From 6418e8fe6b80d906ac5a1d3570dd92ab0e7ec3e8 Mon Sep 17 00:00:00 2001
From: Hansem Ro <hansemro@outlook.com>
Date: Wed, 12 May 2021 18:26:38 -0700
Subject: [PATCH] Add clk32kg to twl6030
Needed for wl1271/wlcore driver bringup on Kindle Fire.
Patch from Robert Nelson:
https://github.com/RobertCNelson/armv7-multiplatform/commit/27fd28715ecf47dee1f36e70faecc1243125b06d
This patch also fixes a WiFi reboot issue on Samsung Galaxy Tab 2 7.0 tablet,
see https://gitlab.com/postmarketOS/pmaports/-/issues/1211
---
arch/arm/boot/dts/twl6030.dtsi | 5 +++++
drivers/regulator/twl6030-regulator.c | 23 +++++++++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/arch/arm/boot/dts/twl6030.dtsi b/arch/arm/boot/dts/twl6030.dtsi
index 9d588cfaa5cb..4eee3133ce4e 100644
--- a/arch/arm/boot/dts/twl6030.dtsi
+++ b/arch/arm/boot/dts/twl6030.dtsi
@@ -97,6 +97,11 @@ twl_pwmled: pwmled {
#pwm-cells = <2>;
};
+ clk32kg: regulator-clk32kg {
+ compatible = "ti,twl6030-clk32kg";
+ regulator-always-on;
+ };
+
gpadc {
compatible = "ti,twl6030-gpadc";
interrupts = <3>;
diff --git a/drivers/regulator/twl6030-regulator.c b/drivers/regulator/twl6030-regulator.c
index 430265c404d6..8ee55a0e3d2f 100644
--- a/drivers/regulator/twl6030-regulator.c
+++ b/drivers/regulator/twl6030-regulator.c
@@ -299,6 +299,13 @@ static const struct regulator_ops twl6030fixed_ops = {
.get_status = twl6030reg_get_status,
};
+static struct regulator_ops twl6030_fixed_resource = {
+ .enable = twl6030reg_enable,
+ .disable = twl6030reg_disable,
+ .is_enabled = twl6030reg_is_enabled,
+ .get_status = twl6030reg_get_status,
+};
+
/*
* SMPS status and control
*/
@@ -572,6 +579,19 @@ static const struct twlreg_info TWLSMPS_INFO_##label = { \
}, \
}
+#define TWL6030_FIXED_RESOURCE(label, offset, turnon_delay) \
+static struct twlreg_info TWLRES_INFO_##label = { \
+ .base = offset, \
+ .desc = { \
+ .name = #label, \
+ .id = TWL6030_REG_##label, \
+ .ops = &twl6030_fixed_resource, \
+ .type = REGULATOR_VOLTAGE, \
+ .owner = THIS_MODULE, \
+ .enable_time = turnon_delay, \
+ }, \
+ }
+
/* VUSBCP is managed *only* by the USB subchip */
/* 6030 REG with base as PMC Slave Misc : 0x0030 */
/* Turnon-delay and remap configuration values for 6030 are not
@@ -601,6 +621,7 @@ TWL6030_FIXED_LDO(VDAC, 0x64, 1800, 0);
TWL6030_FIXED_LDO(VUSB, 0x70, 3300, 0);
TWL6030_FIXED_LDO(V1V8, 0x16, 1800, 0);
TWL6030_FIXED_LDO(V2V1, 0x1c, 2100, 0);
+TWL6030_FIXED_RESOURCE(CLK32KG, 0x8C, 0);
TWL6032_ADJUSTABLE_SMPS(SMPS3, 0x34);
TWL6032_ADJUSTABLE_SMPS(SMPS4, 0x10);
TWL6032_ADJUSTABLE_SMPS(VIO, 0x16);
@@ -632,6 +653,7 @@ static u8 twl_get_smps_mult(void)
#define TWL6030_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL6030, label)
#define TWL6032_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL6032, label)
#define TWLFIXED_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLFIXED, label)
+#define TWLRES_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLRES, label)
#define TWLSMPS_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLSMPS, label)
static const struct of_device_id twl_of_match[] = {
@@ -659,6 +681,7 @@ static const struct of_device_id twl_of_match[] = {
TWLFIXED_OF_MATCH("ti,twl6030-vusb", VUSB),
TWLFIXED_OF_MATCH("ti,twl6030-v1v8", V1V8),
TWLFIXED_OF_MATCH("ti,twl6030-v2v1", V2V1),
+ TWLRES_OF_MATCH("ti,twl6030-clk32kg", CLK32KG),
TWLSMPS_OF_MATCH("ti,twl6032-smps3", SMPS3),
TWLSMPS_OF_MATCH("ti,twl6032-smps4", SMPS4),
TWLSMPS_OF_MATCH("ti,twl6032-vio", VIO),
--
2.31.1

View file

@ -1,63 +0,0 @@
# Maintainer: Mighty <mightymb17@gmail.com>
# Co-Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=linux-samsung-espresso3g
pkgver=5.17.0
pkgrel=3
pkgdesc="Samsung Galaxy Tab 2 (7.0 inch) mainline kernel"
arch="armv7"
_carch="arm"
_flavor="samsung-espresso3g"
url="https://kernel.org"
license="GPL2"
options="!strip !check !tracedeps
pmb:cross-native
pmb:kconfigcheck-community"
makedepends="openssl-dev yaml-dev mpc1-dev mpfr-dev xz findutils bison flex perl sed bash gmp-dev bc linux-headers elfutils-dev"
_config="config-$_flavor.$arch"
case $pkgver in
*.*.0) _kernver=${pkgver%.0};;
*.*.*) _kernver=$pkgver;;
*.*) _kernver=$pkgver;;
esac
source="
https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/linux-$_kernver.tar.xz
00-Add-espresso-dts.patch
01-Add-TWL6030-power-driver-with-minimal-support-for-power-off.patch
02-Add-TWL6030-power-button-support-to-twl-pwrbutton.patch
03-Add-clk32kg-to-twl6030-and-fix-wifi-reboot-issue.patch
$_config
"
builddir="$srcdir/linux-$_kernver"
prepare() {
default_prepare
cp "$srcdir/config-$_flavor.$arch" .config
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
install -Dm644 "$builddir/arch/$_carch/boot/"*zImage \
"$pkgdir/boot/vmlinuz"
install -D "$builddir"/include/config/kernel.release \
"$pkgdir"/usr/share/kernel/$_flavor/kernel.release
make modules_install dtbs_install \
ARCH="$_carch" \
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_DTBS_PATH="$pkgdir/boot/dtbs"
}
sha512sums="
89f0a7ca69d20a539d4b612a7028a30a5e98b402e4b6b88516f14237e5da4b626d7929eab8b40fccc90766e8f3bae87e9858a19077ffad20d8204acf18794f5b linux-5.17.tar.xz
01d2e04afba261c42ba3c9e9aea4f8f023d86e58f17e2e17dec2f46347665843678dd56ad8875ab00b69074c3389dd471a47a9f252e2c8002c89dc730691cfd8 00-Add-espresso-dts.patch
a483b1a322f3fe47c7bb6514f34cca69ad1b806487596ffab69078acb6e83e99ed39ffb4d5b4ecd17035d118a75ce5bac6761b9e42d01608f1e6a53d59b27806 01-Add-TWL6030-power-driver-with-minimal-support-for-power-off.patch
b3d6114c5c60fc2820856c89ea6f09c369d857ae79a79f0eeb0f83f5401dc2253e11f7dac6869eb1095d3e0b3a68126246762e2f406ffae5b5ef0a60d5563bac 02-Add-TWL6030-power-button-support-to-twl-pwrbutton.patch
c98479208876387a0e9b3aabe9e496ed41af348b459d9180ce48d08b556578e3e607727e14e2fc9569d7fd86dce539f97f6341a4b010e59fd7fc1da4600c2b88 03-Add-clk32kg-to-twl6030-and-fix-wifi-reboot-issue.patch
0e7b371ae80679944e7e977c04e6deee53c4b20d4b6e6a8483be73215194e89748770db5d70df8efbac77b8d5e60b843559472ce2e2b728d63bb9be23d7e2bbe config-samsung-espresso3g.armv7
"