From: André Draszik <andre.draszik@linaro.org> Date: 2024-11-27 11:01:41
Hi,
This series adds and enables the Maxim MAX77759 TCPCI for Google Pixel
6 (Oriole).
It relies on the bindings update proposed as part of
https://lore.kernel.org/r/20241127-gs101-phy-lanes-orientation-phy-v1-0-1b7fce24960b@linaro.org
With these patches, we allow the usb phy to detect usb cable
orientation, and we make it possible for the USB DWC3 core to enter
runtime suspend upon cable disconnect.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
André Draszik (6):
arm64: defconfig: enable Maxim TCPCI driver
dt-bindings: usb: max33359: add max77759 flavor
arm64: dts: exynos: gs101: phy region for exynos5-usbdrd is larger
arm64: dts: exynos: gs101: enable snps,dis_rxdet_inp3_quirk for DWC3
arm64: dts: exynos: gs101-oriole: enable Maxim max77759 TCPCi
arm64: dts: exynos: gs101-oriole: add pd-disable and typec-power-opmode
.../devicetree/bindings/usb/maxim,max33359.yaml | 8 +-
arch/arm64/boot/dts/exynos/google/gs101-oriole.dts | 104 +++++++++++++++++++++
arch/arm64/boot/dts/exynos/google/gs101.dtsi | 3 +-
arch/arm64/configs/defconfig | 1 +
4 files changed, 113 insertions(+), 3 deletions(-)
---
base-commit: ed9a4ad6e5bd3a443e81446476718abebee47e82
change-id: 20241127-gs101-phy-lanes-orientation-dts-9ace74a2c25c
Best regards,
--
André Draszik [off-list ref]
From: André Draszik <andre.draszik@linaro.org> Date: 2024-11-27 11:01:42
Enable the Maxim max33359 as this is used by the gs101-oriole (Google
Pixel 6) board.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
arch/arm64/configs/defconfig | 1 +
1 file changed, 1 insertion(+)
From: André Draszik <andre.draszik@linaro.org> Date: 2024-11-27 11:01:43
On the surface, Maxim's max77759 appears identical to max33359. It
should still have a dedicated compatible, though, as it is a different
IC. This will allow for handling differences in case they are
discovered in the future.
max77759 is used on Google Pixel 6 and Pixel 6 Pro.
Add a dedicated compatible to allow for potential differences in the
future.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
Documentation/devicetree/bindings/usb/maxim,max33359.yaml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
From: André Draszik <andre.draszik@linaro.org> Date: 2024-11-27 11:01:43
Turns out there are some additional registers in the phy region, update
the DT accordingly.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
arch/arm64/boot/dts/exynos/google/gs101.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: André Draszik <andre.draszik@linaro.org> Date: 2024-11-27 11:01:44
This is required for the DWC3 core to reliably detect the connected
phy's Vbus state.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
arch/arm64/boot/dts/exynos/google/gs101.dtsi | 1 +
1 file changed, 1 insertion(+)
From: André Draszik <andre.draszik@linaro.org> Date: 2024-11-27 11:01:45
When the serial console is enabled, we need to disable power delivery
since serial uses the SBU1/2 pins and appears to confuse the TCPCI,
resulting in endless interrupts.
For now, change the DT such that the serial console continues working.
Note1: We can not have both typec-power-opmode and
new-source-frs-typec-current active at the same time, as otherwise DT
binding checks complain.
Note2: When using a downstream DT, the Pixel boot-loader will modify
the DT accordingly before boot, but for this upstream DT it doesn't
know where to find the TCPCI node. The intention is for this commit to
be reverted once an updated Pixel boot-loader becomes available.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
arch/arm64/boot/dts/exynos/google/gs101-oriole.dts | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
From: André Draszik <andre.draszik@linaro.org> Date: 2024-11-27 11:01:45
On Pixel 6 (and Pro), a max77759 companion PMIC for USB Type-C
applications is used, which contains five functional blocks (at
distinct I2C addresses):
* top
* charger
* fuel gauge
* TCPCi
* GPIO
The TCPCi is required to detect and handle connector orientation in
Pixel's USB PHY driver, and to configure the USB controller's role
(host vs device).
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
arch/arm64/boot/dts/exynos/google/gs101-oriole.dts | 99 ++++++++++++++++++++++
1 file changed, 99 insertions(+)
@@ -142,9 +228,16 @@ &usbdrd31_dwc3 {role-switch-default-mode="peripheral";maximum-speed="super-speed-plus";status="okay";++port{+usbdrd31_dwc3_role_switch:endpoint{+remote-endpoint=<&usbc0_role_sw>;+};+};};&usbdrd31_phy{+orientation-switch;/* TODO: Update these once PMIC is implemented */pll-supply=<®_placeholder>;dvdd-usb20-supply=<®_placeholder>;
On Wed, Nov 27, 2024 at 11:01:40AM +0000, André Draszik wrote:
On the surface, Maxim's max77759 appears identical to max33359. It
should still have a dedicated compatible, though, as it is a different
IC. This will allow for handling differences in case they are
discovered in the future.
max77759 is used on Google Pixel 6 and Pixel 6 Pro.
Add a dedicated compatible to allow for potential differences in the
future.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2024-11-28 08:18:01
On 27/11/2024 12:01, André Draszik wrote:
On the surface, Maxim's max77759 appears identical to max33359. It
should still have a dedicated compatible, though, as it is a different
IC. This will allow for handling differences in case they are
discovered in the future.
max77759 is used on Google Pixel 6 and Pixel 6 Pro.
Add a dedicated compatible to allow for potential differences in the
future.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
This should be sent separately to USB.
Best regards,
Krzysztof
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2024-11-28 08:21:42
On 27/11/2024 12:01, André Draszik wrote:
When the serial console is enabled, we need to disable power delivery
since serial uses the SBU1/2 pins and appears to confuse the TCPCI,
resulting in endless interrupts.
For now, change the DT such that the serial console continues working.
Note1: We can not have both typec-power-opmode and
new-source-frs-typec-current active at the same time, as otherwise DT
binding checks complain.
Note2: When using a downstream DT, the Pixel boot-loader will modify
the DT accordingly before boot, but for this upstream DT it doesn't
know where to find the TCPCI node. The intention is for this commit to
be reverted once an updated Pixel boot-loader becomes available.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
This should be squashed to the previous patch, including also combining
commit messages.
Best regards,
Krzysztof
From: André Draszik <andre.draszik@linaro.org> Date: 2024-11-28 08:34:19
On Thu, 2024-11-28 at 09:21 +0100, Krzysztof Kozlowski wrote:
On 27/11/2024 12:01, André Draszik wrote:
quoted
When the serial console is enabled, we need to disable power delivery
since serial uses the SBU1/2 pins and appears to confuse the TCPCI,
resulting in endless interrupts.
For now, change the DT such that the serial console continues working.
Note1: We can not have both typec-power-opmode and
new-source-frs-typec-current active at the same time, as otherwise DT
binding checks complain.
Note2: When using a downstream DT, the Pixel boot-loader will modify
the DT accordingly before boot, but for this upstream DT it doesn't
know where to find the TCPCI node. The intention is for this commit to
be reverted once an updated Pixel boot-loader becomes available.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
This should be squashed to the previous patch, including also combining
commit messages.
I contemplated that, but I didn't in the end so that it's easy to just
revert this specific patch once the boot loader is updated.
I would prefer to keep them as separate patches for that reason, but will
squash if you still think that's better.
Cheers,
Andre'
From: Krzysztof Kozlowski <krzk@kernel.org> Date: 2024-11-28 08:35:02
On 28/11/2024 09:34, André Draszik wrote:
On Thu, 2024-11-28 at 09:21 +0100, Krzysztof Kozlowski wrote:
quoted
On 27/11/2024 12:01, André Draszik wrote:
quoted
When the serial console is enabled, we need to disable power delivery
since serial uses the SBU1/2 pins and appears to confuse the TCPCI,
resulting in endless interrupts.
For now, change the DT such that the serial console continues working.
Note1: We can not have both typec-power-opmode and
new-source-frs-typec-current active at the same time, as otherwise DT
binding checks complain.
Note2: When using a downstream DT, the Pixel boot-loader will modify
the DT accordingly before boot, but for this upstream DT it doesn't
know where to find the TCPCI node. The intention is for this commit to
be reverted once an updated Pixel boot-loader becomes available.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
This should be squashed to the previous patch, including also combining
commit messages.
I contemplated that, but I didn't in the end so that it's easy to just
revert this specific patch once the boot loader is updated.
I would prefer to keep them as separate patches for that reason, but will
squash if you still think that's better.
From: André Draszik <andre.draszik@linaro.org> Date: 2024-11-28 08:40:06
On Thu, 2024-11-28 at 09:17 +0100, Krzysztof Kozlowski wrote:
On 27/11/2024 12:01, André Draszik wrote:
quoted
On the surface, Maxim's max77759 appears identical to max33359. It
should still have a dedicated compatible, though, as it is a different
IC. This will allow for handling differences in case they are
discovered in the future.
max77759 is used on Google Pixel 6 and Pixel 6 Pro.
Add a dedicated compatible to allow for potential differences in the
future.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
This should be sent separately to USB.
Sorry, it slipped through into this series somehow. Will do.
Thanks
Andre
From: André Draszik <andre.draszik@linaro.org> Date: 2024-11-29 11:24:36
On Wed, 2024-11-27 at 11:01 +0000, André Draszik wrote:
quoted hunk
This is required for the DWC3 core to reliably detect the connected
phy's Vbus state.
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
arch/arm64/boot/dts/exynos/google/gs101.dtsi | 1 +
1 file changed, 1 insertion(+)