From a204d8e3352ceeff615c7d990c747fb5ca4deb08 Mon Sep 17 00:00:00 2001 From: Scott C Date: Wed, 28 May 2025 19:25:38 -0400 Subject: [PATCH] linux-postmarketos-omap: barnesnoble-encore: Add pinctrls, update panel section, enable touchscreen, wifi, poweroff, and more Get touchscreen going by using correct hex value as i2c address Update display panel / DSS sections: - Add comment to 'dss' section to explain need for a kernel configuration setting which in an ideal world could be set in devicetree - Set rotation property, panel-timing values, and comment on panel section in mcspi4 Set pinctrl entries for the device: - Entries initially based on older u-boot and kernel board files and code, then revised based on similar devices - Add pinctrl values in &omap3_pmx_core and &omap3_pmx_core2 sections - add pinctrl-names and pinctrl-0 entries for most devices Start to get sound card / codec set up, although not working yet: - Set correct codec compatible entry. Device uses 'ti,tlv320dac3100', not 'ti,tlv320aic310x' - Attempt to set sys_clkout2 clock for audio codec, but this is not working yet - Add 'simple-audio-card' section - Add &mcbsp2 section - Add two regulators Enable/ revise wifi section (mmc3 -> wifi) Add vaux2 regulator section, used by mmc3/wifi - Other devices have more comprehensive entries for the vmmc-supply and vqmmc-supply values for wifi which should likely be used for this device as well, but not implemented yet. Allow device to actually turn off by setting system-power-controller property on twl4030 - Add power ("ti,twl4030-power-idle-osc-off") section in twl, this seems to set suspend/low power commands Add/ update some items based on similar devices, such as: - hfclk_26m - set on twl4030 - vpll2 - set regulator to always-on, supposedly for dss/dpi Set some unused components as disabled: gpmc, mcspi1, mcspi2, mcspi3, uart3, uart4 - uart2 is disabled since bluetooth hasn't been tested. Device does not have antenna for bluetooth Many smaller updates: - add pclk-sample property to lvds-encoder - Correct accelerometer mount-matrix - Set max8903_charger as power-supply for max17042 fuel gauge - corrected touchscreen-size-.. properties to match 'native' orientation - Add manufacturer model number to model string - Revise max8903_charger section/ comments Part-of: --- ...m-dts-Add-barnesnoble-encore-support.patch | 706 +++++++++++++++--- .../linux-postmarketos-omap/APKBUILD | 4 +- 2 files changed, 620 insertions(+), 90 deletions(-) diff --git a/device/community/linux-postmarketos-omap/0010-arm-dts-Add-barnesnoble-encore-support.patch b/device/community/linux-postmarketos-omap/0010-arm-dts-Add-barnesnoble-encore-support.patch index 0aa60a681..5eb1534d6 100644 --- a/device/community/linux-postmarketos-omap/0010-arm-dts-Add-barnesnoble-encore-support.patch +++ b/device/community/linux-postmarketos-omap/0010-arm-dts-Add-barnesnoble-encore-support.patch @@ -12,10 +12,10 @@ index 95c68135d..4a119f1ba 100644 omap3-overo-gallop43.dtb \ diff --git a/arch/arm/boot/dts/ti/omap/omap3-nookcolor.dts b/arch/arm/boot/dts/ti/omap/omap3-nookcolor.dts new file mode 100644 -index 000000000..6bd31d733 +index 000000000..2ba23d2f3 --- /dev/null +++ b/arch/arm/boot/dts/ti/omap/omap3-nookcolor.dts -@@ -0,0 +1,369 @@ +@@ -0,0 +1,899 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * omap3-nookcolor.dts - Device Tree file for Barnes & Noble Nook Color @@ -29,8 +29,8 @@ index 000000000..6bd31d733 +#include + +/ { -+ model = "Barnes & Noble Nook Color"; -+ compatible = "bn,omap3-nookcolor", "ti,omap36xx", "ti,omap3630", "ti,omap3"; ++ model = "Barnes & Noble Nook Color (BNRV200)"; ++ compatible = "bn,omap3-nookcolor", "ti,omap3621", "ti,omap3630", "ti,omap3"; + + cpus { + cpu@0 { @@ -48,7 +48,7 @@ index 000000000..6bd31d733 + #size-cells = <1>; + ranges; + -+ /* commenting/removing as I added this but don't have setup to make use of it. ++ /* I never made use of this, but likely works if desired. + ram_console@8E000000 { + reg = <0x8E000000 0x00100000>; + no-map; @@ -58,60 +58,64 @@ index 000000000..6bd31d733 + + backlight: backlight { + compatible = "pwm-backlight"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&backlight_pins>; ++ + pwms = <&pwm8 0 7812500 0>; + -+ enable-gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; ++ enable-gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; /* gpio47 */ + + brightness-levels = <5 32 64 75 105 128 179 254>; + default-brightness-level = <4>; + }; + -+ /* -+ * max8903 battery charger -+ * Here is what I had in the board file I started with, and how I mapped to the newer dts values: -+ * -+ * MAX8903_GPIO_CHG_EN 110 --> cen-gpios Charger Enable input = <&gpio4 14 GPIO_ACTIVE_LOW> -+ * MAX8903_GPIO_CHG_FLT 101 --> flt-gpios Fault output = <&gpio4 5 GPIO_ACTIVE_LOW> -+ * MAX8903_GPIO_CHG_IUSB 102 --> chg-gpios Charger status output = <&gpio4 6 GPIO_ACTIVE_LOW> -+ * MAX8903_GPIO_CHG_USUS_EVT1A 104 --> usus-gpios USB Suspend Input (1: suspended) = <&gpio4 8 GPIO_ACTIVE_LOW> -+ * MAX8903_GPIO_CHG_ILM_EVT1A 61 --> dcm-gpios Current-Limit Mode input (1: DC, 2: USB) = <&gpio2 29 GPIO_ACTIVE_LOW> -+ * MAX8903_UOK_GPIO_FOR_IRQ 115 --> uok-gpios USB Power OK output = <&gpio4 19 GPIO_ACTIVE_LOW> -+ * MAX8903_DOK_GPIO_FOR_IRQ 114 --> dok-gpios DC (Adapter) Power OK output = <&gpio4 18 GPIO_ACTIVE_LOW> -+ */ -+ charger { ++ max8903_charger: charger { + compatible = "maxim,max8903"; + -+ dok-gpios = <&gpio4 18 GPIO_ACTIVE_LOW>; -+ uok-gpios = <&gpio4 19 GPIO_ACTIVE_LOW>; -+ flt-gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; -+ chg-gpios = <&gpio4 6 GPIO_ACTIVE_LOW>; -+ cen-gpios = <&gpio4 14 GPIO_ACTIVE_LOW>; -+ usus-gpios = <&gpio4 8 GPIO_ACTIVE_LOW>; -+ dcm-gpios = <&gpio2 29 GPIO_ACTIVE_LOW>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&charger_pins>; ++ ++ dok-gpios = <&gpio4 18 GPIO_ACTIVE_LOW>; /* gpio114 - DOK: DC Power-OK Output */ ++ uok-gpios = <&gpio4 19 GPIO_ACTIVE_LOW>; /* gpio115 - UOK: USB Power-OK Output */ ++ cen-gpios = <&gpio4 14 GPIO_ACTIVE_LOW>; /* gpio110 - CEN: Charger Enable Input */ ++ dcm-gpios = <&gpio2 29 GPIO_ACTIVE_HIGH>; /* gpio61 - DCM: Current-Limit Mode Setting for the DC Power Input */ ++ iusb-gpios = <&gpio4 6 GPIO_ACTIVE_HIGH>; /* gpio102 - IUSB: USB Current-Limit Set Input */ ++ usus-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* gpio104 - USUS: USB Suspend Input */ ++ flt-gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; /* gpio101 - FLT: Fault Output */ ++ ++ /* This one may not be wired up/ connected in the device. ++ * Doesn't seem to change status. */ ++ /* chg-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; // gpio111 - CHG: Charger Status Output */ + }; + + gpio-keys { + compatible = "gpio-keys"; + ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gpio_key_home_pins &gpio_key_power_pins>; ++ + home-button { + label = "Home Button"; + linux,code = ; -+ gpios = <&gpio2 16 GPIO_ACTIVE_LOW>; /* GPIO_48 */ ++ gpios = <&gpio2 16 GPIO_ACTIVE_LOW>; /* gpio48 */ + wakeup-source; + }; + + power-button { + label = "Power Button"; + linux,code = ; -+ gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; /* GPIO_14 */ ++ gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; /* gpio14 */ + wakeup-source; + }; + }; + + lvds-encoder { + compatible = "ti,sn75lvds83", "lvds-encoder"; -+ -+ power-supply = <&dummy_reg_vcc_lvds>; ++ ++ /* power-supply = <&dummy_reg_vcc_lvds>; */ ++ ++ pclk-sample = <1>; + + ports { + #address-cells = <1>; @@ -135,64 +139,442 @@ index 000000000..6bd31d733 + }; + }; + ++ /* fixed 26MHz oscillator */ ++ hfclk_26m: oscillator { ++ #clock-cells = <0>; ++ compatible = "fixed-clock"; ++ clock-frequency = <26000000>; ++ }; ++ + pwm8: pwm-8 { + compatible = "ti,omap-dmtimer-pwm"; + #pwm-cells = <3>; + ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm8_pins>; ++ + ti,timers = <&timer8>; + ti,clock-source = <0x00>; /* system clock */ + }; + ++ reg_codec_3v3: regulator-codec-3v3 { ++ compatible = "regulator-fixed"; ++ regulator-name = "codec_3v3"; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&audio_codec_power_pins>; ++ ++ gpio = <&gpio4 7 GPIO_ACTIVE_HIGH>; /* gpio103 */ ++ enable-active-high; ++ ++ startup-delay-us = <10000>; ++ }; ++ ++ dummy_reg_codec_dvdd: regulator-dummy-codec-dvdd { ++ compatible = "regulator-fixed"; ++ regulator-name = "dummy_reg_codec_dvdd"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-always-on; ++ }; ++ ++ /* + dummy_reg_vcc_lvds: regulator-dummy-vcclvds { + compatible = "regulator-fixed"; + regulator-name = "dummy_reg_vcc_lvds"; + regulator-always-on; + }; -+ -+ dummy_reg_vcpin: regulator-dummy-vcpin { -+ compatible = "regulator-fixed"; -+ regulator-name = "dummy_reg_vcpin"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-always-on; -+ }; -+ -+ dummy_reg_vdd: regulator-dummy-vdd { -+ compatible = "regulator-fixed"; -+ regulator-name = "dummy_reg_vdd"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-always-on; -+ }; ++ */ + + vdd_lcdtp: regulator-vddlcdtp { + compatible = "regulator-fixed"; + regulator-name = "vdd_lcdtp"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; -+ gpio = <&gpio2 4 GPIO_ACTIVE_HIGH>; /* gpio 36 */ ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&lcd_power_pins>; ++ ++ gpio = <&gpio2 4 GPIO_ACTIVE_HIGH>; /* gpio36 */ + enable-active-high; -+ regulator-boot-on; + }; + ++ /* NOTE: There is also mention of gpio16, with comments like 'wifi_en_pow' ++ * and 'EN_WIFI_POW'. That gpio is set by the older cyanogenmod kernel ++ * code in a function called 'encore_wifi_init' ++ */ ++ + vwl1271: regulator-vwl1271 { + compatible = "regulator-fixed"; + regulator-name = "vwl1271"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; -+ gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>; /* gpio 22 */ ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&wifi_power_pins>; ++ ++ gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>; /* gpio22 */ + startup-delay-us = <70000>; + enable-active-high; + }; ++ ++ sound { ++ compatible = "simple-audio-card"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&headset_detect_pins>; ++ ++ simple-audio-card,name = "Nook Sound"; ++ ++ simple-audio-card,widgets = ++ "Speaker", "Internal Speaker", ++ "Headphone", "Headphones"; ++ ++ simple-audio-card,routing = ++ "Internal Speaker", "SPK", ++ "Headphones", "HPL", ++ "Headphones", "HPR"; ++ ++ simple-audio-card,format = "i2s"; /* REVIEW! Seems to be either: "i2s" or "dsp_b" */ ++ ++ simple-audio-card,bitclock-master = <&sound_master>; ++ simple-audio-card,frame-master = <&sound_master>; ++ ++ simple-audio-card,hp-det-gpios = <&gpio5 29 GPIO_ACTIVE_LOW>; /* gpio157 - should be correct gpio but needs testing */ ++ ++ simple-audio-card,cpu { ++ sound-dai = <&mcbsp2>; /* REVIEW! */ ++ }; ++ ++ sound_master: simple-audio-card,codec { ++ sound-dai = <&audio_codec>; ++ clocks = <&sys_clkout2>; ++ system-clock-frequency = <12000000>; ++ }; ++ }; ++ ++}; ++ ++/* Audio Codec Clock Setup Attempt: ++ * Older barnes & noble and cyanogenmod kernel code sets up the ++ * parents of sys_clkout2 to be clkout2_src_ck, then sys_ck. However that can't ++ * be divided by a power of two to produce 12000000, which is in the rate table ++ * in the codec driver. ++ * So my thought was to try a different upstream clock which can be divided ++ * to reach 12000000, and that clock is cm_96m_fck. ++ * Of course I don't really know what I'm doing and ChatGPT only pretends to ++ * know. But leaving this here since it at least allows the codec to probe ++ * without errors. ++ */ ++&sys_clkout2 { ++ assigned-clocks = <&clkout2_src_ck>; ++ assigned-clock-parents = <&cm_96m_fck>; ++}; ++ ++&omap3_pmx_core { ++ ++ accelerometer_pins: accelerometer-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x2136, PIN_INPUT | MUX_MODE4) /* gpio113 / gpio4-17 kxtf9_irq MOT-nINT */ ++ >; ++ }; ++ ++ /* This gpio pinctrl item originates from some hint/ note of its possible ++ * functionality in older u-boot / linux kernel code, but it hasn't been ++ * used nor tested. Note also that should this be enabled at some point ++ * it should likely be marked as an output. ++ * ++ * accelerometer_power_pins: accelerometer-power-pins { ++ * pinctrl-single,pins = < ++ * OMAP3_CORE1_IOPAD(0x207a, PIN_INPUT_PULLDOWN | MUX_MODE4) // gpio34 / gpio2-2 kxtf9_pwr ++ * >; ++ * }; ++ */ ++ ++ audio_codec_pins: audio-codec-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x2080, PIN_OUTPUT | MUX_MODE4) /* gpio37 / gpio2-5 audio_codec_reset AUD_nRESET */ ++ ++ /* Line below is commented as item was mentioned but seemingly unused in ++ * older u-boot/ linux kernel code and is not implemented nor tested. */ ++ // OMAP3_CORE1_IOPAD(0x20be, PIN_INPUT | MUX_MODE4) /* gpio59 / gpio2-27 audio_codec_irq AUD-CODEC-nINT */ ++ >; ++ }; ++ ++ audio_codec_power_pins: audio-codec-power-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x211e, PIN_OUTPUT | MUX_MODE4) /* gpio103 / gpio4-7 audio_codec_power_enable AUD-CODEC-EN */ ++ >; ++ }; ++ ++ backlight_pins: backlight-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x20a4, PIN_OUTPUT | MUX_MODE4) /* gpio47 / gpio2-15 lcd_backlight_en */ ++ >; ++ }; ++ ++ bluetooth_pins: bluetooth-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x20c6, PIN_OUTPUT | MUX_MODE4) // gpio60 / gpio2-28 bt_reset__kim BT-EN ++ >; ++ }; ++ ++ charger_pins: charger-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x20c8, PIN_OUTPUT | MUX_MODE4) /* gpio61 / gpio2-29 max8903_chg_ilm DC-CHG-ILM */ ++ OMAP3_CORE1_IOPAD(0x211a, PIN_INPUT | MUX_MODE4) /* gpio101 / gpio4-5 max8903_chg_flt nCHG_FAULT */ ++ OMAP3_CORE1_IOPAD(0x211c, PIN_OUTPUT | MUX_MODE4) /* gpio102 / gpio4-6 max8903_chg_iusb CHRG_EN1 */ ++ OMAP3_CORE1_IOPAD(0x2120, PIN_OUTPUT | MUX_MODE4) /* gpio104 / gpio4-8 max8903_chg_usus CHRG_EN2 */ ++ OMAP3_CORE1_IOPAD(0x212c, PIN_OUTPUT | MUX_MODE4) /* gpio110 / gpio4-14 max8903_chg_en CHRG_Cen */ ++ OMAP3_CORE1_IOPAD(0x212e, PIN_INPUT | MUX_MODE4) /* gpio111 / gpio4-15 CHRG_STATUS - This might not function correctly on Nook Color */ ++ OMAP3_CORE1_IOPAD(0x2138, PIN_INPUT | WAKEUP_EN | MUX_MODE4) /* gpio114 / gpio4-18 max8903_chg_dok_irq nDC-CHG-OK, should be wakup source */ ++ OMAP3_CORE1_IOPAD(0x213a, PIN_INPUT | WAKEUP_EN | MUX_MODE4) /* gpio115 / gpio4-19 max8903_chg_uok_irq nUSB-CHG-OK should be wakeup source */ ++ >; ++ }; ++ ++ dss_dpi_pins: dss-dpi-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT | MUX_MODE0) /* DSS_PCLK DSS_PCLK */ ++ OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT | MUX_MODE0) /* DSS_HSYNC DSS_HSYNC */ ++ OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT | MUX_MODE0) /* DSS_VSYNC DSS_VSYNC */ ++ OMAP3_CORE1_IOPAD(0x20da, PIN_INPUT | MUX_MODE0) /* LCD_ENABLE DSS_ACBIAS */ ++ OMAP3_CORE1_IOPAD(0x20dc, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA0 DSS_DATA0 */ ++ OMAP3_CORE1_IOPAD(0x20de, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA1 DSS_DATA1 */ ++ OMAP3_CORE1_IOPAD(0x20e0, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA2 DSS_DATA2 */ ++ OMAP3_CORE1_IOPAD(0x20e2, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA3 DSS_DATA3 */ ++ OMAP3_CORE1_IOPAD(0x20e4, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA4 DSS_DATA4 */ ++ OMAP3_CORE1_IOPAD(0x20e6, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA5 DSS_DATA5 */ ++ OMAP3_CORE1_IOPAD(0x20e8, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA6 DSS_DATA6 */ ++ OMAP3_CORE1_IOPAD(0x20ea, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA7 DSS_DATA7 */ ++ OMAP3_CORE1_IOPAD(0x20ec, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA8 DSS_DATA8 */ ++ OMAP3_CORE1_IOPAD(0x20ee, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA9 DSS_DATA9 */ ++ OMAP3_CORE1_IOPAD(0x20f0, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA10 DSS_DATA10 */ ++ OMAP3_CORE1_IOPAD(0x20f2, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA11 DSS_DATA11 */ ++ OMAP3_CORE1_IOPAD(0x20f4, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA12 DSS_DATA12 */ ++ OMAP3_CORE1_IOPAD(0x20f6, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA13 DSS_DATA13 */ ++ OMAP3_CORE1_IOPAD(0x20f8, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA14 DSS_DATA14 */ ++ OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA15 DSS_DATA15 */ ++ OMAP3_CORE1_IOPAD(0x20fc, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA16 DSS_DATA16 */ ++ OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA17 DSS_DATA17 */ ++ OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA18 DSS_DATA18 */ ++ OMAP3_CORE1_IOPAD(0x2102, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA19 DSS_DATA19 */ ++ OMAP3_CORE1_IOPAD(0x2104, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA20 DSS_DATA20 */ ++ OMAP3_CORE1_IOPAD(0x2106, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA21 DSS_DATA21 */ ++ OMAP3_CORE1_IOPAD(0x2108, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA22 DSS_DATA22 */ ++ OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE0) /* DSS_DATA23 DSS_DATA23 */ ++ >; ++ }; ++ ++ fuel_gauge_pins: fuel-gauge-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x2118, PIN_INPUT | MUX_MODE4) /* gpio100 / gpio4-4 max17042_irq GG_INT */ ++ >; ++ }; ++ ++ gpio_key_home_pins: gpio-key-home-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x20a6, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio48 / gpio2-16 Button-Home */ ++ >; ++ }; ++ ++ gpio2_pins: gpio2-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x209e, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* gpio44 / gpio2-12 lcd_cabc0 CABC0 */ ++ OMAP3_CORE1_IOPAD(0x20a0, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* gpio45 / gpio2-13 lcd_cabc1 CABC1 */ ++ >; ++ }; ++ ++ headset_detect_pins: headset-detect-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x218e, PIN_INPUT | MUX_MODE4) /* gpio157 / gpio5-29 dac3100-headset HS-nDETECT */ ++ >; ++ }; ++ ++ hsusb0_pins: hsusb0-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x21a2, PIN_INPUT | MUX_MODE0) /* HSUSB0_CLK HSUSB0_CLK */ ++ OMAP3_CORE1_IOPAD(0x21a4, PIN_OUTPUT | PULL_UP | MUX_MODE0) /* HSUSB0_STP HSUSB0_STP */ ++ OMAP3_CORE1_IOPAD(0x21a6, PIN_INPUT | MUX_MODE0) /* HSUSB0_DIR HSUSB0_DIR */ ++ OMAP3_CORE1_IOPAD(0x21a8, PIN_INPUT | MUX_MODE0) /* HSUSB0_NXT HSUSB0_NXT */ ++ OMAP3_CORE1_IOPAD(0x21aa, PIN_INPUT | MUX_MODE0) /* HSUSB0_DATA0 HSUSB0_DATA0 */ ++ OMAP3_CORE1_IOPAD(0x21ac, PIN_INPUT | MUX_MODE0) /* HSUSB0_DATA1 HSUSB0_DATA1 */ ++ OMAP3_CORE1_IOPAD(0x21ae, PIN_INPUT | MUX_MODE0) /* HSUSB0_DATA2 HSUSB0_DATA2 */ ++ OMAP3_CORE1_IOPAD(0x21b0, PIN_INPUT | MUX_MODE0) /* HSUSB0_DATA3 HSUSB0_DATA3 */ ++ OMAP3_CORE1_IOPAD(0x21b2, PIN_INPUT | MUX_MODE0) /* HSUSB0_DATA4 HSUSB0_DATA4 */ ++ OMAP3_CORE1_IOPAD(0x21b4, PIN_INPUT | MUX_MODE0) /* HSUSB0_DATA5 HSUSB0_DATA5 */ ++ OMAP3_CORE1_IOPAD(0x21b6, PIN_INPUT | MUX_MODE0) /* HSUSB0_DATA6 HSUSB0_DATA6 */ ++ OMAP3_CORE1_IOPAD(0x21b8, PIN_INPUT | MUX_MODE0) /* HSUSB0_DATA7 HSUSB0_DATA7 */ ++ >; ++ }; ++ ++ i2c1_pins: i2c1-pins { ++ pinctrl-single,pins = < ++ /* Settings for these pins were changed from original board code ++ * to match what is done in the twl4030_omap3.dtsi file for i2c4 ++ * as well as what is done in most other omap3 boards. ++ */ ++ OMAP3_CORE1_IOPAD(0x21ba, PIN_INPUT | MUX_MODE0) /* I2C1_SCL I2C1_SCL */ ++ OMAP3_CORE1_IOPAD(0x21bc, PIN_INPUT | MUX_MODE0) /* I2C1_SDA I2C1_SDA */ ++ >; ++ }; ++ ++ i2c2_pins: i2c2-pins { ++ pinctrl-single,pins = < ++ /* Settings for these pins were changed from original board code ++ * to match what is done in the twl4030_omap3.dtsi file for i2c4 ++ * as well as what is done in most other omap3 boards. ++ */ ++ OMAP3_CORE1_IOPAD(0x21be, PIN_INPUT | MUX_MODE0) /* I2C2_SCL I2C2_SCL */ ++ OMAP3_CORE1_IOPAD(0x21c0, PIN_INPUT | MUX_MODE0) /* I2C2_SDA I2C2_SDA */ ++ >; ++ }; ++ ++ lcd_power_pins: lcd-power-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x207e, PIN_OUTPUT | MUX_MODE4) /* gpio36 / gpio2-4 lcd_en__vdd_lcdtp LCD_PWR_EN */ ++ >; ++ }; ++ ++ mcbsp2_pins: mcbsp2-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x213c, PIN_INPUT | MUX_MODE0) /* McBSP2_FSX McBSP2_FSX */ ++ OMAP3_CORE1_IOPAD(0x213e, PIN_INPUT | MUX_MODE0) /* McBSP2_CLKX McBSP2_CLKX */ ++ OMAP3_CORE1_IOPAD(0x2140, PIN_INPUT | MUX_MODE0) /* McBSP2_DR McBSP2_DR */ ++ OMAP3_CORE1_IOPAD(0x2142, PIN_OUTPUT | MUX_MODE0) /* McBSP2_DX McBSP2_DX */ ++ >; ++ }; ++ ++ mcspi4_pins: mcspi4-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x218c, PIN_INPUT | MUX_MODE1) /* McSPI4-CLK McBSP1_CLKR */ ++ OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE1) /* McSPI4-SIMO McBSP1_DX */ ++ OMAP3_CORE1_IOPAD(0x2192, PIN_INPUT | MUX_MODE1) /* McSPI4-SOMI McBSP1_DR */ ++ OMAP3_CORE1_IOPAD(0x2196, PIN_OUTPUT | MUX_MODE1) /* McSPI4-CS0 McBSP1_FSX */ ++ >; ++ }; ++ ++ /* Set MMC1 and MMC2 pins to be 'PIN_INPUT_PULLUP' based on most other ++ * omap3 devices and discovery that old 3.0.101-ish omap kernel ++ * sets PIN_INPUT_PULLUP in 'omap_hsmmc_mux' function in arch/arm/mach-omap2/hsmmc.c. ++ */ ++ mmc1_pins: mmc1-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x2144, PIN_INPUT_PULLUP | MUX_MODE0) /* MMC1_CLK MMC1_CLK */ ++ OMAP3_CORE1_IOPAD(0x2146, PIN_INPUT_PULLUP | MUX_MODE0) /* MMC1_CMD MMC1_CMD */ ++ OMAP3_CORE1_IOPAD(0x2148, PIN_INPUT_PULLUP | MUX_MODE0) /* MMC1_DAT0 MMC1_DAT0 */ ++ OMAP3_CORE1_IOPAD(0x214a, PIN_INPUT_PULLUP | MUX_MODE0) /* MMC1_DAT1 MMC1_DAT1 */ ++ OMAP3_CORE1_IOPAD(0x214c, PIN_INPUT_PULLUP | MUX_MODE0) /* MMC1_DAT2 MMC1_DAT2 */ ++ OMAP3_CORE1_IOPAD(0x214e, PIN_INPUT_PULLUP | MUX_MODE0) /* MMC1_DAT3 MMC1_DAT3 */ ++ >; ++ }; ++ ++ mmc2_pins: mmc2-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x2158, PIN_INPUT_PULLUP | MUX_MODE0) /* MMC2_CLK MMC2_CLK */ ++ OMAP3_CORE1_IOPAD(0x215a, PIN_INPUT_PULLUP | MUX_MODE0) /* MMC2_CMD MMC2_CMD */ ++ OMAP3_CORE1_IOPAD(0x215c, PIN_INPUT_PULLUP | MUX_MODE0) /* MMC2_DAT0 MMC2_DAT0 */ ++ OMAP3_CORE1_IOPAD(0x215e, PIN_INPUT_PULLUP | MUX_MODE0) /* MMC2_DAT1 MMC2_DAT1 */ ++ OMAP3_CORE1_IOPAD(0x2160, PIN_INPUT_PULLUP | MUX_MODE0) /* MMC2_DAT2 MMC2_DAT2 */ ++ OMAP3_CORE1_IOPAD(0x2162, PIN_INPUT_PULLUP | MUX_MODE0) /* MMC2_DAT3 MMC2_DAT3 */ ++ OMAP3_CORE1_IOPAD(0x2164, PIN_INPUT_PULLUP | MUX_MODE0) /* MMC2_DIR_DAT0 MMC2_DAT4 */ ++ OMAP3_CORE1_IOPAD(0x2166, PIN_INPUT_PULLUP | MUX_MODE0) /* MMC2_DIR_DAT1 MMC2_DAT5 */ ++ OMAP3_CORE1_IOPAD(0x2168, PIN_INPUT_PULLUP | MUX_MODE0) /* MMC2_DIR_CMD MMC2_DAT6 */ ++ OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT_PULLUP | MUX_MODE0) /* MMC2_CLKIN MMC2_DAT7 */ ++ >; ++ }; ++ ++ pwm8_pins: pwm8-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x20bc, PIN_OUTPUT | MUX_MODE3) /* GPT_8_PWM_EVT GPMC_nCS7 */ ++ >; ++ }; ++ ++ touchscreen_pins: touchscreen-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x20a2, PIN_OUTPUT | MUX_MODE4) /* gpio46 / gpio2-14 cyttsp_tma340_reset TP-nRESET */ ++ OMAP3_CORE1_IOPAD(0x2116, PIN_INPUT | MUX_MODE4) /* gpio99 / gpio4-3 cyttsp_touch_irq TS_INT */ ++ >; ++ }; ++ ++ /* Moving over but leaving commented since I am not using/testing this at all ++ * U-Boot code notes this as 'Console Interface'. ++ * uart1_pins: uart1-pins { ++ * pinctrl-single,pins = < ++ * OMAP3_CORE1_IOPAD(0x217c, PIN_OUTPUT | MUX_MODE0) // UART1_TX UART1_TX ++ * OMAP3_CORE1_IOPAD(0x217e, PIN_OUTPUT | MUX_MODE0) // UART1_RTS UART1_RTS ++ * OMAP3_CORE1_IOPAD(0x2180, PIN_INPUT_PULLUP | MUX_MODE0) // UART1_CTS even if input for omap as pin is connected to test point UART1_CTS ++ * OMAP3_CORE1_IOPAD(0x2182, PIN_INPUT_PULLUP | WAKEUP_EN | MUX_MODE0) // UART1_RX UART1_RX ++ * >; ++ * }; ++ */ ++ ++ uart2_pins: uart2-pins { ++ pinctrl-single,pins = < ++ OMAP3_CORE1_IOPAD(0x216c, PIN_INPUT_PULLUP | MUX_MODE1) /* UART2_CTS McBSP3_DX */ ++ OMAP3_CORE1_IOPAD(0x216e, PIN_OUTPUT | MUX_MODE1) /* UART2_RTS McBSP3_DR */ ++ OMAP3_CORE1_IOPAD(0x2170, PIN_OUTPUT | MUX_MODE1) /* UART2_TX McBSP3_CLKX */ ++ OMAP3_CORE1_IOPAD(0x2172, PIN_INPUT_PULLUP | MUX_MODE1) /* UART2_RX McBSP3_FSX - or maybe just PIN_INPUT? */ ++ >; ++ }; ++ ++}; ++ ++&omap3_pmx_core2 { ++ ++ gpio_key_power_pins: gpio-key-power-pins { ++ pinctrl-single,pins = < ++ OMAP3630_CORE2_IOPAD(0x25dc, PIN_INPUT | WAKEUP_EN | MUX_MODE4) /* gpio14 / gpio1-14 Button-Power SYS-PWR-ON-KEY */ ++ >; ++ }; ++ ++ mmc3_pins: mmc3-pins { ++ pinctrl-single,pins = < ++ OMAP3630_CORE2_IOPAD(0x25da, PIN_INPUT_PULLUP | MUX_MODE2) /* MMC3_CMD ETK_CTL_ES2 */ ++ OMAP3630_CORE2_IOPAD(0x25d8, PIN_INPUT_PULLUP | MUX_MODE2) /* MMC3_CLK ETK_CLK_ES2 */ ++ OMAP3630_CORE2_IOPAD(0x25e4, PIN_INPUT_PULLUP | MUX_MODE2) /* MMC3_DAT0 ETK_D4_ES2 */ ++ OMAP3630_CORE2_IOPAD(0x25e6, PIN_INPUT_PULLUP | MUX_MODE2) /* MMC3_DAT1 ETK_D5_ES2 */ ++ OMAP3630_CORE2_IOPAD(0x25e8, PIN_INPUT_PULLUP | MUX_MODE2) /* MMC3_DAT2 ETK_D6_ES2 */ ++ OMAP3630_CORE2_IOPAD(0x25e2, PIN_INPUT_PULLUP | MUX_MODE2) /* MMC3_DAT3 ETK_D3_ES2 */ ++ >; ++ }; ++ ++ wifi_pins: wifi-pins { ++ pinctrl-single,pins = < ++ OMAP3630_CORE2_IOPAD(0x25de, PIN_INPUT | MUX_MODE4) /* gpio15 / gpio1-15 wifi_irq WLAN-IRQ */ ++ >; ++ }; ++ ++ wifi_power_pins: wifi-power-pins { ++ pinctrl-single,pins = < ++ OMAP3630_CORE2_IOPAD(0x25ec, PIN_OUTPUT | MUX_MODE4) /* gpio22 / gpio1-22 wifi_pmena__vwl1271 WLAN-EN */ ++ /* Line below is commented as item was mentioned but seemingly unused in ++ * older u-boot/ linux kernel code and has not been implemented nor tested. ++ * ++ * OMAP3630_CORE2_IOPAD(0x25e0, PIN_INPUT | MUX_MODE4) // gpio16 / gpio1-16 wifi_en_pow EN_WIFI_POW ++ */ ++ >; ++ }; ++ +}; + +&dss { + status = "okay"; + -+ vdda_video-supply = <&vdac>; -+ /* vdds_dsi-supply = <&vpll2>; // or vpll1 ? ++ /* NOTE: To get dss working on this device and to avoid FIFO underflow errors, ++ * this kernel config flag must be set: CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK. ++ * In particular, it needs to be set to 4 to work with the display and timings. ++ * ++ * CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=4 + */ + ++ pinctrl-names = "default"; ++ pinctrl-0 = <&dss_dpi_pins>; ++ ++ /* vdda_video-supply = <&vpll2>; */ ++ vdds_dsi-supply = <&vpll2>; ++ + port { + dss_dpi_out: endpoint { + remote-endpoint = <&lvds_encoder_input>; @@ -208,33 +590,46 @@ index 000000000..6bd31d733 + * gpio_set_value(LCD_CABC0_GPIO,0); + */ +&gpio2 { -+ gpio-hog-cabc0 { ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&gpio2_pins>; ++ ++ cabc0-hog { + gpio-hog; -+ gpios = <12 GPIO_ACTIVE_LOW>; /* gpio_44 */ ++ gpios = <12 GPIO_ACTIVE_LOW>; /* gpio44 */ + output-low; + line-name = "CABC0"; + }; + -+ gpio-hog-cabc1 { ++ cabc1-hog { + gpio-hog; -+ gpios = <13 GPIO_ACTIVE_LOW>; /* gpio_45 */ ++ gpios = <13 GPIO_ACTIVE_LOW>; /* gpio45 */ + output-low; + line-name = "CABC1"; + }; +}; + ++&gpmc { ++ status = "disabled"; ++}; ++ +&i2c1 { + clock-frequency = <100000>; /* 100 kHz */ + ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins>; ++ + kxtf9: accelerometer@f { + compatible = "kionix,kxtf9"; + reg = <0x0f>; + -+ interrupt-parent = <&gpio4>; -+ interrupts = <17 IRQ_TYPE_EDGE_RISING>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&accelerometer_pins>; + -+ /* Starting with "portrait" orientation just because I need a starting point */ -+ mount-matrix = "0", "-1", "0", ++ interrupt-parent = <&gpio4>; ++ interrupts = <17 IRQ_TYPE_EDGE_FALLING>; /* gpio113 */ ++ ++ mount-matrix = "0", "1", "0", + "-1", "0", "0", + "0", "0", "1"; + }; @@ -243,14 +638,28 @@ index 000000000..6bd31d733 + compatible = "maxim,max17042"; + reg = <0x36>; + ++ pinctrl-names = "default"; ++ pinctrl-0 = <&fuel_gauge_pins>; ++ + interrupt-parent = <&gpio4>; -+ interrupts = <4 IRQ_TYPE_EDGE_FALLING>; ++ interrupts = <4 IRQ_TYPE_EDGE_FALLING>; /* gpio100 */ ++ ++ power-supplies = <&max8903_charger>; + }; + -+ twl: twl@48 { ++ twl: pmic@48 { + reg = <0x48>; + interrupts = <7>; /* SYS_NIRQ cascaded to intc */ + interrupt-parent = <&intc>; ++ ++ clocks = <&hfclk_26m>; ++ clock-names = "fck"; ++ ++ system-power-controller; ++ ++ power { ++ compatible = "ti,twl4030-power-idle-osc-off"; ++ }; + }; +}; + @@ -260,31 +669,45 @@ index 000000000..6bd31d733 +&i2c2 { + clock-frequency = <400000>; + -+ /* this should be present in the device, but section not completed/ tested yet. -+ audio-codec@18 { -+ compatible = "ti,tlv320aic310x"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c2_pins>; ++ ++ audio_codec: audio-codec@18 { ++ compatible = "ti,tlv320dac3100"; + reg = <0x18>; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&audio_codec_pins>; ++ ++ #sound-dai-cells = <0>; ++ ++ reset-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; /* gpio37 */ ++ ++ HPVDD-supply = <®_codec_3v3>; ++ SPRVDD-supply = <®_codec_3v3>; ++ SPLVDD-supply = <®_codec_3v3>; ++ AVDD-supply = <®_codec_3v3>; ++ IOVDD-supply = <®_codec_3v3>; ++ DVDD-supply = <&dummy_reg_codec_dvdd>; + }; -+ */ + -+ touchscreen@34 { ++ touchscreen@22 { + compatible = "cypress,cy8ctma340"; -+ reg = <0x34>; ++ reg = <0x22>; + -+ clock-frequency = <400000>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&touchscreen_pins>; + -+ /* GPIO 99 for IRQ */ + interrupt-parent = <&gpio4>; -+ interrupts = <3 IRQ_TYPE_EDGE_FALLING>; ++ interrupts = <3 IRQ_TYPE_EDGE_FALLING>; /* gpio99 for IRQ */ + -+ // "Reset line for the touchscreen, should be tagged as GPIO_ACTIVE_LOW" -+ reset-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>; ++ reset-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>; /* gpio46 */ + -+ vdd-supply = <&dummy_reg_vdd>; -+ vcpin-supply = <&dummy_reg_vcpin>; ++ vdd-supply = <&vdd_lcdtp>; ++ vcpin-supply = <&vdd_lcdtp>; + -+ touchscreen-size-x = <1024>; -+ touchscreen-size-y = <600>; ++ touchscreen-size-x = <600>; ++ touchscreen-size-y = <1024>; + + active-interval-ms = <0>; + touch-timeout-ms = <255>; @@ -300,9 +723,33 @@ index 000000000..6bd31d733 + status = "disabled"; +}; + ++&mcbsp2 { ++ status = "okay"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mcbsp2_pins>; ++ ++ #sound-dai-cells = <0>; ++}; ++ ++&mcspi1 { ++ status = "disabled"; ++}; ++ ++&mcspi2 { ++ status = "disabled"; ++}; ++ ++&mcspi3 { ++ status = "disabled"; ++}; ++ +&mcspi4 { + status = "okay"; + ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mcspi4_pins>; ++ + panel: panel@0 { + compatible = "lg,ld070ws1"; + reg = <0>; /* Chip select 0 */ @@ -313,6 +760,27 @@ index 000000000..6bd31d733 + + backlight = <&backlight>; + ++ rotation = <270>; ++ ++ /* These timings were pulled from old CyanogenMod code and match ++ * the requirement of this device that FCLK / PCLK >= 4. See note ++ * in DSS section for more info. ++ */ ++ panel-timing { ++ clock-frequency = <43200000>; ++ hactive = <1024>; ++ vactive = <600>; ++ hsync-len = <30>; ++ hfront-porch = <64>; ++ hback-porch = <132>; ++ vsync-len = <8>; ++ vfront-porch = <12>; ++ vback-porch = <20>; ++ ++ hsync-active = <0>; ++ vsync-active = <0>; ++ }; ++ + port { + panel_in_lvds: endpoint { + remote-endpoint = <&lvds_encoder_output>; @@ -323,27 +791,39 @@ index 000000000..6bd31d733 + +/* microSD Card Slot */ +&mmc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc1_pins>; ++ + vmmc-supply = <&vmmc1>; -+ /* vqmmc-supply = <&vsim>; ONLY if needed */ + bus-width = <4>; + -+ /* cd-gpios = <&twl_gpio 0 GPIO_ACTIVE_LOW>; double check this one */ ++ cd-gpios = <&twl_gpio 0 GPIO_ACTIVE_HIGH>; ++ ++ /* CHECK: is there a 'power_saving' flag available? if so, try setting it */ +}; + +/* Internal/eMMC */ +&mmc2 { -+ vmmc-supply = <&vmmc2>; -+ bus-width = <8>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc2_pins>; + -+ /* cd-gpios = <&twl_gpio 1 GPIO_ACTIVE_LOW>; double check this one */ ++ vmmc-supply = <&vmmc2>; ++ vqmmc-supply = <&vsim>; ++ bus-width = <8>; + + non-removable; + ti,non-removable; ++ ++ /* CHECK: is there a 'power_saving' flag available? if so, try setting it */ +}; + -+/* ++ +&mmc3 { -+ vmmc-supply = <&wl12xx_vmmc>; // This might not be right - probably should point to either a vmmc or the vwl1271 regulator set up above ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc3_pins>; ++ ++ vmmc-supply = <&vwl1271>; ++ vqmmc-supply = <&vaux2>; + bus-width = <4>; + + non-removable; @@ -354,15 +834,24 @@ index 000000000..6bd31d733 + #address-cells = <1>; + #size-cells = <0>; + -+ wlcore : wlcore@2 { ++ /* Note: In the old board files, there is some code around ++ * ENCORE_WIFI_ENPOW_GPIO = 16, which I haven't accounted for anywhere. ++ * See the encore_wifi_init function in board_encore.c and ++ * evt_wifi_init in board_evt_wifi.c, depending on kernel, ++ * for more information. ++ */ ++ wlcore: wifi@2 { + compatible = "ti,wl1271"; + reg = <2>; -+ interrupt-parent = <&gpio6>; -+ interrupts = <2 IRQ_TYPE_EDGE_RISING>; // gpio 162 -+ ref-clock-frequency = <26000000>; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&wifi_pins>; ++ ++ interrupt-parent = <&gpio1>; ++ interrupts = <15 IRQ_TYPE_EDGE_RISING>; /* gpio15 */ ++ ref-clock-frequency = <38400000>; + }; +}; -+*/ + +&twl_keypad { + linux,keymap = < MATRIX_KEY(0, 0, KEY_HOME) @@ -371,7 +860,33 @@ index 000000000..6bd31d733 + >; +}; + ++&uart2 { ++ status = "disabled"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart2_pins &bluetooth_pins>; ++ ++ bluetooth { ++ status = "disabled"; ++ ++ compatible = "ti,wl1271-st"; ++ ++ enable-gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>; /* gpio60 */ ++ }; ++}; ++ ++&uart3 { ++ status = "disabled"; ++}; ++ ++&uart4 { ++ status = "disabled"; ++}; ++ +&usb_otg_hs { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&hsusb0_pins>; ++ + interface-type = <0>; + usb-phy = <&usb2_phy>; + phys = <&usb2_phy>; @@ -380,8 +895,23 @@ index 000000000..6bd31d733 + power = <50>; +}; + ++ ++&vaux2 { ++ regulator-always-on; ++}; ++ ++/* try without setting the voltages. +&vmmc2 { + regulator-name = "vmmc2"; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <1850000>; +}; ++*/ ++ ++/* Below section was added as it appears in similar devices. ++ * I haven't tested without it. ++ */ ++/* Needed to power the DPI pins */ ++&vpll2 { ++ regulator-always-on; ++}; diff --git a/device/community/linux-postmarketos-omap/APKBUILD b/device/community/linux-postmarketos-omap/APKBUILD index d4a17ca81..449f4e1cd 100644 --- a/device/community/linux-postmarketos-omap/APKBUILD +++ b/device/community/linux-postmarketos-omap/APKBUILD @@ -2,7 +2,7 @@ maintainer="Mithil Bavishi " pkgname=linux-postmarketos-omap pkgver=6.15.0 -pkgrel=5 +pkgrel=6 pkgdesc="Mainline kernel fork for OMAP devices" arch="armv7" url="https://kernel.org/" @@ -94,6 +94,6 @@ f7d1a87088c65278a114125e732d5bebebb560a6245afb34e003083d808ef3f8c5f49ff231319535 c3af9715b3559c2d593f4fcfa078730722c7deeec132c5b83e085ff4d9815d85ef349384097c580efe1bbc37c60f42e18ef559f0abccfe236080670e4403fa77 0007-hsi-ssi_port-force-pio-path.patch b98ce806b3d5a0122086e4c9670639174470ff6d29851c60258cc5d699ce9a479dbf4996b24299fc075d25e9fe8f6b1250fafdff742deea0ddeaf53d342a9d72 0008-n900-dts-volume-keys.patch 66abb5548910ad369608b08200f5835d5a8526c04cc3617221ef546f3e3d22cd944db91dc6727a5c26a102b24d8ef1306ea01254c9c382759afced91b31747ef 0009-ARM-dts-disable-twl-off-idle-configuration-for-N900.patch -2f9aa18846a2e400dccdb8608e67331493487dc01b62e48c815b9a954f44d01d1f8a0856e9c3984cc32a3803c297a61183cc0f91c5bde40547c947ee2600aa71 0010-arm-dts-Add-barnesnoble-encore-support.patch +2626cdd833bfbee5e714e224953533f02a7d1faba0d7c9b968ab728a28d70ebfb3a9ed46aab30e3784165c6eeeff3f26b482e188af5bc5c15de5c970d262c188 0010-arm-dts-Add-barnesnoble-encore-support.patch eb4e5c16302675272c165512d734c44447c14a0ff97b389fbe4c04167d7182f6aa3d60c0b7a7d936d2677ba1bc36d8e43a52c932869907986bc4747d6e82df49 0011-panel-Add-lg-ld070ws1-for-barnesnoble-encore.patch "