Message ID | 20241108200440.7562-7-bavishimithil@gmail.com |
---|---|
State | New |
Headers | show |
Series | Initial support for Samsung Galaxy Tab 2 series | expand |
Am Fri, 8 Nov 2024 20:04:35 +0000 schrieb Mithil Bavishi <bavishimithil@gmail.com>: > Create common device tree for Samsung Espresso series devices > > Let's create a common tree for all the variants first. Later we can > device specific trees based on their screen sizes. > > Signed-off-by: Mithil Bavishi <bavishimithil@gmail.com> > --- > .../omap/omap4-samsung-espresso-common.dtsi | 680 ++++++++++++++++++ > 1 file changed, 680 insertions(+) > create mode 100644 arch/arm/boot/dts/ti/omap/omap4-samsung-espresso-common.dtsi > > diff --git a/arch/arm/boot/dts/ti/omap/omap4-samsung-espresso-common.dtsi b/arch/arm/boot/dts/ti/omap/omap4-samsung-espresso-common.dtsi > new file mode 100644 > index 000000000..62ff3f36c > --- /dev/null > +++ b/arch/arm/boot/dts/ti/omap/omap4-samsung-espresso-common.dtsi > @@ -0,0 +1,680 @@ > +// 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" > + > +/ { > + memory@80000000 { > + device_type = "memory"; > + reg = <0x80000000 0x40000000>; /* 1 GB */ > + }; > + > + reserved-memory { > + #address-cells = <1>; > + #size-cells = <1>; > + ranges; > + > + ramoops_region@A0000000 { s/_/-/ in node names please. > + no-map; > + reg = <0xA0000000 0x200000>; If used for ramoops, then there should be a compatible = "ramoops" see Documentation/devicetree/bindings/reserved-memory/ramoops.yaml > + }; > + > + continuous_splash: framebuffer@bef00000{ > + reg = <0xbef00000 (1024 * 600 * 4)>; > + no-map; > + }; > + }; > + > + chosen { > + #address-cells = <1>; > + #size-cells = <1>; > + ranges; hmm, no bus here, so no need for address/size-cells, rather specify stdout-path, etc. > + }; > + > + 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>; hmm, no pinmux here? > + }; > + > + i2c-gpio-6 { > + compatible = "i2c-gpio"; > + sda-gpios = <&gpio3 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; > + scl-gpios = <&gpio3 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; > + i2c-gpio,delay-us = <10>; > + #address-cells = <1>; > + #size-cells = <0>; same here > + }; > + > + 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>; > + same here > + 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_wlan: regulator-espresso-wlan { > + pinctrl-names = "default"; > + pinctrl-0 = <&wlanen_gpio>; > + compatible = "regulator-fixed"; > + regulator-name = "espresso_wlan"; > + regulator-max-microvolt = <2000000>; > + regulator-min-microvolt = <2000000>; > + gpio = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* GPIO_104 */ > + startup-delay-us = <70000>; > + regulator-always-on; > + enable-active-high; > + }; > + > + wlan_pwrseq: wlan-pwrseq { > + compatible = "mmc-pwrseq-simple"; > + clocks = <&twl 0>; > + clock-names = "ext_clock"; > + }; > + > + 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>; /* GPIO_63 */ > + startup-delay-us = <100000>; > + regulator-boot-on; > + regulator-always-on; > + enable-active-high; > + }; > + > + reg_espresso_external: regulator-espresso-external { > + compatible = "regulator-fixed"; > + regulator-name = "vmmc1"; > + regulator-max-microvolt = <2800000>; > + regulator-min-microvolt = <2800000>; > + gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; /* GPIO_34 */ > + regulator-always-on; hmm, we cannot turn sd card power off? > + 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>; /* GPIO_54 */ > + regulator-always-on; > + enable-active-high; > + }; > + > + gpio-keys { > + compatible = "gpio-keys"; > + pinctrl-names = "default"; > + pinctrl-0 = <&gpio_keys>; > + > + power { button or key-power > + label = "power"; > + > + gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>; /* GPIO_wk3 */ > + linux,code = <KEY_POWER>; > + wakeup-source; > + }; > + > + button-volup { > + linux,code = <KEY_VOLUMEUP>; > + label = "volume_up"; /* GPIO_wk30 */ > + gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; > + }; > + > + button-voldown { > + linux,code = <KEY_VOLUMEDOWN>; > + label = "volume_down"; /* GPIO_wk8 */ > + gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; > + }; > + }; > + > + reg_lcd: regulator-lcd { > + compatible = "regulator-fixed"; > + regulator-name = "lcd_en"; > + gpios = <&gpio5 7 GPIO_ACTIVE_HIGH>; /* GPIO_135 */ > + regulator-max-microvolt = <3300000>; > + regulator-min-microvolt = <3300000>; > + enable-active-high; > + regulator-boot-on; > + }; > + > + pwm10: pwm-10 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pwm10_default>; > + compatible = "ti,omap-dmtimer-pwm"; > + #pwm-cells = <3>; > + ti,timers = <&timer10>; > + ti,clock-source = <0x00>; > + }; > + > + lvds-encoder { > + compatible = "doestek,dtc34lm85am", "lvds-encoder"; > + powerdown-gpios = <&gpio5 8 GPIO_ACTIVE_LOW>; /* GPIO_136 */ > + power-supply = <®_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>; > + }; > + }; > + }; > + }; > + > + vibrator { > + compatible = "gpio-vibrator"; > + enable-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>; /* GPIO_38 */ > + pinctrl-names = "default"; > + pinctrl-0 = <&vibrator_default>; > + }; > + > + gp2a_shunt: current-sense-shunt { > + compatible = "current-sense-shunt"; > + io-channels = <&gpadc 4>; > + shunt-resistor-micro-ohms = <24000000>; /* 24 ohms */ > + #io-channel-cells = <0>; > + }; > + > + led-ir { > + compatible = "gpio-ir-tx"; > + gpios = <&gpio2 27 GPIO_ACTIVE_HIGH>; /* GPIO_59 */ pinmux? > + }; > +}; > + > +&omap4_pmx_wkup { order node names alphabetically > + twl6030_wkup_pins: pinmux-twl6030-wkup-pins { > + pinctrl-single,pins = < > + OMAP4_IOPAD(0x54, PIN_OUTPUT | MUX_MODE3) > + /* fref_clk0_out.sys_drm_msecure */ > + >; > + }; > + This can come from twl6030_omap4.dtsi > + gpio_keys: gpio-keys-pins { > + pinctrl-single,pins = < > + OMAP4_IOPAD(0x046, WAKEUP_EN | PIN_INPUT | MUX_MODE3) > + /* sim_cd.gpio_wk3 - EXT_WAKEUP */ > + OMAP4_IOPAD(0x056, WAKEUP_EN | PIN_INPUT | MUX_MODE3) > + /* fref_clk3_req.gpio_wk30 - VOL_UP */ > + OMAP4_IOPAD(0x05C, WAKEUP_EN | PIN_INPUT | MUX_MODE3) > + /* fref_clk4_out.gpio_wk8 - VOL_DN */ > + >; > + }; > + > + prox_irq: prox-irq-pins { > + pinctrl-single,pins = < > + OMAP4_IOPAD(0x042, WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE3) > + /* sim_clk.gpio_wk1 - PS_VOUT */ > + >; > + }; > +}; > + > +&omap4_pmx_core { order node names alphabetically > + pwm10_default: pinmux-pwm10-pins { > + pinctrl-single,pins = < > + OMAP4_IOPAD(0X0D6, PIN_OUTPUT | PIN_OFF_OUTPUT_LOW | MUX_MODE1) > + /* usbb1_ulpitll_dat6.dmtimer10_pwm_evt - LED_BACKLIGHT_PWM */ > + >; > + }; > + > + backlight_pins: pinmux-backlight-pins { > + pinctrl-single,pins = < > + OMAP4_IOPAD(0X0D8, PIN_OUTPUT | PIN_OFF_OUTPUT_LOW | MUX_MODE3) > + /* usbb1_ulpitll_dat7.gpio_95 - LED_BACKLIGHT_RESET */ > + >; > + }; > + > + lvds_pins: pinmux-lvds-pins { > + pinctrl-single,pins = < > + OMAP4_IOPAD(0X136, PIN_OUTPUT | MUX_MODE3) > + /* mcspi1_simo.gpio_136 - LVDS_nSHDN */ > + >; > + }; > + > + 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_PULLDOWN | 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-pins { > + 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 */ > + >; > + }; you can simply include twl6030_omap4.dtsi describing recommended connection between omap4 SoCs and twl603X pmics. > + > + fuel_alert_irq: pinmux-fuel-alert-pins { > + pinctrl-single,pins = < > + OMAP4_IOPAD(0x068, WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE3) > + /* gpmc_a20.gpio_44 */ > + >; > + }; > + > + uart3_pins: pinmux-uart3-pins { > + pinctrl-single,pins = < > + OMAP4_IOPAD(0x144, PIN_INPUT | MUX_MODE0) /* uart3_rx_irrx */ > + OMAP4_IOPAD(0x146, PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx */ > + >; > + }; > + > + 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 */ > + >; > + }; > + > + wlan_host_wake: pinmux-wlan-host-wake-pins { > + pinctrl-single,pins = < > + OMAP4_IOPAD(0x0bc, WAKEUP_EN | PIN_INPUT | MUX_MODE3) > + /* cam_shutter.gpio_81 - WLAN_HOST_WAKE */ It might be an idea to use a dedicated wakeup irq instead of explicitely specifying WAKEUP_EN like you did for the uart. That counts for other occurances of WAKEUP_EN as well. > + >; > + }; > + > + bluetooth_pins: pinmux-bluetooth-pins { > + pinctrl-single,pins = < > + OMAP4_IOPAD(0x094, PIN_OUTPUT | MUX_MODE3) > + /* gpmc_ncs6.gpio_103 - BT_EN */ > + OMAP4_IOPAD(0x0be, PIN_OUTPUT | MUX_MODE3) > + /* cam_strobe.gpio_82 - BT_nRST */ > + OMAP4_IOPAD(0x0c0, WAKEUP_EN | PIN_INPUT | MUX_MODE3) > + /* cam_globalreset.gpio_83 - BT_HOST_WAKE */ > + OMAP4_IOPAD(0x0d4, PIN_OUTPUT | MUX_MODE3) > + /* usbb1_ulpitll_dat5.gpio_93 - BT_WAKE */ > + >; > + }; > + > + touch_pins: pinmux-touch-pins { > + pinctrl-single,pins = < > + OMAP4_IOPAD(0x06c, PIN_INPUT | MUX_MODE3) > + /* gpmc_a22.gpio_46 - TSP_INT */ > + >; > + }; > + > + vibrator_default: pinmux-vibrator-pins { > + pinctrl-single,pins = < > + OMAP4_IOPAD(0x05c, PIN_INPUT_PULLDOWN | MUX_MODE3) > + /* gpmc_ad14.gpio_38 - MOTOR_EN */ > + >; > + }; > + > + gp2a_irq: pinmux-gp2a-irq-pins { > + pinctrl-single,pins = < > + OMAP4_IOPAD(0x052, WAKEUP_EN | PIN_INPUT | MUX_MODE3) > + /* gpmc_ad9.gpio_33 - ALS_INT_18 */ > + >; > + }; > +}; > + > +&uart3 { > + pinctrl-names = "default"; > + pinctrl-0 = <&uart3_pins>; > + > + interrupts-extended = <&wakeupgen GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH > + &omap4_pmx_core OMAP4_UART3_RX>; > +}; > + > +&i2c1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c1_pins>; > + > + clock-frequency = <400000>; > + > + twl: twl@48 { generic node names: pmic@48 yes, there are a lot of bad examples in the tree people (including me!) keep copying from, but lets not create new bad examples. > + reg = <0x48>; > + #clock-cells = <1>; > + > + 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>; > + system-power-controller; > + }; > +}; > + > +#include "twl6032.dtsi" > + > +&ldo1 { > + regulator-min-microvolt = <2800000>; > + regulator-max-microvolt = <2800000>; > + regulator-always-on; > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > +}; > + > +&ldo3 { > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-always-on; > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > +}; > + > +&ldo4 { > + regulator-min-microvolt = <2800000>; > + regulator-max-microvolt = <2800000>; > + regulator-always-on; > +}; > + > +&ldo5 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-always-on; > +}; > + > +&ldo6 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-always-on; > + regulator-state-mem { > + regulator-off-in-suspend; > + }; > +}; > + > +&smps4 { > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-always-on; > +}; > + > +&ldousb { > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-always-on; > +}; > + > +&i2c2 { > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c2_pins>; > +}; > + > +&i2c3 { > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c3_pins>; > +}; > + > +&i2c4 { > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c4_pins>; > + > + accelerometer@18 { > + compatible = "bosch,bma254"; > + reg = <0x18>; > + vdd-supply = <&ldo4>; > + 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)>; this looks odd, binding says IRQ_TYPE_EDGE_RISING. Why do you think you need both? After something is rising, it is high, so both seem not to make sense. > + mount-matrix = "-1", "0", "0", > + "0", "1", "0", > + "0", "0", "1"; hmm, checking twice, since I mixed up something earlier. This just inverts x values, so we are mirroring across y-z plane, that does not look like a rotation matrix, so it does not describe how it is mounted. Eg. the n900 has two -1 in there, that is a turn by 180 degree. Your mount-matrix would be achieved, by cutting the chip into ultra thin slices, sorting them upside down and glueing that together. I doubt somebody does that. Regards, Andreas
> > + no-map; > > + reg = <0xA0000000 0x200000>; > > If used for ramoops, then there should be a compatible = "ramoops" > see Documentation/devicetree/bindings/reserved-memory/ramoops.yaml > > + }; > > + > > + continuous_splash: framebuffer@bef00000{ > > + reg = <0xbef00000 (1024 * 600 * 4)>; > > + no-map; > > + }; > > + }; > > + > > + chosen { > > + #address-cells = <1>; > > + #size-cells = <1>; > > + ranges; > > hmm, no bus here, so no need for address/size-cells, rather specify > stdout-path, etc. Will be dropping rampoops_region, and chosen nodes. They were used initially for debugging, since we now have drm for display and other means to get logs, these are not required. > > + 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>; > hmm, no pinmux here? Cannot seem to find it in the muxset given in vendor kernel. These are placeholders for now and hold other devices like smb136 charger, stmpe811 adc etc. Drivers for which I need to upstream first. https://github.com/MightyM17/linux_pvr/blob/testing/arch/arm/boot/dts/omap4-samsung-espresso7.dts#L10-L24 So for now is it better to drop them? > > + reg_espresso_external: regulator-espresso-external { > > + compatible = "regulator-fixed"; > > + regulator-name = "vmmc1"; > > + regulator-max-microvolt = <2800000>; > > + regulator-min-microvolt = <2800000>; > > + gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; /* GPIO_34 */ > > + regulator-always-on; > > hmm, we cannot turn sd card power off? A mistake by me, had kept it always on to ensure it works in testing. Fixed the error in next revision. > > + power { > > button or key-power Fixed. > > + led-ir { > > + compatible = "gpio-ir-tx"; > > + gpios = <&gpio2 27 GPIO_ACTIVE_HIGH>; /* GPIO_59 */ > pinmux? Added one according to - https://github.com/Unlegacy-Android/android_kernel_ti_omap4/blob/3.4/common/arch/arm/mach-omap2/board-espresso-irled.c#L303-L305 > > +&omap4_pmx_wkup { > > order node names alphabetically Fixed. > > + twl6030_wkup_pins: pinmux-twl6030-wkup-pins { > > + pinctrl-single,pins = < > > + OMAP4_IOPAD(0x54, PIN_OUTPUT | MUX_MODE3) > > + /* fref_clk0_out.sys_drm_msecure */ > > + >; > > + }; > > + > This can come from twl6030_omap4.dtsi Correct, included twl6030_omap4.dtsi and removed this. > > +&omap4_pmx_core { > > order node names alphabetically Fixed. > you can simply include twl6030_omap4.dtsi describing recommended > connection between omap4 SoCs and twl603X pmics. Fixed. > It might be an idea to use a dedicated wakeup irq instead of > explicitely specifying WAKEUP_EN like you did for the uart. > That counts for other occurances of WAKEUP_EN as well. Could you point out to some examples having this change? I have just followed how muxset mentioned it. I assume this can be worked on later as well. > generic node names: > pmic@48 Changed. > > + accelerometer@18 { > > + compatible = "bosch,bma254"; > > + reg = <0x18>; > > + vdd-supply = <&ldo4>; > > + 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)>; > > this looks odd, binding says IRQ_TYPE_EDGE_RISING. Why do you think you > need both? After something is rising, it is high, so both seem not to > make sense. https://github.com/torvalds/linux/commit/5640fed3035e88c3ce1361e6fc93f4e72468f307 This was worked on before the above mentioned change, hence the confusion. bma180 schema wants both the interrupts, I do not know why, but now it has moved to the bma255 schema which makes more sense. Fixed it according to new schema. > + mount-matrix = "-1", "0", "0", > + "0", "1", "0", > + "0", "0", "1"; > hmm, checking twice, since I mixed up something earlier. This just > inverts x values, so we are mirroring across y-z plane, that does not > look like a rotation matrix, so it does not describe how it is mounted. > Eg. the n900 has two -1 in there, that is a turn by 180 degree. > > Your mount-matrix would be achieved, by cutting the chip into ultra > thin slices, sorting them upside down and glueing that together. I > doubt somebody does that. Went through the mount matrix docs multiple times. It seems fairly straightforward for the accelerometer. being just a matrix that we can multiply to get a desired result. My intention is to flip the x values thus having a -1 in there. What I do not understand is the logic of how you came to the conclusion of "cutting the chip into ultra thin slices, sorting them upside down and glueing". The matrix seems correct and works as intended as well. Best Regards, Mithil
Am Sat, 23 Nov 2024 18:14:05 +0000 schrieb Mithil Bavishi <bavishimithil@gmail.com>: > > > + no-map; > > > + reg = <0xA0000000 0x200000>; > > > > If used for ramoops, then there should be a compatible = "ramoops" > > see Documentation/devicetree/bindings/reserved-memory/ramoops.yaml > > > + }; > > > + > > > + continuous_splash: framebuffer@bef00000{ > > > + reg = <0xbef00000 (1024 * 600 * 4)>; > > > + no-map; > > > + }; > > > + }; > > > + > > > + chosen { > > > + #address-cells = <1>; > > > + #size-cells = <1>; > > > + ranges; > > > > hmm, no bus here, so no need for address/size-cells, rather specify > > stdout-path, etc. > > Will be dropping rampoops_region, and chosen nodes. They were used > initially for debugging, since we now have drm for display and other > means to get logs, these are not required. > you might want to set stdout-path in chosen for earlycon to work. > > > + 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>; > > hmm, no pinmux here? > > Cannot seem to find it in the muxset given in vendor kernel. If in doubt, you can get it via busybox devmem from a working system, look in the reference manual for the gpios, I think they are at: for sda: 0x4A1000DE for scl: 0x4A1000E0 Now you need Mode 3 with input pullup. > These are placeholders for now and hold other devices like smb136 > charger, stmpe811 adc etc. Drivers for which I need to upstream first. > > https://github.com/MightyM17/linux_pvr/blob/testing/arch/arm/boot/dts/omap4-samsung-espresso7.dts#L10-L24 > > So for now is it better to drop them? > keep them and add comments for the devices without driver/binding, so people can get in touch regarding driver testing, etc. E.g. like this one: https://elixir.bootlin.com/linux/v6.12/source/arch/arm/boot/dts/nxp/imx/imx50-kobo-aura.dts#L138 Regarding missing devices: btw: you know that the wm1811 is covered by the wm8994 driver? [...] > > It might be an idea to use a dedicated wakeup irq instead of > > explicitely specifying WAKEUP_EN like you did for the uart. > > That counts for other occurances of WAKEUP_EN as well. > > Could you point out to some examples having this change? > I have just followed how muxset mentioned it. I assume this can be > worked on later as well. > Look around for pmx_core in the devicetrees, you find e.g: in motorola-mapphone-common.dtsi: tmp105@48 { compatible = "ti,tmp105"; reg = <0x48>; pinctrl-0 = <&tmp105_irq>; pinctrl-names = "default"; /* kpd_row0.gpio_178 */ interrupts-extended = <&gpio6 18 IRQ_TYPE_EDGE_FALLING &omap4_pmx_core 0x14e>; interrupt-names = "irq", "wakeup"; wakeup-source; }; and of course the uart interrupts in your submission. There is an offset of 0x40 between things in OMAP4_IOPAD and &omap4_pmx_core 0x... So you replace some WAKEUP_EN with such a wakeup interrupt and wakeup-source property. You do not need to do that for stuff in the wakeup domain (GPIO1). That should work for any i2c device with interrupts. With that, you can control wakeup from suspend via /sys/i2c/devices/X-YY/power/wakeup (or maybe power/wakeup of subdevices thereof. Regarding Wifi or Bluetooth wakeup, I doubt that WAKEUP_EN has any effect. If BT or Wifi wakeup is enabled, the gpio is kept active so power consumption is elevated anyways and nothing sleeps what can be woken up by WAKEUP_EN unless the driver supports a dedicated wakeup irq. So I think, replace the WAKEUP_EN for wakeup irqs for i2c stuff and remove the WAKEUP_EN in wifi/bt if it has no effect there. > > generic node names: > > pmic@48 > > Changed. > > > > + accelerometer@18 { > > > + compatible = "bosch,bma254"; > > > + reg = <0x18>; > > > + vdd-supply = <&ldo4>; > > > + 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)>; > > > > this looks odd, binding says IRQ_TYPE_EDGE_RISING. Why do you think you > > need both? After something is rising, it is high, so both seem not to > > make sense. > > https://github.com/torvalds/linux/commit/5640fed3035e88c3ce1361e6fc93f4e72468f307 > This was worked on before the above mentioned change, hence the confusion. > bma180 schema wants both the interrupts, I do not know why, but now it has > moved to the bma255 schema which makes more sense. > Fixed it according to new schema. > > > + mount-matrix = "-1", "0", "0", > > + "0", "1", "0", > > + "0", "0", "1"; > > > hmm, checking twice, since I mixed up something earlier. This just > > inverts x values, so we are mirroring across y-z plane, that does not > > look like a rotation matrix, so it does not describe how it is mounted. > > Eg. the n900 has two -1 in there, that is a turn by 180 degree. > > > > Your mount-matrix would be achieved, by cutting the chip into ultra > > thin slices, sorting them upside down and glueing that together. I > > doubt somebody does that. > > Went through the mount matrix docs multiple times. It seems fairly > straightforward for the accelerometer. being just a matrix that we can > multiply to get a desired result. In your opinion, you can use the matrix for any kind of conversion of the values. which can mathematically be done. Which a matrix you can scale things e.g. too. But there is also the scale parameter. So I doubt that there are limits what should be done with that matrix. In my understanding, the matrix is for describing how the chip is rotated towards the rest of the device not for anything else. bosch,bma255.yaml clearly says: mount-matrix: description: an optional 3x3 mounting rotation matrix. *rotation* > My intention is to flip the x values thus having a -1 in there. And I do not have an idea how the chip can be turned in the device to require that kind of matrix ... 180 degree turns need two flips ... > What I do not understand is the logic of how you came to the conclusion > of "cutting the chip into ultra thin slices, sorting them upside down and > glueing". besides of this hypothetical operation. > The matrix seems correct and works as intended as well. So maybe the chip is weird and maybe that is the most practical way is to correct that weidness with the matrix as well and throw away any dogmatics. Checking.. Comparing with n900 Datasheets: I do not find a datasheet for the BMA254, but for some similar chips: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bma253-ds000.pdf https://www.geeetech.com/Documents/BST-BMA180-DS000.pdf vs. https://www.st.com/resource/en/datasheet/lis302dl.pdf No flipping in the axis direction between the them. So either both n900 and espresso would need single mirroring (=flip one axis) or none. So if n900 matrix is correct, than you need another -1 in there to have some 180 degree rotation. Regards, Andreas
diff --git a/arch/arm/boot/dts/ti/omap/omap4-samsung-espresso-common.dtsi b/arch/arm/boot/dts/ti/omap/omap4-samsung-espresso-common.dtsi new file mode 100644 index 000000000..62ff3f36c --- /dev/null +++ b/arch/arm/boot/dts/ti/omap/omap4-samsung-espresso-common.dtsi @@ -0,0 +1,680 @@ +// 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" + +/ { + 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{ + 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-6 { + compatible = "i2c-gpio"; + sda-gpios = <&gpio3 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio3 1 (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_wlan: regulator-espresso-wlan { + pinctrl-names = "default"; + pinctrl-0 = <&wlanen_gpio>; + compatible = "regulator-fixed"; + regulator-name = "espresso_wlan"; + regulator-max-microvolt = <2000000>; + regulator-min-microvolt = <2000000>; + gpio = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* GPIO_104 */ + startup-delay-us = <70000>; + regulator-always-on; + enable-active-high; + }; + + wlan_pwrseq: wlan-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&twl 0>; + clock-names = "ext_clock"; + }; + + 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>; /* GPIO_63 */ + startup-delay-us = <100000>; + regulator-boot-on; + regulator-always-on; + enable-active-high; + }; + + reg_espresso_external: regulator-espresso-external { + compatible = "regulator-fixed"; + regulator-name = "vmmc1"; + regulator-max-microvolt = <2800000>; + regulator-min-microvolt = <2800000>; + gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; /* GPIO_34 */ + 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>; /* GPIO_54 */ + 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>; /* GPIO_wk3 */ + linux,code = <KEY_POWER>; + wakeup-source; + }; + + button-volup { + linux,code = <KEY_VOLUMEUP>; + label = "volume_up"; /* GPIO_wk30 */ + gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; + }; + + button-voldown { + linux,code = <KEY_VOLUMEDOWN>; + label = "volume_down"; /* GPIO_wk8 */ + gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; + }; + }; + + reg_lcd: regulator-lcd { + compatible = "regulator-fixed"; + regulator-name = "lcd_en"; + gpios = <&gpio5 7 GPIO_ACTIVE_HIGH>; /* GPIO_135 */ + regulator-max-microvolt = <3300000>; + regulator-min-microvolt = <3300000>; + enable-active-high; + regulator-boot-on; + }; + + pwm10: pwm-10 { + pinctrl-names = "default"; + pinctrl-0 = <&pwm10_default>; + compatible = "ti,omap-dmtimer-pwm"; + #pwm-cells = <3>; + ti,timers = <&timer10>; + ti,clock-source = <0x00>; + }; + + lvds-encoder { + compatible = "doestek,dtc34lm85am", "lvds-encoder"; + powerdown-gpios = <&gpio5 8 GPIO_ACTIVE_LOW>; /* GPIO_136 */ + power-supply = <®_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>; + }; + }; + }; + }; + + vibrator { + compatible = "gpio-vibrator"; + enable-gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>; /* GPIO_38 */ + pinctrl-names = "default"; + pinctrl-0 = <&vibrator_default>; + }; + + gp2a_shunt: current-sense-shunt { + compatible = "current-sense-shunt"; + io-channels = <&gpadc 4>; + shunt-resistor-micro-ohms = <24000000>; /* 24 ohms */ + #io-channel-cells = <0>; + }; + + led-ir { + compatible = "gpio-ir-tx"; + gpios = <&gpio2 27 GPIO_ACTIVE_HIGH>; /* GPIO_59 */ + }; +}; + +&omap4_pmx_wkup { + twl6030_wkup_pins: pinmux-twl6030-wkup-pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0x54, PIN_OUTPUT | MUX_MODE3) + /* fref_clk0_out.sys_drm_msecure */ + >; + }; + + gpio_keys: gpio-keys-pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0x046, WAKEUP_EN | PIN_INPUT | MUX_MODE3) + /* sim_cd.gpio_wk3 - EXT_WAKEUP */ + OMAP4_IOPAD(0x056, WAKEUP_EN | PIN_INPUT | MUX_MODE3) + /* fref_clk3_req.gpio_wk30 - VOL_UP */ + OMAP4_IOPAD(0x05C, WAKEUP_EN | PIN_INPUT | MUX_MODE3) + /* fref_clk4_out.gpio_wk8 - VOL_DN */ + >; + }; + + prox_irq: prox-irq-pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0x042, WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE3) + /* sim_clk.gpio_wk1 - PS_VOUT */ + >; + }; +}; + +&omap4_pmx_core { + pwm10_default: pinmux-pwm10-pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0X0D6, PIN_OUTPUT | PIN_OFF_OUTPUT_LOW | MUX_MODE1) + /* usbb1_ulpitll_dat6.dmtimer10_pwm_evt - LED_BACKLIGHT_PWM */ + >; + }; + + backlight_pins: pinmux-backlight-pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0X0D8, PIN_OUTPUT | PIN_OFF_OUTPUT_LOW | MUX_MODE3) + /* usbb1_ulpitll_dat7.gpio_95 - LED_BACKLIGHT_RESET */ + >; + }; + + lvds_pins: pinmux-lvds-pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0X136, PIN_OUTPUT | MUX_MODE3) + /* mcspi1_simo.gpio_136 - LVDS_nSHDN */ + >; + }; + + 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_PULLDOWN | 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-pins { + 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: pinmux-fuel-alert-pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0x068, WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE3) + /* gpmc_a20.gpio_44 */ + >; + }; + + uart3_pins: pinmux-uart3-pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0x144, PIN_INPUT | MUX_MODE0) /* uart3_rx_irrx */ + OMAP4_IOPAD(0x146, PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx */ + >; + }; + + 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 */ + >; + }; + + wlan_host_wake: pinmux-wlan-host-wake-pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0x0bc, WAKEUP_EN | PIN_INPUT | MUX_MODE3) + /* cam_shutter.gpio_81 - WLAN_HOST_WAKE */ + >; + }; + + bluetooth_pins: pinmux-bluetooth-pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0x094, PIN_OUTPUT | MUX_MODE3) + /* gpmc_ncs6.gpio_103 - BT_EN */ + OMAP4_IOPAD(0x0be, PIN_OUTPUT | MUX_MODE3) + /* cam_strobe.gpio_82 - BT_nRST */ + OMAP4_IOPAD(0x0c0, WAKEUP_EN | PIN_INPUT | MUX_MODE3) + /* cam_globalreset.gpio_83 - BT_HOST_WAKE */ + OMAP4_IOPAD(0x0d4, PIN_OUTPUT | MUX_MODE3) + /* usbb1_ulpitll_dat5.gpio_93 - BT_WAKE */ + >; + }; + + touch_pins: pinmux-touch-pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0x06c, PIN_INPUT | MUX_MODE3) + /* gpmc_a22.gpio_46 - TSP_INT */ + >; + }; + + vibrator_default: pinmux-vibrator-pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0x05c, PIN_INPUT_PULLDOWN | MUX_MODE3) + /* gpmc_ad14.gpio_38 - MOTOR_EN */ + >; + }; + + gp2a_irq: pinmux-gp2a-irq-pins { + pinctrl-single,pins = < + OMAP4_IOPAD(0x052, WAKEUP_EN | PIN_INPUT | MUX_MODE3) + /* gpmc_ad9.gpio_33 - ALS_INT_18 */ + >; + }; +}; + +&uart3 { + pinctrl-names = "default"; + pinctrl-0 = <&uart3_pins>; + + interrupts-extended = <&wakeupgen GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH + &omap4_pmx_core OMAP4_UART3_RX>; +}; + +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; + + clock-frequency = <400000>; + + twl: twl@48 { + reg = <0x48>; + #clock-cells = <1>; + + 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>; + system-power-controller; + }; +}; + +#include "twl6032.dtsi" + +&ldo1 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; + regulator-state-mem { + regulator-off-in-suspend; + }; +}; + +&ldo3 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-state-mem { + regulator-off-in-suspend; + }; +}; + +&ldo4 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; +}; + +&ldo5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; +}; + +&ldo6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-state-mem { + regulator-off-in-suspend; + }; +}; + +&smps4 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; +}; + +&ldousb { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; +}; + +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins>; +}; + +&i2c3 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_pins>; +}; + +&i2c4 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c4_pins>; + + accelerometer@18 { + compatible = "bosch,bma254"; + reg = <0x18>; + vdd-supply = <&ldo4>; + 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 = <&ldo4>; + 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 = <&ldo4>; + vio-supply = <&ldo4>; + 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>; + }; + }; +}; + +&twl_usb_comparator { + usb-supply = <&ldousb>; +}; + +&usb_otg_hs { + interface-type = <1>; + mode = <3>; + power = <50>; +}; + +&mmc1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; + + vmmc-supply = <®_espresso_external>; + bus-width = <4>; +}; + +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_pins>; + + vmmc-supply = <®_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 = <®_espresso_wlan>; + mmc-pwrseq = <&wlan_pwrseq>; + + pinctrl-names = "default"; + pinctrl-0 = <&mmc5_pins>; + + brcmf: wifi@1 { + compatible = "brcm,bcm4330-fmac", "brcm,bcm4329-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>; + }; +};
Create common device tree for Samsung Espresso series devices Let's create a common tree for all the variants first. Later we can device specific trees based on their screen sizes. Signed-off-by: Mithil Bavishi <bavishimithil@gmail.com> --- .../omap/omap4-samsung-espresso-common.dtsi | 680 ++++++++++++++++++ 1 file changed, 680 insertions(+) create mode 100644 arch/arm/boot/dts/ti/omap/omap4-samsung-espresso-common.dtsi