-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panel driver for both clover variants unified #41
Panel driver for both clover variants unified #41
Conversation
there are probably no variations of functions on pmic gpio, so setting function is redundant. I'll recheck EDIT: there are variations |
lcd_pwr_en_default: lcd-pwr-en-default-state { | ||
pins = "gpio5"; | ||
function = "gpio"; | ||
bias-disable; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's hard to find documentation sometimes, but for pmic GPIOs valid function names are documented here https://elixir.bootlin.com/linux/v6.11/source/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.yaml#L500
and also as CI check-dtbs says
gpio' is not one of ['normal', 'paired', 'func1', 'func2', 'dtest1', 'dtest2', 'dtest3', 'dtest4', 'func3', 'func4']
from schema $id: http://devicetree.org/schemas/mfd/qcom,spmi-pmic.yaml#
/home/runner/work/linux/linux/build-dtbs-check/arch/arm64/boot/dts/qcom/sdm660-xiaomi-clover-plus.dtb: gpio@c000: lcd-pwr-en-default-state: 'oneOf' conditional failed, one must be fixed:
'bias-disable', 'function', 'pins' do not match any of the regexes: '(pinconf|-pins)$', 'pinctrl-[0-9]+'
'gpio' is not one of ['normal', 'paired', 'func1', 'func2', 'dtest1', 'dtest2', 'dtest3', 'dtest4', 'func3', 'func4']
from schema $id: http://devicetree.org/schemas/pinctrl/qcom,pmic-gpio.yaml#
so at least "function" should be changed to "normal" I guess
Valid names for functions are also here: https://elixir.bootlin.com/linux/v6.11/source/include/dt-bindings/pinctrl/qcom,pmic-gpio.h#L98
Add driver for BOE NT51021-based 8-inch and 10-inch DSI video mode panels used in Xiaomi Mi Pad 4 and Mi Pad 4 Plus (xiaomi-clover) tablets. Both panels are very similar, deferences are only in init sequence and resolution. Co-Developed-by: Nickolay Goppen <[email protected]> Signed-off-by: Nickolay Goppen <[email protected]> Co-Developed-by: Alexey Minnekhanov <[email protected]> Signed-off-by: Alexey Minnekhanov <[email protected]>
Add fixed gpio-regulator used as panel avdd-supply for both clover variants. Enable adreno_gpu, mdss. Rename tlmm pins: * mdss_dsi_active -> mdss_dsi_reset; * mdss_te_active -> mdss_vsync_active. Signed-off-by: Nickolay Goppen <[email protected]>
Enable mdss_dsi0, dis0 phy and add panel node. Signed-off-by: Nickolay Goppen <[email protected]>
Enable mdss_dsi0, dsi phy and describe panel. Enable and configure wled which is used as backlight. Signed-off-by: Alexey Minnekhanov <[email protected]>
panel modules for clover and clover-plus
b2b1d6b
to
0f2cd9c
Compare
This works very well now. I like how one panel driver can handle both variants - less headache with which modules to include into initramfs for which device variant, etc. Most other drivers also do this for various panels on single controller, so I think this is completely fine and upstreamable solution. |
Both drivers are based on the same controller and are so similar that only init sequence is different (and even that is very similar). And of course panel resolution and physical size + timings differ too. So it is very easy to have both panels supported in a single driver.
dmesg with this booting: https://paste.sr.ht/~minlexx/07061611fd322e727c021d386b5648cee38af1c5