All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] ARM: stm32: Re-enable KS8851 on DHCOM
@ 2020-05-26  2:30 Marek Vasut
  2020-05-26  2:30 ` [PATCH 2/5] ARM: stm32: Hog GPIO PF7 high on DHCOR to unlock SPI NOR nWP Marek Vasut
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Marek Vasut @ 2020-05-26  2:30 UTC (permalink / raw)
  To: u-boot

Since the KS8851 driver is now in, enable the Kconfig entry on DHCOM
to make the second ethernet available.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
---
 configs/stm32mp15_dhcom_basic_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/stm32mp15_dhcom_basic_defconfig b/configs/stm32mp15_dhcom_basic_defconfig
index c1c83eb4fc..6106572673 100644
--- a/configs/stm32mp15_dhcom_basic_defconfig
+++ b/configs/stm32mp15_dhcom_basic_defconfig
@@ -101,6 +101,7 @@ CONFIG_SPI_FLASH_MTD=y
 CONFIG_SPL_SPI_FLASH_MTD=y
 CONFIG_DM_ETH=y
 CONFIG_DWC_ETH_QOS=y
+CONFIG_KS8851_MLL=y
 CONFIG_PHY=y
 CONFIG_PHY_STM32_USBPHYC=y
 CONFIG_PINCONF=y
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/5] ARM: stm32: Hog GPIO PF7 high on DHCOR to unlock SPI NOR nWP
  2020-05-26  2:30 [PATCH 1/5] ARM: stm32: Re-enable KS8851 on DHCOM Marek Vasut
@ 2020-05-26  2:30 ` Marek Vasut
  2020-05-27 13:37   ` Patrick DELAUNAY
  2020-05-26  2:30 ` [PATCH 3/5] ARM: dts: stm32: Add alternate pinmux for I2C2 pins Marek Vasut
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Marek Vasut @ 2020-05-26  2:30 UTC (permalink / raw)
  To: u-boot

The SPI NOR nWP line is connected to GPIO PF7 on the SoM,
pull the GPIO line high by default to clear SPI NOR WP.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
---
 arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi | 9 +++++++++
 configs/stm32mp15_dhcor_basic_defconfig    | 1 +
 2 files changed, 10 insertions(+)

diff --git a/arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi b/arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi
index ef730a8322..bd4c2adc35 100644
--- a/arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi
+++ b/arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi
@@ -21,6 +21,15 @@
 	};
 };
 
+&gpiof {
+	snor-nwp {
+		gpio-hog;
+		gpios = <7 0>;
+		output-high;
+		line-name = "spi-nor-nwp";
+	};
+};
+
 &i2c4 {
 	u-boot,dm-pre-reloc;
 };
diff --git a/configs/stm32mp15_dhcor_basic_defconfig b/configs/stm32mp15_dhcor_basic_defconfig
index 7163d0ad1b..249646c449 100644
--- a/configs/stm32mp15_dhcor_basic_defconfig
+++ b/configs/stm32mp15_dhcor_basic_defconfig
@@ -71,6 +71,7 @@ CONFIG_SPL_BLOCK_CACHE=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
 CONFIG_DFU_VIRT=y
+CONFIG_GPIO_HOG=y
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/5] ARM: dts: stm32: Add alternate pinmux for I2C2 pins
  2020-05-26  2:30 [PATCH 1/5] ARM: stm32: Re-enable KS8851 on DHCOM Marek Vasut
  2020-05-26  2:30 ` [PATCH 2/5] ARM: stm32: Hog GPIO PF7 high on DHCOR to unlock SPI NOR nWP Marek Vasut
@ 2020-05-26  2:30 ` Marek Vasut
  2020-05-27 13:38   ` Patrick DELAUNAY
  2020-05-26  2:30 ` [PATCH 4/5] ARM: dts: stm32: Repair I2C2 operation on AV96 Marek Vasut
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Marek Vasut @ 2020-05-26  2:30 UTC (permalink / raw)
  To: u-boot

Add another mux option for I2C2 pins, this is used on AV96 board.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
---
 arch/arm/dts/stm32mp15-pinctrl.dtsi | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm/dts/stm32mp15-pinctrl.dtsi b/arch/arm/dts/stm32mp15-pinctrl.dtsi
index 8d00391978..c385896ebc 100644
--- a/arch/arm/dts/stm32mp15-pinctrl.dtsi
+++ b/arch/arm/dts/stm32mp15-pinctrl.dtsi
@@ -357,6 +357,23 @@
 		};
 	};
 
+	i2c2_pins_c: i2c2-4 {
+		pins {
+			pinmux = <STM32_PINMUX('F', 1, AF4)>, /* I2C2_SCL */
+				 <STM32_PINMUX('H', 5, AF4)>; /* I2C2_SDA */
+			bias-disable;
+			drive-open-drain;
+			slew-rate = <0>;
+		};
+	};
+
+	i2c2_pins_sleep_c: i2c2-5 {
+		pins {
+			pinmux = <STM32_PINMUX('F', 1, ANALOG)>, /* I2C2_SCL */
+				 <STM32_PINMUX('H', 5, ANALOG)>; /* I2C2_SDA */
+		};
+	};
+
 	i2c5_pins_a: i2c5-0 {
 		pins {
 			pinmux = <STM32_PINMUX('A', 11, AF4)>, /* I2C5_SCL */
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 4/5] ARM: dts: stm32: Repair I2C2 operation on AV96
  2020-05-26  2:30 [PATCH 1/5] ARM: stm32: Re-enable KS8851 on DHCOM Marek Vasut
  2020-05-26  2:30 ` [PATCH 2/5] ARM: stm32: Hog GPIO PF7 high on DHCOR to unlock SPI NOR nWP Marek Vasut
  2020-05-26  2:30 ` [PATCH 3/5] ARM: dts: stm32: Add alternate pinmux for I2C2 pins Marek Vasut
@ 2020-05-26  2:30 ` Marek Vasut
  2020-05-27 13:44   ` Patrick DELAUNAY
  2020-05-26  2:30 ` [PATCH 5/5] ARM: dts: stm32: Disable SDR104 mode " Marek Vasut
  2020-05-27 13:34 ` [PATCH 1/5] ARM: stm32: Re-enable KS8851 on DHCOM Patrick DELAUNAY
  4 siblings, 1 reply; 13+ messages in thread
From: Marek Vasut @ 2020-05-26  2:30 UTC (permalink / raw)
  To: u-boot

The I2C2 uses different pinmux on AV96, use correct pinmux and
also add comments about the I2C being present on the "low-speed"
expansion connector X6.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
---
 arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts b/arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts
index 1b0579c8ab..7f2e4b98a7 100644
--- a/arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts
+++ b/arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts
@@ -107,7 +107,7 @@
 	};
 };
 
-&i2c1 {
+&i2c1 {	/* X6 I2C1 */
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c1_pins_b>;
 	i2c-scl-rising-time-ns = <185>;
@@ -117,9 +117,9 @@
 	/delete-property/dma-names;
 };
 
-&i2c2 {
+&i2c2 {	/* X6 I2C2 */
 	pinctrl-names = "default";
-	pinctrl-0 = <&i2c2_pins_b1 &i2c2_pins_b2>;
+	pinctrl-0 = <&i2c2_pins_c>;
 	i2c-scl-rising-time-ns = <185>;
 	i2c-scl-falling-time-ns = <20>;
 	status = "okay";
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 5/5] ARM: dts: stm32: Disable SDR104 mode on AV96
  2020-05-26  2:30 [PATCH 1/5] ARM: stm32: Re-enable KS8851 on DHCOM Marek Vasut
                   ` (2 preceding siblings ...)
  2020-05-26  2:30 ` [PATCH 4/5] ARM: dts: stm32: Repair I2C2 operation on AV96 Marek Vasut
@ 2020-05-26  2:30 ` Marek Vasut
  2020-05-27 13:45   ` Patrick DELAUNAY
  2020-05-27 13:34 ` [PATCH 1/5] ARM: stm32: Re-enable KS8851 on DHCOM Patrick DELAUNAY
  4 siblings, 1 reply; 13+ messages in thread
From: Marek Vasut @ 2020-05-26  2:30 UTC (permalink / raw)
  To: u-boot

Disable SDR104 mode until we know it is really stable.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
---
 arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts b/arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts
index 7f2e4b98a7..c1cc80bcf5 100644
--- a/arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts
+++ b/arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts
@@ -144,7 +144,6 @@
 	st,sig-dir;
 	st,neg-edge;
 	st,use-ckin;
-	sd-uhs-sdr104;
 	bus-width = <4>;
 	vmmc-supply = <&vdd_sd>;
 	vqmmc-supply = <&sd_switch>;
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 1/5] ARM: stm32: Re-enable KS8851 on DHCOM
  2020-05-26  2:30 [PATCH 1/5] ARM: stm32: Re-enable KS8851 on DHCOM Marek Vasut
                   ` (3 preceding siblings ...)
  2020-05-26  2:30 ` [PATCH 5/5] ARM: dts: stm32: Disable SDR104 mode " Marek Vasut
@ 2020-05-27 13:34 ` Patrick DELAUNAY
  4 siblings, 0 replies; 13+ messages in thread
From: Patrick DELAUNAY @ 2020-05-27 13:34 UTC (permalink / raw)
  To: u-boot

Hi Marek,

> From: Marek Vasut <marex@denx.de>
> Sent: mardi 26 mai 2020 04:30
> To: u-boot at lists.denx.de
> 
> Since the KS8851 driver is now in, enable the Kconfig entry on DHCOM to make
> the second ethernet available.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Patrick Delaunay <patrick.delaunay@st.com>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> ---
>  configs/stm32mp15_dhcom_basic_defconfig | 1 +
>  1 file changed, 1 insertion(+)
> 

Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>

Thanks

Patrick

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 2/5] ARM: stm32: Hog GPIO PF7 high on DHCOR to unlock SPI NOR nWP
  2020-05-26  2:30 ` [PATCH 2/5] ARM: stm32: Hog GPIO PF7 high on DHCOR to unlock SPI NOR nWP Marek Vasut
@ 2020-05-27 13:37   ` Patrick DELAUNAY
  0 siblings, 0 replies; 13+ messages in thread
From: Patrick DELAUNAY @ 2020-05-27 13:37 UTC (permalink / raw)
  To: u-boot

Hi Marek,

> From: Marek Vasut <marex@denx.de>
> Sent: mardi 26 mai 2020 04:30
> 
> The SPI NOR nWP line is connected to GPIO PF7 on the SoM, pull the GPIO line
> high by default to clear SPI NOR WP.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Patrick Delaunay <patrick.delaunay@st.com>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> ---
>  arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi | 9 +++++++++
>  configs/stm32mp15_dhcor_basic_defconfig    | 1 +
>  2 files changed, 10 insertions(+)
> 

Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>

Thanks

Patrick

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 3/5] ARM: dts: stm32: Add alternate pinmux for I2C2 pins
  2020-05-26  2:30 ` [PATCH 3/5] ARM: dts: stm32: Add alternate pinmux for I2C2 pins Marek Vasut
@ 2020-05-27 13:38   ` Patrick DELAUNAY
  0 siblings, 0 replies; 13+ messages in thread
From: Patrick DELAUNAY @ 2020-05-27 13:38 UTC (permalink / raw)
  To: u-boot

Hi Marek,

> From: Marek Vasut <marex@denx.de>
> Sent: mardi 26 mai 2020 04:30
> 
> Add another mux option for I2C2 pins, this is used on AV96 board.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Patrick Delaunay <patrick.delaunay@st.com>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> ---
>  arch/arm/dts/stm32mp15-pinctrl.dtsi | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 

Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>

Thanks

Patrick

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 4/5] ARM: dts: stm32: Repair I2C2 operation on AV96
  2020-05-26  2:30 ` [PATCH 4/5] ARM: dts: stm32: Repair I2C2 operation on AV96 Marek Vasut
@ 2020-05-27 13:44   ` Patrick DELAUNAY
  0 siblings, 0 replies; 13+ messages in thread
From: Patrick DELAUNAY @ 2020-05-27 13:44 UTC (permalink / raw)
  To: u-boot

> From: Marek Vasut <marex@denx.de>
> Sent: mardi 26 mai 2020 04:30
> 
> The I2C2 uses different pinmux on AV96, use correct pinmux and also add
> comments about the I2C being present on the "low-speed"
> expansion connector X6.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Patrick Delaunay <patrick.delaunay@st.com>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> ---
>  arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 

Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>

Thanks

Patrick

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 5/5] ARM: dts: stm32: Disable SDR104 mode on AV96
  2020-05-26  2:30 ` [PATCH 5/5] ARM: dts: stm32: Disable SDR104 mode " Marek Vasut
@ 2020-05-27 13:45   ` Patrick DELAUNAY
  2020-05-27 17:47     ` Marek Vasut
  0 siblings, 1 reply; 13+ messages in thread
From: Patrick DELAUNAY @ 2020-05-27 13:45 UTC (permalink / raw)
  To: u-boot

Hi Marek,

> From: Marek Vasut <marex@denx.de>
> Sent: mardi 26 mai 2020 04:30
> 
> Disable SDR104 mode until we know it is really stable.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Patrick Delaunay <patrick.delaunay@st.com>
> Cc: Patrice Chotard <patrice.chotard@st.com>
> ---
>  arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts | 1 -
>  1 file changed, 1 deletion(-)
> 

Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>

Thanks

Patrick

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 5/5] ARM: dts: stm32: Disable SDR104 mode on AV96
  2020-05-27 13:45   ` Patrick DELAUNAY
@ 2020-05-27 17:47     ` Marek Vasut
  2020-05-28  7:43       ` Patrick DELAUNAY
  0 siblings, 1 reply; 13+ messages in thread
From: Marek Vasut @ 2020-05-27 17:47 UTC (permalink / raw)
  To: u-boot

On 5/27/20 3:45 PM, Patrick DELAUNAY wrote:
> Hi Marek,

Hi,

>> From: Marek Vasut <marex@denx.de>
>> Sent: mardi 26 mai 2020 04:30
>>
>> Disable SDR104 mode until we know it is really stable.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Patrick Delaunay <patrick.delaunay@st.com>
>> Cc: Patrice Chotard <patrice.chotard@st.com>
>> ---
>>  arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts | 1 -
>>  1 file changed, 1 deletion(-)
>>
> 
> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>

This is for 2020.07 , it's the remaining stuff which fell through the
cracks . And then that's it :)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 5/5] ARM: dts: stm32: Disable SDR104 mode on AV96
  2020-05-27 17:47     ` Marek Vasut
@ 2020-05-28  7:43       ` Patrick DELAUNAY
  2020-05-28  9:53         ` Marek Vasut
  0 siblings, 1 reply; 13+ messages in thread
From: Patrick DELAUNAY @ 2020-05-28  7:43 UTC (permalink / raw)
  To: u-boot

Hi :qrekm

> From: Marek Vasut <marex@denx.de>
> Sent: mercredi 27 mai 2020 19:48
> 
> On 5/27/20 3:45 PM, Patrick DELAUNAY wrote:
> > Hi Marek,
> 
> Hi,
> 
> >> From: Marek Vasut <marex@denx.de>
> >> Sent: mardi 26 mai 2020 04:30
> >>
> >> Disable SDR104 mode until we know it is really stable.
> >>
> >> Signed-off-by: Marek Vasut <marex@denx.de>
> >> Cc: Patrick Delaunay <patrick.delaunay@st.com>
> >> Cc: Patrice Chotard <patrice.chotard@st.com>
> >> ---
> >>  arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts | 1 -
> >>  1 file changed, 1 deletion(-)
> >>
> >
> > Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
> 
> This is for 2020.07 , it's the remaining stuff which fell through the cracks . And
> then that's it :)

Sure.

For the serie:

Applied to u-boot-stm/master, thanks!

And I am preparing the pull request for v2020.07-rc4.

Regards

Patrick

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 5/5] ARM: dts: stm32: Disable SDR104 mode on AV96
  2020-05-28  7:43       ` Patrick DELAUNAY
@ 2020-05-28  9:53         ` Marek Vasut
  0 siblings, 0 replies; 13+ messages in thread
From: Marek Vasut @ 2020-05-28  9:53 UTC (permalink / raw)
  To: u-boot

On 5/28/20 9:43 AM, Patrick DELAUNAY wrote:
> Hi :qrekm

Hi,

>> From: Marek Vasut <marex@denx.de>
>> Sent: mercredi 27 mai 2020 19:48
>>
>> On 5/27/20 3:45 PM, Patrick DELAUNAY wrote:
>>> Hi Marek,
>>
>> Hi,
>>
>>>> From: Marek Vasut <marex@denx.de>
>>>> Sent: mardi 26 mai 2020 04:30
>>>>
>>>> Disable SDR104 mode until we know it is really stable.
>>>>
>>>> Signed-off-by: Marek Vasut <marex@denx.de>
>>>> Cc: Patrick Delaunay <patrick.delaunay@st.com>
>>>> Cc: Patrice Chotard <patrice.chotard@st.com>
>>>> ---
>>>>  arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts | 1 -
>>>>  1 file changed, 1 deletion(-)
>>>>
>>>
>>> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
>>
>> This is for 2020.07 , it's the remaining stuff which fell through the cracks . And
>> then that's it :)
> 
> Sure.
> 
> For the serie:
> 
> Applied to u-boot-stm/master, thanks!
> 
> And I am preparing the pull request for v2020.07-rc4.

Thanks

-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-05-28  9:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26  2:30 [PATCH 1/5] ARM: stm32: Re-enable KS8851 on DHCOM Marek Vasut
2020-05-26  2:30 ` [PATCH 2/5] ARM: stm32: Hog GPIO PF7 high on DHCOR to unlock SPI NOR nWP Marek Vasut
2020-05-27 13:37   ` Patrick DELAUNAY
2020-05-26  2:30 ` [PATCH 3/5] ARM: dts: stm32: Add alternate pinmux for I2C2 pins Marek Vasut
2020-05-27 13:38   ` Patrick DELAUNAY
2020-05-26  2:30 ` [PATCH 4/5] ARM: dts: stm32: Repair I2C2 operation on AV96 Marek Vasut
2020-05-27 13:44   ` Patrick DELAUNAY
2020-05-26  2:30 ` [PATCH 5/5] ARM: dts: stm32: Disable SDR104 mode " Marek Vasut
2020-05-27 13:45   ` Patrick DELAUNAY
2020-05-27 17:47     ` Marek Vasut
2020-05-28  7:43       ` Patrick DELAUNAY
2020-05-28  9:53         ` Marek Vasut
2020-05-27 13:34 ` [PATCH 1/5] ARM: stm32: Re-enable KS8851 on DHCOM Patrick DELAUNAY

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.