Re: [PATCH] i2c: pasemi: split driver into two separate modules

2024-02-13 Thread Sven Peter
built-in or a loadable driver. > > Fixes: 9bc5f4f660ff ("i2c: pasemi: Split pci driver to its own file") > Signed-off-by: Arnd Bergmann > --- Reviewed-by: Sven Peter thanks, totally forgot about this! Sven > drivers/i2c/busses/Makefile | 6 ++ > drivers/i2c/bus

Re: [PATCH v2 0/9] iommu: Convert dart & iommufd to the new domain_alloc_paging()

2023-10-26 Thread Sven Peter
and this all looks good to me. Given that Janne already reviewed it in detail: Acked-by: Sven Peter Thanks, Sven > Regards, > >Joerg

Re: [PATCH v4] i2c/pasemi: PASemi I2C controller IRQ enablement

2022-11-06 Thread Sven Peter
ransactions. > > Signed-off-by: Arminder Singh Thanks for following up on this! This looks good to me now. Reviewed-by: Sven Peter Best, Sven

Re: [PATCH v3] i2c/pasemi: PASemi I2C controller IRQ enablement

2022-10-08 Thread Sven Peter
Hi, > On 7. Oct 2022, at 02:43, Arminder Singh wrote: > > This patch adds IRQ support to the PASemi I2C controller driver to > increase the performace of I2C transactions on platforms with PASemi I2C > controllers. While primarily intended for Apple silicon platforms, this > patch should

Re: [PATCH v2] i2c-pasemi: PASemi I2C controller IRQ enablement

2022-10-02 Thread Sven Peter
Hi, On Sun, Oct 2, 2022, at 16:07, Arminder Singh wrote: > Hi, > >> #define REG_MTXFIFO 0x00 >> #define REG_MRXFIFO 0x04 >> #define REG_SMSTA 0x14 >> +#define REG_IMASK 0x18 > >> This doesn't seem to be aligned correctly, this file seems to use a tab >> to separate the register name and

Re: [PATCH v2] i2c/pasemi: PASemi I2C controller IRQ enablement

2022-10-02 Thread Sven Peter
Hi, Looks almost good to me, just a few minor things: On Sun, Oct 2, 2022, at 00:25, Arminder Singh wrote: > Hello, > > This is v2 of the PASemi I2C controller IRQ enablement patch. This shouldn't be inside the commit description. > > This patch adds IRQ support to the PASemi I2C controller

Re: [PATCH] i2c: pasemi: Add IRQ support for Apple Silicon

2022-08-21 Thread Sven Peter
Hi, Thanks for the patch! Some additional comments: On Sat, Aug 20, 2022, at 21:45, Arminder Singh wrote: > This is the first time I'm interacting with the Linux mailing lists, so > please don't eviscerate me *too much* if I get the formatting wrong. > Of course I'm always willing to take

Re: [PATCH v2 00/11] Add Apple M1 support to PASemi i2c driver

2021-10-10 Thread Sven Peter
On Sat, Oct 9, 2021, at 15:57, Christian Zigotzky wrote: > On 09 October 2021 at 12:10 pm, Wolfram Sang wrote: >>> I still don't have access to any old PASemi hardware but the changes from >>> v1 are pretty small and I expect them to still work. Would still be nice >>> if someone with access to

Re: [PATCH v2 00/11] Add Apple M1 support to PASemi i2c driver

2021-10-09 Thread Sven Peter
On Sat, Oct 9, 2021, at 12:10, Wolfram Sang wrote: >> I still don't have access to any old PASemi hardware but the changes from >> v1 are pretty small and I expect them to still work. Would still be nice >> if someone with access to such hardware could give this a quick test. > > Looks good to me.

Re: [PATCH v2 10/11] i2c: pasemi: Add Apple platform driver

2021-10-09 Thread Sven Peter
On Sat, Oct 9, 2021, at 12:09, Wolfram Sang wrote: >> F: arch/arm64/boot/dts/apple/ >> +F: drivers/i2c/busses/i2c-pasemi-platform.c > > We have no dedicated maintainer for PASEMI. Are maybe you or your > project interested in maintaining the pasemi-core, too? I guess not many > patches will

[PATCH v2 11/11] i2c: pasemi: Set enable bit for Apple variant

2021-10-08 Thread Sven Peter
Some later revisions after the original PASemi I2C controller introduce what likely is an enable bit to the CTL register. Without setting it the actual i2c transmission is never started. Reviewed-by: Arnd Bergmann Signed-off-by: Sven Peter --- v1 -> v2: no changes drivers/i2c/busses/

[PATCH v2 10/11] i2c: pasemi: Add Apple platform driver

2021-10-08 Thread Sven Peter
With all the previous preparations we can now finally add the platform driver to support the PASemi-based controllers in Apple SoCs. This does not work on the M1 yet but should work on the early iPhones already. Reviewed-by: Arnd Bergmann Signed-off-by: Sven Peter --- v1 -> v2: - renamed

[PATCH v2 09/11] i2c: pasemi: Refactor _probe to use devm_*

2021-10-08 Thread Sven Peter
Using managed device resources means there's nothing left to be done in pasemi_smb_pci_remove and also allows to remove base and size from struct pasemi_smbus. Reviewed-by: Arnd Bergmann Signed-off-by: Sven Peter --- v1 -> v2: no changes drivers/i2c/busses/i2c-pasemi-core.c |

[PATCH v2 08/11] i2c: pasemi: Allow to configure bus frequency

2021-10-08 Thread Sven Peter
Right now the bus frequency has always been hardcoded as 100 KHz with the specific reference clock used in the PASemi PCI controllers. Make this configurable to prepare for the platform driver. Reviewed-by: Arnd Bergmann Signed-off-by: Sven Peter --- v1 -> v2: no changes drivers/i2c/bus

[PATCH v2 07/11] i2c: pasemi: Move common reset code to own function

2021-10-08 Thread Sven Peter
Split out common reset call to its own function so that we can later add support for selecting the clock frequency and an additional enable bit found in newer revisions. Reviewed-by: Arnd Bergmann Signed-off-by: Sven Peter --- v1 -> v2: no changes drivers/i2c/busses/i2c-pasemi-core.c |

[PATCH v2 06/11] i2c: pasemi: Split pci driver to its own file

2021-10-08 Thread Sven Peter
Split off the PCI driver so that we can reuse common code for the platform driver. Reviewed-by: Arnd Bergmann Signed-off-by: Sven Peter --- v1 -> v2: no changes drivers/i2c/busses/Makefile | 1 + .../{i2c-pasemi.c => i2c-pasemi-core.c} | 88 + d

[PATCH v2 05/11] i2c: pasemi: Split off common probing code

2021-10-08 Thread Sven Peter
Split off common probing code that will be used by both the PCI and the platform device. Reviewed-by: Arnd Bergmann Signed-off-by: Sven Peter --- v1 -> v2: no changes drivers/i2c/busses/i2c-pasemi.c | 39 + 1 file changed, 25 insertions(+), 14 deleti

[PATCH v2 04/11] i2c: pasemi: Remove usage of pci_dev

2021-10-08 Thread Sven Peter
Prepare to create a platform driver by removing all usages of pci_dev we can. Reviewed-by: Arnd Bergmann Signed-off-by: Sven Peter --- v1 -> v2: no changes drivers/i2c/busses/i2c-pasemi.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/

[PATCH v2 03/11] i2c: pasemi: Use dev_name instead of port number

2021-10-08 Thread Sven Peter
Right now the i2c adapter name includes the port number which can indirectly be used to identify the device. Replace that with dev_name to directly identify the device and to also allow this to work correctly once we add platform support. Signed-off-by: Sven Peter --- v1 -> v2: new com

[PATCH v2 02/11] i2c: pasemi: Use io{read,write}32

2021-10-08 Thread Sven Peter
In preparation for splitting this driver up into a platform_driver and a pci_driver, replace outl/inl usage with pci_iomap and ioread32/iowrite32. Reviewed-by: Arnd Bergmann Signed-off-by: Sven Peter --- v1 -> v2: replaced ioport_map with pci_iomap drivers/i2c/busses/i2c-pasemi.c |

[PATCH v2 01/11] dt-bindings: i2c: Add Apple I2C controller bindings

2021-10-08 Thread Sven Peter
The Apple I2C controller is based on the PASemi I2C controller. It is present on Apple SoCs such as the M1. Reviewed-by: Arnd Bergmann Reviewed-by: Rob Herring Signed-off-by: Sven Peter --- v1 -> v2: no changes .../devicetree/bindings/i2c/apple,i2c.yaml|

[PATCH v2 00/11] Add Apple M1 support to PASemi i2c driver

2021-10-08 Thread Sven Peter
the octeon (mips)/thunderx(arm64) approach to do the split: I created a -core.c file which contains the shared logic and just compile that one for both the PASemi and the new Apple driver. Best, Sven Sven Peter (11): dt-bindings: i2c: Add Apple I2C controller bindings i2c: pasemi: Use io

Re: Add Apple M1 support to PASemi i2c driver

2021-10-04 Thread Sven Peter
On Mon, Oct 4, 2021, at 13:20, Arnd Bergmann wrote: > On Mon, Oct 4, 2021 at 11:55 AM Wolfram Sang wrote: >> >> >> > i2c-8 i2c PA Semi SMBus adapter at 0x(ptrval) I2C >> > adapter >> > i2c-9 i2c PA Semi SMBus adapter at 0x(ptrval) I2C >> >

Re: [PATCH 09/10] i2c: pasemi: Add Apple platform driver

2021-10-03 Thread Sven Peter
On Wed, Sep 29, 2021, at 22:33, Wolfram Sang wrote: >> drivers/i2c/busses/i2c-pasemi-apple.c | 122 ++ > > Can't we name it 'i2c-pasemi-platform.c' instead? Makes more sense to me > because the other instance is named -pci. Sure, that's more consistent. I'll change the

Re: Add Apple M1 support to PASemi i2c driver

2021-10-03 Thread Sven Peter
Hi, On Fri, Oct 1, 2021, at 06:47, Christian Zigotzky wrote: > On 27 September 2021 at 07:39 am, Sven Peter wrote: > > Hi Christian, > > > > Thanks already for volunteering to test this! > > > Hello Sven, > > Damian (Hypex) has successfully tested the RC3

Re: [PATCH 02/10] i2c: pasemi: Use io{read,write}32

2021-09-28 Thread Sven Peter
On Mon, Sep 27, 2021, at 09:39, Arnd Bergmann wrote: > On Sun, Sep 26, 2021 at 12:00 PM Sven Peter wrote: >> >> In preparation for splitting this driver up into a platform_driver >> and a pci_driver, replace outl/inl usage with ioport_map and >> ioread32/iowrite32. >

Re: Add Apple M1 support to PASemi i2c driver

2021-09-27 Thread Sven Peter
Hi Christian, Thanks already for volunteering to test this! On Sun, Sep 26, 2021, at 22:27, Christian Zigotzky wrote: > Hi Sven, > > I can't apply your patch 5 (i2c: pasemi: Split pci driver to its own > file). [1] That's strange because it should apply cleanly. I'll double check after to work

[PATCH 01/10] dt-bindings: i2c: Add Apple I2C controller bindings

2021-09-26 Thread Sven Peter
The Apple I2C controller is based on the PASemi I2C controller. It is present on Apple SoCs such as the M1. Signed-off-by: Sven Peter --- .../devicetree/bindings/i2c/apple,i2c.yaml| 61 +++ MAINTAINERS | 1 + 2 files changed, 62 insertions

[PATCH 07/10] i2c: pasemi: Allow to configure bus frequency

2021-09-26 Thread Sven Peter
Right now the bus frequency has always been hardcoded as 100 KHz with the specific reference clock used in the PASemi PCI controllers. Make this configurable to prepare for the platform driver. Signed-off-by: Sven Peter --- drivers/i2c/busses/i2c-pasemi-core.c | 8 +++- drivers/i2c/busses

[PATCH 03/10] i2c: pasemi: Remove usage of pci_dev

2021-09-26 Thread Sven Peter
Prepare to create a platform driver by removing all usages of pci_dev we can. Signed-off-by: Sven Peter --- drivers/i2c/busses/i2c-pasemi.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/i2c-pasemi.c b/drivers/i2c/busses/i2c-pasemi.c index

[PATCH 02/10] i2c: pasemi: Use io{read,write}32

2021-09-26 Thread Sven Peter
In preparation for splitting this driver up into a platform_driver and a pci_driver, replace outl/inl usage with ioport_map and ioread32/iowrite32. Signed-off-by: Sven Peter --- drivers/i2c/busses/i2c-pasemi.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git

[PATCH 04/10] i2c: pasemi: Split off common probing code

2021-09-26 Thread Sven Peter
Split off common probing code that will be used by both the PCI and the platform device. Signed-off-by: Sven Peter --- drivers/i2c/busses/i2c-pasemi.c | 39 + 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/drivers/i2c/busses/i2c-pasemi.c b

[PATCH 08/10] i2c: pasemi: Refactor _probe to use devm_*

2021-09-26 Thread Sven Peter
Using managed device resources means there's nothing left to be done in pasemi_smb_pci_remove and also allows to remove base and size from struct pasemi_smbus. Signed-off-by: Sven Peter --- drivers/i2c/busses/i2c-pasemi-core.c | 10 +++ drivers/i2c/busses/i2c-pasemi-core.h | 2 -- drivers

[PATCH 09/10] i2c: pasemi: Add Apple platform driver

2021-09-26 Thread Sven Peter
With all the previous preparations we can now finally add the platform driver to support the PASemi-based controllers in Apple SoCs. This does not work on the M1 yet but should work on the early iPhones already. Signed-off-by: Sven Peter --- MAINTAINERS | 1

[PATCH 05/10] i2c: pasemi: Split pci driver to its own file

2021-09-26 Thread Sven Peter
Split off the PCI driver so that we can reuse common code for the platform driver. Signed-off-by: Sven Peter --- drivers/i2c/busses/Makefile | 1 + .../{i2c-pasemi.c => i2c-pasemi-core.c} | 88 + drivers/i2c/busses/i2c-pasemi-core.h |

[PATCH 10/10] i2c: pasemi: Set enable bit for Apple variant

2021-09-26 Thread Sven Peter
Some later revisions after the original PASemi I2C controller introduce what likely is an enable bit to the CTL register. Without setting it the actual i2c transmission is never started. Signed-off-by: Sven Peter --- drivers/i2c/busses/i2c-pasemi-core.c | 8 drivers/i2c/busses/i2c

[PATCH 06/10] i2c: pasemi: Move common reset code to own function

2021-09-26 Thread Sven Peter
Split out common reset call to its own function so that we can later add support for selecting the clock frequency and an additional enable bit found in newer revisions. Signed-off-by: Sven Peter --- drivers/i2c/busses/i2c-pasemi-core.c | 15 +-- 1 file changed, 9 insertions(+), 6

[PATCH 00/10] Add Apple M1 support to PASemi i2c driver

2021-09-26 Thread Sven Peter
might still have an old machine on which he could test this. I'd very much appreciate if he (or anyone else for that matter :-)) could give this series a quick test on the old PASemi machines. Best, Sven Sven Peter (10): dt-bindings: i2c: Add Apple I2C controller bindings i2c: pasemi: Use io