Add support for Asus Portable AiO P1801-T#123
Conversation
Signed-off-by: Maxim Schwalm <maxim.schwalm@gmail.com>
Signed-off-by: Maxim Schwalm <maxim.schwalm@gmail.com>
Signed-off-by: Maxim Schwalm <maxim.schwalm@gmail.com>
Signed-off-by: Maxim Schwalm <maxim.schwalm@gmail.com>
Signed-off-by: Maxim Schwalm <maxim.schwalm@gmail.com>
Signed-off-by: Maxim Schwalm <maxim.schwalm@gmail.com>
|
Thanks @maximschwalm. I'm going to review this over the weekend. |
|
|
||
| if (data->reset_gpio) { | ||
| msleep(1); | ||
| gpiod_set_value(data->reset_gpio, 0); |
There was a problem hiding this comment.
Usually reset should de-asserted after power is stable.
There was a problem hiding this comment.
The sequence is from here. Should I still move it around? BTW, the reset sequence of the sis_i2c driver seems to be kind of similiar but it goes from low to high to low. Is it more correct? Besides, the downstream kernel has a "tp_vendor" GPIO. Is there a use case for it? Thanks.
There was a problem hiding this comment.
Could be that h/w auto-resets on power-on, datasheet is needed.
I think you should add GPIO hog for the "tp_vendor", probably it's an electrical requirement.
| /* low: tablet, high: dock */ | ||
| hpd-gpios = <&gpio TEGRA_GPIO(H, 4) GPIO_ACTIVE_LOW>; | ||
| ddc-i2c-bus = <&i2c4>; | ||
| ddc-en-gpios = <&gpio TEGRA_GPIO(H, 3) GPIO_ACTIVE_HIGH>; |
There was a problem hiding this comment.
I realized that the display-connector driver has no support for this GPIO, so this doesn't do anything. It might also be an enable GPIO for the bridge, but when I set it as such I don't get display output:
drm drm: [drm] Cannot find any crtc or sizes
Then it falls back to 1024x768 mode and I just see the backlight.
There was a problem hiding this comment.
@maximschwalm Will you you be able to clarify that GPIO?
There was a problem hiding this comment.
The GPIO is referred to as EN_VDD_BL also scalar_enable in the P1802 kernel. If I manually toggle the GPIO via sysfs, I can power on/off the display. BTW, the screen shows a text when powering on, saying "Pad Mode" for a second.
There was a problem hiding this comment.
this sounds like the same as using the magic button . if i press it when docked i get the text : "dock mode" and "pad mode" when pressed again. if the pad is undocked the button wont work. when you toggle it you maybe putting the pad i "docked mode"
|
@digetx may you remove transformers branch? Those changes are in mainline already |
|
Removed |
drivers/usb/misc/usb_pwrseq.c
Outdated
| if (!data) | ||
| return -ENOMEM; | ||
|
|
||
| data->reset_gpio = devm_gpiod_get_optional(dev,"reset", GPIOD_OUT_HIGH); |
There was a problem hiding this comment.
Nit: whitespace is missing after (dev,
There was a problem hiding this comment.
@maximschwalm Are you going to push update anytime soon? If not, then I can merge what we have now and we'll continue with a new PRs.
There was a problem hiding this comment.
I applied your suggestions except for changing the power sequence of the USB device. Is it good to go then?
Add a device-tree for the Asus Portable AiO P1801-T, which is a NVIDIA Tegra30-based 2-in-1 detachable tablet, originally running Android. The tablet was also sold together with a PC docking station as the Transformer AiO P1801. Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # P1801-T w/ dock Co-developed-by: Maxim Schwalm <maxim.schwalm@gmail.com> Signed-off-by: Maxim Schwalm <maxim.schwalm@gmail.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Maxim Schwalm <maxim.schwalm@gmail.com>
Signed-off-by: Maxim Schwalm <maxim.schwalm@gmail.com>
Signed-off-by: Maxim Schwalm <maxim.schwalm@gmail.com>
Signed-off-by: Maxim Schwalm <maxim.schwalm@gmail.com>
Like commit 1cf3bfc ("bpf: Support 64-bit pointers to kfuncs") for s390x, add support for 64-bit pointers to kfuncs for LoongArch. Since the infrastructure is already implemented in BPF core, the only thing need to be done is to override bpf_jit_supports_far_kfunc_call(). Before this change, several test_verifier tests failed: # ./test_verifier | grep # | grep FAIL grate-driver#119/p calls: invalid kfunc call: ptr_to_mem to struct with non-scalar FAIL grate-driver#120/p calls: invalid kfunc call: ptr_to_mem to struct with nesting depth > 4 FAIL grate-driver#121/p calls: invalid kfunc call: ptr_to_mem to struct with FAM FAIL grate-driver#122/p calls: invalid kfunc call: reg->type != PTR_TO_CTX FAIL grate-driver#123/p calls: invalid kfunc call: void * not allowed in func proto without mem size arg FAIL grate-driver#124/p calls: trigger reg2btf_ids[reg->type] for reg->type > __BPF_REG_TYPE_MAX FAIL grate-driver#125/p calls: invalid kfunc call: reg->off must be zero when passed to release kfunc FAIL grate-driver#126/p calls: invalid kfunc call: don't match first member type when passed to release kfunc FAIL grate-driver#127/p calls: invalid kfunc call: PTR_TO_BTF_ID with negative offset FAIL grate-driver#128/p calls: invalid kfunc call: PTR_TO_BTF_ID with variable offset FAIL grate-driver#129/p calls: invalid kfunc call: referenced arg needs refcounted PTR_TO_BTF_ID FAIL grate-driver#130/p calls: valid kfunc call: referenced arg needs refcounted PTR_TO_BTF_ID FAIL #486/p map_kptr: ref: reference state created and released on xchg FAIL This is because the kfuncs in the loaded module are far away from __bpf_call_base: ffff800002009440 t bpf_kfunc_call_test_fail1 [bpf_testmod] 9000000002e128d8 T __bpf_call_base The offset relative to __bpf_call_base does NOT fit in s32, which breaks the assumption in BPF core. Enable bpf_jit_supports_far_kfunc_call() lifts this limit. Note that to reproduce the above result, tools/testing/selftests/bpf/config should be applied, and run the test with JIT enabled, unpriv BPF enabled. With this change, the test_verifier tests now all passed: # ./test_verifier ... Summary: 777 PASSED, 0 SKIPPED, 0 FAILED Tested-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
No description provided.