Message ID | 20241108200440.7562-11-bavishimithil@gmail.com |
---|---|
State | New |
Headers | show |
Series | Initial support for Samsung Galaxy Tab 2 series | expand |
Am Fri, 8 Nov 2024 20:04:39 +0000 schrieb Mithil Bavishi <bavishimithil@gmail.com>: > Create a device tree for the 10 inch variants (P5100, P5110, P5113) > > Signed-off-by: Mithil Bavishi <bavishimithil@gmail.com> > --- > .../dts/ti/omap/omap4-samsung-espresso10.dts | 102 ++++++++++++++++++ > 1 file changed, 102 insertions(+) > create mode 100644 arch/arm/boot/dts/ti/omap/omap4-samsung-espresso10.dts > > diff --git a/arch/arm/boot/dts/ti/omap/omap4-samsung-espresso10.dts b/arch/arm/boot/dts/ti/omap/omap4-samsung-espresso10.dts > new file mode 100644 > index 000000000..70bbef468 > --- /dev/null > +++ b/arch/arm/boot/dts/ti/omap/omap4-samsung-espresso10.dts > @@ -0,0 +1,102 @@ > +// SPDX-License-Identifier: (GPL-2.0 OR MIT) > +/dts-v1/; > + > +#include "omap4-samsung-espresso-common.dtsi" > +#include <dt-bindings/power/summit,smb347-charger.h> > +/ { > + model = "Samsung Galaxy Tab 2 (10 inch)"; > + compatible = "samsung,espresso10", "ti,omap4430", "ti,omap4"; > + > + i2c-gpio-5 { > + smb347: charger@6 { > + compatible = "summit,smb347"; > + reg = <0x6>; // 0x0C >> 1 > + interrupt-parent = <&gpio2>; > + interrupts = <0 IRQ_TYPE_EDGE_BOTH>; > + > + summit,enable-usb-charging; > + summit,enable-charge-control = <SMB3XX_CHG_ENABLE_SW>; > + summit,chip-temperature-threshold-celsius = <120>; > + summit,usb-current-limit-microamp = <1800000>; > + }; > + }; > + > + backlight: backlight { > + compatible = "pwm-backlight"; > + pinctrl-names = "default"; > + pinctrl-0 = <&backlight_pins>; > + pwms = <&pwm10 0 1600 0>; > + power-supply = <®_lcd>; > + enable-gpios = <&gpio3 31 GPIO_ACTIVE_HIGH>; > + brightness-levels = <0 4 8 16 32 64 128 255>; > + default-brightness-level = <7>; > + }; > + > + panel { > + compatible = "samsung,ltn101al03", "panel-lvds"; > + power-supply = <®_lcd>; > + width-mm = <223>; > + height-mm = <125>; > + data-mapping = "vesa-24"; > + backlight = <&backlight>; > + > + panel-timing { > + clock-frequency = <69818000>; > + > + hback-porch = <64>; > + hactive = <1280>; > + hfront-porch = <16>; > + hsync-len = <48>; > + > + vback-porch = <11>; > + vactive = <800>; > + vfront-porch = <16>; > + vsync-len = <3>; > + > + hsync-active = <0>; > + vsync-active = <0>; > + de-active = <1>; > + pixelclk-active = <1>; > + }; > + > + port { > + panel_in: endpoint { > + remote-endpoint = <&bridge_out>; > + }; > + }; > + }; > +}; > + > +&i2c3 { > + touchscreen: synaptics-rmi4-i2c@20 { touchscreen@20 > + compatible = "syna,rmi4-i2c"; > + reg = <0x20>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + interrupt-parent = <&gpio2>; > + interrupts = <14 IRQ_TYPE_EDGE_FALLING>; > + > + pinctrl-names = "default"; > + pinctrl-0 = <&touch_pins>; > + > + avdd-supply = <®_touch_ldo_en>; not known in schema > + vdd-supply = <&ldo6>; > + > + syna,reset-delay-ms = <200>; > + syna,startup-delay-ms = <200>; > + > + touchscreen-size-x = <1279>; Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml: horizontal resolution of touchscreen (maximum x coordinate reported + 1) So this touchscreen reports max 1278? > + touchscreen-size-y = <799>; same question. And these things belong below rm4-f11 according to Documentation/devicetree/bindings/input/syna,rmi4.yaml Regards, Andreas
> > +&i2c3 { > > + touchscreen: synaptics-rmi4-i2c@20 { > > touchscreen@20 Fixed, generic node names right! > > + avdd-supply = <®_touch_ldo_en>; > not known in schema I cannot seem to find the "vio-supply" shown in the bindings. There is only mention of avdd-supply and vdd-supply. I am not sure if avdd and vio are equivalent, hence the confusion. What should be the solution here? > Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml: > horizontal resolution of touchscreen (maximum x coordinate reported + 1) > So this touchscreen reports max 1278? Fixed it as well, 1280 and 800 respectively. https://github.com/Unlegacy-Android/android_kernel_ti_omap4/blob/3.4/common/arch/arm/mach-omap2/board-espresso-input.c#L264 > And these things belong below rm4-f11 according to > Documentation/devicetree/bindings/input/syna,rmi4.yaml I did not quite understand what you mean by this. I checked the bindings and a few examples, there is nothing "below" rmi4-f11. Best Regards, Mithil
Am Sat, 23 Nov 2024 17:52:58 +0000 schrieb Mithil Bavishi <bavishimithil@gmail.com>: > > > +&i2c3 { > > > + touchscreen: synaptics-rmi4-i2c@20 { > > > > touchscreen@20 > Fixed, generic node names right! > > > > + avdd-supply = <®_touch_ldo_en>; > > not known in schema > I cannot seem to find the "vio-supply" shown in the bindings. There is > only mention of avdd-supply and vdd-supply. I am not sure if avdd and > vio are equivalent, hence the confusion. > What should be the solution here? > well, look at the schematics and see how it is wired ;-) Without schematic, it is a bit tricky. So you can look how it is used. vdd-supply sounds like something to make the chip fully functional. vio-supply seems to be for the io lines. As the vendor kernel seem to set i2c to gpio mode, so probably because the vio-supply is powered down according to the board file you posted. So it might be vio-supply only or vio and vdd-supply combined. In any case document what you have seen in the vendor kernel. > > Documentation/devicetree/bindings/input/touchscreen/touchscreen.yaml: > > horizontal resolution of touchscreen (maximum x coordinate reported + 1) > > > So this touchscreen reports max 1278? > > Fixed it as well, 1280 and 800 respectively. > https://github.com/Unlegacy-Android/android_kernel_ti_omap4/blob/3.4/common/arch/arm/mach-omap2/board-espresso-input.c#L264 > > > And these things belong below rm4-f11 according to > > Documentation/devicetree/bindings/input/syna,rmi4.yaml > > I did not quite understand what you mean by this. I checked the bindings > and a few examples, there is nothing "below" rmi4-f11. > this part of the binding description patternProperties: "^rmi4-f1[12]@1[12]$": type: object unevaluatedProperties: false $ref: /schemas/input/touchscreen/touchscreen.yaml# description: basically says that standard touchscreen properties are accepted below rmi4-f11. In the example you have: rmi4-f11@11 { reg = <0x11>; touchscreen-inverted-y; syna,sensor-type = <2>; }; Regards, Andreas
> well, look at the schematics and see how it is wired ;-) Schematic mentions vddtx, vdda, vdd and vbus, so unsure about that. VDDTX is the one with 2.8V, VDD and VBUS are at 1.8V and VDDA is grounded, it just gets the input from GDNA from the same touch sensor. > As the vendor kernel seem to > set i2c to gpio mode, so probably because the vio-supply is powered > down according to the board file you posted. > So it might be vio-supply only or vio and vdd-supply combined. > In any case document what you have seen in the vendor kernel. https://github.com/Unlegacy-Android/android_kernel_ti_omap4/blob/3.4/common/arch/arm/mach-omap2/board-espresso-input.c This just makes it more confusing. Very confused on what is what now xD. reg_touch_ldo_en is 2.8V which goes to VDDTX, it is gpmc_nwp.gpio_54 - TSP_LDO_ON ldo6 is 1.8V presumably ldo6 (VAP_IO_1.8V) which goes to VDD, VBUS. > basically says that standard touchscreen properties are accepted below > rmi4-f11. But we do not use any of those properties. If you're talking about the touchscreen-size-x/y, even in the examples those are out of rmi4-f11, in the parent node. Best Regards, Mithil
Am Sat, 23 Nov 2024 19:26:33 +0000 schrieb Mithil Bavishi <bavishimithil@gmail.com>: > > well, look at the schematics and see how it is wired ;-) > > Schematic mentions vddtx, vdda, vdd and vbus, so unsure about that. > VDDTX is the one with 2.8V, VDD and VBUS are at 1.8V and VDDA is grounded, > it just gets the input from GDNA from the same touch sensor. > > > As the vendor kernel seem to > > set i2c to gpio mode, so probably because the vio-supply is powered > > down according to the board file you posted. > > So it might be vio-supply only or vio and vdd-supply combined. > > In any case document what you have seen in the vendor kernel. > > https://github.com/Unlegacy-Android/android_kernel_ti_omap4/blob/3.4/common/arch/arm/mach-omap2/board-espresso-input.c > This just makes it more confusing. Very confused on what is what now xD. > reg_touch_ldo_en is 2.8V which goes to VDDTX, it is gpmc_nwp.gpio_54 - TSP_LDO_ON > ldo6 is 1.8V presumably ldo6 (VAP_IO_1.8V) which goes to VDD, VBUS. > well, I think I2C bus runs at 1.8V, and there is IO_1.8V in the name, so vio-supply should be something at 1.8V, so probably ldo6 is vio-supply. Maybe add a remark in the comments. But then it might be not a good idea to turn that off in suspend. if the other regulator is kept on. > > basically says that standard touchscreen properties are accepted below > > rmi4-f11. > > But we do not use any of those properties. If you're talking about the > touchscreen-size-x/y, even in the examples those are out of rmi4-f11, in > the parent node. > Where do you see those examples? Here touchscreen-invert-y is below rmi4-f11. https://elixir.bootlin.com/linux/v6.12/source/Documentation/devicetree/bindings/input/syna,rmi4.yaml#L269 We have also the warning from dtbs_check: arch/arm/boot/dts/ti/omap/omap4-samsung-espresso10.dtb: synaptics-rmi4-i2c@20: Unevaluated properties are not allowed ('avdd-supply', 'touchscreen-size-x', 'touchscreen-size-y' were unexpected) Regards, Andreas
> well, I think I2C bus runs at 1.8V, and there is IO_1.8V in the name, > so vio-supply should be something at 1.8V, so probably ldo6 is > vio-supply. Maybe add a remark in the comments. But then it might be > not a good idea to turn that off in suspend. if the other regulator is > kept on. But we are not sure if it is the same, also I personally cannot test it since I own the 7 inch version. Let's remove avdd supply for now and see if someone with 10 inch version can test it again later. This is better than putting potentially incorrect information. > We have also the warning from dtbs_check: > arch/arm/boot/dts/ti/omap/omap4-samsung-espresso10.dtb: > synaptics-rmi4-i2c@20: Unevaluated properties are not allowed > ('avdd-supply', 'touchscreen-size-x', 'touchscreen-size-y' were > unexpected) Ah, indeed. I missed it, will fix it as you've mentioned. Best Regards, Mithil
diff --git a/arch/arm/boot/dts/ti/omap/omap4-samsung-espresso10.dts b/arch/arm/boot/dts/ti/omap/omap4-samsung-espresso10.dts new file mode 100644 index 000000000..70bbef468 --- /dev/null +++ b/arch/arm/boot/dts/ti/omap/omap4-samsung-espresso10.dts @@ -0,0 +1,102 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/dts-v1/; + +#include "omap4-samsung-espresso-common.dtsi" +#include <dt-bindings/power/summit,smb347-charger.h> +/ { + model = "Samsung Galaxy Tab 2 (10 inch)"; + compatible = "samsung,espresso10", "ti,omap4430", "ti,omap4"; + + i2c-gpio-5 { + smb347: charger@6 { + compatible = "summit,smb347"; + reg = <0x6>; // 0x0C >> 1 + interrupt-parent = <&gpio2>; + interrupts = <0 IRQ_TYPE_EDGE_BOTH>; + + summit,enable-usb-charging; + summit,enable-charge-control = <SMB3XX_CHG_ENABLE_SW>; + summit,chip-temperature-threshold-celsius = <120>; + summit,usb-current-limit-microamp = <1800000>; + }; + }; + + backlight: backlight { + compatible = "pwm-backlight"; + pinctrl-names = "default"; + pinctrl-0 = <&backlight_pins>; + pwms = <&pwm10 0 1600 0>; + power-supply = <®_lcd>; + enable-gpios = <&gpio3 31 GPIO_ACTIVE_HIGH>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <7>; + }; + + panel { + compatible = "samsung,ltn101al03", "panel-lvds"; + power-supply = <®_lcd>; + width-mm = <223>; + height-mm = <125>; + data-mapping = "vesa-24"; + backlight = <&backlight>; + + panel-timing { + clock-frequency = <69818000>; + + hback-porch = <64>; + hactive = <1280>; + hfront-porch = <16>; + hsync-len = <48>; + + vback-porch = <11>; + vactive = <800>; + vfront-porch = <16>; + vsync-len = <3>; + + hsync-active = <0>; + vsync-active = <0>; + de-active = <1>; + pixelclk-active = <1>; + }; + + port { + panel_in: endpoint { + remote-endpoint = <&bridge_out>; + }; + }; + }; +}; + +&i2c3 { + touchscreen: synaptics-rmi4-i2c@20 { + compatible = "syna,rmi4-i2c"; + reg = <0x20>; + #address-cells = <1>; + #size-cells = <0>; + + interrupt-parent = <&gpio2>; + interrupts = <14 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-names = "default"; + pinctrl-0 = <&touch_pins>; + + avdd-supply = <®_touch_ldo_en>; + vdd-supply = <&ldo6>; + + syna,reset-delay-ms = <200>; + syna,startup-delay-ms = <200>; + + touchscreen-size-x = <1279>; + touchscreen-size-y = <799>; + + rmi4-f01@1 { + reg = <0x01>; + syna,nosleep-mode = <1>; + }; + + rmi4-f11@11 { + reg = <0x11>; + syna,sensor-type = <1>; + }; + }; +};
Create a device tree for the 10 inch variants (P5100, P5110, P5113) Signed-off-by: Mithil Bavishi <bavishimithil@gmail.com> --- .../dts/ti/omap/omap4-samsung-espresso10.dts | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 arch/arm/boot/dts/ti/omap/omap4-samsung-espresso10.dts